Skip to main content

Signer

@iota/iota-sdk


@iota/iota-sdk / cryptography / Signer

Abstract Class: Signer

Defined in: sdk/typescript/src/cryptography/keypair.ts:33

TODO: Document

Extended by

Constructors

Constructor

new Signer(): Signer

Returns

Signer

Methods

getKeyScheme()

abstract getKeyScheme(): SignatureScheme

Defined in: sdk/typescript/src/cryptography/keypair.ts:92

Get the key scheme of the keypair: Secp256k1 or ED25519

Returns

SignatureScheme


getPublicKey()

abstract getPublicKey(): PublicKey

Defined in: sdk/typescript/src/cryptography/keypair.ts:97

The public key for this keypair

Returns

PublicKey


sign()

abstract sign(bytes): Promise<Uint8Array<ArrayBufferLike>>

Defined in: sdk/typescript/src/cryptography/keypair.ts:34

Parameters

bytes

Uint8Array

Returns

Promise<Uint8Array<ArrayBufferLike>>


signPersonalMessage()

signPersonalMessage(bytes): Promise<{ bytes: string; signature: string; }>

Defined in: sdk/typescript/src/cryptography/keypair.ts:73

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

Parameters

bytes

Uint8Array

Returns

Promise<{ bytes: string; signature: string; }>


signTransaction()

signTransaction(bytes): Promise<SignatureWithBytes>

Defined in: sdk/typescript/src/cryptography/keypair.ts:67

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

Parameters

bytes

Uint8Array

Returns

Promise<SignatureWithBytes>


signWithIntent()

signWithIntent(bytes, intent): Promise<SignatureWithBytes>

Defined in: sdk/typescript/src/cryptography/keypair.ts:50

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>


toIotaAddress()

toIotaAddress(): string

Defined in: sdk/typescript/src/cryptography/keypair.ts:85

Returns

string


signingDigest()

static signingDigest(bytes, intent): Uint8Array

Defined in: sdk/typescript/src/cryptography/keypair.ts:40

Sign messages with a specific intent. By combining the message bytes with the intent before hashing. Returns the digest.

Parameters

bytes

Uint8Array

intent

IntentScope

Returns

Uint8Array