Skip to content

WalletAdapterHd

Defined in: packages/iso-filecoin-wallets/src/hd.js:34

HD wallet implementation

Implements

Extends

  • TypedEventTarget

Accessors

connected

Get Signature

get connected(): boolean;

Defined in: packages/iso-filecoin-wallets/src/hd.js:100

Whether the wallet is currently connected

Returns

boolean


connecting

Get Signature

get connecting(): boolean;

Defined in: packages/iso-filecoin-wallets/src/hd.js:96

Whether the wallet is in the process of connecting

Returns

boolean


support

Get Signature

get support(): "NotChecked" | "Detected" | "NotDetected" | "NotSupported";

Defined in: packages/iso-filecoin-wallets/src/hd.js:104

Wallet support status (NotChecked, Detected, NotDetected, NotSupported)

Returns

"NotChecked" | "Detected" | "NotDetected" | "NotSupported"

Constructors

Constructor

new WalletAdapterHd(config: WalletHDConfig): WalletAdapterHd;

Defined in: packages/iso-filecoin-wallets/src/hd.js:60

Parameters

ParameterType
configWalletHDConfig

Returns

WalletAdapterHd

Overrides

TypedEventTarget.constructor

Methods

addEventListener()

addEventListener<T>(
type: T,
callback:
| null
| TypedEventListenerOrEventListenerObject<WalletEvents, T>,
options?: boolean | AddEventListenerOptions): void;

Defined in: node_modules/.pnpm/[email protected]/node_modules/iso-web/dist/src/event-target/index.d.ts:29

Type Parameters

Type Parameter
T extends | "accountChanged" | "networkChanged" | "disconnect" | "connect" | "error" | "stateChanged"

Parameters

ParameterType
typeT
callback| null | TypedEventListenerOrEventListenerObject<WalletEvents, T>
options?boolean | AddEventListenerOptions

Returns

void

Inherit Doc

Inherited from

TypedEventTarget.addEventListener

changeNetwork()

changeNetwork(network: Network): Promise<{
account: IAccount;
network: Network;
}>;

Defined in: packages/iso-filecoin-wallets/src/hd.js:166

Parameters

ParameterType
networkNetwork

Returns

Promise<{ account: IAccount; network: Network; }>


checkSupport()

checkSupport(): Promise<void>;

Defined in: packages/iso-filecoin-wallets/src/hd.js:109

Check if this wallet adapter is supported in the current environment

Returns

Promise<void>


connect()

connect(params?: {
network: Network;
}): Promise<{
account: IAccount;
network: Network;
}>;

Defined in: packages/iso-filecoin-wallets/src/hd.js:127

Parameters

ParameterType
params?{ network: Network; }
params.network?Network

Returns

Promise<{ account: IAccount; network: Network; }>


deriveAccount()

deriveAccount(index: number): Promise<IAccount>;

Defined in: packages/iso-filecoin-wallets/src/hd.js:194

Parameters

ParameterType
indexnumber

Returns

Promise<IAccount>


disconnect()

disconnect(): Promise<void>;

Defined in: packages/iso-filecoin-wallets/src/hd.js:156

Disconnect from the wallet

Returns

Promise<void>


dispatchEvent()

dispatchEvent(event: Event): boolean;

Defined in: node_modules/.pnpm/[email protected]/node_modules/typescript/lib/lib.dom.d.ts:8882

Dispatches a synthetic event 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.

MDN Reference

Parameters

ParameterType
eventEvent

Returns

boolean

Inherited from

TypedEventTarget.dispatchEvent

dispatchTypedEvent()

dispatchTypedEvent<T>(_type: T, event: WalletEvents[T]): 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

Type Parameter
T extends keyof WalletEvents

Parameters

ParameterType
_typeT
eventWalletEvents[T]

Returns

boolean

Inherited from

TypedEventTarget.dispatchTypedEvent

emit()

emit<T>(...args: WalletEvents[T]["detail"] extends IsAny<WalletEvents[T]["detail"]> ? [T, unknown] : [T, WalletEvents[T]["detail"]]): boolean;

Defined in: node_modules/.pnpm/[email protected]/node_modules/iso-web/dist/src/event-target/index.d.ts:21

Type Parameters

Type Parameter
T extends keyof WalletEvents

Parameters

ParameterType
argsWalletEvents[T]["detail"] extends IsAny<WalletEvents[T]["detail"]> ? [T, unknown] : [T, WalletEvents[T]["detail"]]

Returns

boolean

Inherited from

TypedEventTarget.emit

off()

off<T>(
type: T,
callback:
| null
| TypedEventListenerOrEventListenerObject<WalletEvents, T>,
options?: boolean | EventListenerOptions): 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

Type Parameter
T extends | "accountChanged" | "networkChanged" | "disconnect" | "connect" | "error" | "stateChanged"

Parameters

ParameterType
typeT
callback| null | TypedEventListenerOrEventListenerObject<WalletEvents, T>
options?boolean | EventListenerOptions

Returns

void

Inherited from

TypedEventTarget.off

on()

on<T>(
type: T,
callback:
| null
| TypedEventListenerOrEventListenerObject<WalletEvents, T>,
options?: boolean | AddEventListenerOptions): 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

Type Parameter
T extends | "accountChanged" | "networkChanged" | "disconnect" | "connect" | "error" | "stateChanged"

Parameters

ParameterType
typeT
callback| null | TypedEventListenerOrEventListenerObject<WalletEvents, T>
options?boolean | AddEventListenerOptions

Returns

void

Inherited from

TypedEventTarget.on

removeEventListener()

removeEventListener<T>(
type: T,
callback:
| null
| TypedEventListenerOrEventListenerObject<WalletEvents, T>,
options?: boolean | EventListenerOptions): void;

Defined in: node_modules/.pnpm/[email protected]/node_modules/iso-web/dist/src/event-target/index.d.ts:46

Type Parameters

Type Parameter
T extends | "accountChanged" | "networkChanged" | "disconnect" | "connect" | "error" | "stateChanged"

Parameters

ParameterType
typeT
callback| null | TypedEventListenerOrEventListenerObject<WalletEvents, T>
options?boolean | EventListenerOptions

Returns

void

Inherit Doc

Inherited from

TypedEventTarget.removeEventListener

setup()

setup(config: WalletHDMnemonicConfig & {
index: number;
}): void;

Defined in: packages/iso-filecoin-wallets/src/hd.js:118

Setup the wallet from a mnemonic

Parameters

ParameterType
configWalletHDMnemonicConfig & { index: number; }

Returns

void


sign()

sign(data: Uint8Array<ArrayBufferLike>): Promise<Signature>;

Defined in: packages/iso-filecoin-wallets/src/hd.js:215

Parameters

ParameterTypeDescription
dataUint8Array<ArrayBufferLike>Data to sign

Returns

Promise<Signature>


signMessage()

signMessage(message: {
from: string;
gasFeeCap: string;
gasLimit: number;
gasPremium: string;
method: number;
nonce: number;
params: string;
to: string;
value: string;
version: 0;
}): Promise<Signature>;

Defined in: packages/iso-filecoin-wallets/src/hd.js:231

Parameters

ParameterTypeDescription
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.fromstring-
message.gasFeeCapstring-
message.gasLimitnumber-
message.gasPremiumstring-
message.methodnumber-
message.noncenumber-
message.paramsstring-
message.tostring-
message.valuestring-
message.version0-

Returns

Promise<Signature>


fromMnemonic()

static fromMnemonic(config: WalletHDMnemonicConfig): WalletAdapterHd;

Defined in: packages/iso-filecoin-wallets/src/hd.js:85

HD wallet from mnemonic

Parameters

ParameterType
configWalletHDMnemonicConfig

Returns

WalletAdapterHd


is()

static is(value: WalletAdapter): value is WalletAdapterHd;

Defined in: packages/iso-filecoin-wallets/src/hd.js:75

Parameters

ParameterType
valueWalletAdapter

Returns

value is WalletAdapterHd

Properties

[symbol]

[symbol]: boolean = true;

Defined in: packages/iso-filecoin-wallets/src/hd.js:36


account

account:
| undefined
| IAccount = undefined;

Defined in: packages/iso-filecoin-wallets/src/hd.js:42


id

id: string = 'hd';

Defined in: packages/iso-filecoin-wallets/src/hd.js:38

Wallet adapter identifier (e.g. ‘filsnap’, ‘ledger’, ‘hd’, ‘raw’)


name

name: string = 'Burner Wallet';

Defined in: packages/iso-filecoin-wallets/src/hd.js:39

Human readable wallet name


network

network: Network;

Defined in: packages/iso-filecoin-wallets/src/hd.js:67


signatureType

signatureType: "SECP256K1" | "BLS";

Defined in: packages/iso-filecoin-wallets/src/hd.js:68


uid

uid: string;

Defined in: packages/iso-filecoin-wallets/src/hd.js:37

Unique identifier for this wallet instance


url

url: string = 'https://filecoin.io';

Defined in: packages/iso-filecoin-wallets/src/hd.js:40

Wallet homepage URL