Hierarchy

  • Envelope

Index

References

Record

Re-exports Record

createFromProtobuf

Re-exports createFromProtobuf

openAndCertify

Re-exports openAndCertify

seal

Re-exports seal

Constructors

constructor

  • new Envelope(__namedParameters: { payload: Uint8Array; payloadType: Uint8Array; peerId: PeerId; signature: Uint8Array }): Envelope
  • The Envelope is responsible for keeping an arbitrary signed record by a libp2p peer.

    Parameters

    • __namedParameters: { payload: Uint8Array; payloadType: Uint8Array; peerId: PeerId; signature: Uint8Array }
      • payload: Uint8Array
      • payloadType: Uint8Array
      • peerId: PeerId
      • signature: Uint8Array

    Returns Envelope

Properties

_marshal

_marshal: Uint8Array | undefined

payload

payload: Uint8Array

payloadType

payloadType: Uint8Array

peerId

peerId: PeerId

signature

signature: Uint8Array

Methods

equals

  • Verifies if the other Envelope is identical to this one.

    Parameters

    Returns boolean

marshal

  • marshal(): Uint8Array
  • Marshal the envelope content.

    Returns Uint8Array

validate

  • validate(domain: string): Promise<boolean>
  • Validate envelope data signature for the given domain.

    Parameters

    • domain: string

    Returns Promise<boolean>