Icon HelpCircleForumIcon Link

⌘K

Icon HelpCircleForumIcon Link

@fuel-ts/account v0.95.0 Docs


Icon LinkClass: Wallet

Wallet provides methods to create locked and unlocked wallet instances.

Icon LinkConstructors

Icon Linknew Wallet()

Icon InfoCircle

new Wallet(): Wallet

Icon LinkReturns

Wallet

Icon LinkProperties

Icon LinkfromEncryptedJson()

Icon InfoCircle

static fromEncryptedJson: (jsonWallet, password, provider?) => Promise<WalletUnlocked > = WalletUnlocked.fromEncryptedJson

Create a Wallet Unlocked from an encrypted JSON.

Create a Wallet Unlocked from an encrypted JSON.

Icon LinkParameters

jsonWallet: string

The encrypted JSON keystore.

password: string

The password to decrypt the JSON.

provider?: Provider

A Provider instance (optional).

Icon LinkReturns

Promise<WalletUnlocked >

An unlocked wallet instance.

Icon LinkParam

The encrypted JSON keystore.

Icon LinkParam

The password to decrypt the JSON.

Icon LinkParam

A Provider instance (optional).

Icon LinkDefined in

packages/account/src/wallet/wallet.ts:79 Icon Link


Icon LinkfromExtendedKey()

Icon InfoCircle

static fromExtendedKey: (extendedKey, provider?) => WalletUnlocked = WalletUnlocked.fromExtendedKey

Create a Wallet Unlocked from an extended key.

Create a Wallet Unlocked from an extended key.

Icon LinkParameters

extendedKey: string

The extended key.

provider?: Provider

A Provider instance (optional).

Icon LinkReturns

WalletUnlocked

An instance of WalletUnlocked.

Icon LinkParam

The extended key.

Icon LinkParam

A Provider instance (optional).

Icon LinkDefined in

packages/account/src/wallet/wallet.ts:69 Icon Link


Icon LinkfromMnemonic()

Icon InfoCircle

static fromMnemonic: (mnemonic, path?, passphrase?, provider?) => WalletUnlocked = WalletUnlocked.fromMnemonic

Create a Wallet Unlocked from a mnemonic phrase.

Create a Wallet Unlocked from a mnemonic phrase.

Icon LinkParameters

mnemonic: string

The mnemonic phrase.

path?: string

The derivation path (optional).

passphrase?: BytesLike

The passphrase for the mnemonic (optional).

provider?: Provider

A Provider instance (optional).

Icon LinkReturns

WalletUnlocked

An instance of WalletUnlocked.

Icon LinkParam

The mnemonic phrase.

Icon LinkParam

A Provider instance (optional).

Icon LinkParam

The derivation path (optional).

Icon LinkParam

The passphrase for the mnemonic (optional).

Icon LinkDefined in

packages/account/src/wallet/wallet.ts:60 Icon Link


Icon LinkfromSeed()

Icon InfoCircle

static fromSeed: (seed, path?, provider?) => WalletUnlocked = WalletUnlocked.fromSeed

Create a Wallet Unlocked from a seed.

Create a Wallet Unlocked from a seed.

Icon LinkParameters

seed: string

The seed phrase.

path?: string

The derivation path (optional).

provider?: Provider

A Provider instance (optional).

Icon LinkReturns

WalletUnlocked

An instance of WalletUnlocked.

Icon LinkParam

The seed phrase.

Icon LinkParam

A Provider instance (optional).

Icon LinkParam

The derivation path (optional).

Icon LinkDefined in

packages/account/src/wallet/wallet.ts:49 Icon Link


Icon Linkgenerate()

Icon InfoCircle

static generate: (generateOptions?) => WalletUnlocked = WalletUnlocked.generate

Generate a new Wallet Unlocked with a random key pair.

Generate a new Wallet Unlocked with a random key pair.

Icon LinkParameters

generateOptions?: GenerateOptions

Options to customize the generation process (optional).

Icon LinkReturns

WalletUnlocked

An instance of WalletUnlocked.

Icon LinkParam

Options to customize the generation process (optional).

Icon LinkDefined in

packages/account/src/wallet/wallet.ts:39 Icon Link

Icon LinkMethods

Icon LinkfromAddress()

Icon InfoCircle

static fromAddress(address, provider?): WalletLocked

Creates a locked wallet instance from an address and a provider.

Icon LinkParameters

address: string | AbstractAddress

The address of the wallet.

provider?: Provider

A Provider instance (optional).

Icon LinkReturns

WalletLocked

A locked wallet instance.

Icon LinkDefined in

packages/account/src/wallet/wallet.ts:18 Icon Link


Icon LinkfromPrivateKey()

Icon InfoCircle

static fromPrivateKey(privateKey, provider?): WalletUnlocked

Creates an unlocked wallet instance from a private key and a provider.

Icon LinkParameters

privateKey: BytesLike

The private key of the wallet.

provider?: Provider

A Provider instance (optional).

Icon LinkReturns

WalletUnlocked

An unlocked wallet instance.

Icon LinkDefined in

packages/account/src/wallet/wallet.ts:29 Icon Link