Skip to main content

UserSignature

type UserSignature

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 UserSignature struct {
// contains filtered or unexported fields
}

func LiftFromExternalUserSignature

func LiftFromExternalUserSignature(handle uint64) *UserSignature

func UserSignatureFromBase64

func UserSignatureFromBase64(base64 string) (*UserSignature, error)

func UserSignatureFromBcs

func UserSignatureFromBcs(bcs []byte) (*UserSignature, error)

Create this type from BCS encoded bytes.

func UserSignatureFromBytes

func UserSignatureFromBytes(bytes []byte) (*UserSignature, error)

func UserSignatureFromJson

func UserSignatureFromJson(json string) (*UserSignature, error)

Create this type from JSON encoded string.

func UserSignatureNewMoveAuthenticator

func UserSignatureNewMoveAuthenticator(authenticator *MoveAuthenticator) *UserSignature

func UserSignatureNewMultisig

func UserSignatureNewMultisig(signature *MultisigAggregatedSignature) *UserSignature

func UserSignatureNewPasskeyAuthenticator

func UserSignatureNewPasskeyAuthenticator(authenticator *PasskeyAuthenticator) *UserSignature

func UserSignatureNewSimple

func UserSignatureNewSimple(signature *SimpleSignature) *UserSignature

func (*UserSignature) AsMoveAuthenticator

func (_self *UserSignature) AsMoveAuthenticator() *MoveAuthenticator

Convert this signature into a move authenticator if it is one, or panic otherwise

func (*UserSignature) AsMultisig

func (_self *UserSignature) AsMultisig() *MultisigAggregatedSignature

Convert this signature into a multisig aggregated signature if it is one, or panic otherwise

func (*UserSignature) AsOptMoveAuthenticator

func (_self *UserSignature) AsOptMoveAuthenticator() **MoveAuthenticator

Convert this signature into a move authenticator if it is one, or return `None` otherwise

func (*UserSignature) AsOptMultisig

func (_self *UserSignature) AsOptMultisig() **MultisigAggregatedSignature

Convert this signature into a multisig aggregated signature if it is one, or return `None` otherwise

func (*UserSignature) AsOptPasskeyAuthenticator

func (_self *UserSignature) AsOptPasskeyAuthenticator() **PasskeyAuthenticator

Convert this signature into a passkey authenticator if it is one, or return `None` otherwise

func (*UserSignature) AsOptSimple

func (_self *UserSignature) AsOptSimple() **SimpleSignature

Convert this signature into a simple signature if it is one, or return `None` otherwise

func (*UserSignature) AsPasskeyAuthenticator

func (_self *UserSignature) AsPasskeyAuthenticator() *PasskeyAuthenticator

Convert this signature into a passkey authenticator if it is one, or panic otherwise

func (*UserSignature) AsSimple

func (_self *UserSignature) AsSimple() *SimpleSignature

Convert this signature into a simple signature if it is one, or panic otherwise

func (*UserSignature) DebugString

func (_self *UserSignature) DebugString() string

func (*UserSignature) Destroy

func (object *UserSignature) Destroy()

func (*UserSignature) Eq

func (_self *UserSignature) Eq(other *UserSignature) bool

func (*UserSignature) IsMoveAuthenticator

func (_self *UserSignature) IsMoveAuthenticator() bool

Check if this signature is a move authenticator

func (*UserSignature) IsMultisig

func (_self *UserSignature) IsMultisig() bool

Check if this signature is a multisig aggregated signature

func (*UserSignature) IsPasskeyAuthenticator

func (_self *UserSignature) IsPasskeyAuthenticator() bool

Check if this signature is a passkey authenticator

func (*UserSignature) IsSimple

func (_self *UserSignature) IsSimple() bool

Check if this signature is a simple signature

func (*UserSignature) Ne

func (_self *UserSignature) Ne(other *UserSignature) bool

func (*UserSignature) Scheme

func (_self *UserSignature) Scheme() SignatureScheme

Return the flag for this signature scheme

func (*UserSignature) ToBase64

func (_self *UserSignature) ToBase64() string

func (*UserSignature) ToBytes

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