bn.getWalletConnectorContext
▸ getWalletConnectorContext(): WalletConnectorContext
description
The api to get WalletConnectorContext
example
const walletConnectorContext = bn.getWalletConnectorContext()
Returns
WalletConnectorContext
Class: WalletConnectorContext
Name | Type | Description |
---|---|---|
_rpcHooks | RPCHooks | |
callbacks | Map <number , (error : null | Error | ProviderRpcError , response : Maybe <string []>) => void > | |
requestId | number | |
wallet | null | WalletType = null | |
isProcessingRequestAccounts | boolean = false | |
web3Provider | Web3Provider | |
walletConnectProvider | WalletConnectProvider | |
experimental | Experimental | |
request | (payload ): Promise <EthJsonRpc [T ]["response" ]["result" ]> | |
disconnect | (): void | |
handleInitialRequest | (payload ): Promise <EthJsonRpc [T ]["response" ]["result" ]> | |
setIncomingMessages | (socketMessage ): void | |
registerEvent | (): Promise <void > | |
resetConnection | (): void | |
updateWallet | (wallet , walletId? ): void |
request
▸ request<T
>(payload
): Promise
<EthJsonRpc
[T
]["response"
]["result"
]>
Type parameters
Name | Type |
---|---|
T | extends keyof EthJsonRpc |
Parameters
Name | Type |
---|---|
payload | EthJsonRpc [T ]["request" ] |
Returns
Promise
<EthJsonRpc
[T
]["response"
]["result"
]>
disconnect
▸ disconnect(): void
Returns
void
handleInitialRequest
▸ Private
handleInitialRequest<T
>(payload
): Promise
<EthJsonRpc
[T
]["response"
]["result"
]>
Type parameters
Name | Type |
---|---|
T | extends keyof EthJsonRpc |
Parameters
Name | Type |
---|---|
payload | EthJsonRpc [T ]["request" ] |
Returns
Promise
<EthJsonRpc
[T
]["response"
]["result"
]>
setIncomingMessages
▸ setIncomingMessages(socketMessage
): void
Parameters
Name | Type |
---|---|
socketMessage | WalletConnectorEventMessagePayload |
Returns
void
registerEvent
▸ Private
registerEvent(): Promise
<void
>
Returns
Promise
<void
>
resetConnection
▸ Private
resetConnection(): void
Returns
void