import

fun import(privateKey: ByteArray, scheme: SignatureScheme = SignatureScheme.ED25519): Account

Imports an account using the provided private key and signature scheme.

Return

The imported account.

Parameters

privateKey

The private key of the account.

scheme

The signature scheme to use. Defaults to ED25519.

Throws

If the specified signature scheme is not supported.


fun import(str: String, scheme: SignatureScheme = SignatureScheme.ED25519): Account

Imports an account using the provided mnemonic phrase and signature scheme.

Return

The imported account.

Parameters

str

The mnemonic phrase of the account or the private key. And in which case, the private key is expected to be in the format of a Bech32 encoded string.

scheme

The signature scheme to use. Defaults to ED25519.

Throws

If the specified signature scheme is not supported.


fun import(phrases: List<String>, scheme: SignatureScheme = SignatureScheme.ED25519): Account

Imports an account using the provided list of mnemonic phrases and signature scheme.

Return

The imported account.

Parameters

phrases

The list of mnemonic phrases of the account.

scheme

The signature scheme to use. Defaults to ED25519.

Throws

If the specified signature scheme is not supported.


fun import(privateKey: PrivateKey): Account

Imports an account using the provided private key.

Return

The imported account.

Parameters

privateKey

The private key of the account.

Throws

If the specified signature scheme is not supported.