reticulum-js
    Preparing search index...
    • Wraps an LXMF message into a rfed channel SEND payload.

      The LXMF message is serialised (signed by senderIdentity), the RTID prelude + sender public key are prepended to the LXMF tail, the whole thing is EC-encrypted to the channel identity, and the channel hash + optional PoW stamp are framed around it.

      lxmMessage.sourceHash / destinationHash are forced to the correct lxmf.delivery hashes (sender and channel respectively) so the classic "source_hash is the identity hash" bug cannot occur.

      Parameters

      • opts: {
            channelIdentity: Identity;
            lxmMessage: LXMessage;
            senderIdentity: Identity;
            senderLxmDeliveryHash: Uint8Array<ArrayBufferLike>;
            stampCost?: number | null;
        }
        • channelIdentity: Identity

          Channel's derived Identity (holds the private key used to EC-encrypt).

        • lxmMessage: LXMessage

          LXMF message to wrap. content/fields are read here; addressing is overwritten per the spec.

        • senderIdentity: Identity

          Sender's Identity (signs the LXMF message and supplies the prelude public key).

        • senderLxmDeliveryHash: Uint8Array<ArrayBufferLike>

          Sender's lxmf.delivery destination hash (16 bytes) — the LXMF source_hash.

        • OptionalstampCost?: number | null

          rfed PoW cost. null or 0 disables stamping (no stamp appended); any positive value appends a real 32-byte stamp.

      Returns Promise<
          {
              channelDeliveryHash: Uint8Array;
              channelHash: Uint8Array;
              innerBlob: Uint8Array;
              rfedPayload: Uint8Array;
              stamp: Uint8Array<ArrayBufferLike>
              | null;
          },
      >