Skip to main content

Class: abstract Keypair

TODO: Document

Extends

Extended by

Constructors

new Keypair()

new Keypair(): Keypair

Returns

Keypair

Inherited from

Signer.constructor

Methods

sign()

abstract sign(bytes): Promise<Uint8Array>

Parameters

bytes: Uint8Array

Returns

Promise<Uint8Array>

Inherited from

Signer.sign


signWithIntent()

signWithIntent(bytes, intent): Promise<SignatureWithBytes>

Sign messages with a specific intent. By combining the message bytes with the intent before hashing and signing, it ensures that a signed message is tied to a specific purpose and domain separator is provided

Parameters

bytes: Uint8Array

intent: IntentScope

Returns

Promise<SignatureWithBytes>

Inherited from

Signer.signWithIntent


signTransaction()

signTransaction(bytes): Promise<SignatureWithBytes>

Signs provided transaction by calling signWithIntent() with a TransactionData provided as intent scope

Parameters

bytes: Uint8Array

Returns

Promise<SignatureWithBytes>

Inherited from

Signer.signTransaction


signPersonalMessage()

signPersonalMessage(bytes): Promise<object>

Signs provided personal message by calling signWithIntent() with a PersonalMessage provided as intent scope

Parameters

bytes: Uint8Array

Returns

Promise<object>

bytes

bytes: string

signature

signature: string

Inherited from

Signer.signPersonalMessage


toIotaAddress()

toIotaAddress(): string

Returns

string

Inherited from

Signer.toIotaAddress


getKeyScheme()

abstract getKeyScheme(): SignatureScheme

Get the key scheme of the keypair: Secp256k1 or ED25519

Returns

SignatureScheme

Inherited from

Signer.getKeyScheme


getPublicKey()

abstract getPublicKey(): PublicKey

The public key for this keypair

Returns

PublicKey

Inherited from

Signer.getPublicKey


getSecretKey()

abstract getSecretKey(): string

This returns the Bech32 secret key string for this keypair.

Returns

string