SimpleSignature
type SimpleSignature
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 SimpleSignature struct {
// contains filtered or unexported fields
}
func LiftFromExternalSimpleSignature
func LiftFromExternalSimpleSignature(handle uint64) *SimpleSignature
func SimpleSignatureFromBase64
func SimpleSignatureFromBase64(base64 string) (*SimpleSignature, error)
Decode a signature from the Base64 form produced by `to_base64`, i.e. base64 over the `flag || sig || pubkey` bytes.
func SimpleSignatureFromBcs
func SimpleSignatureFromBcs(bcs []byte) (*SimpleSignature, error)
Create this type from BCS encoded bytes.
func SimpleSignatureFromJson
func SimpleSignatureFromJson(json string) (*SimpleSignature, error)
Create this type from JSON encoded string.
func SimpleSignatureNewEd25519
func SimpleSignatureNewEd25519(signature *Ed25519Signature, publicKey *Ed25519PublicKey) *SimpleSignature
func SimpleSignatureNewSecp256k1
func SimpleSignatureNewSecp256k1(signature *Secp256k1Signature, publicKey *Secp256k1PublicKey) *SimpleSignature
func SimpleSignatureNewSecp256r1
func SimpleSignatureNewSecp256r1(signature *Secp256r1Signature, publicKey *Secp256r1PublicKey) *SimpleSignature
func (*SimpleSignature) DebugString
func (_self *SimpleSignature) DebugString() string
func (*SimpleSignature) Destroy
func (object *SimpleSignature) Destroy()
func (*SimpleSignature) Ed25519PubKey
func (_self *SimpleSignature) Ed25519PubKey() *Ed25519PublicKey
func (*SimpleSignature) Ed25519PubKeyOpt
func (_self *SimpleSignature) Ed25519PubKeyOpt() **Ed25519PublicKey
func (*SimpleSignature) Ed25519Sig
func (_self *SimpleSignature) Ed25519Sig() *Ed25519Signature
func (*SimpleSignature) Ed25519SigOpt
func (_self *SimpleSignature) Ed25519SigOpt() **Ed25519Signature
func (*SimpleSignature) Eq
func (_self *SimpleSignature) Eq(other *SimpleSignature) bool
func (*SimpleSignature) Hash
func (_self *SimpleSignature) Hash() uint64
func (*SimpleSignature) IsEd25519
func (_self *SimpleSignature) IsEd25519() bool
func (*SimpleSignature) IsSecp256k1
func (_self *SimpleSignature) IsSecp256k1() bool
func (*SimpleSignature) IsSecp256r1
func (_self *SimpleSignature) IsSecp256r1() bool
func (*SimpleSignature) Ne
func (_self *SimpleSignature) Ne(other *SimpleSignature) bool
func (*SimpleSignature) Scheme
func (_self *SimpleSignature) Scheme() SignatureScheme
func (*SimpleSignature) Secp256k1PubKey
func (_self *SimpleSignature) Secp256k1PubKey() *Secp256k1PublicKey
func (*SimpleSignature) Secp256k1PubKeyOpt
func (_self *SimpleSignature) Secp256k1PubKeyOpt() **Secp256k1PublicKey
func (*SimpleSignature) Secp256k1Sig
func (_self *SimpleSignature) Secp256k1Sig() *Secp256k1Signature
func (*SimpleSignature) Secp256k1SigOpt
func (_self *SimpleSignature) Secp256k1SigOpt() **Secp256k1Signature
func (*SimpleSignature) Secp256r1PubKey
func (_self *SimpleSignature) Secp256r1PubKey() *Secp256r1PublicKey
func (*SimpleSignature) Secp256r1PubKeyOpt
func (_self *SimpleSignature) Secp256r1PubKeyOpt() **Secp256r1PublicKey
func (*SimpleSignature) Secp256r1Sig
func (_self *SimpleSignature) Secp256r1Sig() *Secp256r1Signature
func (*SimpleSignature) Secp256r1SigOpt
func (_self *SimpleSignature) Secp256r1SigOpt() **Secp256r1Signature
func (*SimpleSignature) SignatureBytes
func (_self *SimpleSignature) SignatureBytes() []byte
The raw signature bytes, without the scheme flag or the public key.
func (*SimpleSignature) ToBase64
func (_self *SimpleSignature) ToBase64() string
Base64-encode this signature as its `flag || sig || pubkey` bytes.
func (*SimpleSignature) ToBytes
func (_self *SimpleSignature) ToBytes() []byte
func (*SimpleSignature) ToPublicKey
func (_self *SimpleSignature) ToPublicKey() *PublicKey
The public key embedded in this signature.