UserSignatureInterface
type UserSignatureInterface
A signature from a user
A `UserSignature` is most commonly used to authorize the execution and inclusion of a transaction to the blockchain.
BCS
The BCS serialized form for this type is defined by the following ABNF:
```text user-signature = bytes ; where the contents of the bytes are defined by ; <user-signature-body> user-signature-body = (%d00 ed25519-signature ed25519-public-key) / (%d01 secp256k1-signature secp256k1-public-key) / (%d02 secp256r1-signature secp256r1-public-key) / (%d03 multisig-aggregated-signature) / (%d06 passkey-authenticator) / (%d07 move-authenticator) ```
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 UserSignatureInterface interface {
// Convert this signature into a move authenticator if it is one, or panic
// otherwise
AsMoveAuthenticator() *MoveAuthenticator
// Convert this signature into a multisig aggregated signature if it is
// one, or panic otherwise
AsMultisig() *MultisigAggregatedSignature
// Convert this signature into a move authenticator if it is one, or return
// `None` otherwise
AsOptMoveAuthenticator() **MoveAuthenticator
// Convert this signature into a multisig aggregated signature if it is
// one, or return `None` otherwise
AsOptMultisig() **MultisigAggregatedSignature
// Convert this signature into a passkey authenticator if it is one, or
// return `None` otherwise
AsOptPasskeyAuthenticator() **PasskeyAuthenticator
// Convert this signature into a simple signature if it is one, or return
// `None` otherwise
AsOptSimple() **SimpleSignature
// Convert this signature into a passkey authenticator if it is one, or
// panic otherwise
AsPasskeyAuthenticator() *PasskeyAuthenticator
// Convert this signature into a simple signature if it is one, or panic
// otherwise
AsSimple() *SimpleSignature
// Check if this signature is a move authenticator
IsMoveAuthenticator() bool
// Check if this signature is a multisig aggregated signature
IsMultisig() bool
// Check if this signature is a passkey authenticator
IsPasskeyAuthenticator() bool
// Check if this signature is a simple signature
IsSimple() bool
// Return the flag for this signature scheme
Scheme() SignatureScheme
ToBase64() string
ToBytes() []byte
}