Skip to main content
Orderly SDKs / Modules / @orderly.network/hooks / WalletAdapter

Interface: WalletAdapter

@orderly.network/hooks.WalletAdapter

Table of contents

Properties

Accessors

Methods

Properties

formatUnits

formatUnits: (amount: string) => string

Type declaration

▸ (amount): string
Parameters
Returns
string

Defined in

packages/core/src/wallet/adapter.ts:14

getBalance

getBalance: (userAddress: string) => Promise<any>

Type declaration

▸ (userAddress): Promise<any>
Parameters
Returns
Promise<any>

Defined in

packages/core/src/wallet/adapter.ts:47

getTransactionRecipect

getTransactionRecipect: (txHash: string) => Promise<any>

Type declaration

▸ (txHash): Promise<any>
Parameters
Returns
Promise<any>

Defined in

packages/core/src/wallet/adapter.ts:36

parseUnits

parseUnits: (amount: string) => string

Type declaration

▸ (amount): string
Parameters
Returns
string

Defined in

packages/core/src/wallet/adapter.ts:13

pollTransactionReceiptWithBackoff

pollTransactionReceiptWithBackoff: (txHash: string, baseInterval?: number, maxInterval?: number, maxRetries?: number) => Promise<any>

Type declaration

▸ (txHash, baseInterval?, maxInterval?, maxRetries?): Promise<any>
Parameters
Returns
Promise<any>

Defined in

packages/core/src/wallet/adapter.ts:39

send

send: (method: string, params: any[] | Record<string, any>) => Promise<any>

Type declaration

▸ (method, params): Promise<any>
Parameters
Returns
Promise<any>

Defined in

packages/core/src/wallet/adapter.ts:17

signTypedData

signTypedData: (address: string, data: any) => Promise<string>

Type declaration

▸ (address, data): Promise<string>
Parameters
Returns
Promise<string>

Defined in

packages/core/src/wallet/adapter.ts:37

Accessors

addresses

get addresses(): string

Returns

string

Defined in

packages/core/src/wallet/adapter.ts:8

chainId

get chainId(): number

Returns

number

Defined in

packages/core/src/wallet/adapter.ts:7 set chainId(chainId): void Set the chain id

Parameters

Returns

void

Defined in

packages/core/src/wallet/adapter.ts:12

Methods

call

call(address, method, params, options): Promise<any>

Parameters

Returns

Promise<any>

Defined in

packages/core/src/wallet/adapter.ts:52

callOnChain

callOnChain(chain, address, method, params, options): Promise<any>

Parameters

Returns

Promise<any>

Defined in

packages/core/src/wallet/adapter.ts:61

off

off(eventName, listener): void

Parameters

Returns

void

Defined in

packages/core/src/wallet/adapter.ts:72

on

on(eventName, listener): void

Parameters

Returns

void

Defined in

packages/core/src/wallet/adapter.ts:71

sendTransaction

sendTransaction(contractAddress, method, payload, options): Promise<TransactionResponse>

Parameters

Returns

Promise<TransactionResponse>

Defined in

packages/core/src/wallet/adapter.ts:22