Skip to main content

SimpleSignatureInterface

interface 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 for this type is defined by the following ABNF:

simple-signature = bytes ; where the contents of the bytes are defined by
; <simple-signature-body>
simple-signature-body = (ed25519-flag ed25519-signature ed25519-public-key) /
(secp256k1-flag secp256k1-signature secp256k1-public-key) /
(secp256r1-flag secp256r1-signature secp256r1-public-key)

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.

Inheritors

SimpleSignature

Functions

NameSummary
ed25519PubKeyabstract fun ed25519PubKey(): Ed25519PublicKey
ed25519PubKeyOptabstract fun ed25519PubKeyOpt(): Ed25519PublicKey?
ed25519Sigabstract fun ed25519Sig(): Ed25519Signature
ed25519SigOptabstract fun ed25519SigOpt(): Ed25519Signature?
isEd25519abstract fun isEd25519(): Boolean
isSecp256k1abstract fun isSecp256k1(): Boolean
isSecp256r1abstract fun isSecp256r1(): Boolean
schemeabstract fun scheme(): SignatureScheme
secp256k1PubKeyabstract fun secp256k1PubKey(): Secp256k1PublicKey
secp256k1PubKeyOptabstract fun secp256k1PubKeyOpt(): Secp256k1PublicKey?
secp256k1Sigabstract fun secp256k1Sig(): Secp256k1Signature
secp256k1SigOptabstract fun secp256k1SigOpt(): Secp256k1Signature?
secp256r1PubKeyabstract fun secp256r1PubKey(): Secp256r1PublicKey
secp256r1PubKeyOptabstract fun secp256r1PubKeyOpt(): Secp256r1PublicKey?
secp256r1Sigabstract fun secp256r1Sig(): Secp256r1Signature
secp256r1SigOptabstract fun secp256r1SigOpt(): Secp256r1Signature?
signatureBytesabstract fun signatureBytes(): ByteArray
The raw signature bytes, without the scheme flag or the public key.
toBase64abstract fun toBase64(): String
Base64-encode this signature as its `flag
toBytesabstract fun toBytes(): ByteArray
toPublicKeyabstract fun toPublicKey(): PublicKey
The public key embedded in this signature.