Class EnclaveMockProvider

Describes a provider which can exchange messages with an Enclave over an untrusted message broker commonly referred to as the operator.

Hierarchy

  • EnclaveMockProvider

Implements

Constructors

Properties

config?: ClientConfig
oncall: null | ((ev: Call) => any)
onclose: null | ((ev: CloseEvent) => any)

Callback handler when the link gets closed.

onerror: null | ((ev: Event) => any)

Callback handler when an error related to the connection is encountered.

onmessage: null | ((ev: MessageEvent<any>) => any)

Callback handler when a message is received over the connection.

onopen: null | ((ev: Event) => any)

Callback handler when the connection is established.

Methods

  • Parameters

    • id: string
    • tx: Transaction

    Returns any

  • Sends data to the enclave.

    Throws

    An error when the connection was not setup beforehand with connect().

    Parameters

    • data: string | ArrayBufferLike | Blob | ArrayBufferView

      The data to send.

    Returns any

Generated using TypeDoc