Hierarchy

  • WakuMessage

Constructors

Properties

Accessors

  • get signature(): undefined | Uint8Array
  • The signature of the message.

    MAY be present if the message is version 1.

    Returns undefined | Uint8Array

  • get signaturePublicKey(): undefined | Uint8Array
  • The public key used to sign the message.

    MAY be present if the message is version 1.

    Returns undefined | Uint8Array

Methods

  • Decode a byte array into Waku Message.

    Params

    bytes The message encoded using protobuf as defined in 14/WAKU2-MESSAGE.

    Params

    decryptionKeys If the payload is encrypted (version = 1), then the keys are used to attempt decryption of the message. The passed key can either be asymmetric private keys or symmetric keys, both method are tried for each key until the message is decrypted or combinations are run out.

    Parameters

    Returns Promise<undefined | waku_message.WakuMessage>

  • Create a Waku Message with the given payload.

    By default, the payload is kept clear (version 0). If opts.encPublicKey is passed, the payload is encrypted using asymmetric encryption (version 1).

    If opts.sigPrivKey is passed and version 1 is used, the payload is signed before encryption.

    Throws

    if both opts.encPublicKey and opt.symKey are passed

    Parameters

    Returns Promise<waku_message.WakuMessage>

Generated using TypeDoc