SimpleSignature
SimpleSignature Objects
class SimpleSignature(SimpleSignatureProtocol)
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:
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.
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)
from_base64
@classmethod
def from_base64(cls, base64: str) -> SimpleSignature
Decode a signature from the Base64 form produced by to_base64, i.e.
base64 over the flag || sig || pubkey bytes.
signature_bytes
def signature_bytes() -> bytes
The raw signature bytes, without the scheme flag or the public key.
to_base64
def to_base64() -> str
Base64-encode this signature as its flag || sig || pubkey bytes.
to_public_key
def to_public_key() -> PublicKey
The public key embedded in this signature.