Orderly SDKs / Modules / @orderly.network/core / WalletAdapter

Interface: WalletAdapter

@orderly.network/core.WalletAdapter

Implemented by

Table of contents

Properties

Accessors

Methods

Properties

formatUnits

formatUnits: (amount: string) => string

Type declaration

▸ (amount): string

Parameters
NameType
amountstring
Returns

string

Defined in

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


getBalance

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

Type declaration

▸ (userAddress): Promise<any>

Parameters
NameType
userAddressstring
Returns

Promise<any>

Defined in

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


getTransactionRecipect

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

Type declaration

▸ (txHash): Promise<any>

Parameters
NameType
txHashstring
Returns

Promise<any>

Defined in

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


parseUnits

parseUnits: (amount: string) => string

Type declaration

▸ (amount): string

Parameters
NameType
amountstring
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
NameType
txHashstring
baseInterval?number
maxInterval?number
maxRetries?number
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
NameType
methodstring
paramsany[] | Record<string, any>
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
NameType
addressstring
dataany
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

NameType
chainIdnumber

Returns

void

Defined in

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

Methods

call

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

Parameters

NameType
addressstring
methodstring
paramsany
optionsObject
options.abiany

Returns

Promise<any>

Defined in

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


callOnChain

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

Parameters

NameType
chainNetworkInfos
addressstring
methodstring
paramsany
optionsObject
options.abiany

Returns

Promise<any>

Defined in

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


off

off(eventName, listener): void

Parameters

NameType
eventNameany
listenerany

Returns

void

Defined in

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


on

on(eventName, listener): void

Parameters

NameType
eventNameany
listenerany

Returns

void

Defined in

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


sendTransaction

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

Parameters

NameType
contractAddressstring
methodstring
payloadObject
payload.dataany[]
payload.fromstring
payload.to?string
payload.value?bigint
optionsObject
options.abiany

Returns

Promise<TransactionResponse>

Defined in

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