Keypair
@iota/iota-sdk / cryptography / Keypair
Abstract Class: Keypair
Defined in: sdk/typescript/src/cryptography/keypair.ts:100
TODO: Document
Extends
Extended by
Constructors
Constructor
new Keypair():
Keypair
Returns
Keypair
Inherited from
Methods
getKeyScheme()
abstractgetKeyScheme():SignatureScheme
Defined in: sdk/typescript/src/cryptography/keypair.ts:92
Get the key scheme of the keypair: Secp256k1 or ED25519
Returns
Inherited from
getPublicKey()
abstractgetPublicKey():PublicKey
Defined in: sdk/typescript/src/cryptography/keypair.ts:97
The public key for this keypair
Returns
Inherited from
getSecretKey()
abstractgetSecretKey():string
Defined in: sdk/typescript/src/cryptography/keypair.ts:104
This returns the Bech32 secret key string for this keypair.
Returns
string
sign()
abstractsign(bytes):Promise<Uint8Array<ArrayBufferLike>>
Defined in: sdk/typescript/src/cryptography/keypair.ts:34
Parameters
bytes
Uint8Array
Returns
Promise<Uint8Array<ArrayBufferLike>>
Inherited from
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; }>
Inherited from
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>
Inherited from
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
Returns
Promise<SignatureWithBytes>
Inherited from
toIotaAddress()
toIotaAddress():
string
Defined in: sdk/typescript/src/cryptography/keypair.ts:85
Returns
string
Inherited from
signingDigest()
staticsigningDigest(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
Returns
Uint8Array