Skip to main content

Module utils

Module utils 

Source

Functionsยง

assert_size_limit_err
Asserts that err is a SizeLimitExceeded error whose limit name matches limit_name exactly, or matches the form {limit_name} of {value}.
blake2b256_of_sig
Compute the Blake2b256 hash of the serialized (flag-prefixed) bytes of a [UserSignature], matching the digest used for non-[MoveAuthenticator] signatures by [UserSignature::auth_digest].
create_fake_transaction
make_committee_key
make_committee_key_num
make_move_authenticator_sig
Build a [UserSignature::MoveAuthenticator] and the underlying [MoveAuthenticator] for the given address, for use in tests.
make_move_authenticator_tx
Make a transaction signed with MoveAuthenticator for testing.
make_move_authenticator_tx_with_inconsistent_shared_input
Make a transaction that passes a shared object to a Move call and is signed with a [MoveAuthenticator] that names the same object with a different initial shared version, for use in tests. The transaction expires in epoch.
make_passkey_authenticator_sig
Build a [UserSignature::PasskeyAuthenticator] backed by a freshly-generated Secp256r1 key pair, for use in tests.
make_sponsored_move_authenticator_tx
Make a sponsored transaction where both sender and sponsor sign with [MoveAuthenticator], for use in tests.
make_sponsored_regular_sig_tx
Make a sponsored transaction where both sender and sponsor sign with regular (Ed25519) signatures, for use in tests.
make_sponsored_transaction_data
Make sponsored [Transaction] with a transfer-IOTA programmable transaction and a random gas object, for use in tests.
make_transaction
Make a user signed transaction with the given sender and its keypair. This is not verified or signed by authority.
make_transaction_data
make_upgraded_multisig_tx
ptb_above_max_tx_size
A programmable transaction above max_tx_size_bytes whose every pure input is under max_pure_argument_size, so only the transaction size cap rejects it.
ptb_with_pure_inputs
A programmable transaction with count pure inputs of size zero bytes each, then the randomness state object when with_randomness is set. Its one command uses the first two inputs, so there must be at least two.
to_sender_signed_transaction
to_sender_signed_transaction_with_multi_signers
to_sender_signed_transaction_with_optional_sponsor