Channel between a private gateway (the node) and its Internet gateway (the peer).

Hierarchy

  • PrivateGatewayChannel<string>
    • PrivateInternetGatewayChannel

Constructors

Properties

cryptoOptions: Partial<NodeCryptoOptions> = {}
deliveryAuthPath: CertificationPath
keyStores: KeyStoreSet
node: Node<GatewayPayload, string>
peer: Peer<string>

Methods

  • Generate a PrivateNodeRegistrationAuthorization with the gatewayData and expiryDate.

    Parameters

    • gatewayData: ArrayBuffer
    • expiryDate: Date

    Returns Promise<ArrayBuffer>

  • Generate and serialise a message with the given payload.

    Parameters

    • payload: ArrayBuffer | GatewayPayload

      The payload to encrypt and encapsulate

    • messageConstructor: RAMFMessageConstructor<GatewayPayload>

      The message class constructor

    • options: Partial<Omit<MessageOptions, "senderCaCertificateChain">> = {}

    Returns Promise<ArrayBuffer>

  • Return a PrivateNodeRegistration including a new certificate for endpointPublicKey.

    Parameters

    • endpointPublicKey: CryptoKey

    Returns Promise<ArrayBuffer>

    The serialization of the registration

  • Parse PrivateNodeRegistrationAuthorization and return its gatewayData if valid.

    Parameters

    • authorizationSerialized: ArrayBuffer

    Returns Promise<ArrayBuffer>

    Throws

    InvalidMessageError if the authorization is malformed, invalid or expired

Generated using TypeDoc