SimpleSignatureInterface
type 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:
```text 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.
type SimpleSignatureInterface interface {
Ed25519PubKey() *Ed25519PublicKey
Ed25519PubKeyOpt() **Ed25519PublicKey
Ed25519Sig() *Ed25519Signature
Ed25519SigOpt() **Ed25519Signature
IsEd25519() bool
IsSecp256k1() bool
IsSecp256r1() bool
Scheme() SignatureScheme
Secp256k1PubKey() *Secp256k1PublicKey
Secp256k1PubKeyOpt() **Secp256k1PublicKey
Secp256k1Sig() *Secp256k1Signature
Secp256k1SigOpt() **Secp256k1Signature
Secp256r1PubKey() *Secp256r1PublicKey
Secp256r1PubKeyOpt() **Secp256r1PublicKey
Secp256r1Sig() *Secp256r1Signature
Secp256r1SigOpt() **Secp256r1Signature
// The raw signature bytes, without the scheme flag or the public key.
SignatureBytes() []byte
// Base64-encode this signature as its `flag || sig || pubkey` bytes.
ToBase64() string
ToBytes() []byte
// The public key embedded in this signature.
ToPublicKey() *PublicKey
}