diff --git a/bindings/python/lib/iota_sdk_ffi.py b/bindings/python/lib/iota_sdk_ffi.py index 2608bce66..b4c897458 100644 --- a/bindings/python/lib/iota_sdk_ffi.py +++ b/bindings/python/lib/iota_sdk_ffi.py @@ -467,18 +467,46 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_bls12381publickey_to_bytes() != 9890: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_bls12381signature_to_bytes() != 56969: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_padded() != 44301: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_unpadded() != 33350: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_as_ecmh_live_object_set_digest() != 41616: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_is_ecmh_live_object_set() != 22589: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontentsdigest_to_base58() != 60951: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontentsdigest_to_bytes() != 51343: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointdigest_to_base58() != 40700: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointdigest_to_bytes() != 48082: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_coin_balance() != 29928: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_coin_coin_type() != 18211: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_coin_id() != 40013: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitdigest_to_base58() != 7053: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitdigest_to_bytes() != 5048: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_digest_to_base58() != 54638: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_digest_to_bytes() != 14244: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_to_bytes() != 16656: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_ed25519signature_to_bytes() != 31911: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_effectsauxiliarydatadigest_to_base58() != 56652: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_effectsauxiliarydatadigest_to_bytes() != 12259: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request() != 13326: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_and_wait() != 48304: @@ -499,7 +527,7 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins() != 48442: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx() != 4408: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx() != 62890: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx_kind() != 47707: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -517,7 +545,7 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events() != 41916: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx() != 22929: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx() != 41079: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_latest_checkpoint_sequence_number() != 40336: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -573,6 +601,72 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects() != 2687: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_bitmap() != 41489: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_committee() != 17432: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_signatures() != 5488: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_is_valid() != 45468: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_members() != 62870: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_scheme() != 15458: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_threshold() != 21653: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_public_key() != 7804: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_weight() != 57194: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519() != 8241: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519_opt() != 28021: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1() != 52073: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1_opt() != 40194: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1() != 38170: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1_opt() != 28963: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin() != 17714: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin_opt() != 23106: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_ed25519() != 1939: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256k1() != 49521: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256r1() != 16265: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_zklogin() != 37193: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519() != 22855: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519_opt() != 56690: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1() != 49085: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1_opt() != 26984: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1() != 57510: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1_opt() != 12419: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin() != 39624: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin_opt() != 34526: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_ed25519() != 18913: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256k1() != 16841: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256r1() != 51171: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_zklogin() != 65193: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_object_as_struct() != 2473: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_object_data() != 4330: @@ -589,20 +683,144 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_object_version() != 18433: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_objectdigest_to_base58() != 2414: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_objectdigest_to_bytes() != 31732: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_address() != 21880: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_bytes() != 38367: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_hex() != 4418: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_authenticator_data() != 55474: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_challenge() != 28147: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_client_data_json() != 20272: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_signature() != 5489: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_to_bytes() != 49170: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_secp256k1signature_to_bytes() != 49705: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_to_bytes() != 21066: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_secp256r1signature_to_bytes() != 64948: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key() != 36693: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key_opt() != 11858: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig() != 56126: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig_opt() != 33862: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_ed25519() != 64494: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256k1() != 39262: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256r1() != 49536: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_scheme() != 30423: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key() != 51778: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key_opt() != 20475: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig() != 36141: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig_opt() != 16111: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key() != 25197: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key_opt() != 22487: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig() != 30390: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig_opt() != 51961: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_to_bytes() != 28081: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_transaction_expiration() != 47752: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_transaction_gas_payment() != 5316: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_transaction_kind() != 49492: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_transaction_sender() != 38190: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_transactiondigest_to_base58() != 22119: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_transactiondigest_to_bytes() != 3253: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1() != 48710: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1() != 39808: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_transactioneffectsdigest_to_base58() != 38601: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_transactioneffectsdigest_to_bytes() != 43744: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_transactioneventsdigest_to_base58() != 54162: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_transactioneventsdigest_to_bytes() != 6773: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig() != 36332: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt() != 21895: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey() != 17710: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt() != 53755: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple() != 57455: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt() != 47248: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin() != 53484: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt() != 43934: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig() != 61839: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey() != 35671: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple() != 58211: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin() != 38693: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme() != 25381: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_base64() != 33757: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_bytes() != 58893: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_inputs() != 1512: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_max_epoch() != 9769: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_signature() != 18838: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_address_seed() != 4892: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_header_base64() != 32056: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss_base64_details() != 20914: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_proof_points() != 28172: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_a() != 6891: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_b() != 36477: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_c() != 10897: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_address_seed() != 3936: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_iss() != 58864: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes() != 58901: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex() != 63442: @@ -615,14 +833,66 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate() != 30791: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_bytes() != 42745: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_str() != 5412: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_generate() != 58435: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_bytes() != 3672: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str() != 21214: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str_radix_10() != 17556: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontentsdigest_from_base58() != 33027: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontentsdigest_from_bytes() != 37261: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontentsdigest_generate() != 79: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointdigest_from_base58() != 65453: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointdigest_from_bytes() != 24226: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointdigest_generate() != 13389: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_circomg1_new() != 39786: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_circomg2_new() != 50489: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object() != 35349: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitdigest_from_base58() != 17742: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitdigest_from_bytes() != 58221: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitdigest_generate() != 49846: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_base58() != 41234: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_bytes() != 65530: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_digest_generate() != 8094: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes() != 60403: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str() != 38751: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate() != 46412: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_bytes() != 61841: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_str() != 39607: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_generate() != 41607: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_effectsauxiliarydatadigest_from_base58() != 31144: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_effectsauxiliarydatadigest_from_bytes() != 36699: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_effectsauxiliarydatadigest_generate() != 28926: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_authenticator_state_create() != 18946: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_authenticator_state_expire() != 49861: @@ -649,8 +919,20 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_testnet() != 48529: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregatedsignature_new() != 3396: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigcommittee_new() != 40069: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_multisigmember_new() != 63622: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_object_new() != 56232: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectdigest_from_base58() != 57967: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectdigest_from_bytes() != 62288: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectdigest_generate() != 61181: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_bytes() != 41789: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_hex() != 30954: @@ -661,14 +943,46 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_generate() != 36411: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_bytes() != 36237: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_str() != 16397: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_generate() != 63087: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_bytes() != 60002: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_str() != 27991: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_generate() != 49992: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_bytes() != 8469: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_str() != 15312: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_generate() != 40260: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transaction_new() != 4081: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondigest_from_base58() != 15069: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondigest_from_bytes() != 43656: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondigest_generate() != 14578: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffects_v1() != 6144: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffectsdigest_from_base58() != 63406: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffectsdigest_from_bytes() != 51937: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffectsdigest_generate() != 11715: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneventsdigest_from_base58() != 56954: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneventsdigest_from_bytes() != 4647: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneventsdigest_generate() != 18224: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_authenticator_state_update_v1() != 37860: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_consensus_commit_prologue_v1() != 50635: @@ -681,6 +995,18 @@ def _uniffi_check_api_checksums(lib): raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_randomness_state_update() != 45772: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64() != 8029: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes() != 37499: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginauthenticator_new() != 32812: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_zklogininputs_new() != 54245: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginproof_new() != 19950: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginpublicidentifier_new() != 53294: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") # A ctypes library to expose the extern-C FFI definitions. # This is an implementation detail which will be called internally by the public API. @@ -880,6 +1206,70 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381publickey_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381signature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381signature.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381signature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381signature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bn254fieldelement.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bn254fieldelement.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepoch.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -930,6 +1320,30 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcontentsdigest.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontentsdigest_from_base58.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontentsdigest_from_base58.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontentsdigest_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontentsdigest_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontentsdigest_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontentsdigest_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontentsdigest_to_base58.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontentsdigest_to_base58.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontentsdigest_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontentsdigest_to_bytes.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointdigest.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -940,6 +1354,67 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointdigest.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointdigest_from_base58.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointdigest_from_base58.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointdigest_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointdigest_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointdigest_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointdigest_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointdigest_to_base58.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointdigest_to_base58.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointdigest_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointdigest_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg1.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg1.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg1_new.argtypes = ( + ctypes.c_void_p, + ctypes.c_void_p, + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg1_new.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg2.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg2.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg2.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg2.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg2_new.argtypes = ( + ctypes.c_void_p, + ctypes.c_void_p, + ctypes.c_void_p, + ctypes.c_void_p, + ctypes.c_void_p, + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg2_new.restype = ctypes.c_void_p _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coin.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -990,8 +1465,32 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitdigest.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1.argtypes = ( - ctypes.c_void_p, +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitdigest_from_base58.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitdigest_from_base58.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitdigest_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitdigest_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitdigest_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitdigest_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitdigest_to_base58.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitdigest_to_base58.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitdigest_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitdigest_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1.argtypes = ( + ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1.restype = ctypes.c_void_p @@ -1010,6 +1509,30 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_digest.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_base58.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_base58.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_bytes.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_dryrunresult.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1049,6 +1572,35 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519signature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519signature.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519signature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519signature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_effectsauxiliarydatadigest.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1059,6 +1611,30 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_effectsauxiliarydatadigest.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_effectsauxiliarydatadigest_from_base58.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_effectsauxiliarydatadigest_from_base58.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_effectsauxiliarydatadigest_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_effectsauxiliarydatadigest_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_effectsauxiliarydatadigest_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_effectsauxiliarydatadigest_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_effectsauxiliarydatadigest_to_base58.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_effectsauxiliarydatadigest_to_base58.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_effectsauxiliarydatadigest_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_effectsauxiliarydatadigest_to_bytes.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1252,7 +1828,7 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins.restype = ctypes.c_uint64 _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx.argtypes = ( ctypes.c_void_p, - _UniffiRustBuffer, + ctypes.c_void_p, _UniffiRustBuffer, ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx.restype = ctypes.c_uint64 @@ -1307,7 +1883,7 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx.argtypes = ( ctypes.c_void_p, _UniffiRustBuffer, - _UniffiRustBuffer, + ctypes.c_void_p, ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx.restype = ctypes.c_uint64 _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number.argtypes = ( @@ -1503,6 +2079,240 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_movestruct.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new.argtypes = ( + ctypes.c_void_p, + _UniffiRustBuffer, + ctypes.c_uint16, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigcommittee.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigcommittee.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new.argtypes = ( + _UniffiRustBuffer, + ctypes.c_uint16, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmember.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmember.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmember.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmember.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new.argtypes = ( + ctypes.c_void_p, + ctypes.c_uint8, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_weight.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_weight.restype = ctypes.c_uint8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmembersignature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmembersignature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin.restype = ctypes.c_int8 _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_object.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1581,6 +2391,30 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdigest.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdigest_from_base58.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdigest_from_base58.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdigest_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdigest_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdigest_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdigest_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdigest_to_base58.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdigest_to_base58.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdigest_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdigest_to_bytes.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectid.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1646,6 +2480,36 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_owner.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature.restype = ctypes.c_void_p _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1705,6 +2569,35 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1signature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1signature.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1signature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1signature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1734,16 +2627,178 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_serviceconfig.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1signature.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_serviceconfig.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_serviceconfig.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1signature.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1signature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1signature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_serviceconfig.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_serviceconfig.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_serviceconfig.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_serviceconfig.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplesignature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplesignature.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplesignature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplesignature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transaction.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transaction.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transaction.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transaction.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transaction_new.argtypes = ( + ctypes.c_void_p, + ctypes.c_void_p, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transaction_new.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_expiration.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_expiration.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_kind.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_kind.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_sender.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_sender.restype = ctypes.c_void_p _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactiondigest.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1754,6 +2809,30 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactiondigest.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondigest_from_base58.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondigest_from_base58.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondigest_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondigest_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondigest_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondigest_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondigest_to_base58.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondigest_to_base58.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondigest_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondigest_to_bytes.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffects.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1789,6 +2868,30 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffectsdigest.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffectsdigest_from_base58.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffectsdigest_from_base58.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffectsdigest_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffectsdigest_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffectsdigest_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffectsdigest_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectsdigest_to_base58.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectsdigest_to_base58.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectsdigest_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectsdigest_to_bytes.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneventsdigest.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1799,6 +2902,30 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneventsdigest.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneventsdigest_from_base58.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneventsdigest_from_base58.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneventsdigest_from_bytes.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneventsdigest_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneventsdigest_generate.argtypes = ( + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneventsdigest_generate.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventsdigest_to_base58.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventsdigest_to_base58.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventsdigest_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventsdigest_to_bytes.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionkind.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1859,113 +2986,326 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignature.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_alloc.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64.argtypes = ( + _UniffiRustBuffer, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_alloc.restype = _UniffiRustBuffer -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_from_bytes.argtypes = ( - _UniffiForeignBytes, +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes.argtypes = ( + _UniffiRustBuffer, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_from_bytes.restype = _UniffiRustBuffer -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_free.argtypes = ( - _UniffiRustBuffer, +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig.argtypes = ( + ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_free.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_reserve.argtypes = ( - _UniffiRustBuffer, - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt.argtypes = ( + ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_reserve.restype = _UniffiRustBuffer -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u8.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u8.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u8.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u8.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt.argtypes = ( + ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u8.restype = ctypes.c_uint8 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i8.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i8.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i8.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i8.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey.argtypes = ( + ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i8.restype = ctypes.c_int8 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u16.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u16.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u16.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u16.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64.argtypes = ( + ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u16.restype = ctypes.c_uint16 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i16.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i16.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i16.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i16.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i16.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new.argtypes = ( + ctypes.c_void_p, ctypes.c_uint64, + ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i16.restype = ctypes.c_int16 -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u32.argtypes = ( - ctypes.c_uint64, - _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u32.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u32.argtypes = ( - ctypes.c_uint64, +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u32.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch.restype = ctypes.c_uint64 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zklogininputs.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zklogininputs.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zklogininputs.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zklogininputs.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new.argtypes = ( + ctypes.c_void_p, + _UniffiRustBuffer, + _UniffiRustBuffer, + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginproof.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginproof.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginproof.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginproof.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new.argtypes = ( + ctypes.c_void_p, + ctypes.c_void_p, + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_a.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_a.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_c.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_c.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new.argtypes = ( + _UniffiRustBuffer, + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss.restype = _UniffiRustBuffer +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_alloc.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_alloc.restype = _UniffiRustBuffer +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_from_bytes.argtypes = ( + _UniffiForeignBytes, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_from_bytes.restype = _UniffiRustBuffer +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_free.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_free.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_reserve.argtypes = ( + _UniffiRustBuffer, + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_reserve.restype = _UniffiRustBuffer +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u8.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u8.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u8.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u8.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u8.restype = ctypes.c_uint8 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i8.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i8.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i8.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i8.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i8.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i8.restype = ctypes.c_int8 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u16.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u16.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u16.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u16.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_u16.restype = ctypes.c_uint16 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i16.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i16.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_i16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i16.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i16.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i16.argtypes = ( + ctypes.c_uint64, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i16.restype = ctypes.c_int16 +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u32.argtypes = ( + ctypes.c_uint64, + _UNIFFI_RUST_FUTURE_CONTINUATION_CALLBACK, + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_u32.restype = None +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u32.argtypes = ( + ctypes.c_uint64, +) +_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u32.restype = None _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u32.argtypes = ( ctypes.c_uint64, ) @@ -2136,12 +3476,33 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381publickey_to_bytes.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381publickey_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381signature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bls12381signature_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_padded.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_padded.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_unpadded.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_bn254fieldelement_unpadded.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_as_ecmh_live_object_set_digest.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_as_ecmh_live_object_set_digest.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_is_ecmh_live_object_set.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcommitment_is_ecmh_live_object_set.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontentsdigest_to_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontentsdigest_to_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontentsdigest_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointcontentsdigest_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointdigest_to_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointdigest_to_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointdigest_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointdigest_to_bytes.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_balance.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_balance.restype = ctypes.c_uint16 @@ -2151,9 +3512,30 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_id.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coin_id.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitdigest_to_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitdigest_to_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitdigest_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_consensuscommitdigest_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_digest_to_bytes.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_to_bytes.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519publickey_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519signature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_ed25519signature_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_effectsauxiliarydatadigest_to_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_effectsauxiliarydatadigest_to_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_effectsauxiliarydatadigest_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_effectsauxiliarydatadigest_to_bytes.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request.restype = ctypes.c_uint16 @@ -2295,6 +3677,105 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_bitmap.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_bitmap.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_committee.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_committee.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_signatures.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigaggregatedsignature_signatures.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_is_valid.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_is_valid.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_members.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_members.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_threshold.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigcommittee_threshold.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_public_key.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_public_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_weight.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmember_weight.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_ed25519_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256k1_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_secp256r1_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_as_zklogin_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_ed25519.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256k1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256r1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmemberpublickey_is_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_ed25519_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256k1_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_secp256r1_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_as_zklogin_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_ed25519.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256k1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256r1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_multisigmembersignature_is_zklogin.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_struct.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_as_struct.restype = ctypes.c_uint16 @@ -2319,6 +3800,12 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_version.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_object_version.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdigest_to_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdigest_to_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdigest_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectdigest_to_bytes.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_address.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_address.restype = ctypes.c_uint16 @@ -2328,60 +3815,318 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_hex.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectid_to_hex.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_authenticator_data.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_authenticator_data.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_challenge.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_challenge.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_client_data_json.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_client_data_json.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_signature.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_passkeyauthenticator_signature.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_to_bytes.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1publickey_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1signature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256k1signature_to_bytes.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_to_bytes.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1publickey_to_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1signature_to_bytes.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1signature_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key_opt.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_generate.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig_opt.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_sig_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_ed25519.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_ed25519.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256k1.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256k1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256r1.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_is_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_scheme.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key_opt.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_pub_key_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_authenticator_state_create.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig_opt.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_authenticator_state_create.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_authenticator_state_expire.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256k1_sig_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_authenticator_state_expire.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_change_epoch.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key_opt.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_change_epoch.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_change_epoch_v2.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_pub_key_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig.argtypes = ( ) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_change_epoch_v2.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_secp256r1_sig_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_expiration.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_expiration.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_gas_payment.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_gas_payment.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_kind.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_kind.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_sender.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transaction_sender.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactiondigest_to_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactiondigest_to_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactiondigest_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactiondigest_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_as_v1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffects_is_v1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffectsdigest_to_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffectsdigest_to_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffectsdigest_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffectsdigest_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneventsdigest_to_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneventsdigest_to_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneventsdigest_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneventsdigest_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_multisig_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_passkey_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_simple_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_as_zklogin_opt.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_multisig.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_passkey.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_simple.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_is_zklogin.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_scheme.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_base64.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_base64.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_usersignature_to_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_inputs.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_inputs.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_max_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_max_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_signature.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginauthenticator_signature.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_address_seed.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_address_seed.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_header_base64.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_header_base64.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss_base64_details.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_iss_base64_details.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_proof_points.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zklogininputs_proof_points.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_a.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_a.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_b.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_b.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_c.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginproof_c.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_address_seed.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_address_seed.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_iss.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_zkloginpublicidentifier_iss.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_hex.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_address_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381signature_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str_radix_10.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_bn254fieldelement_from_str_radix_10.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontentsdigest_from_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontentsdigest_from_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontentsdigest_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontentsdigest_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontentsdigest_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointcontentsdigest_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointdigest_from_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointdigest_from_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointdigest_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointdigest_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointdigest_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_checkpointdigest_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg1_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg1_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg2_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_circomg2_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_coin_try_from_object.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitdigest_from_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitdigest_from_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitdigest_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitdigest_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitdigest_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_consensuscommitdigest_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_digest_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519publickey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_ed25519signature_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_effectsauxiliarydatadigest_from_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_effectsauxiliarydatadigest_from_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_effectsauxiliarydatadigest_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_effectsauxiliarydatadigest_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_effectsauxiliarydatadigest_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_effectsauxiliarydatadigest_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_authenticator_state_create.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_authenticator_state_create.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_authenticator_state_expire.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_authenticator_state_expire.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_change_epoch.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_change_epoch.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_change_epoch_v2.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_change_epoch_v2.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_devnet.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_devnet.restype = ctypes.c_uint16 @@ -2409,9 +4154,27 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_testnet.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_testnet.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregatedsignature_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigaggregatedsignature_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigcommittee_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigcommittee_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigmember_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_multisigmember_new.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_object_new.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_object_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdigest_from_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdigest_from_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdigest_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdigest_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdigest_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectdigest_generate.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_bytes.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_bytes.restype = ctypes.c_uint16 @@ -2427,6 +4190,15 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_generate.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1signature_generate.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_bytes.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_from_bytes.restype = ctypes.c_uint16 @@ -2436,9 +4208,48 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_generate.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1publickey_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_str.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_from_str.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_secp256r1signature_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transaction_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transaction_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondigest_from_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondigest_from_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondigest_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondigest_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondigest_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondigest_generate.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffects_v1.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffects_v1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffectsdigest_from_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffectsdigest_from_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffectsdigest_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffectsdigest_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffectsdigest_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneffectsdigest_generate.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneventsdigest_from_base58.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneventsdigest_from_base58.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneventsdigest_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneventsdigest_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneventsdigest_generate.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactioneventsdigest_generate.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_authenticator_state_update_v1.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_authenticator_state_update_v1.restype = ctypes.c_uint16 @@ -2457,6 +4268,24 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_randomness_state_update.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactionkind_randomness_state_update.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_base64.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_usersignature_from_bytes.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginauthenticator_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginauthenticator_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zklogininputs_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zklogininputs_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginproof_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginproof_new.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginpublicidentifier_new.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_zkloginpublicidentifier_new.restype = ctypes.c_uint16 _UniffiLib.ffi_iota_sdk_ffi_uniffi_contract_version.argtypes = ( ) _UniffiLib.ffi_iota_sdk_ffi_uniffi_contract_version.restype = ctypes.c_uint32 @@ -2698,6 +4527,44 @@ def write(value, buf): + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -4095,70 +5962,6 @@ def write(value, buf): _UniffiConverterSequenceTypeSignedTransaction.write(value.data, buf) -class Transaction: - """ - A transaction - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - transaction = %x00 transaction-v1 - - transaction-v1 = transaction-kind address gas-payment transaction-expiration - ``` - """ - - kind: "TransactionKind" - sender: "Address" - gas_payment: "GasPayment" - expiration: "TransactionExpiration" - def __init__(self, *, kind: "TransactionKind", sender: "Address", gas_payment: "GasPayment", expiration: "TransactionExpiration"): - self.kind = kind - self.sender = sender - self.gas_payment = gas_payment - self.expiration = expiration - - def __str__(self): - return "Transaction(kind={}, sender={}, gas_payment={}, expiration={})".format(self.kind, self.sender, self.gas_payment, self.expiration) - - def __eq__(self, other): - if self.kind != other.kind: - return False - if self.sender != other.sender: - return False - if self.gas_payment != other.gas_payment: - return False - if self.expiration != other.expiration: - return False - return True - -class _UniffiConverterTypeTransaction(_UniffiConverterRustBuffer): - @staticmethod - def read(buf): - return Transaction( - kind=_UniffiConverterTypeTransactionKind.read(buf), - sender=_UniffiConverterTypeAddress.read(buf), - gas_payment=_UniffiConverterTypeGasPayment.read(buf), - expiration=_UniffiConverterTypeTransactionExpiration.read(buf), - ) - - @staticmethod - def check_lower(value): - _UniffiConverterTypeTransactionKind.check_lower(value.kind) - _UniffiConverterTypeAddress.check_lower(value.sender) - _UniffiConverterTypeGasPayment.check_lower(value.gas_payment) - _UniffiConverterTypeTransactionExpiration.check_lower(value.expiration) - - @staticmethod - def write(value, buf): - _UniffiConverterTypeTransactionKind.write(value.kind, buf) - _UniffiConverterTypeAddress.write(value.sender, buf) - _UniffiConverterTypeGasPayment.write(value.gas_payment, buf) - _UniffiConverterTypeTransactionExpiration.write(value.expiration, buf) - - class TransactionDataEffects: tx: "SignedTransaction" effects: "TransactionEffects" @@ -5187,6 +6990,42 @@ def write(value, buf): _UniffiConverterSequenceTypeValidator.write(value.data, buf) +class ZkLoginClaim: + value: "str" + index_mod_4: "int" + def __init__(self, *, value: "str", index_mod_4: "int"): + self.value = value + self.index_mod_4 = index_mod_4 + + def __str__(self): + return "ZkLoginClaim(value={}, index_mod_4={})".format(self.value, self.index_mod_4) + + def __eq__(self, other): + if self.value != other.value: + return False + if self.index_mod_4 != other.index_mod_4: + return False + return True + +class _UniffiConverterTypeZkLoginClaim(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + return ZkLoginClaim( + value=_UniffiConverterString.read(buf), + index_mod_4=_UniffiConverterUInt8.read(buf), + ) + + @staticmethod + def check_lower(value): + _UniffiConverterString.check_lower(value.value) + _UniffiConverterUInt8.check_lower(value.index_mod_4) + + @staticmethod + def write(value, buf): + _UniffiConverterString.write(value.value, buf) + _UniffiConverterUInt8.write(value.index_mod_4, buf) + + @@ -5870,7 +7709,7 @@ def __eq__(self, other): return False return True - class IOTA_MOVE_VERIFICATION_ERROR: + class IOTA_MOVE_VERIFICATION: """ IOTA Move Bytecode Verification Error. """ @@ -5880,14 +7719,14 @@ def __init__(self,): pass def __str__(self): - return "ExecutionError.IOTA_MOVE_VERIFICATION_ERROR()".format() + return "ExecutionError.IOTA_MOVE_VERIFICATION()".format() def __eq__(self, other): - if not other.is_IOTA_MOVE_VERIFICATION_ERROR(): + if not other.is_IOTA_MOVE_VERIFICATION(): return False return True - class MOVE_PRIMITIVE_RUNTIME_ERROR: + class MOVE_PRIMITIVE_RUNTIME: """ Error from a non-abort instruction. Possible causes: @@ -5900,10 +7739,10 @@ def __init__(self,location: "typing.Optional[MoveLocation]"): self.location = location def __str__(self): - return "ExecutionError.MOVE_PRIMITIVE_RUNTIME_ERROR(location={})".format(self.location) + return "ExecutionError.MOVE_PRIMITIVE_RUNTIME(location={})".format(self.location) def __eq__(self, other): - if not other.is_MOVE_PRIMITIVE_RUNTIME_ERROR(): + if not other.is_MOVE_PRIMITIVE_RUNTIME(): return False if self.location != other.location: return False @@ -5933,7 +7772,7 @@ def __eq__(self, other): return False return True - class VM_VERIFICATION_OR_DESERIALIZATION_ERROR: + class VM_VERIFICATION_OR_DESERIALIZATION: """ Bytecode verification error. """ @@ -5943,10 +7782,10 @@ def __init__(self,): pass def __str__(self): - return "ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION_ERROR()".format() + return "ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION()".format() def __eq__(self, other): - if not other.is_VM_VERIFICATION_OR_DESERIALIZATION_ERROR(): + if not other.is_VM_VERIFICATION_OR_DESERIALIZATION(): return False return True @@ -6037,7 +7876,7 @@ def __eq__(self, other): return False return True - class COMMAND_ARGUMENT_ERROR: + class COMMAND_ARGUMENT: """ Invalid command argument """ @@ -6050,10 +7889,10 @@ def __init__(self,argument: "int", kind: "CommandArgumentError"): self.kind = kind def __str__(self): - return "ExecutionError.COMMAND_ARGUMENT_ERROR(argument={}, kind={})".format(self.argument, self.kind) + return "ExecutionError.COMMAND_ARGUMENT(argument={}, kind={})".format(self.argument, self.kind) def __eq__(self, other): - if not other.is_COMMAND_ARGUMENT_ERROR(): + if not other.is_COMMAND_ARGUMENT(): return False if self.argument != other.argument: return False @@ -6061,7 +7900,7 @@ def __eq__(self, other): return False return True - class TYPE_ARGUMENT_ERROR: + class TYPE_ARGUMENT: """ Type argument error """ @@ -6078,10 +7917,10 @@ def __init__(self,type_argument: "int", kind: "TypeArgumentError"): self.kind = kind def __str__(self): - return "ExecutionError.TYPE_ARGUMENT_ERROR(type_argument={}, kind={})".format(self.type_argument, self.kind) + return "ExecutionError.TYPE_ARGUMENT(type_argument={}, kind={})".format(self.type_argument, self.kind) def __eq__(self, other): - if not other.is_TYPE_ARGUMENT_ERROR(): + if not other.is_TYPE_ARGUMENT(): return False if self.type_argument != other.type_argument: return False @@ -6213,7 +8052,7 @@ def __eq__(self, other): return False return True - class PACKAGE_UPGRADE_ERROR: + class PACKAGE_UPGRADE: """ Invalid package upgrade """ @@ -6224,10 +8063,10 @@ def __init__(self,kind: "PackageUpgradeError"): self.kind = kind def __str__(self): - return "ExecutionError.PACKAGE_UPGRADE_ERROR(kind={})".format(self.kind) + return "ExecutionError.PACKAGE_UPGRADE(kind={})".format(self.kind) def __eq__(self, other): - if not other.is_PACKAGE_UPGRADE_ERROR(): + if not other.is_PACKAGE_UPGRADE(): return False if self.kind != other.kind: return False @@ -6494,22 +8333,22 @@ def is_PUBLISH_ERROR_NON_ZERO_ADDRESS(self) -> bool: return isinstance(self, ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS) def is_publish_error_non_zero_address(self) -> bool: return isinstance(self, ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS) - def is_IOTA_MOVE_VERIFICATION_ERROR(self) -> bool: - return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION_ERROR) - def is_iota_move_verification_error(self) -> bool: - return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION_ERROR) - def is_MOVE_PRIMITIVE_RUNTIME_ERROR(self) -> bool: - return isinstance(self, ExecutionError.MOVE_PRIMITIVE_RUNTIME_ERROR) - def is_move_primitive_runtime_error(self) -> bool: - return isinstance(self, ExecutionError.MOVE_PRIMITIVE_RUNTIME_ERROR) + def is_IOTA_MOVE_VERIFICATION(self) -> bool: + return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION) + def is_iota_move_verification(self) -> bool: + return isinstance(self, ExecutionError.IOTA_MOVE_VERIFICATION) + def is_MOVE_PRIMITIVE_RUNTIME(self) -> bool: + return isinstance(self, ExecutionError.MOVE_PRIMITIVE_RUNTIME) + def is_move_primitive_runtime(self) -> bool: + return isinstance(self, ExecutionError.MOVE_PRIMITIVE_RUNTIME) def is_MOVE_ABORT(self) -> bool: return isinstance(self, ExecutionError.MOVE_ABORT) def is_move_abort(self) -> bool: return isinstance(self, ExecutionError.MOVE_ABORT) - def is_VM_VERIFICATION_OR_DESERIALIZATION_ERROR(self) -> bool: - return isinstance(self, ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION_ERROR) - def is_vm_verification_or_deserialization_error(self) -> bool: - return isinstance(self, ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION_ERROR) + def is_VM_VERIFICATION_OR_DESERIALIZATION(self) -> bool: + return isinstance(self, ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION) + def is_vm_verification_or_deserialization(self) -> bool: + return isinstance(self, ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION) def is_VM_INVARIANT_VIOLATION(self) -> bool: return isinstance(self, ExecutionError.VM_INVARIANT_VIOLATION) def is_vm_invariant_violation(self) -> bool: @@ -6530,14 +8369,14 @@ def is_NON_ENTRY_FUNCTION_INVOKED(self) -> bool: return isinstance(self, ExecutionError.NON_ENTRY_FUNCTION_INVOKED) def is_non_entry_function_invoked(self) -> bool: return isinstance(self, ExecutionError.NON_ENTRY_FUNCTION_INVOKED) - def is_COMMAND_ARGUMENT_ERROR(self) -> bool: - return isinstance(self, ExecutionError.COMMAND_ARGUMENT_ERROR) - def is_command_argument_error(self) -> bool: - return isinstance(self, ExecutionError.COMMAND_ARGUMENT_ERROR) - def is_TYPE_ARGUMENT_ERROR(self) -> bool: - return isinstance(self, ExecutionError.TYPE_ARGUMENT_ERROR) - def is_type_argument_error(self) -> bool: - return isinstance(self, ExecutionError.TYPE_ARGUMENT_ERROR) + def is_COMMAND_ARGUMENT(self) -> bool: + return isinstance(self, ExecutionError.COMMAND_ARGUMENT) + def is_command_argument(self) -> bool: + return isinstance(self, ExecutionError.COMMAND_ARGUMENT) + def is_TYPE_ARGUMENT(self) -> bool: + return isinstance(self, ExecutionError.TYPE_ARGUMENT) + def is_type_argument(self) -> bool: + return isinstance(self, ExecutionError.TYPE_ARGUMENT) def is_UNUSED_VALUE_WITHOUT_DROP(self) -> bool: return isinstance(self, ExecutionError.UNUSED_VALUE_WITHOUT_DROP) def is_unused_value_without_drop(self) -> bool: @@ -6562,10 +8401,10 @@ def is_PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE(self) -> bool: return isinstance(self, ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE) def is_publish_upgrade_dependency_downgrade(self) -> bool: return isinstance(self, ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE) - def is_PACKAGE_UPGRADE_ERROR(self) -> bool: - return isinstance(self, ExecutionError.PACKAGE_UPGRADE_ERROR) - def is_package_upgrade_error(self) -> bool: - return isinstance(self, ExecutionError.PACKAGE_UPGRADE_ERROR) + def is_PACKAGE_UPGRADE(self) -> bool: + return isinstance(self, ExecutionError.PACKAGE_UPGRADE) + def is_package_upgrade(self) -> bool: + return isinstance(self, ExecutionError.PACKAGE_UPGRADE) def is_WRITTEN_OBJECTS_TOO_LARGE(self) -> bool: return isinstance(self, ExecutionError.WRITTEN_OBJECTS_TOO_LARGE) def is_written_objects_too_large(self) -> bool: @@ -6625,24 +8464,24 @@ def is_invalid_linkage(self) -> bool: ExecutionError.INSUFFICIENT_COIN_BALANCE = type("ExecutionError.INSUFFICIENT_COIN_BALANCE", (ExecutionError.INSUFFICIENT_COIN_BALANCE, ExecutionError,), {}) # type: ignore ExecutionError.COIN_BALANCE_OVERFLOW = type("ExecutionError.COIN_BALANCE_OVERFLOW", (ExecutionError.COIN_BALANCE_OVERFLOW, ExecutionError,), {}) # type: ignore ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS = type("ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS", (ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS, ExecutionError,), {}) # type: ignore -ExecutionError.IOTA_MOVE_VERIFICATION_ERROR = type("ExecutionError.IOTA_MOVE_VERIFICATION_ERROR", (ExecutionError.IOTA_MOVE_VERIFICATION_ERROR, ExecutionError,), {}) # type: ignore -ExecutionError.MOVE_PRIMITIVE_RUNTIME_ERROR = type("ExecutionError.MOVE_PRIMITIVE_RUNTIME_ERROR", (ExecutionError.MOVE_PRIMITIVE_RUNTIME_ERROR, ExecutionError,), {}) # type: ignore +ExecutionError.IOTA_MOVE_VERIFICATION = type("ExecutionError.IOTA_MOVE_VERIFICATION", (ExecutionError.IOTA_MOVE_VERIFICATION, ExecutionError,), {}) # type: ignore +ExecutionError.MOVE_PRIMITIVE_RUNTIME = type("ExecutionError.MOVE_PRIMITIVE_RUNTIME", (ExecutionError.MOVE_PRIMITIVE_RUNTIME, ExecutionError,), {}) # type: ignore ExecutionError.MOVE_ABORT = type("ExecutionError.MOVE_ABORT", (ExecutionError.MOVE_ABORT, ExecutionError,), {}) # type: ignore -ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION_ERROR = type("ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION_ERROR", (ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION_ERROR, ExecutionError,), {}) # type: ignore +ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION = type("ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION", (ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION, ExecutionError,), {}) # type: ignore ExecutionError.VM_INVARIANT_VIOLATION = type("ExecutionError.VM_INVARIANT_VIOLATION", (ExecutionError.VM_INVARIANT_VIOLATION, ExecutionError,), {}) # type: ignore ExecutionError.FUNCTION_NOT_FOUND = type("ExecutionError.FUNCTION_NOT_FOUND", (ExecutionError.FUNCTION_NOT_FOUND, ExecutionError,), {}) # type: ignore ExecutionError.ARITY_MISMATCH = type("ExecutionError.ARITY_MISMATCH", (ExecutionError.ARITY_MISMATCH, ExecutionError,), {}) # type: ignore ExecutionError.TYPE_ARITY_MISMATCH = type("ExecutionError.TYPE_ARITY_MISMATCH", (ExecutionError.TYPE_ARITY_MISMATCH, ExecutionError,), {}) # type: ignore ExecutionError.NON_ENTRY_FUNCTION_INVOKED = type("ExecutionError.NON_ENTRY_FUNCTION_INVOKED", (ExecutionError.NON_ENTRY_FUNCTION_INVOKED, ExecutionError,), {}) # type: ignore -ExecutionError.COMMAND_ARGUMENT_ERROR = type("ExecutionError.COMMAND_ARGUMENT_ERROR", (ExecutionError.COMMAND_ARGUMENT_ERROR, ExecutionError,), {}) # type: ignore -ExecutionError.TYPE_ARGUMENT_ERROR = type("ExecutionError.TYPE_ARGUMENT_ERROR", (ExecutionError.TYPE_ARGUMENT_ERROR, ExecutionError,), {}) # type: ignore +ExecutionError.COMMAND_ARGUMENT = type("ExecutionError.COMMAND_ARGUMENT", (ExecutionError.COMMAND_ARGUMENT, ExecutionError,), {}) # type: ignore +ExecutionError.TYPE_ARGUMENT = type("ExecutionError.TYPE_ARGUMENT", (ExecutionError.TYPE_ARGUMENT, ExecutionError,), {}) # type: ignore ExecutionError.UNUSED_VALUE_WITHOUT_DROP = type("ExecutionError.UNUSED_VALUE_WITHOUT_DROP", (ExecutionError.UNUSED_VALUE_WITHOUT_DROP, ExecutionError,), {}) # type: ignore ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE = type("ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE", (ExecutionError.INVALID_PUBLIC_FUNCTION_RETURN_TYPE, ExecutionError,), {}) # type: ignore ExecutionError.INVALID_TRANSFER_OBJECT = type("ExecutionError.INVALID_TRANSFER_OBJECT", (ExecutionError.INVALID_TRANSFER_OBJECT, ExecutionError,), {}) # type: ignore ExecutionError.EFFECTS_TOO_LARGE = type("ExecutionError.EFFECTS_TOO_LARGE", (ExecutionError.EFFECTS_TOO_LARGE, ExecutionError,), {}) # type: ignore ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY = type("ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY", (ExecutionError.PUBLISH_UPGRADE_MISSING_DEPENDENCY, ExecutionError,), {}) # type: ignore ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE = type("ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE", (ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE, ExecutionError,), {}) # type: ignore -ExecutionError.PACKAGE_UPGRADE_ERROR = type("ExecutionError.PACKAGE_UPGRADE_ERROR", (ExecutionError.PACKAGE_UPGRADE_ERROR, ExecutionError,), {}) # type: ignore +ExecutionError.PACKAGE_UPGRADE = type("ExecutionError.PACKAGE_UPGRADE", (ExecutionError.PACKAGE_UPGRADE, ExecutionError,), {}) # type: ignore ExecutionError.WRITTEN_OBJECTS_TOO_LARGE = type("ExecutionError.WRITTEN_OBJECTS_TOO_LARGE", (ExecutionError.WRITTEN_OBJECTS_TOO_LARGE, ExecutionError,), {}) # type: ignore ExecutionError.CERTIFICATE_DENIED = type("ExecutionError.CERTIFICATE_DENIED", (ExecutionError.CERTIFICATE_DENIED, ExecutionError,), {}) # type: ignore ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT = type("ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT", (ExecutionError.IOTA_MOVE_VERIFICATION_TIMEOUT, ExecutionError,), {}) # type: ignore @@ -6698,10 +8537,10 @@ def read(buf): return ExecutionError.PUBLISH_ERROR_NON_ZERO_ADDRESS( ) if variant == 11: - return ExecutionError.IOTA_MOVE_VERIFICATION_ERROR( + return ExecutionError.IOTA_MOVE_VERIFICATION( ) if variant == 12: - return ExecutionError.MOVE_PRIMITIVE_RUNTIME_ERROR( + return ExecutionError.MOVE_PRIMITIVE_RUNTIME( _UniffiConverterOptionalTypeMoveLocation.read(buf), ) if variant == 13: @@ -6710,7 +8549,7 @@ def read(buf): _UniffiConverterUInt64.read(buf), ) if variant == 14: - return ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION_ERROR( + return ExecutionError.VM_VERIFICATION_OR_DESERIALIZATION( ) if variant == 15: return ExecutionError.VM_INVARIANT_VIOLATION( @@ -6728,12 +8567,12 @@ def read(buf): return ExecutionError.NON_ENTRY_FUNCTION_INVOKED( ) if variant == 20: - return ExecutionError.COMMAND_ARGUMENT_ERROR( + return ExecutionError.COMMAND_ARGUMENT( _UniffiConverterUInt16.read(buf), _UniffiConverterTypeCommandArgumentError.read(buf), ) if variant == 21: - return ExecutionError.TYPE_ARGUMENT_ERROR( + return ExecutionError.TYPE_ARGUMENT( _UniffiConverterUInt16.read(buf), _UniffiConverterTypeTypeArgumentError.read(buf), ) @@ -6761,7 +8600,7 @@ def read(buf): return ExecutionError.PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE( ) if variant == 28: - return ExecutionError.PACKAGE_UPGRADE_ERROR( + return ExecutionError.PACKAGE_UPGRADE( _UniffiConverterTypePackageUpgradeError.read(buf), ) if variant == 29: @@ -6834,16 +8673,16 @@ def check_lower(value): return if value.is_PUBLISH_ERROR_NON_ZERO_ADDRESS(): return - if value.is_IOTA_MOVE_VERIFICATION_ERROR(): + if value.is_IOTA_MOVE_VERIFICATION(): return - if value.is_MOVE_PRIMITIVE_RUNTIME_ERROR(): + if value.is_MOVE_PRIMITIVE_RUNTIME(): _UniffiConverterOptionalTypeMoveLocation.check_lower(value.location) return if value.is_MOVE_ABORT(): _UniffiConverterTypeMoveLocation.check_lower(value.location) _UniffiConverterUInt64.check_lower(value.code) return - if value.is_VM_VERIFICATION_OR_DESERIALIZATION_ERROR(): + if value.is_VM_VERIFICATION_OR_DESERIALIZATION(): return if value.is_VM_INVARIANT_VIOLATION(): return @@ -6855,11 +8694,11 @@ def check_lower(value): return if value.is_NON_ENTRY_FUNCTION_INVOKED(): return - if value.is_COMMAND_ARGUMENT_ERROR(): + if value.is_COMMAND_ARGUMENT(): _UniffiConverterUInt16.check_lower(value.argument) _UniffiConverterTypeCommandArgumentError.check_lower(value.kind) return - if value.is_TYPE_ARGUMENT_ERROR(): + if value.is_TYPE_ARGUMENT(): _UniffiConverterUInt16.check_lower(value.type_argument) _UniffiConverterTypeTypeArgumentError.check_lower(value.kind) return @@ -6880,7 +8719,7 @@ def check_lower(value): return if value.is_PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE(): return - if value.is_PACKAGE_UPGRADE_ERROR(): + if value.is_PACKAGE_UPGRADE(): _UniffiConverterTypePackageUpgradeError.check_lower(value.kind) return if value.is_WRITTEN_OBJECTS_TOO_LARGE(): @@ -6942,16 +8781,16 @@ def write(value, buf): buf.write_i32(9) if value.is_PUBLISH_ERROR_NON_ZERO_ADDRESS(): buf.write_i32(10) - if value.is_IOTA_MOVE_VERIFICATION_ERROR(): + if value.is_IOTA_MOVE_VERIFICATION(): buf.write_i32(11) - if value.is_MOVE_PRIMITIVE_RUNTIME_ERROR(): + if value.is_MOVE_PRIMITIVE_RUNTIME(): buf.write_i32(12) _UniffiConverterOptionalTypeMoveLocation.write(value.location, buf) if value.is_MOVE_ABORT(): buf.write_i32(13) _UniffiConverterTypeMoveLocation.write(value.location, buf) _UniffiConverterUInt64.write(value.code, buf) - if value.is_VM_VERIFICATION_OR_DESERIALIZATION_ERROR(): + if value.is_VM_VERIFICATION_OR_DESERIALIZATION(): buf.write_i32(14) if value.is_VM_INVARIANT_VIOLATION(): buf.write_i32(15) @@ -6963,11 +8802,11 @@ def write(value, buf): buf.write_i32(18) if value.is_NON_ENTRY_FUNCTION_INVOKED(): buf.write_i32(19) - if value.is_COMMAND_ARGUMENT_ERROR(): + if value.is_COMMAND_ARGUMENT(): buf.write_i32(20) _UniffiConverterUInt16.write(value.argument, buf) _UniffiConverterTypeCommandArgumentError.write(value.kind, buf) - if value.is_TYPE_ARGUMENT_ERROR(): + if value.is_TYPE_ARGUMENT(): buf.write_i32(21) _UniffiConverterUInt16.write(value.type_argument, buf) _UniffiConverterTypeTypeArgumentError.write(value.kind, buf) @@ -6988,7 +8827,7 @@ def write(value, buf): buf.write_i32(26) if value.is_PUBLISH_UPGRADE_DEPENDENCY_DOWNGRADE(): buf.write_i32(27) - if value.is_PACKAGE_UPGRADE_ERROR(): + if value.is_PACKAGE_UPGRADE(): buf.write_i32(28) _UniffiConverterTypePackageUpgradeError.write(value.kind, buf) if value.is_WRITTEN_OBJECTS_TOO_LARGE(): @@ -7824,48 +9663,126 @@ def write(value, buf): -class TransactionBlockKindInput(enum.Enum): - SYSTEM_TX = 0 +class SignatureScheme(enum.Enum): + ED25519 = 0 - PROGRAMMABLE_TX = 1 + SECP256K1 = 1 - GENESIS = 2 + SECP256R1 = 2 - CONSENSUS_COMMIT_PROLOGUE_V1 = 3 + MULTISIG = 3 - AUTHENTICATOR_STATE_UPDATE_V1 = 4 + BLS12381 = 4 - RANDOMNESS_STATE_UPDATE = 5 + ZK_LOGIN = 5 - END_OF_EPOCH_TX = 6 + PASSKEY = 6 -class _UniffiConverterTypeTransactionBlockKindInput(_UniffiConverterRustBuffer): +class _UniffiConverterTypeSignatureScheme(_UniffiConverterRustBuffer): @staticmethod def read(buf): variant = buf.read_i32() if variant == 1: - return TransactionBlockKindInput.SYSTEM_TX + return SignatureScheme.ED25519 if variant == 2: - return TransactionBlockKindInput.PROGRAMMABLE_TX + return SignatureScheme.SECP256K1 if variant == 3: - return TransactionBlockKindInput.GENESIS + return SignatureScheme.SECP256R1 if variant == 4: - return TransactionBlockKindInput.CONSENSUS_COMMIT_PROLOGUE_V1 + return SignatureScheme.MULTISIG if variant == 5: - return TransactionBlockKindInput.AUTHENTICATOR_STATE_UPDATE_V1 + return SignatureScheme.BLS12381 if variant == 6: - return TransactionBlockKindInput.RANDOMNESS_STATE_UPDATE + return SignatureScheme.ZK_LOGIN if variant == 7: - return TransactionBlockKindInput.END_OF_EPOCH_TX + return SignatureScheme.PASSKEY raise InternalError("Raw enum value doesn't match any cases") @staticmethod def check_lower(value): - if value == TransactionBlockKindInput.SYSTEM_TX: + if value == SignatureScheme.ED25519: return - if value == TransactionBlockKindInput.PROGRAMMABLE_TX: + if value == SignatureScheme.SECP256K1: + return + if value == SignatureScheme.SECP256R1: + return + if value == SignatureScheme.MULTISIG: + return + if value == SignatureScheme.BLS12381: + return + if value == SignatureScheme.ZK_LOGIN: + return + if value == SignatureScheme.PASSKEY: + return + raise ValueError(value) + + @staticmethod + def write(value, buf): + if value == SignatureScheme.ED25519: + buf.write_i32(1) + if value == SignatureScheme.SECP256K1: + buf.write_i32(2) + if value == SignatureScheme.SECP256R1: + buf.write_i32(3) + if value == SignatureScheme.MULTISIG: + buf.write_i32(4) + if value == SignatureScheme.BLS12381: + buf.write_i32(5) + if value == SignatureScheme.ZK_LOGIN: + buf.write_i32(6) + if value == SignatureScheme.PASSKEY: + buf.write_i32(7) + + + + + + + +class TransactionBlockKindInput(enum.Enum): + SYSTEM_TX = 0 + + PROGRAMMABLE_TX = 1 + + GENESIS = 2 + + CONSENSUS_COMMIT_PROLOGUE_V1 = 3 + + AUTHENTICATOR_STATE_UPDATE_V1 = 4 + + RANDOMNESS_STATE_UPDATE = 5 + + END_OF_EPOCH_TX = 6 + + + +class _UniffiConverterTypeTransactionBlockKindInput(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return TransactionBlockKindInput.SYSTEM_TX + if variant == 2: + return TransactionBlockKindInput.PROGRAMMABLE_TX + if variant == 3: + return TransactionBlockKindInput.GENESIS + if variant == 4: + return TransactionBlockKindInput.CONSENSUS_COMMIT_PROLOGUE_V1 + if variant == 5: + return TransactionBlockKindInput.AUTHENTICATOR_STATE_UPDATE_V1 + if variant == 6: + return TransactionBlockKindInput.RANDOMNESS_STATE_UPDATE + if variant == 7: + return TransactionBlockKindInput.END_OF_EPOCH_TX + raise InternalError("Raw enum value doesn't match any cases") + + @staticmethod + def check_lower(value): + if value == TransactionBlockKindInput.SYSTEM_TX: + return + if value == TransactionBlockKindInput.PROGRAMMABLE_TX: return if value == TransactionBlockKindInput.GENESIS: return @@ -8567,6 +10484,60 @@ def read(cls, buf): +class _UniffiConverterOptionalTypeEd25519PublicKey(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeEd25519PublicKey.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeEd25519PublicKey.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeEd25519PublicKey.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeEd25519Signature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeEd25519Signature.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeEd25519Signature.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeEd25519Signature.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + class _UniffiConverterOptionalTypeEffectsAuxiliaryDataDigest(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): @@ -8756,11 +10727,11 @@ def read(cls, buf): -class _UniffiConverterOptionalTypeObject(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeMultisigAggregatedSignature(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeObject.check_lower(value) + _UniffiConverterTypeMultisigAggregatedSignature.check_lower(value) @classmethod def write(cls, value, buf): @@ -8769,7 +10740,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeObject.write(value, buf) + _UniffiConverterTypeMultisigAggregatedSignature.write(value, buf) @classmethod def read(cls, buf): @@ -8777,17 +10748,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeObject.read(buf) + return _UniffiConverterTypeMultisigAggregatedSignature.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeObjectId(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeObject(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeObjectId.check_lower(value) + _UniffiConverterTypeObject.check_lower(value) @classmethod def write(cls, value, buf): @@ -8796,7 +10767,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeObjectId.write(value, buf) + _UniffiConverterTypeObject.write(value, buf) @classmethod def read(cls, buf): @@ -8804,17 +10775,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeObjectId.read(buf) + return _UniffiConverterTypeObject.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeProtocolConfigs(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeObjectId(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeProtocolConfigs.check_lower(value) + _UniffiConverterTypeObjectId.check_lower(value) @classmethod def write(cls, value, buf): @@ -8823,7 +10794,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeProtocolConfigs.write(value, buf) + _UniffiConverterTypeObjectId.write(value, buf) @classmethod def read(cls, buf): @@ -8831,17 +10802,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeProtocolConfigs.read(buf) + return _UniffiConverterTypeObjectId.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeTransactionEffects(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypePasskeyAuthenticator(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeTransactionEffects.check_lower(value) + _UniffiConverterTypePasskeyAuthenticator.check_lower(value) @classmethod def write(cls, value, buf): @@ -8850,7 +10821,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeTransactionEffects.write(value, buf) + _UniffiConverterTypePasskeyAuthenticator.write(value, buf) @classmethod def read(cls, buf): @@ -8858,17 +10829,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeTransactionEffects.read(buf) + return _UniffiConverterTypePasskeyAuthenticator.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeTransactionEventsDigest(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeProtocolConfigs(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeTransactionEventsDigest.check_lower(value) + _UniffiConverterTypeProtocolConfigs.check_lower(value) @classmethod def write(cls, value, buf): @@ -8877,7 +10848,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeTransactionEventsDigest.write(value, buf) + _UniffiConverterTypeProtocolConfigs.write(value, buf) @classmethod def read(cls, buf): @@ -8885,17 +10856,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeTransactionEventsDigest.read(buf) + return _UniffiConverterTypeProtocolConfigs.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeCheckpointSummary(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeSecp256k1PublicKey(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeCheckpointSummary.check_lower(value) + _UniffiConverterTypeSecp256k1PublicKey.check_lower(value) @classmethod def write(cls, value, buf): @@ -8904,7 +10875,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeCheckpointSummary.write(value, buf) + _UniffiConverterTypeSecp256k1PublicKey.write(value, buf) @classmethod def read(cls, buf): @@ -8912,17 +10883,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeCheckpointSummary.read(buf) + return _UniffiConverterTypeSecp256k1PublicKey.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeDynamicFieldOutput(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeSecp256k1Signature(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeDynamicFieldOutput.check_lower(value) + _UniffiConverterTypeSecp256k1Signature.check_lower(value) @classmethod def write(cls, value, buf): @@ -8931,7 +10902,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeDynamicFieldOutput.write(value, buf) + _UniffiConverterTypeSecp256k1Signature.write(value, buf) @classmethod def read(cls, buf): @@ -8939,17 +10910,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeDynamicFieldOutput.read(buf) + return _UniffiConverterTypeSecp256k1Signature.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeDynamicFieldValue(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeSecp256r1PublicKey(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeDynamicFieldValue.check_lower(value) + _UniffiConverterTypeSecp256r1PublicKey.check_lower(value) @classmethod def write(cls, value, buf): @@ -8958,7 +10929,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeDynamicFieldValue.write(value, buf) + _UniffiConverterTypeSecp256r1PublicKey.write(value, buf) @classmethod def read(cls, buf): @@ -8966,17 +10937,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeDynamicFieldValue.read(buf) + return _UniffiConverterTypeSecp256r1PublicKey.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeEndOfEpochData(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeSecp256r1Signature(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeEndOfEpochData.check_lower(value) + _UniffiConverterTypeSecp256r1Signature.check_lower(value) @classmethod def write(cls, value, buf): @@ -8985,7 +10956,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeEndOfEpochData.write(value, buf) + _UniffiConverterTypeSecp256r1Signature.write(value, buf) @classmethod def read(cls, buf): @@ -8993,17 +10964,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeEndOfEpochData.read(buf) + return _UniffiConverterTypeSecp256r1Signature.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeEventFilter(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeSimpleSignature(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeEventFilter.check_lower(value) + _UniffiConverterTypeSimpleSignature.check_lower(value) @classmethod def write(cls, value, buf): @@ -9012,7 +10983,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeEventFilter.write(value, buf) + _UniffiConverterTypeSimpleSignature.write(value, buf) @classmethod def read(cls, buf): @@ -9020,17 +10991,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeEventFilter.read(buf) + return _UniffiConverterTypeSimpleSignature.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeMoveLocation(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeTransactionEffects(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeMoveLocation.check_lower(value) + _UniffiConverterTypeTransactionEffects.check_lower(value) @classmethod def write(cls, value, buf): @@ -9039,7 +11010,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeMoveLocation.write(value, buf) + _UniffiConverterTypeTransactionEffects.write(value, buf) @classmethod def read(cls, buf): @@ -9047,17 +11018,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeMoveLocation.read(buf) + return _UniffiConverterTypeTransactionEffects.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeObjectFilter(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeTransactionEventsDigest(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeObjectFilter.check_lower(value) + _UniffiConverterTypeTransactionEventsDigest.check_lower(value) @classmethod def write(cls, value, buf): @@ -9066,7 +11037,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeObjectFilter.write(value, buf) + _UniffiConverterTypeTransactionEventsDigest.write(value, buf) @classmethod def read(cls, buf): @@ -9074,17 +11045,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeObjectFilter.read(buf) + return _UniffiConverterTypeTransactionEventsDigest.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeSignedTransaction(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeZkLoginAuthenticator(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeSignedTransaction.check_lower(value) + _UniffiConverterTypeZkLoginAuthenticator.check_lower(value) @classmethod def write(cls, value, buf): @@ -9093,7 +11064,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeSignedTransaction.write(value, buf) + _UniffiConverterTypeZkLoginAuthenticator.write(value, buf) @classmethod def read(cls, buf): @@ -9101,17 +11072,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeSignedTransaction.read(buf) + return _UniffiConverterTypeZkLoginAuthenticator.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeTransactionDataEffects(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeZkLoginPublicIdentifier(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeTransactionDataEffects.check_lower(value) + _UniffiConverterTypeZkLoginPublicIdentifier.check_lower(value) @classmethod def write(cls, value, buf): @@ -9120,7 +11091,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeTransactionDataEffects.write(value, buf) + _UniffiConverterTypeZkLoginPublicIdentifier.write(value, buf) @classmethod def read(cls, buf): @@ -9128,17 +11099,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeTransactionDataEffects.read(buf) + return _UniffiConverterTypeZkLoginPublicIdentifier.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeTransactionsFilter(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeCheckpointSummary(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeTransactionsFilter.check_lower(value) + _UniffiConverterTypeCheckpointSummary.check_lower(value) @classmethod def write(cls, value, buf): @@ -9147,7 +11118,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeTransactionsFilter.write(value, buf) + _UniffiConverterTypeCheckpointSummary.write(value, buf) @classmethod def read(cls, buf): @@ -9155,17 +11126,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeTransactionsFilter.read(buf) + return _UniffiConverterTypeCheckpointSummary.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeValidatorCredentials(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeDynamicFieldOutput(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeValidatorCredentials.check_lower(value) + _UniffiConverterTypeDynamicFieldOutput.check_lower(value) @classmethod def write(cls, value, buf): @@ -9174,7 +11145,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeValidatorCredentials.write(value, buf) + _UniffiConverterTypeDynamicFieldOutput.write(value, buf) @classmethod def read(cls, buf): @@ -9182,17 +11153,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeValidatorCredentials.read(buf) + return _UniffiConverterTypeDynamicFieldOutput.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeTransactionBlockKindInput(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeDynamicFieldValue(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeTransactionBlockKindInput.check_lower(value) + _UniffiConverterTypeDynamicFieldValue.check_lower(value) @classmethod def write(cls, value, buf): @@ -9201,7 +11172,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeTransactionBlockKindInput.write(value, buf) + _UniffiConverterTypeDynamicFieldValue.write(value, buf) @classmethod def read(cls, buf): @@ -9209,17 +11180,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeTransactionBlockKindInput.read(buf) + return _UniffiConverterTypeDynamicFieldValue.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalSequenceString(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeEndOfEpochData(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterSequenceString.check_lower(value) + _UniffiConverterTypeEndOfEpochData.check_lower(value) @classmethod def write(cls, value, buf): @@ -9228,7 +11199,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterSequenceString.write(value, buf) + _UniffiConverterTypeEndOfEpochData.write(value, buf) @classmethod def read(cls, buf): @@ -9236,17 +11207,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterSequenceString.read(buf) + return _UniffiConverterTypeEndOfEpochData.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalSequenceTypeObjectId(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeEventFilter(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterSequenceTypeObjectId.check_lower(value) + _UniffiConverterTypeEventFilter.check_lower(value) @classmethod def write(cls, value, buf): @@ -9255,7 +11226,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterSequenceTypeObjectId.write(value, buf) + _UniffiConverterTypeEventFilter.write(value, buf) @classmethod def read(cls, buf): @@ -9263,17 +11234,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterSequenceTypeObjectId.read(buf) + return _UniffiConverterTypeEventFilter.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalSequenceTypeObjectRef(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeMoveLocation(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterSequenceTypeObjectRef.check_lower(value) + _UniffiConverterTypeMoveLocation.check_lower(value) @classmethod def write(cls, value, buf): @@ -9282,7 +11253,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterSequenceTypeObjectRef.write(value, buf) + _UniffiConverterTypeMoveLocation.write(value, buf) @classmethod def read(cls, buf): @@ -9290,17 +11261,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterSequenceTypeObjectRef.read(buf) + return _UniffiConverterTypeMoveLocation.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeBase64(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeObjectFilter(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeBase64.check_lower(value) + _UniffiConverterTypeObjectFilter.check_lower(value) @classmethod def write(cls, value, buf): @@ -9309,7 +11280,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeBase64.write(value, buf) + _UniffiConverterTypeObjectFilter.write(value, buf) @classmethod def read(cls, buf): @@ -9317,17 +11288,17 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeBase64.read(buf) + return _UniffiConverterTypeObjectFilter.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeValue(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeSignedTransaction(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeValue.check_lower(value) + _UniffiConverterTypeSignedTransaction.check_lower(value) @classmethod def write(cls, value, buf): @@ -9336,7 +11307,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeValue.write(value, buf) + _UniffiConverterTypeSignedTransaction.write(value, buf) @classmethod def read(cls, buf): @@ -9344,17 +11315,260 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeValue.read(buf) + return _UniffiConverterTypeSignedTransaction.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterSequenceString(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeTransactionDataEffects(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): - for item in value: - _UniffiConverterString.check_lower(item) + if value is not None: + _UniffiConverterTypeTransactionDataEffects.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeTransactionDataEffects.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeTransactionDataEffects.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeTransactionsFilter(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeTransactionsFilter.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeTransactionsFilter.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeTransactionsFilter.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeValidatorCredentials(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeValidatorCredentials.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeValidatorCredentials.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeValidatorCredentials.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeTransactionBlockKindInput(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeTransactionBlockKindInput.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeTransactionBlockKindInput.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeTransactionBlockKindInput.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalSequenceString(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterSequenceString.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterSequenceString.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterSequenceString.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalSequenceTypeObjectId(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterSequenceTypeObjectId.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterSequenceTypeObjectId.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterSequenceTypeObjectId.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalSequenceTypeObjectRef(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterSequenceTypeObjectRef.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterSequenceTypeObjectRef.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterSequenceTypeObjectRef.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeBase64(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeBase64.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeBase64.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeBase64.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeValue(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeValue.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeValue.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeValue.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterSequenceString(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiConverterString.check_lower(item) @classmethod def write(cls, value, buf): @@ -9525,18 +11739,18 @@ def read(cls, buf): -class _UniffiConverterSequenceTypeObject(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeMultisigMember(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeObject.check_lower(item) + _UniffiConverterTypeMultisigMember.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeObject.write(item, buf) + _UniffiConverterTypeMultisigMember.write(item, buf) @classmethod def read(cls, buf): @@ -9545,23 +11759,23 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeObject.read(buf) for i in range(count) + _UniffiConverterTypeMultisigMember.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeObjectId(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeMultisigMemberSignature(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeObjectId.check_lower(item) + _UniffiConverterTypeMultisigMemberSignature.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeObjectId.write(item, buf) + _UniffiConverterTypeMultisigMemberSignature.write(item, buf) @classmethod def read(cls, buf): @@ -9570,16 +11784,66 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeObjectId.read(buf) for i in range(count) + _UniffiConverterTypeMultisigMemberSignature.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeObjectRef(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeObject(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeObjectRef.check_lower(item) + _UniffiConverterTypeObject.check_lower(item) + + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiConverterTypeObject.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiConverterTypeObject.read(buf) for i in range(count) + ] + + + +class _UniffiConverterSequenceTypeObjectId(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiConverterTypeObjectId.check_lower(item) + + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiConverterTypeObjectId.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiConverterTypeObjectId.read(buf) for i in range(count) + ] + + + +class _UniffiConverterSequenceTypeObjectRef(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiConverterTypeObjectRef.check_lower(item) @classmethod def write(cls, value, buf): @@ -10448,66 +12712,45 @@ def read(cls, buf: _UniffiRustBuffer): @classmethod def write(cls, value: Bls12381PublicKeyProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ChangeEpochProtocol(typing.Protocol): - pass -# ChangeEpoch is a Rust-only trait - it's a wrapper around a Rust implementation. -class ChangeEpoch(): - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") - - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepoch, pointer) +class Bls12381SignatureProtocol(typing.Protocol): + """ + A bls12381 min-sig public key. - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepoch, self._pointer) + # BCS - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + The BCS serialized form for this type is defined by the following ABNF: + ```text + bls-public-key = %x60 96OCTECT + ``` + Due to historical reasons, even though a min-sig `Bls12381PublicKey` has a + fixed-length of 96, IOTA's binary representation of a min-sig + `Bls12381PublicKey` is prefixed with its length meaning its serialized + binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. + """ -class _UniffiConverterTypeChangeEpoch: + def to_bytes(self, ): + raise NotImplementedError +# Bls12381Signature is a Rust-only trait - it's a wrapper around a Rust implementation. +class Bls12381Signature(): + """ + A bls12381 min-sig public key. - @staticmethod - def lift(value: int): - return ChangeEpoch._make_instance_(value) + # BCS - @staticmethod - def check_lower(value: ChangeEpoch): - if not isinstance(value, ChangeEpoch): - raise TypeError("Expected ChangeEpoch instance, {} found".format(type(value).__name__)) + The BCS serialized form for this type is defined by the following ABNF: - @staticmethod - def lower(value: ChangeEpochProtocol): - if not isinstance(value, ChangeEpoch): - raise TypeError("Expected ChangeEpoch instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + ```text + bls-public-key = %x60 96OCTECT + ``` - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + Due to historical reasons, even though a min-sig `Bls12381PublicKey` has a + fixed-length of 96, IOTA's binary representation of a min-sig + `Bls12381PublicKey` is prefixed with its length meaning its serialized + binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. + """ - @classmethod - def write(cls, value: ChangeEpochProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ChangeEpochV2Protocol(typing.Protocol): - pass -# ChangeEpochV2 is a Rust-only trait - it's a wrapper around a Rust implementation. -class ChangeEpochV2(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -10517,10 +12760,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepochv2, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bls12381signature, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepochv2, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bls12381signature, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10530,24 +12773,57 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + + @classmethod + def from_str(cls, s: "str"): + _UniffiConverterString.check_lower(s) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_from_str, + _UniffiConverterString.lower(s)) + return cls._make_instance_(pointer) + + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381signature_generate,) + return cls._make_instance_(pointer) + + + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bls12381signature_to_bytes,self._uniffi_clone_pointer(),) + ) -class _UniffiConverterTypeChangeEpochV2: + + + +class _UniffiConverterTypeBls12381Signature: @staticmethod def lift(value: int): - return ChangeEpochV2._make_instance_(value) + return Bls12381Signature._make_instance_(value) @staticmethod - def check_lower(value: ChangeEpochV2): - if not isinstance(value, ChangeEpochV2): - raise TypeError("Expected ChangeEpochV2 instance, {} found".format(type(value).__name__)) + def check_lower(value: Bls12381Signature): + if not isinstance(value, Bls12381Signature): + raise TypeError("Expected Bls12381Signature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ChangeEpochV2Protocol): - if not isinstance(value, ChangeEpochV2): - raise TypeError("Expected ChangeEpochV2 instance, {} found".format(type(value).__name__)) + def lower(value: Bls12381SignatureProtocol): + if not isinstance(value, Bls12381Signature): + raise TypeError("Expected Bls12381Signature instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10558,15 +12834,47 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ChangeEpochV2Protocol, buf: _UniffiRustBuffer): + def write(cls, value: Bls12381SignatureProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CheckpointCommitmentProtocol(typing.Protocol): - def as_ecmh_live_object_set_digest(self, ): +class Bn254FieldElementProtocol(typing.Protocol): + """ + A point on the BN254 elliptic curve. + + This is a 32-byte, or 256-bit, value that is generally represented as + radix10 when a human-readable display format is needed, and is represented + as a 32-byte big-endian value while in memory. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + bn254-field-element = *DIGIT ; which is then interpreted as a radix10 encoded 32-byte value + ``` + """ + + def padded(self, ): raise NotImplementedError - def is_ecmh_live_object_set(self, ): + def unpadded(self, ): raise NotImplementedError -# CheckpointCommitment is a Rust-only trait - it's a wrapper around a Rust implementation. -class CheckpointCommitment(): +# Bn254FieldElement is a Rust-only trait - it's a wrapper around a Rust implementation. +class Bn254FieldElement(): + """ + A point on the BN254 elliptic curve. + + This is a 32-byte, or 256-bit, value that is generally represented as + radix10 when a human-readable display format is needed, and is represented + as a 32-byte big-endian value while in memory. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + bn254-field-element = *DIGIT ; which is then interpreted as a radix10 encoded 32-byte value + ``` + """ + _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -10576,10 +12884,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcommitment, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_bn254fieldelement, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_bn254fieldelement, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10589,20 +12897,47 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + + @classmethod + def from_str(cls, s: "str"): + _UniffiConverterString.check_lower(s) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str, + _UniffiConverterString.lower(s)) + return cls._make_instance_(pointer) + + @classmethod + def from_str_radix_10(cls, s: "str"): + _UniffiConverterString.check_lower(s) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bn254fieldelement_from_str_radix_10, + _UniffiConverterString.lower(s)) + return cls._make_instance_(pointer) - def as_ecmh_live_object_set_digest(self, ) -> "Digest": - return _UniffiConverterTypeDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest,self._uniffi_clone_pointer(),) + + def padded(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_padded,self._uniffi_clone_pointer(),) ) - def is_ecmh_live_object_set(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set,self._uniffi_clone_pointer(),) + def unpadded(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_bn254fieldelement_unpadded,self._uniffi_clone_pointer(),) ) @@ -10610,21 +12945,21 @@ def is_ecmh_live_object_set(self, ) -> "bool": -class _UniffiConverterTypeCheckpointCommitment: +class _UniffiConverterTypeBn254FieldElement: @staticmethod def lift(value: int): - return CheckpointCommitment._make_instance_(value) + return Bn254FieldElement._make_instance_(value) @staticmethod - def check_lower(value: CheckpointCommitment): - if not isinstance(value, CheckpointCommitment): - raise TypeError("Expected CheckpointCommitment instance, {} found".format(type(value).__name__)) + def check_lower(value: Bn254FieldElement): + if not isinstance(value, Bn254FieldElement): + raise TypeError("Expected Bn254FieldElement instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CheckpointCommitmentProtocol): - if not isinstance(value, CheckpointCommitment): - raise TypeError("Expected CheckpointCommitment instance, {} found".format(type(value).__name__)) + def lower(value: Bn254FieldElementProtocol): + if not isinstance(value, Bn254FieldElement): + raise TypeError("Expected Bn254FieldElement instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10635,12 +12970,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: CheckpointCommitmentProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Bn254FieldElementProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CheckpointContentsDigestProtocol(typing.Protocol): +class ChangeEpochProtocol(typing.Protocol): pass -# CheckpointContentsDigest is a Rust-only trait - it's a wrapper around a Rust implementation. -class CheckpointContentsDigest(): +# ChangeEpoch is a Rust-only trait - it's a wrapper around a Rust implementation. +class ChangeEpoch(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -10650,10 +12985,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcontentsdigest, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepoch, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcontentsdigest, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepoch, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10666,21 +13001,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeCheckpointContentsDigest: +class _UniffiConverterTypeChangeEpoch: @staticmethod def lift(value: int): - return CheckpointContentsDigest._make_instance_(value) + return ChangeEpoch._make_instance_(value) @staticmethod - def check_lower(value: CheckpointContentsDigest): - if not isinstance(value, CheckpointContentsDigest): - raise TypeError("Expected CheckpointContentsDigest instance, {} found".format(type(value).__name__)) + def check_lower(value: ChangeEpoch): + if not isinstance(value, ChangeEpoch): + raise TypeError("Expected ChangeEpoch instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CheckpointContentsDigestProtocol): - if not isinstance(value, CheckpointContentsDigest): - raise TypeError("Expected CheckpointContentsDigest instance, {} found".format(type(value).__name__)) + def lower(value: ChangeEpochProtocol): + if not isinstance(value, ChangeEpoch): + raise TypeError("Expected ChangeEpoch instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10691,12 +13026,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: CheckpointContentsDigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ChangeEpochProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CheckpointDigestProtocol(typing.Protocol): +class ChangeEpochV2Protocol(typing.Protocol): pass -# CheckpointDigest is a Rust-only trait - it's a wrapper around a Rust implementation. -class CheckpointDigest(): +# ChangeEpochV2 is a Rust-only trait - it's a wrapper around a Rust implementation. +class ChangeEpochV2(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -10706,10 +13041,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointdigest, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_changeepochv2, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointdigest, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_changeepochv2, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10722,21 +13057,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeCheckpointDigest: +class _UniffiConverterTypeChangeEpochV2: @staticmethod def lift(value: int): - return CheckpointDigest._make_instance_(value) + return ChangeEpochV2._make_instance_(value) @staticmethod - def check_lower(value: CheckpointDigest): - if not isinstance(value, CheckpointDigest): - raise TypeError("Expected CheckpointDigest instance, {} found".format(type(value).__name__)) + def check_lower(value: ChangeEpochV2): + if not isinstance(value, ChangeEpochV2): + raise TypeError("Expected ChangeEpochV2 instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CheckpointDigestProtocol): - if not isinstance(value, CheckpointDigest): - raise TypeError("Expected CheckpointDigest instance, {} found".format(type(value).__name__)) + def lower(value: ChangeEpochV2Protocol): + if not isinstance(value, ChangeEpochV2): + raise TypeError("Expected ChangeEpochV2 instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10747,17 +13082,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: CheckpointDigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ChangeEpochV2Protocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CoinProtocol(typing.Protocol): - def balance(self, ): - raise NotImplementedError - def coin_type(self, ): +class CheckpointCommitmentProtocol(typing.Protocol): + def as_ecmh_live_object_set_digest(self, ): raise NotImplementedError - def id(self, ): + def is_ecmh_live_object_set(self, ): raise NotImplementedError -# Coin is a Rust-only trait - it's a wrapper around a Rust implementation. -class Coin(): +# CheckpointCommitment is a Rust-only trait - it's a wrapper around a Rust implementation. +class CheckpointCommitment(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -10767,10 +13100,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_coin, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcommitment, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coin, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcommitment, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10780,38 +13113,20 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst - @classmethod - def try_from_object(cls, object: "Object"): - _UniffiConverterTypeObject.check_lower(object) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object, - _UniffiConverterTypeObject.lower(object)) - return cls._make_instance_(pointer) - - - - def balance(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_balance,self._uniffi_clone_pointer(),) - ) - - - - def coin_type(self, ) -> "TypeTag": - return _UniffiConverterTypeTypeTag.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_coin_type,self._uniffi_clone_pointer(),) + def as_ecmh_live_object_set_digest(self, ) -> "Digest": + return _UniffiConverterTypeDigest.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_as_ecmh_live_object_set_digest,self._uniffi_clone_pointer(),) ) - def id(self, ) -> "ObjectId": - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_id,self._uniffi_clone_pointer(),) + def is_ecmh_live_object_set(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set,self._uniffi_clone_pointer(),) ) @@ -10819,21 +13134,21 @@ def id(self, ) -> "ObjectId": -class _UniffiConverterTypeCoin: +class _UniffiConverterTypeCheckpointCommitment: @staticmethod def lift(value: int): - return Coin._make_instance_(value) + return CheckpointCommitment._make_instance_(value) @staticmethod - def check_lower(value: Coin): - if not isinstance(value, Coin): - raise TypeError("Expected Coin instance, {} found".format(type(value).__name__)) + def check_lower(value: CheckpointCommitment): + if not isinstance(value, CheckpointCommitment): + raise TypeError("Expected CheckpointCommitment instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CoinProtocol): - if not isinstance(value, Coin): - raise TypeError("Expected Coin instance, {} found".format(type(value).__name__)) + def lower(value: CheckpointCommitmentProtocol): + if not isinstance(value, CheckpointCommitment): + raise TypeError("Expected CheckpointCommitment instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10844,12 +13159,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: CoinProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CheckpointCommitmentProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CoinMetadataProtocol(typing.Protocol): - pass -# CoinMetadata is a Rust-only trait - it's a wrapper around a Rust implementation. -class CoinMetadata(): +class CheckpointContentsDigestProtocol(typing.Protocol): + def to_base58(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError +# CheckpointContentsDigest is a Rust-only trait - it's a wrapper around a Rust implementation. +class CheckpointContentsDigest(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -10859,10 +13177,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_coinmetadata, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointcontentsdigest, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coinmetadata, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointcontentsdigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10872,24 +13190,66 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_base58(cls, base58: "str"): + _UniffiConverterString.check_lower(base58) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontentsdigest_from_base58, + _UniffiConverterString.lower(base58)) + return cls._make_instance_(pointer) + + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontentsdigest_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointcontentsdigest_generate,) + return cls._make_instance_(pointer) -class _UniffiConverterTypeCoinMetadata: + def to_base58(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontentsdigest_to_base58,self._uniffi_clone_pointer(),) + ) + + + + + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcontentsdigest_to_bytes,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeCheckpointContentsDigest: @staticmethod def lift(value: int): - return CoinMetadata._make_instance_(value) + return CheckpointContentsDigest._make_instance_(value) @staticmethod - def check_lower(value: CoinMetadata): - if not isinstance(value, CoinMetadata): - raise TypeError("Expected CoinMetadata instance, {} found".format(type(value).__name__)) + def check_lower(value: CheckpointContentsDigest): + if not isinstance(value, CheckpointContentsDigest): + raise TypeError("Expected CheckpointContentsDigest instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CoinMetadataProtocol): - if not isinstance(value, CoinMetadata): - raise TypeError("Expected CoinMetadata instance, {} found".format(type(value).__name__)) + def lower(value: CheckpointContentsDigestProtocol): + if not isinstance(value, CheckpointContentsDigest): + raise TypeError("Expected CheckpointContentsDigest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10900,12 +13260,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: CoinMetadataProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CheckpointContentsDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ConsensusCommitDigestProtocol(typing.Protocol): - pass -# ConsensusCommitDigest is a Rust-only trait - it's a wrapper around a Rust implementation. -class ConsensusCommitDigest(): +class CheckpointDigestProtocol(typing.Protocol): + def to_base58(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError +# CheckpointDigest is a Rust-only trait - it's a wrapper around a Rust implementation. +class CheckpointDigest(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -10915,10 +13278,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitdigest, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointdigest, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitdigest, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointdigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10928,24 +13291,66 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_base58(cls, base58: "str"): + _UniffiConverterString.check_lower(base58) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointdigest_from_base58, + _UniffiConverterString.lower(base58)) + return cls._make_instance_(pointer) + + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointdigest_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_checkpointdigest_generate,) + return cls._make_instance_(pointer) -class _UniffiConverterTypeConsensusCommitDigest: + def to_base58(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointdigest_to_base58,self._uniffi_clone_pointer(),) + ) + + + + + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointdigest_to_bytes,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeCheckpointDigest: @staticmethod def lift(value: int): - return ConsensusCommitDigest._make_instance_(value) + return CheckpointDigest._make_instance_(value) @staticmethod - def check_lower(value: ConsensusCommitDigest): - if not isinstance(value, ConsensusCommitDigest): - raise TypeError("Expected ConsensusCommitDigest instance, {} found".format(type(value).__name__)) + def check_lower(value: CheckpointDigest): + if not isinstance(value, CheckpointDigest): + raise TypeError("Expected CheckpointDigest instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ConsensusCommitDigestProtocol): - if not isinstance(value, ConsensusCommitDigest): - raise TypeError("Expected ConsensusCommitDigest instance, {} found".format(type(value).__name__)) + def lower(value: CheckpointDigestProtocol): + if not isinstance(value, CheckpointDigest): + raise TypeError("Expected CheckpointDigest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10956,115 +13361,63 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ConsensusCommitDigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CheckpointDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ConsensusCommitPrologueV1Protocol(typing.Protocol): - pass -# ConsensusCommitPrologueV1 is a Rust-only trait - it's a wrapper around a Rust implementation. -class ConsensusCommitPrologueV1(): - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") +class CircomG1Protocol(typing.Protocol): + """ + A G1 point - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1, pointer) + This represents the canonical decimal representation of the projective + coordinates in Fq. - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1, self._pointer) + # BCS - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst - - - -class _UniffiConverterTypeConsensusCommitPrologueV1: - - @staticmethod - def lift(value: int): - return ConsensusCommitPrologueV1._make_instance_(value) - - @staticmethod - def check_lower(value: ConsensusCommitPrologueV1): - if not isinstance(value, ConsensusCommitPrologueV1): - raise TypeError("Expected ConsensusCommitPrologueV1 instance, {} found".format(type(value).__name__)) - - @staticmethod - def lower(value: ConsensusCommitPrologueV1Protocol): - if not isinstance(value, ConsensusCommitPrologueV1): - raise TypeError("Expected ConsensusCommitPrologueV1 instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - - @classmethod - def write(cls, value: ConsensusCommitPrologueV1Protocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class DigestProtocol(typing.Protocol): - """ - A 32-byte Blake2b256 hash output. - - # BCS - - A `Digest`'s BCS serialized form is defined by the following: + The BCS serialized form for this type is defined by the following ABNF: ```text - digest = %x20 32OCTET + circom-g1 = %x03 3(bn254-field-element) ``` - - Due to historical reasons, even though a `Digest` has a fixed-length of 32, - IOTA's binary representation of a `Digest` is prefixed with its length - meaning its serialized binary form (in bcs) is 33 bytes long vs a more - compact 32 bytes. """ pass -# Digest is a Rust-only trait - it's a wrapper around a Rust implementation. -class Digest(): +# CircomG1 is a Rust-only trait - it's a wrapper around a Rust implementation. +class CircomG1(): """ - A 32-byte Blake2b256 hash output. + A G1 point + + This represents the canonical decimal representation of the projective + coordinates in Fq. # BCS - A `Digest`'s BCS serialized form is defined by the following: + The BCS serialized form for this type is defined by the following ABNF: ```text - digest = %x20 32OCTET + circom-g1 = %x03 3(bn254-field-element) ``` - - Due to historical reasons, even though a `Digest` has a fixed-length of 32, - IOTA's binary representation of a `Digest` is prefixed with its length - meaning its serialized binary form (in bcs) is 33 bytes long vs a more - compact 32 bytes. """ _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def __init__(self, el_0: "Bn254FieldElement",el_1: "Bn254FieldElement",el_2: "Bn254FieldElement"): + _UniffiConverterTypeBn254FieldElement.check_lower(el_0) + + _UniffiConverterTypeBn254FieldElement.check_lower(el_1) + + _UniffiConverterTypeBn254FieldElement.check_lower(el_2) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg1_new, + _UniffiConverterTypeBn254FieldElement.lower(el_0), + _UniffiConverterTypeBn254FieldElement.lower(el_1), + _UniffiConverterTypeBn254FieldElement.lower(el_2)) def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_digest, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg1, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_digest, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg1, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11077,21 +13430,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeDigest: +class _UniffiConverterTypeCircomG1: @staticmethod def lift(value: int): - return Digest._make_instance_(value) + return CircomG1._make_instance_(value) @staticmethod - def check_lower(value: Digest): - if not isinstance(value, Digest): - raise TypeError("Expected Digest instance, {} found".format(type(value).__name__)) + def check_lower(value: CircomG1): + if not isinstance(value, CircomG1): + raise TypeError("Expected CircomG1 instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: DigestProtocol): - if not isinstance(value, Digest): - raise TypeError("Expected Digest instance, {} found".format(type(value).__name__)) + def lower(value: CircomG1Protocol): + if not isinstance(value, CircomG1): + raise TypeError("Expected CircomG1 instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11102,25 +13455,72 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: DigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CircomG1Protocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class DryRunResultProtocol(typing.Protocol): +class CircomG2Protocol(typing.Protocol): + """ + A G2 point + + This represents the canonical decimal representation of the coefficients of + the projective coordinates in Fq2. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + circom-g2 = %x03 3(%x02 2(bn254-field-element)) + ``` + """ + pass -# DryRunResult is a Rust-only trait - it's a wrapper around a Rust implementation. -class DryRunResult(): +# CircomG2 is a Rust-only trait - it's a wrapper around a Rust implementation. +class CircomG2(): + """ + A G2 point + + This represents the canonical decimal representation of the coefficients of + the projective coordinates in Fq2. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + circom-g2 = %x03 3(%x02 2(bn254-field-element)) + ``` + """ + _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def __init__(self, el_0_0: "Bn254FieldElement",el_0_1: "Bn254FieldElement",el_1_0: "Bn254FieldElement",el_1_1: "Bn254FieldElement",el_2_0: "Bn254FieldElement",el_2_1: "Bn254FieldElement"): + _UniffiConverterTypeBn254FieldElement.check_lower(el_0_0) + + _UniffiConverterTypeBn254FieldElement.check_lower(el_0_1) + + _UniffiConverterTypeBn254FieldElement.check_lower(el_1_0) + + _UniffiConverterTypeBn254FieldElement.check_lower(el_1_1) + + _UniffiConverterTypeBn254FieldElement.check_lower(el_2_0) + + _UniffiConverterTypeBn254FieldElement.check_lower(el_2_1) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_circomg2_new, + _UniffiConverterTypeBn254FieldElement.lower(el_0_0), + _UniffiConverterTypeBn254FieldElement.lower(el_0_1), + _UniffiConverterTypeBn254FieldElement.lower(el_1_0), + _UniffiConverterTypeBn254FieldElement.lower(el_1_1), + _UniffiConverterTypeBn254FieldElement.lower(el_2_0), + _UniffiConverterTypeBn254FieldElement.lower(el_2_1)) def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_dryrunresult, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_circomg2, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_dryrunresult, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_circomg2, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11133,21 +13533,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeDryRunResult: +class _UniffiConverterTypeCircomG2: @staticmethod def lift(value: int): - return DryRunResult._make_instance_(value) + return CircomG2._make_instance_(value) @staticmethod - def check_lower(value: DryRunResult): - if not isinstance(value, DryRunResult): - raise TypeError("Expected DryRunResult instance, {} found".format(type(value).__name__)) + def check_lower(value: CircomG2): + if not isinstance(value, CircomG2): + raise TypeError("Expected CircomG2 instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: DryRunResultProtocol): - if not isinstance(value, DryRunResult): - raise TypeError("Expected DryRunResult instance, {} found".format(type(value).__name__)) + def lower(value: CircomG2Protocol): + if not isinstance(value, CircomG2): + raise TypeError("Expected CircomG2 instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11158,37 +13558,17 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: DryRunResultProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CircomG2Protocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Ed25519PublicKeyProtocol(typing.Protocol): - """ - An ed25519 public key. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - ed25519-public-key = 32OCTECT - ``` - """ - - def to_bytes(self, ): +class CoinProtocol(typing.Protocol): + def balance(self, ): raise NotImplementedError -# Ed25519PublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Ed25519PublicKey(): - """ - An ed25519 public key. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - ed25519-public-key = 32OCTECT - ``` - """ - + def coin_type(self, ): + raise NotImplementedError + def id(self, ): + raise NotImplementedError +# Coin is a Rust-only trait - it's a wrapper around a Rust implementation. +class Coin(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -11198,10 +13578,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519publickey, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_coin, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519publickey, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coin, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11212,34 +13592,37 @@ def _make_instance_(cls, pointer): inst._pointer = pointer return inst @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) + def try_from_object(cls, object: "Object"): + _UniffiConverterTypeObject.check_lower(object) # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes, - _UniffiConverterBytes.lower(bytes)) + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object, + _UniffiConverterTypeObject.lower(object)) return cls._make_instance_(pointer) - @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str, - _UniffiConverterString.lower(s)) - return cls._make_instance_(pointer) - @classmethod - def generate(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate,) - return cls._make_instance_(pointer) + def balance(self, ) -> "int": + return _UniffiConverterUInt64.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_balance,self._uniffi_clone_pointer(),) + ) - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes,self._uniffi_clone_pointer(),) + + + + def coin_type(self, ) -> "TypeTag": + return _UniffiConverterTypeTypeTag.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_coin_type,self._uniffi_clone_pointer(),) + ) + + + + + + def id(self, ) -> "ObjectId": + return _UniffiConverterTypeObjectId.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_id,self._uniffi_clone_pointer(),) ) @@ -11247,21 +13630,21 @@ def to_bytes(self, ) -> "bytes": -class _UniffiConverterTypeEd25519PublicKey: +class _UniffiConverterTypeCoin: @staticmethod def lift(value: int): - return Ed25519PublicKey._make_instance_(value) + return Coin._make_instance_(value) @staticmethod - def check_lower(value: Ed25519PublicKey): - if not isinstance(value, Ed25519PublicKey): - raise TypeError("Expected Ed25519PublicKey instance, {} found".format(type(value).__name__)) + def check_lower(value: Coin): + if not isinstance(value, Coin): + raise TypeError("Expected Coin instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Ed25519PublicKeyProtocol): - if not isinstance(value, Ed25519PublicKey): - raise TypeError("Expected Ed25519PublicKey instance, {} found".format(type(value).__name__)) + def lower(value: CoinProtocol): + if not isinstance(value, Coin): + raise TypeError("Expected Coin instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11272,12 +13655,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: Ed25519PublicKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CoinProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class EffectsAuxiliaryDataDigestProtocol(typing.Protocol): +class CoinMetadataProtocol(typing.Protocol): pass -# EffectsAuxiliaryDataDigest is a Rust-only trait - it's a wrapper around a Rust implementation. -class EffectsAuxiliaryDataDigest(): +# CoinMetadata is a Rust-only trait - it's a wrapper around a Rust implementation. +class CoinMetadata(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -11287,10 +13670,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_effectsauxiliarydatadigest, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_coinmetadata, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_effectsauxiliarydatadigest, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coinmetadata, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11303,21 +13686,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeEffectsAuxiliaryDataDigest: +class _UniffiConverterTypeCoinMetadata: @staticmethod def lift(value: int): - return EffectsAuxiliaryDataDigest._make_instance_(value) + return CoinMetadata._make_instance_(value) @staticmethod - def check_lower(value: EffectsAuxiliaryDataDigest): - if not isinstance(value, EffectsAuxiliaryDataDigest): - raise TypeError("Expected EffectsAuxiliaryDataDigest instance, {} found".format(type(value).__name__)) + def check_lower(value: CoinMetadata): + if not isinstance(value, CoinMetadata): + raise TypeError("Expected CoinMetadata instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: EffectsAuxiliaryDataDigestProtocol): - if not isinstance(value, EffectsAuxiliaryDataDigest): - raise TypeError("Expected EffectsAuxiliaryDataDigest instance, {} found".format(type(value).__name__)) + def lower(value: CoinMetadataProtocol): + if not isinstance(value, CoinMetadata): + raise TypeError("Expected CoinMetadata instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11328,68 +13711,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: EffectsAuxiliaryDataDigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CoinMetadataProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class EndOfEpochTransactionKindProtocol(typing.Protocol): - """ - Operation run at the end of an epoch - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - end-of-epoch-transaction-kind = eoe-change-epoch - =/ eoe-authenticator-state-create - =/ eoe-authenticator-state-expire - =/ eoe-randomness-state-create - =/ eoe-deny-list-state-create - =/ eoe-bridge-state-create - =/ eoe-bridge-committee-init - =/ eoe-store-execution-time-observations - - eoe-change-epoch = %x00 change-epoch - eoe-authenticator-state-create = %x01 - eoe-authenticator-state-expire = %x02 authenticator-state-expire - eoe-randomness-state-create = %x03 - eoe-deny-list-state-create = %x04 - eoe-bridge-state-create = %x05 digest - eoe-bridge-committee-init = %x06 u64 - eoe-store-execution-time-observations = %x07 stored-execution-time-observations - ``` - """ - - pass -# EndOfEpochTransactionKind is a Rust-only trait - it's a wrapper around a Rust implementation. -class EndOfEpochTransactionKind(): - """ - Operation run at the end of an epoch - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - end-of-epoch-transaction-kind = eoe-change-epoch - =/ eoe-authenticator-state-create - =/ eoe-authenticator-state-expire - =/ eoe-randomness-state-create - =/ eoe-deny-list-state-create - =/ eoe-bridge-state-create - =/ eoe-bridge-committee-init - =/ eoe-store-execution-time-observations - - eoe-change-epoch = %x00 change-epoch - eoe-authenticator-state-create = %x01 - eoe-authenticator-state-expire = %x02 authenticator-state-expire - eoe-randomness-state-create = %x03 - eoe-deny-list-state-create = %x04 - eoe-bridge-state-create = %x05 digest - eoe-bridge-committee-init = %x06 u64 - eoe-store-execution-time-observations = %x07 stored-execution-time-observations - ``` - """ - +class ConsensusCommitDigestProtocol(typing.Protocol): + def to_base58(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError +# ConsensusCommitDigest is a Rust-only trait - it's a wrapper around a Rust implementation. +class ConsensusCommitDigest(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -11399,10 +13729,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitdigest, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitdigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11413,56 +13743,65 @@ def _make_instance_(cls, pointer): inst._pointer = pointer return inst @classmethod - def authenticator_state_create(cls, ): - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_authenticator_state_create,) - return cls._make_instance_(pointer) - - @classmethod - def authenticator_state_expire(cls, tx: "AuthenticatorStateExpire"): - _UniffiConverterTypeAuthenticatorStateExpire.check_lower(tx) + def from_base58(cls, base58: "str"): + _UniffiConverterString.check_lower(base58) # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_authenticator_state_expire, - _UniffiConverterTypeAuthenticatorStateExpire.lower(tx)) + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitdigest_from_base58, + _UniffiConverterString.lower(base58)) return cls._make_instance_(pointer) @classmethod - def change_epoch(cls, tx: "ChangeEpoch"): - _UniffiConverterTypeChangeEpoch.check_lower(tx) + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_change_epoch, - _UniffiConverterTypeChangeEpoch.lower(tx)) + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitdigest_from_bytes, + _UniffiConverterBytes.lower(bytes)) return cls._make_instance_(pointer) @classmethod - def change_epoch_v2(cls, tx: "ChangeEpochV2"): - _UniffiConverterTypeChangeEpochV2.check_lower(tx) - + def generate(cls, ): # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_change_epoch_v2, - _UniffiConverterTypeChangeEpochV2.lower(tx)) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_consensuscommitdigest_generate,) return cls._make_instance_(pointer) + def to_base58(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitdigest_to_base58,self._uniffi_clone_pointer(),) + ) + + + + + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitdigest_to_bytes,self._uniffi_clone_pointer(),) + ) + + -class _UniffiConverterTypeEndOfEpochTransactionKind: + + + +class _UniffiConverterTypeConsensusCommitDigest: @staticmethod def lift(value: int): - return EndOfEpochTransactionKind._make_instance_(value) + return ConsensusCommitDigest._make_instance_(value) @staticmethod - def check_lower(value: EndOfEpochTransactionKind): - if not isinstance(value, EndOfEpochTransactionKind): - raise TypeError("Expected EndOfEpochTransactionKind instance, {} found".format(type(value).__name__)) + def check_lower(value: ConsensusCommitDigest): + if not isinstance(value, ConsensusCommitDigest): + raise TypeError("Expected ConsensusCommitDigest instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: EndOfEpochTransactionKindProtocol): - if not isinstance(value, EndOfEpochTransactionKind): - raise TypeError("Expected EndOfEpochTransactionKind instance, {} found".format(type(value).__name__)) + def lower(value: ConsensusCommitDigestProtocol): + if not isinstance(value, ConsensusCommitDigest): + raise TypeError("Expected ConsensusCommitDigest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11473,12 +13812,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: EndOfEpochTransactionKindProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ConsensusCommitDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class EpochProtocol(typing.Protocol): +class ConsensusCommitPrologueV1Protocol(typing.Protocol): pass -# Epoch is a Rust-only trait - it's a wrapper around a Rust implementation. -class Epoch(): +# ConsensusCommitPrologueV1 is a Rust-only trait - it's a wrapper around a Rust implementation. +class ConsensusCommitPrologueV1(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -11488,10 +13827,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_epoch, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_epoch, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitprologuev1, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11504,21 +13843,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeEpoch: +class _UniffiConverterTypeConsensusCommitPrologueV1: @staticmethod def lift(value: int): - return Epoch._make_instance_(value) + return ConsensusCommitPrologueV1._make_instance_(value) @staticmethod - def check_lower(value: Epoch): - if not isinstance(value, Epoch): - raise TypeError("Expected Epoch instance, {} found".format(type(value).__name__)) + def check_lower(value: ConsensusCommitPrologueV1): + if not isinstance(value, ConsensusCommitPrologueV1): + raise TypeError("Expected ConsensusCommitPrologueV1 instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: EpochProtocol): - if not isinstance(value, Epoch): - raise TypeError("Expected Epoch instance, {} found".format(type(value).__name__)) + def lower(value: ConsensusCommitPrologueV1Protocol): + if not isinstance(value, ConsensusCommitPrologueV1): + raise TypeError("Expected ConsensusCommitPrologueV1 instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11529,12 +13868,49 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: EpochProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ConsensusCommitPrologueV1Protocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class EventProtocol(typing.Protocol): - pass -# Event is a Rust-only trait - it's a wrapper around a Rust implementation. -class Event(): +class DigestProtocol(typing.Protocol): + """ + A 32-byte Blake2b256 hash output. + + # BCS + + A `Digest`'s BCS serialized form is defined by the following: + + ```text + digest = %x20 32OCTET + ``` + + Due to historical reasons, even though a `Digest` has a fixed-length of 32, + IOTA's binary representation of a `Digest` is prefixed with its length + meaning its serialized binary form (in bcs) is 33 bytes long vs a more + compact 32 bytes. + """ + + def to_base58(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError +# Digest is a Rust-only trait - it's a wrapper around a Rust implementation. +class Digest(): + """ + A 32-byte Blake2b256 hash output. + + # BCS + + A `Digest`'s BCS serialized form is defined by the following: + + ```text + digest = %x20 32OCTET + ``` + + Due to historical reasons, even though a `Digest` has a fixed-length of 32, + IOTA's binary representation of a `Digest` is prefixed with its length + meaning its serialized binary form (in bcs) is 33 bytes long vs a more + compact 32 bytes. + """ + _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -11544,10 +13920,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_event, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_digest, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_event, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_digest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11557,24 +13933,66 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_base58(cls, base58: "str"): + _UniffiConverterString.check_lower(base58) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_base58, + _UniffiConverterString.lower(base58)) + return cls._make_instance_(pointer) + + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_generate,) + return cls._make_instance_(pointer) + + + + def to_base58(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_base58,self._uniffi_clone_pointer(),) + ) + + + + + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_digest_to_bytes,self._uniffi_clone_pointer(),) + ) + -class _UniffiConverterTypeEvent: + + +class _UniffiConverterTypeDigest: @staticmethod def lift(value: int): - return Event._make_instance_(value) + return Digest._make_instance_(value) @staticmethod - def check_lower(value: Event): - if not isinstance(value, Event): - raise TypeError("Expected Event instance, {} found".format(type(value).__name__)) + def check_lower(value: Digest): + if not isinstance(value, Digest): + raise TypeError("Expected Digest instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: EventProtocol): - if not isinstance(value, Event): - raise TypeError("Expected Event instance, {} found".format(type(value).__name__)) + def lower(value: DigestProtocol): + if not isinstance(value, Digest): + raise TypeError("Expected Digest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11585,12 +14003,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: EventProtocol, buf: _UniffiRustBuffer): + def write(cls, value: DigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ExecutionTimeObservationsProtocol(typing.Protocol): +class DryRunResultProtocol(typing.Protocol): pass -# ExecutionTimeObservations is a Rust-only trait - it's a wrapper around a Rust implementation. -class ExecutionTimeObservations(): +# DryRunResult is a Rust-only trait - it's a wrapper around a Rust implementation. +class DryRunResult(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -11600,10 +14018,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservations, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_dryrunresult, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_dryrunresult, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11616,21 +14034,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeExecutionTimeObservations: +class _UniffiConverterTypeDryRunResult: @staticmethod def lift(value: int): - return ExecutionTimeObservations._make_instance_(value) + return DryRunResult._make_instance_(value) @staticmethod - def check_lower(value: ExecutionTimeObservations): - if not isinstance(value, ExecutionTimeObservations): - raise TypeError("Expected ExecutionTimeObservations instance, {} found".format(type(value).__name__)) + def check_lower(value: DryRunResult): + if not isinstance(value, DryRunResult): + raise TypeError("Expected DryRunResult instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ExecutionTimeObservationsProtocol): - if not isinstance(value, ExecutionTimeObservations): - raise TypeError("Expected ExecutionTimeObservations instance, {} found".format(type(value).__name__)) + def lower(value: DryRunResultProtocol): + if not isinstance(value, DryRunResult): + raise TypeError("Expected DryRunResult instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11641,64 +14059,50 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ExecutionTimeObservationsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: DryRunResultProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class FaucetClientProtocol(typing.Protocol): - def request(self, address: "Address"): - """ - Request gas from the faucet. Note that this will return the UUID of the - request and not wait until the token is received. Use - `request_and_wait` to wait for the token. - """ +class Ed25519PublicKeyProtocol(typing.Protocol): + """ + An ed25519 public key. - raise NotImplementedError - def request_and_wait(self, address: "Address"): - """ - Request gas from the faucet and wait until the request is completed and - token is transferred. Returns `FaucetReceipt` if the request is - successful, which contains the list of tokens transferred, and the - transaction digest. + # BCS - Note that the faucet is heavily rate-limited, so calling repeatedly the - faucet would likely result in a 429 code or 502 code. - """ + The BCS serialized form for this type is defined by the following ABNF: + + ```text + ed25519-public-key = 32OCTECT + ``` + """ + def to_bytes(self, ): raise NotImplementedError - def request_status(self, id: "str"): - """ - Check the faucet request status. +# Ed25519PublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. +class Ed25519PublicKey(): + """ + An ed25519 public key. - Possible statuses are defined in: [`BatchSendStatusType`] - """ + # BCS - raise NotImplementedError -# FaucetClient is a Rust-only trait - it's a wrapper around a Rust implementation. -class FaucetClient(): - _pointer: ctypes.c_void_p - def __init__(self, faucet_url: "str"): - """ - Construct a new `FaucetClient` with the given faucet service URL. This - [`FaucetClient`] expects that the service provides two endpoints: - /v1/gas and /v1/status. As such, do not provide the request - endpoint, just the top level service endpoint. + The BCS serialized form for this type is defined by the following ABNF: - - /v1/gas is used to request gas - - /v1/status/taks-uuid is used to check the status of the request - """ + ```text + ed25519-public-key = 32OCTECT + ``` + """ - _UniffiConverterString.check_lower(faucet_url) - - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new, - _UniffiConverterString.lower(faucet_url)) + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_faucetclient, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519publickey, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_faucetclient, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519publickey, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11709,138 +14113,56 @@ def _make_instance_(cls, pointer): inst._pointer = pointer return inst @classmethod - def devnet(cls, ): - """ - Set to devnet faucet. - """ - + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_devnet,) + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_bytes, + _UniffiConverterBytes.lower(bytes)) return cls._make_instance_(pointer) @classmethod - def local(cls, ): - """ - Set to local faucet. - """ - + def from_str(cls, s: "str"): + _UniffiConverterString.check_lower(s) + # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_local,) + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str, + _UniffiConverterString.lower(s)) return cls._make_instance_(pointer) @classmethod - def testnet(cls, ): - """ - Set to testnet faucet. - """ - + def generate(cls, ): # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_testnet,) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_generate,) return cls._make_instance_(pointer) - async def request(self, address: "Address") -> "typing.Optional[str]": - """ - Request gas from the faucet. Note that this will return the UUID of the - request and not wait until the token is received. Use - `request_and_wait` to wait for the token. - """ - - _UniffiConverterTypeAddress.check_lower(address) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalString.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - - - - async def request_and_wait(self, address: "Address") -> "typing.Optional[FaucetReceipt]": - """ - Request gas from the faucet and wait until the request is completed and - token is transferred. Returns `FaucetReceipt` if the request is - successful, which contains the list of tokens transferred, and the - transaction digest. - - Note that the faucet is heavily rate-limited, so calling repeatedly the - faucet would likely result in a 429 code or 502 code. - """ - - _UniffiConverterTypeAddress.check_lower(address) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeFaucetReceipt.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519publickey_to_bytes,self._uniffi_clone_pointer(),) ) - async def request_status(self, id: "str") -> "typing.Optional[BatchSendStatus]": - """ - Check the faucet request status. - - Possible statuses are defined in: [`BatchSendStatusType`] - """ - - _UniffiConverterString.check_lower(id) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status( - self._uniffi_clone_pointer(), - _UniffiConverterString.lower(id) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeBatchSendStatus.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) - - -class _UniffiConverterTypeFaucetClient: +class _UniffiConverterTypeEd25519PublicKey: @staticmethod def lift(value: int): - return FaucetClient._make_instance_(value) + return Ed25519PublicKey._make_instance_(value) @staticmethod - def check_lower(value: FaucetClient): - if not isinstance(value, FaucetClient): - raise TypeError("Expected FaucetClient instance, {} found".format(type(value).__name__)) + def check_lower(value: Ed25519PublicKey): + if not isinstance(value, Ed25519PublicKey): + raise TypeError("Expected Ed25519PublicKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: FaucetClientProtocol): - if not isinstance(value, FaucetClient): - raise TypeError("Expected FaucetClient instance, {} found".format(type(value).__name__)) + def lower(value: Ed25519PublicKeyProtocol): + if not isinstance(value, Ed25519PublicKey): + raise TypeError("Expected Ed25519PublicKey instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11851,12 +14173,37 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: FaucetClientProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Ed25519PublicKeyProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class FaucetReceiptProtocol(typing.Protocol): - pass -# FaucetReceipt is a Rust-only trait - it's a wrapper around a Rust implementation. -class FaucetReceipt(): +class Ed25519SignatureProtocol(typing.Protocol): + """ + An ed25519 signature. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + ed25519-signature = 64OCTECT + ``` + """ + + def to_bytes(self, ): + raise NotImplementedError +# Ed25519Signature is a Rust-only trait - it's a wrapper around a Rust implementation. +class Ed25519Signature(): + """ + An ed25519 signature. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + ed25519-signature = 64OCTECT + ``` + """ + _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -11866,10 +14213,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_faucetreceipt, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_ed25519signature, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_faucetreceipt, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_ed25519signature, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11879,24 +14226,57 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + + @classmethod + def from_str(cls, s: "str"): + _UniffiConverterString.check_lower(s) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_from_str, + _UniffiConverterString.lower(s)) + return cls._make_instance_(pointer) + + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519signature_generate,) + return cls._make_instance_(pointer) + + + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_ed25519signature_to_bytes,self._uniffi_clone_pointer(),) + ) + + + -class _UniffiConverterTypeFaucetReceipt: - +class _UniffiConverterTypeEd25519Signature: + @staticmethod def lift(value: int): - return FaucetReceipt._make_instance_(value) + return Ed25519Signature._make_instance_(value) @staticmethod - def check_lower(value: FaucetReceipt): - if not isinstance(value, FaucetReceipt): - raise TypeError("Expected FaucetReceipt instance, {} found".format(type(value).__name__)) + def check_lower(value: Ed25519Signature): + if not isinstance(value, Ed25519Signature): + raise TypeError("Expected Ed25519Signature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: FaucetReceiptProtocol): - if not isinstance(value, FaucetReceipt): - raise TypeError("Expected FaucetReceipt instance, {} found".format(type(value).__name__)) + def lower(value: Ed25519SignatureProtocol): + if not isinstance(value, Ed25519Signature): + raise TypeError("Expected Ed25519Signature instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11907,12 +14287,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: FaucetReceiptProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Ed25519SignatureProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class GenesisTransactionProtocol(typing.Protocol): - pass -# GenesisTransaction is a Rust-only trait - it's a wrapper around a Rust implementation. -class GenesisTransaction(): +class EffectsAuxiliaryDataDigestProtocol(typing.Protocol): + def to_base58(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError +# EffectsAuxiliaryDataDigest is a Rust-only trait - it's a wrapper around a Rust implementation. +class EffectsAuxiliaryDataDigest(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -11922,10 +14305,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesistransaction, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_effectsauxiliarydatadigest, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesistransaction, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_effectsauxiliarydatadigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11935,24 +14318,66 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_base58(cls, base58: "str"): + _UniffiConverterString.check_lower(base58) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_effectsauxiliarydatadigest_from_base58, + _UniffiConverterString.lower(base58)) + return cls._make_instance_(pointer) + + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_effectsauxiliarydatadigest_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_effectsauxiliarydatadigest_generate,) + return cls._make_instance_(pointer) + + + + def to_base58(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_effectsauxiliarydatadigest_to_base58,self._uniffi_clone_pointer(),) + ) + + + + + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_effectsauxiliarydatadigest_to_bytes,self._uniffi_clone_pointer(),) + ) + + -class _UniffiConverterTypeGenesisTransaction: + +class _UniffiConverterTypeEffectsAuxiliaryDataDigest: @staticmethod def lift(value: int): - return GenesisTransaction._make_instance_(value) + return EffectsAuxiliaryDataDigest._make_instance_(value) @staticmethod - def check_lower(value: GenesisTransaction): - if not isinstance(value, GenesisTransaction): - raise TypeError("Expected GenesisTransaction instance, {} found".format(type(value).__name__)) + def check_lower(value: EffectsAuxiliaryDataDigest): + if not isinstance(value, EffectsAuxiliaryDataDigest): + raise TypeError("Expected EffectsAuxiliaryDataDigest instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: GenesisTransactionProtocol): - if not isinstance(value, GenesisTransaction): - raise TypeError("Expected GenesisTransaction instance, {} found".format(type(value).__name__)) + def lower(value: EffectsAuxiliaryDataDigestProtocol): + if not isinstance(value, EffectsAuxiliaryDataDigest): + raise TypeError("Expected EffectsAuxiliaryDataDigest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11963,413 +14388,3197 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: GenesisTransactionProtocol, buf: _UniffiRustBuffer): + def write(cls, value: EffectsAuxiliaryDataDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class GraphQlClientProtocol(typing.Protocol): - def active_validators(self, pagination_filter: "PaginationFilter",epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Get the list of active validators for the provided epoch, including - related metadata. If no epoch is provided, it will return the active - validators for the current epoch. - """ +class EndOfEpochTransactionKindProtocol(typing.Protocol): + """ + Operation run at the end of an epoch - raise NotImplementedError - def balance(self, address: "Address",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT): - """ - Get the balance of all the coins owned by address for the provided coin - type. Coin type will default to `0x2::coin::Coin<0x2::iota::IOTA>` - if not provided. - """ + # BCS - raise NotImplementedError - def chain_id(self, ): - """ - Get the chain identifier. - """ + The BCS serialized form for this type is defined by the following ABNF: - raise NotImplementedError - def checkpoint(self, digest: "typing.Union[object, typing.Optional[CheckpointContentsDigest]]" = _DEFAULT,seq_num: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Get the [`CheckpointSummary`] for a given checkpoint digest or - checkpoint id. If none is provided, it will use the last known - checkpoint id. - """ + ```text + end-of-epoch-transaction-kind = eoe-change-epoch + =/ eoe-authenticator-state-create + =/ eoe-authenticator-state-expire + =/ eoe-randomness-state-create + =/ eoe-deny-list-state-create + =/ eoe-bridge-state-create + =/ eoe-bridge-committee-init + =/ eoe-store-execution-time-observations - raise NotImplementedError - def checkpoints(self, pagination_filter: "PaginationFilter"): - """ - Get a page of [`CheckpointSummary`] for the provided parameters. - """ + eoe-change-epoch = %x00 change-epoch + eoe-authenticator-state-create = %x01 + eoe-authenticator-state-expire = %x02 authenticator-state-expire + eoe-randomness-state-create = %x03 + eoe-deny-list-state-create = %x04 + eoe-bridge-state-create = %x05 digest + eoe-bridge-committee-init = %x06 u64 + eoe-store-execution-time-observations = %x07 stored-execution-time-observations + ``` + """ - raise NotImplementedError - def coin_metadata(self, coin_type: "str"): - """ - Get the coin metadata for the coin type. - """ + pass +# EndOfEpochTransactionKind is a Rust-only trait - it's a wrapper around a Rust implementation. +class EndOfEpochTransactionKind(): + """ + Operation run at the end of an epoch - raise NotImplementedError - def coins(self, owner: "Address",pagination_filter: "PaginationFilter",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT): - """ - Get the list of coins for the specified address. + # BCS - If `coin_type` is not provided, it will default to `0x2::coin::Coin`, - which will return all coins. For IOTA coin, pass in the coin type: - `0x2::coin::Coin<0x2::iota::IOTA>`. - """ + The BCS serialized form for this type is defined by the following ABNF: - raise NotImplementedError - def dry_run_tx(self, tx: "Transaction",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT): - """ - Dry run a [`Transaction`] and return the transaction effects and dry run - error (if any). + ```text + end-of-epoch-transaction-kind = eoe-change-epoch + =/ eoe-authenticator-state-create + =/ eoe-authenticator-state-expire + =/ eoe-randomness-state-create + =/ eoe-deny-list-state-create + =/ eoe-bridge-state-create + =/ eoe-bridge-committee-init + =/ eoe-store-execution-time-observations - `skipChecks` optional flag disables the usual verification checks that - prevent access to objects that are owned by addresses other than the - sender, and calling non-public, non-entry functions, and some other - checks. Defaults to false. - """ + eoe-change-epoch = %x00 change-epoch + eoe-authenticator-state-create = %x01 + eoe-authenticator-state-expire = %x02 authenticator-state-expire + eoe-randomness-state-create = %x03 + eoe-deny-list-state-create = %x04 + eoe-bridge-state-create = %x05 digest + eoe-bridge-committee-init = %x06 u64 + eoe-store-execution-time-observations = %x07 stored-execution-time-observations + ``` + """ - raise NotImplementedError - def dry_run_tx_kind(self, tx_kind: "TransactionKind",tx_meta: "TransactionMetadata",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT): - """ - Dry run a [`TransactionKind`] and return the transaction effects and dry - run error (if any). + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") - `skipChecks` optional flag disables the usual verification checks that - prevent access to objects that are owned by addresses other than the - sender, and calling non-public, non-entry functions, and some other - checks. Defaults to false. + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_endofepochtransactionkind, pointer) - `tx_meta` is the transaction metadata. - """ + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_endofepochtransactionkind, self._pointer) - raise NotImplementedError - def dynamic_field(self, address: "Address",type_tag: "TypeTag",name: "Value"): - """ - Access a dynamic field on an object using its name. Names are arbitrary - Move values whose type have copy, drop, and store, and are specified - using their type, and their BCS contents, Base64 encoded. + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + @classmethod + def authenticator_state_create(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_authenticator_state_create,) + return cls._make_instance_(pointer) - The `name` argument is a json serialized type. + @classmethod + def authenticator_state_expire(cls, tx: "AuthenticatorStateExpire"): + _UniffiConverterTypeAuthenticatorStateExpire.check_lower(tx) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_authenticator_state_expire, + _UniffiConverterTypeAuthenticatorStateExpire.lower(tx)) + return cls._make_instance_(pointer) - This returns [`DynamicFieldOutput`] which contains the name, the value - as json, and object. + @classmethod + def change_epoch(cls, tx: "ChangeEpoch"): + _UniffiConverterTypeChangeEpoch.check_lower(tx) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_change_epoch, + _UniffiConverterTypeChangeEpoch.lower(tx)) + return cls._make_instance_(pointer) - # Example - ```rust,ignore + @classmethod + def change_epoch_v2(cls, tx: "ChangeEpochV2"): + _UniffiConverterTypeChangeEpochV2.check_lower(tx) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_change_epoch_v2, + _UniffiConverterTypeChangeEpochV2.lower(tx)) + return cls._make_instance_(pointer) + + + + +class _UniffiConverterTypeEndOfEpochTransactionKind: + + @staticmethod + def lift(value: int): + return EndOfEpochTransactionKind._make_instance_(value) + + @staticmethod + def check_lower(value: EndOfEpochTransactionKind): + if not isinstance(value, EndOfEpochTransactionKind): + raise TypeError("Expected EndOfEpochTransactionKind instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: EndOfEpochTransactionKindProtocol): + if not isinstance(value, EndOfEpochTransactionKind): + raise TypeError("Expected EndOfEpochTransactionKind instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: EndOfEpochTransactionKindProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class EpochProtocol(typing.Protocol): + pass +# Epoch is a Rust-only trait - it's a wrapper around a Rust implementation. +class Epoch(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_epoch, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_epoch, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + + + +class _UniffiConverterTypeEpoch: + + @staticmethod + def lift(value: int): + return Epoch._make_instance_(value) + + @staticmethod + def check_lower(value: Epoch): + if not isinstance(value, Epoch): + raise TypeError("Expected Epoch instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: EpochProtocol): + if not isinstance(value, Epoch): + raise TypeError("Expected Epoch instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: EpochProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class EventProtocol(typing.Protocol): + pass +# Event is a Rust-only trait - it's a wrapper around a Rust implementation. +class Event(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_event, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_event, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + + + +class _UniffiConverterTypeEvent: + + @staticmethod + def lift(value: int): + return Event._make_instance_(value) + + @staticmethod + def check_lower(value: Event): + if not isinstance(value, Event): + raise TypeError("Expected Event instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: EventProtocol): + if not isinstance(value, Event): + raise TypeError("Expected Event instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: EventProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class ExecutionTimeObservationsProtocol(typing.Protocol): + pass +# ExecutionTimeObservations is a Rust-only trait - it's a wrapper around a Rust implementation. +class ExecutionTimeObservations(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_executiontimeobservations, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + + + +class _UniffiConverterTypeExecutionTimeObservations: + + @staticmethod + def lift(value: int): + return ExecutionTimeObservations._make_instance_(value) + + @staticmethod + def check_lower(value: ExecutionTimeObservations): + if not isinstance(value, ExecutionTimeObservations): + raise TypeError("Expected ExecutionTimeObservations instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: ExecutionTimeObservationsProtocol): + if not isinstance(value, ExecutionTimeObservations): + raise TypeError("Expected ExecutionTimeObservations instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: ExecutionTimeObservationsProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class FaucetClientProtocol(typing.Protocol): + def request(self, address: "Address"): + """ + Request gas from the faucet. Note that this will return the UUID of the + request and not wait until the token is received. Use + `request_and_wait` to wait for the token. + """ + + raise NotImplementedError + def request_and_wait(self, address: "Address"): + """ + Request gas from the faucet and wait until the request is completed and + token is transferred. Returns `FaucetReceipt` if the request is + successful, which contains the list of tokens transferred, and the + transaction digest. + + Note that the faucet is heavily rate-limited, so calling repeatedly the + faucet would likely result in a 429 code or 502 code. + """ + + raise NotImplementedError + def request_status(self, id: "str"): + """ + Check the faucet request status. + + Possible statuses are defined in: [`BatchSendStatusType`] + """ + + raise NotImplementedError +# FaucetClient is a Rust-only trait - it's a wrapper around a Rust implementation. +class FaucetClient(): + _pointer: ctypes.c_void_p + def __init__(self, faucet_url: "str"): + """ + Construct a new `FaucetClient` with the given faucet service URL. This + [`FaucetClient`] expects that the service provides two endpoints: + /v1/gas and /v1/status. As such, do not provide the request + endpoint, just the top level service endpoint. + + - /v1/gas is used to request gas + - /v1/status/taks-uuid is used to check the status of the request + """ + + _UniffiConverterString.check_lower(faucet_url) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_new, + _UniffiConverterString.lower(faucet_url)) + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_faucetclient, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_faucetclient, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + @classmethod + def devnet(cls, ): + """ + Set to devnet faucet. + """ + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_devnet,) + return cls._make_instance_(pointer) + + @classmethod + def local(cls, ): + """ + Set to local faucet. + """ + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_local,) + return cls._make_instance_(pointer) + + @classmethod + def testnet(cls, ): + """ + Set to testnet faucet. + """ + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_testnet,) + return cls._make_instance_(pointer) + + + async def request(self, address: "Address") -> "typing.Optional[str]": + """ + Request gas from the faucet. Note that this will return the UUID of the + request and not wait until the token is received. Use + `request_and_wait` to wait for the token. + """ + + _UniffiConverterTypeAddress.check_lower(address) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request( + self._uniffi_clone_pointer(), + _UniffiConverterTypeAddress.lower(address) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalString.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def request_and_wait(self, address: "Address") -> "typing.Optional[FaucetReceipt]": + """ + Request gas from the faucet and wait until the request is completed and + token is transferred. Returns `FaucetReceipt` if the request is + successful, which contains the list of tokens transferred, and the + transaction digest. + + Note that the faucet is heavily rate-limited, so calling repeatedly the + faucet would likely result in a 429 code or 502 code. + """ + + _UniffiConverterTypeAddress.check_lower(address) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait( + self._uniffi_clone_pointer(), + _UniffiConverterTypeAddress.lower(address) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeFaucetReceipt.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def request_status(self, id: "str") -> "typing.Optional[BatchSendStatus]": + """ + Check the faucet request status. + + Possible statuses are defined in: [`BatchSendStatusType`] + """ + + _UniffiConverterString.check_lower(id) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_status( + self._uniffi_clone_pointer(), + _UniffiConverterString.lower(id) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeBatchSendStatus.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + + +class _UniffiConverterTypeFaucetClient: + + @staticmethod + def lift(value: int): + return FaucetClient._make_instance_(value) + + @staticmethod + def check_lower(value: FaucetClient): + if not isinstance(value, FaucetClient): + raise TypeError("Expected FaucetClient instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: FaucetClientProtocol): + if not isinstance(value, FaucetClient): + raise TypeError("Expected FaucetClient instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: FaucetClientProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class FaucetReceiptProtocol(typing.Protocol): + pass +# FaucetReceipt is a Rust-only trait - it's a wrapper around a Rust implementation. +class FaucetReceipt(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_faucetreceipt, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_faucetreceipt, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + + + +class _UniffiConverterTypeFaucetReceipt: + + @staticmethod + def lift(value: int): + return FaucetReceipt._make_instance_(value) + + @staticmethod + def check_lower(value: FaucetReceipt): + if not isinstance(value, FaucetReceipt): + raise TypeError("Expected FaucetReceipt instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: FaucetReceiptProtocol): + if not isinstance(value, FaucetReceipt): + raise TypeError("Expected FaucetReceipt instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: FaucetReceiptProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class GenesisTransactionProtocol(typing.Protocol): + pass +# GenesisTransaction is a Rust-only trait - it's a wrapper around a Rust implementation. +class GenesisTransaction(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_genesistransaction, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_genesistransaction, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + + + +class _UniffiConverterTypeGenesisTransaction: + + @staticmethod + def lift(value: int): + return GenesisTransaction._make_instance_(value) + + @staticmethod + def check_lower(value: GenesisTransaction): + if not isinstance(value, GenesisTransaction): + raise TypeError("Expected GenesisTransaction instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: GenesisTransactionProtocol): + if not isinstance(value, GenesisTransaction): + raise TypeError("Expected GenesisTransaction instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: GenesisTransactionProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class GraphQlClientProtocol(typing.Protocol): + def active_validators(self, pagination_filter: "PaginationFilter",epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Get the list of active validators for the provided epoch, including + related metadata. If no epoch is provided, it will return the active + validators for the current epoch. + """ + + raise NotImplementedError + def balance(self, address: "Address",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT): + """ + Get the balance of all the coins owned by address for the provided coin + type. Coin type will default to `0x2::coin::Coin<0x2::iota::IOTA>` + if not provided. + """ + + raise NotImplementedError + def chain_id(self, ): + """ + Get the chain identifier. + """ + + raise NotImplementedError + def checkpoint(self, digest: "typing.Union[object, typing.Optional[CheckpointContentsDigest]]" = _DEFAULT,seq_num: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Get the [`CheckpointSummary`] for a given checkpoint digest or + checkpoint id. If none is provided, it will use the last known + checkpoint id. + """ + + raise NotImplementedError + def checkpoints(self, pagination_filter: "PaginationFilter"): + """ + Get a page of [`CheckpointSummary`] for the provided parameters. + """ + + raise NotImplementedError + def coin_metadata(self, coin_type: "str"): + """ + Get the coin metadata for the coin type. + """ + + raise NotImplementedError + def coins(self, owner: "Address",pagination_filter: "PaginationFilter",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT): + """ + Get the list of coins for the specified address. + + If `coin_type` is not provided, it will default to `0x2::coin::Coin`, + which will return all coins. For IOTA coin, pass in the coin type: + `0x2::coin::Coin<0x2::iota::IOTA>`. + """ + + raise NotImplementedError + def dry_run_tx(self, tx: "Transaction",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT): + """ + Dry run a [`Transaction`] and return the transaction effects and dry run + error (if any). + + `skipChecks` optional flag disables the usual verification checks that + prevent access to objects that are owned by addresses other than the + sender, and calling non-public, non-entry functions, and some other + checks. Defaults to false. + """ + + raise NotImplementedError + def dry_run_tx_kind(self, tx_kind: "TransactionKind",tx_meta: "TransactionMetadata",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT): + """ + Dry run a [`TransactionKind`] and return the transaction effects and dry + run error (if any). + + `skipChecks` optional flag disables the usual verification checks that + prevent access to objects that are owned by addresses other than the + sender, and calling non-public, non-entry functions, and some other + checks. Defaults to false. + + `tx_meta` is the transaction metadata. + """ + + raise NotImplementedError + def dynamic_field(self, address: "Address",type_tag: "TypeTag",name: "Value"): + """ + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have copy, drop, and store, and are specified + using their type, and their BCS contents, Base64 encoded. + + The `name` argument is a json serialized type. + + This returns [`DynamicFieldOutput`] which contains the name, the value + as json, and object. + + # Example + ```rust,ignore + + let client = iota_graphql_client::Client::new_devnet(); + let address = Address::from_str("0x5").unwrap(); + let df = client.dynamic_field_with_name(address, "u64", 2u64).await.unwrap(); + + # alternatively, pass in the bcs bytes + let bcs = base64ct::Base64::decode_vec("AgAAAAAAAAA=").unwrap(); + let df = client.dynamic_field(address, "u64", BcsName(bcs)).await.unwrap(); + ``` + """ + + raise NotImplementedError + def dynamic_fields(self, address: "Address",pagination_filter: "PaginationFilter"): + """ + Get a page of dynamic fields for the provided address. Note that this + will also fetch dynamic fields on wrapped objects. + + This returns [`Page`] of [`DynamicFieldOutput`]s. + """ + + raise NotImplementedError + def dynamic_object_field(self, address: "Address",type_tag: "TypeTag",name: "Value"): + """ + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have copy, drop, and store, and are + specified using their type, and their BCS contents, Base64 encoded. + + The `name` argument is a json serialized type. + + This returns [`DynamicFieldOutput`] which contains the name, the value + as json, and object. + """ + + raise NotImplementedError + def epoch(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Return the epoch information for the provided epoch. If no epoch is + provided, it will return the last known epoch. + """ + + raise NotImplementedError + def epoch_total_checkpoints(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Return the number of checkpoints in this epoch. This will return + `Ok(None)` if the epoch requested is not available in the GraphQL + service (e.g., due to pruning). + """ + + raise NotImplementedError + def epoch_total_transaction_blocks(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Return the number of transaction blocks in this epoch. This will return + `Ok(None)` if the epoch requested is not available in the GraphQL + service (e.g., due to pruning). + """ + + raise NotImplementedError + def events(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[EventFilter]]" = _DEFAULT): + """ + Return a page of tuple (event, transaction digest) based on the + (optional) event filter. + """ + + raise NotImplementedError + def execute_tx(self, signatures: "typing.List[UserSignature]",tx: "Transaction"): + """ + Execute a transaction. + """ + + raise NotImplementedError + def latest_checkpoint_sequence_number(self, ): + """ + Return the sequence number of the latest checkpoint that has been + executed. + """ + + raise NotImplementedError + def max_page_size(self, ): + """ + Lazily fetch the max page size + """ + + raise NotImplementedError + def move_object_contents(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Return the contents' JSON of an object that is a Move object. + + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. + """ + + raise NotImplementedError + def move_object_contents_bcs(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Return the BCS of an object that is a Move object. + + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. + """ + + raise NotImplementedError + def normalized_move_function(self, package: "str",module: "str",function: "str",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Return the normalized Move function data for the provided package, + module, and function. + """ + + raise NotImplementedError + def normalized_move_module(self, package: "str",module: "str",pagination_filter_enums: "PaginationFilter",pagination_filter_friends: "PaginationFilter",pagination_filter_functions: "PaginationFilter",pagination_filter_structs: "PaginationFilter",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Return the normalized Move module data for the provided module. + """ + + raise NotImplementedError + def object(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Return an object based on the provided [`Address`]. + + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. + """ + + raise NotImplementedError + def object_bcs(self, object_id: "ObjectId"): + """ + Return the object's bcs content [`Vec`] based on the provided + [`Address`]. + """ + + raise NotImplementedError + def objects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[ObjectFilter]]" = _DEFAULT): + """ + Return a page of objects based on the provided parameters. + + Use this function together with the [`ObjectFilter::owner`] to get the + objects owned by an address. + + # Example + + ```rust,ignore + let filter = ObjectFilter { + type_tag: None, + owner: Some(Address::from_str("test").unwrap().into()), + object_ids: None, + }; + + let owned_objects = client.objects(None, None, Some(filter), None, None).await; + ``` + """ + + raise NotImplementedError + def package(self, address: "Address",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + The package corresponding to the given address (at the optionally given + version). When no version is given, the package is loaded directly + from the address given. Otherwise, the address is translated before + loading to point to the package whose original ID matches + the package at address, but whose version is version. For non-system + packages, this might result in a different address than address + because different versions of a package, introduced by upgrades, + exist at distinct addresses. + + Note that this interpretation of version is different from a historical + object read (the interpretation of version for the object query). + """ + + raise NotImplementedError + def package_latest(self, address: "Address"): + """ + Fetch the latest version of the package at address. + This corresponds to the package with the highest version that shares its + original ID with the package at address. + """ + + raise NotImplementedError + def package_versions(self, address: "Address",pagination_filter: "PaginationFilter",after_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Fetch all versions of package at address (packages that share this + package's original ID), optionally bounding the versions exclusively + from below with afterVersion, or from above with beforeVersion. + """ + + raise NotImplementedError + def packages(self, pagination_filter: "PaginationFilter",after_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + The Move packages that exist in the network, optionally filtered to be + strictly before beforeCheckpoint and/or strictly after + afterCheckpoint. + + This query returns all versions of a given user package that appear + between the specified checkpoints, but only records the latest + versions of system packages. + """ + + raise NotImplementedError + def protocol_config(self, version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Get the protocol configuration. + """ + + raise NotImplementedError + def reference_gas_price(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + """ + Get the reference gas price for the provided epoch or the last known one + if no epoch is provided. + + This will return `Ok(None)` if the epoch requested is not available in + the GraphQL service (e.g., due to pruning). + """ + + raise NotImplementedError + def service_config(self, ): + """ + Get the GraphQL service configuration, including complexity limits, read + and mutation limits, supported versions, and others. + """ + + raise NotImplementedError + def set_rpc_server(self, server: "str"): + """ + Set the server address for the GraphQL GraphQL client. It should be a + valid URL with a host and optionally a port number. + """ + + raise NotImplementedError + def total_supply(self, coin_type: "str"): + """ + Get total supply for the coin type. + """ + + raise NotImplementedError + def total_transaction_blocks(self, ): + """ + The total number of transaction blocks in the network by the end of the + last known checkpoint. + """ + + raise NotImplementedError + def total_transaction_blocks_by_digest(self, digest: "CheckpointContentsDigest"): + """ + The total number of transaction blocks in the network by the end of the + provided checkpoint digest. + """ + + raise NotImplementedError + def total_transaction_blocks_by_seq_num(self, seq_num: "int"): + """ + The total number of transaction blocks in the network by the end of the + provided checkpoint sequence number. + """ + + raise NotImplementedError + def transaction(self, digest: "TransactionDigest"): + """ + Get a transaction by its digest. + """ + + raise NotImplementedError + def transaction_data_effects(self, digest: "TransactionDigest"): + """ + Get a transaction's data and effects by its digest. + """ + + raise NotImplementedError + def transaction_effects(self, digest: "TransactionDigest"): + """ + Get a transaction's effects by its digest. + """ + + raise NotImplementedError + def transactions(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT): + """ + Get a page of transactions based on the provided filters. + """ + + raise NotImplementedError + def transactions_data_effects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT): + """ + Get a page of transactions' data and effects based on the provided + filters. + """ + + raise NotImplementedError + def transactions_effects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT): + """ + Get a page of transactions' effects based on the provided filters. + """ + + raise NotImplementedError +# GraphQlClient is a Rust-only trait - it's a wrapper around a Rust implementation. +class GraphQlClient(): + _pointer: ctypes.c_void_p + def __init__(self, server: "str"): + """ + Create a new GraphQL client with the provided server address. + """ + + _UniffiConverterString.check_lower(server) + + self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new, + _UniffiConverterString.lower(server)) + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_graphqlclient, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_graphqlclient, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + @classmethod + def new_devnet(cls, ): + """ + Create a new GraphQL client connected to the `devnet` GraphQL server: + {DEVNET_HOST}. + """ + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet,) + return cls._make_instance_(pointer) + + @classmethod + def new_localhost(cls, ): + """ + Create a new GraphQL client connected to the `localhost` GraphQL server: + {DEFAULT_LOCAL_HOST}. + """ + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localhost,) + return cls._make_instance_(pointer) + + @classmethod + def new_mainnet(cls, ): + """ + Create a new GraphQL client connected to the `mainnet` GraphQL server: + {MAINNET_HOST}. + """ + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet,) + return cls._make_instance_(pointer) + + @classmethod + def new_testnet(cls, ): + """ + Create a new GraphQL client connected to the `testnet` GraphQL server: + {TESTNET_HOST}. + """ + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet,) + return cls._make_instance_(pointer) + + + async def active_validators(self, pagination_filter: "PaginationFilter",epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "ValidatorPage": + """ + Get the list of active validators for the provided epoch, including + related metadata. If no epoch is provided, it will return the active + validators for the current epoch. + """ + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + + if epoch is _DEFAULT: + epoch = None + _UniffiConverterOptionalUInt64.check_lower(epoch) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators( + self._uniffi_clone_pointer(), + _UniffiConverterTypePaginationFilter.lower(pagination_filter), + _UniffiConverterOptionalUInt64.lower(epoch) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterTypeValidatorPage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def balance(self, address: "Address",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT) -> "typing.Optional[int]": + """ + Get the balance of all the coins owned by address for the provided coin + type. Coin type will default to `0x2::coin::Coin<0x2::iota::IOTA>` + if not provided. + """ + + _UniffiConverterTypeAddress.check_lower(address) + + if coin_type is _DEFAULT: + coin_type = None + _UniffiConverterOptionalString.check_lower(coin_type) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance( + self._uniffi_clone_pointer(), + _UniffiConverterTypeAddress.lower(address), + _UniffiConverterOptionalString.lower(coin_type) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalUInt64.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def chain_id(self, ) -> "str": + """ + Get the chain identifier. + """ + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id( + self._uniffi_clone_pointer(), + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterString.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def checkpoint(self, digest: "typing.Union[object, typing.Optional[CheckpointContentsDigest]]" = _DEFAULT,seq_num: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[CheckpointSummary]": + """ + Get the [`CheckpointSummary`] for a given checkpoint digest or + checkpoint id. If none is provided, it will use the last known + checkpoint id. + """ + + if digest is _DEFAULT: + digest = None + _UniffiConverterOptionalTypeCheckpointContentsDigest.check_lower(digest) + + if seq_num is _DEFAULT: + seq_num = None + _UniffiConverterOptionalUInt64.check_lower(seq_num) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint( + self._uniffi_clone_pointer(), + _UniffiConverterOptionalTypeCheckpointContentsDigest.lower(digest), + _UniffiConverterOptionalUInt64.lower(seq_num) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeCheckpointSummary.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def checkpoints(self, pagination_filter: "PaginationFilter") -> "CheckpointSummaryPage": + """ + Get a page of [`CheckpointSummary`] for the provided parameters. + """ + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints( + self._uniffi_clone_pointer(), + _UniffiConverterTypePaginationFilter.lower(pagination_filter) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterTypeCheckpointSummaryPage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def coin_metadata(self, coin_type: "str") -> "typing.Optional[CoinMetadata]": + """ + Get the coin metadata for the coin type. + """ + + _UniffiConverterString.check_lower(coin_type) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata( + self._uniffi_clone_pointer(), + _UniffiConverterString.lower(coin_type) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeCoinMetadata.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def coins(self, owner: "Address",pagination_filter: "PaginationFilter",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT) -> "CoinPage": + """ + Get the list of coins for the specified address. + + If `coin_type` is not provided, it will default to `0x2::coin::Coin`, + which will return all coins. For IOTA coin, pass in the coin type: + `0x2::coin::Coin<0x2::iota::IOTA>`. + """ + + _UniffiConverterTypeAddress.check_lower(owner) + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + + if coin_type is _DEFAULT: + coin_type = None + _UniffiConverterOptionalString.check_lower(coin_type) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins( + self._uniffi_clone_pointer(), + _UniffiConverterTypeAddress.lower(owner), + _UniffiConverterTypePaginationFilter.lower(pagination_filter), + _UniffiConverterOptionalString.lower(coin_type) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterTypeCoinPage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def dry_run_tx(self, tx: "Transaction",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT) -> "DryRunResult": + """ + Dry run a [`Transaction`] and return the transaction effects and dry run + error (if any). + + `skipChecks` optional flag disables the usual verification checks that + prevent access to objects that are owned by addresses other than the + sender, and calling non-public, non-entry functions, and some other + checks. Defaults to false. + """ + + _UniffiConverterTypeTransaction.check_lower(tx) + + if skip_checks is _DEFAULT: + skip_checks = None + _UniffiConverterOptionalBool.check_lower(skip_checks) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx( + self._uniffi_clone_pointer(), + _UniffiConverterTypeTransaction.lower(tx), + _UniffiConverterOptionalBool.lower(skip_checks) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, + # lift function + _UniffiConverterTypeDryRunResult.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def dry_run_tx_kind(self, tx_kind: "TransactionKind",tx_meta: "TransactionMetadata",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT) -> "DryRunResult": + """ + Dry run a [`TransactionKind`] and return the transaction effects and dry + run error (if any). + + `skipChecks` optional flag disables the usual verification checks that + prevent access to objects that are owned by addresses other than the + sender, and calling non-public, non-entry functions, and some other + checks. Defaults to false. + + `tx_meta` is the transaction metadata. + """ + + _UniffiConverterTypeTransactionKind.check_lower(tx_kind) + + _UniffiConverterTypeTransactionMetadata.check_lower(tx_meta) + + if skip_checks is _DEFAULT: + skip_checks = None + _UniffiConverterOptionalBool.check_lower(skip_checks) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind( + self._uniffi_clone_pointer(), + _UniffiConverterTypeTransactionKind.lower(tx_kind), + _UniffiConverterTypeTransactionMetadata.lower(tx_meta), + _UniffiConverterOptionalBool.lower(skip_checks) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, + # lift function + _UniffiConverterTypeDryRunResult.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def dynamic_field(self, address: "Address",type_tag: "TypeTag",name: "Value") -> "typing.Optional[DynamicFieldOutput]": + """ + Access a dynamic field on an object using its name. Names are arbitrary + Move values whose type have copy, drop, and store, and are specified + using their type, and their BCS contents, Base64 encoded. + + The `name` argument is a json serialized type. + + This returns [`DynamicFieldOutput`] which contains the name, the value + as json, and object. + + # Example + ```rust,ignore + + let client = iota_graphql_client::Client::new_devnet(); + let address = Address::from_str("0x5").unwrap(); + let df = client.dynamic_field_with_name(address, "u64", 2u64).await.unwrap(); + + # alternatively, pass in the bcs bytes + let bcs = base64ct::Base64::decode_vec("AgAAAAAAAAA=").unwrap(); + let df = client.dynamic_field(address, "u64", BcsName(bcs)).await.unwrap(); + ``` + """ + + _UniffiConverterTypeAddress.check_lower(address) + + _UniffiConverterTypeTypeTag.check_lower(type_tag) + + _UniffiConverterTypeValue.check_lower(name) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field( + self._uniffi_clone_pointer(), + _UniffiConverterTypeAddress.lower(address), + _UniffiConverterTypeTypeTag.lower(type_tag), + _UniffiConverterTypeValue.lower(name) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeDynamicFieldOutput.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def dynamic_fields(self, address: "Address",pagination_filter: "PaginationFilter") -> "DynamicFieldOutputPage": + """ + Get a page of dynamic fields for the provided address. Note that this + will also fetch dynamic fields on wrapped objects. + + This returns [`Page`] of [`DynamicFieldOutput`]s. + """ + + _UniffiConverterTypeAddress.check_lower(address) + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields( + self._uniffi_clone_pointer(), + _UniffiConverterTypeAddress.lower(address), + _UniffiConverterTypePaginationFilter.lower(pagination_filter) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterTypeDynamicFieldOutputPage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def dynamic_object_field(self, address: "Address",type_tag: "TypeTag",name: "Value") -> "typing.Optional[DynamicFieldOutput]": + """ + Access a dynamic object field on an object using its name. Names are + arbitrary Move values whose type have copy, drop, and store, and are + specified using their type, and their BCS contents, Base64 encoded. + + The `name` argument is a json serialized type. + + This returns [`DynamicFieldOutput`] which contains the name, the value + as json, and object. + """ + + _UniffiConverterTypeAddress.check_lower(address) + + _UniffiConverterTypeTypeTag.check_lower(type_tag) + + _UniffiConverterTypeValue.check_lower(name) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field( + self._uniffi_clone_pointer(), + _UniffiConverterTypeAddress.lower(address), + _UniffiConverterTypeTypeTag.lower(type_tag), + _UniffiConverterTypeValue.lower(name) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeDynamicFieldOutput.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def epoch(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Epoch]": + """ + Return the epoch information for the provided epoch. If no epoch is + provided, it will return the last known epoch. + """ + + if epoch is _DEFAULT: + epoch = None + _UniffiConverterOptionalUInt64.check_lower(epoch) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch( + self._uniffi_clone_pointer(), + _UniffiConverterOptionalUInt64.lower(epoch) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeEpoch.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def epoch_total_checkpoints(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": + """ + Return the number of checkpoints in this epoch. This will return + `Ok(None)` if the epoch requested is not available in the GraphQL + service (e.g., due to pruning). + """ + + if epoch is _DEFAULT: + epoch = None + _UniffiConverterOptionalUInt64.check_lower(epoch) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints( + self._uniffi_clone_pointer(), + _UniffiConverterOptionalUInt64.lower(epoch) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalUInt64.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def epoch_total_transaction_blocks(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": + """ + Return the number of transaction blocks in this epoch. This will return + `Ok(None)` if the epoch requested is not available in the GraphQL + service (e.g., due to pruning). + """ + + if epoch is _DEFAULT: + epoch = None + _UniffiConverterOptionalUInt64.check_lower(epoch) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks( + self._uniffi_clone_pointer(), + _UniffiConverterOptionalUInt64.lower(epoch) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalUInt64.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def events(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[EventFilter]]" = _DEFAULT) -> "EventPage": + """ + Return a page of tuple (event, transaction digest) based on the + (optional) event filter. + """ + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + + if filter is _DEFAULT: + filter = None + _UniffiConverterOptionalTypeEventFilter.check_lower(filter) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events( + self._uniffi_clone_pointer(), + _UniffiConverterTypePaginationFilter.lower(pagination_filter), + _UniffiConverterOptionalTypeEventFilter.lower(filter) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterTypeEventPage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def execute_tx(self, signatures: "typing.List[UserSignature]",tx: "Transaction") -> "typing.Optional[TransactionEffects]": + """ + Execute a transaction. + """ + + _UniffiConverterSequenceTypeUserSignature.check_lower(signatures) + + _UniffiConverterTypeTransaction.check_lower(tx) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx( + self._uniffi_clone_pointer(), + _UniffiConverterSequenceTypeUserSignature.lower(signatures), + _UniffiConverterTypeTransaction.lower(tx) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeTransactionEffects.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def latest_checkpoint_sequence_number(self, ) -> "typing.Optional[int]": + """ + Return the sequence number of the latest checkpoint that has been + executed. + """ + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number( + self._uniffi_clone_pointer(), + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalUInt64.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def max_page_size(self, ) -> "int": + """ + Lazily fetch the max page size + """ + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size( + self._uniffi_clone_pointer(), + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i32, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i32, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i32, + # lift function + _UniffiConverterInt32.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def move_object_contents(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Value]": + """ + Return the contents' JSON of an object that is a Move object. + + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. + """ + + _UniffiConverterTypeObjectId.check_lower(object_id) + + if version is _DEFAULT: + version = None + _UniffiConverterOptionalUInt64.check_lower(version) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents( + self._uniffi_clone_pointer(), + _UniffiConverterTypeObjectId.lower(object_id), + _UniffiConverterOptionalUInt64.lower(version) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeValue.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def move_object_contents_bcs(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[bytes]": + """ + Return the BCS of an object that is a Move object. + + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. + """ + + _UniffiConverterTypeObjectId.check_lower(object_id) + + if version is _DEFAULT: + version = None + _UniffiConverterOptionalUInt64.check_lower(version) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs( + self._uniffi_clone_pointer(), + _UniffiConverterTypeObjectId.lower(object_id), + _UniffiConverterOptionalUInt64.lower(version) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalBytes.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def normalized_move_function(self, package: "str",module: "str",function: "str",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[MoveFunction]": + """ + Return the normalized Move function data for the provided package, + module, and function. + """ + + _UniffiConverterString.check_lower(package) + + _UniffiConverterString.check_lower(module) + + _UniffiConverterString.check_lower(function) + + if version is _DEFAULT: + version = None + _UniffiConverterOptionalUInt64.check_lower(version) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function( + self._uniffi_clone_pointer(), + _UniffiConverterString.lower(package), + _UniffiConverterString.lower(module), + _UniffiConverterString.lower(function), + _UniffiConverterOptionalUInt64.lower(version) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeMoveFunction.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def normalized_move_module(self, package: "str",module: "str",pagination_filter_enums: "PaginationFilter",pagination_filter_friends: "PaginationFilter",pagination_filter_functions: "PaginationFilter",pagination_filter_structs: "PaginationFilter",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[MoveModule]": + """ + Return the normalized Move module data for the provided module. + """ + + _UniffiConverterString.check_lower(package) + + _UniffiConverterString.check_lower(module) + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter_enums) + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter_friends) + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter_functions) + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter_structs) + + if version is _DEFAULT: + version = None + _UniffiConverterOptionalUInt64.check_lower(version) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module( + self._uniffi_clone_pointer(), + _UniffiConverterString.lower(package), + _UniffiConverterString.lower(module), + _UniffiConverterTypePaginationFilter.lower(pagination_filter_enums), + _UniffiConverterTypePaginationFilter.lower(pagination_filter_friends), + _UniffiConverterTypePaginationFilter.lower(pagination_filter_functions), + _UniffiConverterTypePaginationFilter.lower(pagination_filter_structs), + _UniffiConverterOptionalUInt64.lower(version) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeMoveModule.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def object(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Object]": + """ + Return an object based on the provided [`Address`]. + + If the object does not exist (e.g., due to pruning), this will return + `Ok(None)`. Similarly, if this is not an object but an address, it + will return `Ok(None)`. + """ + + _UniffiConverterTypeObjectId.check_lower(object_id) + + if version is _DEFAULT: + version = None + _UniffiConverterOptionalUInt64.check_lower(version) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object( + self._uniffi_clone_pointer(), + _UniffiConverterTypeObjectId.lower(object_id), + _UniffiConverterOptionalUInt64.lower(version) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeObject.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def object_bcs(self, object_id: "ObjectId") -> "typing.Optional[bytes]": + """ + Return the object's bcs content [`Vec`] based on the provided + [`Address`]. + """ + + _UniffiConverterTypeObjectId.check_lower(object_id) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs( + self._uniffi_clone_pointer(), + _UniffiConverterTypeObjectId.lower(object_id) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalBytes.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def objects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[ObjectFilter]]" = _DEFAULT) -> "ObjectPage": + """ + Return a page of objects based on the provided parameters. + + Use this function together with the [`ObjectFilter::owner`] to get the + objects owned by an address. + + # Example + + ```rust,ignore + let filter = ObjectFilter { + type_tag: None, + owner: Some(Address::from_str("test").unwrap().into()), + object_ids: None, + }; + + let owned_objects = client.objects(None, None, Some(filter), None, None).await; + ``` + """ + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + + if filter is _DEFAULT: + filter = None + _UniffiConverterOptionalTypeObjectFilter.check_lower(filter) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects( + self._uniffi_clone_pointer(), + _UniffiConverterTypePaginationFilter.lower(pagination_filter), + _UniffiConverterOptionalTypeObjectFilter.lower(filter) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterTypeObjectPage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def package(self, address: "Address",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[MovePackage]": + """ + The package corresponding to the given address (at the optionally given + version). When no version is given, the package is loaded directly + from the address given. Otherwise, the address is translated before + loading to point to the package whose original ID matches + the package at address, but whose version is version. For non-system + packages, this might result in a different address than address + because different versions of a package, introduced by upgrades, + exist at distinct addresses. + + Note that this interpretation of version is different from a historical + object read (the interpretation of version for the object query). + """ + + _UniffiConverterTypeAddress.check_lower(address) + + if version is _DEFAULT: + version = None + _UniffiConverterOptionalUInt64.check_lower(version) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package( + self._uniffi_clone_pointer(), + _UniffiConverterTypeAddress.lower(address), + _UniffiConverterOptionalUInt64.lower(version) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeMovePackage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def package_latest(self, address: "Address") -> "typing.Optional[MovePackage]": + """ + Fetch the latest version of the package at address. + This corresponds to the package with the highest version that shares its + original ID with the package at address. + """ + + _UniffiConverterTypeAddress.check_lower(address) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest( + self._uniffi_clone_pointer(), + _UniffiConverterTypeAddress.lower(address) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeMovePackage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def package_versions(self, address: "Address",pagination_filter: "PaginationFilter",after_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "MovePackagePage": + """ + Fetch all versions of package at address (packages that share this + package's original ID), optionally bounding the versions exclusively + from below with afterVersion, or from above with beforeVersion. + """ + + _UniffiConverterTypeAddress.check_lower(address) + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + + if after_version is _DEFAULT: + after_version = None + _UniffiConverterOptionalUInt64.check_lower(after_version) + + if before_version is _DEFAULT: + before_version = None + _UniffiConverterOptionalUInt64.check_lower(before_version) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions( + self._uniffi_clone_pointer(), + _UniffiConverterTypeAddress.lower(address), + _UniffiConverterTypePaginationFilter.lower(pagination_filter), + _UniffiConverterOptionalUInt64.lower(after_version), + _UniffiConverterOptionalUInt64.lower(before_version) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterTypeMovePackagePage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def packages(self, pagination_filter: "PaginationFilter",after_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "MovePackagePage": + """ + The Move packages that exist in the network, optionally filtered to be + strictly before beforeCheckpoint and/or strictly after + afterCheckpoint. + + This query returns all versions of a given user package that appear + between the specified checkpoints, but only records the latest + versions of system packages. + """ + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + + if after_checkpoint is _DEFAULT: + after_checkpoint = None + _UniffiConverterOptionalUInt64.check_lower(after_checkpoint) + + if before_checkpoint is _DEFAULT: + before_checkpoint = None + _UniffiConverterOptionalUInt64.check_lower(before_checkpoint) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages( + self._uniffi_clone_pointer(), + _UniffiConverterTypePaginationFilter.lower(pagination_filter), + _UniffiConverterOptionalUInt64.lower(after_checkpoint), + _UniffiConverterOptionalUInt64.lower(before_checkpoint) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterTypeMovePackagePage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def protocol_config(self, version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[ProtocolConfigs]": + """ + Get the protocol configuration. + """ + + if version is _DEFAULT: + version = None + _UniffiConverterOptionalUInt64.check_lower(version) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config( + self._uniffi_clone_pointer(), + _UniffiConverterOptionalUInt64.lower(version) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeProtocolConfigs.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def reference_gas_price(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": + """ + Get the reference gas price for the provided epoch or the last known one + if no epoch is provided. + + This will return `Ok(None)` if the epoch requested is not available in + the GraphQL service (e.g., due to pruning). + """ + + if epoch is _DEFAULT: + epoch = None + _UniffiConverterOptionalUInt64.check_lower(epoch) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price( + self._uniffi_clone_pointer(), + _UniffiConverterOptionalUInt64.lower(epoch) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalUInt64.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def service_config(self, ) -> "ServiceConfig": + """ + Get the GraphQL service configuration, including complexity limits, read + and mutation limits, supported versions, and others. + """ + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config( + self._uniffi_clone_pointer(), + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, + # lift function + _UniffiConverterTypeServiceConfig.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def set_rpc_server(self, server: "str") -> None: + + """ + Set the server address for the GraphQL GraphQL client. It should be a + valid URL with a host and optionally a port number. + """ + + _UniffiConverterString.check_lower(server) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server( + self._uniffi_clone_pointer(), + _UniffiConverterString.lower(server) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_void, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_void, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_void, + # lift function + lambda val: None, + + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def total_supply(self, coin_type: "str") -> "typing.Optional[int]": + """ + Get total supply for the coin type. + """ + + _UniffiConverterString.check_lower(coin_type) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply( + self._uniffi_clone_pointer(), + _UniffiConverterString.lower(coin_type) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalUInt64.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def total_transaction_blocks(self, ) -> "typing.Optional[int]": + """ + The total number of transaction blocks in the network by the end of the + last known checkpoint. + """ + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks( + self._uniffi_clone_pointer(), + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalUInt64.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def total_transaction_blocks_by_digest(self, digest: "CheckpointContentsDigest") -> "typing.Optional[int]": + """ + The total number of transaction blocks in the network by the end of the + provided checkpoint digest. + """ + + _UniffiConverterTypeCheckpointContentsDigest.check_lower(digest) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest( + self._uniffi_clone_pointer(), + _UniffiConverterTypeCheckpointContentsDigest.lower(digest) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalUInt64.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def total_transaction_blocks_by_seq_num(self, seq_num: "int") -> "typing.Optional[int]": + """ + The total number of transaction blocks in the network by the end of the + provided checkpoint sequence number. + """ + + _UniffiConverterUInt64.check_lower(seq_num) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num( + self._uniffi_clone_pointer(), + _UniffiConverterUInt64.lower(seq_num) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalUInt64.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def transaction(self, digest: "TransactionDigest") -> "typing.Optional[SignedTransaction]": + """ + Get a transaction by its digest. + """ + + _UniffiConverterTypeTransactionDigest.check_lower(digest) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction( + self._uniffi_clone_pointer(), + _UniffiConverterTypeTransactionDigest.lower(digest) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeSignedTransaction.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def transaction_data_effects(self, digest: "TransactionDigest") -> "typing.Optional[TransactionDataEffects]": + """ + Get a transaction's data and effects by its digest. + """ + + _UniffiConverterTypeTransactionDigest.check_lower(digest) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects( + self._uniffi_clone_pointer(), + _UniffiConverterTypeTransactionDigest.lower(digest) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeTransactionDataEffects.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def transaction_effects(self, digest: "TransactionDigest") -> "typing.Optional[TransactionEffects]": + """ + Get a transaction's effects by its digest. + """ + + _UniffiConverterTypeTransactionDigest.check_lower(digest) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects( + self._uniffi_clone_pointer(), + _UniffiConverterTypeTransactionDigest.lower(digest) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterOptionalTypeTransactionEffects.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def transactions(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT) -> "SignedTransactionPage": + """ + Get a page of transactions based on the provided filters. + """ + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + + if filter is _DEFAULT: + filter = None + _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions( + self._uniffi_clone_pointer(), + _UniffiConverterTypePaginationFilter.lower(pagination_filter), + _UniffiConverterOptionalTypeTransactionsFilter.lower(filter) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterTypeSignedTransactionPage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def transactions_data_effects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT) -> "TransactionDataEffectsPage": + """ + Get a page of transactions' data and effects based on the provided + filters. + """ + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + + if filter is _DEFAULT: + filter = None + _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects( + self._uniffi_clone_pointer(), + _UniffiConverterTypePaginationFilter.lower(pagination_filter), + _UniffiConverterOptionalTypeTransactionsFilter.lower(filter) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterTypeTransactionDataEffectsPage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + async def transactions_effects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT) -> "TransactionEffectsPage": + """ + Get a page of transactions' effects based on the provided filters. + """ + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + + if filter is _DEFAULT: + filter = None + _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) + + return await _uniffi_rust_call_async( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects( + self._uniffi_clone_pointer(), + _UniffiConverterTypePaginationFilter.lower(pagination_filter), + _UniffiConverterOptionalTypeTransactionsFilter.lower(filter) + ), + _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, + # lift function + _UniffiConverterTypeTransactionEffectsPage.lift, + + # Error FFI converter +_UniffiConverterTypeSdkFfiError, + + ) + + + + + +class _UniffiConverterTypeGraphQlClient: + + @staticmethod + def lift(value: int): + return GraphQlClient._make_instance_(value) + + @staticmethod + def check_lower(value: GraphQlClient): + if not isinstance(value, GraphQlClient): + raise TypeError("Expected GraphQlClient instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: GraphQlClientProtocol): + if not isinstance(value, GraphQlClient): + raise TypeError("Expected GraphQlClient instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: GraphQlClientProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class MoveFunctionProtocol(typing.Protocol): + pass +# MoveFunction is a Rust-only trait - it's a wrapper around a Rust implementation. +class MoveFunction(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movefunction, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movefunction, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + + + +class _UniffiConverterTypeMoveFunction: + + @staticmethod + def lift(value: int): + return MoveFunction._make_instance_(value) + + @staticmethod + def check_lower(value: MoveFunction): + if not isinstance(value, MoveFunction): + raise TypeError("Expected MoveFunction instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: MoveFunctionProtocol): + if not isinstance(value, MoveFunction): + raise TypeError("Expected MoveFunction instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: MoveFunctionProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class MoveModuleProtocol(typing.Protocol): + pass +# MoveModule is a Rust-only trait - it's a wrapper around a Rust implementation. +class MoveModule(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movemodule, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movemodule, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + + + +class _UniffiConverterTypeMoveModule: + + @staticmethod + def lift(value: int): + return MoveModule._make_instance_(value) + + @staticmethod + def check_lower(value: MoveModule): + if not isinstance(value, MoveModule): + raise TypeError("Expected MoveModule instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: MoveModuleProtocol): + if not isinstance(value, MoveModule): + raise TypeError("Expected MoveModule instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: MoveModuleProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class MovePackageProtocol(typing.Protocol): + pass +# MovePackage is a Rust-only trait - it's a wrapper around a Rust implementation. +class MovePackage(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movepackage, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movepackage, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + + + +class _UniffiConverterTypeMovePackage: + + @staticmethod + def lift(value: int): + return MovePackage._make_instance_(value) + + @staticmethod + def check_lower(value: MovePackage): + if not isinstance(value, MovePackage): + raise TypeError("Expected MovePackage instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: MovePackageProtocol): + if not isinstance(value, MovePackage): + raise TypeError("Expected MovePackage instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: MovePackageProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class MoveStructProtocol(typing.Protocol): + pass +# MoveStruct is a Rust-only trait - it's a wrapper around a Rust implementation. +class MoveStruct(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movestruct, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movestruct, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + + + +class _UniffiConverterTypeMoveStruct: + + @staticmethod + def lift(value: int): + return MoveStruct._make_instance_(value) + + @staticmethod + def check_lower(value: MoveStruct): + if not isinstance(value, MoveStruct): + raise TypeError("Expected MoveStruct instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: MoveStructProtocol): + if not isinstance(value, MoveStruct): + raise TypeError("Expected MoveStruct instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: MoveStructProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class MultisigAggregatedSignatureProtocol(typing.Protocol): + """ + Aggregated signature from members of a multisig committee. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + multisig-aggregated-signature = (vector multisig-member-signature) + u16 ; bitmap + multisig-committee + ``` + + There is also a legacy encoding for this type defined as: + + ```text + legacy-multisig-aggregated-signature = (vector multisig-member-signature) + roaring-bitmap ; bitmap + legacy-multisig-committee + roaring-bitmap = bytes ; where the contents of the bytes are valid + ; according to the serialized spec for + ; roaring bitmaps + ``` + + See [here](https://github.com/RoaringBitmap/RoaringFormatSpec) for the specification for the + serialized format of RoaringBitmaps. + """ + + def bitmap(self, ): + """ + The bitmap that indicates which committee members provided their + signature. + """ + + raise NotImplementedError + def committee(self, ): + raise NotImplementedError + def signatures(self, ): + """ + The list of signatures from committee members + """ + + raise NotImplementedError +# MultisigAggregatedSignature is a Rust-only trait - it's a wrapper around a Rust implementation. +class MultisigAggregatedSignature(): + """ + Aggregated signature from members of a multisig committee. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + multisig-aggregated-signature = (vector multisig-member-signature) + u16 ; bitmap + multisig-committee + ``` + + There is also a legacy encoding for this type defined as: + + ```text + legacy-multisig-aggregated-signature = (vector multisig-member-signature) + roaring-bitmap ; bitmap + legacy-multisig-committee + roaring-bitmap = bytes ; where the contents of the bytes are valid + ; according to the serialized spec for + ; roaring bitmaps + ``` + + See [here](https://github.com/RoaringBitmap/RoaringFormatSpec) for the specification for the + serialized format of RoaringBitmaps. + """ + + _pointer: ctypes.c_void_p + def __init__(self, committee: "MultisigCommittee",signatures: "typing.List[MultisigMemberSignature]",bitmap: "int"): + """ + Construct a new aggregated multisig signature. + + Since the list of signatures doesn't contain sufficient information to + identify which committee member provided the signature, it is up to + the caller to ensure that the provided signature list is in the same + order as it's corresponding member in the provided committee + and that it's position in the provided bitmap is set. + """ + + _UniffiConverterTypeMultisigCommittee.check_lower(committee) + + _UniffiConverterSequenceTypeMultisigMemberSignature.check_lower(signatures) + + _UniffiConverterUInt16.check_lower(bitmap) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigaggregatedsignature_new, + _UniffiConverterTypeMultisigCommittee.lower(committee), + _UniffiConverterSequenceTypeMultisigMemberSignature.lower(signatures), + _UniffiConverterUInt16.lower(bitmap)) + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigaggregatedsignature, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigaggregatedsignature, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst - let client = iota_graphql_client::Client::new_devnet(); - let address = Address::from_str("0x5").unwrap(); - let df = client.dynamic_field_with_name(address, "u64", 2u64).await.unwrap(); - # alternatively, pass in the bcs bytes - let bcs = base64ct::Base64::decode_vec("AgAAAAAAAAA=").unwrap(); - let df = client.dynamic_field(address, "u64", BcsName(bcs)).await.unwrap(); - ``` + def bitmap(self, ) -> "int": """ - - raise NotImplementedError - def dynamic_fields(self, address: "Address",pagination_filter: "PaginationFilter"): + The bitmap that indicates which committee members provided their + signature. """ - Get a page of dynamic fields for the provided address. Note that this - will also fetch dynamic fields on wrapped objects. - This returns [`Page`] of [`DynamicFieldOutput`]s. - """ + return _UniffiConverterUInt16.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap,self._uniffi_clone_pointer(),) + ) - raise NotImplementedError - def dynamic_object_field(self, address: "Address",type_tag: "TypeTag",name: "Value"): - """ - Access a dynamic object field on an object using its name. Names are - arbitrary Move values whose type have copy, drop, and store, and are - specified using their type, and their BCS contents, Base64 encoded. - The `name` argument is a json serialized type. - This returns [`DynamicFieldOutput`] which contains the name, the value - as json, and object. - """ - raise NotImplementedError - def epoch(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return the epoch information for the provided epoch. If no epoch is - provided, it will return the last known epoch. - """ - raise NotImplementedError - def epoch_total_checkpoints(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return the number of checkpoints in this epoch. This will return - `Ok(None)` if the epoch requested is not available in the GraphQL - service (e.g., due to pruning). - """ + def committee(self, ) -> "MultisigCommittee": + return _UniffiConverterTypeMultisigCommittee.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee,self._uniffi_clone_pointer(),) + ) - raise NotImplementedError - def epoch_total_transaction_blocks(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + + + + + def signatures(self, ) -> "typing.List[MultisigMemberSignature]": """ - Return the number of transaction blocks in this epoch. This will return - `Ok(None)` if the epoch requested is not available in the GraphQL - service (e.g., due to pruning). + The list of signatures from committee members """ - raise NotImplementedError - def events(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[EventFilter]]" = _DEFAULT): + return _UniffiConverterSequenceTypeMultisigMemberSignature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_signatures,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeMultisigAggregatedSignature: + + @staticmethod + def lift(value: int): + return MultisigAggregatedSignature._make_instance_(value) + + @staticmethod + def check_lower(value: MultisigAggregatedSignature): + if not isinstance(value, MultisigAggregatedSignature): + raise TypeError("Expected MultisigAggregatedSignature instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: MultisigAggregatedSignatureProtocol): + if not isinstance(value, MultisigAggregatedSignature): + raise TypeError("Expected MultisigAggregatedSignature instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: MultisigAggregatedSignatureProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class MultisigCommitteeProtocol(typing.Protocol): + """ + A multisig committee + + A `MultisigCommittee` is a set of members who collectively control a single + `Address` on the IOTA blockchain. The number of required signautres to + authorize the execution of a transaction is determined by + `(signature_0_weight + signature_1_weight ..) >= threshold`. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + multisig-committee = (vector multisig-member) + u16 ; threshold + ``` + + There is also a legacy encoding for this type defined as: + + ```text + legacy-multisig-committee = (vector legacy-multisig-member) + u16 ; threshold + ``` + """ + + def is_valid(self, ): """ - Return a page of tuple (event, transaction digest) based on the - (optional) event filter. + Checks if the Committee is valid. + + A valid committee is one that: + - Has a nonzero threshold + - Has at least one member + - Has at most ten members + - No member has weight 0 + - the sum of the weights of all members must be larger than the + threshold + - contains no duplicate members """ raise NotImplementedError - def execute_tx(self, signatures: "typing.List[UserSignature]",tx: "Transaction"): + def members(self, ): """ - Execute a transaction. + The members of the committee """ raise NotImplementedError - def latest_checkpoint_sequence_number(self, ): + def scheme(self, ): """ - Return the sequence number of the latest checkpoint that has been - executed. + Return the flag for this signature scheme """ raise NotImplementedError - def max_page_size(self, ): + def threshold(self, ): """ - Lazily fetch the max page size + The total signature weight required to authorize a transaction for the + address corresponding to this `MultisigCommittee`. """ raise NotImplementedError - def move_object_contents(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return the contents' JSON of an object that is a Move object. +# MultisigCommittee is a Rust-only trait - it's a wrapper around a Rust implementation. +class MultisigCommittee(): + """ + A multisig committee - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. - """ + A `MultisigCommittee` is a set of members who collectively control a single + `Address` on the IOTA blockchain. The number of required signautres to + authorize the execution of a transaction is determined by + `(signature_0_weight + signature_1_weight ..) >= threshold`. - raise NotImplementedError - def move_object_contents_bcs(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return the BCS of an object that is a Move object. + # BCS - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. - """ + The BCS serialized form for this type is defined by the following ABNF: - raise NotImplementedError - def normalized_move_function(self, package: "str",module: "str",function: "str",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return the normalized Move function data for the provided package, - module, and function. - """ + ```text + multisig-committee = (vector multisig-member) + u16 ; threshold + ``` - raise NotImplementedError - def normalized_move_module(self, package: "str",module: "str",pagination_filter_enums: "PaginationFilter",pagination_filter_friends: "PaginationFilter",pagination_filter_functions: "PaginationFilter",pagination_filter_structs: "PaginationFilter",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return the normalized Move module data for the provided module. - """ + There is also a legacy encoding for this type defined as: - raise NotImplementedError - def object(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return an object based on the provided [`Address`]. + ```text + legacy-multisig-committee = (vector legacy-multisig-member) + u16 ; threshold + ``` + """ - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. + _pointer: ctypes.c_void_p + def __init__(self, members: "typing.List[MultisigMember]",threshold: "int"): """ + Construct a new committee from a list of `MultisigMember`s and a + `threshold`. - raise NotImplementedError - def object_bcs(self, object_id: "ObjectId"): - """ - Return the object's bcs content [`Vec`] based on the provided - [`Address`]. + Note that the order of the members is significant towards deriving the + `Address` governed by this committee. """ - raise NotImplementedError - def objects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[ObjectFilter]]" = _DEFAULT): - """ - Return a page of objects based on the provided parameters. + _UniffiConverterSequenceTypeMultisigMember.check_lower(members) + + _UniffiConverterUInt16.check_lower(threshold) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigcommittee_new, + _UniffiConverterSequenceTypeMultisigMember.lower(members), + _UniffiConverterUInt16.lower(threshold)) - Use this function together with the [`ObjectFilter::owner`] to get the - objects owned by an address. + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigcommittee, pointer) - # Example + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee, self._pointer) - ```rust,ignore - let filter = ObjectFilter { - type_tag: None, - owner: Some(Address::from_str("test").unwrap().into()), - object_ids: None, - }; + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst - let owned_objects = client.objects(None, None, Some(filter), None, None).await; - ``` - """ - raise NotImplementedError - def package(self, address: "Address",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + def is_valid(self, ) -> "bool": """ - The package corresponding to the given address (at the optionally given - version). When no version is given, the package is loaded directly - from the address given. Otherwise, the address is translated before - loading to point to the package whose original ID matches - the package at address, but whose version is version. For non-system - packages, this might result in a different address than address - because different versions of a package, introduced by upgrades, - exist at distinct addresses. + Checks if the Committee is valid. - Note that this interpretation of version is different from a historical - object read (the interpretation of version for the object query). + A valid committee is one that: + - Has a nonzero threshold + - Has at least one member + - Has at most ten members + - No member has weight 0 + - the sum of the weights of all members must be larger than the + threshold + - contains no duplicate members """ - raise NotImplementedError - def package_latest(self, address: "Address"): + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_is_valid,self._uniffi_clone_pointer(),) + ) + + + + + + def members(self, ) -> "typing.List[MultisigMember]": """ - Fetch the latest version of the package at address. - This corresponds to the package with the highest version that shares its - original ID with the package at address. + The members of the committee """ - raise NotImplementedError - def package_versions(self, address: "Address",pagination_filter: "PaginationFilter",after_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + return _UniffiConverterSequenceTypeMultisigMember.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members,self._uniffi_clone_pointer(),) + ) + + + + + + def scheme(self, ) -> "SignatureScheme": """ - Fetch all versions of package at address (packages that share this - package's original ID), optionally bounding the versions exclusively - from below with afterVersion, or from above with beforeVersion. + Return the flag for this signature scheme """ - raise NotImplementedError - def packages(self, pagination_filter: "PaginationFilter",after_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - The Move packages that exist in the network, optionally filtered to be - strictly before beforeCheckpoint and/or strictly after - afterCheckpoint. + return _UniffiConverterTypeSignatureScheme.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_scheme,self._uniffi_clone_pointer(),) + ) - This query returns all versions of a given user package that appear - between the specified checkpoints, but only records the latest - versions of system packages. - """ - raise NotImplementedError - def protocol_config(self, version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): + + + + def threshold(self, ) -> "int": """ - Get the protocol configuration. + The total signature weight required to authorize a transaction for the + address corresponding to this `MultisigCommittee`. """ - raise NotImplementedError - def reference_gas_price(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Get the reference gas price for the provided epoch or the last known one - if no epoch is provided. + return _UniffiConverterUInt16.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_threshold,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeMultisigCommittee: + + @staticmethod + def lift(value: int): + return MultisigCommittee._make_instance_(value) + + @staticmethod + def check_lower(value: MultisigCommittee): + if not isinstance(value, MultisigCommittee): + raise TypeError("Expected MultisigCommittee instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: MultisigCommitteeProtocol): + if not isinstance(value, MultisigCommittee): + raise TypeError("Expected MultisigCommittee instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: MultisigCommitteeProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class MultisigMemberProtocol(typing.Protocol): + """ + A member in a multisig committee - This will return `Ok(None)` if the epoch requested is not available in - the GraphQL service (e.g., due to pruning). - """ + # BCS - raise NotImplementedError - def service_config(self, ): - """ - Get the GraphQL service configuration, including complexity limits, read - and mutation limits, supported versions, and others. - """ + The BCS serialized form for this type is defined by the following ABNF: - raise NotImplementedError - def set_rpc_server(self, server: "str"): - """ - Set the server address for the GraphQL GraphQL client. It should be a - valid URL with a host and optionally a port number. - """ + ```text + multisig-member = multisig-member-public-key + u8 ; weight + ``` - raise NotImplementedError - def total_supply(self, coin_type: "str"): - """ - Get total supply for the coin type. - """ + There is also a legacy encoding for this type defined as: - raise NotImplementedError - def total_transaction_blocks(self, ): - """ - The total number of transaction blocks in the network by the end of the - last known checkpoint. - """ + ```text + legacy-multisig-member = legacy-multisig-member-public-key + u8 ; weight + ``` + """ - raise NotImplementedError - def total_transaction_blocks_by_digest(self, digest: "CheckpointContentsDigest"): + def public_key(self, ): """ - The total number of transaction blocks in the network by the end of the - provided checkpoint digest. + This member's public key. """ raise NotImplementedError - def total_transaction_blocks_by_seq_num(self, seq_num: "int"): + def weight(self, ): """ - The total number of transaction blocks in the network by the end of the - provided checkpoint sequence number. + Weight of this member's signature. """ raise NotImplementedError - def transaction(self, digest: "TransactionDigest"): - """ - Get a transaction by its digest. - """ +# MultisigMember is a Rust-only trait - it's a wrapper around a Rust implementation. +class MultisigMember(): + """ + A member in a multisig committee - raise NotImplementedError - def transaction_data_effects(self, digest: "TransactionDigest"): - """ - Get a transaction's data and effects by its digest. - """ + # BCS - raise NotImplementedError - def transaction_effects(self, digest: "TransactionDigest"): - """ - Get a transaction's effects by its digest. - """ + The BCS serialized form for this type is defined by the following ABNF: - raise NotImplementedError - def transactions(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT): - """ - Get a page of transactions based on the provided filters. - """ + ```text + multisig-member = multisig-member-public-key + u8 ; weight + ``` - raise NotImplementedError - def transactions_data_effects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT): - """ - Get a page of transactions' data and effects based on the provided - filters. - """ + There is also a legacy encoding for this type defined as: - raise NotImplementedError - def transactions_effects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT): - """ - Get a page of transactions' effects based on the provided filters. - """ + ```text + legacy-multisig-member = legacy-multisig-member-public-key + u8 ; weight + ``` + """ - raise NotImplementedError -# GraphQlClient is a Rust-only trait - it's a wrapper around a Rust implementation. -class GraphQlClient(): _pointer: ctypes.c_void_p - def __init__(self, server: "str"): + def __init__(self, public_key: "MultisigMemberPublicKey",weight: "int"): """ - Create a new GraphQL client with the provided server address. + Construct a new member from a `MultisigMemberPublicKey` and a `weight`. """ - _UniffiConverterString.check_lower(server) + _UniffiConverterTypeMultisigMemberPublicKey.check_lower(public_key) - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new, - _UniffiConverterString.lower(server)) + _UniffiConverterUInt8.check_lower(weight) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_multisigmember_new, + _UniffiConverterTypeMultisigMemberPublicKey.lower(public_key), + _UniffiConverterUInt8.lower(weight)) def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_graphqlclient, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmember, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_graphqlclient, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmember, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -12379,1439 +17588,1185 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst - @classmethod - def new_devnet(cls, ): + + + def public_key(self, ) -> "MultisigMemberPublicKey": """ - Create a new GraphQL client connected to the `devnet` GraphQL server: - {DEVNET_HOST}. + This member's public key. """ - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_devnet,) - return cls._make_instance_(pointer) + return _UniffiConverterTypeMultisigMemberPublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key,self._uniffi_clone_pointer(),) + ) - @classmethod - def new_localhost(cls, ): + + + + + def weight(self, ) -> "int": """ - Create a new GraphQL client connected to the `localhost` GraphQL server: - {DEFAULT_LOCAL_HOST}. + Weight of this member's signature. """ - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_localhost,) - return cls._make_instance_(pointer) + return _UniffiConverterUInt8.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_weight,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeMultisigMember: + + @staticmethod + def lift(value: int): + return MultisigMember._make_instance_(value) + + @staticmethod + def check_lower(value: MultisigMember): + if not isinstance(value, MultisigMember): + raise TypeError("Expected MultisigMember instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: MultisigMemberProtocol): + if not isinstance(value, MultisigMember): + raise TypeError("Expected MultisigMember instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() @classmethod - def new_mainnet(cls, ): - """ - Create a new GraphQL client connected to the `mainnet` GraphQL server: - {MAINNET_HOST}. - """ + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_mainnet,) - return cls._make_instance_(pointer) + @classmethod + def write(cls, value: MultisigMemberProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class MultisigMemberPublicKeyProtocol(typing.Protocol): + def as_ed25519(self, ): + raise NotImplementedError + def as_ed25519_opt(self, ): + raise NotImplementedError + def as_secp256k1(self, ): + raise NotImplementedError + def as_secp256k1_opt(self, ): + raise NotImplementedError + def as_secp256r1(self, ): + raise NotImplementedError + def as_secp256r1_opt(self, ): + raise NotImplementedError + def as_zklogin(self, ): + raise NotImplementedError + def as_zklogin_opt(self, ): + raise NotImplementedError + def is_ed25519(self, ): + raise NotImplementedError + def is_secp256k1(self, ): + raise NotImplementedError + def is_secp256r1(self, ): + raise NotImplementedError + def is_zklogin(self, ): + raise NotImplementedError +# MultisigMemberPublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. +class MultisigMemberPublicKey(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmemberpublickey, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmemberpublickey, self._pointer) + # Used by alternative constructors or any methods which return this type. @classmethod - def new_testnet(cls, ): - """ - Create a new GraphQL client connected to the `testnet` GraphQL server: - {TESTNET_HOST}. - """ + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new_testnet,) - return cls._make_instance_(pointer) + + def as_ed25519(self, ) -> "Ed25519PublicKey": + return _UniffiConverterTypeEd25519PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519,self._uniffi_clone_pointer(),) + ) - async def active_validators(self, pagination_filter: "PaginationFilter",epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "ValidatorPage": - """ - Get the list of active validators for the provided epoch, including - related metadata. If no epoch is provided, it will return the active - validators for the current epoch. - """ - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators( - self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalUInt64.lower(epoch) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeValidatorPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + + def as_ed25519_opt(self, ) -> "typing.Optional[Ed25519PublicKey]": + return _UniffiConverterOptionalTypeEd25519PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519_opt,self._uniffi_clone_pointer(),) ) - async def balance(self, address: "Address",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT) -> "typing.Optional[int]": - """ - Get the balance of all the coins owned by address for the provided coin - type. Coin type will default to `0x2::coin::Coin<0x2::iota::IOTA>` - if not provided. - """ - _UniffiConverterTypeAddress.check_lower(address) - - if coin_type is _DEFAULT: - coin_type = None - _UniffiConverterOptionalString.check_lower(coin_type) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterOptionalString.lower(coin_type) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def as_secp256k1(self, ) -> "Secp256k1PublicKey": + return _UniffiConverterTypeSecp256k1PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1,self._uniffi_clone_pointer(),) + ) + + + + + + def as_secp256k1_opt(self, ) -> "typing.Optional[Secp256k1PublicKey]": + return _UniffiConverterOptionalTypeSecp256k1PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256k1_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def as_secp256r1(self, ) -> "Secp256r1PublicKey": + return _UniffiConverterTypeSecp256r1PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1,self._uniffi_clone_pointer(),) + ) + + + + + + def as_secp256r1_opt(self, ) -> "typing.Optional[Secp256r1PublicKey]": + return _UniffiConverterOptionalTypeSecp256r1PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_secp256r1_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def as_zklogin(self, ) -> "ZkLoginPublicIdentifier": + return _UniffiConverterTypeZkLoginPublicIdentifier.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin,self._uniffi_clone_pointer(),) ) - async def chain_id(self, ) -> "str": - """ - Get the chain identifier. - """ - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id( - self._uniffi_clone_pointer(), - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterString.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def as_zklogin_opt(self, ) -> "typing.Optional[ZkLoginPublicIdentifier]": + return _UniffiConverterOptionalTypeZkLoginPublicIdentifier.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_zklogin_opt,self._uniffi_clone_pointer(),) ) - async def checkpoint(self, digest: "typing.Union[object, typing.Optional[CheckpointContentsDigest]]" = _DEFAULT,seq_num: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[CheckpointSummary]": - """ - Get the [`CheckpointSummary`] for a given checkpoint digest or - checkpoint id. If none is provided, it will use the last known - checkpoint id. - """ - if digest is _DEFAULT: - digest = None - _UniffiConverterOptionalTypeCheckpointContentsDigest.check_lower(digest) - - if seq_num is _DEFAULT: - seq_num = None - _UniffiConverterOptionalUInt64.check_lower(seq_num) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalTypeCheckpointContentsDigest.lower(digest), - _UniffiConverterOptionalUInt64.lower(seq_num) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeCheckpointSummary.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def is_ed25519(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_ed25519,self._uniffi_clone_pointer(),) ) - async def checkpoints(self, pagination_filter: "PaginationFilter") -> "CheckpointSummaryPage": - """ - Get a page of [`CheckpointSummary`] for the provided parameters. - """ - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints( - self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeCheckpointSummaryPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def is_secp256k1(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256k1,self._uniffi_clone_pointer(),) ) - async def coin_metadata(self, coin_type: "str") -> "typing.Optional[CoinMetadata]": - """ - Get the coin metadata for the coin type. - """ - _UniffiConverterString.check_lower(coin_type) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata( - self._uniffi_clone_pointer(), - _UniffiConverterString.lower(coin_type) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeCoinMetadata.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def is_secp256r1(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_secp256r1,self._uniffi_clone_pointer(),) ) - async def coins(self, owner: "Address",pagination_filter: "PaginationFilter",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT) -> "CoinPage": - """ - Get the list of coins for the specified address. - - If `coin_type` is not provided, it will default to `0x2::coin::Coin`, - which will return all coins. For IOTA coin, pass in the coin type: - `0x2::coin::Coin<0x2::iota::IOTA>`. - """ - _UniffiConverterTypeAddress.check_lower(owner) - - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - if coin_type is _DEFAULT: - coin_type = None - _UniffiConverterOptionalString.check_lower(coin_type) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(owner), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalString.lower(coin_type) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeCoinPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def is_zklogin(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_is_zklogin,self._uniffi_clone_pointer(),) ) - async def dry_run_tx(self, tx: "Transaction",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT) -> "DryRunResult": - """ - Dry run a [`Transaction`] and return the transaction effects and dry run - error (if any). - `skipChecks` optional flag disables the usual verification checks that - prevent access to objects that are owned by addresses other than the - sender, and calling non-public, non-entry functions, and some other - checks. Defaults to false. - """ - _UniffiConverterTypeTransaction.check_lower(tx) - - if skip_checks is _DEFAULT: - skip_checks = None - _UniffiConverterOptionalBool.check_lower(skip_checks) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx( - self._uniffi_clone_pointer(), - _UniffiConverterTypeTransaction.lower(tx), - _UniffiConverterOptionalBool.lower(skip_checks) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, - # lift function - _UniffiConverterTypeDryRunResult.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, +class _UniffiConverterTypeMultisigMemberPublicKey: + + @staticmethod + def lift(value: int): + return MultisigMemberPublicKey._make_instance_(value) + + @staticmethod + def check_lower(value: MultisigMemberPublicKey): + if not isinstance(value, MultisigMemberPublicKey): + raise TypeError("Expected MultisigMemberPublicKey instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: MultisigMemberPublicKeyProtocol): + if not isinstance(value, MultisigMemberPublicKey): + raise TypeError("Expected MultisigMemberPublicKey instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: MultisigMemberPublicKeyProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class MultisigMemberSignatureProtocol(typing.Protocol): + """ + A signature from a member of a multisig committee. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + multisig-member-signature = ed25519-multisig-member-signature / + secp256k1-multisig-member-signature / + secp256r1-multisig-member-signature / + zklogin-multisig-member-signature + + ed25519-multisig-member-signature = %x00 ed25519-signature + secp256k1-multisig-member-signature = %x01 secp256k1-signature + secp256r1-multisig-member-signature = %x02 secp256r1-signature + zklogin-multisig-member-signature = %x03 zklogin-authenticator + ``` + """ + + def as_ed25519(self, ): + raise NotImplementedError + def as_ed25519_opt(self, ): + raise NotImplementedError + def as_secp256k1(self, ): + raise NotImplementedError + def as_secp256k1_opt(self, ): + raise NotImplementedError + def as_secp256r1(self, ): + raise NotImplementedError + def as_secp256r1_opt(self, ): + raise NotImplementedError + def as_zklogin(self, ): + raise NotImplementedError + def as_zklogin_opt(self, ): + raise NotImplementedError + def is_ed25519(self, ): + raise NotImplementedError + def is_secp256k1(self, ): + raise NotImplementedError + def is_secp256r1(self, ): + raise NotImplementedError + def is_zklogin(self, ): + raise NotImplementedError +# MultisigMemberSignature is a Rust-only trait - it's a wrapper around a Rust implementation. +class MultisigMemberSignature(): + """ + A signature from a member of a multisig committee. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + multisig-member-signature = ed25519-multisig-member-signature / + secp256k1-multisig-member-signature / + secp256r1-multisig-member-signature / + zklogin-multisig-member-signature + + ed25519-multisig-member-signature = %x00 ed25519-signature + secp256k1-multisig-member-signature = %x01 secp256k1-signature + secp256r1-multisig-member-signature = %x02 secp256r1-signature + zklogin-multisig-member-signature = %x03 zklogin-authenticator + ``` + """ + + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_multisigmembersignature, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigmembersignature, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + + + def as_ed25519(self, ) -> "Ed25519Signature": + return _UniffiConverterTypeEd25519Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519,self._uniffi_clone_pointer(),) ) - async def dry_run_tx_kind(self, tx_kind: "TransactionKind",tx_meta: "TransactionMetadata",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT) -> "DryRunResult": - """ - Dry run a [`TransactionKind`] and return the transaction effects and dry - run error (if any). - `skipChecks` optional flag disables the usual verification checks that - prevent access to objects that are owned by addresses other than the - sender, and calling non-public, non-entry functions, and some other - checks. Defaults to false. - `tx_meta` is the transaction metadata. - """ + def as_ed25519_opt(self, ) -> "typing.Optional[Ed25519Signature]": + return _UniffiConverterOptionalTypeEd25519Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_ed25519_opt,self._uniffi_clone_pointer(),) + ) + - _UniffiConverterTypeTransactionKind.check_lower(tx_kind) - - _UniffiConverterTypeTransactionMetadata.check_lower(tx_meta) - - if skip_checks is _DEFAULT: - skip_checks = None - _UniffiConverterOptionalBool.check_lower(skip_checks) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx_kind( - self._uniffi_clone_pointer(), - _UniffiConverterTypeTransactionKind.lower(tx_kind), - _UniffiConverterTypeTransactionMetadata.lower(tx_meta), - _UniffiConverterOptionalBool.lower(skip_checks) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, - # lift function - _UniffiConverterTypeDryRunResult.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + + + def as_secp256k1(self, ) -> "Secp256k1Signature": + return _UniffiConverterTypeSecp256k1Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1,self._uniffi_clone_pointer(),) ) - async def dynamic_field(self, address: "Address",type_tag: "TypeTag",name: "Value") -> "typing.Optional[DynamicFieldOutput]": - """ - Access a dynamic field on an object using its name. Names are arbitrary - Move values whose type have copy, drop, and store, and are specified - using their type, and their BCS contents, Base64 encoded. - The `name` argument is a json serialized type. - This returns [`DynamicFieldOutput`] which contains the name, the value - as json, and object. + def as_secp256k1_opt(self, ) -> "typing.Optional[Secp256k1Signature]": + return _UniffiConverterOptionalTypeSecp256k1Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256k1_opt,self._uniffi_clone_pointer(),) + ) - # Example - ```rust,ignore - let client = iota_graphql_client::Client::new_devnet(); - let address = Address::from_str("0x5").unwrap(); - let df = client.dynamic_field_with_name(address, "u64", 2u64).await.unwrap(); - # alternatively, pass in the bcs bytes - let bcs = base64ct::Base64::decode_vec("AgAAAAAAAAA=").unwrap(); - let df = client.dynamic_field(address, "u64", BcsName(bcs)).await.unwrap(); - ``` - """ - _UniffiConverterTypeAddress.check_lower(address) - - _UniffiConverterTypeTypeTag.check_lower(type_tag) - - _UniffiConverterTypeValue.check_lower(name) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterTypeTypeTag.lower(type_tag), - _UniffiConverterTypeValue.lower(name) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeDynamicFieldOutput.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def as_secp256r1(self, ) -> "Secp256r1Signature": + return _UniffiConverterTypeSecp256r1Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1,self._uniffi_clone_pointer(),) ) - async def dynamic_fields(self, address: "Address",pagination_filter: "PaginationFilter") -> "DynamicFieldOutputPage": - """ - Get a page of dynamic fields for the provided address. Note that this - will also fetch dynamic fields on wrapped objects. - This returns [`Page`] of [`DynamicFieldOutput`]s. - """ - _UniffiConverterTypeAddress.check_lower(address) - - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterTypePaginationFilter.lower(pagination_filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeDynamicFieldOutputPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def as_secp256r1_opt(self, ) -> "typing.Optional[Secp256r1Signature]": + return _UniffiConverterOptionalTypeSecp256r1Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_secp256r1_opt,self._uniffi_clone_pointer(),) + ) + + + + + def as_zklogin(self, ) -> "ZkLoginAuthenticator": + return _UniffiConverterTypeZkLoginAuthenticator.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin,self._uniffi_clone_pointer(),) ) - async def dynamic_object_field(self, address: "Address",type_tag: "TypeTag",name: "Value") -> "typing.Optional[DynamicFieldOutput]": - """ - Access a dynamic object field on an object using its name. Names are - arbitrary Move values whose type have copy, drop, and store, and are - specified using their type, and their BCS contents, Base64 encoded. - The `name` argument is a json serialized type. - This returns [`DynamicFieldOutput`] which contains the name, the value - as json, and object. - """ + def as_zklogin_opt(self, ) -> "typing.Optional[ZkLoginAuthenticator]": + return _UniffiConverterOptionalTypeZkLoginAuthenticator.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_as_zklogin_opt,self._uniffi_clone_pointer(),) + ) + + - _UniffiConverterTypeAddress.check_lower(address) - - _UniffiConverterTypeTypeTag.check_lower(type_tag) - - _UniffiConverterTypeValue.check_lower(name) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterTypeTypeTag.lower(type_tag), - _UniffiConverterTypeValue.lower(name) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeDynamicFieldOutput.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + + def is_ed25519(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_ed25519,self._uniffi_clone_pointer(),) ) - async def epoch(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Epoch]": - """ - Return the epoch information for the provided epoch. If no epoch is - provided, it will return the last known epoch. - """ - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(epoch) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeEpoch.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def is_secp256k1(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256k1,self._uniffi_clone_pointer(),) ) - async def epoch_total_checkpoints(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": - """ - Return the number of checkpoints in this epoch. This will return - `Ok(None)` if the epoch requested is not available in the GraphQL - service (e.g., due to pruning). - """ - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(epoch) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def is_secp256r1(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_secp256r1,self._uniffi_clone_pointer(),) ) - async def epoch_total_transaction_blocks(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": - """ - Return the number of transaction blocks in this epoch. This will return - `Ok(None)` if the epoch requested is not available in the GraphQL - service (e.g., due to pruning). - """ - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(epoch) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def is_zklogin(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmembersignature_is_zklogin,self._uniffi_clone_pointer(),) ) - async def events(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[EventFilter]]" = _DEFAULT) -> "EventPage": + + + +class _UniffiConverterTypeMultisigMemberSignature: + + @staticmethod + def lift(value: int): + return MultisigMemberSignature._make_instance_(value) + + @staticmethod + def check_lower(value: MultisigMemberSignature): + if not isinstance(value, MultisigMemberSignature): + raise TypeError("Expected MultisigMemberSignature instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: MultisigMemberSignatureProtocol): + if not isinstance(value, MultisigMemberSignature): + raise TypeError("Expected MultisigMemberSignature instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: MultisigMemberSignatureProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class ObjectProtocol(typing.Protocol): + """ + An object on the IOTA blockchain + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + object = object-data owner digest u64 + ``` + """ + + def as_struct(self, ): """ - Return a page of tuple (event, transaction digest) based on the - (optional) event filter. + Try to interpret this object as a move struct """ - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeEventFilter.check_lower(filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events( - self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalTypeEventFilter.lower(filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeEventPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) + raise NotImplementedError + def data(self, ): + """ + Return this object's data + """ + raise NotImplementedError + def object_id(self, ): + """ + Return this object's id + """ + raise NotImplementedError + def object_type(self, ): + """ + Return this object's type + """ - async def execute_tx(self, signatures: "typing.List[UserSignature]",tx: "Transaction") -> "typing.Optional[TransactionEffects]": + raise NotImplementedError + def owner(self, ): """ - Execute a transaction. + Return this object's owner """ - _UniffiConverterSequenceTypeUserSignature.check_lower(signatures) - - _UniffiConverterTypeTransaction.check_lower(tx) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_execute_tx( - self._uniffi_clone_pointer(), - _UniffiConverterSequenceTypeUserSignature.lower(signatures), - _UniffiConverterTypeTransaction.lower(tx) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeTransactionEffects.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - - ) + raise NotImplementedError + def previous_transaction(self, ): + """ + Return the digest of the transaction that last modified this object + """ + raise NotImplementedError + def storage_rebate(self, ): + """ + Return the storage rebate locked in this object + Storage rebates are credited to the gas coin used in a transaction that + deletes this object. + """ - async def latest_checkpoint_sequence_number(self, ) -> "typing.Optional[int]": + raise NotImplementedError + def version(self, ): """ - Return the sequence number of the latest checkpoint that has been - executed. + Return this object's version """ - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_latest_checkpoint_sequence_number( - self._uniffi_clone_pointer(), - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + raise NotImplementedError +# Object is a Rust-only trait - it's a wrapper around a Rust implementation. +class Object(): + """ + An object on the IOTA blockchain - ) + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + object = object-data owner digest u64 + ``` + """ - async def max_page_size(self, ) -> "int": - """ - Lazily fetch the max page size - """ + _pointer: ctypes.c_void_p + def __init__(self, data: "ObjectData",owner: "Owner",previous_transaction: "TransactionDigest",storage_rebate: "int"): + _UniffiConverterTypeObjectData.check_lower(data) + + _UniffiConverterTypeOwner.check_lower(owner) + + _UniffiConverterTypeTransactionDigest.check_lower(previous_transaction) + + _UniffiConverterUInt64.check_lower(storage_rebate) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_object_new, + _UniffiConverterTypeObjectData.lower(data), + _UniffiConverterTypeOwner.lower(owner), + _UniffiConverterTypeTransactionDigest.lower(previous_transaction), + _UniffiConverterUInt64.lower(storage_rebate)) - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_max_page_size( - self._uniffi_clone_pointer(), - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_i32, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_i32, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_i32, - # lift function - _UniffiConverterInt32.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_object, pointer) - ) + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_object, self._pointer) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst - async def move_object_contents(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Value]": + def as_struct(self, ) -> "typing.Optional[MoveStruct]": """ - Return the contents' JSON of an object that is a Move object. - - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. + Try to interpret this object as a move struct """ - _UniffiConverterTypeObjectId.check_lower(object_id) - - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents( - self._uniffi_clone_pointer(), - _UniffiConverterTypeObjectId.lower(object_id), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeValue.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - + return _UniffiConverterOptionalTypeMoveStruct.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct,self._uniffi_clone_pointer(),) ) - async def move_object_contents_bcs(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[bytes]": - """ - Return the BCS of an object that is a Move object. - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. - """ - _UniffiConverterTypeObjectId.check_lower(object_id) - - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs( - self._uniffi_clone_pointer(), - _UniffiConverterTypeObjectId.lower(object_id), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalBytes.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def data(self, ) -> "ObjectData": + """ + Return this object's data + """ + return _UniffiConverterTypeObjectData.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_data,self._uniffi_clone_pointer(),) ) - async def normalized_move_function(self, package: "str",module: "str",function: "str",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[MoveFunction]": + + + def object_id(self, ) -> "ObjectId": """ - Return the normalized Move function data for the provided package, - module, and function. + Return this object's id """ - _UniffiConverterString.check_lower(package) - - _UniffiConverterString.check_lower(module) - - _UniffiConverterString.check_lower(function) - - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function( - self._uniffi_clone_pointer(), - _UniffiConverterString.lower(package), - _UniffiConverterString.lower(module), - _UniffiConverterString.lower(function), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeMoveFunction.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - + return _UniffiConverterTypeObjectId.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_id,self._uniffi_clone_pointer(),) ) - async def normalized_move_module(self, package: "str",module: "str",pagination_filter_enums: "PaginationFilter",pagination_filter_friends: "PaginationFilter",pagination_filter_functions: "PaginationFilter",pagination_filter_structs: "PaginationFilter",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[MoveModule]": + + + def object_type(self, ) -> "ObjectType": """ - Return the normalized Move module data for the provided module. + Return this object's type """ - _UniffiConverterString.check_lower(package) - - _UniffiConverterString.check_lower(module) - - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter_enums) - - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter_friends) - - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter_functions) - - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter_structs) - - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module( - self._uniffi_clone_pointer(), - _UniffiConverterString.lower(package), - _UniffiConverterString.lower(module), - _UniffiConverterTypePaginationFilter.lower(pagination_filter_enums), - _UniffiConverterTypePaginationFilter.lower(pagination_filter_friends), - _UniffiConverterTypePaginationFilter.lower(pagination_filter_functions), - _UniffiConverterTypePaginationFilter.lower(pagination_filter_structs), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeMoveModule.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + return _UniffiConverterTypeObjectType.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_type,self._uniffi_clone_pointer(),) + ) + + + + + def owner(self, ) -> "Owner": + """ + Return this object's owner + """ + + return _UniffiConverterTypeOwner.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_owner,self._uniffi_clone_pointer(),) ) - async def object(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Object]": + + + def previous_transaction(self, ) -> "TransactionDigest": + """ + Return the digest of the transaction that last modified this object """ - Return an object based on the provided [`Address`]. - If the object does not exist (e.g., due to pruning), this will return - `Ok(None)`. Similarly, if this is not an object but an address, it - will return `Ok(None)`. + return _UniffiConverterTypeTransactionDigest.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_previous_transaction,self._uniffi_clone_pointer(),) + ) + + + + + + def storage_rebate(self, ) -> "int": """ + Return the storage rebate locked in this object - _UniffiConverterTypeObjectId.check_lower(object_id) - - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object( - self._uniffi_clone_pointer(), - _UniffiConverterTypeObjectId.lower(object_id), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeObject.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + Storage rebates are credited to the gas coin used in a transaction that + deletes this object. + """ + return _UniffiConverterUInt64.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_storage_rebate,self._uniffi_clone_pointer(),) ) - async def object_bcs(self, object_id: "ObjectId") -> "typing.Optional[bytes]": + + + def version(self, ) -> "int": """ - Return the object's bcs content [`Vec`] based on the provided - [`Address`]. + Return this object's version """ - _UniffiConverterTypeObjectId.check_lower(object_id) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_object_bcs( - self._uniffi_clone_pointer(), - _UniffiConverterTypeObjectId.lower(object_id) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalBytes.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - + return _UniffiConverterUInt64.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_version,self._uniffi_clone_pointer(),) ) - async def objects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[ObjectFilter]]" = _DEFAULT) -> "ObjectPage": - """ - Return a page of objects based on the provided parameters. - Use this function together with the [`ObjectFilter::owner`] to get the - objects owned by an address. - # Example - ```rust,ignore - let filter = ObjectFilter { - type_tag: None, - owner: Some(Address::from_str("test").unwrap().into()), - object_ids: None, - }; +class _UniffiConverterTypeObject: - let owned_objects = client.objects(None, None, Some(filter), None, None).await; - ``` - """ + @staticmethod + def lift(value: int): + return Object._make_instance_(value) - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeObjectFilter.check_lower(filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_objects( - self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalTypeObjectFilter.lower(filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeObjectPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def check_lower(value: Object): + if not isinstance(value, Object): + raise TypeError("Expected Object instance, {} found".format(type(value).__name__)) - ) + @staticmethod + def lower(value: ObjectProtocol): + if not isinstance(value, Object): + raise TypeError("Expected Object instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: ObjectProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class ObjectDataProtocol(typing.Protocol): + pass +# ObjectData is a Rust-only trait - it's a wrapper around a Rust implementation. +class ObjectData(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") - async def package(self, address: "Address",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[MovePackage]": - """ - The package corresponding to the given address (at the optionally given - version). When no version is given, the package is loaded directly - from the address given. Otherwise, the address is translated before - loading to point to the package whose original ID matches - the package at address, but whose version is version. For non-system - packages, this might result in a different address than address - because different versions of a package, introduced by upgrades, - exist at distinct addresses. + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdata, pointer) - Note that this interpretation of version is different from a historical - object read (the interpretation of version for the object query). - """ + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdata, self._pointer) - _UniffiConverterTypeAddress.check_lower(address) - - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeMovePackage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst - ) +class _UniffiConverterTypeObjectData: - async def package_latest(self, address: "Address") -> "typing.Optional[MovePackage]": - """ - Fetch the latest version of the package at address. - This corresponds to the package with the highest version that shares its - original ID with the package at address. - """ + @staticmethod + def lift(value: int): + return ObjectData._make_instance_(value) + + @staticmethod + def check_lower(value: ObjectData): + if not isinstance(value, ObjectData): + raise TypeError("Expected ObjectData instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: ObjectDataProtocol): + if not isinstance(value, ObjectData): + raise TypeError("Expected ObjectData instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + + @classmethod + def write(cls, value: ObjectDataProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class ObjectDigestProtocol(typing.Protocol): + def to_base58(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError +# ObjectDigest is a Rust-only trait - it's a wrapper around a Rust implementation. +class ObjectDigest(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") + + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdigest, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdigest, self._pointer) + + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + @classmethod + def from_base58(cls, base58: "str"): + _UniffiConverterString.check_lower(base58) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdigest_from_base58, + _UniffiConverterString.lower(base58)) + return cls._make_instance_(pointer) - _UniffiConverterTypeAddress.check_lower(address) + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeMovePackage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdigest_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) - ) + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectdigest_generate,) + return cls._make_instance_(pointer) - async def package_versions(self, address: "Address",pagination_filter: "PaginationFilter",after_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "MovePackagePage": - """ - Fetch all versions of package at address (packages that share this - package's original ID), optionally bounding the versions exclusively - from below with afterVersion, or from above with beforeVersion. - """ + def to_base58(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdigest_to_base58,self._uniffi_clone_pointer(),) + ) - _UniffiConverterTypeAddress.check_lower(address) - - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - if after_version is _DEFAULT: - after_version = None - _UniffiConverterOptionalUInt64.check_lower(after_version) - - if before_version is _DEFAULT: - before_version = None - _UniffiConverterOptionalUInt64.check_lower(before_version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_versions( - self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalUInt64.lower(after_version), - _UniffiConverterOptionalUInt64.lower(before_version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeMovePackagePage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) - async def packages(self, pagination_filter: "PaginationFilter",after_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT,before_checkpoint: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "MovePackagePage": - """ - The Move packages that exist in the network, optionally filtered to be - strictly before beforeCheckpoint and/or strictly after - afterCheckpoint. + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectdigest_to_bytes,self._uniffi_clone_pointer(),) + ) - This query returns all versions of a given user package that appear - between the specified checkpoints, but only records the latest - versions of system packages. - """ - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - if after_checkpoint is _DEFAULT: - after_checkpoint = None - _UniffiConverterOptionalUInt64.check_lower(after_checkpoint) - - if before_checkpoint is _DEFAULT: - before_checkpoint = None - _UniffiConverterOptionalUInt64.check_lower(before_checkpoint) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages( - self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalUInt64.lower(after_checkpoint), - _UniffiConverterOptionalUInt64.lower(before_checkpoint) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeMovePackagePage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) - async def protocol_config(self, version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[ProtocolConfigs]": - """ - Get the protocol configuration. - """ +class _UniffiConverterTypeObjectDigest: - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_protocol_config( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(version) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeProtocolConfigs.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def lift(value: int): + return ObjectDigest._make_instance_(value) - ) + @staticmethod + def check_lower(value: ObjectDigest): + if not isinstance(value, ObjectDigest): + raise TypeError("Expected ObjectDigest instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: ObjectDigestProtocol): + if not isinstance(value, ObjectDigest): + raise TypeError("Expected ObjectDigest instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) - async def reference_gas_price(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": - """ - Get the reference gas price for the provided epoch or the last known one - if no epoch is provided. + @classmethod + def write(cls, value: ObjectDigestProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class ObjectIdProtocol(typing.Protocol): + """ + An `ObjectId` is a 32-byte identifier used to uniquely identify an object on + the IOTA blockchain. - This will return `Ok(None)` if the epoch requested is not available in - the GraphQL service (e.g., due to pruning). - """ + ## Relationship to Address - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_reference_gas_price( - self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(epoch) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + [`Address`]es and [`ObjectId`]s share the same 32-byte addressable space but + are derived leveraging different domain-separator values to ensure, + cryptographically, that there won't be any overlap, e.g. there can't be a + valid `Object` whose `ObjectId` is equal to that of the `Address` of a user + account. - ) + # BCS + An `ObjectId`'s BCS serialized form is defined by the following: + ```text + object-id = 32*OCTET + ``` + """ - async def service_config(self, ) -> "ServiceConfig": - """ - Get the GraphQL service configuration, including complexity limits, read - and mutation limits, supported versions, and others. - """ + def to_address(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError + def to_hex(self, ): + raise NotImplementedError +# ObjectId is a Rust-only trait - it's a wrapper around a Rust implementation. +class ObjectId(): + """ + An `ObjectId` is a 32-byte identifier used to uniquely identify an object on + the IOTA blockchain. - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_service_config( - self._uniffi_clone_pointer(), - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, - # lift function - _UniffiConverterTypeServiceConfig.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + ## Relationship to Address - ) + [`Address`]es and [`ObjectId`]s share the same 32-byte addressable space but + are derived leveraging different domain-separator values to ensure, + cryptographically, that there won't be any overlap, e.g. there can't be a + valid `Object` whose `ObjectId` is equal to that of the `Address` of a user + account. + # BCS + An `ObjectId`'s BCS serialized form is defined by the following: - async def set_rpc_server(self, server: "str") -> None: + ```text + object-id = 32*OCTET + ``` + """ - """ - Set the server address for the GraphQL GraphQL client. It should be a - valid URL with a host and optionally a port number. - """ + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") - _UniffiConverterString.check_lower(server) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server( - self._uniffi_clone_pointer(), - _UniffiConverterString.lower(server) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_void, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_void, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_void, - # lift function - lambda val: None, - - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectid, pointer) - ) + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectid, self._pointer) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + @classmethod + def from_hex(cls, hex: "str"): + _UniffiConverterString.check_lower(hex) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex, + _UniffiConverterString.lower(hex)) + return cls._make_instance_(pointer) - async def total_supply(self, coin_type: "str") -> "typing.Optional[int]": - """ - Get total supply for the coin type. - """ - _UniffiConverterString.check_lower(coin_type) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply( - self._uniffi_clone_pointer(), - _UniffiConverterString.lower(coin_type) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def to_address(self, ) -> "Address": + return _UniffiConverterTypeAddress.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_address,self._uniffi_clone_pointer(),) ) - async def total_transaction_blocks(self, ) -> "typing.Optional[int]": - """ - The total number of transaction blocks in the network by the end of the - last known checkpoint. - """ - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks( - self._uniffi_clone_pointer(), - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes,self._uniffi_clone_pointer(),) ) - async def total_transaction_blocks_by_digest(self, digest: "CheckpointContentsDigest") -> "typing.Optional[int]": - """ - The total number of transaction blocks in the network by the end of the - provided checkpoint digest. - """ - _UniffiConverterTypeCheckpointContentsDigest.check_lower(digest) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest( - self._uniffi_clone_pointer(), - _UniffiConverterTypeCheckpointContentsDigest.lower(digest) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def to_hex(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_hex,self._uniffi_clone_pointer(),) ) - async def total_transaction_blocks_by_seq_num(self, seq_num: "int") -> "typing.Optional[int]": - """ - The total number of transaction blocks in the network by the end of the - provided checkpoint sequence number. - """ - - _UniffiConverterUInt64.check_lower(seq_num) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num( - self._uniffi_clone_pointer(), - _UniffiConverterUInt64.lower(seq_num) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalUInt64.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, - ) +class _UniffiConverterTypeObjectId: - async def transaction(self, digest: "TransactionDigest") -> "typing.Optional[SignedTransaction]": - """ - Get a transaction by its digest. - """ + @staticmethod + def lift(value: int): + return ObjectId._make_instance_(value) - _UniffiConverterTypeTransactionDigest.check_lower(digest) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction( - self._uniffi_clone_pointer(), - _UniffiConverterTypeTransactionDigest.lower(digest) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeSignedTransaction.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def check_lower(value: ObjectId): + if not isinstance(value, ObjectId): + raise TypeError("Expected ObjectId instance, {} found".format(type(value).__name__)) - ) + @staticmethod + def lower(value: ObjectIdProtocol): + if not isinstance(value, ObjectId): + raise TypeError("Expected ObjectId instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: ObjectIdProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class ObjectRefProtocol(typing.Protocol): + pass +# ObjectRef is a Rust-only trait - it's a wrapper around a Rust implementation. +class ObjectRef(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") - async def transaction_data_effects(self, digest: "TransactionDigest") -> "typing.Optional[TransactionDataEffects]": - """ - Get a transaction's data and effects by its digest. - """ + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectref, pointer) - _UniffiConverterTypeTransactionDigest.check_lower(digest) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_data_effects( - self._uniffi_clone_pointer(), - _UniffiConverterTypeTransactionDigest.lower(digest) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeTransactionDataEffects.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectref, self._pointer) - ) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst - async def transaction_effects(self, digest: "TransactionDigest") -> "typing.Optional[TransactionEffects]": - """ - Get a transaction's effects by its digest. - """ +class _UniffiConverterTypeObjectRef: - _UniffiConverterTypeTransactionDigest.check_lower(digest) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction_effects( - self._uniffi_clone_pointer(), - _UniffiConverterTypeTransactionDigest.lower(digest) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterOptionalTypeTransactionEffects.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @staticmethod + def lift(value: int): + return ObjectRef._make_instance_(value) - ) + @staticmethod + def check_lower(value: ObjectRef): + if not isinstance(value, ObjectRef): + raise TypeError("Expected ObjectRef instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: ObjectRefProtocol): + if not isinstance(value, ObjectRef): + raise TypeError("Expected ObjectRef instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) - async def transactions(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT) -> "SignedTransactionPage": - """ - Get a page of transactions based on the provided filters. - """ + @classmethod + def write(cls, value: ObjectRefProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class ObjectTypeProtocol(typing.Protocol): + pass +# ObjectType is a Rust-only trait - it's a wrapper around a Rust implementation. +class ObjectType(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions( - self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalTypeTransactionsFilter.lower(filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeSignedTransactionPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objecttype, pointer) - ) + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objecttype, self._pointer) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst - async def transactions_data_effects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT) -> "TransactionDataEffectsPage": - """ - Get a page of transactions' data and effects based on the provided - filters. - """ - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_data_effects( - self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalTypeTransactionsFilter.lower(filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeTransactionDataEffectsPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, +class _UniffiConverterTypeObjectType: - ) + @staticmethod + def lift(value: int): + return ObjectType._make_instance_(value) + @staticmethod + def check_lower(value: ObjectType): + if not isinstance(value, ObjectType): + raise TypeError("Expected ObjectType instance, {} found".format(type(value).__name__)) + @staticmethod + def lower(value: ObjectTypeProtocol): + if not isinstance(value, ObjectType): + raise TypeError("Expected ObjectType instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() - async def transactions_effects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT) -> "TransactionEffectsPage": - """ - Get a page of transactions' effects based on the provided filters. - """ + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions_effects( - self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalTypeTransactionsFilter.lower(filter) - ), - _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_rust_buffer, - # lift function - _UniffiConverterTypeTransactionEffectsPage.lift, - - # Error FFI converter -_UniffiConverterTypeSdkFfiError, + @classmethod + def write(cls, value: ObjectTypeProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class OwnerProtocol(typing.Protocol): + pass +# Owner is a Rust-only trait - it's a wrapper around a Rust implementation. +class Owner(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") - ) + def __del__(self): + # In case of partial initialization of instances. + pointer = getattr(self, "_pointer", None) + if pointer is not None: + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_owner, pointer) + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_owner, self._pointer) + # Used by alternative constructors or any methods which return this type. + @classmethod + def _make_instance_(cls, pointer): + # Lightly yucky way to bypass the usual __init__ logic + # and just create a new instance with the required pointer. + inst = cls.__new__(cls) + inst._pointer = pointer + return inst -class _UniffiConverterTypeGraphQlClient: +class _UniffiConverterTypeOwner: @staticmethod def lift(value: int): - return GraphQlClient._make_instance_(value) + return Owner._make_instance_(value) @staticmethod - def check_lower(value: GraphQlClient): - if not isinstance(value, GraphQlClient): - raise TypeError("Expected GraphQlClient instance, {} found".format(type(value).__name__)) + def check_lower(value: Owner): + if not isinstance(value, Owner): + raise TypeError("Expected Owner instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: GraphQlClientProtocol): - if not isinstance(value, GraphQlClient): - raise TypeError("Expected GraphQlClient instance, {} found".format(type(value).__name__)) + def lower(value: OwnerProtocol): + if not isinstance(value, Owner): + raise TypeError("Expected Owner instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -13822,12 +18777,104 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: GraphQlClientProtocol, buf: _UniffiRustBuffer): + def write(cls, value: OwnerProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class MoveFunctionProtocol(typing.Protocol): - pass -# MoveFunction is a Rust-only trait - it's a wrapper around a Rust implementation. -class MoveFunction(): +class PasskeyAuthenticatorProtocol(typing.Protocol): + """ + A passkey authenticator. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + passkey-bcs = bytes ; where the contents of the bytes are + ; defined by + passkey = passkey-flag + bytes ; passkey authenticator data + client-data-json ; valid json + simple-signature ; required to be a secp256r1 signature + + client-data-json = string ; valid json + ``` + + See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) for + the required json-schema for the `client-data-json` rule. In addition, IOTA + currently requires that the `CollectedClientData.type` field is required to + be `webauthn.get`. + + 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. + """ + + def authenticator_data(self, ): + """ + Opaque authenticator data for this passkey signature. + + See [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) for + more information on this field. + """ + + raise NotImplementedError + def challenge(self, ): + """ + The parsed challenge message for this passkey signature. + + This is parsed by decoding the base64url data from the + `client_data_json.challenge` field. + """ + + raise NotImplementedError + def client_data_json(self, ): + """ + Structured, unparsed, JSON for this passkey signature. + + See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) + for more information on this field. + """ + + raise NotImplementedError + def signature(self, ): + """ + The passkey signature. + """ + + raise NotImplementedError +# PasskeyAuthenticator is a Rust-only trait - it's a wrapper around a Rust implementation. +class PasskeyAuthenticator(): + """ + A passkey authenticator. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + passkey-bcs = bytes ; where the contents of the bytes are + ; defined by + passkey = passkey-flag + bytes ; passkey authenticator data + client-data-json ; valid json + simple-signature ; required to be a secp256r1 signature + + client-data-json = string ; valid json + ``` + + See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) for + the required json-schema for the `client-data-json` rule. In addition, IOTA + currently requires that the `CollectedClientData.type` field is required to + be `webauthn.get`. + + 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. + """ + _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -13837,10 +18884,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movefunction, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_passkeyauthenticator, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movefunction, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -13852,22 +18899,83 @@ def _make_instance_(cls, pointer): return inst + def authenticator_data(self, ) -> "bytes": + """ + Opaque authenticator data for this passkey signature. + + See [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) for + more information on this field. + """ -class _UniffiConverterTypeMoveFunction: + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_authenticator_data,self._uniffi_clone_pointer(),) + ) + + + + + + def challenge(self, ) -> "bytes": + """ + The parsed challenge message for this passkey signature. + + This is parsed by decoding the base64url data from the + `client_data_json.challenge` field. + """ + + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_challenge,self._uniffi_clone_pointer(),) + ) + + + + + + def client_data_json(self, ) -> "str": + """ + Structured, unparsed, JSON for this passkey signature. + + See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) + for more information on this field. + """ + + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_client_data_json,self._uniffi_clone_pointer(),) + ) + + + + + + def signature(self, ) -> "SimpleSignature": + """ + The passkey signature. + """ + + return _UniffiConverterTypeSimpleSignature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_passkeyauthenticator_signature,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypePasskeyAuthenticator: @staticmethod def lift(value: int): - return MoveFunction._make_instance_(value) + return PasskeyAuthenticator._make_instance_(value) @staticmethod - def check_lower(value: MoveFunction): - if not isinstance(value, MoveFunction): - raise TypeError("Expected MoveFunction instance, {} found".format(type(value).__name__)) + def check_lower(value: PasskeyAuthenticator): + if not isinstance(value, PasskeyAuthenticator): + raise TypeError("Expected PasskeyAuthenticator instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: MoveFunctionProtocol): - if not isinstance(value, MoveFunction): - raise TypeError("Expected MoveFunction instance, {} found".format(type(value).__name__)) + def lower(value: PasskeyAuthenticatorProtocol): + if not isinstance(value, PasskeyAuthenticator): + raise TypeError("Expected PasskeyAuthenticator instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -13878,12 +18986,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: MoveFunctionProtocol, buf: _UniffiRustBuffer): + def write(cls, value: PasskeyAuthenticatorProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class MoveModuleProtocol(typing.Protocol): +class ProgrammableTransactionProtocol(typing.Protocol): pass -# MoveModule is a Rust-only trait - it's a wrapper around a Rust implementation. -class MoveModule(): +# ProgrammableTransaction is a Rust-only trait - it's a wrapper around a Rust implementation. +class ProgrammableTransaction(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -13893,10 +19001,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movemodule, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movemodule, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -13909,21 +19017,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeMoveModule: +class _UniffiConverterTypeProgrammableTransaction: @staticmethod def lift(value: int): - return MoveModule._make_instance_(value) + return ProgrammableTransaction._make_instance_(value) @staticmethod - def check_lower(value: MoveModule): - if not isinstance(value, MoveModule): - raise TypeError("Expected MoveModule instance, {} found".format(type(value).__name__)) + def check_lower(value: ProgrammableTransaction): + if not isinstance(value, ProgrammableTransaction): + raise TypeError("Expected ProgrammableTransaction instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: MoveModuleProtocol): - if not isinstance(value, MoveModule): - raise TypeError("Expected MoveModule instance, {} found".format(type(value).__name__)) + def lower(value: ProgrammableTransactionProtocol): + if not isinstance(value, ProgrammableTransaction): + raise TypeError("Expected ProgrammableTransaction instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -13934,12 +19042,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: MoveModuleProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ProgrammableTransactionProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class MovePackageProtocol(typing.Protocol): +class ProtocolConfigsProtocol(typing.Protocol): pass -# MovePackage is a Rust-only trait - it's a wrapper around a Rust implementation. -class MovePackage(): +# ProtocolConfigs is a Rust-only trait - it's a wrapper around a Rust implementation. +class ProtocolConfigs(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -13949,10 +19057,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movepackage, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_protocolconfigs, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movepackage, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_protocolconfigs, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -13965,21 +19073,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeMovePackage: +class _UniffiConverterTypeProtocolConfigs: @staticmethod def lift(value: int): - return MovePackage._make_instance_(value) + return ProtocolConfigs._make_instance_(value) @staticmethod - def check_lower(value: MovePackage): - if not isinstance(value, MovePackage): - raise TypeError("Expected MovePackage instance, {} found".format(type(value).__name__)) + def check_lower(value: ProtocolConfigs): + if not isinstance(value, ProtocolConfigs): + raise TypeError("Expected ProtocolConfigs instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: MovePackageProtocol): - if not isinstance(value, MovePackage): - raise TypeError("Expected MovePackage instance, {} found".format(type(value).__name__)) + def lower(value: ProtocolConfigsProtocol): + if not isinstance(value, ProtocolConfigs): + raise TypeError("Expected ProtocolConfigs instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -13990,12 +19098,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: MovePackageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ProtocolConfigsProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class MoveStructProtocol(typing.Protocol): +class RandomnessStateUpdateProtocol(typing.Protocol): pass -# MoveStruct is a Rust-only trait - it's a wrapper around a Rust implementation. -class MoveStruct(): +# RandomnessStateUpdate is a Rust-only trait - it's a wrapper around a Rust implementation. +class RandomnessStateUpdate(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -14005,10 +19113,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_movestruct, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_randomnessstateupdate, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movestruct, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_randomnessstateupdate, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14021,21 +19129,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeMoveStruct: +class _UniffiConverterTypeRandomnessStateUpdate: @staticmethod def lift(value: int): - return MoveStruct._make_instance_(value) + return RandomnessStateUpdate._make_instance_(value) @staticmethod - def check_lower(value: MoveStruct): - if not isinstance(value, MoveStruct): - raise TypeError("Expected MoveStruct instance, {} found".format(type(value).__name__)) + def check_lower(value: RandomnessStateUpdate): + if not isinstance(value, RandomnessStateUpdate): + raise TypeError("Expected RandomnessStateUpdate instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: MoveStructProtocol): - if not isinstance(value, MoveStruct): - raise TypeError("Expected MoveStruct instance, {} found".format(type(value).__name__)) + def lower(value: RandomnessStateUpdateProtocol): + if not isinstance(value, RandomnessStateUpdate): + raise TypeError("Expected RandomnessStateUpdate instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -14046,110 +19154,50 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: MoveStructProtocol, buf: _UniffiRustBuffer): + def write(cls, value: RandomnessStateUpdateProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ObjectProtocol(typing.Protocol): +class Secp256k1PublicKeyProtocol(typing.Protocol): """ - An object on the IOTA blockchain + A secp256k1 signature. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - object = object-data owner digest u64 + secp256k1-signature = 64OCTECT ``` """ - def as_struct(self, ): - """ - Try to interpret this object as a move struct - """ - - raise NotImplementedError - def data(self, ): - """ - Return this object's data - """ - - raise NotImplementedError - def object_id(self, ): - """ - Return this object's id - """ - - raise NotImplementedError - def object_type(self, ): - """ - Return this object's type - """ - - raise NotImplementedError - def owner(self, ): - """ - Return this object's owner - """ - - raise NotImplementedError - def previous_transaction(self, ): - """ - Return the digest of the transaction that last modified this object - """ - - raise NotImplementedError - def storage_rebate(self, ): - """ - Return the storage rebate locked in this object - - Storage rebates are credited to the gas coin used in a transaction that - deletes this object. - """ - - raise NotImplementedError - def version(self, ): - """ - Return this object's version - """ - + def to_bytes(self, ): raise NotImplementedError -# Object is a Rust-only trait - it's a wrapper around a Rust implementation. -class Object(): +# Secp256k1PublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. +class Secp256k1PublicKey(): """ - An object on the IOTA blockchain + A secp256k1 signature. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - object = object-data owner digest u64 + secp256k1-signature = 64OCTECT ``` """ _pointer: ctypes.c_void_p - def __init__(self, data: "ObjectData",owner: "Owner",previous_transaction: "TransactionDigest",storage_rebate: "int"): - _UniffiConverterTypeObjectData.check_lower(data) - - _UniffiConverterTypeOwner.check_lower(owner) - - _UniffiConverterTypeTransactionDigest.check_lower(previous_transaction) - - _UniffiConverterUInt64.check_lower(storage_rebate) - - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_object_new, - _UniffiConverterTypeObjectData.lower(data), - _UniffiConverterTypeOwner.lower(owner), - _UniffiConverterTypeTransactionDigest.lower(previous_transaction), - _UniffiConverterUInt64.lower(storage_rebate)) + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_object, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1publickey, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_object, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14159,109 +19207,35 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + @classmethod + def from_str(cls, s: "str"): + _UniffiConverterString.check_lower(s) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str, + _UniffiConverterString.lower(s)) + return cls._make_instance_(pointer) - def as_struct(self, ) -> "typing.Optional[MoveStruct]": - """ - Try to interpret this object as a move struct - """ - - return _UniffiConverterOptionalTypeMoveStruct.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_as_struct,self._uniffi_clone_pointer(),) - ) - - - - - - def data(self, ) -> "ObjectData": - """ - Return this object's data - """ - - return _UniffiConverterTypeObjectData.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_data,self._uniffi_clone_pointer(),) - ) - - - - - - def object_id(self, ) -> "ObjectId": - """ - Return this object's id - """ - - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_id,self._uniffi_clone_pointer(),) - ) - - - - - - def object_type(self, ) -> "ObjectType": - """ - Return this object's type - """ - - return _UniffiConverterTypeObjectType.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_object_type,self._uniffi_clone_pointer(),) - ) - - - - - - def owner(self, ) -> "Owner": - """ - Return this object's owner - """ - - return _UniffiConverterTypeOwner.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_owner,self._uniffi_clone_pointer(),) - ) - - - - - - def previous_transaction(self, ) -> "TransactionDigest": - """ - Return the digest of the transaction that last modified this object - """ - - return _UniffiConverterTypeTransactionDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_previous_transaction,self._uniffi_clone_pointer(),) - ) - - - - - - def storage_rebate(self, ) -> "int": - """ - Return the storage rebate locked in this object - - Storage rebates are credited to the gas coin used in a transaction that - deletes this object. - """ - - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_storage_rebate,self._uniffi_clone_pointer(),) - ) - - - + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate,) + return cls._make_instance_(pointer) - def version(self, ) -> "int": - """ - Return this object's version - """ - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_version,self._uniffi_clone_pointer(),) + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes,self._uniffi_clone_pointer(),) ) @@ -14269,21 +19243,21 @@ def version(self, ) -> "int": -class _UniffiConverterTypeObject: +class _UniffiConverterTypeSecp256k1PublicKey: @staticmethod def lift(value: int): - return Object._make_instance_(value) + return Secp256k1PublicKey._make_instance_(value) @staticmethod - def check_lower(value: Object): - if not isinstance(value, Object): - raise TypeError("Expected Object instance, {} found".format(type(value).__name__)) + def check_lower(value: Secp256k1PublicKey): + if not isinstance(value, Secp256k1PublicKey): + raise TypeError("Expected Secp256k1PublicKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ObjectProtocol): - if not isinstance(value, Object): - raise TypeError("Expected Object instance, {} found".format(type(value).__name__)) + def lower(value: Secp256k1PublicKeyProtocol): + if not isinstance(value, Secp256k1PublicKey): + raise TypeError("Expected Secp256k1PublicKey instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -14294,12 +19268,37 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256k1PublicKeyProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ObjectDataProtocol(typing.Protocol): - pass -# ObjectData is a Rust-only trait - it's a wrapper around a Rust implementation. -class ObjectData(): +class Secp256k1SignatureProtocol(typing.Protocol): + """ + A secp256k1 public key. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + secp256k1-public-key = 33OCTECT + ``` + """ + + def to_bytes(self, ): + raise NotImplementedError +# Secp256k1Signature is a Rust-only trait - it's a wrapper around a Rust implementation. +class Secp256k1Signature(): + """ + A secp256k1 public key. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + secp256k1-public-key = 33OCTECT + ``` + """ + _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -14309,10 +19308,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdata, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1signature, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdata, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1signature, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14322,24 +19321,57 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + + @classmethod + def from_str(cls, s: "str"): + _UniffiConverterString.check_lower(s) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_from_str, + _UniffiConverterString.lower(s)) + return cls._make_instance_(pointer) + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1signature_generate,) + return cls._make_instance_(pointer) -class _UniffiConverterTypeObjectData: + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1signature_to_bytes,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeSecp256k1Signature: @staticmethod def lift(value: int): - return ObjectData._make_instance_(value) + return Secp256k1Signature._make_instance_(value) @staticmethod - def check_lower(value: ObjectData): - if not isinstance(value, ObjectData): - raise TypeError("Expected ObjectData instance, {} found".format(type(value).__name__)) + def check_lower(value: Secp256k1Signature): + if not isinstance(value, Secp256k1Signature): + raise TypeError("Expected Secp256k1Signature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ObjectDataProtocol): - if not isinstance(value, ObjectData): - raise TypeError("Expected ObjectData instance, {} found".format(type(value).__name__)) + def lower(value: Secp256k1SignatureProtocol): + if not isinstance(value, Secp256k1Signature): + raise TypeError("Expected Secp256k1Signature instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -14350,12 +19382,37 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectDataProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256k1SignatureProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ObjectDigestProtocol(typing.Protocol): - pass -# ObjectDigest is a Rust-only trait - it's a wrapper around a Rust implementation. -class ObjectDigest(): +class Secp256r1PublicKeyProtocol(typing.Protocol): + """ + A secp256r1 signature. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + secp256r1-signature = 64OCTECT + ``` + """ + + def to_bytes(self, ): + raise NotImplementedError +# Secp256r1PublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. +class Secp256r1PublicKey(): + """ + A secp256r1 signature. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + secp256r1-signature = 64OCTECT + ``` + """ + _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -14365,10 +19422,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectdigest, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1publickey, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdigest, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14378,24 +19435,57 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + + @classmethod + def from_str(cls, s: "str"): + _UniffiConverterString.check_lower(s) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str, + _UniffiConverterString.lower(s)) + return cls._make_instance_(pointer) + + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate,) + return cls._make_instance_(pointer) + + + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes,self._uniffi_clone_pointer(),) + ) + + -class _UniffiConverterTypeObjectDigest: + +class _UniffiConverterTypeSecp256r1PublicKey: @staticmethod def lift(value: int): - return ObjectDigest._make_instance_(value) + return Secp256r1PublicKey._make_instance_(value) @staticmethod - def check_lower(value: ObjectDigest): - if not isinstance(value, ObjectDigest): - raise TypeError("Expected ObjectDigest instance, {} found".format(type(value).__name__)) + def check_lower(value: Secp256r1PublicKey): + if not isinstance(value, Secp256r1PublicKey): + raise TypeError("Expected Secp256r1PublicKey instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ObjectDigestProtocol): - if not isinstance(value, ObjectDigest): - raise TypeError("Expected ObjectDigest instance, {} found".format(type(value).__name__)) + def lower(value: Secp256r1PublicKeyProtocol): + if not isinstance(value, Secp256r1PublicKey): + raise TypeError("Expected Secp256r1PublicKey instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -14406,56 +19496,34 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectDigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256r1PublicKeyProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ObjectIdProtocol(typing.Protocol): +class Secp256r1SignatureProtocol(typing.Protocol): """ - An `ObjectId` is a 32-byte identifier used to uniquely identify an object on - the IOTA blockchain. - - ## Relationship to Address - - [`Address`]es and [`ObjectId`]s share the same 32-byte addressable space but - are derived leveraging different domain-separator values to ensure, - cryptographically, that there won't be any overlap, e.g. there can't be a - valid `Object` whose `ObjectId` is equal to that of the `Address` of a user - account. + A secp256r1 public key. # BCS - An `ObjectId`'s BCS serialized form is defined by the following: + The BCS serialized form for this type is defined by the following ABNF: ```text - object-id = 32*OCTET + secp256r1-public-key = 33OCTECT ``` """ - def to_address(self, ): - raise NotImplementedError def to_bytes(self, ): raise NotImplementedError - def to_hex(self, ): - raise NotImplementedError -# ObjectId is a Rust-only trait - it's a wrapper around a Rust implementation. -class ObjectId(): +# Secp256r1Signature is a Rust-only trait - it's a wrapper around a Rust implementation. +class Secp256r1Signature(): """ - An `ObjectId` is a 32-byte identifier used to uniquely identify an object on - the IOTA blockchain. - - ## Relationship to Address - - [`Address`]es and [`ObjectId`]s share the same 32-byte addressable space but - are derived leveraging different domain-separator values to ensure, - cryptographically, that there won't be any overlap, e.g. there can't be a - valid `Object` whose `ObjectId` is equal to that of the `Address` of a user - account. + A secp256r1 public key. # BCS - An `ObjectId`'s BCS serialized form is defined by the following: + The BCS serialized form for this type is defined by the following ABNF: ```text - object-id = 32*OCTET + secp256r1-public-key = 33OCTECT ``` """ @@ -14468,10 +19536,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectid, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1signature, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectid, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1signature, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14486,42 +19554,30 @@ def from_bytes(cls, bytes: "bytes"): _UniffiConverterBytes.check_lower(bytes) # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_bytes, - _UniffiConverterBytes.lower(bytes)) - return cls._make_instance_(pointer) - - @classmethod - def from_hex(cls, hex: "str"): - _UniffiConverterString.check_lower(hex) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_objectid_from_hex, - _UniffiConverterString.lower(hex)) - return cls._make_instance_(pointer) - - - - def to_address(self, ) -> "Address": - return _UniffiConverterTypeAddress.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_address,self._uniffi_clone_pointer(),) - ) + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + @classmethod + def from_str(cls, s: "str"): + _UniffiConverterString.check_lower(s) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_from_str, + _UniffiConverterString.lower(s)) + return cls._make_instance_(pointer) + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1signature_generate,) + return cls._make_instance_(pointer) def to_bytes(self, ) -> "bytes": return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_bytes,self._uniffi_clone_pointer(),) - ) - - - - - - def to_hex(self, ) -> "str": - return _UniffiConverterString.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectid_to_hex,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes,self._uniffi_clone_pointer(),) ) @@ -14529,21 +19585,21 @@ def to_hex(self, ) -> "str": -class _UniffiConverterTypeObjectId: +class _UniffiConverterTypeSecp256r1Signature: @staticmethod def lift(value: int): - return ObjectId._make_instance_(value) + return Secp256r1Signature._make_instance_(value) @staticmethod - def check_lower(value: ObjectId): - if not isinstance(value, ObjectId): - raise TypeError("Expected ObjectId instance, {} found".format(type(value).__name__)) + def check_lower(value: Secp256r1Signature): + if not isinstance(value, Secp256r1Signature): + raise TypeError("Expected Secp256r1Signature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ObjectIdProtocol): - if not isinstance(value, ObjectId): - raise TypeError("Expected ObjectId instance, {} found".format(type(value).__name__)) + def lower(value: Secp256r1SignatureProtocol): + if not isinstance(value, Secp256r1Signature): + raise TypeError("Expected Secp256r1Signature instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -14554,12 +19610,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectIdProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256r1SignatureProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ObjectRefProtocol(typing.Protocol): +class ServiceConfigProtocol(typing.Protocol): pass -# ObjectRef is a Rust-only trait - it's a wrapper around a Rust implementation. -class ObjectRef(): +# ServiceConfig is a Rust-only trait - it's a wrapper around a Rust implementation. +class ServiceConfig(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -14569,10 +19625,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objectref, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_serviceconfig, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectref, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_serviceconfig, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14585,21 +19641,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeObjectRef: +class _UniffiConverterTypeServiceConfig: @staticmethod def lift(value: int): - return ObjectRef._make_instance_(value) + return ServiceConfig._make_instance_(value) @staticmethod - def check_lower(value: ObjectRef): - if not isinstance(value, ObjectRef): - raise TypeError("Expected ObjectRef instance, {} found".format(type(value).__name__)) + def check_lower(value: ServiceConfig): + if not isinstance(value, ServiceConfig): + raise TypeError("Expected ServiceConfig instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ObjectRefProtocol): - if not isinstance(value, ObjectRef): - raise TypeError("Expected ObjectRef instance, {} found".format(type(value).__name__)) + def lower(value: ServiceConfigProtocol): + if not isinstance(value, ServiceConfig): + raise TypeError("Expected ServiceConfig instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -14610,12 +19666,95 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectRefProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ServiceConfigProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ObjectTypeProtocol(typing.Protocol): - pass -# ObjectType is a Rust-only trait - it's a wrapper around a Rust implementation. -class ObjectType(): +class SimpleSignatureProtocol(typing.Protocol): + """ + A basic signature + + This enumeration defines the set of simple or basic signature schemes + supported by IOTA. Most signature schemes supported by IOTA end up + comprising of a at least one simple signature scheme. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + simple-signature-bcs = bytes ; where the contents of the bytes are defined by + simple-signature = (ed25519-flag ed25519-signature ed25519-public-key) / + (secp256k1-flag secp256k1-signature secp256k1-public-key) / + (secp256r1-flag secp256r1-signature secp256r1-public-key) + ``` + + 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. + """ + + def ed25519_pub_key(self, ): + raise NotImplementedError + def ed25519_pub_key_opt(self, ): + raise NotImplementedError + def ed25519_sig(self, ): + raise NotImplementedError + def ed25519_sig_opt(self, ): + raise NotImplementedError + def is_ed25519(self, ): + raise NotImplementedError + def is_secp256k1(self, ): + raise NotImplementedError + def is_secp256r1(self, ): + raise NotImplementedError + def scheme(self, ): + raise NotImplementedError + def secp256k1_pub_key(self, ): + raise NotImplementedError + def secp256k1_pub_key_opt(self, ): + raise NotImplementedError + def secp256k1_sig(self, ): + raise NotImplementedError + def secp256k1_sig_opt(self, ): + raise NotImplementedError + def secp256r1_pub_key(self, ): + raise NotImplementedError + def secp256r1_pub_key_opt(self, ): + raise NotImplementedError + def secp256r1_sig(self, ): + raise NotImplementedError + def secp256r1_sig_opt(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError +# SimpleSignature is a Rust-only trait - it's a wrapper around a Rust implementation. +class SimpleSignature(): + """ + A basic signature + + This enumeration defines the set of simple or basic signature schemes + supported by IOTA. Most signature schemes supported by IOTA end up + comprising of a at least one simple signature scheme. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + simple-signature-bcs = bytes ; where the contents of the bytes are defined by + simple-signature = (ed25519-flag ed25519-signature ed25519-public-key) / + (secp256k1-flag secp256k1-signature secp256k1-public-key) / + (secp256r1-flag secp256r1-signature secp256r1-public-key) + ``` + + 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. + """ + _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -14625,10 +19764,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_objecttype, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_simplesignature, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objecttype, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_simplesignature, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14640,22 +19779,175 @@ def _make_instance_(cls, pointer): return inst + def ed25519_pub_key(self, ) -> "Ed25519PublicKey": + return _UniffiConverterTypeEd25519PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key,self._uniffi_clone_pointer(),) + ) + + + + + + def ed25519_pub_key_opt(self, ) -> "typing.Optional[Ed25519PublicKey]": + return _UniffiConverterOptionalTypeEd25519PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_pub_key_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def ed25519_sig(self, ) -> "Ed25519Signature": + return _UniffiConverterTypeEd25519Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig,self._uniffi_clone_pointer(),) + ) + + + + + + def ed25519_sig_opt(self, ) -> "typing.Optional[Ed25519Signature]": + return _UniffiConverterOptionalTypeEd25519Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_ed25519_sig_opt,self._uniffi_clone_pointer(),) + ) -class _UniffiConverterTypeObjectType: + + + + + def is_ed25519(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_ed25519,self._uniffi_clone_pointer(),) + ) + + + + + + def is_secp256k1(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256k1,self._uniffi_clone_pointer(),) + ) + + + + + + def is_secp256r1(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_is_secp256r1,self._uniffi_clone_pointer(),) + ) + + + + + + def scheme(self, ) -> "SignatureScheme": + return _UniffiConverterTypeSignatureScheme.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_scheme,self._uniffi_clone_pointer(),) + ) + + + + + + def secp256k1_pub_key(self, ) -> "Secp256k1PublicKey": + return _UniffiConverterTypeSecp256k1PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key,self._uniffi_clone_pointer(),) + ) + + + + + + def secp256k1_pub_key_opt(self, ) -> "typing.Optional[Secp256k1PublicKey]": + return _UniffiConverterOptionalTypeSecp256k1PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_pub_key_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def secp256k1_sig(self, ) -> "Secp256k1Signature": + return _UniffiConverterTypeSecp256k1Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig,self._uniffi_clone_pointer(),) + ) + + + + + + def secp256k1_sig_opt(self, ) -> "typing.Optional[Secp256k1Signature]": + return _UniffiConverterOptionalTypeSecp256k1Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256k1_sig_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def secp256r1_pub_key(self, ) -> "Secp256r1PublicKey": + return _UniffiConverterTypeSecp256r1PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key,self._uniffi_clone_pointer(),) + ) + + + + + + def secp256r1_pub_key_opt(self, ) -> "typing.Optional[Secp256r1PublicKey]": + return _UniffiConverterOptionalTypeSecp256r1PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_pub_key_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def secp256r1_sig(self, ) -> "Secp256r1Signature": + return _UniffiConverterTypeSecp256r1Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig,self._uniffi_clone_pointer(),) + ) + + + + + + def secp256r1_sig_opt(self, ) -> "typing.Optional[Secp256r1Signature]": + return _UniffiConverterOptionalTypeSecp256r1Signature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_secp256r1_sig_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_simplesignature_to_bytes,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeSimpleSignature: @staticmethod def lift(value: int): - return ObjectType._make_instance_(value) + return SimpleSignature._make_instance_(value) @staticmethod - def check_lower(value: ObjectType): - if not isinstance(value, ObjectType): - raise TypeError("Expected ObjectType instance, {} found".format(type(value).__name__)) + def check_lower(value: SimpleSignature): + if not isinstance(value, SimpleSignature): + raise TypeError("Expected SimpleSignature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ObjectTypeProtocol): - if not isinstance(value, ObjectType): - raise TypeError("Expected ObjectType instance, {} found".format(type(value).__name__)) + def lower(value: SimpleSignatureProtocol): + if not isinstance(value, SimpleSignature): + raise TypeError("Expected SimpleSignature instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -14666,25 +19958,71 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectTypeProtocol, buf: _UniffiRustBuffer): + def write(cls, value: SimpleSignatureProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class OwnerProtocol(typing.Protocol): - pass -# Owner is a Rust-only trait - it's a wrapper around a Rust implementation. -class Owner(): +class TransactionProtocol(typing.Protocol): + """ + A transaction + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + transaction = %x00 transaction-v1 + + transaction-v1 = transaction-kind address gas-payment transaction-expiration + ``` + """ + + def expiration(self, ): + raise NotImplementedError + def gas_payment(self, ): + raise NotImplementedError + def kind(self, ): + raise NotImplementedError + def sender(self, ): + raise NotImplementedError +# Transaction is a Rust-only trait - it's a wrapper around a Rust implementation. +class Transaction(): + """ + A transaction + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + transaction = %x00 transaction-v1 + + transaction-v1 = transaction-kind address gas-payment transaction-expiration + ``` + """ + _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def __init__(self, kind: "TransactionKind",sender: "Address",gas_payment: "GasPayment",expiration: "TransactionExpiration"): + _UniffiConverterTypeTransactionKind.check_lower(kind) + + _UniffiConverterTypeAddress.check_lower(sender) + + _UniffiConverterTypeGasPayment.check_lower(gas_payment) + + _UniffiConverterTypeTransactionExpiration.check_lower(expiration) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transaction_new, + _UniffiConverterTypeTransactionKind.lower(kind), + _UniffiConverterTypeAddress.lower(sender), + _UniffiConverterTypeGasPayment.lower(gas_payment), + _UniffiConverterTypeTransactionExpiration.lower(expiration)) def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_owner, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transaction, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_owner, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transaction, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14696,22 +20034,58 @@ def _make_instance_(cls, pointer): return inst + def expiration(self, ) -> "TransactionExpiration": + return _UniffiConverterTypeTransactionExpiration.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_expiration,self._uniffi_clone_pointer(),) + ) + + + + + + def gas_payment(self, ) -> "GasPayment": + return _UniffiConverterTypeGasPayment.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment,self._uniffi_clone_pointer(),) + ) + + + + + + def kind(self, ) -> "TransactionKind": + return _UniffiConverterTypeTransactionKind.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_kind,self._uniffi_clone_pointer(),) + ) + + + + + + def sender(self, ) -> "Address": + return _UniffiConverterTypeAddress.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_sender,self._uniffi_clone_pointer(),) + ) + + -class _UniffiConverterTypeOwner: + + + +class _UniffiConverterTypeTransaction: @staticmethod def lift(value: int): - return Owner._make_instance_(value) + return Transaction._make_instance_(value) @staticmethod - def check_lower(value: Owner): - if not isinstance(value, Owner): - raise TypeError("Expected Owner instance, {} found".format(type(value).__name__)) + def check_lower(value: Transaction): + if not isinstance(value, Transaction): + raise TypeError("Expected Transaction instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: OwnerProtocol): - if not isinstance(value, Owner): - raise TypeError("Expected Owner instance, {} found".format(type(value).__name__)) + def lower(value: TransactionProtocol): + if not isinstance(value, Transaction): + raise TypeError("Expected Transaction instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -14722,12 +20096,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: OwnerProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ProgrammableTransactionProtocol(typing.Protocol): - pass -# ProgrammableTransaction is a Rust-only trait - it's a wrapper around a Rust implementation. -class ProgrammableTransaction(): +class TransactionDigestProtocol(typing.Protocol): + def to_base58(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError +# TransactionDigest is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionDigest(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -14737,10 +20114,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactiondigest, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactiondigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14750,24 +20127,66 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_base58(cls, base58: "str"): + _UniffiConverterString.check_lower(base58) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondigest_from_base58, + _UniffiConverterString.lower(base58)) + return cls._make_instance_(pointer) + + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondigest_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondigest_generate,) + return cls._make_instance_(pointer) -class _UniffiConverterTypeProgrammableTransaction: + def to_base58(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondigest_to_base58,self._uniffi_clone_pointer(),) + ) + + + + + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondigest_to_bytes,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeTransactionDigest: @staticmethod def lift(value: int): - return ProgrammableTransaction._make_instance_(value) + return TransactionDigest._make_instance_(value) @staticmethod - def check_lower(value: ProgrammableTransaction): - if not isinstance(value, ProgrammableTransaction): - raise TypeError("Expected ProgrammableTransaction instance, {} found".format(type(value).__name__)) + def check_lower(value: TransactionDigest): + if not isinstance(value, TransactionDigest): + raise TypeError("Expected TransactionDigest instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ProgrammableTransactionProtocol): - if not isinstance(value, ProgrammableTransaction): - raise TypeError("Expected ProgrammableTransaction instance, {} found".format(type(value).__name__)) + def lower(value: TransactionDigestProtocol): + if not isinstance(value, TransactionDigest): + raise TypeError("Expected TransactionDigest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -14778,12 +20197,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ProgrammableTransactionProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ProtocolConfigsProtocol(typing.Protocol): - pass -# ProtocolConfigs is a Rust-only trait - it's a wrapper around a Rust implementation. -class ProtocolConfigs(): +class TransactionEffectsProtocol(typing.Protocol): + def as_v1(self, ): + raise NotImplementedError + def is_v1(self, ): + raise NotImplementedError +# TransactionEffects is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionEffects(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -14793,10 +20215,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_protocolconfigs, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffects, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_protocolconfigs, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffects, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14806,24 +20228,51 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def v1(cls, effects: "TransactionEffectsV1"): + _UniffiConverterTypeTransactionEffectsV1.check_lower(effects) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_v1, + _UniffiConverterTypeTransactionEffectsV1.lower(effects)) + return cls._make_instance_(pointer) + + + + def as_v1(self, ) -> "TransactionEffectsV1": + return _UniffiConverterTypeTransactionEffectsV1.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1,self._uniffi_clone_pointer(),) + ) + -class _UniffiConverterTypeProtocolConfigs: + + def is_v1(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeTransactionEffects: @staticmethod def lift(value: int): - return ProtocolConfigs._make_instance_(value) + return TransactionEffects._make_instance_(value) @staticmethod - def check_lower(value: ProtocolConfigs): - if not isinstance(value, ProtocolConfigs): - raise TypeError("Expected ProtocolConfigs instance, {} found".format(type(value).__name__)) + def check_lower(value: TransactionEffects): + if not isinstance(value, TransactionEffects): + raise TypeError("Expected TransactionEffects instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ProtocolConfigsProtocol): - if not isinstance(value, ProtocolConfigs): - raise TypeError("Expected ProtocolConfigs instance, {} found".format(type(value).__name__)) + def lower(value: TransactionEffectsProtocol): + if not isinstance(value, TransactionEffects): + raise TypeError("Expected TransactionEffects instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -14834,12 +20283,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ProtocolConfigsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionEffectsProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class RandomnessStateUpdateProtocol(typing.Protocol): - pass -# RandomnessStateUpdate is a Rust-only trait - it's a wrapper around a Rust implementation. -class RandomnessStateUpdate(): +class TransactionEffectsDigestProtocol(typing.Protocol): + def to_base58(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError +# TransactionEffectsDigest is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionEffectsDigest(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -14849,10 +20301,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_randomnessstateupdate, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffectsdigest, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_randomnessstateupdate, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffectsdigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14862,65 +20314,85 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + def from_base58(cls, base58: "str"): + _UniffiConverterString.check_lower(base58) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffectsdigest_from_base58, + _UniffiConverterString.lower(base58)) + return cls._make_instance_(pointer) + + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffectsdigest_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) + @classmethod + def generate(cls, ): + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffectsdigest_generate,) + return cls._make_instance_(pointer) -class _UniffiConverterTypeRandomnessStateUpdate: - @staticmethod - def lift(value: int): - return RandomnessStateUpdate._make_instance_(value) + def to_base58(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectsdigest_to_base58,self._uniffi_clone_pointer(),) + ) - @staticmethod - def check_lower(value: RandomnessStateUpdate): - if not isinstance(value, RandomnessStateUpdate): - raise TypeError("Expected RandomnessStateUpdate instance, {} found".format(type(value).__name__)) - @staticmethod - def lower(value: RandomnessStateUpdateProtocol): - if not isinstance(value, RandomnessStateUpdate): - raise TypeError("Expected RandomnessStateUpdate instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) - @classmethod - def write(cls, value: RandomnessStateUpdateProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class Secp256k1PublicKeyProtocol(typing.Protocol): - """ - A secp256k1 signature. - # BCS + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectsdigest_to_bytes,self._uniffi_clone_pointer(),) + ) - The BCS serialized form for this type is defined by the following ABNF: - ```text - secp256k1-signature = 64OCTECT - ``` - """ - def to_bytes(self, ): - raise NotImplementedError -# Secp256k1PublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256k1PublicKey(): - """ - A secp256k1 signature. - # BCS - The BCS serialized form for this type is defined by the following ABNF: - ```text - secp256k1-signature = 64OCTECT - ``` - """ +class _UniffiConverterTypeTransactionEffectsDigest: + + @staticmethod + def lift(value: int): + return TransactionEffectsDigest._make_instance_(value) + + @staticmethod + def check_lower(value: TransactionEffectsDigest): + if not isinstance(value, TransactionEffectsDigest): + raise TypeError("Expected TransactionEffectsDigest instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: TransactionEffectsDigestProtocol): + if not isinstance(value, TransactionEffectsDigest): + raise TypeError("Expected TransactionEffectsDigest instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() + + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) + @classmethod + def write(cls, value: TransactionEffectsDigestProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class TransactionEventsDigestProtocol(typing.Protocol): + def to_base58(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError +# TransactionEventsDigest is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionEventsDigest(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -14930,10 +20402,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256k1publickey, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneventsdigest, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256k1publickey, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneventsdigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -14944,34 +20416,43 @@ def _make_instance_(cls, pointer): inst._pointer = pointer return inst @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) + def from_base58(cls, base58: "str"): + _UniffiConverterString.check_lower(base58) # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_bytes, - _UniffiConverterBytes.lower(bytes)) + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneventsdigest_from_base58, + _UniffiConverterString.lower(base58)) return cls._make_instance_(pointer) @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_from_str, - _UniffiConverterString.lower(s)) + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneventsdigest_from_bytes, + _UniffiConverterBytes.lower(bytes)) return cls._make_instance_(pointer) @classmethod def generate(cls, ): # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_generate,) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneventsdigest_generate,) return cls._make_instance_(pointer) + def to_base58(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventsdigest_to_base58,self._uniffi_clone_pointer(),) + ) + + + + + def to_bytes(self, ) -> "bytes": return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventsdigest_to_bytes,self._uniffi_clone_pointer(),) ) @@ -14979,21 +20460,21 @@ def to_bytes(self, ) -> "bytes": -class _UniffiConverterTypeSecp256k1PublicKey: +class _UniffiConverterTypeTransactionEventsDigest: @staticmethod def lift(value: int): - return Secp256k1PublicKey._make_instance_(value) + return TransactionEventsDigest._make_instance_(value) @staticmethod - def check_lower(value: Secp256k1PublicKey): - if not isinstance(value, Secp256k1PublicKey): - raise TypeError("Expected Secp256k1PublicKey instance, {} found".format(type(value).__name__)) + def check_lower(value: TransactionEventsDigest): + if not isinstance(value, TransactionEventsDigest): + raise TypeError("Expected TransactionEventsDigest instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Secp256k1PublicKeyProtocol): - if not isinstance(value, Secp256k1PublicKey): - raise TypeError("Expected Secp256k1PublicKey instance, {} found".format(type(value).__name__)) + def lower(value: TransactionEventsDigestProtocol): + if not isinstance(value, TransactionEventsDigest): + raise TypeError("Expected TransactionEventsDigest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -15004,34 +20485,49 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: Secp256k1PublicKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionEventsDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256r1PublicKeyProtocol(typing.Protocol): +class TransactionKindProtocol(typing.Protocol): """ - A secp256r1 signature. + Transaction type # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - secp256r1-signature = 64OCTECT + transaction-kind = %x00 ptb + =/ %x01 change-epoch + =/ %x02 genesis-transaction + =/ %x03 consensus-commit-prologue + =/ %x04 authenticator-state-update + =/ %x05 (vector end-of-epoch-transaction-kind) + =/ %x06 randomness-state-update + =/ %x07 consensus-commit-prologue-v2 + =/ %x08 consensus-commit-prologue-v3 ``` """ - def to_bytes(self, ): - raise NotImplementedError -# Secp256r1PublicKey is a Rust-only trait - it's a wrapper around a Rust implementation. -class Secp256r1PublicKey(): + pass +# TransactionKind is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionKind(): """ - A secp256r1 signature. + Transaction type # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - secp256r1-signature = 64OCTECT + transaction-kind = %x00 ptb + =/ %x01 change-epoch + =/ %x02 genesis-transaction + =/ %x03 consensus-commit-prologue + =/ %x04 authenticator-state-update + =/ %x05 (vector end-of-epoch-transaction-kind) + =/ %x06 randomness-state-update + =/ %x07 consensus-commit-prologue-v2 + =/ %x08 consensus-commit-prologue-v3 ``` """ @@ -15044,10 +20540,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_secp256r1publickey, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionkind, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_secp256r1publickey, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionkind, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -15058,56 +20554,77 @@ def _make_instance_(cls, pointer): inst._pointer = pointer return inst @classmethod - def from_bytes(cls, bytes: "bytes"): - _UniffiConverterBytes.check_lower(bytes) + def authenticator_state_update_v1(cls, tx: "AuthenticatorStateUpdateV1"): + _UniffiConverterTypeAuthenticatorStateUpdateV1.check_lower(tx) # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes, - _UniffiConverterBytes.lower(bytes)) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_authenticator_state_update_v1, + _UniffiConverterTypeAuthenticatorStateUpdateV1.lower(tx)) return cls._make_instance_(pointer) @classmethod - def from_str(cls, s: "str"): - _UniffiConverterString.check_lower(s) + def consensus_commit_prologue_v1(cls, tx: "ConsensusCommitPrologueV1"): + _UniffiConverterTypeConsensusCommitPrologueV1.check_lower(tx) # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str, - _UniffiConverterString.lower(s)) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_consensus_commit_prologue_v1, + _UniffiConverterTypeConsensusCommitPrologueV1.lower(tx)) return cls._make_instance_(pointer) @classmethod - def generate(cls, ): + def end_of_epoch(cls, tx: "typing.List[EndOfEpochTransactionKind]"): + _UniffiConverterSequenceTypeEndOfEpochTransactionKind.check_lower(tx) + # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_generate,) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_end_of_epoch, + _UniffiConverterSequenceTypeEndOfEpochTransactionKind.lower(tx)) return cls._make_instance_(pointer) + @classmethod + def genesis(cls, tx: "GenesisTransaction"): + _UniffiConverterTypeGenesisTransaction.check_lower(tx) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_genesis, + _UniffiConverterTypeGenesisTransaction.lower(tx)) + return cls._make_instance_(pointer) + @classmethod + def programmable_transaction(cls, tx: "ProgrammableTransaction"): + _UniffiConverterTypeProgrammableTransaction.check_lower(tx) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_programmable_transaction, + _UniffiConverterTypeProgrammableTransaction.lower(tx)) + return cls._make_instance_(pointer) - def to_bytes(self, ) -> "bytes": - return _UniffiConverterBytes.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1publickey_to_bytes,self._uniffi_clone_pointer(),) - ) - - + @classmethod + def randomness_state_update(cls, tx: "RandomnessStateUpdate"): + _UniffiConverterTypeRandomnessStateUpdate.check_lower(tx) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_randomness_state_update, + _UniffiConverterTypeRandomnessStateUpdate.lower(tx)) + return cls._make_instance_(pointer) -class _UniffiConverterTypeSecp256r1PublicKey: +class _UniffiConverterTypeTransactionKind: @staticmethod def lift(value: int): - return Secp256r1PublicKey._make_instance_(value) + return TransactionKind._make_instance_(value) @staticmethod - def check_lower(value: Secp256r1PublicKey): - if not isinstance(value, Secp256r1PublicKey): - raise TypeError("Expected Secp256r1PublicKey instance, {} found".format(type(value).__name__)) + def check_lower(value: TransactionKind): + if not isinstance(value, TransactionKind): + raise TypeError("Expected TransactionKind instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: Secp256r1PublicKeyProtocol): - if not isinstance(value, Secp256r1PublicKey): - raise TypeError("Expected Secp256r1PublicKey instance, {} found".format(type(value).__name__)) + def lower(value: TransactionKindProtocol): + if not isinstance(value, TransactionKind): + raise TypeError("Expected TransactionKind instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -15118,12 +20635,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: Secp256r1PublicKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionKindProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ServiceConfigProtocol(typing.Protocol): +class TypeTagProtocol(typing.Protocol): pass -# ServiceConfig is a Rust-only trait - it's a wrapper around a Rust implementation. -class ServiceConfig(): +# TypeTag is a Rust-only trait - it's a wrapper around a Rust implementation. +class TypeTag(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -15133,10 +20650,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_serviceconfig, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_typetag, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_serviceconfig, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_typetag, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -15149,21 +20666,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeServiceConfig: +class _UniffiConverterTypeTypeTag: @staticmethod def lift(value: int): - return ServiceConfig._make_instance_(value) + return TypeTag._make_instance_(value) @staticmethod - def check_lower(value: ServiceConfig): - if not isinstance(value, ServiceConfig): - raise TypeError("Expected ServiceConfig instance, {} found".format(type(value).__name__)) + def check_lower(value: TypeTag): + if not isinstance(value, TypeTag): + raise TypeError("Expected TypeTag instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ServiceConfigProtocol): - if not isinstance(value, ServiceConfig): - raise TypeError("Expected ServiceConfig instance, {} found".format(type(value).__name__)) + def lower(value: TypeTagProtocol): + if not isinstance(value, TypeTag): + raise TypeError("Expected TypeTag instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -15174,71 +20691,89 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ServiceConfigProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TypeTagProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionDigestProtocol(typing.Protocol): - pass -# TransactionDigest is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionDigest(): - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") +class UserSignatureProtocol(typing.Protocol): + """ + A signature from a user - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactiondigest, pointer) + A `UserSignature` is most commonly used to authorize the execution and + inclusion of a transaction to the blockchain. - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactiondigest, self._pointer) + # BCS - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + The BCS serialized form for this type is defined by the following ABNF: + + ```text + user-signature-bcs = bytes ; where the contents of the bytes are defined by + user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey + ``` + + 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. + """ + def as_multisig(self, ): + raise NotImplementedError + def as_multisig_opt(self, ): + raise NotImplementedError + def as_passkey(self, ): + raise NotImplementedError + def as_passkey_opt(self, ): + raise NotImplementedError + def as_simple(self, ): + raise NotImplementedError + def as_simple_opt(self, ): + raise NotImplementedError + def as_zklogin(self, ): + raise NotImplementedError + def as_zklogin_opt(self, ): + raise NotImplementedError + def is_multisig(self, ): + raise NotImplementedError + def is_passkey(self, ): + raise NotImplementedError + def is_simple(self, ): + raise NotImplementedError + def is_zklogin(self, ): + raise NotImplementedError + def scheme(self, ): + """ + Return the flag for this signature scheme + """ + raise NotImplementedError + def to_base64(self, ): + raise NotImplementedError + def to_bytes(self, ): + raise NotImplementedError +# UserSignature is a Rust-only trait - it's a wrapper around a Rust implementation. +class UserSignature(): + """ + A signature from a user -class _UniffiConverterTypeTransactionDigest: + A `UserSignature` is most commonly used to authorize the execution and + inclusion of a transaction to the blockchain. - @staticmethod - def lift(value: int): - return TransactionDigest._make_instance_(value) + # BCS - @staticmethod - def check_lower(value: TransactionDigest): - if not isinstance(value, TransactionDigest): - raise TypeError("Expected TransactionDigest instance, {} found".format(type(value).__name__)) + The BCS serialized form for this type is defined by the following ABNF: - @staticmethod - def lower(value: TransactionDigestProtocol): - if not isinstance(value, TransactionDigest): - raise TypeError("Expected TransactionDigest instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + ```text + user-signature-bcs = bytes ; where the contents of the bytes are defined by + user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey + ``` - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + 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. + """ - @classmethod - def write(cls, value: TransactionDigestProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class TransactionEffectsProtocol(typing.Protocol): - def as_v1(self, ): - raise NotImplementedError - def is_v1(self, ): - raise NotImplementedError -# TransactionEffects is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionEffects(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -15248,10 +20783,10 @@ def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffects, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignature, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffects, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignature, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -15262,106 +20797,180 @@ def _make_instance_(cls, pointer): inst._pointer = pointer return inst @classmethod - def v1(cls, effects: "TransactionEffectsV1"): - _UniffiConverterTypeTransactionEffectsV1.check_lower(effects) + def from_base64(cls, base64: "str"): + _UniffiConverterString.check_lower(base64) # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactioneffects_v1, - _UniffiConverterTypeTransactionEffectsV1.lower(effects)) + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64, + _UniffiConverterString.lower(base64)) + return cls._make_instance_(pointer) + + @classmethod + def from_bytes(cls, bytes: "bytes"): + _UniffiConverterBytes.check_lower(bytes) + + # Call the (fallible) function before creating any half-baked object instances. + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_bytes, + _UniffiConverterBytes.lower(bytes)) return cls._make_instance_(pointer) - def as_v1(self, ) -> "TransactionEffectsV1": - return _UniffiConverterTypeTransactionEffectsV1.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_as_v1,self._uniffi_clone_pointer(),) + def as_multisig(self, ) -> "MultisigAggregatedSignature": + return _UniffiConverterTypeMultisigAggregatedSignature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig,self._uniffi_clone_pointer(),) ) - def is_v1(self, ) -> "bool": + def as_multisig_opt(self, ) -> "typing.Optional[MultisigAggregatedSignature]": + return _UniffiConverterOptionalTypeMultisigAggregatedSignature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_multisig_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def as_passkey(self, ) -> "PasskeyAuthenticator": + return _UniffiConverterTypePasskeyAuthenticator.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey,self._uniffi_clone_pointer(),) + ) + + + + + + def as_passkey_opt(self, ) -> "typing.Optional[PasskeyAuthenticator]": + return _UniffiConverterOptionalTypePasskeyAuthenticator.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_passkey_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def as_simple(self, ) -> "SimpleSignature": + return _UniffiConverterTypeSimpleSignature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple,self._uniffi_clone_pointer(),) + ) + + + + + + def as_simple_opt(self, ) -> "typing.Optional[SimpleSignature]": + return _UniffiConverterOptionalTypeSimpleSignature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def as_zklogin(self, ) -> "ZkLoginAuthenticator": + return _UniffiConverterTypeZkLoginAuthenticator.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin,self._uniffi_clone_pointer(),) + ) + + + + + + def as_zklogin_opt(self, ) -> "typing.Optional[ZkLoginAuthenticator]": + return _UniffiConverterOptionalTypeZkLoginAuthenticator.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_zklogin_opt,self._uniffi_clone_pointer(),) + ) + + + + + + def is_multisig(self, ) -> "bool": return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffects_is_v1,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_multisig,self._uniffi_clone_pointer(),) ) + def is_passkey(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_passkey,self._uniffi_clone_pointer(),) + ) -class _UniffiConverterTypeTransactionEffects: - @staticmethod - def lift(value: int): - return TransactionEffects._make_instance_(value) - @staticmethod - def check_lower(value: TransactionEffects): - if not isinstance(value, TransactionEffects): - raise TypeError("Expected TransactionEffects instance, {} found".format(type(value).__name__)) - @staticmethod - def lower(value: TransactionEffectsProtocol): - if not isinstance(value, TransactionEffects): - raise TypeError("Expected TransactionEffects instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + def is_simple(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_simple,self._uniffi_clone_pointer(),) + ) - @classmethod - def write(cls, value: TransactionEffectsProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class TransactionEffectsDigestProtocol(typing.Protocol): - pass -# TransactionEffectsDigest is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionEffectsDigest(): - _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") - def __del__(self): - # In case of partial initialization of instances. - pointer = getattr(self, "_pointer", None) - if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffectsdigest, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffectsdigest, self._pointer) - # Used by alternative constructors or any methods which return this type. - @classmethod - def _make_instance_(cls, pointer): - # Lightly yucky way to bypass the usual __init__ logic - # and just create a new instance with the required pointer. - inst = cls.__new__(cls) - inst._pointer = pointer - return inst + + def is_zklogin(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_is_zklogin,self._uniffi_clone_pointer(),) + ) + + + + + + def scheme(self, ) -> "SignatureScheme": + """ + Return the flag for this signature scheme + """ + + return _UniffiConverterTypeSignatureScheme.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_scheme,self._uniffi_clone_pointer(),) + ) -class _UniffiConverterTypeTransactionEffectsDigest: + + + def to_base64(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_base64,self._uniffi_clone_pointer(),) + ) + + + + + + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeUserSignature: @staticmethod def lift(value: int): - return TransactionEffectsDigest._make_instance_(value) + return UserSignature._make_instance_(value) @staticmethod - def check_lower(value: TransactionEffectsDigest): - if not isinstance(value, TransactionEffectsDigest): - raise TypeError("Expected TransactionEffectsDigest instance, {} found".format(type(value).__name__)) + def check_lower(value: UserSignature): + if not isinstance(value, UserSignature): + raise TypeError("Expected UserSignature instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransactionEffectsDigestProtocol): - if not isinstance(value, TransactionEffectsDigest): - raise TypeError("Expected TransactionEffectsDigest instance, {} found".format(type(value).__name__)) + def lower(value: UserSignatureProtocol): + if not isinstance(value, UserSignature): + raise TypeError("Expected UserSignature instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -15372,25 +20981,82 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TransactionEffectsDigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: UserSignatureProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionEventsDigestProtocol(typing.Protocol): - pass -# TransactionEventsDigest is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionEventsDigest(): +class ZkLoginAuthenticatorProtocol(typing.Protocol): + """ + A zklogin authenticator + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + zklogin-bcs = bytes ; contents are defined by + zklogin = zklogin-flag + zklogin-inputs + u64 ; max epoch + simple-signature + ``` + + 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. + """ + + def inputs(self, ): + raise NotImplementedError + def max_epoch(self, ): + raise NotImplementedError + def signature(self, ): + raise NotImplementedError +# ZkLoginAuthenticator is a Rust-only trait - it's a wrapper around a Rust implementation. +class ZkLoginAuthenticator(): + """ + A zklogin authenticator + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + zklogin-bcs = bytes ; contents are defined by + zklogin = zklogin-flag + zklogin-inputs + u64 ; max epoch + simple-signature + ``` + + 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. + """ + _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def __init__(self, inputs: "ZkLoginInputs",max_epoch: "int",signature: "SimpleSignature"): + _UniffiConverterTypeZkLoginInputs.check_lower(inputs) + + _UniffiConverterUInt64.check_lower(max_epoch) + + _UniffiConverterTypeSimpleSignature.check_lower(signature) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginauthenticator_new, + _UniffiConverterTypeZkLoginInputs.lower(inputs), + _UniffiConverterUInt64.lower(max_epoch), + _UniffiConverterTypeSimpleSignature.lower(signature)) def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneventsdigest, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginauthenticator, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneventsdigest, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -15402,22 +21068,49 @@ def _make_instance_(cls, pointer): return inst + def inputs(self, ) -> "ZkLoginInputs": + return _UniffiConverterTypeZkLoginInputs.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_inputs,self._uniffi_clone_pointer(),) + ) -class _UniffiConverterTypeTransactionEventsDigest: + + + + + def max_epoch(self, ) -> "int": + return _UniffiConverterUInt64.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_max_epoch,self._uniffi_clone_pointer(),) + ) + + + + + + def signature(self, ) -> "SimpleSignature": + return _UniffiConverterTypeSimpleSignature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginauthenticator_signature,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeZkLoginAuthenticator: @staticmethod def lift(value: int): - return TransactionEventsDigest._make_instance_(value) + return ZkLoginAuthenticator._make_instance_(value) @staticmethod - def check_lower(value: TransactionEventsDigest): - if not isinstance(value, TransactionEventsDigest): - raise TypeError("Expected TransactionEventsDigest instance, {} found".format(type(value).__name__)) + def check_lower(value: ZkLoginAuthenticator): + if not isinstance(value, ZkLoginAuthenticator): + raise TypeError("Expected ZkLoginAuthenticator instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransactionEventsDigestProtocol): - if not isinstance(value, TransactionEventsDigest): - raise TypeError("Expected TransactionEventsDigest instance, {} found".format(type(value).__name__)) + def lower(value: ZkLoginAuthenticatorProtocol): + if not isinstance(value, ZkLoginAuthenticator): + raise TypeError("Expected ZkLoginAuthenticator instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -15428,65 +21121,75 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TransactionEventsDigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ZkLoginAuthenticatorProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionKindProtocol(typing.Protocol): +class ZkLoginInputsProtocol(typing.Protocol): """ - Transaction type + A zklogin groth16 proof and the required inputs to perform proof + verification. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - transaction-kind = %x00 ptb - =/ %x01 change-epoch - =/ %x02 genesis-transaction - =/ %x03 consensus-commit-prologue - =/ %x04 authenticator-state-update - =/ %x05 (vector end-of-epoch-transaction-kind) - =/ %x06 randomness-state-update - =/ %x07 consensus-commit-prologue-v2 - =/ %x08 consensus-commit-prologue-v3 + zklogin-inputs = zklogin-proof + zklogin-claim + string ; base64url-unpadded encoded JwtHeader + bn254-field-element ; address_seed ``` """ - pass -# TransactionKind is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionKind(): + def address_seed(self, ): + raise NotImplementedError + def header_base64(self, ): + raise NotImplementedError + def iss_base64_details(self, ): + raise NotImplementedError + def proof_points(self, ): + raise NotImplementedError +# ZkLoginInputs is a Rust-only trait - it's a wrapper around a Rust implementation. +class ZkLoginInputs(): """ - Transaction type + A zklogin groth16 proof and the required inputs to perform proof + verification. # BCS The BCS serialized form for this type is defined by the following ABNF: ```text - transaction-kind = %x00 ptb - =/ %x01 change-epoch - =/ %x02 genesis-transaction - =/ %x03 consensus-commit-prologue - =/ %x04 authenticator-state-update - =/ %x05 (vector end-of-epoch-transaction-kind) - =/ %x06 randomness-state-update - =/ %x07 consensus-commit-prologue-v2 - =/ %x08 consensus-commit-prologue-v3 + zklogin-inputs = zklogin-proof + zklogin-claim + string ; base64url-unpadded encoded JwtHeader + bn254-field-element ; address_seed ``` """ _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def __init__(self, proof_points: "ZkLoginProof",iss_base64_details: "ZkLoginClaim",header_base64: "str",address_seed: "Bn254FieldElement"): + _UniffiConverterTypeZkLoginProof.check_lower(proof_points) + + _UniffiConverterTypeZkLoginClaim.check_lower(iss_base64_details) + + _UniffiConverterString.check_lower(header_base64) + + _UniffiConverterTypeBn254FieldElement.check_lower(address_seed) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zklogininputs_new, + _UniffiConverterTypeZkLoginProof.lower(proof_points), + _UniffiConverterTypeZkLoginClaim.lower(iss_base64_details), + _UniffiConverterString.lower(header_base64), + _UniffiConverterTypeBn254FieldElement.lower(address_seed)) def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionkind, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zklogininputs, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionkind, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zklogininputs, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -15496,78 +21199,60 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst - @classmethod - def authenticator_state_update_v1(cls, tx: "AuthenticatorStateUpdateV1"): - _UniffiConverterTypeAuthenticatorStateUpdateV1.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_authenticator_state_update_v1, - _UniffiConverterTypeAuthenticatorStateUpdateV1.lower(tx)) - return cls._make_instance_(pointer) - @classmethod - def consensus_commit_prologue_v1(cls, tx: "ConsensusCommitPrologueV1"): - _UniffiConverterTypeConsensusCommitPrologueV1.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_consensus_commit_prologue_v1, - _UniffiConverterTypeConsensusCommitPrologueV1.lower(tx)) - return cls._make_instance_(pointer) - @classmethod - def end_of_epoch(cls, tx: "typing.List[EndOfEpochTransactionKind]"): - _UniffiConverterSequenceTypeEndOfEpochTransactionKind.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_end_of_epoch, - _UniffiConverterSequenceTypeEndOfEpochTransactionKind.lower(tx)) - return cls._make_instance_(pointer) + def address_seed(self, ) -> "Bn254FieldElement": + return _UniffiConverterTypeBn254FieldElement.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_address_seed,self._uniffi_clone_pointer(),) + ) - @classmethod - def genesis(cls, tx: "GenesisTransaction"): - _UniffiConverterTypeGenesisTransaction.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_genesis, - _UniffiConverterTypeGenesisTransaction.lower(tx)) - return cls._make_instance_(pointer) - @classmethod - def programmable_transaction(cls, tx: "ProgrammableTransaction"): - _UniffiConverterTypeProgrammableTransaction.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_programmable_transaction, - _UniffiConverterTypeProgrammableTransaction.lower(tx)) - return cls._make_instance_(pointer) - @classmethod - def randomness_state_update(cls, tx: "RandomnessStateUpdate"): - _UniffiConverterTypeRandomnessStateUpdate.check_lower(tx) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactionkind_randomness_state_update, - _UniffiConverterTypeRandomnessStateUpdate.lower(tx)) - return cls._make_instance_(pointer) + + + def header_base64(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_header_base64,self._uniffi_clone_pointer(),) + ) -class _UniffiConverterTypeTransactionKind: + + def iss_base64_details(self, ) -> "ZkLoginClaim": + return _UniffiConverterTypeZkLoginClaim.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_iss_base64_details,self._uniffi_clone_pointer(),) + ) + + + + + + def proof_points(self, ) -> "ZkLoginProof": + return _UniffiConverterTypeZkLoginProof.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zklogininputs_proof_points,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeZkLoginInputs: @staticmethod def lift(value: int): - return TransactionKind._make_instance_(value) + return ZkLoginInputs._make_instance_(value) @staticmethod - def check_lower(value: TransactionKind): - if not isinstance(value, TransactionKind): - raise TypeError("Expected TransactionKind instance, {} found".format(type(value).__name__)) + def check_lower(value: ZkLoginInputs): + if not isinstance(value, ZkLoginInputs): + raise TypeError("Expected ZkLoginInputs instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransactionKindProtocol): - if not isinstance(value, TransactionKind): - raise TypeError("Expected TransactionKind instance, {} found".format(type(value).__name__)) + def lower(value: ZkLoginInputsProtocol): + if not isinstance(value, ZkLoginInputs): + raise TypeError("Expected ZkLoginInputs instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -15578,25 +21263,62 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TransactionKindProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ZkLoginInputsProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TypeTagProtocol(typing.Protocol): - pass -# TypeTag is a Rust-only trait - it's a wrapper around a Rust implementation. -class TypeTag(): +class ZkLoginProofProtocol(typing.Protocol): + """ + A zklogin groth16 proof + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + zklogin-proof = circom-g1 circom-g2 circom-g1 + ``` + """ + + def a(self, ): + raise NotImplementedError + def b(self, ): + raise NotImplementedError + def c(self, ): + raise NotImplementedError +# ZkLoginProof is a Rust-only trait - it's a wrapper around a Rust implementation. +class ZkLoginProof(): + """ + A zklogin groth16 proof + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + zklogin-proof = circom-g1 circom-g2 circom-g1 + ``` + """ + _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def __init__(self, a: "CircomG1",b: "CircomG2",c: "CircomG1"): + _UniffiConverterTypeCircomG1.check_lower(a) + + _UniffiConverterTypeCircomG2.check_lower(b) + + _UniffiConverterTypeCircomG1.check_lower(c) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginproof_new, + _UniffiConverterTypeCircomG1.lower(a), + _UniffiConverterTypeCircomG2.lower(b), + _UniffiConverterTypeCircomG1.lower(c)) def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_typetag, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginproof, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_typetag, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginproof, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -15608,22 +21330,49 @@ def _make_instance_(cls, pointer): return inst + def a(self, ) -> "CircomG1": + return _UniffiConverterTypeCircomG1.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_a,self._uniffi_clone_pointer(),) + ) + + + + + + def b(self, ) -> "CircomG2": + return _UniffiConverterTypeCircomG2.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b,self._uniffi_clone_pointer(),) + ) -class _UniffiConverterTypeTypeTag: + + + + + def c(self, ) -> "CircomG1": + return _UniffiConverterTypeCircomG1.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_c,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeZkLoginProof: @staticmethod def lift(value: int): - return TypeTag._make_instance_(value) + return ZkLoginProof._make_instance_(value) @staticmethod - def check_lower(value: TypeTag): - if not isinstance(value, TypeTag): - raise TypeError("Expected TypeTag instance, {} found".format(type(value).__name__)) + def check_lower(value: ZkLoginProof): + if not isinstance(value, ZkLoginProof): + raise TypeError("Expected ZkLoginProof instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TypeTagProtocol): - if not isinstance(value, TypeTag): - raise TypeError("Expected TypeTag instance, {} found".format(type(value).__name__)) + def lower(value: ZkLoginProofProtocol): + if not isinstance(value, ZkLoginProof): + raise TypeError("Expected ZkLoginProof instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -15634,25 +21383,143 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TypeTagProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ZkLoginProofProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class UserSignatureProtocol(typing.Protocol): - pass -# UserSignature is a Rust-only trait - it's a wrapper around a Rust implementation. -class UserSignature(): +class ZkLoginPublicIdentifierProtocol(typing.Protocol): + """ + Public Key equivalent for Zklogin authenticators + + A `ZkLoginPublicIdentifier` is the equivalent of a public key for other + account authenticators, and contains the information required to derive the + onchain account [`Address`] for a Zklogin authenticator. + + ## Note + + Due to a historical bug that was introduced in the IOTA Typescript SDK when + the zklogin authenticator was first introduced, there are now possibly two + "valid" addresses for each zklogin authenticator depending on the + bit-pattern of the `address_seed` value. + + The original bug incorrectly derived a zklogin's address by stripping any + leading zero-bytes that could have been present in the 32-byte length + `address_seed` value prior to hashing, leading to a different derived + address. This incorrectly derived address was presented to users of various + wallets, leading them to sending funds to these addresses that they couldn't + access. Instead of letting these users lose any assets that were sent to + these addresses, the IOTA network decided to change the protocol to allow + for a zklogin authenticator who's `address_seed` value had leading + zero-bytes be authorized to sign for both the addresses derived from both + the unpadded and padded `address_seed` value. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + zklogin-public-identifier-bcs = bytes ; where the contents are defined by + ; + + zklogin-public-identifier = zklogin-public-identifier-iss + address-seed + + zklogin-public-identifier-unpadded = zklogin-public-identifier-iss + address-seed-unpadded + + ; The iss, or issuer, is a utf8 string that is less than 255 bytes long + ; and is serialized with the iss's length in bytes as a u8 followed by + ; the bytes of the iss + zklogin-public-identifier-iss = u8 *255(OCTET) + + ; A Bn254FieldElement serialized as a 32-byte big-endian value + address-seed = 32(OCTET) + + ; A Bn254FieldElement serialized as a 32-byte big-endian value + ; with any leading zero bytes stripped + address-seed-unpadded = %x00 / %x01-ff *31(OCTET) + ``` + + [`Address`]: crate::Address + """ + + def address_seed(self, ): + raise NotImplementedError + def iss(self, ): + raise NotImplementedError +# ZkLoginPublicIdentifier is a Rust-only trait - it's a wrapper around a Rust implementation. +class ZkLoginPublicIdentifier(): + """ + Public Key equivalent for Zklogin authenticators + + A `ZkLoginPublicIdentifier` is the equivalent of a public key for other + account authenticators, and contains the information required to derive the + onchain account [`Address`] for a Zklogin authenticator. + + ## Note + + Due to a historical bug that was introduced in the IOTA Typescript SDK when + the zklogin authenticator was first introduced, there are now possibly two + "valid" addresses for each zklogin authenticator depending on the + bit-pattern of the `address_seed` value. + + The original bug incorrectly derived a zklogin's address by stripping any + leading zero-bytes that could have been present in the 32-byte length + `address_seed` value prior to hashing, leading to a different derived + address. This incorrectly derived address was presented to users of various + wallets, leading them to sending funds to these addresses that they couldn't + access. Instead of letting these users lose any assets that were sent to + these addresses, the IOTA network decided to change the protocol to allow + for a zklogin authenticator who's `address_seed` value had leading + zero-bytes be authorized to sign for both the addresses derived from both + the unpadded and padded `address_seed` value. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + zklogin-public-identifier-bcs = bytes ; where the contents are defined by + ; + + zklogin-public-identifier = zklogin-public-identifier-iss + address-seed + + zklogin-public-identifier-unpadded = zklogin-public-identifier-iss + address-seed-unpadded + + ; The iss, or issuer, is a utf8 string that is less than 255 bytes long + ; and is serialized with the iss's length in bytes as a u8 followed by + ; the bytes of the iss + zklogin-public-identifier-iss = u8 *255(OCTET) + + ; A Bn254FieldElement serialized as a 32-byte big-endian value + address-seed = 32(OCTET) + + ; A Bn254FieldElement serialized as a 32-byte big-endian value + ; with any leading zero bytes stripped + address-seed-unpadded = %x00 / %x01-ff *31(OCTET) + ``` + + [`Address`]: crate::Address + """ + _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def __init__(self, iss: "str",address_seed: "Bn254FieldElement"): + _UniffiConverterString.check_lower(iss) + + _UniffiConverterTypeBn254FieldElement.check_lower(address_seed) + + self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_zkloginpublicidentifier_new, + _UniffiConverterString.lower(iss), + _UniffiConverterTypeBn254FieldElement.lower(address_seed)) def __del__(self): # In case of partial initialization of instances. pointer = getattr(self, "_pointer", None) if pointer is not None: - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignature, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_zkloginpublicidentifier, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_usersignature, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginpublicidentifier, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -15664,22 +21531,40 @@ def _make_instance_(cls, pointer): return inst + def address_seed(self, ) -> "Bn254FieldElement": + return _UniffiConverterTypeBn254FieldElement.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_address_seed,self._uniffi_clone_pointer(),) + ) -class _UniffiConverterTypeUserSignature: + + + + + def iss(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeZkLoginPublicIdentifier: @staticmethod def lift(value: int): - return UserSignature._make_instance_(value) + return ZkLoginPublicIdentifier._make_instance_(value) @staticmethod - def check_lower(value: UserSignature): - if not isinstance(value, UserSignature): - raise TypeError("Expected UserSignature instance, {} found".format(type(value).__name__)) + def check_lower(value: ZkLoginPublicIdentifier): + if not isinstance(value, ZkLoginPublicIdentifier): + raise TypeError("Expected ZkLoginPublicIdentifier instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: UserSignatureProtocol): - if not isinstance(value, UserSignature): - raise TypeError("Expected UserSignature instance, {} found".format(type(value).__name__)) + def lower(value: ZkLoginPublicIdentifierProtocol): + if not isinstance(value, ZkLoginPublicIdentifier): + raise TypeError("Expected ZkLoginPublicIdentifier instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -15690,7 +21575,7 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: UserSignatureProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ZkLoginPublicIdentifierProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) Base64 = str Value = str @@ -15770,6 +21655,7 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "ObjectOut", "PackageUpgradeError", "SdkFfiError", + "SignatureScheme", "TransactionBlockKindInput", "TransactionExpiration", "TypeArgumentError", @@ -15797,7 +21683,6 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "PaginationFilter", "SignedTransaction", "SignedTransactionPage", - "Transaction", "TransactionDataEffects", "TransactionDataEffectsPage", "TransactionEffectsPage", @@ -15809,16 +21694,21 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "ValidatorCommitteeMember", "ValidatorCredentials", "ValidatorPage", + "ZkLoginClaim", "Address", "AuthenticatorStateExpire", "AuthenticatorStateUpdateV1", "BatchSendStatus", "Bls12381PublicKey", + "Bls12381Signature", + "Bn254FieldElement", "ChangeEpoch", "ChangeEpochV2", "CheckpointCommitment", "CheckpointContentsDigest", "CheckpointDigest", + "CircomG1", + "CircomG2", "Coin", "CoinMetadata", "ConsensusCommitDigest", @@ -15826,6 +21716,7 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "Digest", "DryRunResult", "Ed25519PublicKey", + "Ed25519Signature", "EffectsAuxiliaryDataDigest", "EndOfEpochTransactionKind", "Epoch", @@ -15839,6 +21730,11 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "MoveModule", "MovePackage", "MoveStruct", + "MultisigAggregatedSignature", + "MultisigCommittee", + "MultisigMember", + "MultisigMemberPublicKey", + "MultisigMemberSignature", "Object", "ObjectData", "ObjectDigest", @@ -15846,12 +21742,17 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "ObjectRef", "ObjectType", "Owner", + "PasskeyAuthenticator", "ProgrammableTransaction", "ProtocolConfigs", "RandomnessStateUpdate", "Secp256k1PublicKey", + "Secp256k1Signature", "Secp256r1PublicKey", + "Secp256r1Signature", "ServiceConfig", + "SimpleSignature", + "Transaction", "TransactionDigest", "TransactionEffects", "TransactionEffectsDigest", @@ -15859,5 +21760,9 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "TransactionKind", "TypeTag", "UserSignature", + "ZkLoginAuthenticator", + "ZkLoginInputs", + "ZkLoginProof", + "ZkLoginPublicIdentifier", ] diff --git a/bindings/python/test.py b/bindings/python/test.py index b4718071d..3e51a79a1 100644 --- a/bindings/python/test.py +++ b/bindings/python/test.py @@ -1,4 +1,4 @@ -from lib.iota_sdk_ffi import GraphQlClient, PaginationFilter, Address, Direction, TransactionsFilter, ObjectId, EventFilter +from lib.iota_sdk_ffi import GraphQlClient, PaginationFilter, Address, Direction, TransactionsFilter, ObjectId, EventFilter, TransactionDigest import asyncio async def main(): @@ -6,7 +6,7 @@ async def main(): chain_id = await client.chain_id() print(chain_id) - my_address=Address.from_hex("0xb14f13f5343641e5b52d144fd6f106a7058efe2f1ad44598df5cda73acf0101f") + my_address = Address.from_hex("0xb14f13f5343641e5b52d144fd6f106a7058efe2f1ad44598df5cda73acf0101f") coins = await client.coins( my_address, @@ -19,9 +19,16 @@ async def main(): print(f'Total Balance = {balance}') - filter=TransactionsFilter(at_checkpoint=3, input_object=ObjectId.from_hex("0xb14f13f5343641e5b52d144fd6f106a7058efe2f1ad44598df5cda73acf0101f")) + filter = TransactionsFilter(at_checkpoint=3, input_object=ObjectId.from_hex("0xb14f13f5343641e5b52d144fd6f106a7058efe2f1ad44598df5cda73acf0101f")) - filter=EventFilter(sender=my_address) + filter = EventFilter(sender=my_address) + + txn = await client.transaction(TransactionDigest.from_base58("HT1wvebXV4LUisLa4aJQEyoxt1HEMqznjf5UtStmdxyM")) + + if txn is not None: + for sig in txn.signatures(): + print("Scheme: ", sig.scheme(), sig.scheme().value) + print("Sender: ", txn.transaction().sender().to_hex()) if __name__ == '__main__': asyncio.run(main()) diff --git a/crates/iota-sdk-ffi/src/types/checkpoint.rs b/crates/iota-sdk-ffi/src/types/checkpoint.rs index 31270f0bf..aaaa2571f 100644 --- a/crates/iota-sdk-ffi/src/types/checkpoint.rs +++ b/crates/iota-sdk-ffi/src/types/checkpoint.rs @@ -6,7 +6,7 @@ use std::sync::Arc; use iota_types::GasCostSummary; use crate::types::{ - crypto::ValidatorCommitteeMember, + crypto::validator::ValidatorCommitteeMember, digest::{CheckpointContentsDigest, CheckpointDigest, Digest}, }; diff --git a/crates/iota-sdk-ffi/src/types/crypto.rs b/crates/iota-sdk-ffi/src/types/crypto/mod.rs similarity index 58% rename from crates/iota-sdk-ffi/src/types/crypto.rs rename to crates/iota-sdk-ffi/src/types/crypto/mod.rs index 086564d47..d4971b324 100644 --- a/crates/iota-sdk-ffi/src/types/crypto.rs +++ b/crates/iota-sdk-ffi/src/types/crypto/mod.rs @@ -1,45 +1,16 @@ // Copyright (c) 2025 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 -use std::sync::Arc; - -use crate::error::Result; - -/// A member of a Validator Committee -/// -/// # BCS -/// -/// The BCS serialized form for this type is defined by the following ABNF: -/// -/// ```text -/// validator-committee-member = bls-public-key -/// u64 ; stake -/// ``` -#[derive(Clone, Debug, uniffi::Record)] -pub struct ValidatorCommitteeMember { - pub public_key: Arc, - pub stake: u64, -} +pub mod multisig; +pub mod passkey; +pub mod validator; +pub mod zklogin; -impl From for ValidatorCommitteeMember { - fn from(value: iota_types::ValidatorCommitteeMember) -> Self { - Self { - public_key: Arc::new(value.public_key.into()), - stake: value.stake, - } - } -} +use std::sync::Arc; -impl From for iota_types::ValidatorCommitteeMember { - fn from(value: ValidatorCommitteeMember) -> Self { - Self { - public_key: **value.public_key, - stake: value.stake, - } - } -} +use crate::{error::Result, types::signature::SimpleSignature}; -macro_rules! impl_public_key { +macro_rules! impl_crypto_object { ($(#[$meta:meta])* $t:ident) => { $(#[$meta])* #[derive(Copy, Clone, Debug, derive_more::From, derive_more::Deref, uniffi::Object)] @@ -70,7 +41,7 @@ macro_rules! impl_public_key { }; } -impl_public_key!( +impl_crypto_object!( /// A bls12381 min-sig public key. /// /// # BCS @@ -87,7 +58,7 @@ impl_public_key!( /// binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. Bls12381PublicKey ); -impl_public_key!( +impl_crypto_object!( /// An ed25519 public key. /// /// # BCS @@ -99,7 +70,7 @@ impl_public_key!( /// ``` Ed25519PublicKey ); -impl_public_key!( +impl_crypto_object!( /// A secp256k1 signature. /// /// # BCS @@ -111,7 +82,7 @@ impl_public_key!( /// ``` Secp256k1PublicKey ); -impl_public_key!( +impl_crypto_object!( /// A secp256r1 signature. /// /// # BCS @@ -123,3 +94,56 @@ impl_public_key!( /// ``` Secp256r1PublicKey ); +impl_crypto_object!( + /// An ed25519 signature. + /// + /// # BCS + /// + /// The BCS serialized form for this type is defined by the following ABNF: + /// + /// ```text + /// ed25519-signature = 64OCTECT + /// ``` + Ed25519Signature +); +impl_crypto_object!( + /// A bls12381 min-sig public key. + /// + /// # BCS + /// + /// The BCS serialized form for this type is defined by the following ABNF: + /// + /// ```text + /// bls-public-key = %x60 96OCTECT + /// ``` + /// + /// Due to historical reasons, even though a min-sig `Bls12381PublicKey` has a + /// fixed-length of 96, IOTA's binary representation of a min-sig + /// `Bls12381PublicKey` is prefixed with its length meaning its serialized + /// binary form (in bcs) is 97 bytes long vs a more compact 96 bytes. + Bls12381Signature +); +impl_crypto_object!( + /// A secp256k1 public key. + /// + /// # BCS + /// + /// The BCS serialized form for this type is defined by the following ABNF: + /// + /// ```text + /// secp256k1-public-key = 33OCTECT + /// ``` + Secp256k1Signature +); +impl_crypto_object!( + /// A secp256r1 public key. + /// + /// # BCS + /// + /// The BCS serialized form for this type is defined by the following ABNF: + /// + /// ```text + /// secp256r1-public-key = 33OCTECT + /// ``` + Secp256r1Signature +); diff --git a/crates/iota-sdk-ffi/src/types/crypto/multisig.rs b/crates/iota-sdk-ffi/src/types/crypto/multisig.rs new file mode 100644 index 000000000..54ccde1fa --- /dev/null +++ b/crates/iota-sdk-ffi/src/types/crypto/multisig.rs @@ -0,0 +1,360 @@ +// Copyright (c) 2025 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use std::sync::Arc; + +use iota_types::SignatureScheme; + +use crate::types::crypto::{ + Ed25519PublicKey, Ed25519Signature, Secp256k1PublicKey, Secp256k1Signature, Secp256r1PublicKey, + Secp256r1Signature, + zklogin::{ZkLoginAuthenticator, ZkLoginPublicIdentifier}, +}; + +/// A signature from a member of a multisig committee. +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// multisig-member-signature = ed25519-multisig-member-signature / +/// secp256k1-multisig-member-signature / +/// secp256r1-multisig-member-signature / +/// zklogin-multisig-member-signature +/// +/// ed25519-multisig-member-signature = %x00 ed25519-signature +/// secp256k1-multisig-member-signature = %x01 secp256k1-signature +/// secp256r1-multisig-member-signature = %x02 secp256r1-signature +/// zklogin-multisig-member-signature = %x03 zklogin-authenticator +/// ``` +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct MultisigMemberSignature(pub iota_types::MultisigMemberSignature); + +#[uniffi::export] +impl MultisigMemberSignature { + pub fn is_ed25519(&self) -> bool { + matches!(self.0, iota_types::MultisigMemberSignature::Ed25519(_)) + } + + pub fn as_ed25519_opt(&self) -> Option> { + if let iota_types::MultisigMemberSignature::Ed25519(sig) = self.0.clone() { + Some(Arc::new(sig.into())) + } else { + None + } + } + + pub fn as_ed25519(&self) -> Arc { + self.as_ed25519_opt().expect("not a ed25519 signature") + } + + pub fn is_secp256k1(&self) -> bool { + matches!(self.0, iota_types::MultisigMemberSignature::Secp256k1(_)) + } + + pub fn as_secp256k1_opt(&self) -> Option> { + if let iota_types::MultisigMemberSignature::Secp256k1(sig) = self.0.clone() { + Some(Arc::new(sig.into())) + } else { + None + } + } + + pub fn as_secp256k1(&self) -> Arc { + self.as_secp256k1_opt().expect("not a secp256k1 signature") + } + + pub fn is_secp256r1(&self) -> bool { + matches!(self.0, iota_types::MultisigMemberSignature::Secp256r1(_)) + } + + pub fn as_secp256r1_opt(&self) -> Option> { + if let iota_types::MultisigMemberSignature::Secp256r1(sig) = self.0.clone() { + Some(Arc::new(sig.into())) + } else { + None + } + } + + pub fn as_secp256r1(&self) -> Arc { + self.as_secp256r1_opt().expect("not a secp256r1 signature") + } + + pub fn is_zklogin(&self) -> bool { + matches!(self.0, iota_types::MultisigMemberSignature::ZkLogin(_)) + } + + pub fn as_zklogin_opt(&self) -> Option> { + if let iota_types::MultisigMemberSignature::ZkLogin(sig) = self.0.clone() { + Some(Arc::new((*sig).into())) + } else { + None + } + } + + pub fn as_zklogin(&self) -> Arc { + self.as_zklogin_opt().expect("not a zklogin authenticator") + } +} + +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct MultisigMemberPublicKey(pub iota_types::MultisigMemberPublicKey); + +#[uniffi::export] +impl MultisigMemberPublicKey { + pub fn is_ed25519(&self) -> bool { + matches!(self.0, iota_types::MultisigMemberPublicKey::Ed25519(_)) + } + + pub fn as_ed25519_opt(&self) -> Option> { + if let iota_types::MultisigMemberPublicKey::Ed25519(key) = self.0.clone() { + Some(Arc::new(key.into())) + } else { + None + } + } + + pub fn as_ed25519(&self) -> Arc { + self.as_ed25519_opt().expect("not a ed25519 public key") + } + + pub fn is_secp256k1(&self) -> bool { + matches!(self.0, iota_types::MultisigMemberPublicKey::Secp256k1(_)) + } + + pub fn as_secp256k1_opt(&self) -> Option> { + if let iota_types::MultisigMemberPublicKey::Secp256k1(key) = self.0.clone() { + Some(Arc::new(key.into())) + } else { + None + } + } + + pub fn as_secp256k1(&self) -> Arc { + self.as_secp256k1_opt().expect("not a secp256k1 public key") + } + + pub fn is_secp256r1(&self) -> bool { + matches!(self.0, iota_types::MultisigMemberPublicKey::Secp256r1(_)) + } + + pub fn as_secp256r1_opt(&self) -> Option> { + if let iota_types::MultisigMemberPublicKey::Secp256r1(key) = self.0.clone() { + Some(Arc::new(key.into())) + } else { + None + } + } + + pub fn as_secp256r1(&self) -> Arc { + self.as_secp256r1_opt().expect("not a secp256r1 public key") + } + + pub fn is_zklogin(&self) -> bool { + matches!(self.0, iota_types::MultisigMemberPublicKey::ZkLogin(_)) + } + + pub fn as_zklogin_opt(&self) -> Option> { + if let iota_types::MultisigMemberPublicKey::ZkLogin(key) = self.0.clone() { + Some(Arc::new(key.into())) + } else { + None + } + } + + pub fn as_zklogin(&self) -> Arc { + self.as_zklogin_opt().expect("not a zklogin authenticator") + } +} + +/// Aggregated signature from members of a multisig committee. +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// multisig-aggregated-signature = (vector multisig-member-signature) +/// u16 ; bitmap +/// multisig-committee +/// ``` +/// +/// There is also a legacy encoding for this type defined as: +/// +/// ```text +/// legacy-multisig-aggregated-signature = (vector multisig-member-signature) +/// roaring-bitmap ; bitmap +/// legacy-multisig-committee +/// roaring-bitmap = bytes ; where the contents of the bytes are valid +/// ; according to the serialized spec for +/// ; roaring bitmaps +/// ``` +/// +/// See [here](https://github.com/RoaringBitmap/RoaringFormatSpec) for the specification for the +/// serialized format of RoaringBitmaps. +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct MultisigAggregatedSignature(pub iota_types::MultisigAggregatedSignature); + +#[uniffi::export] +impl MultisigAggregatedSignature { + /// Construct a new aggregated multisig signature. + /// + /// Since the list of signatures doesn't contain sufficient information to + /// identify which committee member provided the signature, it is up to + /// the caller to ensure that the provided signature list is in the same + /// order as it's corresponding member in the provided committee + /// and that it's position in the provided bitmap is set. + #[uniffi::constructor] + pub fn new( + committee: &MultisigCommittee, + signatures: Vec>, + bitmap: u16, + ) -> Self { + Self(iota_types::MultisigAggregatedSignature::new( + committee.0.clone(), + signatures.into_iter().map(|s| s.0.clone()).collect(), + bitmap, + )) + } + + /// The list of signatures from committee members + pub fn signatures(&self) -> Vec> { + self.0 + .signatures() + .iter() + .cloned() + .map(Into::into) + .map(Arc::new) + .collect() + } + + /// The bitmap that indicates which committee members provided their + /// signature. + pub fn bitmap(&self) -> u16 { + self.0.bitmap() + } + + pub fn committee(&self) -> MultisigCommittee { + self.0.committee().clone().into() + } +} + +/// A multisig committee +/// +/// A `MultisigCommittee` is a set of members who collectively control a single +/// `Address` on the IOTA blockchain. The number of required signautres to +/// authorize the execution of a transaction is determined by +/// `(signature_0_weight + signature_1_weight ..) >= threshold`. +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// multisig-committee = (vector multisig-member) +/// u16 ; threshold +/// ``` +/// +/// There is also a legacy encoding for this type defined as: +/// +/// ```text +/// legacy-multisig-committee = (vector legacy-multisig-member) +/// u16 ; threshold +/// ``` +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct MultisigCommittee(pub iota_types::MultisigCommittee); + +#[uniffi::export] +impl MultisigCommittee { + /// Construct a new committee from a list of `MultisigMember`s and a + /// `threshold`. + /// + /// Note that the order of the members is significant towards deriving the + /// `Address` governed by this committee. + #[uniffi::constructor] + pub fn new(members: Vec>, threshold: u16) -> Self { + Self(iota_types::MultisigCommittee::new( + members.into_iter().map(|m| m.0.clone()).collect(), + threshold, + )) + } + + /// The members of the committee + pub fn members(&self) -> Vec> { + self.0 + .members() + .iter() + .cloned() + .map(Into::into) + .map(Arc::new) + .collect() + } + + /// The total signature weight required to authorize a transaction for the + /// address corresponding to this `MultisigCommittee`. + pub fn threshold(&self) -> u16 { + self.0.threshold() + } + + /// Return the flag for this signature scheme + pub fn scheme(&self) -> SignatureScheme { + self.0.scheme() + } + + /// Checks if the Committee is valid. + /// + /// A valid committee is one that: + /// - Has a nonzero threshold + /// - Has at least one member + /// - Has at most ten members + /// - No member has weight 0 + /// - the sum of the weights of all members must be larger than the + /// threshold + /// - contains no duplicate members + pub fn is_valid(&self) -> bool { + self.0.is_valid() + } +} + +/// A member in a multisig committee +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// multisig-member = multisig-member-public-key +/// u8 ; weight +/// ``` +/// +/// There is also a legacy encoding for this type defined as: +/// +/// ```text +/// legacy-multisig-member = legacy-multisig-member-public-key +/// u8 ; weight +/// ``` +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct MultisigMember(pub iota_types::MultisigMember); + +#[uniffi::export] +impl MultisigMember { + /// Construct a new member from a `MultisigMemberPublicKey` and a `weight`. + #[uniffi::constructor] + pub fn new(public_key: &MultisigMemberPublicKey, weight: u8) -> Self { + Self(iota_types::MultisigMember::new( + public_key.0.clone(), + weight, + )) + } + + /// This member's public key. + pub fn public_key(&self) -> MultisigMemberPublicKey { + self.0.public_key().clone().into() + } + + /// Weight of this member's signature. + pub fn weight(&self) -> u8 { + self.0.weight() + } +} diff --git a/crates/iota-sdk-ffi/src/types/crypto/passkey.rs b/crates/iota-sdk-ffi/src/types/crypto/passkey.rs new file mode 100644 index 000000000..fec90e3a1 --- /dev/null +++ b/crates/iota-sdk-ffi/src/types/crypto/passkey.rs @@ -0,0 +1,66 @@ +// Copyright (c) 2025 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use crate::types::signature::SimpleSignature; + +/// A passkey authenticator. +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// passkey-bcs = bytes ; where the contents of the bytes are +/// ; defined by +/// passkey = passkey-flag +/// bytes ; passkey authenticator data +/// client-data-json ; valid json +/// simple-signature ; required to be a secp256r1 signature +/// +/// client-data-json = string ; valid json +/// ``` +/// +/// See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) for +/// the required json-schema for the `client-data-json` rule. In addition, IOTA +/// currently requires that the `CollectedClientData.type` field is required to +/// be `webauthn.get`. +/// +/// 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. +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct PasskeyAuthenticator(pub iota_types::PasskeyAuthenticator); + +#[uniffi::export] +impl PasskeyAuthenticator { + /// Opaque authenticator data for this passkey signature. + /// + /// See [Authenticator Data](https://www.w3.org/TR/webauthn-2/#sctn-authenticator-data) for + /// more information on this field. + pub fn authenticator_data(&self) -> Vec { + self.0.authenticator_data().to_vec() + } + + /// Structured, unparsed, JSON for this passkey signature. + /// + /// See [CollectedClientData](https://www.w3.org/TR/webauthn-2/#dictdef-collectedclientdata) + /// for more information on this field. + pub fn client_data_json(&self) -> String { + self.0.client_data_json().to_owned() + } + + /// The parsed challenge message for this passkey signature. + /// + /// This is parsed by decoding the base64url data from the + /// `client_data_json.challenge` field. + pub fn challenge(&self) -> Vec { + self.0.challenge().to_vec() + } + + /// The passkey signature. + pub fn signature(&self) -> SimpleSignature { + self.0.signature().into() + } +} diff --git a/crates/iota-sdk-ffi/src/types/crypto/validator.rs b/crates/iota-sdk-ffi/src/types/crypto/validator.rs new file mode 100644 index 000000000..6831db807 --- /dev/null +++ b/crates/iota-sdk-ffi/src/types/crypto/validator.rs @@ -0,0 +1,40 @@ +// Copyright (c) 2025 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use std::sync::Arc; + +use crate::types::crypto::Bls12381PublicKey; + +/// A member of a Validator Committee +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// validator-committee-member = bls-public-key +/// u64 ; stake +/// ``` +#[derive(Clone, Debug, uniffi::Record)] +pub struct ValidatorCommitteeMember { + pub public_key: Arc, + pub stake: u64, +} + +impl From for ValidatorCommitteeMember { + fn from(value: iota_types::ValidatorCommitteeMember) -> Self { + Self { + public_key: Arc::new(value.public_key.into()), + stake: value.stake, + } + } +} + +impl From for iota_types::ValidatorCommitteeMember { + fn from(value: ValidatorCommitteeMember) -> Self { + Self { + public_key: **value.public_key, + stake: value.stake, + } + } +} diff --git a/crates/iota-sdk-ffi/src/types/crypto/zklogin.rs b/crates/iota-sdk-ffi/src/types/crypto/zklogin.rs new file mode 100644 index 000000000..dfa370e53 --- /dev/null +++ b/crates/iota-sdk-ffi/src/types/crypto/zklogin.rs @@ -0,0 +1,333 @@ +// Copyright (c) 2025 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +use std::sync::Arc; + +use iota_types::ZkLoginClaim; + +use crate::{ + error::{Result, SdkFfiError}, + types::signature::SimpleSignature, +}; + +/// A zklogin authenticator +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// zklogin-bcs = bytes ; contents are defined by +/// zklogin = zklogin-flag +/// zklogin-inputs +/// u64 ; max epoch +/// simple-signature +/// ``` +/// +/// 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. +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct ZkLoginAuthenticator(pub iota_types::ZkLoginAuthenticator); + +#[uniffi::export] +impl ZkLoginAuthenticator { + #[uniffi::constructor] + pub fn new(inputs: &ZkLoginInputs, max_epoch: u64, signature: &SimpleSignature) -> Self { + Self(iota_types::ZkLoginAuthenticator { + inputs: inputs.0.clone(), + max_epoch, + signature: signature.0.clone(), + }) + } + + pub fn inputs(&self) -> ZkLoginInputs { + self.0.inputs.clone().into() + } + + pub fn max_epoch(&self) -> u64 { + self.0.max_epoch + } + + pub fn signature(&self) -> SimpleSignature { + self.0.signature.clone().into() + } +} + +/// Public Key equivalent for Zklogin authenticators +/// +/// A `ZkLoginPublicIdentifier` is the equivalent of a public key for other +/// account authenticators, and contains the information required to derive the +/// onchain account [`Address`] for a Zklogin authenticator. +/// +/// ## Note +/// +/// Due to a historical bug that was introduced in the IOTA Typescript SDK when +/// the zklogin authenticator was first introduced, there are now possibly two +/// "valid" addresses for each zklogin authenticator depending on the +/// bit-pattern of the `address_seed` value. +/// +/// The original bug incorrectly derived a zklogin's address by stripping any +/// leading zero-bytes that could have been present in the 32-byte length +/// `address_seed` value prior to hashing, leading to a different derived +/// address. This incorrectly derived address was presented to users of various +/// wallets, leading them to sending funds to these addresses that they couldn't +/// access. Instead of letting these users lose any assets that were sent to +/// these addresses, the IOTA network decided to change the protocol to allow +/// for a zklogin authenticator who's `address_seed` value had leading +/// zero-bytes be authorized to sign for both the addresses derived from both +/// the unpadded and padded `address_seed` value. +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// zklogin-public-identifier-bcs = bytes ; where the contents are defined by +/// ; +/// +/// zklogin-public-identifier = zklogin-public-identifier-iss +/// address-seed +/// +/// zklogin-public-identifier-unpadded = zklogin-public-identifier-iss +/// address-seed-unpadded +/// +/// ; The iss, or issuer, is a utf8 string that is less than 255 bytes long +/// ; and is serialized with the iss's length in bytes as a u8 followed by +/// ; the bytes of the iss +/// zklogin-public-identifier-iss = u8 *255(OCTET) +/// +/// ; A Bn254FieldElement serialized as a 32-byte big-endian value +/// address-seed = 32(OCTET) +/// +/// ; A Bn254FieldElement serialized as a 32-byte big-endian value +/// ; with any leading zero bytes stripped +/// address-seed-unpadded = %x00 / %x01-ff *31(OCTET) +/// ``` +/// +/// [`Address`]: crate::Address +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct ZkLoginPublicIdentifier(pub iota_types::ZkLoginPublicIdentifier); + +#[uniffi::export] +impl ZkLoginPublicIdentifier { + #[uniffi::constructor] + pub fn new(iss: String, address_seed: &Bn254FieldElement) -> Result { + iota_types::ZkLoginPublicIdentifier::new(iss, address_seed.0.clone()) + .ok_or_else(|| SdkFfiError::custom("iss length must be <= 255")) + .map(Self) + } + + pub fn iss(&self) -> String { + self.0.iss().to_owned() + } + + pub fn address_seed(&self) -> Bn254FieldElement { + self.0.address_seed().clone().into() + } +} + +/// A zklogin groth16 proof and the required inputs to perform proof +/// verification. +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// zklogin-inputs = zklogin-proof +/// zklogin-claim +/// string ; base64url-unpadded encoded JwtHeader +/// bn254-field-element ; address_seed +/// ``` +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct ZkLoginInputs(pub iota_types::ZkLoginInputs); + +#[uniffi::export] +impl ZkLoginInputs { + #[uniffi::constructor] + pub fn new( + proof_points: &ZkLoginProof, + iss_base64_details: ZkLoginClaim, + header_base64: String, + address_seed: &Bn254FieldElement, + ) -> Self { + Self(iota_types::ZkLoginInputs { + proof_points: proof_points.0.clone(), + iss_base64_details, + header_base64, + address_seed: address_seed.0.clone(), + }) + } + + pub fn proof_points(&self) -> ZkLoginProof { + self.0.proof_points.clone().into() + } + + pub fn iss_base64_details(&self) -> ZkLoginClaim { + self.0.iss_base64_details.clone() + } + + pub fn header_base64(&self) -> String { + self.0.header_base64.clone() + } + + pub fn address_seed(&self) -> Bn254FieldElement { + self.0.address_seed.clone().into() + } +} + +/// A zklogin groth16 proof +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// zklogin-proof = circom-g1 circom-g2 circom-g1 +/// ``` +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct ZkLoginProof(pub iota_types::ZkLoginProof); + +#[uniffi::export] +impl ZkLoginProof { + #[uniffi::constructor] + pub fn new(a: &CircomG1, b: &CircomG2, c: &CircomG1) -> Self { + Self(iota_types::ZkLoginProof { + a: a.0.clone(), + b: b.0.clone(), + c: c.0.clone(), + }) + } + + pub fn a(&self) -> CircomG1 { + self.0.a.clone().into() + } + + pub fn b(&self) -> CircomG2 { + self.0.b.clone().into() + } + + pub fn c(&self) -> CircomG1 { + self.0.c.clone().into() + } +} + +#[uniffi::remote(Record)] +pub struct ZkLoginClaim { + pub value: String, + pub index_mod_4: u8, +} + +/// A G1 point +/// +/// This represents the canonical decimal representation of the projective +/// coordinates in Fq. +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// circom-g1 = %x03 3(bn254-field-element) +/// ``` +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct CircomG1(pub iota_types::CircomG1); + +#[uniffi::export] +impl CircomG1 { + #[uniffi::constructor] + pub fn new( + el_0: &Bn254FieldElement, + el_1: &Bn254FieldElement, + el_2: &Bn254FieldElement, + ) -> Self { + Self(iota_types::CircomG1([ + el_0.0.clone(), + el_1.0.clone(), + el_2.0.clone(), + ])) + } +} + +/// A G2 point +/// +/// This represents the canonical decimal representation of the coefficients of +/// the projective coordinates in Fq2. +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// circom-g2 = %x03 3(%x02 2(bn254-field-element)) +/// ``` +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct CircomG2(pub iota_types::CircomG2); + +#[uniffi::export] +impl CircomG2 { + #[uniffi::constructor] + pub fn new( + el_0_0: &Bn254FieldElement, + el_0_1: &Bn254FieldElement, + el_1_0: &Bn254FieldElement, + el_1_1: &Bn254FieldElement, + el_2_0: &Bn254FieldElement, + el_2_1: &Bn254FieldElement, + ) -> Self { + Self(iota_types::CircomG2([ + [el_0_0.0.clone(), el_0_1.0.clone()], + [el_1_0.0.clone(), el_1_1.0.clone()], + [el_2_0.0.clone(), el_2_1.0.clone()], + ])) + } +} + +/// A point on the BN254 elliptic curve. +/// +/// This is a 32-byte, or 256-bit, value that is generally represented as +/// radix10 when a human-readable display format is needed, and is represented +/// as a 32-byte big-endian value while in memory. +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// bn254-field-element = *DIGIT ; which is then interpreted as a radix10 encoded 32-byte value +/// ``` +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct Bn254FieldElement(pub iota_types::Bn254FieldElement); + +#[uniffi::export] +impl Bn254FieldElement { + #[uniffi::constructor] + pub fn from_bytes(bytes: Vec) -> Result { + Ok(Self(iota_types::Bn254FieldElement::new( + bytes.try_into().map_err(|v: Vec| { + SdkFfiError::custom(format!("expected bytes of length 32, found {}", v.len())) + })?, + ))) + } + + #[uniffi::constructor] + pub fn from_str(s: &str) -> Result { + Ok(Self(s.parse()?)) + } + + #[uniffi::constructor] + pub fn from_str_radix_10(s: &str) -> Result { + Ok(Self(iota_types::Bn254FieldElement::from_str_radix_10(s)?)) + } + + pub fn unpadded(&self) -> Vec { + self.0.unpadded().to_vec() + } + + pub fn padded(&self) -> Vec { + self.0.padded().to_vec() + } +} diff --git a/crates/iota-sdk-ffi/src/types/digest.rs b/crates/iota-sdk-ffi/src/types/digest.rs index 7c806db68..d90be426d 100644 --- a/crates/iota-sdk-ffi/src/types/digest.rs +++ b/crates/iota-sdk-ffi/src/types/digest.rs @@ -22,6 +22,7 @@ macro_rules! impl_digest_wrapper { )] pub struct $t(pub iota_types::$t); + #[uniffi::export] impl $t { #[uniffi::constructor] pub fn from_bytes(bytes: Vec) -> Result { @@ -29,8 +30,8 @@ macro_rules! impl_digest_wrapper { } #[uniffi::constructor] - pub fn from_base58(hex: &str) -> Result { - Ok(Self(iota_types::$t::from_base58(hex)?)) + pub fn from_base58(base58: &str) -> Result { + Ok(Self(iota_types::$t::from_base58(base58)?)) } #[uniffi::constructor] diff --git a/crates/iota-sdk-ffi/src/types/signature.rs b/crates/iota-sdk-ffi/src/types/signature.rs index e1f681c8a..6abef0cdb 100644 --- a/crates/iota-sdk-ffi/src/types/signature.rs +++ b/crates/iota-sdk-ffi/src/types/signature.rs @@ -1,5 +1,263 @@ // Copyright (c) 2025 IOTA Stiftung // SPDX-License-Identifier: Apache-2.0 +use std::sync::Arc; + +use iota_types::{SignatureScheme, ZkLoginClaim}; + +use crate::{ + error::Result, + types::crypto::{ + Ed25519PublicKey, Ed25519Signature, Secp256k1PublicKey, Secp256k1Signature, + Secp256r1PublicKey, Secp256r1Signature, multisig::MultisigAggregatedSignature, + passkey::PasskeyAuthenticator, zklogin::ZkLoginAuthenticator, + }, +}; + +#[uniffi::remote(Enum)] +pub enum SignatureScheme { + Ed25519 = 0x00, + Secp256k1 = 0x01, + Secp256r1 = 0x02, + Multisig = 0x03, + Bls12381 = 0x04, + ZkLogin = 0x05, + Passkey = 0x06, +} + +/// 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: +/// +/// ```text +/// user-signature-bcs = bytes ; where the contents of the bytes are defined by +/// user-signature = simple-signature / multisig / multisig-legacy / zklogin / passkey +/// ``` +/// +/// 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. #[derive(Clone, Debug, derive_more::From, uniffi::Object)] pub struct UserSignature(pub iota_types::UserSignature); + +#[uniffi::export] +impl UserSignature { + /// Return the flag for this signature scheme + pub fn scheme(&self) -> SignatureScheme { + self.0.scheme() + } + + fn to_bytes(&self) -> Vec { + self.0.to_bytes() + } + + pub fn to_base64(&self) -> String { + self.0.to_base64() + } + + #[uniffi::constructor] + pub fn from_bytes(bytes: Vec) -> Result { + Ok(iota_types::UserSignature::from_bytes(&bytes).map(Self)?) + } + + #[uniffi::constructor] + pub fn from_base64(base64: String) -> Result { + Ok(iota_types::UserSignature::from_base64(&base64).map(Self)?) + } + + pub fn is_simple(&self) -> bool { + matches!(self.0, iota_types::UserSignature::Simple(_)) + } + + pub fn as_simple_opt(&self) -> Option> { + if let iota_types::UserSignature::Simple(sig) = self.0.clone() { + Some(Arc::new(SimpleSignature(sig))) + } else { + None + } + } + + pub fn as_simple(&self) -> Arc { + self.as_simple_opt().expect("not a simple signature") + } + + pub fn is_multisig(&self) -> bool { + matches!(self.0, iota_types::UserSignature::Multisig(_)) + } + + pub fn as_multisig_opt(&self) -> Option> { + if let iota_types::UserSignature::Multisig(sig) = self.0.clone() { + Some(Arc::new(MultisigAggregatedSignature(sig))) + } else { + None + } + } + + pub fn as_multisig(&self) -> Arc { + self.as_multisig_opt().expect("not a multi-signature") + } + + pub fn is_zklogin(&self) -> bool { + matches!(self.0, iota_types::UserSignature::ZkLogin(_)) + } + + pub fn as_zklogin_opt(&self) -> Option> { + if let iota_types::UserSignature::ZkLogin(sig) = self.0.clone() { + Some(Arc::new(ZkLoginAuthenticator(*sig))) + } else { + None + } + } + + pub fn as_zklogin(&self) -> Arc { + self.as_zklogin_opt().expect("not a zklogin authenticator") + } + + pub fn is_passkey(&self) -> bool { + matches!(self.0, iota_types::UserSignature::Passkey(_)) + } + + pub fn as_passkey_opt(&self) -> Option> { + if let iota_types::UserSignature::Passkey(sig) = self.0.clone() { + Some(Arc::new(sig.into())) + } else { + None + } + } + + pub fn as_passkey(&self) -> Arc { + self.as_passkey_opt().expect("not a passkey signature") + } +} + +/// A basic signature +/// +/// This enumeration defines the set of simple or basic signature schemes +/// supported by IOTA. Most signature schemes supported by IOTA end up +/// comprising of a at least one simple signature scheme. +/// +/// # BCS +/// +/// The BCS serialized form for this type is defined by the following ABNF: +/// +/// ```text +/// simple-signature-bcs = bytes ; where the contents of the bytes are defined by +/// simple-signature = (ed25519-flag ed25519-signature ed25519-public-key) / +/// (secp256k1-flag secp256k1-signature secp256k1-public-key) / +/// (secp256r1-flag secp256r1-signature secp256r1-public-key) +/// ``` +/// +/// 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. +#[derive(Clone, Debug, derive_more::From, uniffi::Object)] +pub struct SimpleSignature(pub iota_types::SimpleSignature); + +#[uniffi::export] +impl SimpleSignature { + pub fn scheme(&self) -> SignatureScheme { + self.0.scheme() + } + + fn to_bytes(&self) -> Vec { + self.0.to_bytes() + } + + pub fn is_ed25519(&self) -> bool { + matches!(self.0, iota_types::SimpleSignature::Ed25519 { .. }) + } + + pub fn ed25519_sig_opt(&self) -> Option> { + if let iota_types::SimpleSignature::Ed25519 { signature, .. } = self.0.clone() { + Some(Arc::new(signature.into())) + } else { + None + } + } + + pub fn ed25519_sig(&self) -> Arc { + self.ed25519_sig_opt().expect("not an ed25519 signature") + } + + pub fn ed25519_pub_key_opt(&self) -> Option> { + if let iota_types::SimpleSignature::Ed25519 { public_key, .. } = self.0.clone() { + Some(Arc::new(public_key.into())) + } else { + None + } + } + + pub fn ed25519_pub_key(&self) -> Arc { + self.ed25519_pub_key_opt() + .expect("not an ed25519 public key") + } + + pub fn is_secp256k1(&self) -> bool { + matches!(self.0, iota_types::SimpleSignature::Secp256k1 { .. }) + } + + pub fn secp256k1_sig_opt(&self) -> Option> { + if let iota_types::SimpleSignature::Secp256k1 { signature, .. } = self.0.clone() { + Some(Arc::new(signature.into())) + } else { + None + } + } + + pub fn secp256k1_sig(&self) -> Arc { + self.secp256k1_sig_opt() + .expect("not an secp256k1 signature") + } + + pub fn secp256k1_pub_key_opt(&self) -> Option> { + if let iota_types::SimpleSignature::Secp256k1 { public_key, .. } = self.0.clone() { + Some(Arc::new(public_key.into())) + } else { + None + } + } + + pub fn secp256k1_pub_key(&self) -> Arc { + self.secp256k1_pub_key_opt() + .expect("not an secp256k1 public key") + } + + pub fn is_secp256r1(&self) -> bool { + matches!(self.0, iota_types::SimpleSignature::Secp256r1 { .. }) + } + + pub fn secp256r1_sig_opt(&self) -> Option> { + if let iota_types::SimpleSignature::Secp256r1 { signature, .. } = self.0.clone() { + Some(Arc::new(signature.into())) + } else { + None + } + } + + pub fn secp256r1_sig(&self) -> Arc { + self.secp256r1_sig_opt() + .expect("not an secp256r1 signature") + } + + pub fn secp256r1_pub_key_opt(&self) -> Option> { + if let iota_types::SimpleSignature::Secp256r1 { public_key, .. } = self.0.clone() { + Some(Arc::new(public_key.into())) + } else { + None + } + } + + pub fn secp256r1_pub_key(&self) -> Arc { + self.secp256r1_pub_key_opt() + .expect("not an secp256r1 public key") + } +} diff --git a/crates/iota-sdk-types/src/crypto/signature.rs b/crates/iota-sdk-types/src/crypto/signature.rs index 305bfb237..35a2ddf5e 100644 --- a/crates/iota-sdk-types/src/crypto/signature.rs +++ b/crates/iota-sdk-types/src/crypto/signature.rs @@ -218,7 +218,7 @@ mod serialization { use crate::crypto::SignatureFromBytesError; impl SimpleSignature { - fn to_bytes(&self) -> Vec { + pub fn to_bytes(&self) -> Vec { let mut buf = Vec::new(); match self { SimpleSignature::Ed25519 {