WalletAdapter
Defined in: packages/iso-filecoin-wallets/src/types.ts:76
Wallet adapter interface
Extends
Section titled “Extends”TypedEventTarget
<WalletEvents
>
Methods
Section titled “Methods”sign()
Section titled “sign()”Defined in: packages/iso-filecoin-wallets/src/types.ts:153
Sign raw bytes
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
data | Uint8Array | raw bytes to sign |
Returns
Section titled “Returns”Properties
Section titled “Properties”account
Section titled “account”
readonly
account:undefined
|IAccount
Defined in: packages/iso-filecoin-wallets/src/types.ts:120
Currently active account, if connected
changeNetwork()
Section titled “changeNetwork()”changeNetwork: (
network
) =>Promise
<AccountNetwork
>
Defined in: packages/iso-filecoin-wallets/src/types.ts:146
Change the network and derive a new account
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
network | Network | The network to change to |
Returns
Section titled “Returns”checkSupport()
Section titled “checkSupport()”checkSupport: () =>
Promise
<void
>
Defined in: packages/iso-filecoin-wallets/src/types.ts:125
Check if this wallet adapter is supported in the current environment
Returns
Section titled “Returns”Promise
<void
>
connect()
Section titled “connect()”connect: (
params
) =>Promise
<AccountNetwork
>
Defined in: packages/iso-filecoin-wallets/src/types.ts:130
Connect to the wallet
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
params | { network? : Network ; } | Connect params |
params.network? | Network | - |
Returns
Section titled “Returns”connected
Section titled “connected”
readonly
connected:boolean
Defined in: packages/iso-filecoin-wallets/src/types.ts:115
Whether the wallet is currently connected
connecting
Section titled “connecting”
readonly
connecting:boolean
Defined in: packages/iso-filecoin-wallets/src/types.ts:110
Whether the wallet is in the process of connecting
deriveAccount()
Section titled “deriveAccount()”Defined in: packages/iso-filecoin-wallets/src/types.ts:140
Derive a new account at the given index
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
index | number | The derivation path index |
Returns
Section titled “Returns”disconnect()
Section titled “disconnect()”disconnect: () =>
Promise
<void
>
Defined in: packages/iso-filecoin-wallets/src/types.ts:134
Disconnect from the wallet
Returns
Section titled “Returns”Promise
<void
>
readonly
id:string
Defined in: packages/iso-filecoin-wallets/src/types.ts:85
Wallet adapter identifier (e.g. ‘filsnap’, ‘ledger’, ‘hd’, ‘raw’)
name:
string
Defined in: packages/iso-filecoin-wallets/src/types.ts:90
Human readable wallet name
network
Section titled “network”
readonly
network:Network
Defined in: packages/iso-filecoin-wallets/src/types.ts:100
Current network (mainnet or testnet)
signMessage()
Section titled “signMessage()”Defined in: packages/iso-filecoin-wallets/src/types.ts:160
Sign filecoin message
Parameters
Section titled “Parameters”Parameter | Type | Description |
---|---|---|
message | { from : string ; gasFeeCap : string ; gasLimit : number ; gasPremium : string ; method : number ; nonce : number ; params : string ; to : string ; value : string ; version : 0 ; } | Filecoin message to sign |
message.from | string | - |
message.gasFeeCap | string | - |
message.gasLimit | number | - |
message.gasPremium | string | - |
message.method | number | - |
message.nonce | number | - |
message.params | string | - |
message.to | string | - |
message.value | string | - |
message.version | 0 | - |
Returns
Section titled “Returns”support
Section titled “support”
readonly
support:"NotChecked"
|"Detected"
|"NotDetected"
|"NotSupported"
Defined in: packages/iso-filecoin-wallets/src/types.ts:105
Wallet support status (NotChecked, Detected, NotDetected, NotSupported)
readonly
uid:string
Defined in: packages/iso-filecoin-wallets/src/types.ts:80
Unique identifier for this wallet instance
url:
string
Defined in: packages/iso-filecoin-wallets/src/types.ts:95
Wallet homepage URL