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
Parameter | Type | Description |
---|---|---|
| The transport config. |
Returns
Defined
@nilfoundation/niljs/src/transport/MetaMaskTransport.ts:35
Methods
closeConnection()
closeConnection(): void
Closes the connection to the network.
Returns
void
Implementation of
Defined
@nilfoundation/niljs/src/transport/MetaMaskTransport.ts:78
connect()
connect(): void
Connects to the network.
Returns
void
Implementation of
Defined
@nilfoundation/niljs/src/transport/MetaMaskTransport.ts:69
request()
request<T>(requestObject): Promise<T>
Sends a request to the network.
Type Parameters
Type Parameter | Description |
---|---|
|
Parameters
Parameter | Type | Description |
---|---|---|
|
| The request object. |
Returns
Promise
<T
>
The response.
Async
Implementation of
Defined
@nilfoundation/niljs/src/transport/MetaMaskTransport.ts:60