Skip to main content

SimpleSignature

open class SimpleSignature : Disposable, AutoCloseable, SimpleSignatureInterface

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.

Functions​

NameSummary
close@Synchronized
open override fun close()
deriveAddressopen override fun deriveAddress(): Address
Derive the Address of the public key that produced this signature.
destroyopen override fun destroy()
ed25519PublicKeyopen override fun ed25519PublicKey(): Ed25519PublicKey
ed25519Signatureopen override fun ed25519Signature(): Ed25519Signature
equalsopen operator override fun equals(other: Any?): Boolean
hashCodeopen override fun hashCode(): Int
isEd25519open override fun isEd25519(): Boolean
isSecp256k1open override fun isSecp256k1(): Boolean
isSecp256r1open override fun isSecp256r1(): Boolean
optEd25519PublicKeyopen override fun optEd25519PublicKey(): Ed25519PublicKey?
optEd25519Signatureopen override fun optEd25519Signature(): Ed25519Signature?
optSecp256k1PublicKeyopen override fun optSecp256k1PublicKey(): Secp256k1PublicKey?
optSecp256k1Signatureopen override fun optSecp256k1Signature(): Secp256k1Signature?
optSecp256r1PublicKeyopen override fun optSecp256r1PublicKey(): Secp256r1PublicKey?
optSecp256r1Signatureopen override fun optSecp256r1Signature(): Secp256r1Signature?
schemeopen override fun scheme(): SignatureScheme
secp256k1PublicKeyopen override fun secp256k1PublicKey(): Secp256k1PublicKey
secp256k1Signatureopen override fun secp256k1Signature(): Secp256k1Signature
secp256r1PublicKeyopen override fun secp256r1PublicKey(): Secp256r1PublicKey
secp256r1Signatureopen override fun secp256r1Signature(): Secp256r1Signature
signatureBytesopen override fun signatureBytes(): ByteArray
The raw signature bytes, without the scheme flag or the public key.
toBase64open override fun toBase64(): String
Base64-encode this signature as its `flag
toBcsopen override fun toBcs(): ByteArray
Convert this type to BCS encoded bytes.
toBytesopen override fun toBytes(): ByteArray
toDisplayStringopen override fun toDisplayString(): String
Render this type as human-readable text.
toJsonopen override fun toJson(): String
Convert this type to a JSON encoded string.
toPublicKeyopen override fun toPublicKey(): PublicKey
The public key embedded in this signature.
toStringopen override fun toString(): String

Companion object functions​

NameSummary
fromBase64fun fromBase64(base64: String): SimpleSignature
Decode a signature from the Base64 form produced by to_base64, i.e. base64 over the `flag
fromBcsfun fromBcs(bcs: ByteArray): SimpleSignature
Create this type from BCS encoded bytes.
fromJsonfun fromJson(json: String): SimpleSignature
Create this type from a JSON encoded string.
newEd25519fun newEd25519(signature: Ed25519Signature, publicKey: Ed25519PublicKey): SimpleSignature
newSecp256k1fun newSecp256k1(signature: Secp256k1Signature, publicKey: Secp256k1PublicKey): SimpleSignature
newSecp256r1fun newSecp256r1(signature: Secp256r1Signature, publicKey: Secp256r1PublicKey): SimpleSignature