Class: SimpleKeypair
Extends
UniffiAbstractObject
Implements
Properties
[destructorGuardSymbol]
readonly [destructorGuardSymbol]: UniffiGcObject;
[pointerLiteralSymbol]
readonly [pointerLiteralSymbol]: bigint;
[uniffiTypeNameSymbol]
readonly [uniffiTypeNameSymbol]: "SimpleKeypair" = "SimpleKeypair";
Methods
publicKey()
publicKey(): PublicKeyLike;
Returns
Implementation of
scheme()
scheme(): SignatureScheme;
Returns
Implementation of
signPersonalMessage()
signPersonalMessage(message): UserSignatureLike;
Sign a personal message and return a UserSignature.
Parameters
message
Returns
Implementation of
SimpleKeypairLike.signPersonalMessage
signTransaction()
signTransaction(transaction): UserSignatureLike;
Sign a transaction and return a UserSignature.
Parameters
transaction
Returns
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
toBytes()
toBytes(): ArrayBuffer;
Encode a SimpleKeypair as flag || privkey in 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 DER-encoded PKCS#8
Returns
string
Implementation of
toString()
toString(): string;
Returns a string representation of an object.
Returns
string
trySign()
trySign(message): SimpleSignatureLike;
Parameters
message
ArrayBuffer
Returns
Implementation of
trySignUser()
trySignUser(message): UserSignatureLike;
Parameters
message
ArrayBuffer
Returns
Implementation of
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
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
fromBytes()
static fromBytes(bytes): SimpleKeypairLike;
Decode a SimpleKeypair from flag || privkey bytes
Parameters
bytes
ArrayBuffer
Returns
fromDer()
static fromDer(bytes): SimpleKeypairLike;
Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).
Parameters
bytes
ArrayBuffer
Returns
fromEd25519()
static fromEd25519(keypair): SimpleKeypairLike;
Parameters
keypair
Returns
fromPem()
static fromPem(s): SimpleKeypairLike;
Deserialize PKCS#8-encoded private key from PEM.
Parameters
s
string
Returns
fromSecp256k1()
static fromSecp256k1(keypair): SimpleKeypairLike;
Parameters
keypair
Returns
fromSecp256r1()
static fromSecp256r1(keypair): SimpleKeypairLike;
Parameters
keypair
Returns
instanceOf()
static instanceOf(obj_): obj_ is SimpleKeypair;
Parameters
obj_
any
Returns
obj_ is SimpleKeypair