Skip to main content

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 of this type is specified in [`bcs-schema.abnf`](https://github.com/iotaledger/iota-rust-sdk/blob/develop/crates/iota-sdk-types/bcs-schema.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.

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 a 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) DeriveAddress​

func (_self *SimpleSignature) DeriveAddress() *Address

Derive the `Address` of the public key that produced this signature.

func (*SimpleSignature) Destroy​

func (object *SimpleSignature) Destroy()

func (*SimpleSignature) Ed25519PublicKey​

func (_self *SimpleSignature) Ed25519PublicKey() *Ed25519PublicKey

func (*SimpleSignature) Ed25519Signature​

func (_self *SimpleSignature) Ed25519Signature() *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) OptEd25519PublicKey​

func (_self *SimpleSignature) OptEd25519PublicKey() **Ed25519PublicKey

func (*SimpleSignature) OptEd25519Signature​

func (_self *SimpleSignature) OptEd25519Signature() **Ed25519Signature

func (*SimpleSignature) OptSecp256k1PublicKey​

func (_self *SimpleSignature) OptSecp256k1PublicKey() **Secp256k1PublicKey

func (*SimpleSignature) OptSecp256k1Signature​

func (_self *SimpleSignature) OptSecp256k1Signature() **Secp256k1Signature

func (*SimpleSignature) OptSecp256r1PublicKey​

func (_self *SimpleSignature) OptSecp256r1PublicKey() **Secp256r1PublicKey

func (*SimpleSignature) OptSecp256r1Signature​

func (_self *SimpleSignature) OptSecp256r1Signature() **Secp256r1Signature

func (*SimpleSignature) Scheme​

func (_self *SimpleSignature) Scheme() SignatureScheme

func (*SimpleSignature) Secp256k1PublicKey​

func (_self *SimpleSignature) Secp256k1PublicKey() *Secp256k1PublicKey

func (*SimpleSignature) Secp256k1Signature​

func (_self *SimpleSignature) Secp256k1Signature() *Secp256k1Signature

func (*SimpleSignature) Secp256r1PublicKey​

func (_self *SimpleSignature) Secp256r1PublicKey() *Secp256r1PublicKey

func (*SimpleSignature) Secp256r1Signature​

func (_self *SimpleSignature) Secp256r1Signature() *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) ToBcs​

func (_self *SimpleSignature) ToBcs() ([]byte, error)

Convert this type to BCS encoded bytes.

func (*SimpleSignature) ToBytes​

func (_self *SimpleSignature) ToBytes() []byte

func (*SimpleSignature) ToDisplayString​

func (_self *SimpleSignature) ToDisplayString() string

Render this type as human-readable text.

Some types also print this through the binding's native string conversion; this method is the spelling every object type has.

The layout is meant for reading and can change between releases. Use the JSON or BCS conversions for output that gets parsed.

func (*SimpleSignature) ToJson​

func (_self *SimpleSignature) ToJson() (string, error)

Convert this type to a JSON encoded string.

func (*SimpleSignature) ToPublicKey​

func (_self *SimpleSignature) ToPublicKey() *PublicKey

The public key embedded in this signature.