Class: Ed25519Keypair
An Ed25519 Keypair used for signing transactions.
Extends
Constructors
new Ed25519Keypair()
new Ed25519Keypair(
keypair?):Ed25519Keypair
Create a new Ed25519 keypair instance. Generate random keypair if no Ed25519Keypair is provided.
Parameters
• keypair?: Ed25519KeypairData
Ed25519 keypair
Returns
Overrides
Methods
signingDigest()
staticsigningDigest(bytes,intent):Uint8Array
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
Inherited from
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
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
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
toIotaAddress()
toIotaAddress():
string
Returns
string
Inherited from
getKeyScheme()
getKeyScheme():
SignatureScheme
Get the key scheme of the keypair ED25519
Returns
Overrides
generate()
staticgenerate():Ed25519Keypair
Generate a new random Ed25519 keypair
Returns
fromSecretKey()
staticfromSecretKey(secretKey,options?):Ed25519Keypair
Create a Ed25519 keypair from a raw secret key byte array, also known as seed. This is NOT the private scalar which is result of hashing and bit clamping of the raw secret key.
Parameters
• secretKey: string | Uint8Array
secret key as a byte array or Bech32 secret key string