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 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 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 a 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) DeriveAddress
func (_self *UserSignature) DeriveAddress() *Address
Derive the `Address` of the signer that this signature authenticates.
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) ToBcs
func (_self *UserSignature) ToBcs() ([]byte, error)
Convert this type to BCS encoded bytes.
func (*UserSignature) ToBytes
func (_self *UserSignature) ToBytes() []byte
func (*UserSignature) ToDisplayString
func (_self *UserSignature) 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 (*UserSignature) ToJson
func (_self *UserSignature) ToJson() (string, error)
Convert this type to a JSON encoded string.