Skip to main content

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​

Ed25519PublicKeyLike

Implementation of​

Ed25519PrivateKeyLike.publicKey


scheme()​

scheme(): SignatureScheme;

Returns​

SignatureScheme

Implementation of​

Ed25519PrivateKeyLike.scheme


signPersonalMessage()​

signPersonalMessage(message): UserSignatureLike;

Sign a personal message and return a UserSignature.

Parameters​

message​

PersonalMessageLike

Returns​

UserSignatureLike

Implementation of​

Ed25519PrivateKeyLike.signPersonalMessage


signTransaction()​

signTransaction(transaction): UserSignatureLike;

Sign a transaction and return a UserSignature.

Parameters​

transaction​

TransactionLike

Returns​

UserSignatureLike

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​

Ed25519PrivateKeyLike.toBytes


toDebugString()​

toDebugString(): string;

Returns​

string


toDer()​

toDer(): ArrayBuffer;

Serialize this private key as DER-encoded PKCS#8

Returns​

ArrayBuffer

Implementation of​

Ed25519PrivateKeyLike.toDer


toPem()​

toPem(): string;

Serialize this private key as PEM-encoded PKCS#8

Returns​

string

Implementation of​

Ed25519PrivateKeyLike.toPem


toString()​

toString(): string;

Returns a string representation of an object.

Returns​

string


trySign()​

trySign(message): Ed25519SignatureLike;

Parameters​

message​

ArrayBuffer

Returns​

Ed25519SignatureLike

Implementation of​

Ed25519PrivateKeyLike.trySign


trySignSimple()​

trySignSimple(message): SimpleSignatureLike;

Parameters​

message​

ArrayBuffer

Returns​

SimpleSignatureLike

Implementation of​

Ed25519PrivateKeyLike.trySignSimple


trySignUser()​

trySignUser(message): UserSignatureLike;

Parameters​

message​

ArrayBuffer

Returns​

UserSignatureLike

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​

Ed25519VerifyingKeyLike

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​

Ed25519PrivateKeyLike


fromDer()​

static fromDer(bytes): Ed25519PrivateKeyLike;

Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).

Parameters​

bytes​

ArrayBuffer

Returns​

Ed25519PrivateKeyLike


fromMnemonic()​

static fromMnemonic(
phrase,
accountIndex?,
password?
): Ed25519PrivateKeyLike;

Construct the private key from a mnemonic phrase

Parameters​

phrase​

string

accountIndex?​

bigint = ...

password?​

string = ""

Returns​

Ed25519PrivateKeyLike


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​

Ed25519PrivateKeyLike


fromPem()​

static fromPem(s): Ed25519PrivateKeyLike;

Deserialize PKCS#8-encoded private key from PEM.

Parameters​

s​

string

Returns​

Ed25519PrivateKeyLike


instanceOf()​

static instanceOf(obj_): obj_ is Ed25519PrivateKey;

Parameters​

obj_​

any

Returns​

obj_ is Ed25519PrivateKey


random()​

static random(): Ed25519PrivateKeyLike;

Returns​

Ed25519PrivateKeyLike