libp2p
    Preparing search index...

    Interface DataTransform

    interface DataTransform {
        inboundTransform(topic: string, data: Uint8Array): Uint8Array;
        outboundTransform(topic: string, data: Uint8Array): Uint8Array;
    }
    Index
    • Takes the data published by peers on a topic and transforms the data. Should be the reverse of outboundTransform(). Example:

      • inboundTransform(): decompress snappy payload
      • outboundTransform(): compress snappy payload

      Parameters

      Returns Uint8Array