NamespaceGet the public key associated with this private key.
The public key can be freely given and used by other parties to verify the signatures generated by this private key.
Get the public key associated with this private key.
The public key can be freely given and used by other parties to verify the signatures generated by this private key.
deprecated - This method is deprecated and will be removed in future versions.
Use the signTransaction method with the legacy=false flag or don't
pass it all for the modern approach.
Derive a new private key at the given wallet index.
Only currently supported for keys created with fromMnemonic(); other keys will throw
an error.
You can check if a key supports derivation with .supportsDerivation()
Recover the recovery ID used in the signature for the given message.
Note: This method only works for ECDSA secp256k1 keys.
32-byte r component of the signature
32-byte s component of the signature
The original (unhashed) message
Recovery ID (0–3), or -1 if not found or not applicable
Check if derive can be called on this private key.
This is only the case if the key was created from a mnemonic.
Sign a message with this private key.
Optionallegacy: falseCreate a keystore with a given passphrase.
The key can be recovered later with fromKeystore().
Note that this will not retain the ancillary data used for
deriving child keys, thus .derive() on the restored key will
throw even if this instance supports derivation.
Optionalpassphrase: string = ""StaticfromConstruct a private key from bytes. Requires DER header.
StaticfromConstruct a ECDSA private key from bytes.
StaticfromConstruct a ED25519 private key from bytes.
StaticfromRecover a private key from a keystore, previously created by .toKeystore().
This key will not support child key derivation.
Optionalpassphrase: string = ""StaticfromOptionalpassphrase: string = ""StaticfromRecover a private key from a pem string; the private key may be encrypted.
This method assumes the .pem file has been converted to a string already.
If passphrase is not null or empty, this looks for the first ENCRYPTED PRIVATE KEY
section and uses passphrase to decrypt it; otherwise, it looks for the first PRIVATE KEY
section and decodes that as a DER-encoded private key.
Optionalpassphrase: string = ""StaticfromConstruct a Ed25519 private key from a Uint8Array seed.
StaticfromConstruct a Ed25519 private key from a Uint8Array seed.
StaticfromStaticfromConstruct a private key from a HEX-encoded string with a der prefix
StaticfromStaticfromStaticgenerateDepredated - Use generateED25519() instead
Generate a random Ed25519 private key.
StaticgenerateDepredated - Use generateED25519Async() instead
Generate a random Ed25519 private key.
StaticgenerateECDSAGenerate a random EDSA private key.
StaticgenerateECDSAAsyncGenerate a random ECDSA private key.
StaticgenerateED25519Generate a random Ed25519 private key.
StaticgenerateED25519Generate a random Ed25519 private key.
Staticget
proto