Skip to main content

Class: SimpleKeypair

Extends

  • UniffiAbstractObject

Implements

Properties

[destructorGuardSymbol]

readonly [destructorGuardSymbol]: UniffiGcObject;

[pointerLiteralSymbol]

readonly [pointerLiteralSymbol]: bigint;

[uniffiTypeNameSymbol]

readonly [uniffiTypeNameSymbol]: "SimpleKeypair" = "SimpleKeypair";

Methods

publicKey()

publicKey(): PublicKeyLike;

Returns

PublicKeyLike

Implementation of

SimpleKeypairLike.publicKey


scheme()

scheme(): SignatureScheme;

Returns

SignatureScheme

Implementation of

SimpleKeypairLike.scheme


signPersonalMessage()

signPersonalMessage(message): UserSignatureLike;

Sign a personal message and return a UserSignature.

Parameters

message

PersonalMessageLike

Returns

UserSignatureLike

Implementation of

SimpleKeypairLike.signPersonalMessage


signTransaction()

signTransaction(transaction): UserSignatureLike;

Sign a transaction and return a UserSignature.

Parameters

transaction

TransactionLike

Returns

UserSignatureLike

Implementation of

SimpleKeypairLike.signTransaction


toBech32()

toBech32(): string;

Encode a SimpleKeypair as flag || privkey in Bech32 starting with "iotaprivkey" to a string. Note that the pubkey is not encoded.

Returns

string

Implementation of

SimpleKeypairLike.toBech32


toBytes()

toBytes(): ArrayBuffer;

Encode a SimpleKeypair as flag || privkey in bytes

Returns

ArrayBuffer

Implementation of

SimpleKeypairLike.toBytes


toDebugString()

toDebugString(): string;

Returns

string


toDer()

toDer(): ArrayBuffer;

Serialize this private key as DER-encoded PKCS#8

Returns

ArrayBuffer

Implementation of

SimpleKeypairLike.toDer


toPem()

toPem(): string;

Serialize this private key as DER-encoded PKCS#8

Returns

string

Implementation of

SimpleKeypairLike.toPem


toString()

toString(): string;

Returns a string representation of an object.

Returns

string


trySign()

trySign(message): SimpleSignatureLike;

Parameters

message

ArrayBuffer

Returns

SimpleSignatureLike

Implementation of

SimpleKeypairLike.trySign


trySignUser()

trySignUser(message): UserSignatureLike;

Parameters

message

ArrayBuffer

Returns

UserSignatureLike

Implementation of

SimpleKeypairLike.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(): SimpleVerifyingKeyLike;

Returns

SimpleVerifyingKeyLike

Implementation of

SimpleKeypairLike.verifyingKey


fromBech32()

static fromBech32(value): SimpleKeypairLike;

Decode a SimpleKeypair from flag || privkey in Bech32 starting with "iotaprivkey" to SimpleKeypair. The public key is computed directly from the private key bytes.

Parameters

value

string

Returns

SimpleKeypairLike


fromBytes()

static fromBytes(bytes): SimpleKeypairLike;

Decode a SimpleKeypair from flag || privkey bytes

Parameters

bytes

ArrayBuffer

Returns

SimpleKeypairLike


fromDer()

static fromDer(bytes): SimpleKeypairLike;

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

Parameters

bytes

ArrayBuffer

Returns

SimpleKeypairLike


fromEd25519()

static fromEd25519(keypair): SimpleKeypairLike;

Parameters

keypair

Ed25519PrivateKeyLike

Returns

SimpleKeypairLike


fromPem()

static fromPem(s): SimpleKeypairLike;

Deserialize PKCS#8-encoded private key from PEM.

Parameters

s

string

Returns

SimpleKeypairLike


fromSecp256k1()

static fromSecp256k1(keypair): SimpleKeypairLike;

Parameters

keypair

Secp256k1PrivateKeyLike

Returns

SimpleKeypairLike


fromSecp256r1()

static fromSecp256r1(keypair): SimpleKeypairLike;

Parameters

keypair

Secp256r1PrivateKeyLike

Returns

SimpleKeypairLike


instanceOf()

static instanceOf(obj_): obj_ is SimpleKeypair;

Parameters

obj_

any

Returns

obj_ is SimpleKeypair