From 13f40501905551845a5ab7c1ffacb5809eee1b1a Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Thu, 7 Aug 2025 12:31:25 +0200 Subject: [PATCH 1/5] feat(bindings): Add `UserSignature` and dependent type impls --- bindings/python/lib/iota_sdk_ffi.py | 13208 +++++++++++----- bindings/python/test.py | 15 +- crates/iota-sdk-ffi/src/types/crypto.rs | 125 - crates/iota-sdk-ffi/src/types/crypto/mod.rs | 243 + .../iota-sdk-ffi/src/types/crypto/multisig.rs | 360 + .../iota-sdk-ffi/src/types/crypto/zklogin.rs | 334 + crates/iota-sdk-ffi/src/types/digest.rs | 5 +- crates/iota-sdk-ffi/src/types/signature.rs | 263 + crates/iota-sdk-types/src/crypto/signature.rs | 2 +- 9 files changed, 10684 insertions(+), 3871 deletions(-) delete mode 100644 crates/iota-sdk-ffi/src/types/crypto.rs create mode 100644 crates/iota-sdk-ffi/src/types/crypto/mod.rs create mode 100644 crates/iota-sdk-ffi/src/types/crypto/multisig.rs create mode 100644 crates/iota-sdk-ffi/src/types/crypto/zklogin.rs diff --git a/bindings/python/lib/iota_sdk_ffi.py b/bindings/python/lib/iota_sdk_ffi.py index 4033b086a..ade551f98 100644 --- a/bindings/python/lib/iota_sdk_ffi.py +++ b/bindings/python/lib/iota_sdk_ffi.py @@ -467,10 +467,24 @@ 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_checkpointsummarypage_data() != 44115: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummarypage_is_empty() != 48209: @@ -489,6 +503,14 @@ 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_coinpage_page_info() != 50368: 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_dynamicfieldoutputpage_data() != 46262: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_dynamicfieldoutputpage_is_empty() != 38341: @@ -497,109 +519,117 @@ 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_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_epochpage_data() != 13705: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_epochpage_is_empty() != 19239: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_epochpage_page_info() != 57718: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request() != 28782: + if lib.uniffi_iota_sdk_ffi_checksum_method_eventpage_data() != 29547: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_and_wait() != 33961: + if lib.uniffi_iota_sdk_ffi_checksum_method_eventpage_is_empty() != 14566: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_status() != 52543: + if lib.uniffi_iota_sdk_ffi_checksum_method_eventpage_page_info() != 27854: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators() != 7381: + 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_graphqlclient_balance() != 7900: + if lib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_and_wait() != 48304: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_chain_id() != 64969: + if lib.uniffi_iota_sdk_ffi_checksum_method_faucetclient_request_status() != 42353: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint() != 44276: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_active_validators() != 32356: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints() != 60371: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_balance() != 9953: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coin_metadata() != 43684: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_chain_id() != 45619: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins() != 32600: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoint() != 33658: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dry_run_tx() != 30963: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_checkpoints() != 37650: 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() != 2819: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coin_metadata() != 34454: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field() != 44529: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_coins() != 49561: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields() != 17114: + 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_dynamic_object_field() != 30230: + 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") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch() != 56696: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_field() != 27957: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints() != 46856: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_fields() != 28199: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks() != 38784: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_dynamic_object_field() != 44558: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epochs() != 28721: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch() != 46788: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events() != 52220: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_checkpoints() != 29086: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_execute_tx() != 21554: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks() != 61978: 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() != 57599: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events() != 3400: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_max_page_size() != 7485: + 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_move_object_contents() != 45984: + 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") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs() != 56613: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_max_page_size() != 44733: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function() != 55119: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents() != 40412: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module() != 6469: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_move_object_contents_bcs() != 49694: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object() != 19423: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_function() != 49066: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object_bcs() != 59810: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_normalized_move_module() != 6413: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects() != 44576: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object() != 51508: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package() != 16485: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_object_bcs() != 1970: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_by_name() != 10686: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_objects() != 49764: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest() != 49400: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package() != 7913: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions() != 30956: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest() != 55024: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages() != 59954: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_versions() != 23726: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config() != 6346: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_packages() != 53612: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price() != 19973: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_protocol_config() != 23389: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_service_config() != 55367: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_reference_gas_price() != 39065: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_set_rpc_server() != 20273: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_service_config() != 24210: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_supply() != 12543: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_set_rpc_server() != 31958: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks() != 37459: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_supply() != 21504: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_digest() != 770: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks() != 9583: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_seq_num() != 53241: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_digest() != 64969: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction() != 56863: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_total_transaction_blocks_by_seq_num() != 18624: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_data_effects() != 3688: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction() != 54687: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_effects() != 32891: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_data_effects() != 57979: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions() != 13103: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transaction_effects() != 56760: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects() != 49700: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions() != 29564: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects() != 42153: + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_data_effects() != 61098: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_transactions_effects() != 56867: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_movepackagepage_data() != 63718: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -607,6 +637,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_movepackagepage_page_info() != 5493: 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: @@ -623,6 +719,10 @@ 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: @@ -635,10 +735,22 @@ 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_objectpage_page_info() != 10226: 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_signedtransaction_signatures() != 59055: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_signedtransaction_transaction() != 60873: @@ -649,6 +761,40 @@ 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_signedtransactionpage_page_info() != 4757: 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() != 4282: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transaction_gas_payment() != 5316: @@ -667,17 +813,53 @@ 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_transactiondataeffectspage_page_info() != 59789: 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_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_transactioneffectspage_data() != 20040: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactioneffectspage_is_empty() != 19615: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_method_transactioneffectspage_page_info() != 44668: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_method_transactioneventpage_data() != 64576: + 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_transactioneventpage_is_empty() != 45340: + 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_transactioneventpage_page_info() != 13980: + 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_validatorpage_data() != 23633: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -685,40 +867,110 @@ 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_validatorpage_page_info() != 50813: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_address_from_bytes() != 47175: + 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_constructor_address_from_hex() != 15021: + 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: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_address_generate() != 48865: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes() != 43705: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_bytes() != 6069: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str() != 52380: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_bls12381publickey_from_str() != 26128: 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_coin_try_from_object() != 8695: + 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_ed25519publickey_from_bytes() != 60161: + 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_ed25519publickey_from_str() != 40167: + 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_endofepochtransactionkind_authenticator_state_create() != 18946: + 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_endofepochtransactionkind_authenticator_state_expire() != 49861: + 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_endofepochtransactionkind_bridge_committee_init() != 35816: + 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_bridge_state_create() != 11518: + 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: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_change_epoch() != 16640: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_change_epoch_v2() != 17262: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_store_execution_time_observations() != 32604: - raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_devnet() != 37366: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_faucetclient_local() != 55393: @@ -727,7 +979,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_constructor_faucetclient_testnet() != 16109: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") - if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new() != 31562: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new() != 32097: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_graphqlclient_new_devnet() != 6494: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") @@ -737,30 +989,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_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_objectid_from_bytes() != 47226: + 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_objectid_from_hex() != 14286: + 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_secp256k1publickey_from_bytes() != 2925: + 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_secp256k1publickey_from_str() != 43622: + if lib.uniffi_iota_sdk_ffi_checksum_constructor_objectid_from_hex() != 30954: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_bytes() != 20339: + raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") + if lib.uniffi_iota_sdk_ffi_checksum_constructor_secp256k1publickey_from_str() != 24158: 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_secp256r1publickey_from_bytes() != 35682: + 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_str() != 3131: + 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_signedtransaction_new() != 6988: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_transaction_new() != 36271: raise InternalError("UniFFI API checksum mismatch: try cleaning and rebuilding your project") if lib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondataeffects_new() != 30302: 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_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: @@ -773,6 +1067,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. @@ -972,6 +1278,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), @@ -1022,6 +1392,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), @@ -1032,6 +1426,30 @@ 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_checkpointsummarypage.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1057,6 +1475,43 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummarypage_page_info.restype = ctypes.c_void_p +_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), @@ -1132,13 +1587,37 @@ 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_clone_consensuscommitprologuev1.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1.argtypes = ( - ctypes.c_void_p, +_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 +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1.argtypes = ( + ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_consensuscommitprologuev1.restype = None @@ -1152,6 +1631,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), @@ -1226,6 +1729,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), @@ -1236,6 +1768,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), @@ -1255,16 +1811,6 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_authenticator_state_expire.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_bridge_committee_init.argtypes = ( - ctypes.c_uint64, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_bridge_committee_init.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_bridge_state_create.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_bridge_state_create.restype = ctypes.c_void_p _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_change_epoch.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1275,11 +1821,6 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_change_epoch_v2.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_store_execution_time_observations.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_store_execution_time_observations.restype = ctypes.c_void_p _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_epoch.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1315,6 +1856,41 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_epochpage_page_info.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_event.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_event.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_event.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_event.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_eventpage.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_eventpage.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_eventpage.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_eventpage.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_eventpage_data.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_eventpage_data.restype = _UniffiRustBuffer +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_eventpage_is_empty.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_eventpage_is_empty.restype = ctypes.c_int8 +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_eventpage_page_info.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_eventpage_page_info.restype = ctypes.c_void_p _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_executiontimeobservations.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1505,11 +2081,6 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiRustBuffer, ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epochs.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epochs.restype = ctypes.c_uint64 _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events.argtypes = ( ctypes.c_void_p, _UniffiRustBuffer, @@ -1584,11 +2155,6 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiRustBuffer, ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package.restype = ctypes.c_uint64 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_by_name.argtypes = ( - ctypes.c_void_p, - _UniffiRustBuffer, -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_by_name.restype = ctypes.c_uint64 _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_latest.argtypes = ( ctypes.c_void_p, ctypes.c_void_p, @@ -1745,6 +2311,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), @@ -1823,6 +2623,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_objectfilter.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1933,16 +2757,46 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_pageinfo.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_passkeyauthenticator.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction.argtypes = ( +_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_programmabletransaction.restype = None +_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), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_programmabletransaction.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_programmabletransaction.restype = None _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_protocolconfigs.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -1992,6 +2846,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), @@ -2021,6 +2904,35 @@ 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_secp256r1signature.argtypes = ( + ctypes.c_void_p, + ctypes.POINTER(_UniffiRustCallStatus), +) +_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), @@ -2082,6 +2994,101 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_signedtransactionpage_page_info.restype = ctypes.c_void_p +_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), @@ -2181,6 +3188,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), @@ -2201,6 +3232,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_transactioneffectspage.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -2226,51 +3281,40 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectspage_page_info.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionevent.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionevent.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionevent.argtypes = ( - ctypes.c_void_p, - ctypes.POINTER(_UniffiRustCallStatus), -) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionevent.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneventpage.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneventsdigest.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneventpage.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneventpage.argtypes = ( +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneventsdigest.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneventsdigest.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), ) -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneventpage.restype = None -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventpage_data.argtypes = ( - ctypes.c_void_p, +_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_method_transactioneventpage_data.restype = _UniffiRustBuffer -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventpage_is_empty.argtypes = ( - ctypes.c_void_p, +_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_method_transactioneventpage_is_empty.restype = ctypes.c_int8 -_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventpage_page_info.argtypes = ( - ctypes.c_void_p, +_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_method_transactioneventpage_page_info.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneventsdigest.argtypes = ( +_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_clone_transactioneventsdigest.restype = ctypes.c_void_p -_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneventsdigest.argtypes = ( +_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_free_transactioneventsdigest.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventsdigest_to_bytes.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionexpiration.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -2341,6 +3385,91 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_free_usersignature.restype = None +_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_usersignature_from_base64.argtypes = ( + _UniffiRustBuffer, + ctypes.POINTER(_UniffiRustCallStatus), +) +_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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.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.uniffi_iota_sdk_ffi_fn_method_usersignature_to_bytes.restype = _UniffiRustBuffer _UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validator.argtypes = ( ctypes.c_void_p, ctypes.POINTER(_UniffiRustCallStatus), @@ -2376,50 +3505,178 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): ctypes.POINTER(_UniffiRustCallStatus), ) _UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorpage_page_info.restype = ctypes.c_void_p -_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, +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zkloginauthenticator.argtypes = ( + ctypes.c_void_p, 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_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_rustbuffer_free.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rustbuffer_reserve.argtypes = ( - _UniffiRustBuffer, +_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_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_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_u8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_cancel_u8.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_u8.restype = None -_UniffiLib.ffi_iota_sdk_ffi_rust_future_free_u8.argtypes = ( - ctypes.c_uint64, +_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.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_zkloginauthenticator_signature.restype = ctypes.c_void_p +_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_zklogininputs.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_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 = ( @@ -2653,12 +3910,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_checkpointsummarypage_data.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_checkpointsummarypage_data.restype = ctypes.c_uint16 @@ -2686,6 +3964,18 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coinpage_page_info.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_coinpage_page_info.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_dynamicfieldoutputpage_data.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_dynamicfieldoutputpage_data.restype = ctypes.c_uint16 @@ -2698,6 +3988,15 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _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_epochpage_data.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_epochpage_data.restype = ctypes.c_uint16 @@ -2707,6 +4006,15 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_epochpage_page_info.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_epochpage_page_info.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_eventpage_data.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_eventpage_data.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_eventpage_is_empty.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_eventpage_is_empty.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_eventpage_page_info.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_eventpage_page_info.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 @@ -2761,9 +4069,6 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epoch_total_transaction_blocks.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epochs.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_epochs.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_events.restype = ctypes.c_uint16 @@ -2800,9 +4105,6 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_by_name.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_by_name.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_graphqlclient_package_latest.restype = ctypes.c_uint16 @@ -2863,6 +4165,105 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackagepage_page_info.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_movepackagepage_page_info.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 @@ -2887,6 +4288,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 @@ -2905,12 +4312,30 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectpage_page_info.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_objectpage_page_info.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_secp256r1signature_to_bytes.argtypes = ( +) +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_secp256r1signature_to_bytes.restype = ctypes.c_uint16 _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_signedtransaction_signatures.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_signedtransaction_signatures.restype = ctypes.c_uint16 @@ -2926,6 +4351,57 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_signedtransactionpage_page_info.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_signedtransactionpage_page_info.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_ed25519_pub_key.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_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_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_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_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_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_method_simplesignature_is_secp256r1.restype = ctypes.c_uint16 +_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_simplesignature_scheme.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_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_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_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_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_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_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_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 @@ -2953,6 +4429,18 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactiondataeffectspage_page_info.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactiondataeffectspage_page_info.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_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_transactioneffectspage_data.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffectspage_data.restype = ctypes.c_uint16 @@ -2962,15 +4450,57 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffectspage_page_info.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneffectspage_page_info.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneventpage_data.argtypes = ( +_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_transactioneventpage_data.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneventpage_is_empty.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_transactioneventpage_is_empty.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_method_transactioneventpage_page_info.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_transactioneventpage_page_info.restype = ctypes.c_uint16 +_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_validatorpage_data.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorpage_data.restype = ctypes.c_uint16 @@ -2980,6 +4510,42 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorpage_page_info.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_method_validatorpage_page_info.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 @@ -2998,9 +4564,69 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _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 @@ -3010,27 +4636,36 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _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_bridge_committee_init.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_bridge_committee_init.restype = ctypes.c_uint16 -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_bridge_state_create.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_bridge_state_create.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_endofepochtransactionkind_store_execution_time_observations.argtypes = ( -) -_UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_endofepochtransactionkind_store_execution_time_observations.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 @@ -3058,9 +4693,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 @@ -3076,6 +4729,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 @@ -3085,6 +4747,15 @@ 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_signedtransaction_new.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_signedtransaction_new.restype = ctypes.c_uint16 @@ -3094,6 +4765,33 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondataeffects_new.argtypes = ( ) _UniffiLib.uniffi_iota_sdk_ffi_checksum_constructor_transactiondataeffects_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_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 @@ -3112,6 +4810,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 @@ -3122,6 +4838,32 @@ class _UniffiForeignFutureStructVoid(ctypes.Structure): # Public interface members begin here. +class _UniffiConverterUInt8(_UniffiConverterPrimitiveInt): + CLASS_NAME = "u8" + VALUE_MIN = 0 + VALUE_MAX = 2**8 + + @staticmethod + def read(buf): + return buf.read_u8() + + @staticmethod + def write(value, buf): + buf.write_u8(value) + +class _UniffiConverterUInt16(_UniffiConverterPrimitiveInt): + CLASS_NAME = "u16" + VALUE_MIN = 0 + VALUE_MAX = 2**16 + + @staticmethod + def read(buf): + return buf.read_u16() + + @staticmethod + def write(value, buf): + buf.write_u16(value) + class _UniffiConverterInt32(_UniffiConverterPrimitiveInt): CLASS_NAME = "i32" VALUE_MIN = -2**31 @@ -3352,6 +5094,42 @@ def write(value, buf): + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -3994,12 +5772,13 @@ class TransactionsFilter: after_checkpoint: "typing.Optional[int]" at_checkpoint: "typing.Optional[int]" before_checkpoint: "typing.Optional[int]" - affected_address: "typing.Optional[Address]" - sent_address: "typing.Optional[Address]" + sign_address: "typing.Optional[Address]" + recv_address: "typing.Optional[Address]" input_object: "typing.Optional[ObjectId]" changed_object: "typing.Optional[ObjectId]" transaction_ids: "typing.Optional[typing.List[str]]" - def __init__(self, *, function: "typing.Optional[str]" = _DEFAULT, kind: "typing.Optional[TransactionBlockKindInput]" = _DEFAULT, after_checkpoint: "typing.Optional[int]" = _DEFAULT, at_checkpoint: "typing.Optional[int]" = _DEFAULT, before_checkpoint: "typing.Optional[int]" = _DEFAULT, affected_address: "typing.Optional[Address]" = _DEFAULT, sent_address: "typing.Optional[Address]" = _DEFAULT, input_object: "typing.Optional[ObjectId]" = _DEFAULT, changed_object: "typing.Optional[ObjectId]" = _DEFAULT, transaction_ids: "typing.Optional[typing.List[str]]" = _DEFAULT): + wrapped_or_deleted_object: "typing.Optional[ObjectId]" + def __init__(self, *, function: "typing.Optional[str]" = _DEFAULT, kind: "typing.Optional[TransactionBlockKindInput]" = _DEFAULT, after_checkpoint: "typing.Optional[int]" = _DEFAULT, at_checkpoint: "typing.Optional[int]" = _DEFAULT, before_checkpoint: "typing.Optional[int]" = _DEFAULT, sign_address: "typing.Optional[Address]" = _DEFAULT, recv_address: "typing.Optional[Address]" = _DEFAULT, input_object: "typing.Optional[ObjectId]" = _DEFAULT, changed_object: "typing.Optional[ObjectId]" = _DEFAULT, transaction_ids: "typing.Optional[typing.List[str]]" = _DEFAULT, wrapped_or_deleted_object: "typing.Optional[ObjectId]" = _DEFAULT): if function is _DEFAULT: self.function = None else: @@ -4020,14 +5799,14 @@ def __init__(self, *, function: "typing.Optional[str]" = _DEFAULT, kind: "typing self.before_checkpoint = None else: self.before_checkpoint = before_checkpoint - if affected_address is _DEFAULT: - self.affected_address = None + if sign_address is _DEFAULT: + self.sign_address = None else: - self.affected_address = affected_address - if sent_address is _DEFAULT: - self.sent_address = None + self.sign_address = sign_address + if recv_address is _DEFAULT: + self.recv_address = None else: - self.sent_address = sent_address + self.recv_address = recv_address if input_object is _DEFAULT: self.input_object = None else: @@ -4040,9 +5819,13 @@ def __init__(self, *, function: "typing.Optional[str]" = _DEFAULT, kind: "typing self.transaction_ids = None else: self.transaction_ids = transaction_ids + if wrapped_or_deleted_object is _DEFAULT: + self.wrapped_or_deleted_object = None + else: + self.wrapped_or_deleted_object = wrapped_or_deleted_object def __str__(self): - return "TransactionsFilter(function={}, kind={}, after_checkpoint={}, at_checkpoint={}, before_checkpoint={}, affected_address={}, sent_address={}, input_object={}, changed_object={}, transaction_ids={})".format(self.function, self.kind, self.after_checkpoint, self.at_checkpoint, self.before_checkpoint, self.affected_address, self.sent_address, self.input_object, self.changed_object, self.transaction_ids) + return "TransactionsFilter(function={}, kind={}, after_checkpoint={}, at_checkpoint={}, before_checkpoint={}, sign_address={}, recv_address={}, input_object={}, changed_object={}, transaction_ids={}, wrapped_or_deleted_object={})".format(self.function, self.kind, self.after_checkpoint, self.at_checkpoint, self.before_checkpoint, self.sign_address, self.recv_address, self.input_object, self.changed_object, self.transaction_ids, self.wrapped_or_deleted_object) def __eq__(self, other): if self.function != other.function: @@ -4055,9 +5838,9 @@ def __eq__(self, other): return False if self.before_checkpoint != other.before_checkpoint: return False - if self.affected_address != other.affected_address: + if self.sign_address != other.sign_address: return False - if self.sent_address != other.sent_address: + if self.recv_address != other.recv_address: return False if self.input_object != other.input_object: return False @@ -4065,6 +5848,8 @@ def __eq__(self, other): return False if self.transaction_ids != other.transaction_ids: return False + if self.wrapped_or_deleted_object != other.wrapped_or_deleted_object: + return False return True class _UniffiConverterTypeTransactionsFilter(_UniffiConverterRustBuffer): @@ -4076,11 +5861,12 @@ def read(buf): after_checkpoint=_UniffiConverterOptionalUInt64.read(buf), at_checkpoint=_UniffiConverterOptionalUInt64.read(buf), before_checkpoint=_UniffiConverterOptionalUInt64.read(buf), - affected_address=_UniffiConverterOptionalTypeAddress.read(buf), - sent_address=_UniffiConverterOptionalTypeAddress.read(buf), + sign_address=_UniffiConverterOptionalTypeAddress.read(buf), + recv_address=_UniffiConverterOptionalTypeAddress.read(buf), input_object=_UniffiConverterOptionalTypeObjectId.read(buf), changed_object=_UniffiConverterOptionalTypeObjectId.read(buf), transaction_ids=_UniffiConverterOptionalSequenceString.read(buf), + wrapped_or_deleted_object=_UniffiConverterOptionalTypeObjectId.read(buf), ) @staticmethod @@ -4090,11 +5876,12 @@ def check_lower(value): _UniffiConverterOptionalUInt64.check_lower(value.after_checkpoint) _UniffiConverterOptionalUInt64.check_lower(value.at_checkpoint) _UniffiConverterOptionalUInt64.check_lower(value.before_checkpoint) - _UniffiConverterOptionalTypeAddress.check_lower(value.affected_address) - _UniffiConverterOptionalTypeAddress.check_lower(value.sent_address) + _UniffiConverterOptionalTypeAddress.check_lower(value.sign_address) + _UniffiConverterOptionalTypeAddress.check_lower(value.recv_address) _UniffiConverterOptionalTypeObjectId.check_lower(value.input_object) _UniffiConverterOptionalTypeObjectId.check_lower(value.changed_object) _UniffiConverterOptionalSequenceString.check_lower(value.transaction_ids) + _UniffiConverterOptionalTypeObjectId.check_lower(value.wrapped_or_deleted_object) @staticmethod def write(value, buf): @@ -4103,11 +5890,12 @@ def write(value, buf): _UniffiConverterOptionalUInt64.write(value.after_checkpoint, buf) _UniffiConverterOptionalUInt64.write(value.at_checkpoint, buf) _UniffiConverterOptionalUInt64.write(value.before_checkpoint, buf) - _UniffiConverterOptionalTypeAddress.write(value.affected_address, buf) - _UniffiConverterOptionalTypeAddress.write(value.sent_address, buf) + _UniffiConverterOptionalTypeAddress.write(value.sign_address, buf) + _UniffiConverterOptionalTypeAddress.write(value.recv_address, buf) _UniffiConverterOptionalTypeObjectId.write(value.input_object, buf) _UniffiConverterOptionalTypeObjectId.write(value.changed_object, buf) _UniffiConverterOptionalSequenceString.write(value.transaction_ids, buf) + _UniffiConverterOptionalTypeObjectId.write(value.wrapped_or_deleted_object, buf) class ValidatorCommitteeMember: @@ -4159,87 +5947,201 @@ def write(value, buf): _UniffiConverterUInt64.write(value.stake, buf) -# BindingsSdkError +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) + + + + + +class Direction(enum.Enum): + """ + Pagination direction. + """ + + FORWARD = 0 + + BACKWARD = 1 + + + +class _UniffiConverterTypeDirection(_UniffiConverterRustBuffer): + @staticmethod + def read(buf): + variant = buf.read_i32() + if variant == 1: + return Direction.FORWARD + if variant == 2: + return Direction.BACKWARD + raise InternalError("Raw enum value doesn't match any cases") + + @staticmethod + def check_lower(value): + if value == Direction.FORWARD: + return + if value == Direction.BACKWARD: + return + raise ValueError(value) + + @staticmethod + def write(value, buf): + if value == Direction.FORWARD: + buf.write_i32(1) + if value == Direction.BACKWARD: + buf.write_i32(2) + + + + +# SdkFfiError # We want to define each variant as a nested class that's also a subclass, # which is tricky in Python. To accomplish this we're going to create each # class separately, then manually add the child classes to the base class's # __dict__. All of this happens in dummy class to avoid polluting the module # namespace. -class BindingsSdkError(Exception): +class SdkFfiError(Exception): pass -_UniffiTempBindingsSdkError = BindingsSdkError +_UniffiTempSdkFfiError = SdkFfiError -class BindingsSdkError: # type: ignore - class Generic(_UniffiTempBindingsSdkError): +class SdkFfiError: # type: ignore + class Generic(_UniffiTempSdkFfiError): def __repr__(self): - return "BindingsSdkError.Generic({})".format(repr(str(self))) - _UniffiTempBindingsSdkError.Generic = Generic # type: ignore + return "SdkFfiError.Generic({})".format(repr(str(self))) + _UniffiTempSdkFfiError.Generic = Generic # type: ignore -BindingsSdkError = _UniffiTempBindingsSdkError # type: ignore -del _UniffiTempBindingsSdkError +SdkFfiError = _UniffiTempSdkFfiError # type: ignore +del _UniffiTempSdkFfiError -class _UniffiConverterTypeBindingsSdkError(_UniffiConverterRustBuffer): +class _UniffiConverterTypeSdkFfiError(_UniffiConverterRustBuffer): @staticmethod def read(buf): variant = buf.read_i32() if variant == 1: - return BindingsSdkError.Generic( + return SdkFfiError.Generic( _UniffiConverterString.read(buf), ) raise InternalError("Raw enum value doesn't match any cases") @staticmethod def check_lower(value): - if isinstance(value, BindingsSdkError.Generic): + if isinstance(value, SdkFfiError.Generic): return @staticmethod def write(value, buf): - if isinstance(value, BindingsSdkError.Generic): + if isinstance(value, SdkFfiError.Generic): buf.write_i32(1) -class Direction(enum.Enum): - """ - Pagination direction. - """ - - FORWARD = 0 +class SignatureScheme(enum.Enum): + ED25519 = 0 - BACKWARD = 1 + SECP256K1 = 1 + + SECP256R1 = 2 + + MULTISIG = 3 + + BLS12381 = 4 + + ZK_LOGIN = 5 + + PASSKEY = 6 -class _UniffiConverterTypeDirection(_UniffiConverterRustBuffer): +class _UniffiConverterTypeSignatureScheme(_UniffiConverterRustBuffer): @staticmethod def read(buf): variant = buf.read_i32() if variant == 1: - return Direction.FORWARD + return SignatureScheme.ED25519 if variant == 2: - return Direction.BACKWARD + return SignatureScheme.SECP256K1 + if variant == 3: + return SignatureScheme.SECP256R1 + if variant == 4: + return SignatureScheme.MULTISIG + if variant == 5: + return SignatureScheme.BLS12381 + if variant == 6: + return SignatureScheme.ZK_LOGIN + if variant == 7: + return SignatureScheme.PASSKEY raise InternalError("Raw enum value doesn't match any cases") @staticmethod def check_lower(value): - if value == Direction.FORWARD: + if value == SignatureScheme.ED25519: return - if value == Direction.BACKWARD: + 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 == Direction.FORWARD: + if value == SignatureScheme.ED25519: buf.write_i32(1) - if value == Direction.BACKWARD: + 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) @@ -4252,6 +6154,16 @@ class TransactionBlockKindInput(enum.Enum): 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): @@ -4262,6 +6174,16 @@ def read(buf): 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 @@ -4270,6 +6192,16 @@ def check_lower(value): return if value == TransactionBlockKindInput.PROGRAMMABLE_TX: return + if value == TransactionBlockKindInput.GENESIS: + return + if value == TransactionBlockKindInput.CONSENSUS_COMMIT_PROLOGUE_V1: + return + if value == TransactionBlockKindInput.AUTHENTICATOR_STATE_UPDATE_V1: + return + if value == TransactionBlockKindInput.RANDOMNESS_STATE_UPDATE: + return + if value == TransactionBlockKindInput.END_OF_EPOCH_TX: + return raise ValueError(value) @staticmethod @@ -4278,6 +6210,16 @@ def write(value, buf): buf.write_i32(1) if value == TransactionBlockKindInput.PROGRAMMABLE_TX: buf.write_i32(2) + if value == TransactionBlockKindInput.GENESIS: + buf.write_i32(3) + if value == TransactionBlockKindInput.CONSENSUS_COMMIT_PROLOGUE_V1: + buf.write_i32(4) + if value == TransactionBlockKindInput.AUTHENTICATOR_STATE_UPDATE_V1: + buf.write_i32(5) + if value == TransactionBlockKindInput.RANDOMNESS_STATE_UPDATE: + buf.write_i32(6) + if value == TransactionBlockKindInput.END_OF_EPOCH_TX: + buf.write_i32(7) @@ -4472,6 +6414,33 @@ def read(cls, buf): +class _UniffiConverterOptionalTypeCheckpointContentsDigest(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeCheckpointContentsDigest.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeCheckpointContentsDigest.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeCheckpointContentsDigest.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + class _UniffiConverterOptionalTypeCheckpointDigest(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): @@ -4553,6 +6522,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 _UniffiConverterOptionalTypeEpoch(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): @@ -4715,6 +6738,33 @@ def read(cls, buf): +class _UniffiConverterOptionalTypeMultisigAggregatedSignature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeMultisigAggregatedSignature.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeMultisigAggregatedSignature.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeMultisigAggregatedSignature.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + class _UniffiConverterOptionalTypeObject(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): @@ -4796,11 +6846,11 @@ def read(cls, buf): -class _UniffiConverterOptionalTypeProtocolConfigs(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypePasskeyAuthenticator(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeProtocolConfigs.check_lower(value) + _UniffiConverterTypePasskeyAuthenticator.check_lower(value) @classmethod def write(cls, value, buf): @@ -4809,7 +6859,7 @@ def write(cls, value, buf): return buf.write_u8(1) - _UniffiConverterTypeProtocolConfigs.write(value, buf) + _UniffiConverterTypePasskeyAuthenticator.write(value, buf) @classmethod def read(cls, buf): @@ -4817,17 +6867,152 @@ def read(cls, buf): if flag == 0: return None elif flag == 1: - return _UniffiConverterTypeProtocolConfigs.read(buf) + return _UniffiConverterTypePasskeyAuthenticator.read(buf) else: raise InternalError("Unexpected flag byte for optional type") -class _UniffiConverterOptionalTypeSignedTransaction(_UniffiConverterRustBuffer): +class _UniffiConverterOptionalTypeProtocolConfigs(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): if value is not None: - _UniffiConverterTypeSignedTransaction.check_lower(value) + _UniffiConverterTypeProtocolConfigs.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeProtocolConfigs.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeProtocolConfigs.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeSecp256k1PublicKey(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeSecp256k1PublicKey.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeSecp256k1PublicKey.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeSecp256k1PublicKey.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeSecp256k1Signature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeSecp256k1Signature.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeSecp256k1Signature.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeSecp256k1Signature.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeSecp256r1PublicKey(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeSecp256r1PublicKey.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeSecp256r1PublicKey.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeSecp256r1PublicKey.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeSecp256r1Signature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeSecp256r1Signature.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeSecp256r1Signature.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeSecp256r1Signature.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeSignedTransaction(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeSignedTransaction.check_lower(value) @classmethod def write(cls, value, buf): @@ -4850,6 +7035,33 @@ def read(cls, buf): +class _UniffiConverterOptionalTypeSimpleSignature(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeSimpleSignature.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeSimpleSignature.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeSimpleSignature.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + class _UniffiConverterOptionalTypeTransactionDataEffects(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): @@ -4904,6 +7116,60 @@ def read(cls, buf): +class _UniffiConverterOptionalTypeZkLoginAuthenticator(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeZkLoginAuthenticator.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeZkLoginAuthenticator.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeZkLoginAuthenticator.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + +class _UniffiConverterOptionalTypeZkLoginPublicIdentifier(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + if value is not None: + _UniffiConverterTypeZkLoginPublicIdentifier.check_lower(value) + + @classmethod + def write(cls, value, buf): + if value is None: + buf.write_u8(0) + return + + buf.write_u8(1) + _UniffiConverterTypeZkLoginPublicIdentifier.write(value, buf) + + @classmethod + def read(cls, buf): + flag = buf.read_u8() + if flag == 0: + return None + elif flag == 1: + return _UniffiConverterTypeZkLoginPublicIdentifier.read(buf) + else: + raise InternalError("Unexpected flag byte for optional type") + + + class _UniffiConverterOptionalTypeCheckpointSummary(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): @@ -5270,18 +7536,18 @@ def read(cls, buf): -class _UniffiConverterSequenceTypeMovePackage(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeEvent(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeMovePackage.check_lower(item) + _UniffiConverterTypeEvent.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeMovePackage.write(item, buf) + _UniffiConverterTypeEvent.write(item, buf) @classmethod def read(cls, buf): @@ -5290,23 +7556,23 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeMovePackage.read(buf) for i in range(count) + _UniffiConverterTypeEvent.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeObject(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeMovePackage(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeObject.check_lower(item) + _UniffiConverterTypeMovePackage.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeObject.write(item, buf) + _UniffiConverterTypeMovePackage.write(item, buf) @classmethod def read(cls, buf): @@ -5315,23 +7581,23 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeObject.read(buf) for i in range(count) + _UniffiConverterTypeMovePackage.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeObjectRef(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeMultisigMember(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeObjectRef.check_lower(item) + _UniffiConverterTypeMultisigMember.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeObjectRef.write(item, buf) + _UniffiConverterTypeMultisigMember.write(item, buf) @classmethod def read(cls, buf): @@ -5340,23 +7606,23 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeObjectRef.read(buf) for i in range(count) + _UniffiConverterTypeMultisigMember.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeSignedTransaction(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeMultisigMemberSignature(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeSignedTransaction.check_lower(item) + _UniffiConverterTypeMultisigMemberSignature.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeSignedTransaction.write(item, buf) + _UniffiConverterTypeMultisigMemberSignature.write(item, buf) @classmethod def read(cls, buf): @@ -5365,23 +7631,23 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeSignedTransaction.read(buf) for i in range(count) + _UniffiConverterTypeMultisigMemberSignature.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeTransactionDataEffects(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeObject(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeTransactionDataEffects.check_lower(item) + _UniffiConverterTypeObject.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeTransactionDataEffects.write(item, buf) + _UniffiConverterTypeObject.write(item, buf) @classmethod def read(cls, buf): @@ -5390,23 +7656,23 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeTransactionDataEffects.read(buf) for i in range(count) + _UniffiConverterTypeObject.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeTransactionEffects(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeObjectRef(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeTransactionEffects.check_lower(item) + _UniffiConverterTypeObjectRef.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeTransactionEffects.write(item, buf) + _UniffiConverterTypeObjectRef.write(item, buf) @classmethod def read(cls, buf): @@ -5415,23 +7681,23 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeTransactionEffects.read(buf) for i in range(count) + _UniffiConverterTypeObjectRef.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeTransactionEvent(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeSignedTransaction(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeTransactionEvent.check_lower(item) + _UniffiConverterTypeSignedTransaction.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeTransactionEvent.write(item, buf) + _UniffiConverterTypeSignedTransaction.write(item, buf) @classmethod def read(cls, buf): @@ -5440,23 +7706,23 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeTransactionEvent.read(buf) for i in range(count) + _UniffiConverterTypeSignedTransaction.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeUserSignature(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeTransactionDataEffects(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeUserSignature.check_lower(item) + _UniffiConverterTypeTransactionDataEffects.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeUserSignature.write(item, buf) + _UniffiConverterTypeTransactionDataEffects.write(item, buf) @classmethod def read(cls, buf): @@ -5465,23 +7731,23 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeUserSignature.read(buf) for i in range(count) + _UniffiConverterTypeTransactionDataEffects.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeValidator(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeTransactionEffects(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeValidator.check_lower(item) + _UniffiConverterTypeTransactionEffects.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeValidator.write(item, buf) + _UniffiConverterTypeTransactionEffects.write(item, buf) @classmethod def read(cls, buf): @@ -5490,23 +7756,23 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeValidator.read(buf) for i in range(count) + _UniffiConverterTypeTransactionEffects.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeCheckpointSummary(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeUserSignature(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeCheckpointSummary.check_lower(item) + _UniffiConverterTypeUserSignature.check_lower(item) @classmethod def write(cls, value, buf): items = len(value) buf.write_i32(items) for item in value: - _UniffiConverterTypeCheckpointSummary.write(item, buf) + _UniffiConverterTypeUserSignature.write(item, buf) @classmethod def read(cls, buf): @@ -5515,16 +7781,66 @@ def read(cls, buf): raise InternalError("Unexpected negative sequence length") return [ - _UniffiConverterTypeCheckpointSummary.read(buf) for i in range(count) + _UniffiConverterTypeUserSignature.read(buf) for i in range(count) ] -class _UniffiConverterSequenceTypeObjectReference(_UniffiConverterRustBuffer): +class _UniffiConverterSequenceTypeValidator(_UniffiConverterRustBuffer): @classmethod def check_lower(cls, value): for item in value: - _UniffiConverterTypeObjectReference.check_lower(item) + _UniffiConverterTypeValidator.check_lower(item) + + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiConverterTypeValidator.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiConverterTypeValidator.read(buf) for i in range(count) + ] + + + +class _UniffiConverterSequenceTypeCheckpointSummary(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiConverterTypeCheckpointSummary.check_lower(item) + + @classmethod + def write(cls, value, buf): + items = len(value) + buf.write_i32(items) + for item in value: + _UniffiConverterTypeCheckpointSummary.write(item, buf) + + @classmethod + def read(cls, buf): + count = buf.read_i32() + if count < 0: + raise InternalError("Unexpected negative sequence length") + + return [ + _UniffiConverterTypeCheckpointSummary.read(buf) for i in range(count) + ] + + + +class _UniffiConverterSequenceTypeObjectReference(_UniffiConverterRustBuffer): + @classmethod + def check_lower(cls, value): + for item in value: + _UniffiConverterTypeObjectReference.check_lower(item) @classmethod def write(cls, value, buf): @@ -5602,7 +7918,7 @@ class AddressProtocol(typing.Protocol): `0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331`. ``` - use iota_sdk_types::Address; + use iota_types::Address; let hex = "0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331"; let address = Address::from_hex(hex).unwrap(); @@ -5664,7 +7980,7 @@ class Address(): `0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331`. ``` - use iota_sdk_types::Address; + use iota_types::Address; let hex = "0x02a212de6a9dfa3a69e22387acfbafbb1a9e591bd9d636e7895dcfc8de05f331"; let address = Address::from_hex(hex).unwrap(); @@ -5737,7 +8053,7 @@ 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(_UniffiConverterTypeBindingsSdkError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes, + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_bytes, _UniffiConverterBytes.lower(bytes)) return cls._make_instance_(pointer) @@ -5746,7 +8062,7 @@ 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(_UniffiConverterTypeBindingsSdkError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_hex, + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_address_from_hex, _UniffiConverterString.lower(hex)) return cls._make_instance_(pointer) @@ -6038,7 +8354,7 @@ 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(_UniffiConverterTypeBindingsSdkError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes, + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_bytes, _UniffiConverterBytes.lower(bytes)) return cls._make_instance_(pointer) @@ -6047,7 +8363,7 @@ 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(_UniffiConverterTypeBindingsSdkError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str, + pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeSdkFfiError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_bls12381publickey_from_str, _UniffiConverterString.lower(s)) return cls._make_instance_(pointer) @@ -6096,66 +8412,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): @@ -6165,10 +8460,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 @@ -6178,24 +8473,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) -class _UniffiConverterTypeChangeEpochV2: + 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 _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 @@ -6206,15 +8534,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): @@ -6224,10 +8584,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 @@ -6237,20 +8597,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(),) ) @@ -6258,21 +8645,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 @@ -6283,12 +8670,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): @@ -6298,10 +8685,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 @@ -6314,21 +8701,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 @@ -6339,12 +8726,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): @@ -6354,10 +8741,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 @@ -6370,21 +8757,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 @@ -6395,17 +8782,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 CheckpointSummaryPageProtocol(typing.Protocol): - def data(self, ): - raise NotImplementedError - def is_empty(self, ): +class CheckpointCommitmentProtocol(typing.Protocol): + def as_ecmh_live_object_set_digest(self, ): raise NotImplementedError - def page_info(self, ): + def is_ecmh_live_object_set(self, ): raise NotImplementedError -# CheckpointSummaryPage is a Rust-only trait - it's a wrapper around a Rust implementation. -class CheckpointSummaryPage(): +# 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): @@ -6415,10 +8800,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_checkpointsummarypage, 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_checkpointsummarypage, 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 @@ -6430,27 +8815,18 @@ def _make_instance_(cls, pointer): return inst - def data(self, ) -> "typing.List[CheckpointSummary]": - return _UniffiConverterSequenceTypeCheckpointSummary.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummarypage_data,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 is_empty(self, ) -> "bool": + def is_ecmh_live_object_set(self, ) -> "bool": return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummarypage_is_empty,self._uniffi_clone_pointer(),) - ) - - - - - - def page_info(self, ) -> "PageInfo": - return _UniffiConverterTypePageInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummarypage_page_info,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointcommitment_is_ecmh_live_object_set,self._uniffi_clone_pointer(),) ) @@ -6458,21 +8834,21 @@ def page_info(self, ) -> "PageInfo": -class _UniffiConverterTypeCheckpointSummaryPage: +class _UniffiConverterTypeCheckpointCommitment: @staticmethod def lift(value: int): - return CheckpointSummaryPage._make_instance_(value) + return CheckpointCommitment._make_instance_(value) @staticmethod - def check_lower(value: CheckpointSummaryPage): - if not isinstance(value, CheckpointSummaryPage): - raise TypeError("Expected CheckpointSummaryPage 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: CheckpointSummaryPageProtocol): - if not isinstance(value, CheckpointSummaryPage): - raise TypeError("Expected CheckpointSummaryPage 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 @@ -6483,17 +8859,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: CheckpointSummaryPageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CheckpointCommitmentProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CoinProtocol(typing.Protocol): - def balance(self, ): - raise NotImplementedError - def coin_type(self, ): +class CheckpointContentsDigestProtocol(typing.Protocol): + def to_base58(self, ): raise NotImplementedError - def id(self, ): + def to_bytes(self, ): raise NotImplementedError -# Coin is a Rust-only trait - it's a wrapper around a Rust implementation. -class Coin(): +# 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): @@ -6503,10 +8877,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_checkpointcontentsdigest, 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_checkpointcontentsdigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -6517,37 +8891,43 @@ def _make_instance_(cls, pointer): inst._pointer = pointer return inst @classmethod - def try_from_object(cls, object: "Object"): - _UniffiConverterTypeObject.check_lower(object) + 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(_UniffiConverterTypeBindingsSdkError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_coin_try_from_object, - _UniffiConverterTypeObject.lower(object)) + 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) - - def balance(self, ) -> "int": - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_balance,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_checkpointcontentsdigest_generate,) + return cls._make_instance_(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 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 id(self, ) -> "ObjectId": - return _UniffiConverterTypeObjectId.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_id,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(),) ) @@ -6555,21 +8935,21 @@ def id(self, ) -> "ObjectId": -class _UniffiConverterTypeCoin: +class _UniffiConverterTypeCheckpointContentsDigest: @staticmethod def lift(value: int): - return Coin._make_instance_(value) + return CheckpointContentsDigest._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: CheckpointContentsDigest): + if not isinstance(value, CheckpointContentsDigest): + raise TypeError("Expected CheckpointContentsDigest 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: CheckpointContentsDigestProtocol): + if not isinstance(value, CheckpointContentsDigest): + raise TypeError("Expected CheckpointContentsDigest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -6580,12 +8960,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: CoinProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CheckpointContentsDigestProtocol, 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 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): @@ -6595,10 +8978,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_checkpointdigest, 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_checkpointdigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -6608,24 +8991,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 _UniffiConverterTypeCoinMetadata: + 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 CoinMetadata._make_instance_(value) + return CheckpointDigest._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: CheckpointDigest): + if not isinstance(value, CheckpointDigest): + raise TypeError("Expected CheckpointDigest 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: CheckpointDigestProtocol): + if not isinstance(value, CheckpointDigest): + raise TypeError("Expected CheckpointDigest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -6636,17 +9061,17 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: CoinMetadataProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CheckpointDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class CoinPageProtocol(typing.Protocol): +class CheckpointSummaryPageProtocol(typing.Protocol): def data(self, ): raise NotImplementedError def is_empty(self, ): raise NotImplementedError def page_info(self, ): raise NotImplementedError -# CoinPage is a Rust-only trait - it's a wrapper around a Rust implementation. -class CoinPage(): +# CheckpointSummaryPage is a Rust-only trait - it's a wrapper around a Rust implementation. +class CheckpointSummaryPage(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -6656,10 +9081,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_coinpage, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_checkpointsummarypage, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coinpage, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_checkpointsummarypage, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -6671,9 +9096,9 @@ def _make_instance_(cls, pointer): return inst - def data(self, ) -> "typing.List[Coin]": - return _UniffiConverterSequenceTypeCoin.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coinpage_data,self._uniffi_clone_pointer(),) + def data(self, ) -> "typing.List[CheckpointSummary]": + return _UniffiConverterSequenceTypeCheckpointSummary.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummarypage_data,self._uniffi_clone_pointer(),) ) @@ -6682,7 +9107,7 @@ def data(self, ) -> "typing.List[Coin]": def is_empty(self, ) -> "bool": return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coinpage_is_empty,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummarypage_is_empty,self._uniffi_clone_pointer(),) ) @@ -6691,7 +9116,7 @@ def is_empty(self, ) -> "bool": def page_info(self, ) -> "PageInfo": return _UniffiConverterTypePageInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coinpage_page_info,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_checkpointsummarypage_page_info,self._uniffi_clone_pointer(),) ) @@ -6699,21 +9124,21 @@ def page_info(self, ) -> "PageInfo": -class _UniffiConverterTypeCoinPage: +class _UniffiConverterTypeCheckpointSummaryPage: @staticmethod def lift(value: int): - return CoinPage._make_instance_(value) + return CheckpointSummaryPage._make_instance_(value) @staticmethod - def check_lower(value: CoinPage): - if not isinstance(value, CoinPage): - raise TypeError("Expected CoinPage instance, {} found".format(type(value).__name__)) + def check_lower(value: CheckpointSummaryPage): + if not isinstance(value, CheckpointSummaryPage): + raise TypeError("Expected CheckpointSummaryPage instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: CoinPageProtocol): - if not isinstance(value, CoinPage): - raise TypeError("Expected CoinPage instance, {} found".format(type(value).__name__)) + def lower(value: CheckpointSummaryPageProtocol): + if not isinstance(value, CheckpointSummaryPage): + raise TypeError("Expected CheckpointSummaryPage instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -6724,81 +9149,63 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: CoinPageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CheckpointSummaryPageProtocol, 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(): - _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_consensuscommitdigest, pointer) +class CircomG1Protocol(typing.Protocol): + """ + A G1 point - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_consensuscommitdigest, self._pointer) + This represents the canonical decimal representation of the projective + coordinates in Fq. - # 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 + # BCS + The BCS serialized form for this type is defined by the following ABNF: + ```text + circom-g1 = %x03 3(bn254-field-element) + ``` + """ -class _UniffiConverterTypeConsensusCommitDigest: + pass +# CircomG1 is a Rust-only trait - it's a wrapper around a Rust implementation. +class CircomG1(): + """ + A G1 point - @staticmethod - def lift(value: int): - return ConsensusCommitDigest._make_instance_(value) + This represents the canonical decimal representation of the projective + coordinates in Fq. - @staticmethod - def check_lower(value: ConsensusCommitDigest): - if not isinstance(value, ConsensusCommitDigest): - raise TypeError("Expected ConsensusCommitDigest instance, {} found".format(type(value).__name__)) + # BCS - @staticmethod - def lower(value: ConsensusCommitDigestProtocol): - if not isinstance(value, ConsensusCommitDigest): - raise TypeError("Expected ConsensusCommitDigest instance, {} found".format(type(value).__name__)) - return value._uniffi_clone_pointer() + The BCS serialized form for this type is defined by the following ABNF: - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + ```text + circom-g1 = %x03 3(bn254-field-element) + ``` + """ - @classmethod - def write(cls, value: ConsensusCommitDigestProtocol, 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") + 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_consensuscommitprologuev1, 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_consensuscommitprologuev1, 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 @@ -6811,21 +9218,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeConsensusCommitPrologueV1: +class _UniffiConverterTypeCircomG1: @staticmethod def lift(value: int): - return ConsensusCommitPrologueV1._make_instance_(value) + return CircomG1._make_instance_(value) @staticmethod - def check_lower(value: ConsensusCommitPrologueV1): - if not isinstance(value, ConsensusCommitPrologueV1): - raise TypeError("Expected ConsensusCommitPrologueV1 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: ConsensusCommitPrologueV1Protocol): - if not isinstance(value, ConsensusCommitPrologueV1): - raise TypeError("Expected ConsensusCommitPrologueV1 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 @@ -6836,59 +9243,72 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ConsensusCommitPrologueV1Protocol, buf: _UniffiRustBuffer): + def write(cls, value: CircomG1Protocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class DigestProtocol(typing.Protocol): +class CircomG2Protocol(typing.Protocol): """ - A 32-byte Blake2b256 hash output. + A G2 point + + This represents the canonical decimal representation of the coefficients of + the projective coordinates in Fq2. # 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-g2 = %x03 3(%x02 2(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(): +# CircomG2 is a Rust-only trait - it's a wrapper around a Rust implementation. +class CircomG2(): """ - A 32-byte Blake2b256 hash output. + A G2 point + + This represents the canonical decimal representation of the coefficients of + the projective coordinates in Fq2. # 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-g2 = %x03 3(%x02 2(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_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_digest, 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_digest, 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 @@ -6901,21 +9321,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeDigest: +class _UniffiConverterTypeCircomG2: @staticmethod def lift(value: int): - return Digest._make_instance_(value) + return CircomG2._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: CircomG2): + if not isinstance(value, CircomG2): + raise TypeError("Expected CircomG2 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: CircomG2Protocol): + if not isinstance(value, CircomG2): + raise TypeError("Expected CircomG2 instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -6926,12 +9346,17 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: DigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CircomG2Protocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class DryRunResultProtocol(typing.Protocol): - pass -# DryRunResult is a Rust-only trait - it's a wrapper around a Rust implementation. -class DryRunResult(): +class CoinProtocol(typing.Protocol): + def balance(self, ): + raise NotImplementedError + 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): @@ -6941,10 +9366,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_dryrunresult, 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_dryrunresult, 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 @@ -6954,24 +9379,60 @@ 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) -class _UniffiConverterTypeDryRunResult: + 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 id(self, ) -> "ObjectId": + return _UniffiConverterTypeObjectId.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coin_id,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeCoin: @staticmethod def lift(value: int): - return DryRunResult._make_instance_(value) + return Coin._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: Coin): + if not isinstance(value, Coin): + raise TypeError("Expected Coin 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: CoinProtocol): + if not isinstance(value, Coin): + raise TypeError("Expected Coin instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -6982,12 +9443,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: DryRunResultProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CoinProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class DynamicFieldOutputProtocol(typing.Protocol): +class CoinMetadataProtocol(typing.Protocol): pass -# DynamicFieldOutput is a Rust-only trait - it's a wrapper around a Rust implementation. -class DynamicFieldOutput(): +# 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): @@ -6997,10 +9458,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_dynamicfieldoutput, 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_dynamicfieldoutput, 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 @@ -7013,21 +9474,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeDynamicFieldOutput: +class _UniffiConverterTypeCoinMetadata: @staticmethod def lift(value: int): - return DynamicFieldOutput._make_instance_(value) + return CoinMetadata._make_instance_(value) @staticmethod - def check_lower(value: DynamicFieldOutput): - if not isinstance(value, DynamicFieldOutput): - raise TypeError("Expected DynamicFieldOutput 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: DynamicFieldOutputProtocol): - if not isinstance(value, DynamicFieldOutput): - raise TypeError("Expected DynamicFieldOutput 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 @@ -7038,17 +9499,17 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: DynamicFieldOutputProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CoinMetadataProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class DynamicFieldOutputPageProtocol(typing.Protocol): +class CoinPageProtocol(typing.Protocol): def data(self, ): raise NotImplementedError def is_empty(self, ): raise NotImplementedError def page_info(self, ): raise NotImplementedError -# DynamicFieldOutputPage is a Rust-only trait - it's a wrapper around a Rust implementation. -class DynamicFieldOutputPage(): +# CoinPage is a Rust-only trait - it's a wrapper around a Rust implementation. +class CoinPage(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -7058,10 +9519,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_dynamicfieldoutputpage, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_coinpage, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_dynamicfieldoutputpage, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_coinpage, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -7073,9 +9534,9 @@ def _make_instance_(cls, pointer): return inst - def data(self, ) -> "typing.List[DynamicFieldOutput]": - return _UniffiConverterSequenceTypeDynamicFieldOutput.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_dynamicfieldoutputpage_data,self._uniffi_clone_pointer(),) + def data(self, ) -> "typing.List[Coin]": + return _UniffiConverterSequenceTypeCoin.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coinpage_data,self._uniffi_clone_pointer(),) ) @@ -7084,7 +9545,7 @@ def data(self, ) -> "typing.List[DynamicFieldOutput]": def is_empty(self, ) -> "bool": return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_dynamicfieldoutputpage_is_empty,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coinpage_is_empty,self._uniffi_clone_pointer(),) ) @@ -7093,7 +9554,7 @@ def is_empty(self, ) -> "bool": def page_info(self, ) -> "PageInfo": return _UniffiConverterTypePageInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_dynamicfieldoutputpage_page_info,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_coinpage_page_info,self._uniffi_clone_pointer(),) ) @@ -7101,21 +9562,21 @@ def page_info(self, ) -> "PageInfo": -class _UniffiConverterTypeDynamicFieldOutputPage: +class _UniffiConverterTypeCoinPage: @staticmethod def lift(value: int): - return DynamicFieldOutputPage._make_instance_(value) + return CoinPage._make_instance_(value) @staticmethod - def check_lower(value: DynamicFieldOutputPage): - if not isinstance(value, DynamicFieldOutputPage): - raise TypeError("Expected DynamicFieldOutputPage instance, {} found".format(type(value).__name__)) + def check_lower(value: CoinPage): + if not isinstance(value, CoinPage): + raise TypeError("Expected CoinPage instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: DynamicFieldOutputPageProtocol): - if not isinstance(value, DynamicFieldOutputPage): - raise TypeError("Expected DynamicFieldOutputPage instance, {} found".format(type(value).__name__)) + def lower(value: CoinPageProtocol): + if not isinstance(value, CoinPage): + raise TypeError("Expected CoinPage instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -7126,37 +9587,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: DynamicFieldOutputPageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: CoinPageProtocol, 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 - ``` - """ - +class ConsensusCommitDigestProtocol(typing.Protocol): + def to_base58(self, ): + raise NotImplementedError def to_bytes(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 - ``` - """ - +# 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): @@ -7166,10 +9605,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_consensuscommitdigest, 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_consensuscommitdigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -7180,34 +9619,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(_UniffiConverterTypeBindingsSdkError,_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_consensuscommitdigest_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(_UniffiConverterTypeBindingsSdkError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_ed25519publickey_from_str, - _UniffiConverterString.lower(s)) + 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 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,) + 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_ed25519publickey_to_bytes,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_consensuscommitdigest_to_bytes,self._uniffi_clone_pointer(),) ) @@ -7215,21 +9663,21 @@ def to_bytes(self, ) -> "bytes": -class _UniffiConverterTypeEd25519PublicKey: +class _UniffiConverterTypeConsensusCommitDigest: @staticmethod def lift(value: int): - return Ed25519PublicKey._make_instance_(value) + return ConsensusCommitDigest._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: ConsensusCommitDigest): + if not isinstance(value, ConsensusCommitDigest): + raise TypeError("Expected ConsensusCommitDigest 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: ConsensusCommitDigestProtocol): + if not isinstance(value, ConsensusCommitDigest): + raise TypeError("Expected ConsensusCommitDigest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -7240,12 +9688,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: Ed25519PublicKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ConsensusCommitDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class EffectsAuxiliaryDataDigestProtocol(typing.Protocol): +class ConsensusCommitPrologueV1Protocol(typing.Protocol): pass -# EffectsAuxiliaryDataDigest is a Rust-only trait - it's a wrapper around a Rust implementation. -class EffectsAuxiliaryDataDigest(): +# 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): @@ -7255,10 +9703,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_consensuscommitprologuev1, 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_consensuscommitprologuev1, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -7271,21 +9719,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeEffectsAuxiliaryDataDigest: +class _UniffiConverterTypeConsensusCommitPrologueV1: @staticmethod def lift(value: int): - return EffectsAuxiliaryDataDigest._make_instance_(value) + return ConsensusCommitPrologueV1._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: ConsensusCommitPrologueV1): + if not isinstance(value, ConsensusCommitPrologueV1): + raise TypeError("Expected ConsensusCommitPrologueV1 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: ConsensusCommitPrologueV1Protocol): + if not isinstance(value, ConsensusCommitPrologueV1): + raise TypeError("Expected ConsensusCommitPrologueV1 instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -7296,66 +9744,47 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: EffectsAuxiliaryDataDigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ConsensusCommitPrologueV1Protocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class EndOfEpochTransactionKindProtocol(typing.Protocol): +class DigestProtocol(typing.Protocol): """ - Operation run at the end of an epoch + A 32-byte Blake2b256 hash output. # BCS - The BCS serialized form for this type is defined by the following ABNF: + A `Digest`'s BCS serialized form is defined by the following: ```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 + 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. """ - pass -# EndOfEpochTransactionKind is a Rust-only trait - it's a wrapper around a Rust implementation. -class EndOfEpochTransactionKind(): + 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(): """ - Operation run at the end of an epoch + A 32-byte Blake2b256 hash output. # BCS - The BCS serialized form for this type is defined by the following ABNF: + A `Digest`'s BCS serialized form is defined by the following: ```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 + 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 @@ -7367,10 +9796,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_digest, 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_digest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -7381,83 +9810,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_digest_from_base58, + _UniffiConverterString.lower(base58)) return cls._make_instance_(pointer) @classmethod - def bridge_committee_init(cls, bridge_object_version: "int"): - _UniffiConverterUInt64.check_lower(bridge_object_version) + 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_bridge_committee_init, - _UniffiConverterUInt64.lower(bridge_object_version)) + 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 bridge_state_create(cls, chain_id: "CheckpointDigest"): - _UniffiConverterTypeCheckpointDigest.check_lower(chain_id) - + 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_bridge_state_create, - _UniffiConverterTypeCheckpointDigest.lower(chain_id)) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_digest_generate,) return cls._make_instance_(pointer) - @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) - @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) - @classmethod - def store_execution_time_observations(cls, obs: "ExecutionTimeObservations"): - _UniffiConverterTypeExecutionTimeObservations.check_lower(obs) - - # Call the (fallible) function before creating any half-baked object instances. - pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_endofepochtransactionkind_store_execution_time_observations, - _UniffiConverterTypeExecutionTimeObservations.lower(obs)) - 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(),) + ) -class _UniffiConverterTypeEndOfEpochTransactionKind: + + 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 _UniffiConverterTypeDigest: @staticmethod def lift(value: int): - return EndOfEpochTransactionKind._make_instance_(value) + return Digest._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: Digest): + if not isinstance(value, Digest): + raise TypeError("Expected Digest 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: DigestProtocol): + if not isinstance(value, Digest): + raise TypeError("Expected Digest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -7468,12 +9879,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: EndOfEpochTransactionKindProtocol, buf: _UniffiRustBuffer): + def write(cls, value: DigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class EpochProtocol(typing.Protocol): +class DryRunResultProtocol(typing.Protocol): pass -# Epoch is a Rust-only trait - it's a wrapper around a Rust implementation. -class Epoch(): +# 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): @@ -7483,10 +9894,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_dryrunresult, 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_dryrunresult, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -7499,21 +9910,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeEpoch: +class _UniffiConverterTypeDryRunResult: @staticmethod def lift(value: int): - return Epoch._make_instance_(value) + return DryRunResult._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: DryRunResult): + if not isinstance(value, DryRunResult): + raise TypeError("Expected DryRunResult 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: DryRunResultProtocol): + if not isinstance(value, DryRunResult): + raise TypeError("Expected DryRunResult instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -7524,17 +9935,73 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: EpochProtocol, buf: _UniffiRustBuffer): + def write(cls, value: DryRunResultProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class EpochPageProtocol(typing.Protocol): +class DynamicFieldOutputProtocol(typing.Protocol): + pass +# DynamicFieldOutput is a Rust-only trait - it's a wrapper around a Rust implementation. +class DynamicFieldOutput(): + _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_dynamicfieldoutput, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_dynamicfieldoutput, 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 _UniffiConverterTypeDynamicFieldOutput: + + @staticmethod + def lift(value: int): + return DynamicFieldOutput._make_instance_(value) + + @staticmethod + def check_lower(value: DynamicFieldOutput): + if not isinstance(value, DynamicFieldOutput): + raise TypeError("Expected DynamicFieldOutput instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: DynamicFieldOutputProtocol): + if not isinstance(value, DynamicFieldOutput): + raise TypeError("Expected DynamicFieldOutput 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: DynamicFieldOutputProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class DynamicFieldOutputPageProtocol(typing.Protocol): def data(self, ): raise NotImplementedError def is_empty(self, ): raise NotImplementedError def page_info(self, ): raise NotImplementedError -# EpochPage is a Rust-only trait - it's a wrapper around a Rust implementation. -class EpochPage(): +# DynamicFieldOutputPage is a Rust-only trait - it's a wrapper around a Rust implementation. +class DynamicFieldOutputPage(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -7544,10 +10011,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_epochpage, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_dynamicfieldoutputpage, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_epochpage, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_dynamicfieldoutputpage, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -7559,9 +10026,9 @@ def _make_instance_(cls, pointer): return inst - def data(self, ) -> "typing.List[Epoch]": - return _UniffiConverterSequenceTypeEpoch.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_epochpage_data,self._uniffi_clone_pointer(),) + def data(self, ) -> "typing.List[DynamicFieldOutput]": + return _UniffiConverterSequenceTypeDynamicFieldOutput.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_dynamicfieldoutputpage_data,self._uniffi_clone_pointer(),) ) @@ -7570,7 +10037,7 @@ def data(self, ) -> "typing.List[Epoch]": def is_empty(self, ) -> "bool": return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_epochpage_is_empty,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_dynamicfieldoutputpage_is_empty,self._uniffi_clone_pointer(),) ) @@ -7579,7 +10046,7 @@ def is_empty(self, ) -> "bool": def page_info(self, ) -> "PageInfo": return _UniffiConverterTypePageInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_epochpage_page_info,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_dynamicfieldoutputpage_page_info,self._uniffi_clone_pointer(),) ) @@ -7587,21 +10054,21 @@ def page_info(self, ) -> "PageInfo": -class _UniffiConverterTypeEpochPage: +class _UniffiConverterTypeDynamicFieldOutputPage: @staticmethod def lift(value: int): - return EpochPage._make_instance_(value) + return DynamicFieldOutputPage._make_instance_(value) @staticmethod - def check_lower(value: EpochPage): - if not isinstance(value, EpochPage): - raise TypeError("Expected EpochPage instance, {} found".format(type(value).__name__)) + def check_lower(value: DynamicFieldOutputPage): + if not isinstance(value, DynamicFieldOutputPage): + raise TypeError("Expected DynamicFieldOutputPage instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: EpochPageProtocol): - if not isinstance(value, EpochPage): - raise TypeError("Expected EpochPage instance, {} found".format(type(value).__name__)) + def lower(value: DynamicFieldOutputPageProtocol): + if not isinstance(value, DynamicFieldOutputPage): + raise TypeError("Expected DynamicFieldOutputPage instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -7612,12 +10079,37 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: EpochPageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: DynamicFieldOutputPageProtocol, 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(): +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, ): + 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 + ``` + """ + _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -7627,10 +10119,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_ed25519publickey, 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_ed25519publickey, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -7640,24 +10132,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_ed25519publickey_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_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) -class _UniffiConverterTypeExecutionTimeObservations: + 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(),) + ) + + + + + + +class _UniffiConverterTypeEd25519PublicKey: @staticmethod def lift(value: int): - return ExecutionTimeObservations._make_instance_(value) + return Ed25519PublicKey._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: Ed25519PublicKey): + if not isinstance(value, Ed25519PublicKey): + raise TypeError("Expected Ed25519PublicKey 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: Ed25519PublicKeyProtocol): + if not isinstance(value, Ed25519PublicKey): + raise TypeError("Expected Ed25519PublicKey instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -7668,64 +10193,50 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ExecutionTimeObservationsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Ed25519PublicKeyProtocol, 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 Ed25519SignatureProtocol(typing.Protocol): + """ + An ed25519 signature. - 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-signature = 64OCTECT + ``` + """ + def to_bytes(self, ): raise NotImplementedError - def request_status(self, id: "str"): - """ - Check the faucet request status. +# Ed25519Signature is a Rust-only trait - it's a wrapper around a Rust implementation. +class Ed25519Signature(): + """ + An ed25519 signature. - 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-signature = 64OCTECT + ``` + """ - _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_ed25519signature, 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_ed25519signature, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -7736,138 +10247,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_ed25519signature_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_ed25519signature_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_ed25519signature_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 -_UniffiConverterTypeBindingsSdkError, - - ) - - - - 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 -_UniffiConverterTypeBindingsSdkError, + 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(),) ) - 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 -_UniffiConverterTypeBindingsSdkError, - - ) - - -class _UniffiConverterTypeFaucetClient: +class _UniffiConverterTypeEd25519Signature: @staticmethod def lift(value: int): - return FaucetClient._make_instance_(value) + return Ed25519Signature._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: Ed25519Signature): + if not isinstance(value, Ed25519Signature): + raise TypeError("Expected Ed25519Signature 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: Ed25519SignatureProtocol): + if not isinstance(value, Ed25519Signature): + raise TypeError("Expected Ed25519Signature instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -7878,12 +10307,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: FaucetClientProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Ed25519SignatureProtocol, 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 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): @@ -7893,10 +10325,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_effectsauxiliarydatadigest, 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_effectsauxiliarydatadigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -7906,24 +10338,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) -class _UniffiConverterTypeFaucetReceipt: + + 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 _UniffiConverterTypeEffectsAuxiliaryDataDigest: @staticmethod def lift(value: int): - return FaucetReceipt._make_instance_(value) + return EffectsAuxiliaryDataDigest._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: EffectsAuxiliaryDataDigest): + if not isinstance(value, EffectsAuxiliaryDataDigest): + raise TypeError("Expected EffectsAuxiliaryDataDigest 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: EffectsAuxiliaryDataDigestProtocol): + if not isinstance(value, EffectsAuxiliaryDataDigest): + raise TypeError("Expected EffectsAuxiliaryDataDigest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -7934,12 +10408,68 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: FaucetReceiptProtocol, buf: _UniffiRustBuffer): + def write(cls, value: EffectsAuxiliaryDataDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class GenesisTransactionProtocol(typing.Protocol): +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 -# GenesisTransaction is a Rust-only trait - it's a wrapper around a Rust implementation. -class GenesisTransaction(): +# 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 + ``` + """ + _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -7949,10 +10479,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_endofepochtransactionkind, 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_endofepochtransactionkind, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -7962,24 +10492,57 @@ def _make_instance_(cls, 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) + @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) + @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) + + @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: -class _UniffiConverterTypeGenesisTransaction: - @staticmethod def lift(value: int): - return GenesisTransaction._make_instance_(value) + return EndOfEpochTransactionKind._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: EndOfEpochTransactionKind): + if not isinstance(value, EndOfEpochTransactionKind): + raise TypeError("Expected EndOfEpochTransactionKind 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: EndOfEpochTransactionKindProtocol): + if not isinstance(value, EndOfEpochTransactionKind): + raise TypeError("Expected EndOfEpochTransactionKind instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -7990,425 +10553,408 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: GenesisTransactionProtocol, buf: _UniffiRustBuffer): + def write(cls, value: EndOfEpochTransactionKindProtocol, 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 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") - 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. - """ + 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) - raise NotImplementedError - def chain_id(self, ): - """ - Get the chain identifier. - """ + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_epoch, self._pointer) - raise NotImplementedError - def checkpoint(self, digest: "typing.Union[object, typing.Optional[CheckpointDigest]]" = _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. - """ + # 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 - 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. +class _UniffiConverterTypeEpoch: - 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>`. - """ + @staticmethod + def lift(value: int): + return Epoch._make_instance_(value) - 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). + @staticmethod + def check_lower(value: Epoch): + if not isinstance(value, Epoch): + raise TypeError("Expected Epoch instance, {} found".format(type(value).__name__)) - `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. - """ + @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 EpochPageProtocol(typing.Protocol): + def data(self, ): 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). + def is_empty(self, ): + raise NotImplementedError + def page_info(self, ): + raise NotImplementedError +# EpochPage is a Rust-only trait - it's a wrapper around a Rust implementation. +class EpochPage(): + _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_epochpage, pointer) - `tx_meta` is the transaction metadata. - """ + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_epochpage, self._pointer) - raise NotImplementedError - def dynamic_field(self, address: "Address",type: "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 - The `name` argument is a json serialized type. - This returns [`DynamicFieldOutput`] which contains the name, the value - as json, and object. + def data(self, ) -> "typing.List[Epoch]": + return _UniffiConverterSequenceTypeEpoch.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_epochpage_data,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(); - ``` - """ - 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. - """ + def is_empty(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_epochpage_is_empty,self._uniffi_clone_pointer(),) + ) - raise NotImplementedError - def dynamic_object_field(self, address: "Address",type: "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 page_info(self, ) -> "PageInfo": + return _UniffiConverterTypePageInfo.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_epochpage_page_info,self._uniffi_clone_pointer(),) + ) - 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 epochs(self, pagination_filter: "PaginationFilter"): - """ - Return a page of epochs. - """ - 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 - """ +class _UniffiConverterTypeEpochPage: - 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. + @staticmethod + def lift(value: int): + return EpochPage._make_instance_(value) - 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)`. - """ + @staticmethod + def check_lower(value: EpochPage): + if not isinstance(value, EpochPage): + raise TypeError("Expected EpochPage instance, {} found".format(type(value).__name__)) - 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. + @staticmethod + def lower(value: EpochPageProtocol): + if not isinstance(value, EpochPage): + raise TypeError("Expected EpochPage instance, {} found".format(type(value).__name__)) + return value._uniffi_clone_pointer() - 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)`. - """ + @classmethod + def read(cls, buf: _UniffiRustBuffer): + ptr = buf.read_u64() + if ptr == 0: + raise InternalError("Raw pointer value was null") + return cls.lift(ptr) - 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. - """ + @classmethod + def write(cls, value: EpochPageProtocol, 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") - 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. - """ + 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) - raise NotImplementedError - def object(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): - """ - Return an object based on the provided [`Address`]. + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_event, self._pointer) - 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)`. - """ + # 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 - 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. +class _UniffiConverterTypeEvent: - # Example + @staticmethod + def lift(value: int): + return Event._make_instance_(value) - ```rust,ignore - let filter = ObjectFilter { - type_: None, - owner: Some(Address::from_str("test").unwrap().into()), - object_ids: None, - }; + @staticmethod + def check_lower(value: Event): + if not isinstance(value, Event): + raise TypeError("Expected Event instance, {} found".format(type(value).__name__)) - let owned_objects = client.objects(None, None, Some(filter), None, None).await; - ``` - """ + @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 EventPageProtocol(typing.Protocol): + def data(self, ): 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. + def is_empty(self, ): + raise NotImplementedError + def page_info(self, ): + raise NotImplementedError +# EventPage is a Rust-only trait - it's a wrapper around a Rust implementation. +class EventPage(): + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") - Note that this interpretation of version is different from a historical - object read (the interpretation of version for the object query). - """ + 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_eventpage, pointer) - raise NotImplementedError - def package_by_name(self, name: "str"): - """ - Fetch a package by its name (using Move Registry Service) - """ + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_eventpage, self._pointer) - 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. - """ + # 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 - 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. + def data(self, ) -> "typing.List[Event]": + return _UniffiConverterSequenceTypeEvent.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_eventpage_data,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): - """ - 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. - """ + def is_empty(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_eventpage_is_empty,self._uniffi_clone_pointer(),) + ) - 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: "CheckpointDigest"): - """ - 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. - """ + def page_info(self, ) -> "PageInfo": + return _UniffiConverterTypePageInfo.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_eventpage_page_info,self._uniffi_clone_pointer(),) + ) - 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. - """ + +class _UniffiConverterTypeEventPage: + + @staticmethod + def lift(value: int): + return EventPage._make_instance_(value) + + @staticmethod + def check_lower(value: EventPage): + if not isinstance(value, EventPage): + raise TypeError("Expected EventPage instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: EventPageProtocol): + if not isinstance(value, EventPage): + raise TypeError("Expected EventPage 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: EventPageProtocol, 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 transactions_effects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT): + def request_and_wait(self, address: "Address"): """ - Get a page of transactions' effects based on the provided filters. + 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 -# GraphQlClient is a Rust-only trait - it's a wrapper around a Rust implementation. -class GraphQlClient(): + 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, server: "str"): + def __init__(self, faucet_url: "str"): """ - Create a new GraphQL client with the provided server address. + 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(server) + _UniffiConverterString.check_lower(faucet_url) - self._pointer = _uniffi_rust_call_with_error(_UniffiConverterTypeBindingsSdkError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_graphqlclient_new, - _UniffiConverterString.lower(server)) + 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_graphqlclient, pointer) + _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_graphqlclient, self._pointer) + 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 @@ -8419,221 +10965,306 @@ def _make_instance_(cls, pointer): 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, ): + def devnet(cls, ): """ - Create a new GraphQL client connected to the `localhost` GraphQL server: - {DEFAULT_LOCAL_HOST}. + 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_graphqlclient_new_localhost,) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_devnet,) return cls._make_instance_(pointer) @classmethod - def new_mainnet(cls, ): + def local(cls, ): """ - Create a new GraphQL client connected to the `mainnet` GraphQL server: - {MAINNET_HOST}. + 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_graphqlclient_new_mainnet,) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_local,) return cls._make_instance_(pointer) @classmethod - def new_testnet(cls, ): + def testnet(cls, ): """ - Create a new GraphQL client connected to the `testnet` GraphQL server: - {TESTNET_HOST}. + 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_graphqlclient_new_testnet,) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_faucetclient_testnet,) return cls._make_instance_(pointer) - async def active_validators(self, pagination_filter: "PaginationFilter",epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "ValidatorPage": + async def request(self, address: "Address") -> "typing.Optional[str]": """ - 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. + 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. """ - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) + _UniffiConverterTypeAddress.check_lower(address) return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request( self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalUInt64.lower(epoch) + _UniffiConverterTypeAddress.lower(address) ), - _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, + _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, + _UniffiConverterOptionalString.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def balance(self, address: "Address",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT) -> "typing.Optional[int]": + async def request_and_wait(self, address: "Address") -> "typing.Optional[FaucetReceipt]": """ - 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. + 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) - 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( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_faucetclient_request_and_wait( self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterOptionalString.lower(coin_type) + _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 - _UniffiConverterOptionalUInt64.lift, + _UniffiConverterOptionalTypeFaucetReceipt.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def chain_id(self, ) -> "str": + async def request_status(self, id: "str") -> "typing.Optional[BatchSendStatus]": """ - Get the chain identifier. + 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_graphqlclient_chain_id( + _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 - _UniffiConverterString.lift, + _UniffiConverterOptionalTypeBatchSendStatus.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def checkpoint(self, digest: "typing.Union[object, typing.Optional[CheckpointDigest]]" = _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 - _UniffiConverterOptionalTypeCheckpointDigest.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(), - _UniffiConverterOptionalTypeCheckpointDigest.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 -_UniffiConverterTypeBindingsSdkError, - ) +class _UniffiConverterTypeFaucetClient: + @staticmethod + def lift(value: int): + return FaucetClient._make_instance_(value) - async def checkpoints(self, pagination_filter: "PaginationFilter") -> "CheckpointSummaryPage": - """ - Get a page of [`CheckpointSummary`] for the provided parameters. - """ + @staticmethod + def check_lower(value: FaucetClient): + if not isinstance(value, FaucetClient): + raise TypeError("Expected FaucetClient instance, {} found".format(type(value).__name__)) - _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_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, - # lift function - _UniffiConverterTypeCheckpointSummaryPage.lift, - - # Error FFI converter -_UniffiConverterTypeBindingsSdkError, + @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) - async def coin_metadata(self, coin_type: "str") -> "typing.Optional[CoinMetadata]": + # 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 coin metadata for the coin type. + 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. """ - _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 -_UniffiConverterTypeBindingsSdkError, + 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. + """ - async def coins(self, owner: "Address",pagination_filter: "PaginationFilter",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT) -> "CoinPage": + 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. @@ -8642,35 +11273,8 @@ async def coins(self, owner: "Address",pagination_filter: "PaginationFilter",coi `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_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, - # lift function - _UniffiConverterTypeCoinPage.lift, - - # Error FFI converter -_UniffiConverterTypeBindingsSdkError, - - ) - - - - async def dry_run_tx(self, tx: "Transaction",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT) -> "DryRunResult": + 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). @@ -8681,32 +11285,8 @@ async def dry_run_tx(self, tx: "Transaction",skip_checks: "typing.Union[object, 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 -_UniffiConverterTypeBindingsSdkError, - - ) - - - - async def dry_run_tx_kind(self, tx_kind: "TransactionKind",tx_meta: "TransactionMetadata",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT) -> "DryRunResult": + 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). @@ -8719,35 +11299,8 @@ async def dry_run_tx_kind(self, tx_kind: "TransactionKind",tx_meta: "Transaction `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 -_UniffiConverterTypeBindingsSdkError, - - ) - - - - async def dynamic_field(self, address: "Address",type: "TypeTag",name: "Value") -> "typing.Optional[DynamicFieldOutput]": + raise NotImplementedError + def dynamic_field(self, address: "Address",type: "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 @@ -8771,33 +11324,8 @@ async def dynamic_field(self, address: "Address",type: "TypeTag",name: "Value") ``` """ - _UniffiConverterTypeAddress.check_lower(address) - - _UniffiConverterTypeTypeTag.check_lower(type) - - _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), - _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 -_UniffiConverterTypeBindingsSdkError, - - ) - - - - async def dynamic_fields(self, address: "Address",pagination_filter: "PaginationFilter") -> "DynamicFieldOutputPage": + 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. @@ -8805,30 +11333,8 @@ async def dynamic_fields(self, address: "Address",pagination_filter: "Pagination 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_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, - # lift function - _UniffiConverterTypeDynamicFieldOutputPage.lift, - - # Error FFI converter -_UniffiConverterTypeBindingsSdkError, - - ) - - - - async def dynamic_object_field(self, address: "Address",type: "TypeTag",name: "Value") -> "typing.Optional[DynamicFieldOutput]": + raise NotImplementedError + def dynamic_object_field(self, address: "Address",type: "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 @@ -8840,870 +11346,786 @@ async def dynamic_object_field(self, address: "Address",type: "TypeTag",name: "V as json, and object. """ - _UniffiConverterTypeAddress.check_lower(address) - - _UniffiConverterTypeTypeTag.check_lower(type) - - _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), - _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 -_UniffiConverterTypeBindingsSdkError, - - ) - - - - async def epoch(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Epoch]": + 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. """ - 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 -_UniffiConverterTypeBindingsSdkError, - - ) - - - - async def epoch_total_checkpoints(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": + 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). """ - 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 -_UniffiConverterTypeBindingsSdkError, - - ) - - - - async def epoch_total_transaction_blocks(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": + 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). """ - 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 -_UniffiConverterTypeBindingsSdkError, - - ) + 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. + """ - async def epochs(self, pagination_filter: "PaginationFilter") -> "EpochPage": + raise NotImplementedError + def max_page_size(self, ): """ - Return a page of epochs. + Lazily fetch the max page size """ - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) - - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epochs( - self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter) - ), - _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 - _UniffiConverterTypeEpochPage.lift, - - # Error FFI converter -_UniffiConverterTypeBindingsSdkError, + 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)`. + """ - async def events(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[EventFilter]]" = _DEFAULT) -> "TransactionEventPage": + raise NotImplementedError + def normalized_move_function(self, package: "str",module: "str",function: "str",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): """ - Return a page of tuple (event, transaction digest) based on the - (optional) event filter. + Return the normalized Move function data for the provided package, + module, and function. """ - _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_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, - # lift function - _UniffiConverterTypeTransactionEventPage.lift, - - # Error FFI converter -_UniffiConverterTypeBindingsSdkError, - - ) - - - - async def execute_tx(self, signatures: "typing.List[UserSignature]",tx: "Transaction") -> "typing.Optional[TransactionEffects]": + 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): """ - Execute a transaction. + Return the normalized Move module data for the provided module. """ - _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 -_UniffiConverterTypeBindingsSdkError, - - ) - + 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)`. + """ - async def latest_checkpoint_sequence_number(self, ) -> "typing.Optional[int]": + raise NotImplementedError + def object_bcs(self, object_id: "ObjectId"): """ - Return the sequence number of the latest checkpoint that has been - executed. + Return the object's bcs content [`Vec`] based on the provided + [`Address`]. """ - 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 -_UniffiConverterTypeBindingsSdkError, + 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_: None, + owner: Some(Address::from_str("test").unwrap().into()), + object_ids: None, + }; - async def max_page_size(self, ) -> "int": - """ - Lazily fetch the max page size + let owned_objects = client.objects(None, None, Some(filter), None, None).await; + ``` """ - 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 -_UniffiConverterTypeBindingsSdkError, - - ) - - + 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. - async def move_object_contents(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Value]": + Note that this interpretation of version is different from a historical + object read (the interpretation of version for the object query). """ - 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 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. """ - _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 -_UniffiConverterTypeBindingsSdkError, + 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. + """ - async def move_object_contents_bcs(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[bytes]": + raise NotImplementedError + def reference_gas_price(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT): """ - Return the BCS of an object that is a Move object. + Get the reference gas price for the provided epoch or the last known one + if no epoch is provided. - 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)`. + This will return `Ok(None)` if the epoch requested is not available in + the GraphQL service (e.g., due to pruning). """ - _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 -_UniffiConverterTypeBindingsSdkError, + 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. + """ - async def normalized_move_function(self, package: "str",module: "str",function: "str",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[MoveFunction]": + raise NotImplementedError + def total_transaction_blocks_by_digest(self, digest: "CheckpointContentsDigest"): """ - Return the normalized Move function data for the provided package, - module, and function. + The total number of transaction blocks in the network by the end of the + provided checkpoint digest. """ - _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 -_UniffiConverterTypeBindingsSdkError, + 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. + """ - 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]": + raise NotImplementedError + def transactions(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT): """ - Return the normalized Move module data for the provided module. + Get a page of transactions based on the provided filters. """ - _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 -_UniffiConverterTypeBindingsSdkError, - - ) - - + 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. + """ - async def object(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Object]": + 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. """ - 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 +# 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. """ - _UniffiConverterTypeObjectId.check_lower(object_id) - - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) + _UniffiConverterString.check_lower(server) - 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 -_UniffiConverterTypeBindingsSdkError, - - ) + 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) - async def object_bcs(self, object_id: "ObjectId") -> "typing.Optional[bytes]": + # 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, ): """ - Return the object's bcs content [`Vec`] based on the provided - [`Address`]. + Create a new GraphQL client connected to the `devnet` GraphQL server: + {DEVNET_HOST}. """ - _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 -_UniffiConverterTypeBindingsSdkError, - - ) + # 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) - async def objects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[ObjectFilter]]" = _DEFAULT) -> "ObjectPage": + @classmethod + def new_mainnet(cls, ): + """ + Create a new GraphQL client connected to the `mainnet` GraphQL server: + {MAINNET_HOST}. """ - 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. + # 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) - # Example + @classmethod + def new_testnet(cls, ): + """ + Create a new GraphQL client connected to the `testnet` GraphQL server: + {TESTNET_HOST}. + """ - ```rust,ignore - let filter = ObjectFilter { - type_: None, - owner: Some(Address::from_str("test").unwrap().into()), - object_ids: None, - }; + # 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) - let owned_objects = client.objects(None, None, Some(filter), None, None).await; - ``` + + 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 filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeObjectFilter.check_lower(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_objects( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_active_validators( self._uniffi_clone_pointer(), _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalTypeObjectFilter.lower(filter) + _UniffiConverterOptionalUInt64.lower(epoch) ), _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 - _UniffiConverterTypeObjectPage.lift, + _UniffiConverterTypeValidatorPage.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def package(self, address: "Address",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[MovePackage]": + async def balance(self, address: "Address",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT) -> "typing.Optional[int]": """ - 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). + 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 version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) + 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_package( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_balance( self._uniffi_clone_pointer(), _UniffiConverterTypeAddress.lower(address), - _UniffiConverterOptionalUInt64.lower(version) + _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 - _UniffiConverterOptionalTypeMovePackage.lift, + _UniffiConverterOptionalUInt64.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def package_by_name(self, name: "str") -> "typing.Optional[MovePackage]": + async def chain_id(self, ) -> "str": """ - Fetch a package by its name (using Move Registry Service) + Get the chain identifier. """ - _UniffiConverterString.check_lower(name) - return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_package_by_name( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_chain_id( self._uniffi_clone_pointer(), - _UniffiConverterString.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 - _UniffiConverterOptionalTypeMovePackage.lift, + _UniffiConverterString.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def package_latest(self, address: "Address") -> "typing.Optional[MovePackage]": + async def checkpoint(self, digest: "typing.Union[object, typing.Optional[CheckpointContentsDigest]]" = _DEFAULT,seq_num: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[CheckpointSummary]": """ - 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. + Get the [`CheckpointSummary`] for a given checkpoint digest or + checkpoint id. If none is provided, it will use the last known + checkpoint id. """ - _UniffiConverterTypeAddress.check_lower(address) + 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_package_latest( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoint( self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address) + _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 - _UniffiConverterOptionalTypeMovePackage.lift, + _UniffiConverterOptionalTypeCheckpointSummary.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_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": + async def checkpoints(self, pagination_filter: "PaginationFilter") -> "CheckpointSummaryPage": """ - 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. + Get a page of [`CheckpointSummary`] for the provided parameters. """ - _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( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_checkpoints( self._uniffi_clone_pointer(), - _UniffiConverterTypeAddress.lower(address), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalUInt64.lower(after_version), - _UniffiConverterOptionalUInt64.lower(before_version) + _UniffiConverterTypePaginationFilter.lower(pagination_filter) ), _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 - _UniffiConverterTypeMovePackagePage.lift, + _UniffiConverterTypeCheckpointSummaryPage.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_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": + async def coin_metadata(self, coin_type: "str") -> "typing.Optional[CoinMetadata]": """ - 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. + Get the coin metadata for the coin type. """ - _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) + _UniffiConverterString.check_lower(coin_type) return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_packages( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coin_metadata( self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalUInt64.lower(after_checkpoint), - _UniffiConverterOptionalUInt64.lower(before_checkpoint) + _UniffiConverterString.lower(coin_type) ), - _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, + _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, + _UniffiConverterOptionalTypeCoinMetadata.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def protocol_config(self, version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[ProtocolConfigs]": + async def coins(self, owner: "Address",pagination_filter: "PaginationFilter",coin_type: "typing.Union[object, typing.Optional[str]]" = _DEFAULT) -> "CoinPage": """ - Get the protocol configuration. + 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>`. """ - if version is _DEFAULT: - version = None - _UniffiConverterOptionalUInt64.check_lower(version) + _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_protocol_config( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_coins( self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(version) + _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, + _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 - _UniffiConverterOptionalTypeProtocolConfigs.lift, + _UniffiConverterTypeCoinPage.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def reference_gas_price(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": + async def dry_run_tx(self, tx: "Transaction",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT) -> "DryRunResult": """ - Get the reference gas price for the provided epoch or the last known one - if no epoch is provided. + Dry run a [`Transaction`] and return the transaction effects and dry run + error (if any). - This will return `Ok(None)` if the epoch requested is not available in - the GraphQL service (e.g., due to pruning). + `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. """ - if epoch is _DEFAULT: - epoch = None - _UniffiConverterOptionalUInt64.check_lower(epoch) + _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_reference_gas_price( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dry_run_tx( self._uniffi_clone_pointer(), - _UniffiConverterOptionalUInt64.lower(epoch) + _UniffiConverterTypeTransaction.lower(tx), + _UniffiConverterOptionalBool.lower(skip_checks) ), - _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, + _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 - _UniffiConverterOptionalUInt64.lift, + _UniffiConverterTypeDryRunResult.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def service_config(self, ) -> "ServiceConfig": + async def dry_run_tx_kind(self, tx_kind: "TransactionKind",tx_meta: "TransactionMetadata",skip_checks: "typing.Union[object, typing.Optional[bool]]" = _DEFAULT) -> "DryRunResult": """ - Get the GraphQL service configuration, including complexity limits, read - and mutation limits, supported versions, and others. + 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_service_config( + _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 - _UniffiConverterTypeServiceConfig.lift, + _UniffiConverterTypeDryRunResult.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def set_rpc_server(self, server: "str") -> None: - + async def dynamic_field(self, address: "Address",type: "TypeTag",name: "Value") -> "typing.Optional[DynamicFieldOutput]": """ - Set the server address for the GraphQL GraphQL client. It should be a - valid URL with a host and optionally a port number. + 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(); + ``` """ - _UniffiConverterString.check_lower(server) + _UniffiConverterTypeAddress.check_lower(address) + + _UniffiConverterTypeTypeTag.check_lower(type) + + _UniffiConverterTypeValue.check_lower(name) return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_set_rpc_server( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_field( self._uniffi_clone_pointer(), - _UniffiConverterString.lower(server) + _UniffiConverterTypeAddress.lower(address), + _UniffiConverterTypeTypeTag.lower(type), + _UniffiConverterTypeValue.lower(name) ), - _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, + _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 - lambda val: None, - + _UniffiConverterOptionalTypeDynamicFieldOutput.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def total_supply(self, coin_type: "str") -> "typing.Optional[int]": + async def dynamic_fields(self, address: "Address",pagination_filter: "PaginationFilter") -> "DynamicFieldOutputPage": """ - Get total supply for the coin type. + 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. """ - _UniffiConverterString.check_lower(coin_type) + _UniffiConverterTypeAddress.check_lower(address) + + _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_supply( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_fields( self._uniffi_clone_pointer(), - _UniffiConverterString.lower(coin_type) + _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, + _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 - _UniffiConverterOptionalUInt64.lift, + _UniffiConverterTypeDynamicFieldOutputPage.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def total_transaction_blocks(self, ) -> "typing.Optional[int]": + async def dynamic_object_field(self, address: "Address",type: "TypeTag",name: "Value") -> "typing.Optional[DynamicFieldOutput]": """ - The total number of transaction blocks in the network by the end of the - last known checkpoint. + 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) + + _UniffiConverterTypeValue.check_lower(name) + return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_dynamic_object_field( self._uniffi_clone_pointer(), + _UniffiConverterTypeAddress.lower(address), + _UniffiConverterTypeTypeTag.lower(type), + _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 - _UniffiConverterOptionalUInt64.lift, + _UniffiConverterOptionalTypeDynamicFieldOutput.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def total_transaction_blocks_by_digest(self, digest: "CheckpointDigest") -> "typing.Optional[int]": + async def epoch(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[Epoch]": """ - The total number of transaction blocks in the network by the end of the - provided checkpoint digest. + Return the epoch information for the provided epoch. If no epoch is + provided, it will return the last known epoch. """ - _UniffiConverterTypeCheckpointDigest.check_lower(digest) + if epoch is _DEFAULT: + epoch = None + _UniffiConverterOptionalUInt64.check_lower(epoch) return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_digest( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch( self._uniffi_clone_pointer(), - _UniffiConverterTypeCheckpointDigest.lower(digest) + _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, + _UniffiConverterOptionalTypeEpoch.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def total_transaction_blocks_by_seq_num(self, seq_num: "int") -> "typing.Optional[int]": + async def epoch_total_checkpoints(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": """ - The total number of transaction blocks in the network by the end of the - provided checkpoint sequence number. + 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). """ - _UniffiConverterUInt64.check_lower(seq_num) + if epoch is _DEFAULT: + epoch = None + _UniffiConverterOptionalUInt64.check_lower(epoch) return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_total_transaction_blocks_by_seq_num( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_checkpoints( self._uniffi_clone_pointer(), - _UniffiConverterUInt64.lower(seq_num) + _UniffiConverterOptionalUInt64.lower(epoch) ), _UniffiLib.ffi_iota_sdk_ffi_rust_future_poll_rust_buffer, _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_rust_buffer, @@ -9712,195 +12134,3067 @@ async def total_transaction_blocks_by_seq_num(self, seq_num: "int") -> "typing.O _UniffiConverterOptionalUInt64.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def transaction(self, digest: "TransactionDigest") -> "typing.Optional[SignedTransaction]": + async def epoch_total_transaction_blocks(self, epoch: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[int]": """ - Get a transaction by its digest. + 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). """ - _UniffiConverterTypeTransactionDigest.check_lower(digest) + if epoch is _DEFAULT: + epoch = None + _UniffiConverterOptionalUInt64.check_lower(epoch) return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transaction( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_epoch_total_transaction_blocks( self._uniffi_clone_pointer(), - _UniffiConverterTypeTransactionDigest.lower(digest) + _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 - _UniffiConverterOptionalTypeSignedTransaction.lift, + _UniffiConverterOptionalUInt64.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def transaction_data_effects(self, digest: "TransactionDigest") -> "typing.Optional[TransactionDataEffects]": + async def events(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[EventFilter]]" = _DEFAULT) -> "EventPage": """ - Get a transaction's data and effects by its digest. + Return a page of tuple (event, transaction digest) based on the + (optional) event filter. """ - _UniffiConverterTypeTransactionDigest.check_lower(digest) + _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_transaction_data_effects( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_events( self._uniffi_clone_pointer(), - _UniffiConverterTypeTransactionDigest.lower(digest) + _UniffiConverterTypePaginationFilter.lower(pagination_filter), + _UniffiConverterOptionalTypeEventFilter.lower(filter) + ), + _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 + _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 - _UniffiConverterOptionalTypeTransactionDataEffects.lift, + _UniffiConverterOptionalTypeTransactionEffects.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def transaction_effects(self, digest: "TransactionDigest") -> "typing.Optional[TransactionEffects]": + async def latest_checkpoint_sequence_number(self, ) -> "typing.Optional[int]": """ - Get a transaction's effects by its digest. + Return the sequence number of the latest checkpoint that has been + executed. """ - _UniffiConverterTypeTransactionDigest.check_lower(digest) + 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_transaction_effects( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents( self._uniffi_clone_pointer(), - _UniffiConverterTypeTransactionDigest.lower(digest) + _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 - _UniffiConverterOptionalTypeTransactionEffects.lift, + _UniffiConverterOptionalTypeValue.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def transactions(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT) -> "SignedTransactionPage": + async def move_object_contents_bcs(self, object_id: "ObjectId",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[bytes]": """ - Get a page of transactions based on the provided filters. + 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)`. """ - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + _UniffiConverterTypeObjectId.check_lower(object_id) - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) + if version is _DEFAULT: + version = None + _UniffiConverterOptionalUInt64.check_lower(version) return await _uniffi_rust_call_async( - _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_transactions( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_move_object_contents_bcs( self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalTypeTransactionsFilter.lower(filter) + _UniffiConverterTypeObjectId.lower(object_id), + _UniffiConverterOptionalUInt64.lower(version) ), - _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, + _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, + _UniffiConverterOptionalBytes.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def transactions_data_effects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT) -> "TransactionDataEffectsPage": + async def normalized_move_function(self, package: "str",module: "str",function: "str",version: "typing.Union[object, typing.Optional[int]]" = _DEFAULT) -> "typing.Optional[MoveFunction]": """ - Get a page of transactions' data and effects based on the provided - filters. + Return the normalized Move function data for the provided package, + module, and function. """ - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + _UniffiConverterString.check_lower(package) - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) + _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_transactions_data_effects( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_function( self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalTypeTransactionsFilter.lower(filter) + _UniffiConverterString.lower(package), + _UniffiConverterString.lower(module), + _UniffiConverterString.lower(function), + _UniffiConverterOptionalUInt64.lower(version) ), - _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, + _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, + _UniffiConverterOptionalTypeMoveFunction.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_UniffiConverterTypeSdkFfiError, ) - async def transactions_effects(self, pagination_filter: "PaginationFilter",filter: "typing.Union[object, typing.Optional[TransactionsFilter]]" = _DEFAULT) -> "TransactionEffectsPage": + 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]": """ - Get a page of transactions' effects based on the provided filters. + Return the normalized Move module data for the provided module. """ - _UniffiConverterTypePaginationFilter.check_lower(pagination_filter) + _UniffiConverterString.check_lower(package) - if filter is _DEFAULT: - filter = None - _UniffiConverterOptionalTypeTransactionsFilter.check_lower(filter) + _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_transactions_effects( + _UniffiLib.uniffi_iota_sdk_ffi_fn_method_graphqlclient_normalized_move_module( self._uniffi_clone_pointer(), - _UniffiConverterTypePaginationFilter.lower(pagination_filter), - _UniffiConverterOptionalTypeTransactionsFilter.lower(filter) + _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_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, - _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_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 - _UniffiConverterTypeTransactionEffectsPage.lift, + _UniffiConverterOptionalTypeMoveModule.lift, # Error FFI converter -_UniffiConverterTypeBindingsSdkError, +_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_: 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_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, + # 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_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, + # 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_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, + # 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_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, + # 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_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, + # 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_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_complete_pointer, + _UniffiLib.ffi_iota_sdk_ffi_rust_future_free_pointer, + # 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 MovePackagePageProtocol(typing.Protocol): + def data(self, ): + raise NotImplementedError + def is_empty(self, ): + raise NotImplementedError + def page_info(self, ): + raise NotImplementedError +# MovePackagePage is a Rust-only trait - it's a wrapper around a Rust implementation. +class MovePackagePage(): + _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_movepackagepage, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_movepackagepage, 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 data(self, ) -> "typing.List[MovePackage]": + return _UniffiConverterSequenceTypeMovePackage.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackagepage_data,self._uniffi_clone_pointer(),) + ) + + + + + + def is_empty(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackagepage_is_empty,self._uniffi_clone_pointer(),) + ) + + + + + + def page_info(self, ) -> "PageInfo": + return _UniffiConverterTypePageInfo.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackagepage_page_info,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeMovePackagePage: + + @staticmethod + def lift(value: int): + return MovePackagePage._make_instance_(value) + + @staticmethod + def check_lower(value: MovePackagePage): + if not isinstance(value, MovePackagePage): + raise TypeError("Expected MovePackagePage instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: MovePackagePageProtocol): + if not isinstance(value, MovePackagePage): + raise TypeError("Expected MovePackagePage 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: MovePackagePageProtocol, 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 + + + def bitmap(self, ) -> "int": + """ + The bitmap that indicates which committee members provided their + signature. + """ + + return _UniffiConverterUInt16.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_bitmap,self._uniffi_clone_pointer(),) + ) + + + + + + def committee(self, ) -> "MultisigCommittee": + return _UniffiConverterTypeMultisigCommittee.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigaggregatedsignature_committee,self._uniffi_clone_pointer(),) + ) + + + + + + def signatures(self, ) -> "typing.List[MultisigMemberSignature]": + """ + The list of signatures from committee members + """ + + 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, ): + """ + 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 members(self, ): + """ + The members of the committee + """ + + raise NotImplementedError + def scheme(self, ): + """ + Return the flag for this signature scheme + """ + + raise NotImplementedError + def threshold(self, ): + """ + The total signature weight required to authorize a transaction for the + address corresponding to this `MultisigCommittee`. + """ + + raise NotImplementedError +# MultisigCommittee is a Rust-only trait - it's a wrapper around a Rust implementation. +class MultisigCommittee(): + """ + 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 + ``` + """ + + _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`. + + Note that the order of the members is significant towards deriving the + `Address` governed by this committee. + """ + + _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)) + + 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) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_multisigcommittee, 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_valid(self, ) -> "bool": + """ + 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 + """ + + 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]": + """ + The members of the committee + """ + + return _UniffiConverterSequenceTypeMultisigMember.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigcommittee_members,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_multisigcommittee_scheme,self._uniffi_clone_pointer(),) + ) + + + + + + def threshold(self, ) -> "int": + """ + The total signature weight required to authorize a transaction for the + address corresponding to this `MultisigCommittee`. + """ + + 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 + + # 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 + ``` + """ + + def public_key(self, ): + """ + This member's public key. + """ + + raise NotImplementedError + def weight(self, ): + """ + Weight of this member's signature. + """ + + raise NotImplementedError +# MultisigMember is a Rust-only trait - it's a wrapper around a Rust implementation. +class MultisigMember(): + """ + 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 + ``` + """ + + _pointer: ctypes.c_void_p + def __init__(self, public_key: "MultisigMemberPublicKey",weight: "int"): + """ + Construct a new member from a `MultisigMemberPublicKey` and a `weight`. + """ + + _UniffiConverterTypeMultisigMemberPublicKey.check_lower(public_key) + + _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_multisigmember, pointer) + + def _uniffi_clone_pointer(self): + 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 + 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 public_key(self, ) -> "MultisigMemberPublicKey": + """ + This member's public key. + """ + + return _UniffiConverterTypeMultisigMemberPublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmember_public_key,self._uniffi_clone_pointer(),) + ) + + + + + + def weight(self, ) -> "int": + """ + Weight of this member's signature. + """ + + 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 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: 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 _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, ) -> "Ed25519PublicKey": + return _UniffiConverterTypeEd25519PublicKey.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_multisigmemberpublickey_as_ed25519,self._uniffi_clone_pointer(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + +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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + +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, ): + """ + 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 + """ + + 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 + ``` + """ + + _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 __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 + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + +class _UniffiConverterTypeObject: + + @staticmethod + def lift(value: int): + return Object._make_instance_(value) + + @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") + + 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) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectdata, 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 _UniffiConverterTypeObjectData: + + @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) + + @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_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) + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + +class _UniffiConverterTypeObjectDigest: + + @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) + + @classmethod + def write(cls, value: ObjectDigestProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class ObjectFilterProtocol(typing.Protocol): + pass +# ObjectFilter is a Rust-only trait - it's a wrapper around a Rust implementation. +class ObjectFilter(): + _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_objectfilter, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectfilter, 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 _UniffiConverterTypeObjectFilter: + + @staticmethod + def lift(value: int): + return ObjectFilter._make_instance_(value) + + @staticmethod + def check_lower(value: ObjectFilter): + if not isinstance(value, ObjectFilter): + raise TypeError("Expected ObjectFilter instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: ObjectFilterProtocol): + if not isinstance(value, ObjectFilter): + raise TypeError("Expected ObjectFilter 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: ObjectFilterProtocol, 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. + + ## 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: + + ```text + object-id = 32*OCTET + ``` + """ + + 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. + + ## 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: + + ```text + object-id = 32*OCTET + ``` + """ + + _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_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) + + + + 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(),) + ) + + + + + + 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(),) + ) + + + + + + +class _UniffiConverterTypeObjectId: + + @staticmethod + def lift(value: int): + return ObjectId._make_instance_(value) + + @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 ObjectPageProtocol(typing.Protocol): + def data(self, ): + raise NotImplementedError + def is_empty(self, ): + raise NotImplementedError + def page_info(self, ): + raise NotImplementedError +# ObjectPage is a Rust-only trait - it's a wrapper around a Rust implementation. +class ObjectPage(): + _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_objectpage, pointer) + + def _uniffi_clone_pointer(self): + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectpage, 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 data(self, ) -> "typing.List[Object]": + return _UniffiConverterSequenceTypeObject.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectpage_data,self._uniffi_clone_pointer(),) + ) + + + + + + def is_empty(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectpage_is_empty,self._uniffi_clone_pointer(),) + ) + + + + + + def page_info(self, ) -> "PageInfo": + return _UniffiConverterTypePageInfo.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectpage_page_info,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeObjectPage: + + @staticmethod + def lift(value: int): + return ObjectPage._make_instance_(value) + + @staticmethod + def check_lower(value: ObjectPage): + if not isinstance(value, ObjectPage): + raise TypeError("Expected ObjectPage instance, {} found".format(type(value).__name__)) + + @staticmethod + def lower(value: ObjectPageProtocol): + if not isinstance(value, ObjectPage): + raise TypeError("Expected ObjectPage 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: ObjectPageProtocol, 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") + + 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) + + 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 + + + +class _UniffiConverterTypeObjectRef: + + @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) + + @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") + + 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 + + + +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() + + @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: 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 @@ -9911,12 +15205,12 @@ 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): +class PageInfoProtocol(typing.Protocol): pass -# MoveFunction is a Rust-only trait - it's a wrapper around a Rust implementation. -class MoveFunction(): +# PageInfo is a Rust-only trait - it's a wrapper around a Rust implementation. +class PageInfo(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -9926,10 +15220,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_pageinfo, 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_pageinfo, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -9942,21 +15236,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeMoveFunction: +class _UniffiConverterTypePageInfo: @staticmethod def lift(value: int): - return MoveFunction._make_instance_(value) + return PageInfo._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: PageInfo): + if not isinstance(value, PageInfo): + raise TypeError("Expected PageInfo 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: PageInfoProtocol): + if not isinstance(value, PageInfo): + raise TypeError("Expected PageInfo instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -9967,12 +15261,104 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: MoveFunctionProtocol, buf: _UniffiRustBuffer): + def write(cls, value: PageInfoProtocol, 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(): +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): @@ -9982,10 +15368,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_passkeyauthenticator, 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_passkeyauthenticator, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -9997,22 +15383,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. + """ + + 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(),) + ) + + + -class _UniffiConverterTypeMoveModule: + + 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 MoveModule._make_instance_(value) + return PasskeyAuthenticator._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: PasskeyAuthenticator): + if not isinstance(value, PasskeyAuthenticator): + raise TypeError("Expected PasskeyAuthenticator 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: PasskeyAuthenticatorProtocol): + if not isinstance(value, PasskeyAuthenticator): + raise TypeError("Expected PasskeyAuthenticator instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10023,12 +15470,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: MoveModuleProtocol, buf: _UniffiRustBuffer): + def write(cls, value: PasskeyAuthenticatorProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class MovePackageProtocol(typing.Protocol): +class ProgrammableTransactionProtocol(typing.Protocol): pass -# MovePackage is a Rust-only trait - it's a wrapper around a Rust implementation. -class MovePackage(): +# 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): @@ -10038,10 +15485,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_programmabletransaction, 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_programmabletransaction, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10054,21 +15501,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeMovePackage: +class _UniffiConverterTypeProgrammableTransaction: @staticmethod def lift(value: int): - return MovePackage._make_instance_(value) + return ProgrammableTransaction._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: ProgrammableTransaction): + if not isinstance(value, ProgrammableTransaction): + raise TypeError("Expected ProgrammableTransaction 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: ProgrammableTransactionProtocol): + if not isinstance(value, ProgrammableTransaction): + raise TypeError("Expected ProgrammableTransaction instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10079,17 +15526,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: MovePackageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ProgrammableTransactionProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class MovePackagePageProtocol(typing.Protocol): - def data(self, ): - raise NotImplementedError - def is_empty(self, ): - raise NotImplementedError - def page_info(self, ): - raise NotImplementedError -# MovePackagePage is a Rust-only trait - it's a wrapper around a Rust implementation. -class MovePackagePage(): +class ProtocolConfigsProtocol(typing.Protocol): + pass +# 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): @@ -10099,10 +15541,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_movepackagepage, 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_movepackagepage, 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 @@ -10114,49 +15556,22 @@ def _make_instance_(cls, pointer): return inst - def data(self, ) -> "typing.List[MovePackage]": - return _UniffiConverterSequenceTypeMovePackage.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackagepage_data,self._uniffi_clone_pointer(),) - ) - - - - - - def is_empty(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackagepage_is_empty,self._uniffi_clone_pointer(),) - ) - - - - - - def page_info(self, ) -> "PageInfo": - return _UniffiConverterTypePageInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_movepackagepage_page_info,self._uniffi_clone_pointer(),) - ) - - - - - -class _UniffiConverterTypeMovePackagePage: +class _UniffiConverterTypeProtocolConfigs: @staticmethod def lift(value: int): - return MovePackagePage._make_instance_(value) + return ProtocolConfigs._make_instance_(value) @staticmethod - def check_lower(value: MovePackagePage): - if not isinstance(value, MovePackagePage): - raise TypeError("Expected MovePackagePage 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: MovePackagePageProtocol): - if not isinstance(value, MovePackagePage): - raise TypeError("Expected MovePackagePage 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 @@ -10167,12 +15582,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: MovePackagePageProtocol, 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): @@ -10182,10 +15597,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 @@ -10198,21 +15613,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 @@ -10223,110 +15638,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 @@ -10336,109 +15691,149 @@ 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(),) - ) - - - + @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 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 to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256k1publickey_to_bytes,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(),) - ) - - - +class _UniffiConverterTypeSecp256k1PublicKey: - def owner(self, ) -> "Owner": - """ - Return this object's owner - """ + @staticmethod + def lift(value: int): + return Secp256k1PublicKey._make_instance_(value) - return _UniffiConverterTypeOwner.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_owner,self._uniffi_clone_pointer(),) - ) + @staticmethod + def check_lower(value: Secp256k1PublicKey): + if not isinstance(value, Secp256k1PublicKey): + raise TypeError("Expected Secp256k1PublicKey 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__)) + 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: Secp256k1PublicKeyProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class Secp256k1SignatureProtocol(typing.Protocol): + """ + A secp256k1 public key. + # BCS - def previous_transaction(self, ) -> "TransactionDigest": - """ - Return the digest of the transaction that last modified this object - """ + The BCS serialized form for this type is defined by the following ABNF: - return _UniffiConverterTypeTransactionDigest.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_previous_transaction,self._uniffi_clone_pointer(),) - ) + ```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 + ``` + """ - def storage_rebate(self, ) -> "int": - """ - Return the storage rebate locked in this object + _pointer: ctypes.c_void_p + + def __init__(self, *args, **kwargs): + raise ValueError("This class has no default constructor") - Storage rebates are credited to the gas coin used in a transaction that - deletes this object. - """ + 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_secp256k1signature, pointer) - return _UniffiConverterUInt64.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_object_storage_rebate,self._uniffi_clone_pointer(),) - ) + def _uniffi_clone_pointer(self): + 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 + 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_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) - 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_secp256k1signature_to_bytes,self._uniffi_clone_pointer(),) ) @@ -10446,21 +15841,21 @@ def version(self, ) -> "int": -class _UniffiConverterTypeObject: +class _UniffiConverterTypeSecp256k1Signature: @staticmethod def lift(value: int): - return Object._make_instance_(value) + return Secp256k1Signature._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: Secp256k1Signature): + if not isinstance(value, Secp256k1Signature): + raise TypeError("Expected Secp256k1Signature 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: Secp256k1SignatureProtocol): + if not isinstance(value, Secp256k1Signature): + raise TypeError("Expected Secp256k1Signature instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10471,12 +15866,37 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256k1SignatureProtocol, 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 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): @@ -10486,10 +15906,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_secp256r1publickey, 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_secp256r1publickey, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10499,24 +15919,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) -class _UniffiConverterTypeObjectData: + 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 _UniffiConverterTypeSecp256r1PublicKey: @staticmethod def lift(value: int): - return ObjectData._make_instance_(value) + return Secp256r1PublicKey._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: Secp256r1PublicKey): + if not isinstance(value, Secp256r1PublicKey): + raise TypeError("Expected Secp256r1PublicKey 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: Secp256r1PublicKeyProtocol): + if not isinstance(value, Secp256r1PublicKey): + raise TypeError("Expected Secp256r1PublicKey instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10527,12 +15980,37 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectDataProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256r1PublicKeyProtocol, 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 Secp256r1SignatureProtocol(typing.Protocol): + """ + A secp256r1 public key. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + secp256r1-public-key = 33OCTECT + ``` + """ + + def to_bytes(self, ): + raise NotImplementedError +# Secp256r1Signature is a Rust-only trait - it's a wrapper around a Rust implementation. +class Secp256r1Signature(): + """ + A secp256r1 public key. + + # BCS + + The BCS serialized form for this type is defined by the following ABNF: + + ```text + secp256r1-public-key = 33OCTECT + ``` + """ + _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -10542,10 +16020,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_secp256r1signature, 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_secp256r1signature, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10555,24 +16033,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_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) -class _UniffiConverterTypeObjectDigest: + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_secp256r1signature_to_bytes,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeSecp256r1Signature: @staticmethod def lift(value: int): - return ObjectDigest._make_instance_(value) + return Secp256r1Signature._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: Secp256r1Signature): + if not isinstance(value, Secp256r1Signature): + raise TypeError("Expected Secp256r1Signature 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: Secp256r1SignatureProtocol): + if not isinstance(value, Secp256r1Signature): + raise TypeError("Expected Secp256r1Signature instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10583,12 +16094,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectDigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: Secp256r1SignatureProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ObjectFilterProtocol(typing.Protocol): +class ServiceConfigProtocol(typing.Protocol): pass -# ObjectFilter is a Rust-only trait - it's a wrapper around a Rust implementation. -class ObjectFilter(): +# 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): @@ -10598,10 +16109,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_objectfilter, 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_objectfilter, 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 @@ -10614,21 +16125,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeObjectFilter: +class _UniffiConverterTypeServiceConfig: @staticmethod def lift(value: int): - return ObjectFilter._make_instance_(value) + return ServiceConfig._make_instance_(value) @staticmethod - def check_lower(value: ObjectFilter): - if not isinstance(value, ObjectFilter): - raise TypeError("Expected ObjectFilter 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: ObjectFilterProtocol): - if not isinstance(value, ObjectFilter): - raise TypeError("Expected ObjectFilter 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 @@ -10639,72 +16150,33 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectFilterProtocol, 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. - - ## 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: - - ```text - object-id = 32*OCTET - ``` - """ - - 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. - - ## 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: - - ```text - object-id = 32*OCTET - ``` - """ - + def write(cls, value: ServiceConfigProtocol, buf: _UniffiRustBuffer): + buf.write_u64(cls.lower(value)) +class SignedTransactionProtocol(typing.Protocol): + def signatures(self, ): + raise NotImplementedError + def transaction(self, ): + raise NotImplementedError +# SignedTransaction is a Rust-only trait - it's a wrapper around a Rust implementation. +class SignedTransaction(): _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def __init__(self, transaction: "Transaction",signatures: "typing.List[UserSignature]"): + _UniffiConverterTypeTransaction.check_lower(transaction) + + _UniffiConverterSequenceTypeUserSignature.check_lower(signatures) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_signedtransaction_new, + _UniffiConverterTypeTransaction.lower(transaction), + _UniffiConverterSequenceTypeUserSignature.lower(signatures)) 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_signedtransaction, 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_signedtransaction, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10714,47 +16186,20 @@ 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(_UniffiConverterTypeBindingsSdkError,_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(_UniffiConverterTypeBindingsSdkError,_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(),) - ) - - - - 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 signatures(self, ) -> "typing.List[UserSignature]": + return _UniffiConverterSequenceTypeUserSignature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_signedtransaction_signatures,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(),) + def transaction(self, ) -> "Transaction": + return _UniffiConverterTypeTransaction.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_signedtransaction_transaction,self._uniffi_clone_pointer(),) ) @@ -10762,21 +16207,21 @@ def to_hex(self, ) -> "str": -class _UniffiConverterTypeObjectId: +class _UniffiConverterTypeSignedTransaction: @staticmethod def lift(value: int): - return ObjectId._make_instance_(value) + return SignedTransaction._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: SignedTransaction): + if not isinstance(value, SignedTransaction): + raise TypeError("Expected SignedTransaction 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: SignedTransactionProtocol): + if not isinstance(value, SignedTransaction): + raise TypeError("Expected SignedTransaction instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10787,17 +16232,17 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectIdProtocol, buf: _UniffiRustBuffer): + def write(cls, value: SignedTransactionProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ObjectPageProtocol(typing.Protocol): +class SignedTransactionPageProtocol(typing.Protocol): def data(self, ): raise NotImplementedError def is_empty(self, ): raise NotImplementedError def page_info(self, ): raise NotImplementedError -# ObjectPage is a Rust-only trait - it's a wrapper around a Rust implementation. -class ObjectPage(): +# SignedTransactionPage is a Rust-only trait - it's a wrapper around a Rust implementation. +class SignedTransactionPage(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -10807,10 +16252,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_objectpage, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_signedtransactionpage, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_objectpage, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_signedtransactionpage, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10822,9 +16267,9 @@ def _make_instance_(cls, pointer): return inst - def data(self, ) -> "typing.List[Object]": - return _UniffiConverterSequenceTypeObject.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectpage_data,self._uniffi_clone_pointer(),) + def data(self, ) -> "typing.List[SignedTransaction]": + return _UniffiConverterSequenceTypeSignedTransaction.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_signedtransactionpage_data,self._uniffi_clone_pointer(),) ) @@ -10833,7 +16278,7 @@ def data(self, ) -> "typing.List[Object]": def is_empty(self, ) -> "bool": return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectpage_is_empty,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_signedtransactionpage_is_empty,self._uniffi_clone_pointer(),) ) @@ -10842,7 +16287,7 @@ def is_empty(self, ) -> "bool": def page_info(self, ) -> "PageInfo": return _UniffiConverterTypePageInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_objectpage_page_info,self._uniffi_clone_pointer(),) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_signedtransactionpage_page_info,self._uniffi_clone_pointer(),) ) @@ -10850,21 +16295,21 @@ def page_info(self, ) -> "PageInfo": -class _UniffiConverterTypeObjectPage: +class _UniffiConverterTypeSignedTransactionPage: @staticmethod def lift(value: int): - return ObjectPage._make_instance_(value) + return SignedTransactionPage._make_instance_(value) @staticmethod - def check_lower(value: ObjectPage): - if not isinstance(value, ObjectPage): - raise TypeError("Expected ObjectPage instance, {} found".format(type(value).__name__)) + def check_lower(value: SignedTransactionPage): + if not isinstance(value, SignedTransactionPage): + raise TypeError("Expected SignedTransactionPage instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: ObjectPageProtocol): - if not isinstance(value, ObjectPage): - raise TypeError("Expected ObjectPage instance, {} found".format(type(value).__name__)) + def lower(value: SignedTransactionPageProtocol): + if not isinstance(value, SignedTransactionPage): + raise TypeError("Expected SignedTransactionPage instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -10875,12 +16320,95 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ObjectPageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: SignedTransactionPageProtocol, 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(): +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): @@ -10890,10 +16418,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_simplesignature, 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_simplesignature, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -10905,190 +16433,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(),) + ) -class _UniffiConverterTypeObjectRef: - @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) + 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(),) + ) + + + + + + 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(),) + ) + + + - @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") - 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 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 _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 -class _UniffiConverterTypeObjectType: + 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(),) + ) - @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() - @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: 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 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 __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 + 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(),) + ) -class _UniffiConverterTypeOwner: - @staticmethod - def lift(value: int): - return Owner._make_instance_(value) - @staticmethod - def check_lower(value: Owner): - if not isinstance(value, Owner): - raise TypeError("Expected Owner 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__)) - return value._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(),) + ) - @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: OwnerProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class PageInfoProtocol(typing.Protocol): - pass -# PageInfo is a Rust-only trait - it's a wrapper around a Rust implementation. -class PageInfo(): - _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_pageinfo, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_pageinfo, 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 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 _UniffiConverterTypePageInfo: + + +class _UniffiConverterTypeSimpleSignature: @staticmethod def lift(value: int): - return PageInfo._make_instance_(value) + return SimpleSignature._make_instance_(value) @staticmethod - def check_lower(value: PageInfo): - if not isinstance(value, PageInfo): - raise TypeError("Expected PageInfo 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: PageInfoProtocol): - if not isinstance(value, PageInfo): - raise TypeError("Expected PageInfo 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 @@ -11099,25 +16612,71 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: PageInfoProtocol, buf: _UniffiRustBuffer): + def write(cls, value: SimpleSignatureProtocol, 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 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_programmabletransaction, 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_programmabletransaction, 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 @@ -11129,78 +16688,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(),) + ) + + -class _UniffiConverterTypeProgrammableTransaction: - @staticmethod - def lift(value: int): - return ProgrammableTransaction._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 gas_payment(self, ) -> "GasPayment": + return _UniffiConverterTypeGasPayment.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_gas_payment,self._uniffi_clone_pointer(),) + ) - @staticmethod - 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 - 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: ProgrammableTransactionProtocol, 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(): - _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_protocolconfigs, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_protocolconfigs, self._pointer) + def kind(self, ) -> "TransactionKind": + return _UniffiConverterTypeTransactionKind.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_kind,self._uniffi_clone_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 _UniffiConverterTypeProtocolConfigs: + + def sender(self, ) -> "Address": + return _UniffiConverterTypeAddress.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transaction_sender,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeTransaction: @staticmethod def lift(value: int): - return ProtocolConfigs._make_instance_(value) + return Transaction._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: Transaction): + if not isinstance(value, Transaction): + raise TypeError("Expected Transaction 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: TransactionProtocol): + if not isinstance(value, Transaction): + raise TypeError("Expected Transaction instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11211,25 +16750,33 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ProtocolConfigsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionProtocol, 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 TransactionDataEffectsProtocol(typing.Protocol): + def effects(self, ): + raise NotImplementedError + def tx(self, ): + raise NotImplementedError +# TransactionDataEffects is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionDataEffects(): _pointer: ctypes.c_void_p - - def __init__(self, *args, **kwargs): - raise ValueError("This class has no default constructor") + def __init__(self, tx: "SignedTransaction",effects: "TransactionEffects"): + _UniffiConverterTypeSignedTransaction.check_lower(tx) + + _UniffiConverterTypeTransactionEffects.check_lower(effects) + + self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondataeffects_new, + _UniffiConverterTypeSignedTransaction.lower(tx), + _UniffiConverterTypeTransactionEffects.lower(effects)) 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_transactiondataeffects, 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_transactiondataeffects, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11241,22 +16788,40 @@ def _make_instance_(cls, pointer): return inst + def effects(self, ) -> "TransactionEffects": + return _UniffiConverterTypeTransactionEffects.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondataeffects_effects,self._uniffi_clone_pointer(),) + ) + + + + + + def tx(self, ) -> "SignedTransaction": + return _UniffiConverterTypeSignedTransaction.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondataeffects_tx,self._uniffi_clone_pointer(),) + ) + + -class _UniffiConverterTypeRandomnessStateUpdate: + + + +class _UniffiConverterTypeTransactionDataEffects: @staticmethod def lift(value: int): - return RandomnessStateUpdate._make_instance_(value) + return TransactionDataEffects._make_instance_(value) @staticmethod - def check_lower(value: RandomnessStateUpdate): - if not isinstance(value, RandomnessStateUpdate): - raise TypeError("Expected RandomnessStateUpdate instance, {} found".format(type(value).__name__)) + def check_lower(value: TransactionDataEffects): + if not isinstance(value, TransactionDataEffects): + raise TypeError("Expected TransactionDataEffects 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__)) + def lower(value: TransactionDataEffectsProtocol): + if not isinstance(value, TransactionDataEffects): + raise TypeError("Expected TransactionDataEffects instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11267,37 +16832,17 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: RandomnessStateUpdateProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionDataEffectsProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class Secp256k1PublicKeyProtocol(typing.Protocol): - """ - A secp256k1 signature. - - # BCS - - The BCS serialized form for this type is defined by the following ABNF: - - ```text - secp256k1-signature = 64OCTECT - ``` - """ - - def to_bytes(self, ): +class TransactionDataEffectsPageProtocol(typing.Protocol): + def data(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 - ``` - """ - + def is_empty(self, ): + raise NotImplementedError + def page_info(self, ): + raise NotImplementedError +# TransactionDataEffectsPage is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionDataEffectsPage(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -11307,10 +16852,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_transactiondataeffectspage, 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_transactiondataeffectspage, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11320,57 +16865,51 @@ 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(_UniffiConverterTypeBindingsSdkError,_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(_UniffiConverterTypeBindingsSdkError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256k1publickey_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_secp256k1publickey_generate,) - return cls._make_instance_(pointer) + def data(self, ) -> "typing.List[TransactionDataEffects]": + return _UniffiConverterSequenceTypeTransactionDataEffects.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondataeffectspage_data,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(),) + + + def is_empty(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondataeffectspage_is_empty,self._uniffi_clone_pointer(),) ) + def page_info(self, ) -> "PageInfo": + return _UniffiConverterTypePageInfo.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondataeffectspage_page_info,self._uniffi_clone_pointer(),) + ) -class _UniffiConverterTypeSecp256k1PublicKey: + + + + + +class _UniffiConverterTypeTransactionDataEffectsPage: @staticmethod def lift(value: int): - return Secp256k1PublicKey._make_instance_(value) + return TransactionDataEffectsPage._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: TransactionDataEffectsPage): + if not isinstance(value, TransactionDataEffectsPage): + raise TypeError("Expected TransactionDataEffectsPage 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: TransactionDataEffectsPageProtocol): + if not isinstance(value, TransactionDataEffectsPage): + raise TypeError("Expected TransactionDataEffectsPage instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11381,37 +16920,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: Secp256k1PublicKeyProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionDataEffectsPageProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -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 - ``` - """ - +class TransactionDigestProtocol(typing.Protocol): + def to_base58(self, ): + raise NotImplementedError 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 - ``` - """ - +# 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): @@ -11421,10 +16938,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_transactiondigest, 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_transactiondigest, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11435,112 +16952,65 @@ 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(_UniffiConverterTypeBindingsSdkError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_bytes, - _UniffiConverterBytes.lower(bytes)) + 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_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(_UniffiConverterTypeBindingsSdkError,_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_secp256r1publickey_from_str, - _UniffiConverterString.lower(s)) + 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_secp256r1publickey_generate,) + pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondigest_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(),) + 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 _UniffiConverterTypeSecp256r1PublicKey: - - @staticmethod - def lift(value: int): - return Secp256r1PublicKey._make_instance_(value) - - @staticmethod - def check_lower(value: Secp256r1PublicKey): - if not isinstance(value, Secp256r1PublicKey): - raise TypeError("Expected Secp256r1PublicKey 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__)) - 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: Secp256r1PublicKeyProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class ServiceConfigProtocol(typing.Protocol): - pass -# 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): - 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_serviceconfig, pointer) - def _uniffi_clone_pointer(self): - 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 - 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 _UniffiConverterTypeServiceConfig: +class _UniffiConverterTypeTransactionDigest: @staticmethod def lift(value: int): - return ServiceConfig._make_instance_(value) + return TransactionDigest._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: TransactionDigest): + if not isinstance(value, TransactionDigest): + raise TypeError("Expected TransactionDigest 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: TransactionDigestProtocol): + if not isinstance(value, TransactionDigest): + raise TypeError("Expected TransactionDigest instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11551,33 +17021,25 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ServiceConfigProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class SignedTransactionProtocol(typing.Protocol): - def signatures(self, ): - raise NotImplementedError - def transaction(self, ): - raise NotImplementedError -# SignedTransaction is a Rust-only trait - it's a wrapper around a Rust implementation. -class SignedTransaction(): +class TransactionEffectsProtocol(typing.Protocol): + pass +# TransactionEffects is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionEffects(): _pointer: ctypes.c_void_p - def __init__(self, transaction: "Transaction",signatures: "typing.List[UserSignature]"): - _UniffiConverterTypeTransaction.check_lower(transaction) - - _UniffiConverterSequenceTypeUserSignature.check_lower(signatures) - - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_signedtransaction_new, - _UniffiConverterTypeTransaction.lower(transaction), - _UniffiConverterSequenceTypeUserSignature.lower(signatures)) + + 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_signedtransaction, 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_signedtransaction, 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 @@ -11589,40 +17051,22 @@ def _make_instance_(cls, pointer): return inst - def signatures(self, ) -> "typing.List[UserSignature]": - return _UniffiConverterSequenceTypeUserSignature.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_signedtransaction_signatures,self._uniffi_clone_pointer(),) - ) - - - - - def transaction(self, ) -> "Transaction": - return _UniffiConverterTypeTransaction.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_signedtransaction_transaction,self._uniffi_clone_pointer(),) - ) - - - - - - -class _UniffiConverterTypeSignedTransaction: +class _UniffiConverterTypeTransactionEffects: @staticmethod def lift(value: int): - return SignedTransaction._make_instance_(value) + return TransactionEffects._make_instance_(value) @staticmethod - def check_lower(value: SignedTransaction): - if not isinstance(value, SignedTransaction): - raise TypeError("Expected SignedTransaction 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: SignedTransactionProtocol): - if not isinstance(value, SignedTransaction): - raise TypeError("Expected SignedTransaction 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 @@ -11633,17 +17077,15 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: SignedTransactionProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionEffectsProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class SignedTransactionPageProtocol(typing.Protocol): - def data(self, ): - raise NotImplementedError - def is_empty(self, ): +class TransactionEffectsDigestProtocol(typing.Protocol): + def to_base58(self, ): raise NotImplementedError - def page_info(self, ): + def to_bytes(self, ): raise NotImplementedError -# SignedTransactionPage is a Rust-only trait - it's a wrapper around a Rust implementation. -class SignedTransactionPage(): +# 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): @@ -11653,10 +17095,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_signedtransactionpage, 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_signedtransactionpage, 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 @@ -11666,29 +17108,44 @@ 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) - def data(self, ) -> "typing.List[SignedTransaction]": - return _UniffiConverterSequenceTypeSignedTransaction.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_signedtransactionpage_data,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_transactioneffectsdigest_generate,) + return cls._make_instance_(pointer) - def is_empty(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_signedtransactionpage_is_empty,self._uniffi_clone_pointer(),) + 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(),) ) - def page_info(self, ) -> "PageInfo": - return _UniffiConverterTypePageInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_signedtransactionpage_page_info,self._uniffi_clone_pointer(),) + 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(),) ) @@ -11696,21 +17153,21 @@ def page_info(self, ) -> "PageInfo": -class _UniffiConverterTypeSignedTransactionPage: +class _UniffiConverterTypeTransactionEffectsDigest: @staticmethod def lift(value: int): - return SignedTransactionPage._make_instance_(value) + return TransactionEffectsDigest._make_instance_(value) @staticmethod - def check_lower(value: SignedTransactionPage): - if not isinstance(value, SignedTransactionPage): - raise TypeError("Expected SignedTransactionPage instance, {} found".format(type(value).__name__)) + def check_lower(value: TransactionEffectsDigest): + if not isinstance(value, TransactionEffectsDigest): + raise TypeError("Expected TransactionEffectsDigest instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: SignedTransactionPageProtocol): - if not isinstance(value, SignedTransactionPage): - raise TypeError("Expected SignedTransactionPage instance, {} found".format(type(value).__name__)) + 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 @@ -11721,71 +17178,30 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: SignedTransactionPageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionEffectsDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -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, ): +class TransactionEffectsPageProtocol(typing.Protocol): + def data(self, ): raise NotImplementedError - def kind(self, ): + def is_empty(self, ): raise NotImplementedError - def sender(self, ): + def page_info(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 - ``` - """ - +# TransactionEffectsPage is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionEffectsPage(): _pointer: ctypes.c_void_p - 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 __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_transaction, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactioneffectspage, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transaction, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneffectspage, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11797,36 +17213,27 @@ 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 data(self, ) -> "typing.List[TransactionEffects]": + return _UniffiConverterSequenceTypeTransactionEffects.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectspage_data,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 is_empty(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectspage_is_empty,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(),) + def page_info(self, ) -> "PageInfo": + return _UniffiConverterTypePageInfo.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectspage_page_info,self._uniffi_clone_pointer(),) ) @@ -11834,21 +17241,21 @@ def sender(self, ) -> "Address": -class _UniffiConverterTypeTransaction: +class _UniffiConverterTypeTransactionEffectsPage: @staticmethod def lift(value: int): - return Transaction._make_instance_(value) + return TransactionEffectsPage._make_instance_(value) @staticmethod - def check_lower(value: Transaction): - if not isinstance(value, Transaction): - raise TypeError("Expected Transaction instance, {} found".format(type(value).__name__)) + def check_lower(value: TransactionEffectsPage): + if not isinstance(value, TransactionEffectsPage): + raise TypeError("Expected TransactionEffectsPage instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransactionProtocol): - if not isinstance(value, Transaction): - raise TypeError("Expected Transaction instance, {} found".format(type(value).__name__)) + def lower(value: TransactionEffectsPageProtocol): + if not isinstance(value, TransactionEffectsPage): + raise TypeError("Expected TransactionEffectsPage instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -11859,33 +17266,28 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TransactionProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionEffectsPageProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionDataEffectsProtocol(typing.Protocol): - def effects(self, ): +class TransactionEventsDigestProtocol(typing.Protocol): + def to_base58(self, ): raise NotImplementedError - def tx(self, ): + def to_bytes(self, ): raise NotImplementedError -# TransactionDataEffects is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionDataEffects(): +# TransactionEventsDigest is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionEventsDigest(): _pointer: ctypes.c_void_p - def __init__(self, tx: "SignedTransaction",effects: "TransactionEffects"): - _UniffiConverterTypeSignedTransaction.check_lower(tx) - - _UniffiConverterTypeTransactionEffects.check_lower(effects) - - self._pointer = _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_constructor_transactiondataeffects_new, - _UniffiConverterTypeSignedTransaction.lower(tx), - _UniffiConverterTypeTransactionEffects.lower(effects)) + + 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_transactiondataeffects, 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_transactiondataeffects, 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 @@ -11895,20 +17297,44 @@ 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_transactioneventsdigest_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_transactioneventsdigest_from_bytes, + _UniffiConverterBytes.lower(bytes)) + return cls._make_instance_(pointer) - def effects(self, ) -> "TransactionEffects": - return _UniffiConverterTypeTransactionEffects.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondataeffects_effects,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_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 tx(self, ) -> "SignedTransaction": - return _UniffiConverterTypeSignedTransaction.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondataeffects_tx,self._uniffi_clone_pointer(),) + def to_bytes(self, ) -> "bytes": + return _UniffiConverterBytes.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventsdigest_to_bytes,self._uniffi_clone_pointer(),) ) @@ -11916,21 +17342,21 @@ def tx(self, ) -> "SignedTransaction": -class _UniffiConverterTypeTransactionDataEffects: +class _UniffiConverterTypeTransactionEventsDigest: @staticmethod def lift(value: int): - return TransactionDataEffects._make_instance_(value) + return TransactionEventsDigest._make_instance_(value) @staticmethod - def check_lower(value: TransactionDataEffects): - if not isinstance(value, TransactionDataEffects): - raise TypeError("Expected TransactionDataEffects 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: TransactionDataEffectsProtocol): - if not isinstance(value, TransactionDataEffects): - raise TypeError("Expected TransactionDataEffects 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 @@ -11941,17 +17367,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TransactionDataEffectsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionEventsDigestProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionDataEffectsPageProtocol(typing.Protocol): - def data(self, ): - raise NotImplementedError - def is_empty(self, ): - raise NotImplementedError - def page_info(self, ): - raise NotImplementedError -# TransactionDataEffectsPage is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionDataEffectsPage(): +class TransactionExpirationProtocol(typing.Protocol): + pass +# TransactionExpiration is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionExpiration(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -11961,10 +17382,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_transactiondataeffectspage, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_transactionexpiration, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactiondataeffectspage, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionexpiration, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -11976,49 +17397,22 @@ def _make_instance_(cls, pointer): return inst - def data(self, ) -> "typing.List[TransactionDataEffects]": - return _UniffiConverterSequenceTypeTransactionDataEffects.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondataeffectspage_data,self._uniffi_clone_pointer(),) - ) - - - - - - def is_empty(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondataeffectspage_is_empty,self._uniffi_clone_pointer(),) - ) - - - - - - def page_info(self, ) -> "PageInfo": - return _UniffiConverterTypePageInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactiondataeffectspage_page_info,self._uniffi_clone_pointer(),) - ) - - - - - -class _UniffiConverterTypeTransactionDataEffectsPage: +class _UniffiConverterTypeTransactionExpiration: @staticmethod def lift(value: int): - return TransactionDataEffectsPage._make_instance_(value) + return TransactionExpiration._make_instance_(value) @staticmethod - def check_lower(value: TransactionDataEffectsPage): - if not isinstance(value, TransactionDataEffectsPage): - raise TypeError("Expected TransactionDataEffectsPage instance, {} found".format(type(value).__name__)) + def check_lower(value: TransactionExpiration): + if not isinstance(value, TransactionExpiration): + raise TypeError("Expected TransactionExpiration instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransactionDataEffectsPageProtocol): - if not isinstance(value, TransactionDataEffectsPage): - raise TypeError("Expected TransactionDataEffectsPage instance, {} found".format(type(value).__name__)) + def lower(value: TransactionExpirationProtocol): + if not isinstance(value, TransactionExpiration): + raise TypeError("Expected TransactionExpiration instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -12029,12 +17423,52 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TransactionDataEffectsPageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionExpirationProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionDigestProtocol(typing.Protocol): +class TransactionKindProtocol(typing.Protocol): + """ + Transaction type + + # 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 + ``` + """ + pass -# TransactionDigest is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionDigest(): +# TransactionKind is a Rust-only trait - it's a wrapper around a Rust implementation. +class TransactionKind(): + """ + Transaction type + + # 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 + ``` + """ + _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -12044,10 +17478,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_transactiondigest, 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_transactiondigest, 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 @@ -12057,24 +17491,78 @@ 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) + + @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) -class _UniffiConverterTypeTransactionDigest: + +class _UniffiConverterTypeTransactionKind: @staticmethod def lift(value: int): - return TransactionDigest._make_instance_(value) + return TransactionKind._make_instance_(value) @staticmethod - def check_lower(value: TransactionDigest): - if not isinstance(value, TransactionDigest): - raise TypeError("Expected TransactionDigest 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: TransactionDigestProtocol): - if not isinstance(value, TransactionDigest): - raise TypeError("Expected TransactionDigest 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 @@ -12085,12 +17573,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TransactionDigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TransactionKindProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionEffectsProtocol(typing.Protocol): +class TypeTagProtocol(typing.Protocol): pass -# TransactionEffects is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionEffects(): +# 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): @@ -12100,10 +17588,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_typetag, 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_typetag, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -12116,21 +17604,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeTransactionEffects: +class _UniffiConverterTypeTypeTag: @staticmethod def lift(value: int): - return TransactionEffects._make_instance_(value) + return TypeTag._make_instance_(value) @staticmethod - def check_lower(value: TransactionEffects): - if not isinstance(value, TransactionEffects): - raise TypeError("Expected TransactionEffects 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: TransactionEffectsProtocol): - if not isinstance(value, TransactionEffects): - raise TypeError("Expected TransactionEffects 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 @@ -12141,73 +17629,89 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TransactionEffectsProtocol, buf: _UniffiRustBuffer): + def write(cls, value: TypeTagProtocol, 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") +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_transactioneffectsdigest, 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_transactioneffectsdigest, 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. + """ -class _UniffiConverterTypeTransactionEffectsDigest: + 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 + """ - @staticmethod - def lift(value: int): - return TransactionEffectsDigest._make_instance_(value) + 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 - @staticmethod - def check_lower(value: TransactionEffectsDigest): - if not isinstance(value, TransactionEffectsDigest): - raise TypeError("Expected TransactionEffectsDigest instance, {} found".format(type(value).__name__)) + A `UserSignature` is most commonly used to authorize the execution and + inclusion of a transaction to the blockchain. - @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() + # BCS - @classmethod - def read(cls, buf: _UniffiRustBuffer): - ptr = buf.read_u64() - if ptr == 0: - raise InternalError("Raw pointer value was null") - return cls.lift(ptr) + 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. + """ - @classmethod - def write(cls, value: TransactionEffectsDigestProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class TransactionEffectsPageProtocol(typing.Protocol): - def data(self, ): - raise NotImplementedError - def is_empty(self, ): - raise NotImplementedError - def page_info(self, ): - raise NotImplementedError -# TransactionEffectsPage is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionEffectsPage(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -12217,10 +17721,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_transactioneffectspage, 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_transactioneffectspage, 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 @@ -12230,173 +17734,159 @@ def _make_instance_(cls, pointer): inst = cls.__new__(cls) inst._pointer = pointer return inst + @classmethod + 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_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 data(self, ) -> "typing.List[TransactionEffects]": - return _UniffiConverterSequenceTypeTransactionEffects.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectspage_data,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_empty(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectspage_is_empty,self._uniffi_clone_pointer(),) + 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 page_info(self, ) -> "PageInfo": - return _UniffiConverterTypePageInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneffectspage_page_info,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(),) + ) -class _UniffiConverterTypeTransactionEffectsPage: - @staticmethod - def lift(value: int): - return TransactionEffectsPage._make_instance_(value) - @staticmethod - def check_lower(value: TransactionEffectsPage): - if not isinstance(value, TransactionEffectsPage): - raise TypeError("Expected TransactionEffectsPage instance, {} found".format(type(value).__name__)) - @staticmethod - def lower(value: TransactionEffectsPageProtocol): - if not isinstance(value, TransactionEffectsPage): - raise TypeError("Expected TransactionEffectsPage 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 as_simple(self, ) -> "SimpleSignature": + return _UniffiConverterTypeSimpleSignature.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_usersignature_as_simple,self._uniffi_clone_pointer(),) + ) - @classmethod - def write(cls, value: TransactionEffectsPageProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class TransactionEventProtocol(typing.Protocol): - pass -# TransactionEvent is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionEvent(): - _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_transactionevent, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionevent, 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_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(),) + ) -class _UniffiConverterTypeTransactionEvent: - @staticmethod - def lift(value: int): - return TransactionEvent._make_instance_(value) - @staticmethod - def check_lower(value: TransactionEvent): - if not isinstance(value, TransactionEvent): - raise TypeError("Expected TransactionEvent instance, {} found".format(type(value).__name__)) - @staticmethod - def lower(value: TransactionEventProtocol): - if not isinstance(value, TransactionEvent): - raise TypeError("Expected TransactionEvent instance, {} found".format(type(value).__name__)) - return value._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(),) + ) - @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: TransactionEventProtocol, buf: _UniffiRustBuffer): - buf.write_u64(cls.lower(value)) -class TransactionEventPageProtocol(typing.Protocol): - def data(self, ): - raise NotImplementedError - def is_empty(self, ): - raise NotImplementedError - def page_info(self, ): - raise NotImplementedError -# TransactionEventPage is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionEventPage(): - _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_transactioneventpage, pointer) - def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactioneventpage, 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_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_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(),) + ) + + + + + + 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(),) + ) + + + - def data(self, ) -> "typing.List[TransactionEvent]": - return _UniffiConverterSequenceTypeTransactionEvent.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventpage_data,self._uniffi_clone_pointer(),) + 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 is_empty(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventpage_is_empty,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(),) ) - def page_info(self, ) -> "PageInfo": - return _UniffiConverterTypePageInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_transactioneventpage_page_info,self._uniffi_clone_pointer(),) + 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(),) ) @@ -12404,21 +17894,21 @@ def page_info(self, ) -> "PageInfo": -class _UniffiConverterTypeTransactionEventPage: +class _UniffiConverterTypeUserSignature: @staticmethod def lift(value: int): - return TransactionEventPage._make_instance_(value) + return UserSignature._make_instance_(value) @staticmethod - def check_lower(value: TransactionEventPage): - if not isinstance(value, TransactionEventPage): - raise TypeError("Expected TransactionEventPage 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: TransactionEventPageProtocol): - if not isinstance(value, TransactionEventPage): - raise TypeError("Expected TransactionEventPage 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 @@ -12429,12 +17919,12 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TransactionEventPageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: UserSignatureProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionEventsDigestProtocol(typing.Protocol): +class ValidatorProtocol(typing.Protocol): pass -# TransactionEventsDigest is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionEventsDigest(): +# Validator is a Rust-only trait - it's a wrapper around a Rust implementation. +class Validator(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -12444,10 +17934,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_transactioneventsdigest, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validator, 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_validator, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -12460,21 +17950,21 @@ def _make_instance_(cls, pointer): -class _UniffiConverterTypeTransactionEventsDigest: +class _UniffiConverterTypeValidator: @staticmethod def lift(value: int): - return TransactionEventsDigest._make_instance_(value) + return Validator._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: Validator): + if not isinstance(value, Validator): + raise TypeError("Expected Validator 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: ValidatorProtocol): + if not isinstance(value, Validator): + raise TypeError("Expected Validator instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -12485,12 +17975,17 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TransactionEventsDigestProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ValidatorProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionExpirationProtocol(typing.Protocol): - pass -# TransactionExpiration is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionExpiration(): +class ValidatorPageProtocol(typing.Protocol): + def data(self, ): + raise NotImplementedError + def is_empty(self, ): + raise NotImplementedError + def page_info(self, ): + raise NotImplementedError +# ValidatorPage is a Rust-only trait - it's a wrapper around a Rust implementation. +class ValidatorPage(): _pointer: ctypes.c_void_p def __init__(self, *args, **kwargs): @@ -12500,10 +17995,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_transactionexpiration, pointer) + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_free_validatorpage, pointer) def _uniffi_clone_pointer(self): - return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_transactionexpiration, self._pointer) + return _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_clone_validatorpage, self._pointer) # Used by alternative constructors or any methods which return this type. @classmethod @@ -12515,22 +18010,49 @@ def _make_instance_(cls, pointer): return inst + def data(self, ) -> "typing.List[Validator]": + return _UniffiConverterSequenceTypeValidator.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorpage_data,self._uniffi_clone_pointer(),) + ) + + -class _UniffiConverterTypeTransactionExpiration: + + + def is_empty(self, ) -> "bool": + return _UniffiConverterBool.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorpage_is_empty,self._uniffi_clone_pointer(),) + ) + + + + + + def page_info(self, ) -> "PageInfo": + return _UniffiConverterTypePageInfo.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorpage_page_info,self._uniffi_clone_pointer(),) + ) + + + + + + +class _UniffiConverterTypeValidatorPage: @staticmethod def lift(value: int): - return TransactionExpiration._make_instance_(value) + return ValidatorPage._make_instance_(value) @staticmethod - def check_lower(value: TransactionExpiration): - if not isinstance(value, TransactionExpiration): - raise TypeError("Expected TransactionExpiration instance, {} found".format(type(value).__name__)) + def check_lower(value: ValidatorPage): + if not isinstance(value, ValidatorPage): + raise TypeError("Expected ValidatorPage instance, {} found".format(type(value).__name__)) @staticmethod - def lower(value: TransactionExpirationProtocol): - if not isinstance(value, TransactionExpiration): - raise TypeError("Expected TransactionExpiration instance, {} found".format(type(value).__name__)) + def lower(value: ValidatorPageProtocol): + if not isinstance(value, ValidatorPage): + raise TypeError("Expected ValidatorPage instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -12541,175 +18063,82 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TransactionExpirationProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ValidatorPageProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class TransactionKindProtocol(typing.Protocol): +class ZkLoginAuthenticatorProtocol(typing.Protocol): """ - Transaction type + A zklogin authenticator # 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-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. """ - pass -# TransactionKind is a Rust-only trait - it's a wrapper around a Rust implementation. -class TransactionKind(): + 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(): """ - Transaction type + A zklogin authenticator # 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 - ``` - """ - - _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_transactionkind, pointer) - - def _uniffi_clone_pointer(self): - 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 - 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_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) - - @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) - - - - -class _UniffiConverterTypeTransactionKind: - - @staticmethod - def lift(value: int): - return TransactionKind._make_instance_(value) - - @staticmethod - def check_lower(value: TransactionKind): - if not isinstance(value, TransactionKind): - raise TypeError("Expected TransactionKind 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__)) - return value._uniffi_clone_pointer() + ```text + zklogin-bcs = bytes ; contents are defined by + zklogin = zklogin-flag + zklogin-inputs + u64 ; max epoch + simple-signature + ``` - @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: TransactionKindProtocol, 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(): _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_typetag, 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_typetag, 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 @@ -12721,22 +18150,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 _UniffiConverterTypeTypeTag: + + + + + 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 TypeTag._make_instance_(value) + return ZkLoginAuthenticator._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: ZkLoginAuthenticator): + if not isinstance(value, ZkLoginAuthenticator): + raise TypeError("Expected ZkLoginAuthenticator 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: ZkLoginAuthenticatorProtocol): + if not isinstance(value, ZkLoginAuthenticator): + raise TypeError("Expected ZkLoginAuthenticator instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -12747,25 +18203,75 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: TypeTagProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ZkLoginAuthenticatorProtocol, 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 ZkLoginInputsProtocol(typing.Protocol): + """ + 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 + ``` + """ + + 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(): + """ + 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 + ``` + """ + _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_usersignature, 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_usersignature, 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 @@ -12777,22 +18283,58 @@ 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_zklogininputs_address_seed,self._uniffi_clone_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(),) + ) + + + + + + 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 _UniffiConverterTypeUserSignature: + + + +class _UniffiConverterTypeZkLoginInputs: @staticmethod def lift(value: int): - return UserSignature._make_instance_(value) + return ZkLoginInputs._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: ZkLoginInputs): + if not isinstance(value, ZkLoginInputs): + raise TypeError("Expected ZkLoginInputs 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: ZkLoginInputsProtocol): + if not isinstance(value, ZkLoginInputs): + raise TypeError("Expected ZkLoginInputs instance, {} found".format(type(value).__name__)) return value._uniffi_clone_pointer() @classmethod @@ -12803,25 +18345,62 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: UserSignatureProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ZkLoginInputsProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ValidatorProtocol(typing.Protocol): - pass -# Validator is a Rust-only trait - it's a wrapper around a Rust implementation. -class Validator(): +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_validator, 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_validator, 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 @@ -12833,22 +18412,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(),) + ) -class _UniffiConverterTypeValidator: + + + + + def b(self, ) -> "CircomG2": + return _UniffiConverterTypeCircomG2.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginproof_b,self._uniffi_clone_pointer(),) + ) + + + + + + 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 Validator._make_instance_(value) + return ZkLoginProof._make_instance_(value) @staticmethod - def check_lower(value: Validator): - if not isinstance(value, Validator): - raise TypeError("Expected Validator 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: ValidatorProtocol): - if not isinstance(value, Validator): - raise TypeError("Expected Validator 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 @@ -12859,30 +18465,143 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ValidatorProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ZkLoginProofProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) -class ValidatorPageProtocol(typing.Protocol): - def data(self, ): - raise NotImplementedError - def is_empty(self, ): +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 page_info(self, ): + def iss(self, ): raise NotImplementedError -# ValidatorPage is a Rust-only trait - it's a wrapper around a Rust implementation. -class ValidatorPage(): +# 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_validatorpage, 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_validatorpage, 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 @@ -12894,27 +18613,18 @@ def _make_instance_(cls, pointer): return inst - def data(self, ) -> "typing.List[Validator]": - return _UniffiConverterSequenceTypeValidator.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorpage_data,self._uniffi_clone_pointer(),) - ) - - - - - - def is_empty(self, ) -> "bool": - return _UniffiConverterBool.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorpage_is_empty,self._uniffi_clone_pointer(),) + 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(),) ) - def page_info(self, ) -> "PageInfo": - return _UniffiConverterTypePageInfo.lift( - _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_validatorpage_page_info,self._uniffi_clone_pointer(),) + def iss(self, ) -> "str": + return _UniffiConverterString.lift( + _uniffi_rust_call(_UniffiLib.uniffi_iota_sdk_ffi_fn_method_zkloginpublicidentifier_iss,self._uniffi_clone_pointer(),) ) @@ -12922,21 +18632,21 @@ def page_info(self, ) -> "PageInfo": -class _UniffiConverterTypeValidatorPage: +class _UniffiConverterTypeZkLoginPublicIdentifier: @staticmethod def lift(value: int): - return ValidatorPage._make_instance_(value) + return ZkLoginPublicIdentifier._make_instance_(value) @staticmethod - def check_lower(value: ValidatorPage): - if not isinstance(value, ValidatorPage): - raise TypeError("Expected ValidatorPage 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: ValidatorPageProtocol): - if not isinstance(value, ValidatorPage): - raise TypeError("Expected ValidatorPage 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 @@ -12947,7 +18657,7 @@ def read(cls, buf: _UniffiRustBuffer): return cls.lift(ptr) @classmethod - def write(cls, value: ValidatorPageProtocol, buf: _UniffiRustBuffer): + def write(cls, value: ZkLoginPublicIdentifierProtocol, buf: _UniffiRustBuffer): buf.write_u64(cls.lower(value)) Value = str @@ -13017,8 +18727,9 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, __all__ = [ "InternalError", - "BindingsSdkError", "Direction", + "SdkFfiError", + "SignatureScheme", "TransactionBlockKindInput", "CheckpointSummary", "EndOfEpochData", @@ -13030,17 +18741,22 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "TransactionMetadata", "TransactionsFilter", "ValidatorCommitteeMember", + "ZkLoginClaim", "Address", "AuthenticatorStateExpire", "AuthenticatorStateUpdateV1", "BatchSendStatus", "Bls12381PublicKey", + "Bls12381Signature", + "Bn254FieldElement", "ChangeEpoch", "ChangeEpochV2", "CheckpointCommitment", "CheckpointContentsDigest", "CheckpointDigest", "CheckpointSummaryPage", + "CircomG1", + "CircomG2", "Coin", "CoinMetadata", "CoinPage", @@ -13051,10 +18767,13 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "DynamicFieldOutput", "DynamicFieldOutputPage", "Ed25519PublicKey", + "Ed25519Signature", "EffectsAuxiliaryDataDigest", "EndOfEpochTransactionKind", "Epoch", "EpochPage", + "Event", + "EventPage", "ExecutionTimeObservations", "FaucetClient", "FaucetReceipt", @@ -13065,6 +18784,11 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "MovePackage", "MovePackagePage", "MoveStruct", + "MultisigAggregatedSignature", + "MultisigCommittee", + "MultisigMember", + "MultisigMemberPublicKey", + "MultisigMemberSignature", "Object", "ObjectData", "ObjectDigest", @@ -13075,14 +18799,18 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "ObjectType", "Owner", "PageInfo", + "PasskeyAuthenticator", "ProgrammableTransaction", "ProtocolConfigs", "RandomnessStateUpdate", "Secp256k1PublicKey", + "Secp256k1Signature", "Secp256r1PublicKey", + "Secp256r1Signature", "ServiceConfig", "SignedTransaction", "SignedTransactionPage", + "SimpleSignature", "Transaction", "TransactionDataEffects", "TransactionDataEffectsPage", @@ -13090,8 +18818,6 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "TransactionEffects", "TransactionEffectsDigest", "TransactionEffectsPage", - "TransactionEvent", - "TransactionEventPage", "TransactionEventsDigest", "TransactionExpiration", "TransactionKind", @@ -13099,5 +18825,9 @@ async def _uniffi_rust_call_async(rust_future, ffi_poll, ffi_complete, ffi_free, "UserSignature", "Validator", "ValidatorPage", + "ZkLoginAuthenticator", + "ZkLoginInputs", + "ZkLoginProof", + "ZkLoginPublicIdentifier", ] diff --git a/bindings/python/test.py b/bindings/python/test.py index 18d1aca58..f462fa62a 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(txn.transaction().sender().to_hex()) if __name__ == '__main__': diff --git a/crates/iota-sdk-ffi/src/types/crypto.rs b/crates/iota-sdk-ffi/src/types/crypto.rs deleted file mode 100644 index 086564d47..000000000 --- a/crates/iota-sdk-ffi/src/types/crypto.rs +++ /dev/null @@ -1,125 +0,0 @@ -// 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, -} - -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, - } - } -} - -macro_rules! impl_public_key { - ($(#[$meta:meta])* $t:ident) => { - $(#[$meta])* - #[derive(Copy, Clone, Debug, derive_more::From, derive_more::Deref, uniffi::Object)] - pub struct $t(pub iota_types::$t); - - #[uniffi::export] - impl $t { - #[uniffi::constructor] - pub fn from_bytes(bytes: Vec) -> Result { - Ok(Self(iota_types::$t::from_bytes(bytes)?)) - } - - #[uniffi::constructor] - pub fn from_str(s: &str) -> Result { - Ok(Self(std::str::FromStr::from_str(s)?)) - } - - #[uniffi::constructor] - pub fn generate() -> Self { - let mut rng = rand::thread_rng(); - Self(iota_types::$t::generate(&mut rng)) - } - - pub fn to_bytes(&self) -> Vec { - self.0.as_bytes().to_vec() - } - } - }; -} - -impl_public_key!( - /// 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. - Bls12381PublicKey -); -impl_public_key!( - /// An ed25519 public key. - /// - /// # BCS - /// - /// The BCS serialized form for this type is defined by the following ABNF: - /// - /// ```text - /// ed25519-public-key = 32OCTECT - /// ``` - Ed25519PublicKey -); -impl_public_key!( - /// A secp256k1 signature. - /// - /// # BCS - /// - /// The BCS serialized form for this type is defined by the following ABNF: - /// - /// ```text - /// secp256k1-signature = 64OCTECT - /// ``` - Secp256k1PublicKey -); -impl_public_key!( - /// A secp256r1 signature. - /// - /// # BCS - /// - /// The BCS serialized form for this type is defined by the following ABNF: - /// - /// ```text - /// secp256r1-signature = 64OCTECT - /// ``` - Secp256r1PublicKey -); diff --git a/crates/iota-sdk-ffi/src/types/crypto/mod.rs b/crates/iota-sdk-ffi/src/types/crypto/mod.rs new file mode 100644 index 000000000..d3ec672ea --- /dev/null +++ b/crates/iota-sdk-ffi/src/types/crypto/mod.rs @@ -0,0 +1,243 @@ +// Copyright (c) 2025 IOTA Stiftung +// SPDX-License-Identifier: Apache-2.0 + +pub mod multisig; +pub mod zklogin; + +use std::sync::Arc; + +use crate::{error::Result, types::signature::SimpleSignature}; + +/// 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, + } + } +} + +/// 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() + } +} + +macro_rules! impl_crypto_object { + ($(#[$meta:meta])* $t:ident) => { + $(#[$meta])* + #[derive(Copy, Clone, Debug, derive_more::From, derive_more::Deref, uniffi::Object)] + pub struct $t(pub iota_types::$t); + + #[uniffi::export] + impl $t { + #[uniffi::constructor] + pub fn from_bytes(bytes: Vec) -> Result { + Ok(Self(iota_types::$t::from_bytes(bytes)?)) + } + + #[uniffi::constructor] + pub fn from_str(s: &str) -> Result { + Ok(Self(std::str::FromStr::from_str(s)?)) + } + + #[uniffi::constructor] + pub fn generate() -> Self { + let mut rng = rand::thread_rng(); + Self(iota_types::$t::generate(&mut rng)) + } + + pub fn to_bytes(&self) -> Vec { + self.0.as_bytes().to_vec() + } + } + }; +} + +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. + Bls12381PublicKey +); +impl_crypto_object!( + /// An ed25519 public key. + /// + /// # BCS + /// + /// The BCS serialized form for this type is defined by the following ABNF: + /// + /// ```text + /// ed25519-public-key = 32OCTECT + /// ``` + Ed25519PublicKey +); +impl_crypto_object!( + /// A secp256k1 signature. + /// + /// # BCS + /// + /// The BCS serialized form for this type is defined by the following ABNF: + /// + /// ```text + /// secp256k1-signature = 64OCTECT + /// ``` + Secp256k1PublicKey +); +impl_crypto_object!( + /// A secp256r1 signature. + /// + /// # BCS + /// + /// The BCS serialized form for this type is defined by the following ABNF: + /// + /// ```text + /// secp256r1-signature = 64OCTECT + /// ``` + 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/zklogin.rs b/crates/iota-sdk-ffi/src/types/crypto/zklogin.rs new file mode 100644 index 000000000..79e8c23d9 --- /dev/null +++ b/crates/iota-sdk-ffi/src/types/crypto/zklogin.rs @@ -0,0 +1,334 @@ +// 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) + .map(Arc::new) + } + + 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 7eca48319..cf3615ed0 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(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..faf960c96 100644 --- a/crates/iota-sdk-ffi/src/types/signature.rs +++ b/crates/iota-sdk-ffi/src/types/signature.rs @@ -1,5 +1,268 @@ // 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, PasskeyAuthenticator, Secp256k1PublicKey, + Secp256k1Signature, Secp256r1PublicKey, Secp256r1Signature, + multisig::MultisigAggregatedSignature, 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 { + match &self.0 { + iota_types::UserSignature::Simple(simple) => simple.scheme(), + iota_types::UserSignature::Multisig(_) => SignatureScheme::Multisig, + iota_types::UserSignature::ZkLogin(_) => SignatureScheme::ZkLogin, + iota_types::UserSignature::Passkey(_) => SignatureScheme::Passkey, + } + } + + 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 { From 4acd16126c28287fff82358f1f90431589af5412 Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Fri, 8 Aug 2025 10:03:09 +0200 Subject: [PATCH 2/5] move crypto types into own modules --- crates/iota-sdk-ffi/src/types/checkpoint.rs | 2 +- crates/iota-sdk-ffi/src/types/crypto/mod.rs | 98 +------------------ .../iota-sdk-ffi/src/types/crypto/passkey.rs | 66 +++++++++++++ .../src/types/crypto/validator.rs | 40 ++++++++ crates/iota-sdk-ffi/src/types/signature.rs | 6 +- 5 files changed, 112 insertions(+), 100 deletions(-) create mode 100644 crates/iota-sdk-ffi/src/types/crypto/passkey.rs create mode 100644 crates/iota-sdk-ffi/src/types/crypto/validator.rs 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/mod.rs b/crates/iota-sdk-ffi/src/types/crypto/mod.rs index d3ec672ea..d4971b324 100644 --- a/crates/iota-sdk-ffi/src/types/crypto/mod.rs +++ b/crates/iota-sdk-ffi/src/types/crypto/mod.rs @@ -2,108 +2,14 @@ // SPDX-License-Identifier: Apache-2.0 pub mod multisig; +pub mod passkey; +pub mod validator; pub mod zklogin; use std::sync::Arc; use crate::{error::Result, types::signature::SimpleSignature}; -/// 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, - } - } -} - -/// 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() - } -} - macro_rules! impl_crypto_object { ($(#[$meta:meta])* $t:ident) => { $(#[$meta])* 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/signature.rs b/crates/iota-sdk-ffi/src/types/signature.rs index faf960c96..e6bfcb8e2 100644 --- a/crates/iota-sdk-ffi/src/types/signature.rs +++ b/crates/iota-sdk-ffi/src/types/signature.rs @@ -8,9 +8,9 @@ use iota_types::{SignatureScheme, ZkLoginClaim}; use crate::{ error::Result, types::crypto::{ - Ed25519PublicKey, Ed25519Signature, PasskeyAuthenticator, Secp256k1PublicKey, - Secp256k1Signature, Secp256r1PublicKey, Secp256r1Signature, - multisig::MultisigAggregatedSignature, zklogin::ZkLoginAuthenticator, + Ed25519PublicKey, Ed25519Signature, Secp256k1PublicKey, Secp256k1Signature, + Secp256r1PublicKey, Secp256r1Signature, multisig::MultisigAggregatedSignature, + passkey::PasskeyAuthenticator, zklogin::ZkLoginAuthenticator, }, }; From eae40b47f21271d604c0e8863aff85d5c6e9f6b1 Mon Sep 17 00:00:00 2001 From: DaughterOfMars Date: Fri, 8 Aug 2025 10:04:36 +0200 Subject: [PATCH 3/5] Update bindings/python/test.py Co-authored-by: Thibault Martinez --- bindings/python/test.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bindings/python/test.py b/bindings/python/test.py index f462fa62a..1c78251c7 100644 --- a/bindings/python/test.py +++ b/bindings/python/test.py @@ -28,7 +28,7 @@ async def main(): if txn is not None: for sig in txn.signatures(): print("Scheme: ", sig.scheme(), sig.scheme().value) - print(txn.transaction().sender().to_hex()) + print("Sender: ", txn.transaction().sender().to_hex()) if __name__ == '__main__': From db1f531133cd0a69e84a29d562830f014a72f379 Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Fri, 8 Aug 2025 11:51:29 +0200 Subject: [PATCH 4/5] remove arc --- crates/iota-sdk-ffi/src/types/crypto/zklogin.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/iota-sdk-ffi/src/types/crypto/zklogin.rs b/crates/iota-sdk-ffi/src/types/crypto/zklogin.rs index 79e8c23d9..dfa370e53 100644 --- a/crates/iota-sdk-ffi/src/types/crypto/zklogin.rs +++ b/crates/iota-sdk-ffi/src/types/crypto/zklogin.rs @@ -114,11 +114,10 @@ pub struct ZkLoginPublicIdentifier(pub iota_types::ZkLoginPublicIdentifier); #[uniffi::export] impl ZkLoginPublicIdentifier { #[uniffi::constructor] - pub fn new(iss: String, address_seed: &Bn254FieldElement) -> Result> { + 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) - .map(Arc::new) } pub fn iss(&self) -> String { From 9ed3920970d7515a503c62425885da8af2ce4b68 Mon Sep 17 00:00:00 2001 From: Chloe Martin Date: Tue, 12 Aug 2025 09:24:58 +0200 Subject: [PATCH 5/5] call inner fn --- crates/iota-sdk-ffi/src/types/signature.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/crates/iota-sdk-ffi/src/types/signature.rs b/crates/iota-sdk-ffi/src/types/signature.rs index e6bfcb8e2..6abef0cdb 100644 --- a/crates/iota-sdk-ffi/src/types/signature.rs +++ b/crates/iota-sdk-ffi/src/types/signature.rs @@ -51,12 +51,7 @@ pub struct UserSignature(pub iota_types::UserSignature); impl UserSignature { /// Return the flag for this signature scheme pub fn scheme(&self) -> SignatureScheme { - match &self.0 { - iota_types::UserSignature::Simple(simple) => simple.scheme(), - iota_types::UserSignature::Multisig(_) => SignatureScheme::Multisig, - iota_types::UserSignature::ZkLogin(_) => SignatureScheme::ZkLogin, - iota_types::UserSignature::Passkey(_) => SignatureScheme::Passkey, - } + self.0.scheme() } fn to_bytes(&self) -> Vec {