reticulum-js
    Preparing search index...
    • Wraps an arbitrary (non-LXMF) payload into a rfed channel SEND payload.

      Like wrapChannelMessage but skips LXMF serialisation entirely. The plaintext is just the RTID prelude (magic + sender public key) followed by the raw payload bytes — the application payload is self-describing and self-authenticating (e.g. a Dacar delta carries its own issuer hash, Ed25519 signature, and timestamp), so the LXMF destination/source/signature framing is redundant and only wastes MTU.

      Wire format (RFed/SPEC.md "CANONICAL WIRE FORMAT"; the inner_blob is opaque to the node):

      plaintext   = "RTID"(4)sender_identity_pub(64)payload
      inner_blob = EC_encrypt(channel_identity.X25519_pub, plaintext)
      rfed_payload= channel_hash(16)inner_blobstamp(32)?

      The RTID prelude is retained so the message is identifiable as a rfed channel message and the sender identity is recoverable by subscribers. The node treats inner_blob opaquely — it never decrypts or inspects it — so this is fully compatible with both the Rust and JS rfed nodes. Only subscribers holding the channel private key can recover the payload.

      Integrity is the application's responsibility: the channel EC gate ensures only authorised subscribers can produce a valid inner_blob, but the payload itself should carry its own authentication (e.g. an embedded Ed25519 signature) since rfed does not verify it.

      Parameters

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

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

        • payload: Uint8Array<ArrayBufferLike>

          Raw application payload.

        • senderIdentity: Identity

          Sender's Identity (supplies the prelude public key).

        • 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<
          {
              channelHash: Uint8Array;
              innerBlob: Uint8Array;
              rfedPayload: Uint8Array;
              stamp: Uint8Array<ArrayBufferLike>
              | null;
          },
      >