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 for this type is defined by the following ABNF:
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.
Functions
| Name | Summary |
|---|---|
| asMoveAuthenticator | open override fun asMoveAuthenticator(): MoveAuthenticator Convert this signature into a move authenticator if it is one, or panic otherwise |
| asMultisig | open override fun asMultisig(): MultisigAggregatedSignature Convert this signature into a multisig aggregated signature if it is one, or panic otherwise |
| asOptMoveAuthenticator | open override fun asOptMoveAuthenticator(): MoveAuthenticator? Convert this signature into a move authenticator if it is one, or return None otherwise |
| asOptMultisig | open override fun asOptMultisig(): MultisigAggregatedSignature? Convert this signature into a multisig aggregated signature if it is one, or return None otherwise |
| asOptPasskeyAuthenticator | open override fun asOptPasskeyAuthenticator(): PasskeyAuthenticator? Convert this signature into a passkey authenticator if it is one, or return None otherwise |
| asOptSimple | open override fun asOptSimple(): SimpleSignature? Convert this signature into a simple signature if it is one, or return None otherwise |
| asPasskeyAuthenticator | open override fun asPasskeyAuthenticator(): PasskeyAuthenticator Convert this signature into a passkey authenticator if it is one, or panic otherwise |
| asSimple | open override fun asSimple(): SimpleSignature Convert this signature into a simple signature if it is one, or panic otherwise |
| close | @Synchronized open override fun close() |
| destroy | open override fun destroy() |
| equals | open operator override fun equals(other: Any?): Boolean |
| isMoveAuthenticator | open override fun isMoveAuthenticator(): Boolean Check if this signature is a move authenticator |
| isMultisig | open override fun isMultisig(): Boolean Check if this signature is a multisig aggregated signature |
| isPasskeyAuthenticator | open override fun isPasskeyAuthenticator(): Boolean Check if this signature is a passkey authenticator |
| isSimple | open override fun isSimple(): Boolean Check if this signature is a simple signature |
| scheme | open override fun scheme(): SignatureScheme Return the flag for this signature scheme |
| toBase64 | open override fun toBase64(): String |
| toBytes | open override fun toBytes(): ByteArray |
| toString | open override fun toString(): String |
Companion object functions
| Name | Summary |
|---|---|
| fromBase64 | fun fromBase64(base64: String): UserSignature |
| fromBytes | fun fromBytes(bytes: ByteArray): UserSignature |
| newMoveAuthenticator | fun newMoveAuthenticator(authenticator: MoveAuthenticator): UserSignature |
| newMultisig | fun newMultisig(signature: MultisigAggregatedSignature): UserSignature |
| newPasskeyAuthenticator | fun newPasskeyAuthenticator(authenticator: PasskeyAuthenticator): UserSignature |
| newSimple | fun newSimple(signature: SimpleSignature): UserSignature |