Skip to main content

Class: MetaMaskTransport

MetaMask transport represents the MetaMask transport for connecting to the network. MetaMask transport can be used in browser only. MetaMaskTransport

Implements

Implements

Constructors

new MetaMaskTransport()

new MetaMaskTransport(config): MetaMaskTransport

Creates an instance of MetaMaskTransport.

Parameters

ParameterTypeDescription

config

IHttpTransportConfig

The transport config.

Returns

MetaMaskTransport

Defined

@nilfoundation/niljs/src/transport/MetaMaskTransport.ts:35

Methods

closeConnection()

closeConnection(): void

Closes the connection to the network.

Returns

void

Implementation of

ITransport.closeConnection

Defined

@nilfoundation/niljs/src/transport/MetaMaskTransport.ts:78


connect()

connect(): void

Connects to the network.

Returns

void

Implementation of

ITransport.connect

Defined

@nilfoundation/niljs/src/transport/MetaMaskTransport.ts:69


request()

request<T>(requestObject): Promise<T>

Sends a request to the network.

Type Parameters

Type ParameterDescription

T

Parameters

ParameterTypeDescription

requestObject

RequestArguments

The request object.

Returns

Promise<T>

The response.

Async

Implementation of

ITransport.request

Defined

@nilfoundation/niljs/src/transport/MetaMaskTransport.ts:60