Skip to main content

UserSignature

open class UserSignature : Disposable, AutoCloseable, 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 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.

Functions​

NameSummary
asMoveAuthenticatoropen override fun asMoveAuthenticator(): MoveAuthenticator
Convert this signature into a move authenticator if it is one, or panic otherwise
asMultisigopen override fun asMultisig(): MultisigAggregatedSignature
Convert this signature into a multisig aggregated signature if it is one, or panic otherwise
asOptMoveAuthenticatoropen override fun asOptMoveAuthenticator(): MoveAuthenticator?
Convert this signature into a move authenticator if it is one, or return None otherwise
asOptMultisigopen override fun asOptMultisig(): MultisigAggregatedSignature?
Convert this signature into a multisig aggregated signature if it is one, or return None otherwise
asOptPasskeyAuthenticatoropen override fun asOptPasskeyAuthenticator(): PasskeyAuthenticator?
Convert this signature into a passkey authenticator if it is one, or return None otherwise
asOptSimpleopen override fun asOptSimple(): SimpleSignature?
Convert this signature into a simple signature if it is one, or return None otherwise
asPasskeyAuthenticatoropen override fun asPasskeyAuthenticator(): PasskeyAuthenticator
Convert this signature into a passkey authenticator if it is one, or panic otherwise
asSimpleopen override fun asSimple(): SimpleSignature
Convert this signature into a simple signature if it is one, or panic otherwise
close@Synchronized
open override fun close()
deriveAddressopen override fun deriveAddress(): Address
Derive the Address of the signer that this signature authenticates.
destroyopen override fun destroy()
equalsopen operator override fun equals(other: Any?): Boolean
isMoveAuthenticatoropen override fun isMoveAuthenticator(): Boolean
Check if this signature is a move authenticator
isMultisigopen override fun isMultisig(): Boolean
Check if this signature is a multisig aggregated signature
isPasskeyAuthenticatoropen override fun isPasskeyAuthenticator(): Boolean
Check if this signature is a passkey authenticator
isSimpleopen override fun isSimple(): Boolean
Check if this signature is a simple signature
schemeopen override fun scheme(): SignatureScheme
Return the flag for this signature scheme
toBase64open override fun toBase64(): String
toBcsopen override fun toBcs(): ByteArray
Convert this type to BCS encoded bytes.
toBytesopen override fun toBytes(): ByteArray
toDisplayStringopen override fun toDisplayString(): String
Render this type as human-readable text.
toJsonopen override fun toJson(): String
Convert this type to a JSON encoded string.
toStringopen override fun toString(): String

Companion object functions​

NameSummary
fromBase64fun fromBase64(base64: String): UserSignature
fromBcsfun fromBcs(bcs: ByteArray): UserSignature
Create this type from BCS encoded bytes.
fromBytesfun fromBytes(bytes: ByteArray): UserSignature
fromJsonfun fromJson(json: String): UserSignature
Create this type from a JSON encoded string.
newMoveAuthenticatorfun newMoveAuthenticator(authenticator: MoveAuthenticator): UserSignature
newMultisigfun newMultisig(signature: MultisigAggregatedSignature): UserSignature
newPasskeyAuthenticatorfun newPasskeyAuthenticator(authenticator: PasskeyAuthenticator): UserSignature
newSimplefun newSimple(signature: SimpleSignature): UserSignature