Skip to main content

UserSignatureProtocol

UserSignatureProtocol Objects​

class UserSignatureProtocol(typing.Protocol)

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.

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.

as_move_authenticator​

def as_move_authenticator() -> MoveAuthenticator

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

as_multisig​

def as_multisig() -> MultisigAggregatedSignature

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

as_opt_move_authenticator​

def as_opt_move_authenticator() -> typing.Optional[MoveAuthenticator]

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

as_opt_multisig​

def as_opt_multisig() -> typing.Optional[MultisigAggregatedSignature]

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

as_opt_passkey_authenticator​

def as_opt_passkey_authenticator() -> typing.Optional[PasskeyAuthenticator]

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

as_opt_simple​

def as_opt_simple() -> typing.Optional[SimpleSignature]

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

as_passkey_authenticator​

def as_passkey_authenticator() -> PasskeyAuthenticator

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

as_simple​

def as_simple() -> SimpleSignature

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

derive_address​

def derive_address() -> Address

Derive the Address of the signer that this signature authenticates.

is_move_authenticator​

def is_move_authenticator() -> bool

Check if this signature is a move authenticator

is_multisig​

def is_multisig() -> bool

Check if this signature is a multisig aggregated signature

is_passkey_authenticator​

def is_passkey_authenticator() -> bool

Check if this signature is a passkey authenticator

is_simple​

def is_simple() -> bool

Check if this signature is a simple signature

scheme​

def scheme() -> SignatureScheme

Return the flag for this signature scheme

to_bcs​

def to_bcs() -> bytes

Convert this type to BCS encoded bytes.

to_display_string​

def to_display_string() -> str

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.

to_json​

def to_json() -> str

Convert this type to a JSON encoded string.