Class: SimpleSignature
A basic signature
This enumeration defines the set of simple or basic signature schemes supported by IOTA. Most signature schemes supported by IOTA end up comprising of a at least one simple signature scheme.
BCS
The BCS serialized form of this type is specified in
bcs-schema.abnf.
Note: Due to historical reasons, signatures are serialized slightly different from the majority
of the types in IOTA. In particular if a signature is ever embedded in another structure it
generally is serialized as bytes meaning it has a length prefix that defines the length of the
completely serialized signature.
Extends
UniffiAbstractObject
Implements
Properties
[destructorGuardSymbol]
readonly [destructorGuardSymbol]: UniffiGcObject;
[pointerLiteralSymbol]
readonly [pointerLiteralSymbol]: bigint;
[uniffiTypeNameSymbol]
readonly [uniffiTypeNameSymbol]: "SimpleSignature" = "SimpleSignature";
Methods
deriveAddress()
deriveAddress(): AddressLike;
Derive the Address of the public key that produced this signature.
Returns
Implementation of
SimpleSignatureLike.deriveAddress
ed25519PublicKey()
ed25519PublicKey(): Ed25519PublicKeyLike;
Returns
Implementation of
SimpleSignatureLike.ed25519PublicKey
ed25519Signature()
ed25519Signature(): Ed25519SignatureLike;
Returns
Implementation of
SimpleSignatureLike.ed25519Signature
equals()
equals(other): boolean;
Parameters
other
SimpleSignature
Returns
boolean
hashCode()
hashCode(): bigint;
Returns
bigint
isEd25519()
isEd25519(): boolean;
Returns
boolean
Implementation of
isSecp256k1()
isSecp256k1(): boolean;
Returns
boolean
Implementation of
SimpleSignatureLike.isSecp256k1
isSecp256r1()
isSecp256r1(): boolean;
Returns
boolean
Implementation of
SimpleSignatureLike.isSecp256r1
optEd25519PublicKey()
optEd25519PublicKey(): Ed25519PublicKeyLike | undefined;
Returns
Ed25519PublicKeyLike | undefined
Implementation of
SimpleSignatureLike.optEd25519PublicKey
optEd25519Signature()
optEd25519Signature(): Ed25519SignatureLike | undefined;
Returns
Ed25519SignatureLike | undefined
Implementation of
SimpleSignatureLike.optEd25519Signature
optSecp256k1PublicKey()
optSecp256k1PublicKey():
| Secp256k1PublicKeyLike
| undefined;
Returns
| Secp256k1PublicKeyLike
| undefined
Implementation of
SimpleSignatureLike.optSecp256k1PublicKey
optSecp256k1Signature()
optSecp256k1Signature():
| Secp256k1SignatureLike
| undefined;
Returns
| Secp256k1SignatureLike
| undefined
Implementation of
SimpleSignatureLike.optSecp256k1Signature
optSecp256r1PublicKey()
optSecp256r1PublicKey():
| Secp256r1PublicKeyLike
| undefined;
Returns
| Secp256r1PublicKeyLike
| undefined
Implementation of
SimpleSignatureLike.optSecp256r1PublicKey
optSecp256r1Signature()
optSecp256r1Signature():
| Secp256r1SignatureLike
| undefined;
Returns
| Secp256r1SignatureLike
| undefined
Implementation of
SimpleSignatureLike.optSecp256r1Signature
scheme()
scheme(): SignatureScheme;
Returns
Implementation of
secp256k1PublicKey()
secp256k1PublicKey(): Secp256k1PublicKeyLike;
Returns
Implementation of
SimpleSignatureLike.secp256k1PublicKey
secp256k1Signature()
secp256k1Signature(): Secp256k1SignatureLike;
Returns
Implementation of
SimpleSignatureLike.secp256k1Signature
secp256r1PublicKey()
secp256r1PublicKey(): Secp256r1PublicKeyLike;
Returns
Implementation of
SimpleSignatureLike.secp256r1PublicKey
secp256r1Signature()
secp256r1Signature(): Secp256r1SignatureLike;
Returns
Implementation of
SimpleSignatureLike.secp256r1Signature
signatureBytes()
signatureBytes(): ArrayBuffer;
The raw signature bytes, without the scheme flag or the public key.
Returns
ArrayBuffer
Implementation of
SimpleSignatureLike.signatureBytes
toBase64()
toBase64(): string;
Base64-encode this signature as its flag || sig || pubkey bytes.
Returns
string
Implementation of
toBcs()
toBcs(): ArrayBuffer;
Convert this type to BCS encoded bytes.
Returns
ArrayBuffer
Implementation of
toBytes()
toBytes(): ArrayBuffer;
Returns
ArrayBuffer
Implementation of
toDebugString()
toDebugString(): string;
Returns
string
toDisplayString()
toDisplayString(): string;
Render this type as human-readable text.
Some types also print this through the binding's native string conversion; this method is the spelling every object type has.
The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.
Returns
string
Implementation of
SimpleSignatureLike.toDisplayString
toJson()
toJson(): string;
Convert this type to a JSON encoded string.
Returns
string
Implementation of
toPublicKey()
toPublicKey(): PublicKeyLike;
The public key embedded in this signature.
Returns
Implementation of
SimpleSignatureLike.toPublicKey
toString()
toString(): string;
Returns a string representation of an object.
Returns
string
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
fromBase64()
static fromBase64(base64): SimpleSignatureLike;
Decode a signature from the Base64 form produced by to_base64, i.e. base64 over the
flag || sig || pubkey bytes.
Parameters
base64
string
Returns
fromBcs()
static fromBcs(bcs): SimpleSignatureLike;
Create this type from BCS encoded bytes.
Parameters
bcs
ArrayBuffer
Returns
fromJson()
static fromJson(json): SimpleSignatureLike;
Create this type from a JSON encoded string.
Parameters
json
string
Returns
instanceOf()
static instanceOf(obj_): obj_ is SimpleSignature;
Parameters
obj_
any
Returns
obj_ is SimpleSignature
newEd25519()
static newEd25519(signature, publicKey): SimpleSignatureLike;
Parameters
signature
publicKey
Returns
newSecp256k1()
static newSecp256k1(signature, publicKey): SimpleSignatureLike;
Parameters
signature
publicKey
Returns
newSecp256r1()
static newSecp256r1(signature, publicKey): SimpleSignatureLike;