Class: Ed25519PrivateKey
Extends
UniffiAbstractObject
Implements
Constructors
Constructor
new Ed25519PrivateKey(bytes): Ed25519PrivateKey;
Parameters
bytes
ArrayBuffer
Returns
Ed25519PrivateKey
Overrides
UniffiAbstractObject.constructor
Properties
[destructorGuardSymbol]
readonly [destructorGuardSymbol]: UniffiGcObject;
[pointerLiteralSymbol]
readonly [pointerLiteralSymbol]: bigint;
[uniffiTypeNameSymbol]
readonly [uniffiTypeNameSymbol]: "Ed25519PrivateKey" = "Ed25519PrivateKey";
Methods
equals()
equals(other): boolean;
Parameters
other
Ed25519PrivateKey
Returns
boolean
publicKey()
publicKey(): Ed25519PublicKeyLike;
Returns
Implementation of
Ed25519PrivateKeyLike.publicKey
scheme()
scheme(): SignatureScheme;
Returns
Implementation of
signPersonalMessage()
signPersonalMessage(message): UserSignatureLike;
Sign a personal message and return a UserSignature.
Parameters
message
Returns
Implementation of
Ed25519PrivateKeyLike.signPersonalMessage
signTransaction()
signTransaction(transaction): UserSignatureLike;
Sign a transaction and return a UserSignature.
Parameters
transaction
Returns
Implementation of
Ed25519PrivateKeyLike.signTransaction
toBech32()
toBech32(): string;
Encode this private key as flag || privkey in Bech32 starting with
"iotaprivkey" to a string.
Returns
string
Implementation of
Ed25519PrivateKeyLike.toBech32
toBytes()
toBytes(): ArrayBuffer;
Serialize this private key to bytes.
Returns
ArrayBuffer
Implementation of
toDebugString()
toDebugString(): string;
Returns
string
toDer()
toDer(): ArrayBuffer;
Serialize this private key as DER-encoded PKCS#8
Returns
ArrayBuffer
Implementation of
toPem()
toPem(): string;
Serialize this private key as PEM-encoded PKCS#8
Returns
string
Implementation of
toString()
toString(): string;
Returns a string representation of an object.
Returns
string
trySign()
trySign(message): Ed25519SignatureLike;
Parameters
message
ArrayBuffer
Returns
Implementation of
trySignSimple()
trySignSimple(message): SimpleSignatureLike;
Parameters
message
ArrayBuffer
Returns
Implementation of
Ed25519PrivateKeyLike.trySignSimple
trySignUser()
trySignUser(message): UserSignatureLike;
Parameters
message
ArrayBuffer
Returns
Implementation of
Ed25519PrivateKeyLike.trySignUser
uniffiDestroy()
uniffiDestroy(): void;
Explicitly tell Rust to destroy the native peer that backs this object.
Once this method has been called, any following method calls will throw an error.
Can be called more than once.
Returns
void
Overrides
UniffiAbstractObject.uniffiDestroy
uniffiUse()
uniffiUse<T>(block): T;
A convenience method to use this object, then destroy it after its use.
Type Parameters
T
T
Parameters
block
(obj) => T
Returns
T
Inherited from
UniffiAbstractObject.uniffiUse
verifyingKey()
verifyingKey(): Ed25519VerifyingKeyLike;
Returns
Implementation of
Ed25519PrivateKeyLike.verifyingKey
fromBech32()
static fromBech32(value): Ed25519PrivateKeyLike;
Decode a private key from flag || privkey in Bech32 starting with
"iotaprivkey".
Parameters
value
string
Returns
fromDer()
static fromDer(bytes): Ed25519PrivateKeyLike;
Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).
Parameters
bytes
ArrayBuffer
Returns
fromMnemonic()
static fromMnemonic(
phrase,
accountIndex?,
password?
): Ed25519PrivateKeyLike;
Construct the private key from a mnemonic phrase
Parameters
phrase
string
accountIndex?
bigint = ...
password?
string = ""
Returns
fromMnemonicWithPath()
static fromMnemonicWithPath(
phrase,
path,
password?
): Ed25519PrivateKeyLike;
Create an instance from a mnemonic phrase and a derivation path like
"m/44'/4218'/0'/0'/0'"
Parameters
phrase
string
path
string
password?
string = ""
Returns
fromPem()
static fromPem(s): Ed25519PrivateKeyLike;
Deserialize PKCS#8-encoded private key from PEM.
Parameters
s
string
Returns
instanceOf()
static instanceOf(obj_): obj_ is Ed25519PrivateKey;
Parameters
obj_
any
Returns
obj_ is Ed25519PrivateKey
random()
static random(): Ed25519PrivateKeyLike;