Class: Secp256k1PrivateKey
Extendsβ
UniffiAbstractObject
Implementsβ
Constructorsβ
Constructorβ
new Secp256k1PrivateKey(bytes): Secp256k1PrivateKey;
Parametersβ
bytesβ
ArrayBuffer
Returnsβ
Secp256k1PrivateKey
Overridesβ
UniffiAbstractObject.constructor
Propertiesβ
[destructorGuardSymbol]β
readonly [destructorGuardSymbol]: UniffiGcObject;
[pointerLiteralSymbol]β
readonly [pointerLiteralSymbol]: bigint;
[uniffiTypeNameSymbol]β
readonly [uniffiTypeNameSymbol]: "Secp256k1PrivateKey" = "Secp256k1PrivateKey";
Methodsβ
equals()β
equals(other): boolean;
Parametersβ
otherβ
Secp256k1PrivateKey
Returnsβ
boolean
publicKey()β
publicKey(): Secp256k1PublicKeyLike;
Returnsβ
Implementation ofβ
Secp256k1PrivateKeyLike.publicKey
scheme()β
scheme(): SignatureScheme;
Returnsβ
Implementation ofβ
Secp256k1PrivateKeyLike.scheme
signPersonalMessage()β
signPersonalMessage(message): UserSignatureLike;
Sign a personal message and return a UserSignature.
Parametersβ
messageβ
Returnsβ
Implementation ofβ
Secp256k1PrivateKeyLike.signPersonalMessage
signTransaction()β
signTransaction(transaction): UserSignatureLike;
Sign a transaction and return a UserSignature.
Parametersβ
transactionβ
Returnsβ
Implementation ofβ
Secp256k1PrivateKeyLike.signTransaction
toBech32()β
toBech32(): string;
Encode this private key as flag || privkey in Bech32 starting with "iotaprivkey" to a
string.
Returnsβ
string
Implementation ofβ
Secp256k1PrivateKeyLike.toBech32
toBytes()β
toBytes(): ArrayBuffer;
Serialize this private key to bytes.
Returnsβ
ArrayBuffer
Implementation ofβ
Secp256k1PrivateKeyLike.toBytes
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): Secp256k1SignatureLike;
Parametersβ
messageβ
ArrayBuffer
Returnsβ
Implementation ofβ
Secp256k1PrivateKeyLike.trySign
trySignSimple()β
trySignSimple(message): SimpleSignatureLike;
Parametersβ
messageβ
ArrayBuffer
Returnsβ
Implementation ofβ
Secp256k1PrivateKeyLike.trySignSimple
trySignUser()β
trySignUser(message): UserSignatureLike;
Parametersβ
messageβ
ArrayBuffer
Returnsβ
Implementation ofβ
Secp256k1PrivateKeyLike.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(): Secp256k1VerifyingKeyLike;
Returnsβ
Implementation ofβ
Secp256k1PrivateKeyLike.verifyingKey
fromBech32()β
static fromBech32(value): Secp256k1PrivateKeyLike;
Decode a private key from flag || privkey in Bech32 starting with "iotaprivkey".
Parametersβ
valueβ
string
Returnsβ
fromDer()β
static fromDer(bytes): Secp256k1PrivateKeyLike;
Deserialize PKCS#8 private key from ASN.1 DER-encoded data (binary format).
Parametersβ
bytesβ
ArrayBuffer
Returnsβ
fromMnemonic()β
static fromMnemonic(
phrase,
accountIndex?,
password?
): Secp256k1PrivateKeyLike;
Construct the private key from a mnemonic phrase
Parametersβ
phraseβ
string
accountIndex?β
bigint = ...
password?β
string = ""
Returnsβ
fromMnemonicWithPath()β
static fromMnemonicWithPath(
phrase,
path,
password?
): Secp256k1PrivateKeyLike;
Create an instance from a mnemonic phrase and a derivation path like "m/54'/4218'/0'/0/0"
Parametersβ
phraseβ
string
pathβ
string
password?β
string = ""
Returnsβ
fromPem()β
static fromPem(s): Secp256k1PrivateKeyLike;
Deserialize PKCS#8-encoded private key from PEM.
Parametersβ
sβ
string
Returnsβ
instanceOf()β
static instanceOf(obj_): obj_ is Secp256k1PrivateKey;
Parametersβ
obj_β
any
Returnsβ
obj_ is Secp256k1PrivateKey
random()β
static random(): Secp256k1PrivateKeyLike;