Orderly network core.WalletAdapter
Orderly SDKs / Modules / @orderly.network/core / WalletAdapter
Interface: WalletAdapter
@orderly.network/core.WalletAdapter
Implemented by
Table of contents
Properties
- formatUnits
- getBalance
- getTransactionRecipect
- parseUnits
- pollTransactionReceiptWithBackoff
- send
- signTypedData
Accessors
Methods
Properties
formatUnits
• formatUnits: (amount
: string
) => string
Type declaration
▸ (amount
): string
Parameters
Name | Type |
---|---|
amount | string |
Returns
string
Defined in
packages/core/src/wallet/adapter.ts:14
getBalance
• getBalance: (userAddress
: string
) => Promise
<any
>
Type declaration
▸ (userAddress
): Promise
<any
>
Parameters
Name | Type |
---|---|
userAddress | string |
Returns
Promise
<any
>
Defined in
packages/core/src/wallet/adapter.ts:47
getTransactionRecipect
• getTransactionRecipect: (txHash
: string
) => Promise
<any
>
Type declaration
▸ (txHash
): Promise
<any
>
Parameters
Name | Type |
---|---|
txHash | string |
Returns
Promise
<any
>
Defined in
packages/core/src/wallet/adapter.ts:36
parseUnits
• parseUnits: (amount
: string
) => string
Type declaration
▸ (amount
): string
Parameters
Name | Type |
---|---|
amount | string |
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
Name | Type |
---|---|
txHash | string |
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
Name | Type |
---|---|
method | string |
params | any [] | 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
Name | Type |
---|---|
address | string |
data | any |
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
Name | Type |
---|---|
chainId | number |
Returns
void
Defined in
packages/core/src/wallet/adapter.ts:12
Methods
call
▸ call(address
, method
, params
, options
): Promise
<any
>
Parameters
Name | Type |
---|---|
address | string |
method | string |
params | any |
options | Object |
options.abi | any |
Returns
Promise
<any
>
Defined in
packages/core/src/wallet/adapter.ts:52
callOnChain
▸ callOnChain(chain
, address
, method
, params
, options
): Promise
<any
>
Parameters
Name | Type |
---|---|
chain | NetworkInfos |
address | string |
method | string |
params | any |
options | Object |
options.abi | any |
Returns
Promise
<any
>
Defined in
packages/core/src/wallet/adapter.ts:61
off
▸ off(eventName
, listener
): void
Parameters
Name | Type |
---|---|
eventName | any |
listener | any |
Returns
void
Defined in
packages/core/src/wallet/adapter.ts:72
on
▸ on(eventName
, listener
): void
Parameters
Name | Type |
---|---|
eventName | any |
listener | any |
Returns
void
Defined in
packages/core/src/wallet/adapter.ts:71
sendTransaction
▸ sendTransaction(contractAddress
, method
, payload
, options
): Promise
<TransactionResponse
>
Parameters
Name | Type |
---|---|
contractAddress | string |
method | string |
payload | Object |
payload.data | any [] |
payload.from | string |
payload.to? | string |
payload.value? | bigint |
options | Object |
options.abi | any |
Returns
Promise
<TransactionResponse
>