WalletAdapter
Defined in: packages/iso-filecoin-wallets/src/types.ts:76
Wallet adapter interface
Extends
Section titled “Extends”TypedEventTarget<WalletEvents>
Properties
Section titled “Properties”account
Section titled “account”
readonlyaccount:IAccount|undefined
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”
readonlyconnected:boolean
Defined in: packages/iso-filecoin-wallets/src/types.ts:115
Whether the wallet is currently connected
connecting
Section titled “connecting”
readonlyconnecting: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>
readonlyid: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”
readonlynetwork:Network
Defined in: packages/iso-filecoin-wallets/src/types.ts:100
Current network (mainnet or testnet)
personalSign()
Section titled “personalSign()”Defined in: packages/iso-filecoin-wallets/src/types.ts:162
Sign FRC-102 message
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | raw bytes to sign |
Returns
Section titled “Returns”https://github.com/filecoin-project/FIPs/blob/master/FRCs/frc-0102.md
signMessage()
Section titled “signMessage()”Defined in: packages/iso-filecoin-wallets/src/types.ts:169
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”
readonlysupport:"NotChecked"|"Detected"|"NotDetected"|"NotSupported"
Defined in: packages/iso-filecoin-wallets/src/types.ts:105
Wallet support status (NotChecked, Detected, NotDetected, NotSupported)
readonlyuid: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
Methods
Section titled “Methods”addEventListener()
Section titled “addEventListener()”addEventListener<
T>(type,callback,options?):void
Defined in: node_modules/.pnpm/[email protected]/node_modules/iso-web/dist/src/event-target/index.d.ts:29
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends "accountChanged" | "networkChanged" | "disconnect" | "connect" | "error" | "stateChanged" |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type | T |
callback | TypedEventListenerOrEventListenerObject<WalletEvents, T> | null |
options? | boolean | AddEventListenerOptions |
Returns
Section titled “Returns”void
Inherit Doc
Section titled “Inherit Doc”Inherited from
Section titled “Inherited from”TypedEventTarget.addEventListener
dispatchEvent()
Section titled “dispatchEvent()”dispatchEvent(
event):boolean
Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.dom.d.ts:11575
The dispatchEvent() method of the EventTarget sends an Event to the object, (synchronously) invoking the affected event listeners in the appropriate order.
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
event | Event |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”TypedEventTarget.dispatchEvent
dispatchTypedEvent()
Section titled “dispatchTypedEvent()”dispatchTypedEvent<
T>(_type,event):boolean
Defined in: node_modules/.pnpm/[email protected]/node_modules/iso-web/dist/src/event-target/index.d.ts:20
Dispatches a synthetic event to target and returns true if either event’s cancelable attribute value is false or its preventDefault() method was not invoked, and false otherwise.
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends keyof WalletEvents |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
_type | T |
event | WalletEvents[T] |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”TypedEventTarget.dispatchTypedEvent
emit()
Section titled “emit()”emit<
T>(…args):boolean
Defined in: node_modules/.pnpm/[email protected]/node_modules/iso-web/dist/src/event-target/index.d.ts:21
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends keyof WalletEvents |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
…args | WalletEvents[T]["detail"] extends IsAny<WalletEvents[T]["detail"]> ? [T, unknown] : [T, WalletEvents[T]["detail"]] |
Returns
Section titled “Returns”boolean
Inherited from
Section titled “Inherited from”TypedEventTarget.emit
off<
T>(type,callback,options?):void
Defined in: node_modules/.pnpm/[email protected]/node_modules/iso-web/dist/src/event-target/index.d.ts:55
Alias for TypedEventTarget.removeEventListener
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends "accountChanged" | "networkChanged" | "disconnect" | "connect" | "error" | "stateChanged" |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type | T |
callback | TypedEventListenerOrEventListenerObject<WalletEvents, T> | null |
options? | boolean | EventListenerOptions |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”TypedEventTarget.off
on<
T>(type,callback,options?):void
Defined in: node_modules/.pnpm/[email protected]/node_modules/iso-web/dist/src/event-target/index.d.ts:38
Alias for TypedEventTarget.addEventListener
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends "accountChanged" | "networkChanged" | "disconnect" | "connect" | "error" | "stateChanged" |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type | T |
callback | TypedEventListenerOrEventListenerObject<WalletEvents, T> | null |
options? | boolean | AddEventListenerOptions |
Returns
Section titled “Returns”void
Inherited from
Section titled “Inherited from”TypedEventTarget.on
removeEventListener()
Section titled “removeEventListener()”removeEventListener<
T>(type,callback,options?):void
Defined in: node_modules/.pnpm/[email protected]/node_modules/iso-web/dist/src/event-target/index.d.ts:46
Type Parameters
Section titled “Type Parameters”| Type Parameter |
|---|
T extends "accountChanged" | "networkChanged" | "disconnect" | "connect" | "error" | "stateChanged" |
Parameters
Section titled “Parameters”| Parameter | Type |
|---|---|
type | T |
callback | TypedEventListenerOrEventListenerObject<WalletEvents, T> | null |
options? | boolean | EventListenerOptions |
Returns
Section titled “Returns”void
Inherit Doc
Section titled “Inherit Doc”Inherited from
Section titled “Inherited from”TypedEventTarget.removeEventListener
sign()
Section titled “sign()”Defined in: packages/iso-filecoin-wallets/src/types.ts:154
Sign raw bytes
Parameters
Section titled “Parameters”| Parameter | Type | Description |
|---|---|---|
data | Uint8Array | raw bytes to sign |