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
| Name | Summary |
|---|---|
| ed25519PubKey | abstract fun ed25519PubKey(): Ed25519PublicKey |
| ed25519PubKeyOpt | abstract fun ed25519PubKeyOpt(): Ed25519PublicKey? |
| ed25519Sig | abstract fun ed25519Sig(): Ed25519Signature |
| ed25519SigOpt | abstract fun ed25519SigOpt(): Ed25519Signature? |
| isEd25519 | abstract fun isEd25519(): Boolean |
| isSecp256k1 | abstract fun isSecp256k1(): Boolean |
| isSecp256r1 | abstract fun isSecp256r1(): Boolean |
| scheme | abstract fun scheme(): SignatureScheme |
| secp256k1PubKey | abstract fun secp256k1PubKey(): Secp256k1PublicKey |
| secp256k1PubKeyOpt | abstract fun secp256k1PubKeyOpt(): Secp256k1PublicKey? |
| secp256k1Sig | abstract fun secp256k1Sig(): Secp256k1Signature |
| secp256k1SigOpt | abstract fun secp256k1SigOpt(): Secp256k1Signature? |
| secp256r1PubKey | abstract fun secp256r1PubKey(): Secp256r1PublicKey |
| secp256r1PubKeyOpt | abstract fun secp256r1PubKeyOpt(): Secp256r1PublicKey? |
| secp256r1Sig | abstract fun secp256r1Sig(): Secp256r1Signature |
| secp256r1SigOpt | abstract fun secp256r1SigOpt(): Secp256r1Signature? |
| signatureBytes | abstract fun signatureBytes(): ByteArray The raw signature bytes, without the scheme flag or the public key. |
| toBase64 | abstract fun toBase64(): String Base64-encode this signature as its `flag |
| toBytes | abstract fun toBytes(): ByteArray |
| toPublicKey | abstract fun toPublicKey(): PublicKey The public key embedded in this signature. |