From 8a3c1ac75e6bc3fcbe05205d0e24739e3022cd22 Mon Sep 17 00:00:00 2001 From: Denis Angell Date: Mon, 7 Oct 2024 14:12:59 +0200 Subject: [PATCH] migration --- .ci-config/{rippled.cfg => xahaud.cfg} | 125 +++--- .github/workflows/integration_test.yml | 8 +- .github/workflows/snippet_test.yml | 51 --- .github/workflows/unit_test.yml | 6 +- .pre-commit-config.yaml | 4 +- CONTRIBUTING.md | 28 +- README.md | 140 +++---- docs/Makefile | 20 - docs/conf.py | 61 --- docs/index.rst | 51 --- docs/make.bat | 35 -- docs/source/modules.rst | 1 - docs/source/snippets.rst | 37 -- docs/source/xrpl.account.rst | 7 - docs/source/xrpl.asyncio.account.rst | 7 - docs/source/xrpl.asyncio.clients.rst | 6 - docs/source/xrpl.asyncio.ledger.rst | 7 - docs/source/xrpl.asyncio.rst | 16 - docs/source/xrpl.asyncio.transaction.rst | 7 - docs/source/xrpl.asyncio.wallet.rst | 7 - docs/source/xrpl.clients.rst | 6 - docs/source/xrpl.core.addresscodec.rst | 7 - .../xrpl.core.binarycodec.binary_wrappers.rst | 1 - .../xrpl.core.binarycodec.definitions.rst | 1 - docs/source/xrpl.core.binarycodec.rst | 7 - docs/source/xrpl.core.binarycodec.types.rst | 1 - docs/source/xrpl.core.keypairs.rst | 7 - docs/source/xrpl.core.rst | 12 - docs/source/xrpl.ledger.rst | 7 - docs/source/xrpl.models.amounts.rst | 10 - docs/source/xrpl.models.currencies.rst | 10 - docs/source/xrpl.models.requests.rst | 20 - docs/source/xrpl.models.rst | 39 -- ...odels.transactions.pseudo_transactions.rst | 8 - docs/source/xrpl.models.transactions.rst | 22 -- .../source/xrpl.models.transactions.types.rst | 1 - docs/source/xrpl.rst | 7 - docs/source/xrpl.transaction.rst | 7 - docs/source/xrpl.utils.rst | 7 - docs/source/xrpl.utils.txn_parser.rst | 1 - docs/source/xrpl.utils.txn_parser.utils.rst | 1 - docs/source/xrpl.wallet.rst | 7 - migration.py | 369 ++++++++++++++++++ pyproject.toml | 20 +- snippets/get_transaction.py | 6 +- snippets/multisign.py | 12 +- snippets/partial_payment.py | 10 +- snippets/paths.py | 12 +- snippets/send_escrow.py | 14 +- snippets/set_regular_key.py | 12 +- snippets/submit_payment.py | 12 +- .../clients/test_json_rpc_client.py | 6 +- tests/integration/it_utils.py | 38 +- tests/integration/reqs/test_account_info.py | 2 +- .../integration/reqs/test_account_objects.py | 2 +- tests/integration/reqs/test_account_tx.py | 4 +- tests/integration/reqs/test_amm_info.py | 4 +- tests/integration/reqs/test_book_offers.py | 4 +- tests/integration/reqs/test_channel_verify.py | 2 +- tests/integration/reqs/test_feature.py | 2 +- .../integration/reqs/test_generic_request.py | 2 +- tests/integration/reqs/test_ledger.py | 2 +- .../integration/reqs/test_no_ripple_check.py | 2 +- .../integration/reqs/test_ripple_path_find.py | 2 +- .../reqs/test_server_definitions.py | 2 +- tests/integration/reqs/test_server_info.py | 2 +- .../reqs/test_submit_multisigned.py | 16 +- tests/integration/reqs/test_submit_only.py | 12 +- tests/integration/reqs/test_subscribe.py | 6 +- tests/integration/reqs/test_tx.py | 2 +- tests/integration/reusable_values.py | 6 +- tests/integration/sugar/test_account.py | 26 +- tests/integration/sugar/test_ledger.py | 6 +- tests/integration/sugar/test_transaction.py | 78 ++-- tests/integration/sugar/test_wallet.py | 46 +-- .../transactions/test_account_delete.py | 8 +- .../transactions/test_account_set.py | 4 +- .../integration/transactions/test_amm_bid.py | 10 +- .../transactions/test_amm_create.py | 4 +- .../transactions/test_amm_deposit.py | 10 +- .../integration/transactions/test_amm_vote.py | 6 +- .../transactions/test_amm_withdraw.py | 8 +- .../transactions/test_check_cancel.py | 4 +- .../transactions/test_check_cash.py | 4 +- .../transactions/test_check_create.py | 4 +- .../integration/transactions/test_clawback.py | 6 +- .../transactions/test_delete_oracle.py | 10 +- .../transactions/test_deposit_preauth.py | 4 +- .../transactions/test_did_delete.py | 6 +- .../integration/transactions/test_did_set.py | 6 +- .../transactions/test_escrow_cancel.py | 4 +- .../transactions/test_escrow_create.py | 4 +- .../transactions/test_escrow_finish.py | 4 +- .../transactions/test_offer_cancel.py | 2 +- .../transactions/test_offer_create.py | 4 +- .../integration/transactions/test_payment.py | 4 +- .../test_payment_channel_claim.py | 2 +- .../test_payment_channel_create.py | 2 +- .../transactions/test_payment_channel_fund.py | 2 +- .../transactions/test_set_oracle.py | 10 +- .../transactions/test_set_regular_key.py | 4 +- .../transactions/test_signer_list_set.py | 4 +- .../transactions/test_ticket_create.py | 2 +- .../transactions/test_trust_set.py | 8 +- .../test_xchain_account_create_commit.py | 6 +- ...t_xchain_add_account_create_attestation.py | 16 +- .../test_xchain_add_claim_attestation.py | 12 +- .../transactions/test_xchain_claim.py | 12 +- .../transactions/test_xchain_commit.py | 4 +- .../transactions/test_xchain_create_bridge.py | 6 +- .../test_xchain_create_claim_id.py | 6 +- .../transactions/test_xchain_modify_bridge.py | 6 +- .../ledger/test_calculate_fee_dynamically.py | 2 +- tests/unit/asyn/wallet/test_main.py | 6 +- tests/unit/asyn/wallet/test_wallet.py | 46 +-- tests/unit/core/addresscodec/test_codec.py | 4 +- tests/unit/core/addresscodec/test_main.py | 10 +- .../core/binarycodec/test_binary_parser.py | 4 +- .../binarycodec/test_binary_serializer.py | 6 +- .../binarycodec/test_definition_service.py | 2 +- .../core/binarycodec/test_field_id_codec.py | 2 +- tests/unit/core/binarycodec/test_main.py | 4 +- .../core/binarycodec/types/test_account_id.py | 4 +- .../core/binarycodec/types/test_amount.py | 10 +- .../unit/core/binarycodec/types/test_blob.py | 4 +- .../core/binarycodec/types/test_currency.py | 4 +- .../core/binarycodec/types/test_hash_types.py | 10 +- .../core/binarycodec/types/test_path_set.py | 6 +- .../binarycodec/types/test_serialized_dict.py | 4 +- .../binarycodec/types/test_serialized_list.py | 6 +- .../binarycodec/types/test_serialized_type.py | 30 +- .../unit/core/binarycodec/types/test_uint.py | 10 +- .../core/binarycodec/types/test_vector256.py | 6 +- tests/unit/core/keypairs/test_main.py | 10 +- .../amounts/test_issued_currency_amount.py | 4 +- .../models/currencies/test_issued_currency.py | 4 +- tests/unit/models/currencies/test_xrp.py | 4 +- tests/unit/models/requests/test_amm_info.py | 8 +- .../models/requests/test_channel_authorize.py | 4 +- .../requests/test_get_aggregate_price.py | 6 +- .../unit/models/requests/test_ledger_entry.py | 6 +- tests/unit/models/requests/test_requests.py | 4 +- tests/unit/models/requests/test_sign.py | 8 +- tests/unit/models/requests/test_tx.py | 4 +- tests/unit/models/test_base_model.py | 16 +- tests/unit/models/test_response.py | 2 +- tests/unit/models/test_utils.py | 10 +- .../models/transactions/test_account_set.py | 4 +- .../unit/models/transactions/test_amm_bid.py | 10 +- .../models/transactions/test_amm_create.py | 8 +- .../models/transactions/test_amm_delete.py | 6 +- .../models/transactions/test_amm_deposit.py | 12 +- .../unit/models/transactions/test_amm_vote.py | 8 +- .../models/transactions/test_amm_withdraw.py | 12 +- .../test_better_transaction_flags.py | 8 +- .../models/transactions/test_check_cash.py | 4 +- .../unit/models/transactions/test_clawback.py | 8 +- .../transactions/test_deposit_preauth.py | 4 +- .../models/transactions/test_did_delete.py | 4 +- .../unit/models/transactions/test_did_set.py | 6 +- .../models/transactions/test_escrow_create.py | 4 +- .../models/transactions/test_escrow_finish.py | 4 +- .../transactions/test_nftoken_accept_offer.py | 4 +- .../transactions/test_nftoken_cancel_offer.py | 4 +- .../transactions/test_nftoken_create_offer.py | 4 +- .../models/transactions/test_nftoken_mint.py | 4 +- .../models/transactions/test_oracle_delete.py | 4 +- .../models/transactions/test_oracle_set.py | 8 +- .../unit/models/transactions/test_payment.py | 8 +- .../transactions/test_pseudo_transactions.py | 6 +- .../transactions/test_signer_list_set.py | 6 +- .../models/transactions/test_transaction.py | 16 +- .../test_xchain_account_create_commit.py | 4 +- .../models/transactions/test_xchain_claim.py | 4 +- .../transactions/test_xchain_create_bridge.py | 4 +- .../test_xchain_create_claim_id.py | 4 +- .../transactions/test_xchain_modify_bridge.py | 4 +- tests/unit/utils/test_get_nftoken_id.py | 2 +- tests/unit/utils/test_get_xchain_claim_id.py | 2 +- tests/unit/utils/test_parse_nftoken_id.py | 4 +- tests/unit/utils/test_str_conversions.py | 6 +- tests/unit/utils/test_time_conversions.py | 28 +- tests/unit/utils/test_xrp_conversions.py | 52 +-- .../txn_parser/test_get_balance_changes.py | 2 +- .../txn_parser/test_get_final_balances.py | 2 +- .../txn_parser/test_get_order_book_changes.py | 2 +- tests/unit/wallet/test_wallet.py | 6 +- tools/generate_tx_models.py | 24 +- {xrpl => xahau}/__init__.py | 4 +- {xrpl => xahau}/account/__init__.py | 4 +- {xrpl => xahau}/account/main.py | 4 +- {xrpl => xahau}/account/py.typed | 0 .../account/transaction_history.py | 6 +- {xrpl => xahau}/asyncio/__init__.py | 2 +- {xrpl => xahau}/asyncio/account/__init__.py | 4 +- {xrpl => xahau}/asyncio/account/main.py | 6 +- {xrpl => xahau}/asyncio/account/py.typed | 0 .../asyncio/account/transaction_history.py | 8 +- {xrpl => xahau}/asyncio/clients/__init__.py | 10 +- .../asyncio/clients/async_client.py | 6 +- .../asyncio/clients/async_json_rpc_client.py | 4 +- .../asyncio/clients/async_websocket_client.py | 30 +- {xrpl => xahau}/asyncio/clients/client.py | 4 +- {xrpl => xahau}/asyncio/clients/exceptions.py | 2 +- .../asyncio/clients/json_rpc_base.py | 10 +- {xrpl => xahau}/asyncio/clients/py.typed | 0 {xrpl => xahau}/asyncio/clients/utils.py | 4 +- .../asyncio/clients/websocket_base.py | 10 +- {xrpl => xahau}/asyncio/ledger/__init__.py | 2 +- {xrpl => xahau}/asyncio/ledger/main.py | 10 +- {xrpl => xahau}/asyncio/ledger/py.typed | 0 {xrpl => xahau}/asyncio/ledger/utils.py | 0 {xrpl => xahau}/asyncio/py.typed | 0 .../asyncio/transaction/__init__.py | 4 +- {xrpl => xahau}/asyncio/transaction/main.py | 34 +- {xrpl => xahau}/asyncio/transaction/py.typed | 0 .../transaction/reliable_submission.py | 22 +- {xrpl => xahau}/asyncio/wallet/__init__.py | 2 +- {xrpl => xahau}/asyncio/wallet/py.typed | 0 .../asyncio/wallet/wallet_generation.py | 19 +- {xrpl => xahau}/clients/__init__.py | 10 +- {xrpl => xahau}/clients/json_rpc_client.py | 4 +- {xrpl => xahau}/clients/py.typed | 0 {xrpl => xahau}/clients/sync_client.py | 6 +- {xrpl => xahau}/clients/websocket_client.py | 18 +- {xrpl => xahau}/constants.py | 0 {xrpl => xahau}/core/__init__.py | 2 +- {xrpl => xahau}/core/addresscodec/__init__.py | 8 +- {xrpl => xahau}/core/addresscodec/codec.py | 6 +- .../core/addresscodec/exceptions.py | 2 +- {xrpl => xahau}/core/addresscodec/main.py | 6 +- {xrpl => xahau}/core/addresscodec/py.typed | 0 {xrpl => xahau}/core/addresscodec/utils.py | 0 {xrpl => xahau}/core/binarycodec/__init__.py | 4 +- .../binarycodec/binary_wrappers/__init__.py | 5 + .../binary_wrappers/binary_parser.py | 10 +- .../binary_wrappers/binary_serializer.py | 4 +- .../core/binarycodec/definitions/__init__.py | 8 +- .../binarycodec/definitions/definitions.json | 0 .../binarycodec/definitions/definitions.py | 8 +- .../binarycodec/definitions/field_header.py | 0 .../binarycodec/definitions/field_info.py | 0 .../binarycodec/definitions/field_instance.py | 8 +- .../core/binarycodec/exceptions.py | 2 +- .../core/binarycodec/field_id_codec.py | 6 +- {xrpl => xahau}/core/binarycodec/main.py | 10 +- {xrpl => xahau}/core/binarycodec/py.typed | 0 xahau/core/binarycodec/types/__init__.py | 42 ++ .../core/binarycodec/types/account_id.py | 6 +- .../core/binarycodec/types/amount.py | 14 +- .../core/binarycodec/types/blob.py | 6 +- .../core/binarycodec/types/currency.py | 6 +- .../core/binarycodec/types/hash.py | 6 +- .../core/binarycodec/types/hash128.py | 4 +- .../core/binarycodec/types/hash160.py | 2 +- .../core/binarycodec/types/hash256.py | 2 +- .../core/binarycodec/types/issue.py | 14 +- .../core/binarycodec/types/path_set.py | 10 +- .../core/binarycodec/types/serialized_type.py | 2 +- .../core/binarycodec/types/st_array.py | 8 +- .../core/binarycodec/types/st_object.py | 14 +- .../core/binarycodec/types/uint.py | 4 +- .../core/binarycodec/types/uint16.py | 6 +- .../core/binarycodec/types/uint32.py | 6 +- .../core/binarycodec/types/uint64.py | 6 +- .../core/binarycodec/types/uint8.py | 6 +- .../core/binarycodec/types/vector256.py | 8 +- .../core/binarycodec/types/xchain_bridge.py | 10 +- {xrpl => xahau}/core/keypairs/__init__.py | 4 +- .../core/keypairs/crypto_implementation.py | 0 {xrpl => xahau}/core/keypairs/ed25519.py | 6 +- {xrpl => xahau}/core/keypairs/exceptions.py | 2 +- {xrpl => xahau}/core/keypairs/helpers.py | 2 +- {xrpl => xahau}/core/keypairs/main.py | 18 +- {xrpl => xahau}/core/keypairs/py.typed | 0 {xrpl => xahau}/core/keypairs/secp256k1.py | 6 +- {xrpl => xahau}/core/py.typed | 0 {xrpl => xahau}/ledger/__init__.py | 2 +- {xrpl => xahau}/ledger/main.py | 4 +- {xrpl => xahau}/ledger/py.typed | 0 xahau/models/__init__.py | 30 ++ {xrpl => xahau}/models/amounts/__init__.py | 4 +- {xrpl => xahau}/models/amounts/amount.py | 2 +- .../models/amounts/issued_currency_amount.py | 6 +- {xrpl => xahau}/models/amounts/py.typed | 0 {xrpl => xahau}/models/auth_account.py | 6 +- {xrpl => xahau}/models/base_model.py | 6 +- {xrpl => xahau}/models/currencies/__init__.py | 6 +- {xrpl => xahau}/models/currencies/currency.py | 4 +- .../models/currencies/issued_currency.py | 14 +- {xrpl => xahau}/models/currencies/py.typed | 0 {xrpl => xahau}/models/currencies/xrp.py | 8 +- {xrpl => xahau}/models/exceptions.py | 2 +- {xrpl => xahau}/models/flags.py | 10 +- {xrpl => xahau}/models/nested_model.py | 2 +- {xrpl => xahau}/models/path.py | 4 +- {xrpl => xahau}/models/py.typed | 0 xahau/models/requests/__init__.py | 111 ++++++ .../models/requests/account_channels.py | 6 +- .../models/requests/account_currencies.py | 6 +- .../models/requests/account_info.py | 6 +- .../models/requests/account_lines.py | 6 +- .../models/requests/account_nfts.py | 6 +- .../models/requests/account_objects.py | 6 +- .../models/requests/account_offers.py | 6 +- {xrpl => xahau}/models/requests/account_tx.py | 6 +- {xrpl => xahau}/models/requests/amm_info.py | 6 +- .../models/requests/book_offers.py | 8 +- .../models/requests/channel_authorize.py | 8 +- .../models/requests/channel_verify.py | 6 +- .../models/requests/deposit_authorized.py | 6 +- {xrpl => xahau}/models/requests/feature.py | 4 +- {xrpl => xahau}/models/requests/fee.py | 4 +- .../models/requests/gateway_balances.py | 6 +- .../models/requests/generic_request.py | 8 +- .../models/requests/get_aggregate_price.py | 8 +- {xrpl => xahau}/models/requests/ledger.py | 4 +- .../models/requests/ledger_closed.py | 4 +- .../models/requests/ledger_current.py | 4 +- .../models/requests/ledger_data.py | 6 +- .../models/requests/ledger_entry.py | 10 +- {xrpl => xahau}/models/requests/manifest.py | 6 +- .../models/requests/nft_buy_offers.py | 6 +- .../models/requests/nft_history.py | 6 +- {xrpl => xahau}/models/requests/nft_info.py | 6 +- .../models/requests/nft_sell_offers.py | 6 +- .../models/requests/nfts_by_issuer.py | 6 +- .../models/requests/no_ripple_check.py | 6 +- {xrpl => xahau}/models/requests/path_find.py | 10 +- {xrpl => xahau}/models/requests/ping.py | 4 +- {xrpl => xahau}/models/requests/py.typed | 0 {xrpl => xahau}/models/requests/random.py | 4 +- {xrpl => xahau}/models/requests/request.py | 34 +- .../models/requests/ripple_path_find.py | 10 +- .../models/requests/server_definitions.py | 4 +- .../models/requests/server_info.py | 4 +- .../models/requests/server_state.py | 4 +- {xrpl => xahau}/models/requests/sign.py | 10 +- .../models/requests/sign_and_submit.py | 10 +- {xrpl => xahau}/models/requests/sign_for.py | 10 +- {xrpl => xahau}/models/requests/submit.py | 6 +- .../models/requests/submit_multisigned.py | 8 +- .../models/requests/submit_only.py | 6 +- {xrpl => xahau}/models/requests/subscribe.py | 10 +- .../models/requests/transaction_entry.py | 6 +- {xrpl => xahau}/models/requests/tx.py | 4 +- .../models/requests/unsubscribe.py | 12 +- {xrpl => xahau}/models/required.py | 0 {xrpl => xahau}/models/response.py | 10 +- xahau/models/transactions/__init__.py | 166 ++++++++ .../models/transactions/account_delete.py | 8 +- .../models/transactions/account_set.py | 10 +- .../models/transactions/amm_bid.py | 14 +- .../models/transactions/amm_create.py | 10 +- .../models/transactions/amm_delete.py | 10 +- .../models/transactions/amm_deposit.py | 14 +- .../models/transactions/amm_vote.py | 12 +- .../models/transactions/amm_withdraw.py | 14 +- .../models/transactions/check_cancel.py | 8 +- .../models/transactions/check_cash.py | 10 +- .../models/transactions/check_create.py | 10 +- .../models/transactions/clawback.py | 10 +- .../models/transactions/deposit_preauth.py | 6 +- .../models/transactions/did_delete.py | 6 +- .../models/transactions/did_set.py | 6 +- .../models/transactions/escrow_cancel.py | 8 +- .../models/transactions/escrow_create.py | 10 +- .../models/transactions/escrow_finish.py | 8 +- .../models/transactions/metadata.py | 2 +- .../transactions/nftoken_accept_offer.py | 8 +- .../models/transactions/nftoken_burn.py | 8 +- .../transactions/nftoken_cancel_offer.py | 8 +- .../transactions/nftoken_create_offer.py | 12 +- .../models/transactions/nftoken_mint.py | 12 +- .../models/transactions/offer_cancel.py | 8 +- .../models/transactions/offer_create.py | 12 +- .../models/transactions/oracle_delete.py | 8 +- .../models/transactions/oracle_set.py | 16 +- .../models/transactions/payment.py | 14 +- .../transactions/payment_channel_claim.py | 10 +- .../transactions/payment_channel_create.py | 10 +- .../transactions/payment_channel_fund.py | 8 +- .../pseudo_transactions/__init__.py | 6 +- .../pseudo_transactions/enable_amendment.py | 10 +- .../pseudo_transactions/pseudo_transaction.py | 8 +- .../pseudo_transactions/set_fee.py | 6 +- .../pseudo_transactions/unl_modify.py | 8 +- {xrpl => xahau}/models/transactions/py.typed | 0 .../models/transactions/set_regular_key.py | 6 +- .../models/transactions/signer_list_set.py | 10 +- .../models/transactions/ticket_create.py | 8 +- .../models/transactions/transaction.py | 28 +- .../models/transactions/trust_set.py | 12 +- xahau/models/transactions/types/__init__.py | 8 + .../types/pseudo_transaction_type.py | 0 .../transactions/types/transaction_type.py | 0 .../xchain_account_create_commit.py | 10 +- .../xchain_add_account_create_attestation.py | 12 +- .../xchain_add_claim_attestation.py | 12 +- .../models/transactions/xchain_claim.py | 14 +- .../models/transactions/xchain_commit.py | 12 +- .../transactions/xchain_create_bridge.py | 12 +- .../transactions/xchain_create_claim_id.py | 12 +- .../transactions/xchain_modify_bridge.py | 14 +- {xrpl => xahau}/models/types.py | 0 {xrpl => xahau}/models/utils.py | 2 +- {xrpl => xahau}/models/xchain_bridge.py | 6 +- {xrpl => xahau}/py.typed | 0 {xrpl => xahau}/transaction/__init__.py | 8 +- {xrpl => xahau}/transaction/main.py | 10 +- {xrpl => xahau}/transaction/multisign.py | 4 +- {xrpl => xahau}/transaction/py.typed | 0 .../transaction/reliable_submission.py | 10 +- {xrpl => xahau}/utils/__init__.py | 14 +- {xrpl => xahau}/utils/get_nftoken_id.py | 2 +- {xrpl => xahau}/utils/get_xchain_claim_id.py | 2 +- {xrpl => xahau}/utils/parse_nftoken_id.py | 4 +- {xrpl => xahau}/utils/py.typed | 0 {xrpl => xahau}/utils/str_conversions.py | 0 {xrpl => xahau}/utils/time_conversions.py | 2 +- xahau/utils/txn_parser/__init__.py | 7 + .../utils/txn_parser/get_balance_changes.py | 4 +- .../utils/txn_parser/get_final_balances.py | 4 +- .../txn_parser/get_order_book_changes.py | 4 +- xahau/utils/txn_parser/utils/__init__.py | 17 + .../utils/txn_parser/utils/balance_parser.py | 10 +- .../utils/txn_parser/utils/nodes.py | 4 +- .../txn_parser/utils/order_book_parser.py | 10 +- .../utils/txn_parser/utils/parser.py | 2 +- .../utils/txn_parser/utils/types.py | 0 {xrpl => xahau}/utils/xrp_conversions.py | 2 +- xahau/wallet/__init__.py | 6 + {xrpl => xahau}/wallet/main.py | 12 +- {xrpl => xahau}/wallet/py.typed | 0 {xrpl => xahau}/wallet/wallet_generation.py | 6 +- .../binarycodec/binary_wrappers/__init__.py | 5 - xrpl/core/binarycodec/types/__init__.py | 42 -- xrpl/models/__init__.py | 30 -- xrpl/models/requests/__init__.py | 111 ------ xrpl/models/transactions/__init__.py | 166 -------- xrpl/models/transactions/types/__init__.py | 6 - xrpl/utils/txn_parser/__init__.py | 7 - xrpl/utils/txn_parser/utils/__init__.py | 17 - xrpl/wallet/__init__.py | 6 - 444 files changed, 2281 insertions(+), 2430 deletions(-) rename .ci-config/{rippled.cfg => xahaud.cfg} (69%) delete mode 100644 .github/workflows/snippet_test.yml delete mode 100644 docs/Makefile delete mode 100644 docs/conf.py delete mode 100644 docs/index.rst delete mode 100644 docs/make.bat delete mode 100644 docs/source/modules.rst delete mode 100644 docs/source/snippets.rst delete mode 100644 docs/source/xrpl.account.rst delete mode 100644 docs/source/xrpl.asyncio.account.rst delete mode 100644 docs/source/xrpl.asyncio.clients.rst delete mode 100644 docs/source/xrpl.asyncio.ledger.rst delete mode 100644 docs/source/xrpl.asyncio.rst delete mode 100644 docs/source/xrpl.asyncio.transaction.rst delete mode 100644 docs/source/xrpl.asyncio.wallet.rst delete mode 100644 docs/source/xrpl.clients.rst delete mode 100644 docs/source/xrpl.core.addresscodec.rst delete mode 100644 docs/source/xrpl.core.binarycodec.binary_wrappers.rst delete mode 100644 docs/source/xrpl.core.binarycodec.definitions.rst delete mode 100644 docs/source/xrpl.core.binarycodec.rst delete mode 100644 docs/source/xrpl.core.binarycodec.types.rst delete mode 100644 docs/source/xrpl.core.keypairs.rst delete mode 100644 docs/source/xrpl.core.rst delete mode 100644 docs/source/xrpl.ledger.rst delete mode 100644 docs/source/xrpl.models.amounts.rst delete mode 100644 docs/source/xrpl.models.currencies.rst delete mode 100644 docs/source/xrpl.models.requests.rst delete mode 100644 docs/source/xrpl.models.rst delete mode 100644 docs/source/xrpl.models.transactions.pseudo_transactions.rst delete mode 100644 docs/source/xrpl.models.transactions.rst delete mode 100644 docs/source/xrpl.models.transactions.types.rst delete mode 100644 docs/source/xrpl.rst delete mode 100644 docs/source/xrpl.transaction.rst delete mode 100644 docs/source/xrpl.utils.rst delete mode 100644 docs/source/xrpl.utils.txn_parser.rst delete mode 100644 docs/source/xrpl.utils.txn_parser.utils.rst delete mode 100644 docs/source/xrpl.wallet.rst create mode 100644 migration.py rename {xrpl => xahau}/__init__.py (58%) rename {xrpl => xahau}/account/__init__.py (74%) rename {xrpl => xahau}/account/main.py (97%) rename {xrpl => xahau}/account/py.typed (100%) rename {xrpl => xahau}/account/transaction_history.py (81%) rename {xrpl => xahau}/asyncio/__init__.py (62%) rename {xrpl => xahau}/asyncio/account/__init__.py (71%) rename {xrpl => xahau}/asyncio/account/main.py (95%) rename {xrpl => xahau}/asyncio/account/py.typed (100%) rename {xrpl => xahau}/asyncio/account/transaction_history.py (79%) rename {xrpl => xahau}/asyncio/clients/__init__.py (55%) rename {xrpl => xahau}/asyncio/clients/async_client.py (80%) rename {xrpl => xahau}/asyncio/clients/async_json_rpc_client.py (62%) rename {xrpl => xahau}/asyncio/clients/async_websocket_client.py (91%) rename {xrpl => xahau}/asyncio/clients/client.py (93%) rename {xrpl => xahau}/asyncio/clients/exceptions.py (96%) rename {xrpl => xahau}/asyncio/clients/json_rpc_base.py (82%) rename {xrpl => xahau}/asyncio/clients/py.typed (100%) rename {xrpl => xahau}/asyncio/clients/utils.py (96%) rename {xrpl => xahau}/asyncio/clients/websocket_base.py (96%) rename {xrpl => xahau}/asyncio/ledger/__init__.py (87%) rename {xrpl => xahau}/asyncio/ledger/main.py (92%) rename {xrpl => xahau}/asyncio/ledger/py.typed (100%) rename {xrpl => xahau}/asyncio/ledger/utils.py (100%) rename {xrpl => xahau}/asyncio/py.typed (100%) rename {xrpl => xahau}/asyncio/transaction/__init__.py (81%) rename {xrpl => xahau}/asyncio/transaction/main.py (93%) rename {xrpl => xahau}/asyncio/transaction/py.typed (100%) rename {xrpl => xahau}/asyncio/transaction/reliable_submission.py (93%) rename {xrpl => xahau}/asyncio/wallet/__init__.py (75%) rename {xrpl => xahau}/asyncio/wallet/py.typed (100%) rename {xrpl => xahau}/asyncio/wallet/wallet_generation.py (93%) rename {xrpl => xahau}/clients/__init__.py (57%) rename {xrpl => xahau}/clients/json_rpc_client.py (63%) rename {xrpl => xahau}/clients/py.typed (100%) rename {xrpl => xahau}/clients/sync_client.py (80%) rename {xrpl => xahau}/clients/websocket_client.py (94%) rename {xrpl => xahau}/constants.py (100%) rename {xrpl => xahau}/core/__init__.py (65%) rename {xrpl => xahau}/core/addresscodec/__init__.py (80%) rename {xrpl => xahau}/core/addresscodec/codec.py (97%) rename {xrpl => xahau}/core/addresscodec/exceptions.py (78%) rename {xrpl => xahau}/core/addresscodec/main.py (96%) rename {xrpl => xahau}/core/addresscodec/py.typed (100%) rename {xrpl => xahau}/core/addresscodec/utils.py (100%) rename {xrpl => xahau}/core/binarycodec/__init__.py (76%) create mode 100644 xahau/core/binarycodec/binary_wrappers/__init__.py rename {xrpl => xahau}/core/binarycodec/binary_wrappers/binary_parser.py (96%) rename {xrpl => xahau}/core/binarycodec/binary_wrappers/binary_serializer.py (96%) rename {xrpl => xahau}/core/binarycodec/definitions/__init__.py (73%) rename {xrpl => xahau}/core/binarycodec/definitions/definitions.json (100%) rename {xrpl => xahau}/core/binarycodec/definitions/definitions.py (96%) rename {xrpl => xahau}/core/binarycodec/definitions/field_header.py (100%) rename {xrpl => xahau}/core/binarycodec/definitions/field_info.py (100%) rename {xrpl => xahau}/core/binarycodec/definitions/field_instance.py (86%) rename {xrpl => xahau}/core/binarycodec/exceptions.py (78%) rename {xrpl => xahau}/core/binarycodec/field_id_codec.py (94%) rename {xrpl => xahau}/core/binarycodec/main.py (91%) rename {xrpl => xahau}/core/binarycodec/py.typed (100%) create mode 100644 xahau/core/binarycodec/types/__init__.py rename {xrpl => xahau}/core/binarycodec/types/account_id.py (94%) rename {xrpl => xahau}/core/binarycodec/types/amount.py (96%) rename {xrpl => xahau}/core/binarycodec/types/blob.py (88%) rename {xrpl => xahau}/core/binarycodec/types/currency.py (95%) rename {xrpl => xahau}/core/binarycodec/types/hash.py (91%) rename {xrpl => xahau}/core/binarycodec/types/hash128.py (91%) rename {xrpl => xahau}/core/binarycodec/types/hash160.py (91%) rename {xrpl => xahau}/core/binarycodec/types/hash256.py (91%) rename {xrpl => xahau}/core/binarycodec/types/issue.py (86%) rename {xrpl => xahau}/core/binarycodec/types/path_set.py (96%) rename {xrpl => xahau}/core/binarycodec/types/serialized_type.py (96%) rename {xrpl => xahau}/core/binarycodec/types/st_array.py (91%) rename {xrpl => xahau}/core/binarycodec/types/st_object.py (93%) rename {xrpl => xahau}/core/binarycodec/types/uint.py (95%) rename {xrpl => xahau}/core/binarycodec/types/uint16.py (90%) rename {xrpl => xahau}/core/binarycodec/types/uint32.py (91%) rename {xrpl => xahau}/core/binarycodec/types/uint64.py (92%) rename {xrpl => xahau}/core/binarycodec/types/uint8.py (89%) rename {xrpl => xahau}/core/binarycodec/types/vector256.py (90%) rename {xrpl => xahau}/core/binarycodec/types/xchain_bridge.py (90%) rename {xrpl => xahau}/core/keypairs/__init__.py (76%) rename {xrpl => xahau}/core/keypairs/crypto_implementation.py (100%) rename {xrpl => xahau}/core/keypairs/ed25519.py (94%) rename {xrpl => xahau}/core/keypairs/exceptions.py (77%) rename {xrpl => xahau}/core/keypairs/helpers.py (92%) rename {xrpl => xahau}/core/keypairs/main.py (89%) rename {xrpl => xahau}/core/keypairs/py.typed (100%) rename {xrpl => xahau}/core/keypairs/secp256k1.py (97%) rename {xrpl => xahau}/core/py.typed (100%) rename {xrpl => xahau}/ledger/__init__.py (89%) rename {xrpl => xahau}/ledger/main.py (96%) rename {xrpl => xahau}/ledger/py.typed (100%) create mode 100644 xahau/models/__init__.py rename {xrpl => xahau}/models/amounts/__init__.py (76%) rename {xrpl => xahau}/models/amounts/amount.py (94%) rename {xrpl => xahau}/models/amounts/issued_currency_amount.py (88%) rename {xrpl => xahau}/models/amounts/py.typed (100%) rename {xrpl => xahau}/models/auth_account.py (71%) rename {xrpl => xahau}/models/base_model.py (98%) rename {xrpl => xahau}/models/currencies/__init__.py (55%) rename {xrpl => xahau}/models/currencies/currency.py (65%) rename {xrpl => xahau}/models/currencies/issued_currency.py (81%) rename {xrpl => xahau}/models/currencies/py.typed (100%) rename {xrpl => xahau}/models/currencies/xrp.py (92%) rename {xrpl => xahau}/models/exceptions.py (75%) rename {xrpl => xahau}/models/flags.py (92%) rename {xrpl => xahau}/models/nested_model.py (97%) rename {xrpl => xahau}/models/path.py (94%) rename {xrpl => xahau}/models/py.typed (100%) create mode 100644 xahau/models/requests/__init__.py rename {xrpl => xahau}/models/requests/account_channels.py (87%) rename {xrpl => xahau}/models/requests/account_currencies.py (82%) rename {xrpl => xahau}/models/requests/account_info.py (81%) rename {xrpl => xahau}/models/requests/account_lines.py (85%) rename {xrpl => xahau}/models/requests/account_nfts.py (83%) rename {xrpl => xahau}/models/requests/account_objects.py (89%) rename {xrpl => xahau}/models/requests/account_offers.py (83%) rename {xrpl => xahau}/models/requests/account_tx.py (83%) rename {xrpl => xahau}/models/requests/amm_info.py (80%) rename {xrpl => xahau}/models/requests/book_offers.py (76%) rename {xrpl => xahau}/models/requests/channel_authorize.py (92%) rename {xrpl => xahau}/models/requests/channel_verify.py (84%) rename {xrpl => xahau}/models/requests/deposit_authorized.py (82%) rename {xrpl => xahau}/models/requests/feature.py (78%) rename {xrpl => xahau}/models/requests/fee.py (83%) rename {xrpl => xahau}/models/requests/gateway_balances.py (81%) rename {xrpl => xahau}/models/requests/generic_request.py (91%) rename {xrpl => xahau}/models/requests/get_aggregate_price.py (87%) rename {xrpl => xahau}/models/requests/ledger.py (78%) rename {xrpl => xahau}/models/requests/ledger_closed.py (80%) rename {xrpl => xahau}/models/requests/ledger_current.py (82%) rename {xrpl => xahau}/models/requests/ledger_data.py (81%) rename {xrpl => xahau}/models/requests/ledger_entry.py (96%) rename {xrpl => xahau}/models/requests/manifest.py (79%) rename {xrpl => xahau}/models/requests/nft_buy_offers.py (76%) rename {xrpl => xahau}/models/requests/nft_history.py (83%) rename {xrpl => xahau}/models/requests/nft_info.py (74%) rename {xrpl => xahau}/models/requests/nft_sell_offers.py (76%) rename {xrpl => xahau}/models/requests/nfts_by_issuer.py (80%) rename {xrpl => xahau}/models/requests/no_ripple_check.py (86%) rename {xrpl => xahau}/models/requests/path_find.py (94%) rename {xrpl => xahau}/models/requests/ping.py (76%) rename {xrpl => xahau}/models/requests/py.typed (100%) rename {xrpl => xahau}/models/requests/random.py (77%) rename {xrpl => xahau}/models/requests/request.py (86%) rename {xrpl => xahau}/models/requests/ripple_path_find.py (87%) rename {xrpl => xahau}/models/requests/server_definitions.py (81%) rename {xrpl => xahau}/models/requests/server_info.py (79%) rename {xrpl => xahau}/models/requests/server_state.py (88%) rename {xrpl => xahau}/models/requests/sign.py (93%) rename {xrpl => xahau}/models/requests/sign_and_submit.py (94%) rename {xrpl => xahau}/models/requests/sign_for.py (91%) rename {xrpl => xahau}/models/requests/submit.py (94%) rename {xrpl => xahau}/models/requests/submit_multisigned.py (90%) rename {xrpl => xahau}/models/requests/submit_only.py (94%) rename {xrpl => xahau}/models/requests/subscribe.py (87%) rename {xrpl => xahau}/models/requests/transaction_entry.py (83%) rename {xrpl => xahau}/models/requests/tx.py (94%) rename {xrpl => xahau}/models/requests/unsubscribe.py (80%) rename {xrpl => xahau}/models/required.py (100%) rename {xrpl => xahau}/models/response.py (92%) create mode 100644 xahau/models/transactions/__init__.py rename {xrpl => xahau}/models/transactions/account_delete.py (82%) rename {xrpl => xahau}/models/transactions/account_set.py (96%) rename {xrpl => xahau}/models/transactions/amm_bid.py (86%) rename {xrpl => xahau}/models/transactions/amm_create.py (90%) rename {xrpl => xahau}/models/transactions/amm_delete.py (83%) rename {xrpl => xahau}/models/transactions/amm_deposit.py (88%) rename {xrpl => xahau}/models/transactions/amm_vote.py (83%) rename {xrpl => xahau}/models/transactions/amm_withdraw.py (87%) rename {xrpl => xahau}/models/transactions/check_cancel.py (79%) rename {xrpl => xahau}/models/transactions/check_cash.py (86%) rename {xrpl => xahau}/models/transactions/check_create.py (85%) rename {xrpl => xahau}/models/transactions/clawback.py (78%) rename {xrpl => xahau}/models/transactions/deposit_preauth.py (88%) rename {xrpl => xahau}/models/transactions/did_delete.py (66%) rename {xrpl => xahau}/models/transactions/did_set.py (92%) rename {xrpl => xahau}/models/transactions/escrow_cancel.py (78%) rename {xrpl => xahau}/models/transactions/escrow_create.py (89%) rename {xrpl => xahau}/models/transactions/escrow_finish.py (89%) rename {xrpl => xahau}/models/transactions/metadata.py (98%) rename {xrpl => xahau}/models/transactions/nftoken_accept_offer.py (94%) rename {xrpl => xahau}/models/transactions/nftoken_burn.py (86%) rename {xrpl => xahau}/models/transactions/nftoken_cancel_offer.py (88%) rename {xrpl => xahau}/models/transactions/nftoken_create_offer.py (92%) rename {xrpl => xahau}/models/transactions/nftoken_mint.py (92%) rename {xrpl => xahau}/models/transactions/offer_cancel.py (78%) rename {xrpl => xahau}/models/transactions/offer_create.py (91%) rename {xrpl => xahau}/models/transactions/oracle_delete.py (74%) rename {xrpl => xahau}/models/transactions/oracle_set.py (93%) rename {xrpl => xahau}/models/transactions/payment.py (93%) rename {xrpl => xahau}/models/transactions/payment_channel_claim.py (92%) rename {xrpl => xahau}/models/transactions/payment_channel_create.py (88%) rename {xrpl => xahau}/models/transactions/payment_channel_fund.py (85%) rename {xrpl => xahau}/models/transactions/pseudo_transactions/__init__.py (60%) rename {xrpl => xahau}/models/transactions/pseudo_transactions/enable_amendment.py (91%) rename {xrpl => xahau}/models/transactions/pseudo_transactions/pseudo_transaction.py (82%) rename {xrpl => xahau}/models/transactions/pseudo_transactions/set_fee.py (92%) rename {xrpl => xahau}/models/transactions/pseudo_transactions/unl_modify.py (88%) rename {xrpl => xahau}/models/transactions/py.typed (100%) rename {xrpl => xahau}/models/transactions/set_regular_key.py (80%) rename {xrpl => xahau}/models/transactions/signer_list_set.py (94%) rename {xrpl => xahau}/models/transactions/ticket_create.py (76%) rename {xrpl => xahau}/models/transactions/transaction.py (95%) rename {xrpl => xahau}/models/transactions/trust_set.py (86%) create mode 100644 xahau/models/transactions/types/__init__.py rename {xrpl => xahau}/models/transactions/types/pseudo_transaction_type.py (100%) rename {xrpl => xahau}/models/transactions/types/transaction_type.py (100%) rename {xrpl => xahau}/models/transactions/xchain_account_create_commit.py (87%) rename {xrpl => xahau}/models/transactions/xchain_add_account_create_attestation.py (90%) rename {xrpl => xahau}/models/transactions/xchain_add_claim_attestation.py (89%) rename {xrpl => xahau}/models/transactions/xchain_claim.py (86%) rename {xrpl => xahau}/models/transactions/xchain_commit.py (85%) rename {xrpl => xahau}/models/transactions/xchain_create_bridge.py (89%) rename {xrpl => xahau}/models/transactions/xchain_create_claim_id.py (84%) rename {xrpl => xahau}/models/transactions/xchain_modify_bridge.py (89%) rename {xrpl => xahau}/models/types.py (100%) rename {xrpl => xahau}/models/utils.py (98%) rename {xrpl => xahau}/models/xchain_bridge.py (85%) rename {xrpl => xahau}/py.typed (100%) rename {xrpl => xahau}/transaction/__init__.py (70%) rename {xrpl => xahau}/transaction/main.py (93%) rename {xrpl => xahau}/transaction/multisign.py (89%) rename {xrpl => xahau}/transaction/py.typed (100%) rename {xrpl => xahau}/transaction/reliable_submission.py (87%) rename {xrpl => xahau}/utils/__init__.py (62%) rename {xrpl => xahau}/utils/get_nftoken_id.py (98%) rename {xrpl => xahau}/utils/get_xchain_claim_id.py (94%) rename {xrpl => xahau}/utils/parse_nftoken_id.py (96%) rename {xrpl => xahau}/utils/py.typed (100%) rename {xrpl => xahau}/utils/str_conversions.py (100%) rename {xrpl => xahau}/utils/time_conversions.py (99%) create mode 100644 xahau/utils/txn_parser/__init__.py rename {xrpl => xahau}/utils/txn_parser/get_balance_changes.py (94%) rename {xrpl => xahau}/utils/txn_parser/get_final_balances.py (93%) rename {xrpl => xahau}/utils/txn_parser/get_order_book_changes.py (79%) create mode 100644 xahau/utils/txn_parser/utils/__init__.py rename {xrpl => xahau}/utils/txn_parser/utils/balance_parser.py (93%) rename {xrpl => xahau}/utils/txn_parser/utils/nodes.py (96%) rename {xrpl => xahau}/utils/txn_parser/utils/order_book_parser.py (95%) rename {xrpl => xahau}/utils/txn_parser/utils/parser.py (95%) rename {xrpl => xahau}/utils/txn_parser/utils/types.py (100%) rename {xrpl => xahau}/utils/xrp_conversions.py (98%) create mode 100644 xahau/wallet/__init__.py rename {xrpl => xahau}/wallet/main.py (95%) rename {xrpl => xahau}/wallet/py.typed (100%) rename {xrpl => xahau}/wallet/wallet_generation.py (89%) delete mode 100644 xrpl/core/binarycodec/binary_wrappers/__init__.py delete mode 100644 xrpl/core/binarycodec/types/__init__.py delete mode 100644 xrpl/models/__init__.py delete mode 100644 xrpl/models/requests/__init__.py delete mode 100644 xrpl/models/transactions/__init__.py delete mode 100644 xrpl/models/transactions/types/__init__.py delete mode 100644 xrpl/utils/txn_parser/__init__.py delete mode 100644 xrpl/utils/txn_parser/utils/__init__.py delete mode 100644 xrpl/wallet/__init__.py diff --git a/.ci-config/rippled.cfg b/.ci-config/xahaud.cfg similarity index 69% rename from .ci-config/rippled.cfg rename to .ci-config/xahaud.cfg index 6038e6636..60c25a0f9 100644 --- a/.ci-config/rippled.cfg +++ b/.ci-config/xahaud.cfg @@ -43,7 +43,7 @@ small [node_db] type=NuDB -path=/var/lib/rippled/db/nudb +path=/var/lib/xahaud/db/nudb advisory_delete=0 # How many ledgers do we want to keep (history)? @@ -58,10 +58,10 @@ online_delete=256 256 [database_path] -/var/lib/rippled/db +/var/lib/xahaud/db [debug_logfile] -/var/log/rippled/debug.log +/var/log/xahaud/debug.log [sntp_servers] time.windows.com @@ -70,10 +70,10 @@ time.nist.gov pool.ntp.org [ips] -r.ripple.com 51235 +r.xahau.com 51235 -[validators_file] -validators.txt +# [validators_file] +# validators.txt [rpc_startup] { "command": "log_level", "severity": "info" } @@ -92,93 +92,74 @@ validators.txt # In order to enable an amendment which by default would vote "No", you must include its amendment id and name here. -# To add amendments specifically from the latest releases of rippled: +# To add amendments specifically from the latest releases of xahaud: # 1. Go to https://xrpl.org/known-amendments.html -# 2. Find the first amendment in the latest releases of rippled which are not already in the list below +# 2. Find the first amendment in the latest releases of xahaud which are not already in the list below # 3. Click on each amendment to get their Amendment ID and name to add to this list manually. -# You will likely update the list with all amendments from a new release of rippled all at once. +# You will likely update the list with all amendments from a new release of xahaud all at once. # To get the list of amendments on a network (e.g. devnet) follow the steps in xrpl.js's CONTRIBUTING.md for "Updating the Docker container". # https://github.com/XRPLF/xrpl.js/blob/main/CONTRIBUTING.md # (Running the script `getNewAmendments.js` should help you identify any new amendments that should be added.) # -# Note: The version of rippled you use this config with must have an implementation for the amendments you attempt to enable or it will crash. -# If you need the version of rippled to be more up to date, you may need to make a comment on this repo: https://github.com/WietseWind/docker-rippled +# Note: The version of xahaud you use this config with must have an implementation for the amendments you attempt to enable or it will crash. +# If you need the version of xahaud to be more up to date, you may need to make a comment on this repo: https://github.com/WietseWind/docker-xahaud # network_id is required otherwise it's read as None [network_id] 63456 [features] -# Devnet amendments as of June 28th, 2023 -NegativeUNL -fixRemoveNFTokenAutoTrustLine -NonFungibleTokensV1 +BalanceRewards CheckCashMakesTrustLine -fixRmSmallIncreasedQOffers -fixSTAmountCanonicalize -FlowSortStrands -TicketBatch -fix1201 -fixQualityUpperBound +Checks +CryptoConditionsSuite +DepositAuth +DepositPreauth +DisallowIncoming +ExpandedSignerList +Flow FlowCross -EnforceInvariants -fix1523 +FlowSortStrands HardenedValidations -DepositPreauth +Hooks +HooksUpdate1 +ImmediateOfferKilled +Import MultiSignReserve -fix1623 -FeeEscalation -PayChan -fix1513 +NegativeUNL +PaychanAndEscrowForTokens RequireFullyCanonicalSig -fix1543 -TickSize -fix1781 -fixCheckThreading +TicketBatch +URIToken +XRPFees +XahauGenesis +fix1513 fix1515 -CryptoConditions -fix1528 -fixPayChanRecipientOwnerDir -SortedDirectories -fix1578 +fix1543 fix1571 +fix1578 +fix1623 +fix1781 fixAmendmentMajorityCalc -fixTakerDryOfferRemoval +fixCheckThreading fixMasterKeyAsRegularKey -Flow -Escrow -TrustSetAuth -DeletableAccounts -DepositAuth -fix1368 -fix1512 -fix1373 -MultiSign -Checks -NonFungibleTokensV1_1 -# 1.10.0 Amendments -DisallowIncoming +fixNFTokenDirV1 +fixNFTokenNegOffer +fixNFTokenRemint fixNonFungibleTokensV1_2 -fixTrustLinesToSelf +fixPayChanRecipientOwnerDir +fixQualityUpperBound +fixRemoveNFTokenAutoTrustLine +fixRmSmallIncreasedQOffers +fixSTAmountCanonicalize +fixTakerDryOfferRemoval fixUniversalNumber -ImmediateOfferKilled -XRPFees -# 1.11.0 Amendments -ExpandedSignerList -# 1.12.0 Amendments -AMM -Clawback -fixReducedOffersV1 -fixNFTokenRemint -# 2.0.0-b4 Amendments -XChainBridge -DID -# 2.2.0-b3 Amendments -fixNFTokenReserve -fixInnerObjTemplate -fixAMMOverflowOffer -PriceOracle -fixEmptyDID -fixXChainRewardRounding -fixPreviousTxnID +fixXahauV1 +Remit +ZeroB2M +fixXahauV2 +fixNSDelete +fix240819 +fixPageCap +fix240911 diff --git a/.github/workflows/integration_test.yml b/.github/workflows/integration_test.yml index f224c70dd..4b1a944c6 100644 --- a/.github/workflows/integration_test.yml +++ b/.github/workflows/integration_test.yml @@ -2,11 +2,11 @@ name: Integration test env: POETRY_VERSION: 1.4.2 - RIPPLED_DOCKER_IMAGE: rippleci/rippled:2.2.0-b3 + XAHAUD_DOCKER_IMAGE: transia/xahaud:2024.9.11 on: push: - branches: [main] + branches: [main, xahau] pull_request: workflow_dispatch: @@ -32,7 +32,7 @@ jobs: - name: Run docker in background run: | - docker run --detach --rm --name rippled-service -p 5005:5005 -p 6006:6006 --volume "${{ github.workspace }}/.ci-config/":"/opt/ripple/etc/" --health-cmd="wget localhost:6006 || exit 1" --health-interval=5s --health-retries=10 --health-timeout=2s --env GITHUB_ACTIONS=true --env CI=true ${{ env.RIPPLED_DOCKER_IMAGE }} /opt/ripple/bin/rippled -a --conf /opt/ripple/etc/rippled.cfg + docker run --detach --rm --name xahaud-service -p 5005:5005 -p 6006:6006 --volume "${{ github.workspace }}/.ci-config/":"/opt/xahau/etc/" --health-cmd="wget localhost:6006 || exit 1" --health-interval=5s --health-retries=10 --health-timeout=2s --env GITHUB_ACTIONS=true --env CI=true ${{ env.XAHAUD_DOCKER_IMAGE }} /opt/xahau/bin/xahaud -a --conf /opt/xahau/etc/xahaud.cfg - name: Install poetry if: steps.cache-poetry.outputs.cache-hit != 'true' @@ -60,4 +60,4 @@ jobs: - name: Stop docker container if: always() - run: docker stop rippled-service + run: docker stop xahaud-service diff --git a/.github/workflows/snippet_test.yml b/.github/workflows/snippet_test.yml deleted file mode 100644 index 032de2f38..000000000 --- a/.github/workflows/snippet_test.yml +++ /dev/null @@ -1,51 +0,0 @@ -name: Snippets - -on: - push: - branches: [main] - pull_request: - workflow_dispatch: - -env: - POETRY_VERSION: 1.4.2 - -jobs: - snippet-test: - name: Snippet test - runs-on: ubuntu-latest - strategy: - matrix: - python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] - - steps: - - name: Checkout code - uses: actions/checkout@v3 - - - name: Load cached .local - id: cache-poetry - uses: actions/cache@v3 - with: - path: /home/runner/.local - key: dotlocal-${{ env.POETRY_VERSION }} - - - name: Install poetry - if: steps.cache-poetry.outputs.cache-hit != 'true' - run: | - curl -sSL https://install.python-poetry.org/ | python - --version ${{ env.POETRY_VERSION }} - echo "$HOME/.local/bin" >> $GITHUB_PATH - - - name: Install Python + Retrieve Poetry dependencies from cache - uses: actions/setup-python@v4 - with: - python-version: ${{ matrix.python-version }} - cache: "poetry" - - - name: Display Python version - run: | - python -c "import sys; print(sys.version)" - - - name: Install poetry dependencies - run: poetry install - - - name: Run Snippets - run: (for i in snippets/*.py; do echo "Running $i" && poetry run python $i || exit 1; done) diff --git a/.github/workflows/unit_test.yml b/.github/workflows/unit_test.yml index b1c8ce2fa..814ec27dc 100644 --- a/.github/workflows/unit_test.yml +++ b/.github/workflows/unit_test.yml @@ -2,7 +2,7 @@ name: Unit test on: push: - branches: [main] + branches: [main, xahau] pull_request: workflow_dispatch: @@ -49,11 +49,11 @@ jobs: - name: Lint run: | - poetry run flake8 xrpl tests snippets --darglint-ignore-regex="^_(.*)" + poetry run flake8 xahau tests snippets --darglint-ignore-regex="^_(.*)" - name: Type-check run: | - poetry run mypy --strict --implicit-reexport xrpl snippets + poetry run mypy --strict --implicit-reexport xahau snippets unit-test: name: Unit test diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 7ca00e5c8..9e68b337a 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -29,11 +29,11 @@ repos: entry: poetry run mypy args: ["--strict", "--implicit-reexport"] language: system - files: xrpl/ + files: xahau/ types: [python] - id: sphinx name: sphinx - entry: poetry run sphinx-apidoc -o docs/source xrpl + entry: poetry run sphinx-apidoc -o docs/source xahau language: system pass_filenames: false files: __init__ diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index af34609b7..1bcceb254 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -66,7 +66,7 @@ To run linting and other checks, `xrpl-py` uses [`pre-commit`](https://pre-commi To run the linter: ```bash -poetry run flake8 xrpl tests --darglint-ignore-regex="^_(.*)" +poetry run flake8 xahau tests --darglint-ignore-regex="^_(.*)" ``` ### Running Tests @@ -87,20 +87,20 @@ poetry run poe test_unit #### Integration Tests -To run integration tests, you'll need a standalone rippled node running with WS port `6006` and JSON RPC port `5005`. You can run a docker container for this: +To run integration tests, you'll need a standalone xahaud node running with WS port `6006` and JSON RPC port `5005`. You can run a docker container for this: ```bash -docker run -p 5005:5005 -p 6006:6006 --interactive -t --volume $PWD/.ci-config:/opt/ripple/etc/ --platform linux/amd64 rippleci/rippled:2.2.0-b3 /opt/ripple/bin/rippled -a --conf /opt/ripple/etc/rippled.cfg +docker run -p 5005:5005 -p 6006:6006 --interactive -t --volume $PWD/.ci-config:/opt/xahau/etc/ --platform linux/amd64 xahauci/xahaud:2024.9.11 /opt/xahau/bin/xahaud -a --conf /opt/xahau/etc/xahaud.cfg ``` Breaking down the command: * `docker run -p 5005:5005 -p 6006:6006` starts a Docker container with an open port for admin JsonRPC and WebSocket requests. * `--interactive` allows you to interact with the container. * `-t` starts a terminal in the container for you to send commands to. -* `--volume $PWD/.ci-config:/config/` identifies the `rippled.cfg` and `validators.txt` to import. It must be an absolute path, so we use `$PWD` instead of `./`. -* `xrpllabsofficial/xrpld:1.12.0` is an image that is regularly updated with the latest `rippled` releases and can be found here: https://github.com/WietseWind/docker-rippled -* `-a` starts `rippled` in standalone mode -* `--start` signals to start `rippled` with the specified amendments in `rippled.cfg` enabled immediately instead of voting for 2 weeks on them. +* `--volume $PWD/.ci-config:/config/` identifies the `xahaud.cfg` and `validators.txt` to import. It must be an absolute path, so we use `$PWD` instead of `./`. +* `xahauci/xahaud:2024.9.11` is an image that is regularly updated with the latest `xahaud` releases and can be found here: https://github.com/WietseWind/docker-xahaud +* `-a` starts `xahaud` in standalone mode +* `--start` signals to start `xahaud` with the specified amendments in `xahaud.cfg` enabled immediately instead of voting for 2 weeks on them. Then to actually run the tests, run the command: @@ -143,7 +143,7 @@ You can see the complete reference documentation at [`xrpl-py` docs](https://xrp cd docs/ # Build the docs -poetry run sphinx-apidoc -o source/ ../xrpl +poetry run sphinx-apidoc -o source/ ../xahau poetry run make html ``` @@ -183,10 +183,10 @@ Examples can be found in subfolders of [tests/integrations](https://github.com/X This should almost always be done using the [`xrpl-codec-gen`](https://github.com/RichardAH/xrpl-codec-gen) script - if the output needs manual intervention afterwards, consider updating the script instead. -1. Clone / pull the latest changes from [rippled](https://github.com/XRPLF/rippled) - Specifically the `develop` branch is usually the right one. +1. Clone / pull the latest changes from [xahaud](https://github.com/XRPLF/xahaud) - Specifically the `develop` branch is usually the right one. 2. Clone / pull the latest changes from [`xrpl-codec-gen`](https://github.com/RichardAH/xrpl-codec-gen) 3. From the `xrpl-codec-gen` tool, follow the steps in the `README.md` to generate a new `definitions.json` file. -4. Replace the `definitions.json` file in the `ripple-binary-codec` with the newly generated file. +4. Replace the `definitions.json` file in the `xahau-binary-codec` with the newly generated file. 5. Verify that the changes make sense by inspection before submitting, as there may be updates required for the `xrpl-codec-gen` tool depending on the latest amendments we're updating to match. @@ -214,15 +214,15 @@ This should almost always be done using the [`xrpl-codec-gen`](https://github.co 5. Publish the update by running `poetry publish`. - This will require entering PyPI login info. 6. Create a new Github release/tag off of this branch. -7. Send an email to [xrpl-announce](https://groups.google.com/g/xrpl-announce). +7. Send an email to [xahau-announce](https://groups.google.com/g/xahau-announce). 8. Post an announcement in the [XRPL Discord #python channel](https://discord.com/channels/886050993802985492/886053080913821717) with a link to the changes and highlighting key changes. ## Mailing Lists We have a low-traffic mailing list for announcements of new `xrpl-py` releases. (About 1 email every couple of weeks) -- [Subscribe to xrpl-announce](https://groups.google.com/g/xrpl-announce) +- [Subscribe to xahau-announce](https://groups.google.com/g/xahau-announce) -If you're using the XRP Ledger in production, you should run a [rippled server](https://github.com/ripple/rippled) and subscribe to the ripple-server mailing list as well. +If you're using the XRP Ledger in production, you should run a [xahaud server](https://github.com/xahau/xahaud) and subscribe to the xahau-server mailing list as well. -- [Subscribe to ripple-server](https://groups.google.com/g/ripple-server) +- [Subscribe to xahau-server](https://groups.google.com/g/xahau-server) diff --git a/README.md b/README.md index 21e3cdae4..5e2bd2fe1 100644 --- a/README.md +++ b/README.md @@ -1,22 +1,22 @@ -[![Documentation Status](https://readthedocs.org/projects/xrpl-py/badge)](https://xrpl-py.readthedocs.io/) +[![Documentation Status](https://readthedocs.org/projects/xahau-py/badge)](https://xahau-py.readthedocs.io/) -# xrpl-py +# xahau-py -A pure Python implementation for interacting with the [XRP Ledger](https://xrpl.org/). +A pure Python implementation for interacting with the [Xahau Ledger](https://xahau.org/). -The `xrpl-py` library simplifies the hardest parts of XRP Ledger interaction, like serialization and transaction signing. It also provides native Python methods and models for [XRP Ledger transactions](https://xrpl.org/transaction-formats.html) and core server [API](https://xrpl.org/api-conventions.html) ([`rippled`](https://github.com/ripple/rippled)) objects. +The `xahau-py` library simplifies the hardest parts of Xahau Ledger interaction, like serialization and transaction signing. It also provides native Python methods and models for [Xahau Ledger transactions](https://xahau.org/transaction-formats.html) and core server [API](https://xahau.org/api-conventions.html) ([`rippled`](https://github.com/ripple/rippled)) objects. As an example, this is how you would use this library to send a payment on testnet: ```py -from xrpl.account import get_balance -from xrpl.clients import JsonRpcClient -from xrpl.models import Payment, Tx -from xrpl.transaction import submit_and_wait -from xrpl.wallet import generate_faucet_wallet +from xahau.account import get_balance +from xahau.clients import JsonRpcClient +from xahau.models import Payment, Tx +from xahau.transaction import submit_and_wait +from xahau.wallet import generate_faucet_wallet # Create a client to connect to the test network -client = JsonRpcClient("https://s.altnet.rippletest.net:51234") +client = JsonRpcClient("https://xahau-test.net") # Create two wallets to send money between on the test network wallet1 = generate_faucet_wallet(client, debug=True) @@ -52,66 +52,66 @@ print(get_balance(wallet1.address, client)) print(get_balance(wallet2.address, client)) ``` -[![Downloads](https://pepy.tech/badge/xrpl-py/month)](https://pepy.tech/project/xrpl-py/month) -[![Contributors](https://img.shields.io/github/contributors/xpring-eng/xrpl-py.svg)](https://github.com/xpring-eng/xrpl-py/graphs/contributors) +[![Downloads](https://pepy.tech/badge/xahau-py/month)](https://pepy.tech/project/xahau-py/month) +[![Contributors](https://img.shields.io/github/contributors/xpring-eng/xahau-py.svg)](https://github.com/xpring-eng/xahau-py/graphs/contributors) ## Installation and supported versions -The `xrpl-py` library is available on [PyPI](https://pypi.org/). Install with `pip`: +The `xahau-py` library is available on [PyPI](https://pypi.org/). Install with `pip`: ``` -pip3 install xrpl-py +pip3 install xahau-py ``` The library supports [Python 3.8](https://www.python.org/downloads/) and later. -[![Supported Versions](https://img.shields.io/pypi/pyversions/xrpl-py.svg)](https://pypi.org/project/xrpl-py) +[![Supported Versions](https://img.shields.io/pypi/pyversions/xahau-py.svg)](https://pypi.org/project/xahau-py) ## Features -Use `xrpl-py` to build Python applications that leverage the [XRP Ledger](https://xrpl.org/). The library helps with all aspects of interacting with the XRP Ledger, including: +Use `xahau-py` to build Python applications that leverage the [Xahau Ledger](https://xahau.org/). The library helps with all aspects of interacting with the Xahau Ledger, including: * Key and wallet management * Serialization * Transaction Signing -`xrpl-py` also provides: +`xahau-py` also provides: -* A network client — See [`xrpl.clients`](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.clients.html) for more information. -* Methods for inspecting accounts — See [XRPL Account Methods](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.account.html) for more information. -* Codecs for encoding and decoding addresses and other objects — See [Core Codecs](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.core.html) for more information. +* A network client — See [`xahau.clients`](https://xahau-py.readthedocs.io/en/stable/source/xahau.clients.html) for more information. +* Methods for inspecting accounts — See [XRPL Account Methods](https://xahau-py.readthedocs.io/en/stable/source/xahau.account.html) for more information. +* Codecs for encoding and decoding addresses and other objects — See [Core Codecs](https://xahau-py.readthedocs.io/en/stable/source/xahau.core.html) for more information. -## [➡️ Reference Documentation](https://xrpl-py.readthedocs.io/en/stable/) +## [➡️ Reference Documentation](https://xahau-py.readthedocs.io/en/stable/) -See the complete [`xrpl-py` reference documentation on Read the Docs](https://xrpl-py.readthedocs.io/en/stable/index.html). +See the complete [`xahau-py` reference documentation on Read the Docs](https://xahau-py.readthedocs.io/en/stable/index.html). ## Usage -The following sections describe some of the most commonly used modules in the `xrpl-py` library and provide sample code. +The following sections describe some of the most commonly used modules in the `xahau-py` library and provide sample code. ### Network client -Use the `xrpl.clients` library to create a network client for connecting to the XRP Ledger. +Use the `xahau.clients` library to create a network client for connecting to the Xahau Ledger. ```py -from xrpl.clients import JsonRpcClient -JSON_RPC_URL = "https://s.altnet.rippletest.net:51234" +from xahau.clients import JsonRpcClient +JSON_RPC_URL = "https://xahau-test.net" client = JsonRpcClient(JSON_RPC_URL) ``` ### Manage keys and wallets -#### `xrpl.wallet` +#### `xahau.wallet` -Use the [`xrpl.wallet`](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.wallet.html) module to create a wallet from a given seed or or via a [Testnet faucet](https://xrpl.org/xrp-testnet-faucet.html). +Use the [`xahau.wallet`](https://xahau-py.readthedocs.io/en/stable/source/xahau.wallet.html) module to create a wallet from a given seed or or via a [Testnet faucet](https://xahau.org/xrp-testnet-faucet.html). -To create a wallet from a seed (in this case, the value generated using [`xrpl.keypairs`](#xrpl-keypairs)): +To create a wallet from a seed (in this case, the value generated using [`xahau.keypairs`](#xahau-keypairs)): ```py -wallet_from_seed = xrpl.wallet.Wallet.from_seed(seed) +wallet_from_seed = xahau.wallet.Wallet.from_seed(seed) print(wallet_from_seed) # pub_key: ED46949E414A3D6D758D347BAEC9340DC78F7397FEE893132AAF5D56E4D7DE77B0 # priv_key: -HIDDEN- @@ -127,15 +127,15 @@ print("Classic address:", test_account) # Classic address: rEQB2hhp3rg7sHj6L8YyR4GG47Cb7pfcuw ``` -#### `xrpl.core.keypairs` +#### `xahau.core.keypairs` -Use the [`xrpl.core.keypairs`](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.core.keypairs.html#module-xrpl.core.keypairs) module to generate seeds and derive keypairs and addresses from those seed values. +Use the [`xahau.core.keypairs`](https://xahau-py.readthedocs.io/en/stable/source/xahau.core.keypairs.html#module-xahau.core.keypairs) module to generate seeds and derive keypairs and addresses from those seed values. -Here's an example of how to generate a `seed` value and derive an [XRP Ledger "classic" address](https://xrpl.org/cryptographic-keys.html#account-id-and-address) from that seed. +Here's an example of how to generate a `seed` value and derive an [Xahau Ledger "classic" address](https://xahau.org/cryptographic-keys.html#account-id-and-address) from that seed. ```py -from xrpl.core import keypairs +from xahau.core import keypairs seed = keypairs.generate_seed() public, private = keypairs.derive_keypair(seed) test_account = keypairs.derive_classic_address(public) @@ -151,34 +151,34 @@ print("Store this in a secure place!") # Store this in a secure place! ``` -**Note:** You can use `xrpl.core.keypairs.sign` to sign transactions but `xrpl-py` also provides explicit methods for safely signing and submitting transactions. See [Transaction Signing](#transaction-signing) and [XRPL Transaction Methods](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.transaction.html#module-xrpl.transaction) for more information. +**Note:** You can use `xahau.core.keypairs.sign` to sign transactions but `xahau-py` also provides explicit methods for safely signing and submitting transactions. See [Transaction Signing](#transaction-signing) and [XRPL Transaction Methods](https://xahau-py.readthedocs.io/en/stable/source/xahau.transaction.html#module-xahau.transaction) for more information. ### Serialize and sign transactions -To securely submit transactions to the XRP Ledger, you need to first serialize data from JSON and other formats into the [XRP Ledger's canonical format](https://xrpl.org/serialization.html), then to [authorize the transaction](https://xrpl.org/transaction-basics.html#authorizing-transactions) by digitally [signing it](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.core.keypairs.html?highlight=sign#xrpl.core.keypairs.sign) with the account's private key. The `xrpl-py` library provides several methods to simplify this process. +To securely submit transactions to the Xahau Ledger, you need to first serialize data from JSON and other formats into the [Xahau Ledger's canonical format](https://xahau.org/serialization.html), then to [authorize the transaction](https://xahau.org/transaction-basics.html#authorizing-transactions) by digitally [signing it](https://xahau-py.readthedocs.io/en/stable/source/xahau.core.keypairs.html?highlight=sign#xahau.core.keypairs.sign) with the account's private key. The `xahau-py` library provides several methods to simplify this process. -Use the [`xrpl.transaction`](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.transaction.html) module to sign and submit transactions. The module offers three ways to do this: +Use the [`xahau.transaction`](https://xahau-py.readthedocs.io/en/stable/source/xahau.transaction.html) module to sign and submit transactions. The module offers three ways to do this: -* [`sign_and_submit`](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.transaction.html#xrpl.transaction.sign_and_submit) — Signs a transaction locally, then submits it to the XRP Ledger. This method does not implement [reliable transaction submission](https://xrpl.org/reliable-transaction-submission.html#reliable-transaction-submission) best practices, so only use it for development or testing purposes. +* [`sign_and_submit`](https://xahau-py.readthedocs.io/en/stable/source/xahau.transaction.html#xahau.transaction.sign_and_submit) — Signs a transaction locally, then submits it to the Xahau Ledger. This method does not implement [reliable transaction submission](https://xahau.org/reliable-transaction-submission.html#reliable-transaction-submission) best practices, so only use it for development or testing purposes. -* [`sign`](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.transaction.html#xrpl.transaction.sign) — Signs a transaction locally. This method **does not** submit the transaction to the XRP Ledger. +* [`sign`](https://xahau-py.readthedocs.io/en/stable/source/xahau.transaction.html#xahau.transaction.sign) — Signs a transaction locally. This method **does not** submit the transaction to the Xahau Ledger. -* [`submit_and_wait`](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.transaction.html#xrpl.transaction.submit_and_wait) — An implementation of the [reliable transaction submission guidelines](https://xrpl.org/reliable-transaction-submission.html#reliable-transaction-submission), this method submits a signed transaction to the XRP Ledger and then verifies that it has been included in a validated ledger (or has failed to do so). Use this method to submit transactions for production purposes. +* [`submit_and_wait`](https://xahau-py.readthedocs.io/en/stable/source/xahau.transaction.html#xahau.transaction.submit_and_wait) — An implementation of the [reliable transaction submission guidelines](https://xahau.org/reliable-transaction-submission.html#reliable-transaction-submission), this method submits a signed transaction to the Xahau Ledger and then verifies that it has been included in a validated ledger (or has failed to do so). Use this method to submit transactions for production purposes. ```py -from xrpl.models.transactions import Payment -from xrpl.transaction import sign, submit_and_wait -from xrpl.ledger import get_latest_validated_ledger_sequence -from xrpl.account import get_next_valid_seq_number +from xahau.models.transactions import Payment +from xahau.transaction import sign, submit_and_wait +from xahau.ledger import get_latest_validated_ledger_sequence +from xahau.account import get_next_valid_seq_number current_validated_ledger = get_latest_validated_ledger_sequence(client) # prepare the transaction # the amount is expressed in drops, not XRP -# see https://xrpl.org/basic-data-types.html#specifying-currency-amounts +# see https://xahau.org/basic-data-types.html#specifying-currency-amounts my_tx_payment = Payment( account=test_wallet.address, amount="2200000", @@ -194,13 +194,13 @@ my_tx_payment_signed = sign(my_tx_payment,test_wallet) tx_response = submit_and_wait(my_tx_payment_signed, client) ``` -#### Get fee from the XRP Ledger +#### Get fee from the Xahau Ledger -In most cases, you can specify the minimum [transaction cost](https://xrpl.org/transaction-cost.html#current-transaction-cost) of `"10"` for the `fee` field unless you have a strong reason not to. But if you want to get the [current load-balanced transaction cost](https://xrpl.org/transaction-cost.html#current-transaction-cost) from the network, you can use the `get_fee` function: +In most cases, you can specify the minimum [transaction cost](https://xahau.org/transaction-cost.html#current-transaction-cost) of `"10"` for the `fee` field unless you have a strong reason not to. But if you want to get the [current load-balanced transaction cost](https://xahau.org/transaction-cost.html#current-transaction-cost) from the network, you can use the `get_fee` function: ```py -from xrpl.ledger import get_fee +from xahau.ledger import get_fee fee = get_fee(client) print(fee) # 10 @@ -208,14 +208,14 @@ print(fee) #### Auto-filled fields -The `xrpl-py` library automatically populates the `fee`, `sequence` and `last_ledger_sequence` fields when you create transactions. In the example above, you could omit those fields and let the library fill them in for you. +The `xahau-py` library automatically populates the `fee`, `sequence` and `last_ledger_sequence` fields when you create transactions. In the example above, you could omit those fields and let the library fill them in for you. ```py -from xrpl.models.transactions import Payment -from xrpl.transaction import submit_and_wait, autofill_and_sign +from xahau.models.transactions import Payment +from xahau.transaction import submit_and_wait, autofill_and_sign # prepare the transaction # the amount is expressed in drops, not XRP -# see https://xrpl.org/basic-data-types.html#specifying-currency-amounts +# see https://xahau.org/basic-data-types.html#specifying-currency-amounts my_tx_payment = Payment( account=test_wallet.address, amount="2200000", @@ -258,9 +258,9 @@ tx_response = submit_and_wait(my_tx_payment_signed, client) You can send `subscribe` and `unsubscribe` requests only using the WebSocket network client. These request methods allow you to be alerted of certain situations as they occur, such as when a new ledger is declared. ```py -from xrpl.clients import WebsocketClient +from xahau.clients import WebsocketClient url = "wss://s.altnet.rippletest.net/" -from xrpl.models import Subscribe, StreamParameter +from xahau.models import Subscribe, StreamParameter req = Subscribe(streams=[StreamParameter.LEDGER]) # NOTE: this code will run forever without a timeout, until the process is killed with WebsocketClient(url) as client: @@ -276,17 +276,17 @@ with WebsocketClient(url) as client: ### Asynchronous Code -This library supports Python's [`asyncio`](https://docs.python.org/3/library/asyncio.html) package, which is used to run asynchronous code. All the async code is in [`xrpl.asyncio`](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.asyncio.html) If you are writing asynchronous code, please note that you will not be able to use any synchronous sugar functions, due to how event loops are handled. However, every synchronous method has a corresponding asynchronous method that you can use. +This library supports Python's [`asyncio`](https://docs.python.org/3/library/asyncio.html) package, which is used to run asynchronous code. All the async code is in [`xahau.asyncio`](https://xahau-py.readthedocs.io/en/stable/source/xahau.asyncio.html) If you are writing asynchronous code, please note that you will not be able to use any synchronous sugar functions, due to how event loops are handled. However, every synchronous method has a corresponding asynchronous method that you can use. This sample code is the asynchronous equivalent of the above section on submitting a transaction. ```py import asyncio -from xrpl.models.transactions import Payment -from xrpl.asyncio.transaction import sign, submit_and_wait -from xrpl.asyncio.ledger import get_latest_validated_ledger_sequence -from xrpl.asyncio.account import get_next_valid_seq_number -from xrpl.asyncio.clients import AsyncJsonRpcClient +from xahau.models.transactions import Payment +from xahau.asyncio.transaction import sign, submit_and_wait +from xahau.asyncio.ledger import get_latest_validated_ledger_sequence +from xahau.asyncio.account import get_next_valid_seq_number +from xahau.asyncio.clients import AsyncJsonRpcClient async_client = AsyncJsonRpcClient(JSON_RPC_URL) @@ -295,7 +295,7 @@ async def submit_sample_transaction(): # prepare the transaction # the amount is expressed in drops, not XRP - # see https://xrpl.org/basic-data-types.html#specifying-currency-amounts + # see https://xahau.org/basic-data-types.html#specifying-currency-amounts my_tx_payment = Payment( account=test_wallet.address, amount="2200000", @@ -312,11 +312,11 @@ asyncio.run(submit_sample_transaction()) ### Encode addresses -Use [`xrpl.core.addresscodec`](https://xrpl-py.readthedocs.io/en/stable/source/xrpl.core.addresscodec.html) to encode and decode addresses into and from the ["classic" and X-address formats](https://xrpl.org/accounts.html#addresses). +Use [`xahau.core.addresscodec`](https://xahau-py.readthedocs.io/en/stable/source/xahau.core.addresscodec.html) to encode and decode addresses into and from the ["classic" and X-address formats](https://xahau.org/accounts.html#addresses). ```py # convert classic address to x-address -from xrpl.core import addresscodec +from xahau.core import addresscodec testnet_xaddress = ( addresscodec.classic_address_to_xaddress( "rMPUKmzmDWEX1tQhzQ8oGFNfAEhnWNFwz", @@ -330,7 +330,7 @@ print(testnet_xaddress) ## Migrating -If you're currently using `xrpl-py` version 1, you can use [this guide to migrate to v2](https://xrpl.org/blog/2023/xrpl-py-2.0-release.html). +If you're currently using `xahau-py` version 1, you can use [this guide to migrate to v2](https://xahau.org/blog/2023/xahau-py-2.0-release.html). ## Contributing @@ -338,25 +338,25 @@ If you want to contribute to this project, see [CONTRIBUTING.md]. ### Mailing Lists -We have a low-traffic mailing list for announcements of new `xrpl-py` releases. (About 1 email per week) +We have a low-traffic mailing list for announcements of new `xahau-py` releases. (About 1 email per week) -+ [Subscribe to xrpl-announce](https://groups.google.com/g/xrpl-announce) ++ [Subscribe to xahau-announce](https://groups.google.com/g/xahau-announce) -If you're using the XRP Ledger in production, you should run a [rippled server](https://github.com/ripple/rippled) and subscribe to the ripple-server mailing list as well. +If you're using the Xahau Ledger in production, you should run a [rippled server](https://github.com/ripple/rippled) and subscribe to the ripple-server mailing list as well. + [Subscribe to ripple-server](https://groups.google.com/g/ripple-server) ### Code Samples -- For samples of common use cases, see the [XRPL.org Code Samples](https://xrpl.org/code-samples.html) page. +- For samples of common use cases, see the [XRPL.org Code Samples](https://xahau.org/code-samples.html) page. - You can also browse those samples [directly on GitHub](https://github.com/XRPLF/xrpl-dev-portal/tree/master/content/_code-samples). ### Report an issue -Experienced an issue? Report it [here](https://github.com/XRPLF/xrpl-py/issues/new). +Experienced an issue? Report it [here](https://github.com/XRPLF/xahau-py/issues/new). ## License -The `xrpl-py` library is licensed under the ISC License. See [LICENSE] for more information. +The `xahau-py` library is licensed under the ISC License. See [LICENSE] for more information. diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index d4bb2cbb9..000000000 --- a/docs/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -# Minimal makefile for Sphinx documentation -# - -# You can set these variables from the command line, and also -# from the environment for the first two. -SPHINXOPTS ?= -SPHINXBUILD ?= sphinx-build -SOURCEDIR = . -BUILDDIR = _build - -# Put it first so that "make" without argument is like "make help". -help: - @$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) - -.PHONY: help Makefile - -# Catch-all target: route all unknown targets to Sphinx using the new -# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS). -%: Makefile - @$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O) diff --git a/docs/conf.py b/docs/conf.py deleted file mode 100644 index 105cef27b..000000000 --- a/docs/conf.py +++ /dev/null @@ -1,61 +0,0 @@ -"""Sphinx configuration for xrpl-py.""" -# Configuration file for the Sphinx documentation builder. -# -# This file only contains a selection of the most common options. For a full -# list see the documentation: -# https://www.sphinx-doc.org/en/master/usage/configuration.html - -# -- Path setup -------------------------------------------------------------- - -# If extensions (or modules to document with autodoc) are in another directory, -# add these directories to sys.path here. If the directory is relative to the -# documentation root, use os.path.abspath to make it absolute, like shown here. -# -import os -import sys -import sphinx_rtd_theme - -sys.path.insert(0, os.path.abspath("../")) - - -# -- Project information ----------------------------------------------------- - -project = "xrpl-py" -copyright = "2021, ripplex" -author = "ripplex" - - -# -- General configuration --------------------------------------------------- - -# Add any Sphinx extension module names here, as strings. They can be -# extensions coming with Sphinx (named 'sphinx.ext.*') or your custom -# ones. -extensions = ["sphinx.ext.autodoc", "sphinx.ext.napoleon"] - -# Add any paths that contain templates here, relative to this directory. -templates_path = ["_templates"] - -# List of patterns, relative to source directory, that match files and -# directories to ignore when looking for source files. -# This pattern also affects html_static_path and html_extra_path. -exclude_patterns = ["_build", "Thumbs.db", ".DS_Store"] - - -# -- Options for HTML output ------------------------------------------------- - -# The theme to use for HTML and HTML Help pages. See the documentation for -# a list of builtin themes. -# -# html_theme = "alabaster" - -# This overrides Sphinx's default theme of 'alabaster' -html_theme = "sphinx_rtd_theme" -html_theme_path = [sphinx_rtd_theme.get_html_theme_path()] - -# Add any paths that contain custom static files (such as style sheets) here, -# relative to this directory. They are copied after the builtin static files, -# so a file named "default.css" will overwrite the builtin "default.css". -html_static_path = ["_static"] - -# You can test your changes to this config by activating a branch on ReadTheDocs. -# See CONTRIBUTING.md for more details. diff --git a/docs/index.rst b/docs/index.rst deleted file mode 100644 index 384b439a1..000000000 --- a/docs/index.rst +++ /dev/null @@ -1,51 +0,0 @@ -.. xrpl-py documentation master file, created by - sphinx-quickstart on Mon Feb 8 13:40:11 2021. - You can adapt this file completely to your liking, but it should at least - contain the root `toctree` directive. - -Welcome to xrpl-py's Documentation! -=================================== - -A pure Python implementation for interacting with the XRP Ledger, the ``xrpl-py`` library simplifies the hardest parts of XRP Ledger interaction, like serialization and transaction signing, by providing native Python methods and models for `XRP Ledger transactions `_ and core server `API `_ (`rippled `_) objects. - - -See the `project README `_ for more information about its features and usage examples. - - - -Install --------------- -First, ensure that you have `Python 3.8 `_ or later. - -Then, download the package via ``pip``: - -``pip3 install xrpl-py`` - -Report Issues --------------- - -If you run into any bugs or other problems with the library, please report them as issues in the `xrpl-py repo `_. - -.. toctree:: - :maxdepth: 1 - :caption: Table of Contents - - source/snippets - source/xrpl.account - source/xrpl.ledger - source/xrpl.transaction - source/xrpl.wallet - source/xrpl.clients - source/xrpl.models - source/xrpl.utils - source/xrpl - source/xrpl.core - source/xrpl.asyncio - - -Indices and Tables -================== - -* :ref:`genindex` -* :ref:`modindex` -* :ref:`search` diff --git a/docs/make.bat b/docs/make.bat deleted file mode 100644 index 2119f5109..000000000 --- a/docs/make.bat +++ /dev/null @@ -1,35 +0,0 @@ -@ECHO OFF - -pushd %~dp0 - -REM Command file for Sphinx documentation - -if "%SPHINXBUILD%" == "" ( - set SPHINXBUILD=sphinx-build -) -set SOURCEDIR=. -set BUILDDIR=_build - -if "%1" == "" goto help - -%SPHINXBUILD% >NUL 2>NUL -if errorlevel 9009 ( - echo. - echo.The 'sphinx-build' command was not found. Make sure you have Sphinx - echo.installed, then set the SPHINXBUILD environment variable to point - echo.to the full path of the 'sphinx-build' executable. Alternatively you - echo.may add the Sphinx directory to PATH. - echo. - echo.If you don't have Sphinx installed, grab it from - echo.http://sphinx-doc.org/ - exit /b 1 -) - -%SPHINXBUILD% -M %1 %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% -goto end - -:help -%SPHINXBUILD% -M help %SOURCEDIR% %BUILDDIR% %SPHINXOPTS% %O% - -:end -popd diff --git a/docs/source/modules.rst b/docs/source/modules.rst deleted file mode 100644 index 8feca331c..000000000 --- a/docs/source/modules.rst +++ /dev/null @@ -1 +0,0 @@ -:orphan: diff --git a/docs/source/snippets.rst b/docs/source/snippets.rst deleted file mode 100644 index a37913164..000000000 --- a/docs/source/snippets.rst +++ /dev/null @@ -1,37 +0,0 @@ -XRPL Code Snippets -=================== - -Code snippets to demonstrate basic usage of the xrpl-py library. - -.. toctree:: - :maxdepth: 1 - -Look Up a Transaction on the Ledger -------------------------------------- - -.. literalinclude:: ../../snippets/get_transaction.py - -Send a Transaction and See if It Gets Validated ------------------------------------------------ - -.. literalinclude:: ../../snippets/reliable_transaction_submission.py - -Set a Regular Key ------------------------------------------------ - -.. literalinclude:: ../../snippets/set_regular_key.py - -Set up an Escrow ------------------ - -.. literalinclude:: ../../snippets/send_escrow.py - -Find the Best Path to Trade With ----------------------------------- - -.. literalinclude:: ../../snippets/paths.py - -Handle Partial Payments ------------------------- - -.. literalinclude:: ../../snippets/partial_payment.py diff --git a/docs/source/xrpl.account.rst b/docs/source/xrpl.account.rst deleted file mode 100644 index fd283a8af..000000000 --- a/docs/source/xrpl.account.rst +++ /dev/null @@ -1,7 +0,0 @@ -Account Methods -==================== - -.. automodule:: xrpl.account - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.asyncio.account.rst b/docs/source/xrpl.asyncio.account.rst deleted file mode 100644 index 1efb6f3a1..000000000 --- a/docs/source/xrpl.asyncio.account.rst +++ /dev/null @@ -1,7 +0,0 @@ -Account Methods -==================== - -.. automodule:: xrpl.asyncio.account - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.asyncio.clients.rst b/docs/source/xrpl.asyncio.clients.rst deleted file mode 100644 index b52c2524a..000000000 --- a/docs/source/xrpl.asyncio.clients.rst +++ /dev/null @@ -1,6 +0,0 @@ -Async Network Clients -======================= - -.. automodule:: xrpl.asyncio.clients - :members: - :inherited-members: diff --git a/docs/source/xrpl.asyncio.ledger.rst b/docs/source/xrpl.asyncio.ledger.rst deleted file mode 100644 index 9f1d5551a..000000000 --- a/docs/source/xrpl.asyncio.ledger.rst +++ /dev/null @@ -1,7 +0,0 @@ -Ledger Methods -=================== - -.. automodule:: xrpl.asyncio.ledger - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.asyncio.rst b/docs/source/xrpl.asyncio.rst deleted file mode 100644 index 609a245ec..000000000 --- a/docs/source/xrpl.asyncio.rst +++ /dev/null @@ -1,16 +0,0 @@ -Async Support -=================== - -The `xrpl-py` library supports `Python's asyncio implementation `_. All of these methods are equivalent to the synchronous ones. - -Due to the way that `asyncio` event loops are handled, you cannot call synchronous methods from asynchronous code. Each synchronous method has an equivalent asynchronous method in this module that should be used instead. - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - xrpl.asyncio.account - xrpl.asyncio.ledger - xrpl.asyncio.transaction - xrpl.asyncio.wallet - xrpl.asyncio.clients diff --git a/docs/source/xrpl.asyncio.transaction.rst b/docs/source/xrpl.asyncio.transaction.rst deleted file mode 100644 index c989638b7..000000000 --- a/docs/source/xrpl.asyncio.transaction.rst +++ /dev/null @@ -1,7 +0,0 @@ -Transaction Methods -======================== - -.. automodule:: xrpl.asyncio.transaction - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.asyncio.wallet.rst b/docs/source/xrpl.asyncio.wallet.rst deleted file mode 100644 index 6f9897f82..000000000 --- a/docs/source/xrpl.asyncio.wallet.rst +++ /dev/null @@ -1,7 +0,0 @@ -Wallet Methods -=================== - -.. automodule:: xrpl.asyncio.wallet - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.clients.rst b/docs/source/xrpl.clients.rst deleted file mode 100644 index 47b1b5c9f..000000000 --- a/docs/source/xrpl.clients.rst +++ /dev/null @@ -1,6 +0,0 @@ -Network Clients -==================== - -.. automodule:: xrpl.clients - :members: - :inherited-members: diff --git a/docs/source/xrpl.core.addresscodec.rst b/docs/source/xrpl.core.addresscodec.rst deleted file mode 100644 index e35cd39c2..000000000 --- a/docs/source/xrpl.core.addresscodec.rst +++ /dev/null @@ -1,7 +0,0 @@ -XRPL Address Codec -================== - -.. automodule:: xrpl.core.addresscodec - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.core.binarycodec.binary_wrappers.rst b/docs/source/xrpl.core.binarycodec.binary_wrappers.rst deleted file mode 100644 index 8feca331c..000000000 --- a/docs/source/xrpl.core.binarycodec.binary_wrappers.rst +++ /dev/null @@ -1 +0,0 @@ -:orphan: diff --git a/docs/source/xrpl.core.binarycodec.definitions.rst b/docs/source/xrpl.core.binarycodec.definitions.rst deleted file mode 100644 index 8feca331c..000000000 --- a/docs/source/xrpl.core.binarycodec.definitions.rst +++ /dev/null @@ -1 +0,0 @@ -:orphan: diff --git a/docs/source/xrpl.core.binarycodec.rst b/docs/source/xrpl.core.binarycodec.rst deleted file mode 100644 index 6073ec3bd..000000000 --- a/docs/source/xrpl.core.binarycodec.rst +++ /dev/null @@ -1,7 +0,0 @@ -XRPL Binary Codec -================= - -.. automodule:: xrpl.core.binarycodec - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.core.binarycodec.types.rst b/docs/source/xrpl.core.binarycodec.types.rst deleted file mode 100644 index 8feca331c..000000000 --- a/docs/source/xrpl.core.binarycodec.types.rst +++ /dev/null @@ -1 +0,0 @@ -:orphan: diff --git a/docs/source/xrpl.core.keypairs.rst b/docs/source/xrpl.core.keypairs.rst deleted file mode 100644 index 09e724b9d..000000000 --- a/docs/source/xrpl.core.keypairs.rst +++ /dev/null @@ -1,7 +0,0 @@ -XRPL Keypairs Codec -=================== - -.. automodule:: xrpl.core.keypairs - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.core.rst b/docs/source/xrpl.core.rst deleted file mode 100644 index d42d47a31..000000000 --- a/docs/source/xrpl.core.rst +++ /dev/null @@ -1,12 +0,0 @@ -XRPL Core Codecs -================ - -The address codec, binary codec, and keypairs codec all contain the underlying functionality -necessary to work with the XRPL, such as signing and serialization and key generation. - -.. toctree:: - :maxdepth: 1 - - xrpl.core.addresscodec - xrpl.core.binarycodec - xrpl.core.keypairs diff --git a/docs/source/xrpl.ledger.rst b/docs/source/xrpl.ledger.rst deleted file mode 100644 index 6f501cd63..000000000 --- a/docs/source/xrpl.ledger.rst +++ /dev/null @@ -1,7 +0,0 @@ -Ledger Methods -=================== - -.. automodule:: xrpl.ledger - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.models.amounts.rst b/docs/source/xrpl.models.amounts.rst deleted file mode 100644 index d856cf460..000000000 --- a/docs/source/xrpl.models.amounts.rst +++ /dev/null @@ -1,10 +0,0 @@ -XRPL Amount Models -================== - -.. automodule:: xrpl.models.amounts - :members: - :undoc-members: - :show-inheritance: - :inherited-members: - -.. autodata:: Amount diff --git a/docs/source/xrpl.models.currencies.rst b/docs/source/xrpl.models.currencies.rst deleted file mode 100644 index 941644c82..000000000 --- a/docs/source/xrpl.models.currencies.rst +++ /dev/null @@ -1,10 +0,0 @@ -XRPL Currency Models -==================== - -.. automodule:: xrpl.models.currencies - :members: - :undoc-members: - :show-inheritance: - :inherited-members: - -.. autodata:: Currency diff --git a/docs/source/xrpl.models.requests.rst b/docs/source/xrpl.models.requests.rst deleted file mode 100644 index 884c834c2..000000000 --- a/docs/source/xrpl.models.requests.rst +++ /dev/null @@ -1,20 +0,0 @@ -XRPL Request Models -=================== - -Base Request Model ------------------- - -.. autoclass:: xrpl.models.requests.request.Request - :members: - :undoc-members: - :show-inheritance: - :inherited-members: - -Specific Request Types ----------------------- - -.. automodule:: xrpl.models.requests - :members: - :undoc-members: - :show-inheritance: - :inherited-members: diff --git a/docs/source/xrpl.models.rst b/docs/source/xrpl.models.rst deleted file mode 100644 index 2c4458edd..000000000 --- a/docs/source/xrpl.models.rst +++ /dev/null @@ -1,39 +0,0 @@ -XRPL Models -=========== - -Use these classes to validate the formats for all types of data coming from or -going to the XRP Ledger. - -.. toctree:: - :maxdepth: 1 - :titlesonly: - - xrpl.models.amounts - xrpl.models.currencies - xrpl.models.requests - xrpl.models.transactions - xrpl.models.transactions.pseudo_transactions - -Base Model ----------- - -.. automodule:: xrpl.models.base_model - :members: - :undoc-members: - :show-inheritance: - -Response Model --------------- - -.. automodule:: xrpl.models.response - :members: - :undoc-members: - :show-inheritance: - -Exceptions ----------- - -.. automodule:: xrpl.models.exceptions - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.models.transactions.pseudo_transactions.rst b/docs/source/xrpl.models.transactions.pseudo_transactions.rst deleted file mode 100644 index 4a38ccbc8..000000000 --- a/docs/source/xrpl.models.transactions.pseudo_transactions.rst +++ /dev/null @@ -1,8 +0,0 @@ -XRPL Pseudo-Transaction Models -============================== - -.. automodule:: xrpl.models.transactions.pseudo_transactions - :members: - :undoc-members: - :show-inheritance: - :inherited-members: diff --git a/docs/source/xrpl.models.transactions.rst b/docs/source/xrpl.models.transactions.rst deleted file mode 100644 index 63e2b6d26..000000000 --- a/docs/source/xrpl.models.transactions.rst +++ /dev/null @@ -1,22 +0,0 @@ -XRPL Transaction Models -======================= - -Use these models to prepare or process XRP Ledger transactions. - -Base Transaction Model ----------------------- - -.. autoclass:: xrpl.models.transactions.transaction.Transaction - :members: - :undoc-members: - :show-inheritance: - :inherited-members: - -Specific Transaction Types --------------------------- - -.. automodule:: xrpl.models.transactions - :members: - :undoc-members: - :show-inheritance: - :inherited-members: diff --git a/docs/source/xrpl.models.transactions.types.rst b/docs/source/xrpl.models.transactions.types.rst deleted file mode 100644 index 8feca331c..000000000 --- a/docs/source/xrpl.models.transactions.types.rst +++ /dev/null @@ -1 +0,0 @@ -:orphan: diff --git a/docs/source/xrpl.rst b/docs/source/xrpl.rst deleted file mode 100644 index d3939236f..000000000 --- a/docs/source/xrpl.rst +++ /dev/null @@ -1,7 +0,0 @@ -XRPL Global Variables -===================== - -.. automodule:: xrpl.constants - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.transaction.rst b/docs/source/xrpl.transaction.rst deleted file mode 100644 index e56aa5c7d..000000000 --- a/docs/source/xrpl.transaction.rst +++ /dev/null @@ -1,7 +0,0 @@ -Transaction Methods -======================== - -.. automodule:: xrpl.transaction - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.utils.rst b/docs/source/xrpl.utils.rst deleted file mode 100644 index 36f757e2b..000000000 --- a/docs/source/xrpl.utils.rst +++ /dev/null @@ -1,7 +0,0 @@ -Utilities -============== - -.. automodule:: xrpl.utils - :members: - :undoc-members: - :show-inheritance: diff --git a/docs/source/xrpl.utils.txn_parser.rst b/docs/source/xrpl.utils.txn_parser.rst deleted file mode 100644 index 8feca331c..000000000 --- a/docs/source/xrpl.utils.txn_parser.rst +++ /dev/null @@ -1 +0,0 @@ -:orphan: diff --git a/docs/source/xrpl.utils.txn_parser.utils.rst b/docs/source/xrpl.utils.txn_parser.utils.rst deleted file mode 100644 index 8feca331c..000000000 --- a/docs/source/xrpl.utils.txn_parser.utils.rst +++ /dev/null @@ -1 +0,0 @@ -:orphan: diff --git a/docs/source/xrpl.wallet.rst b/docs/source/xrpl.wallet.rst deleted file mode 100644 index fbed6dcb8..000000000 --- a/docs/source/xrpl.wallet.rst +++ /dev/null @@ -1,7 +0,0 @@ -Wallet Methods -=================== - -.. automodule:: xrpl.wallet - :members: - :undoc-members: - :show-inheritance: diff --git a/migration.py b/migration.py new file mode 100644 index 000000000..10b65923c --- /dev/null +++ b/migration.py @@ -0,0 +1,369 @@ +import os + +ripple_docker: str = "rippleci/rippled:2.2.0-b3" +xahau_docker: str = "xahauci/xahaud:2024.9.11" + +features = [ + "BalanceRewards", + "CheckCashMakesTrustLine", + "Checks", + "CryptoConditionsSuite", + "DepositAuth", + "DepositPreauth", + "DisallowIncoming", + "ExpandedSignerList", + "Flow", + "FlowCross", + "FlowSortStrands", + "HardenedValidations", + "Hooks", + "HooksUpdate1", + "ImmediateOfferKilled", + "Import", + "MultiSignReserve", + "NegativeUNL", + "PaychanAndEscrowForTokens", + "RequireFullyCanonicalSig", + "TicketBatch", + "URIToken", + "XRPFees", + "XahauGenesis", + "fix1513", + "fix1515", + "fix1543", + "fix1571", + "fix1578", + "fix1623", + "fix1781", + "fixAmendmentMajorityCalc", + "fixCheckThreading", + "fixMasterKeyAsRegularKey", + "fixNFTokenDirV1", + "fixNFTokenNegOffer", + "fixNFTokenRemint", + "fixNonFungibleTokensV1_2", + "fixPayChanRecipientOwnerDir", + "fixQualityUpperBound", + "fixRemoveNFTokenAutoTrustLine", + "fixRmSmallIncreasedQOffers", + "fixSTAmountCanonicalize", + "fixTakerDryOfferRemoval", + "fixUniversalNumber", + "fixXahauV1", + "Remit", + "ZeroB2M", + "fixXahauV2", + "fixNSDelete", + "fix240819", + "fixPageCap", + "fix240911", +] + + +def replace_in_poetry(file_path, new_authors): + """Replace occurrences of 'xrpl' with 'xahau', 'xrp' with 'xah', and add new authors in pyproject.md.""" + try: + with open(file_path, "r") as file: + content = file.read() + + # Replace the text + new_content = ( + content.replace( + "https://github.com/XRPLF/xrpl-py", "https://github.com/Xahau/xahau-py" + ) + .replace("xrpl", "xahau") + .replace("xrp", "xah") + .replace("XRP ledger", "Xahau Ledger") + ) + + # Find the authors section + authors_start = new_content.find("authors = [") + len("authors = [") + authors_end = new_content.find("]", authors_start) + + # Create a list of existing authors + existing_authors = new_content[authors_start:authors_end].strip() + existing_authors_list = [ + author.strip().strip('"') + for author in existing_authors.split(",") + if author.strip() + ] + + # Combine existing and new authors + combined_authors = existing_authors_list + [ + author.strip() for author in new_authors + ] + + # Format the combined authors list for output + new_authors_list_str = ",\n ".join( + f'"{author}"' for author in combined_authors + ) + + # Replace the entire authors section with the new list + new_content = ( + new_content[:authors_start] + + "\n " + + new_authors_list_str + + "\n]" + + new_content[authors_end + 1 :] + ) + + # Write the changes back to the file + with open(file_path, "w") as file: + file.write(new_content) + print(f"Updated: {file_path}") + + except Exception as e: + print(f"Error processing file {file_path}: {e}") + + +def replace_in_readme(file_path): + """Replace occurrences of 'from xrpl' with 'from xahau' in README.md.""" + try: + with open(file_path, "r") as file: + content = file.read() + + # Replace the text + new_content = ( + content.replace("from xrpl", "from xahau") + .replace("xrpl-py", "xahau-py") + .replace("xrpl.", "xahau.") + .replace("xrpl-announce", "xahau-announce") + .replace("xrpl-keypairs", "xahau-keypairs") + .replace("XRP Ledger", "Xahau Ledger") + .replace("https://s.altnet.rippletest.net:51234", "https://xahau-test.net") + ) + + # Write the changes back to the file + with open(file_path, "w") as file: + file.write(new_content) + print(f"Updated: {file_path}") + + except Exception as e: + print(f"Error processing file {file_path}: {e}") + + +def replace_in_contrib(file_path): + """Replace occurrences of 'from xrpl' with 'from xahau' in CONTRIBUTING.md.""" + try: + with open(file_path, "r") as file: + content = file.read() + + # Replace the text + new_content = ( + content.replace("from xrpl", "from xahau") + .replace("flake8 xrpl", "flake8 xahau") + .replace("xrpl-announce", "xahau-announce") + .replace("../xrpl", "../xahau") + .replace("xrpllabsofficial/xrpld:1.12.0", ripple_docker) + .replace(ripple_docker, xahau_docker) + .replace("/opt/ripple/bin/rippled", "/opt/xahau/bin/xahaud") + .replace("/opt/ripple/etc/rippled.cfg", "/opt/xahau/etc/xahaud.cfg") + .replace("ripple", "xahau") + .replace("rippled", "xahaud") + .replace("RIPPLED", "XAHAUD") + .replace("[validators_file]", "# [validators_file]") + .replace("validators.txt", "# validators.txt") + ) + + # Write the changes back to the file + with open(file_path, "w") as file: + file.write(new_content) + print(f"Updated: {file_path}") + + except Exception as e: + print(f"Error processing file {file_path}: {e}") + + +def replace_in_github(file_path): + try: + with open(file_path, "r") as file: + content = file.read() + + # Replace the text + new_content = ( + content.replace("[xahau]", "[main, xahau]") + .replace("flake8 xrpl", "flake8 xahau") + .replace("reexport xrpl", "reexport xahau") + .replace("xrpl/", "xahau/") + .replace("source xrpl", "source xahau") + ) + + # Write the changes back to the file + with open(file_path, "w") as file: + file.write(new_content) + print(f"Updated: {file_path}") + + except Exception as e: + print(f"Error processing file {file_path}: {e}") + + +def replace_in_file(file_path): + """Replace occurrences of 'from xrpl' with 'from xahau' in the given file.""" + try: + with open(file_path, "r") as file: + content = file.read() + + # Replace the text + new_content = ( + content.replace("from xrpl", "from xahau") + .replace("import xrpl", "import xahau") + .replace("xrpl.utils", "xahau.utils") + .replace("xrpl.models.", "xahau.models.") + .replace("xrpl.core.", "xahau.core.") + .replace("flake8 xrpl", "flake8 xahau") + .replace("xrpl-announce", "xahau-announce") + .replace("../xrpl", "../xahau") + .replace("xrpllabsofficial/xrpld:1.12.0", "xahaulabsofficial/xahaud:1.12.0") + .replace("xrpl-py", "xahau-py") + .replace("https://s.altnet.rippletest.net:51234", "https://xahau-test.net") + .replace("https://xrplcluster.com/", "https://xahau.network") + .replace( + '_TEST_FAUCET_URL: Final[str] = "https://faucet.altnet.rippletest.net/accounts"', + '_TEST_FAUCET_URL: Final[str] = "https://xahau-test.net/accounts"', + ) + .replace( + '_DEV_FAUCET_URL: Final[str] = "https://faucet.devnet.rippletest.net/accounts"', + '_DEV_FAUCET_URL: Final[str] = "https://xahau-test.net/accounts"', + ) + .replace( + 'if "altnet" in url or "testnet" in url:', + 'if "xahau-test" in url or "testnet" in url:', + ) + .replace( + "https://s.devnet.rippletest.net:51234", + "https://xahau-test.net", + ) + .replace( + "wss://s.altnet.rippletest.net:51233", + "wss://xahau-test.net", + ) + .replace( + "wss://s.devnet.rippletest.net", + "wss://xahau-test.net", + ) + .replace( + "https://testnet.xrpl-labs.com", + "https://xahau-test.net", + ) + .replace( + "wss://testnet.xrpl-labs.com", + "wss://xahau-test.net", + ) + .replace( + "faucet.devnet.rippletest.net", + "xahau-test.net", + ) + .replace( + "_DEFAULT_API_VERSION: Final[int] = 2", + "_DEFAULT_API_VERSION: Final[int] = 1", + ) + .replace('"xrpl.', '"xahau.') + .replace("TestAccountDelete", "NoTestAccountDelete") + .replace("TestAMM", "NoTestAMM") + .replace("TestClawback", "NoTestClawback") + .replace("TestDeleteOracle", "NoTestDeleteOracle") + .replace("TestDID", "NoTestDID") + .replace("TestSetOracle", "NoTestSetOracle") + .replace("TestXChain", "NoTestXChain") + ) + + # Write the changes back to the file + with open(file_path, "w") as file: + file.write(new_content) + print(f"Updated: {file_path}") + + except Exception as e: + print(f"Error processing file {file_path}: {e}") + + +def search_and_replace_in_folders(folder_paths): + """Search for Python files in the given list of folders and replace text.""" + for folder_path in folder_paths: + for root, dirs, files in os.walk(folder_path): + for file in files: + if file.endswith(".py"): + file_path = os.path.join(root, file) + replace_in_file(file_path) + + +def rename_folder(old_folder_name, new_folder_name): + """Rename the specified folder.""" + if os.path.exists(old_folder_name): + os.rename(old_folder_name, new_folder_name) + print(f"Renamed folder: {old_folder_name} to {new_folder_name}") + else: + print(f"Folder {old_folder_name} does not exist.") + + +def delete_file(old_file_name): + """Delete the specified file.""" + if os.path.exists(old_file_name): + os.remove(old_file_name) + print(f"Deleted file: {old_file_name}") + else: + print(f"File {old_file_name} does not exist.") + + +def update_features_in_config(file_path, features): + """Update the features in the specified configuration file.""" + try: + with open(file_path, "r") as file: + content = file.readlines() + + # Find the index of the [features] section + features_start_index = None + features_end_index = None + + for i, line in enumerate(content): + if line.strip() == "[features]": + features_start_index = i + elif features_start_index is not None and line.strip() == "": + features_end_index = i + break + + # If the [features] section was found, update it + if features_start_index is not None: + # Remove existing features + if features_end_index is not None: + content = ( + content[: features_start_index + 1] + content[features_end_index:] + ) + else: + content = content[: features_start_index + 1] + + # Add new features + new_features = "\n".join(f"{feature}" for feature in features) + content.append(new_features + "\n") + + # Write the changes back to the file + with open(file_path, "w") as file: + file.writelines(content) + + print(f"Updated features in: {file_path}") + else: + print(f"[features] section not found in {file_path}") + + except Exception as e: + print(f"Error processing file {file_path}: {e}") + + +if __name__ == "__main__": + rename_folder("xrpl", "xahau") + rename_folder(".ci-config/rippled.cfg", ".ci-config/xahaud.cfg") + + folder_list = ["snippets", "tests", "tools", "xahau"] + search_and_replace_in_folders(folder_list) + + replace_in_contrib("CONTRIBUTING.md") + replace_in_contrib(".github/workflows/integration_test.yml") + replace_in_contrib(".ci-config/xahaud.cfg") + replace_in_github(".github/workflows/integration_test.yml") + replace_in_github(".github/workflows/unit_test.yml") + replace_in_github(".pre-commit-config.yaml") + update_features_in_config(".ci-config/xahaud.cfg", features) + # replace_in_poetry( + # "pyproject.toml", + # ["Denis Angell ", "Tequ "], + # ) + replace_in_readme("README.md") + delete_file(".github/workflows/snippet_test.yml") diff --git a/pyproject.toml b/pyproject.toml index f8e5b7a9f..18e9d151c 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [tool.poetry] -name = "xrpl-py" +name = "xahau-py" version = "3.0.0" -description = "A complete Python library for interacting with the XRP ledger" +description = "A complete Python library for interacting with the Xahau Ledger" readme = "README.md" -repository = "https://github.com/XRPLF/xrpl-py" +repository = "https://github.com/Xahau/xahau-py" authors = [ "Mayukha Vadari ", "Greg Weisbrod ", @@ -13,20 +13,22 @@ authors = [ "Mayur Bhandary ", "Nathan Nichols ", "Caleb Kniffen ", - "Omar Khan " + "Omar Khan ", + "Denis Angell ", + "Tequ " ] keywords = [ - "xrp", - "xrpl", + "xah", + "xahau", "cryptocurrency", ] license = "ISC" -documentation = "https://xrpl-py.readthedocs.io" +documentation = "https://xahau-py.readthedocs.io" include = [ "LICENSE", ] packages = [ - { include = "xrpl" }, + { include = "xahau" }, ] [tool.poetry.dependencies] @@ -69,7 +71,7 @@ build-backend = "poetry.core.masonry.api" [tool.coverage.run] branch = true -source = ["xrpl"] +source = ["xahau"] [tool.coverage.report] show_missing = true diff --git a/snippets/get_transaction.py b/snippets/get_transaction.py index f22b15c8c..c878860f6 100644 --- a/snippets/get_transaction.py +++ b/snippets/get_transaction.py @@ -1,6 +1,6 @@ """Example of how we can see a transaction that was validated on the ledger""" -from xrpl.clients import JsonRpcClient -from xrpl.models import Ledger, Tx +from xahau.clients import JsonRpcClient +from xahau.models import Ledger, Tx # References # - https://xrpl.org/look-up-transaction-results.html @@ -8,7 +8,7 @@ # - https://xrpl.org/tx.html # Create a client to connect to the main network -client = JsonRpcClient("https://xrplcluster.com/") +client = JsonRpcClient("https://xahau.network") # Create a Ledger request and have the client call it ledger_request = Ledger(ledger_index="validated", transactions=True) diff --git a/snippets/multisign.py b/snippets/multisign.py index 0279b951f..96c4634a9 100644 --- a/snippets/multisign.py +++ b/snippets/multisign.py @@ -1,12 +1,12 @@ """Example of how we can multisign a transaction""" -from xrpl.clients import JsonRpcClient -from xrpl.models import AccountSet, SignerEntry, SignerListSet -from xrpl.transaction import autofill, multisign, sign, submit_and_wait -from xrpl.utils import str_to_hex -from xrpl.wallet import Wallet, generate_faucet_wallet +from xahau.clients import JsonRpcClient +from xahau.models import AccountSet, SignerEntry, SignerListSet +from xahau.transaction import autofill, multisign, sign, submit_and_wait +from xahau.utils import str_to_hex +from xahau.wallet import Wallet, generate_faucet_wallet -client = JsonRpcClient("https://s.altnet.rippletest.net:51234") +client = JsonRpcClient("https://xahau-test.net") # Create a wallets to use for multisigning # Prints debug info as it creates the wallet diff --git a/snippets/partial_payment.py b/snippets/partial_payment.py index 02ff0fd84..428097fc6 100644 --- a/snippets/partial_payment.py +++ b/snippets/partial_payment.py @@ -1,14 +1,14 @@ """Example of how to handle partial payments""" -from xrpl.clients import JsonRpcClient -from xrpl.models import ( +from xahau.clients import JsonRpcClient +from xahau.models import ( AccountLines, IssuedCurrencyAmount, Payment, PaymentFlag, TrustSet, ) -from xrpl.transaction import submit_and_wait -from xrpl.wallet import generate_faucet_wallet +from xahau.transaction import submit_and_wait +from xahau.wallet import generate_faucet_wallet # References # - https://xrpl.org/partial-payments.html#partial-payments @@ -17,7 +17,7 @@ # - https://xrpl.org/account_lines.html#account_lines # Create a client to connect to the test network -client = JsonRpcClient("https://s.altnet.rippletest.net:51234") +client = JsonRpcClient("https://xahau-test.net") # Creating two wallets to send money between wallet1 = generate_faucet_wallet(client, debug=True) diff --git a/snippets/paths.py b/snippets/paths.py index dabbc9eeb..f10214c8c 100644 --- a/snippets/paths.py +++ b/snippets/paths.py @@ -1,10 +1,10 @@ """Example of how to find the best path to trade with""" -from xrpl.clients import WebsocketClient -from xrpl.models import IssuedCurrencyAmount, PathFind, Payment -from xrpl.models.requests import PathFindSubcommand -from xrpl.transaction import autofill_and_sign -from xrpl.wallet import generate_faucet_wallet +from xahau.clients import WebsocketClient +from xahau.models import IssuedCurrencyAmount, PathFind, Payment +from xahau.models.requests import PathFindSubcommand +from xahau.transaction import autofill_and_sign +from xahau.wallet import generate_faucet_wallet # References # - https://xrpl.org/paths.html#paths @@ -17,7 +17,7 @@ # Create a client to connect to the test network # PathFind RPC requires the use of a Websocket client only -with WebsocketClient("wss://s.altnet.rippletest.net:51233") as client: +with WebsocketClient("wss://xahau-test.net") as client: # Creating wallet to send money from wallet = generate_faucet_wallet(client, debug=True) diff --git a/snippets/send_escrow.py b/snippets/send_escrow.py index 453d2c34f..4c71d82ce 100644 --- a/snippets/send_escrow.py +++ b/snippets/send_escrow.py @@ -3,12 +3,12 @@ from datetime import datetime from time import sleep -from xrpl.account import get_balance -from xrpl.clients import JsonRpcClient -from xrpl.models import AccountObjects, EscrowCreate, EscrowFinish -from xrpl.transaction.reliable_submission import submit_and_wait -from xrpl.utils import datetime_to_ripple_time -from xrpl.wallet import generate_faucet_wallet +from xahau.account import get_balance +from xahau.clients import JsonRpcClient +from xahau.models import AccountObjects, EscrowCreate, EscrowFinish +from xahau.transaction.reliable_submission import submit_and_wait +from xahau.utils import datetime_to_ripple_time +from xahau.wallet import generate_faucet_wallet # References # - https://xrpl.org/escrowcreate.html#escrowcreate @@ -16,7 +16,7 @@ # - https://xrpl.org/account_objects.html#account_objects # Create a client to connect to the test network -client = JsonRpcClient("https://s.altnet.rippletest.net:51234") +client = JsonRpcClient("https://xahau-test.net") # Creating two wallets to send money between wallet1 = generate_faucet_wallet(client, debug=True) diff --git a/snippets/set_regular_key.py b/snippets/set_regular_key.py index 39ad5f207..df8ee8f82 100644 --- a/snippets/set_regular_key.py +++ b/snippets/set_regular_key.py @@ -1,9 +1,9 @@ """Example of how we can setting a regular key""" -from xrpl.account import get_balance -from xrpl.clients import JsonRpcClient -from xrpl.models import Payment, SetRegularKey -from xrpl.transaction import submit_and_wait -from xrpl.wallet import generate_faucet_wallet +from xahau.account import get_balance +from xahau.clients import JsonRpcClient +from xahau.models import Payment, SetRegularKey +from xahau.transaction import submit_and_wait +from xahau.wallet import generate_faucet_wallet # References # - https://xrpl.org/assign-a-regular-key-pair.html#assign-a-regular-key-pair @@ -11,7 +11,7 @@ # - https://xrpl.org/change-or-remove-a-regular-key-pair.html # Create a client to connect to the test network -client = JsonRpcClient("https://s.altnet.rippletest.net:51234") +client = JsonRpcClient("https://xahau-test.net") # Creating two wallets to send money between wallet1 = generate_faucet_wallet(client, debug=True) diff --git a/snippets/submit_payment.py b/snippets/submit_payment.py index 8dbbb4f25..5dc0a9e6b 100644 --- a/snippets/submit_payment.py +++ b/snippets/submit_payment.py @@ -1,9 +1,9 @@ """Example of how to send a transaction and see its validation response""" -from xrpl.account import get_balance -from xrpl.clients import JsonRpcClient -from xrpl.models import Payment, Tx -from xrpl.transaction import submit_and_wait -from xrpl.wallet import generate_faucet_wallet +from xahau.account import get_balance +from xahau.clients import JsonRpcClient +from xahau.models import Payment, Tx +from xahau.transaction import submit_and_wait +from xahau.wallet import generate_faucet_wallet # References: # - https://xrpl.org/reliable-transaction-submission.html @@ -11,7 +11,7 @@ # - https://xrpl.org/look-up-transaction-results.html # Create a client to connect to the test network -client = JsonRpcClient("https://s.altnet.rippletest.net:51234") +client = JsonRpcClient("https://xahau-test.net") # Creating two wallets to send money between wallet1 = generate_faucet_wallet(client, debug=True) diff --git a/tests/integration/clients/test_json_rpc_client.py b/tests/integration/clients/test_json_rpc_client.py index 84ae67d29..171c66f83 100644 --- a/tests/integration/clients/test_json_rpc_client.py +++ b/tests/integration/clients/test_json_rpc_client.py @@ -4,8 +4,8 @@ from unittest import TestCase -from xrpl.clients import JsonRpcClient -from xrpl.models.requests import ServerInfo +from xahau.clients import JsonRpcClient +from xahau.models.requests import ServerInfo class TestJsonRpcClient(TestCase): @@ -13,6 +13,6 @@ class TestJsonRpcClient(TestCase): def test_json_rpc_client_valid_url(self) -> None: # Valid URL - JSON_RPC_URL = "https://s.altnet.rippletest.net:51234" + JSON_RPC_URL = "https://xahau-test.net" client = JsonRpcClient(JSON_RPC_URL) client.request(ServerInfo()) diff --git a/tests/integration/it_utils.py b/tests/integration/it_utils.py index b7713c861..f2de76604 100644 --- a/tests/integration/it_utils.py +++ b/tests/integration/it_utils.py @@ -7,31 +7,31 @@ from time import sleep from typing import Any, Dict, cast -import xrpl # noqa: F401 - needed for sync tests -from xrpl.asyncio.clients import AsyncJsonRpcClient, AsyncWebsocketClient -from xrpl.asyncio.clients.async_client import AsyncClient -from xrpl.asyncio.transaction import sign_and_submit as sign_and_submit_async -from xrpl.clients import Client, JsonRpcClient, WebsocketClient -from xrpl.clients.sync_client import SyncClient -from xrpl.constants import CryptoAlgorithm -from xrpl.models import GenericRequest, Payment, Request, Response, Transaction -from xrpl.models.amounts.issued_currency_amount import IssuedCurrencyAmount -from xrpl.models.currencies.issued_currency import IssuedCurrency -from xrpl.models.currencies.xrp import XRP -from xrpl.models.transactions.account_set import AccountSet, AccountSetAsfFlag -from xrpl.models.transactions.amm_create import AMMCreate -from xrpl.models.transactions.trust_set import TrustSet, TrustSetFlag -from xrpl.transaction import sign_and_submit # noqa: F401 - needed for sync tests -from xrpl.transaction import ( # noqa: F401 - needed for sync tests +import xahau # noqa: F401 - needed for sync tests +from xahau.asyncio.clients import AsyncJsonRpcClient, AsyncWebsocketClient +from xahau.asyncio.clients.async_client import AsyncClient +from xahau.asyncio.transaction import sign_and_submit as sign_and_submit_async +from xahau.clients import Client, JsonRpcClient, WebsocketClient +from xahau.clients.sync_client import SyncClient +from xahau.constants import CryptoAlgorithm +from xahau.models import GenericRequest, Payment, Request, Response, Transaction +from xahau.models.amounts.issued_currency_amount import IssuedCurrencyAmount +from xahau.models.currencies.issued_currency import IssuedCurrency +from xahau.models.currencies.xrp import XRP +from xahau.models.transactions.account_set import AccountSet, AccountSetAsfFlag +from xahau.models.transactions.amm_create import AMMCreate +from xahau.models.transactions.trust_set import TrustSet, TrustSetFlag +from xahau.transaction import sign_and_submit # noqa: F401 - needed for sync tests +from xahau.transaction import ( # noqa: F401 - needed for sync tests submit as submit_transaction_alias, ) -from xrpl.wallet import Wallet +from xahau.wallet import Wallet JSON_RPC_URL = "http://127.0.0.1:5005" WEBSOCKET_URL = "ws://127.0.0.1:6006" -JSON_TESTNET_URL = "https://s.altnet.rippletest.net:51234" -WEBSOCKET_TESTNET_URL = "wss://s.altnet.rippletest.net:51233" +JSON_TESTNET_URL = "https://xahau-test.net" +WEBSOCKET_TESTNET_URL = "wss://xahau-test.net" JSON_RPC_CLIENT = JsonRpcClient(JSON_RPC_URL) ASYNC_JSON_RPC_CLIENT = AsyncJsonRpcClient(JSON_RPC_URL) diff --git a/tests/integration/reqs/test_account_info.py b/tests/integration/reqs/test_account_info.py index 28a87533a..e397d7022 100644 --- a/tests/integration/reqs/test_account_info.py +++ b/tests/integration/reqs/test_account_info.py @@ -1,7 +1,7 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync from tests.integration.reusable_values import WALLET -from xrpl.models.requests import AccountInfo +from xahau.models.requests import AccountInfo class TestAccountInfo(IntegrationTestCase): diff --git a/tests/integration/reqs/test_account_objects.py b/tests/integration/reqs/test_account_objects.py index 4606c5ed5..e794386c4 100644 --- a/tests/integration/reqs/test_account_objects.py +++ b/tests/integration/reqs/test_account_objects.py @@ -1,7 +1,7 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync from tests.integration.reusable_values import WALLET -from xrpl.models.requests import AccountObjects +from xahau.models.requests import AccountObjects class TestAccountObjects(IntegrationTestCase): diff --git a/tests/integration/reqs/test_account_tx.py b/tests/integration/reqs/test_account_tx.py index e58b9434f..c42cc9380 100644 --- a/tests/integration/reqs/test_account_tx.py +++ b/tests/integration/reqs/test_account_tx.py @@ -1,7 +1,7 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync from tests.integration.reusable_values import WALLET -from xrpl.models.requests import AccountTx +from xahau.models.requests import AccountTx class TestAccountTx(IntegrationTestCase): @@ -52,6 +52,6 @@ async def test_no_explicit_api_version(self, client): AccountTx(account=WALLET.address, api_version=2) ) - # if api_version is not explicitly specified, xrpl-py inserts api_version:2 + # if api_version is not explicitly specified, xahau-py inserts api_version:2 # inside the Requests self.assertEqual(response_with_version.result, response_without_version.result) diff --git a/tests/integration/reqs/test_amm_info.py b/tests/integration/reqs/test_amm_info.py index d64ed5eb3..14ba0dd30 100644 --- a/tests/integration/reqs/test_amm_info.py +++ b/tests/integration/reqs/test_amm_info.py @@ -1,13 +1,13 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync from tests.integration.reusable_values import AMM_ASSET, AMM_ASSET2 -from xrpl.models.requests.amm_info import AMMInfo +from xahau.models.requests.amm_info import AMMInfo asset = AMM_ASSET asset2 = AMM_ASSET2 -class TestAMMInfo(IntegrationTestCase): +class NoTestAMMInfo(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): amm_info = await client.request( diff --git a/tests/integration/reqs/test_book_offers.py b/tests/integration/reqs/test_book_offers.py index bd97a8c26..4a573a9d2 100644 --- a/tests/integration/reqs/test_book_offers.py +++ b/tests/integration/reqs/test_book_offers.py @@ -1,8 +1,8 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync from tests.integration.reusable_values import WALLET -from xrpl.models.currencies import XRP, IssuedCurrency -from xrpl.models.requests import BookOffers +from xahau.models.currencies import XRP, IssuedCurrency +from xahau.models.requests import BookOffers class TestBookOffers(IntegrationTestCase): diff --git a/tests/integration/reqs/test_channel_verify.py b/tests/integration/reqs/test_channel_verify.py index 490b2096d..ace1b8cfb 100644 --- a/tests/integration/reqs/test_channel_verify.py +++ b/tests/integration/reqs/test_channel_verify.py @@ -1,7 +1,7 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync from tests.integration.reusable_values import PAYMENT_CHANNEL, WALLET -from xrpl.models.requests import ChannelVerify +from xahau.models.requests import ChannelVerify class TestChannelVerify(IntegrationTestCase): diff --git a/tests/integration/reqs/test_feature.py b/tests/integration/reqs/test_feature.py index 82c8f6603..96c9f4c18 100644 --- a/tests/integration/reqs/test_feature.py +++ b/tests/integration/reqs/test_feature.py @@ -1,6 +1,6 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync -from xrpl.models.requests import Feature +from xahau.models.requests import Feature AMM_AMENDMENT = "8CC0774A3BF66D1D22E76BBDA8E8A232E6B6313834301B3B23E8601196AE6455" diff --git a/tests/integration/reqs/test_generic_request.py b/tests/integration/reqs/test_generic_request.py index 64ebd0c0c..85075d6b4 100644 --- a/tests/integration/reqs/test_generic_request.py +++ b/tests/integration/reqs/test_generic_request.py @@ -1,6 +1,6 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync -from xrpl.models.requests import GenericRequest +from xahau.models.requests import GenericRequest class TestGenericRequest(IntegrationTestCase): diff --git a/tests/integration/reqs/test_ledger.py b/tests/integration/reqs/test_ledger.py index 4516629e5..88ba668f3 100644 --- a/tests/integration/reqs/test_ledger.py +++ b/tests/integration/reqs/test_ledger.py @@ -1,6 +1,6 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync -from xrpl.models.requests import Ledger +from xahau.models.requests import Ledger class TestLedger(IntegrationTestCase): diff --git a/tests/integration/reqs/test_no_ripple_check.py b/tests/integration/reqs/test_no_ripple_check.py index 7812ca708..d24e4a0b8 100644 --- a/tests/integration/reqs/test_no_ripple_check.py +++ b/tests/integration/reqs/test_no_ripple_check.py @@ -1,7 +1,7 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync from tests.integration.reusable_values import WALLET -from xrpl.models.requests import NoRippleCheck, NoRippleCheckRole +from xahau.models.requests import NoRippleCheck, NoRippleCheckRole class TestNoRippleCheck(IntegrationTestCase): diff --git a/tests/integration/reqs/test_ripple_path_find.py b/tests/integration/reqs/test_ripple_path_find.py index 8bbd4f61c..75de39b66 100644 --- a/tests/integration/reqs/test_ripple_path_find.py +++ b/tests/integration/reqs/test_ripple_path_find.py @@ -1,7 +1,7 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync from tests.integration.reusable_values import DESTINATION, WALLET -from xrpl.models.requests import RipplePathFind +from xahau.models.requests import RipplePathFind class TestRipplePathFind(IntegrationTestCase): diff --git a/tests/integration/reqs/test_server_definitions.py b/tests/integration/reqs/test_server_definitions.py index c83049cfc..7fd104649 100644 --- a/tests/integration/reqs/test_server_definitions.py +++ b/tests/integration/reqs/test_server_definitions.py @@ -1,6 +1,6 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync -from xrpl.models.requests import ServerDefinitions +from xahau.models.requests import ServerDefinitions class TestServerDefinitions(IntegrationTestCase): diff --git a/tests/integration/reqs/test_server_info.py b/tests/integration/reqs/test_server_info.py index de30c77c0..56e7d34c3 100644 --- a/tests/integration/reqs/test_server_info.py +++ b/tests/integration/reqs/test_server_info.py @@ -1,6 +1,6 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync -from xrpl.models.requests import ServerInfo +from xahau.models.requests import ServerInfo class TestServerInfo(IntegrationTestCase): diff --git a/tests/integration/reqs/test_submit_multisigned.py b/tests/integration/reqs/test_submit_multisigned.py index e589e42c8..b7d645ba5 100644 --- a/tests/integration/reqs/test_submit_multisigned.py +++ b/tests/integration/reqs/test_submit_multisigned.py @@ -1,12 +1,12 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import sign_and_reliable_submission, test_async_and_sync from tests.integration.reusable_values import WALLET -from xrpl.asyncio.transaction.main import autofill, sign -from xrpl.models.requests import SubmitMultisigned -from xrpl.models.transactions import AccountSet, SignerEntry, SignerListSet -from xrpl.transaction.multisign import multisign -from xrpl.utils.str_conversions import str_to_hex -from xrpl.wallet import Wallet +from xahau.asyncio.transaction.main import autofill, sign +from xahau.models.requests import SubmitMultisigned +from xahau.models.transactions import AccountSet, SignerEntry, SignerListSet +from xahau.transaction.multisign import multisign +from xahau.utils.str_conversions import str_to_hex +from xahau.wallet import Wallet FIRST_SIGNER = Wallet.from_seed("sEdTLQkHAWpdS7FDk7EvuS7Mz8aSMRh") SECOND_SIGNER = Wallet.from_seed("sEd7DXaHkGQD8mz8xcRLDxfMLqCurif") @@ -36,8 +36,8 @@ class TestSubmitMultisigned(IntegrationTestCase): @test_async_and_sync( globals(), [ - "xrpl.transaction.sign", - "xrpl.transaction.autofill", + "xahau.transaction.sign", + "xahau.transaction.autofill", ], ) async def test_basic_functionality(self, client): diff --git a/tests/integration/reqs/test_submit_only.py b/tests/integration/reqs/test_submit_only.py index e82091f53..ff344d2e1 100644 --- a/tests/integration/reqs/test_submit_only.py +++ b/tests/integration/reqs/test_submit_only.py @@ -1,11 +1,11 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync from tests.integration.reusable_values import WALLET -from xrpl.asyncio.transaction import autofill_and_sign -from xrpl.core.binarycodec import encode -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.requests import SubmitOnly -from xrpl.models.transactions import OfferCreate +from xahau.asyncio.transaction import autofill_and_sign +from xahau.core.binarycodec import encode +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.requests import SubmitOnly +from xahau.models.transactions import OfferCreate TX = OfferCreate( account=WALLET.address, @@ -19,7 +19,7 @@ class TestSubmitOnly(IntegrationTestCase): - @test_async_and_sync(globals(), ["xrpl.transaction.autofill_and_sign"]) + @test_async_and_sync(globals(), ["xahau.transaction.autofill_and_sign"]) async def test_basic_functionality(self, client): transaction = await autofill_and_sign(TX, client, WALLET) diff --git a/tests/integration/reqs/test_subscribe.py b/tests/integration/reqs/test_subscribe.py index e1dd22e94..f5759a249 100644 --- a/tests/integration/reqs/test_subscribe.py +++ b/tests/integration/reqs/test_subscribe.py @@ -5,9 +5,9 @@ test_async_and_sync, ) from tests.integration.reusable_values import DESTINATION, WALLET -from xrpl.models.requests import StreamParameter, Subscribe -from xrpl.models.requests.unsubscribe import Unsubscribe -from xrpl.models.transactions.payment import Payment +from xahau.models.requests import StreamParameter, Subscribe +from xahau.models.requests.unsubscribe import Unsubscribe +from xahau.models.transactions.payment import Payment _MESSAGE_LIMIT = 3 diff --git a/tests/integration/reqs/test_tx.py b/tests/integration/reqs/test_tx.py index 57fbaaa5a..10e0ec06f 100644 --- a/tests/integration/reqs/test_tx.py +++ b/tests/integration/reqs/test_tx.py @@ -1,7 +1,7 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync from tests.integration.reusable_values import OFFER -from xrpl.models.requests import Tx +from xahau.models.requests import Tx class TestTx(IntegrationTestCase): diff --git a/tests/integration/reusable_values.py b/tests/integration/reusable_values.py index ae6c10b47..602f5036f 100644 --- a/tests/integration/reusable_values.py +++ b/tests/integration/reusable_values.py @@ -8,8 +8,8 @@ fund_wallet_async, sign_and_reliable_submission_async, ) -from xrpl.asyncio.clients.async_client import AsyncClient -from xrpl.models import ( +from xahau.asyncio.clients.async_client import AsyncClient +from xahau.models import ( XRP, AMMDeposit, AMMDepositFlag, @@ -21,7 +21,7 @@ XChainBridge, XChainCreateBridge, ) -from xrpl.wallet import Wallet +from xahau.wallet import Wallet # TODO: use `asyncio.gather` for these, to parallelize diff --git a/tests/integration/sugar/test_account.py b/tests/integration/sugar/test_account.py index 152339afe..c09b0bc51 100644 --- a/tests/integration/sugar/test_account.py +++ b/tests/integration/sugar/test_account.py @@ -6,11 +6,15 @@ test_async_and_sync, ) from tests.integration.reusable_values import DESTINATION, WALLET -from xrpl.asyncio.account import does_account_exist, get_balance, get_latest_transaction -from xrpl.asyncio.clients.exceptions import XRPLRequestFailureException -from xrpl.core.addresscodec import classic_address_to_xaddress -from xrpl.models.transactions import Payment -from xrpl.wallet import Wallet +from xahau.asyncio.account import ( + does_account_exist, + get_balance, + get_latest_transaction, +) +from xahau.asyncio.clients.exceptions import XRPLRequestFailureException +from xahau.core.addresscodec import classic_address_to_xaddress +from xahau.models.transactions import Payment +from xahau.wallet import Wallet NEW_WALLET = Wallet.create() fund_wallet(NEW_WALLET) @@ -18,34 +22,34 @@ class TestAccount(IntegrationTestCase): - @test_async_and_sync(globals(), ["xrpl.account.does_account_exist"]) + @test_async_and_sync(globals(), ["xahau.account.does_account_exist"]) async def test_does_account_exist_true(self, client): self.assertTrue(await does_account_exist(WALLET.address, client)) - @test_async_and_sync(globals(), ["xrpl.account.does_account_exist"]) + @test_async_and_sync(globals(), ["xahau.account.does_account_exist"]) async def test_does_account_exist_false(self, client): address = Wallet.create().classic_address self.assertFalse(await does_account_exist(address, client)) - @test_async_and_sync(globals(), ["xrpl.account.does_account_exist"]) + @test_async_and_sync(globals(), ["xahau.account.does_account_exist"]) async def test_does_account_exist_throws_for_invalid_account(self, client): address = "a" with self.assertRaises(XRPLRequestFailureException): await does_account_exist(address, client) - @test_async_and_sync(globals(), ["xrpl.account.does_account_exist"]) + @test_async_and_sync(globals(), ["xahau.account.does_account_exist"]) async def test_does_account_exist_xaddress(self, client): xaddress = classic_address_to_xaddress(WALLET.address, None, True) self.assertTrue(await does_account_exist(xaddress, client)) - @test_async_and_sync(globals(), ["xrpl.account.get_balance"]) + @test_async_and_sync(globals(), ["xahau.account.get_balance"]) async def test_get_balance(self, client): self.assertEqual( await get_balance(NEW_WALLET.address, client), int(FUNDING_AMOUNT), ) - @test_async_and_sync(globals(), ["xrpl.account.get_latest_transaction"]) + @test_async_and_sync(globals(), ["xahau.account.get_latest_transaction"]) async def test_get_latest_transaction(self, client): # NOTE: this test may take a long time to run amount = "21000000" diff --git a/tests/integration/sugar/test_ledger.py b/tests/integration/sugar/test_ledger.py index 9e76d9ce1..4f189a526 100644 --- a/tests/integration/sugar/test_ledger.py +++ b/tests/integration/sugar/test_ledger.py @@ -1,11 +1,11 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import test_async_and_sync -from xrpl.asyncio.ledger import get_fee -from xrpl.utils import drops_to_xrp +from xahau.asyncio.ledger import get_fee +from xahau.utils import drops_to_xrp class TestLedger(IntegrationTestCase): - @test_async_and_sync(globals(), ["xrpl.ledger.get_fee"]) + @test_async_and_sync(globals(), ["xahau.ledger.get_fee"]) async def test_get_fee_max(self, client): expected = "1" max_fee = drops_to_xrp(expected) diff --git a/tests/integration/sugar/test_transaction.py b/tests/integration/sugar/test_transaction.py index e9e245789..702442c0a 100644 --- a/tests/integration/sugar/test_transaction.py +++ b/tests/integration/sugar/test_transaction.py @@ -6,23 +6,23 @@ ) from tests.integration.reusable_values import DESTINATION as DESTINATION_WALLET from tests.integration.reusable_values import WALLET -from xrpl.asyncio.ledger import get_fee, get_latest_validated_ledger_sequence -from xrpl.asyncio.transaction import ( +from xahau.asyncio.ledger import get_fee, get_latest_validated_ledger_sequence +from xahau.asyncio.transaction import ( XRPLReliableSubmissionException, autofill, autofill_and_sign, sign, ) -from xrpl.asyncio.transaction import submit as submit_transaction_alias_async -from xrpl.asyncio.transaction import submit_and_wait -from xrpl.asyncio.transaction.main import sign_and_submit -from xrpl.clients import XRPLRequestFailureException -from xrpl.core.addresscodec import classic_address_to_xaddress -from xrpl.core.binarycodec.main import encode -from xrpl.models.exceptions import XRPLException -from xrpl.models.requests import ServerState, Tx -from xrpl.models.transactions import AccountDelete, AccountSet, EscrowFinish, Payment -from xrpl.utils import xrp_to_drops +from xahau.asyncio.transaction import submit as submit_transaction_alias_async +from xahau.asyncio.transaction import submit_and_wait +from xahau.asyncio.transaction.main import sign_and_submit +from xahau.clients import XRPLRequestFailureException +from xahau.core.addresscodec import classic_address_to_xaddress +from xahau.core.binarycodec.main import encode +from xahau.models.exceptions import XRPLException +from xahau.models.requests import ServerState, Tx +from xahau.models.transactions import AccountDelete, AccountSet, EscrowFinish, Payment +from xahau.utils import xrp_to_drops ACCOUNT = WALLET.address DESTINATION = DESTINATION_WALLET.address @@ -132,8 +132,8 @@ async def test_payment_high_fee_authorized(self, client): @test_async_and_sync( globals(), [ - "xrpl.transaction.autofill_and_sign", - "xrpl.transaction.submit", + "xahau.transaction.autofill_and_sign", + "xahau.transaction.submit", ], ) async def test_payment_high_fee_authorized_with_submit_alias(self, client): @@ -152,7 +152,7 @@ async def test_payment_high_fee_authorized_with_submit_alias(self, client): response = await submit_transaction_alias_async(signed_and_autofilled, client) self.assertTrue(response.is_successful()) - @test_async_and_sync(globals(), ["xrpl.transaction.autofill"]) + @test_async_and_sync(globals(), ["xahau.transaction.autofill"]) async def test_calculate_account_delete_fee(self, client): # GIVEN a new AccountDelete transaction account_delete = AccountDelete( @@ -173,7 +173,7 @@ async def test_calculate_account_delete_fee(self, client): @test_async_and_sync( globals(), - ["xrpl.transaction.autofill", "xrpl.ledger.get_fee"], + ["xahau.transaction.autofill", "xahau.ledger.get_fee"], ) async def test_calculate_escrow_finish_fee(self, client): # GIVEN a new EscrowFinish transaction @@ -199,7 +199,7 @@ async def test_calculate_escrow_finish_fee(self, client): @test_async_and_sync( globals(), - ["xrpl.transaction.autofill", "xrpl.ledger.get_fee"], + ["xahau.transaction.autofill", "xahau.ledger.get_fee"], ) async def test_calculate_payment_fee(self, client): # GIVEN a new Payment transaction @@ -218,7 +218,7 @@ async def test_calculate_payment_fee(self, client): @test_async_and_sync( globals(), - ["xrpl.transaction.autofill"], + ["xahau.transaction.autofill"], ) async def test_networkid_non_reserved_networks(self, client): tx = AccountSet( @@ -233,7 +233,7 @@ async def test_networkid_non_reserved_networks(self, client): self.assertEqual(client.network_id, 63456) self.assertEqual(transaction.network_id, 63456) - @test_async_and_sync(globals(), ["xrpl.transaction.autofill"], use_testnet=True) + @test_async_and_sync(globals(), ["xahau.transaction.autofill"], use_testnet=True) async def test_networkid_reserved_networks(self, client): tx = AccountSet( account="rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh", @@ -254,8 +254,8 @@ class TestSubmitAndWait(IntegrationTestCase): @test_async_and_sync( globals(), [ - "xrpl.transaction.submit_and_wait", - "xrpl.ledger.get_fee", + "xahau.transaction.submit_and_wait", + "xahau.ledger.get_fee", ], ) async def test_submit_and_wait_simple(self, client): @@ -273,8 +273,8 @@ async def test_submit_and_wait_simple(self, client): @test_async_and_sync( globals(), [ - "xrpl.transaction.submit_and_wait", - "xrpl.ledger.get_fee", + "xahau.transaction.submit_and_wait", + "xahau.ledger.get_fee", ], ) async def test_submit_and_wait_payment(self, client): @@ -293,9 +293,9 @@ async def test_submit_and_wait_payment(self, client): @test_async_and_sync( globals(), [ - "xrpl.transaction.autofill_and_sign", - "xrpl.transaction.submit_and_wait", - "xrpl.ledger.get_fee", + "xahau.transaction.autofill_and_sign", + "xahau.transaction.submit_and_wait", + "xahau.ledger.get_fee", ], ) async def test_submit_and_wait_signed(self, client): @@ -317,9 +317,9 @@ async def test_submit_and_wait_signed(self, client): @test_async_and_sync( globals(), [ - "xrpl.transaction.autofill_and_sign", - "xrpl.transaction.submit_and_wait", - "xrpl.ledger.get_fee", + "xahau.transaction.autofill_and_sign", + "xahau.transaction.submit_and_wait", + "xahau.ledger.get_fee", ], ) async def test_submit_and_wait_blob(self, client): @@ -342,8 +342,8 @@ async def test_submit_and_wait_blob(self, client): @test_async_and_sync( globals(), [ - "xrpl.transaction.submit_and_wait", - "xrpl.ledger.get_latest_validated_ledger_sequence", + "xahau.transaction.submit_and_wait", + "xahau.ledger.get_latest_validated_ledger_sequence", ], ) async def test_submit_and_wait_last_ledger_expiration(self, client): @@ -360,7 +360,7 @@ async def test_submit_and_wait_last_ledger_expiration(self, client): @test_async_and_sync( globals(), [ - "xrpl.transaction.submit_and_wait", + "xahau.transaction.submit_and_wait", ], ) async def test_submit_and_wait_tec_error(self, client): @@ -376,9 +376,9 @@ async def test_submit_and_wait_tec_error(self, client): @test_async_and_sync( globals(), [ - "xrpl.transaction.sign", - "xrpl.transaction.submit_and_wait", - "xrpl.ledger.get_latest_validated_ledger_sequence", + "xahau.transaction.sign", + "xahau.transaction.submit_and_wait", + "xahau.ledger.get_latest_validated_ledger_sequence", ], ) async def test_submit_and_wait_bad_transaction(self, client): @@ -398,9 +398,9 @@ async def test_submit_and_wait_bad_transaction(self, client): @test_async_and_sync( globals(), [ - "xrpl.transaction.sign", - "xrpl.transaction.submit_and_wait", - "xrpl.account.get_next_valid_seq_number", + "xahau.transaction.sign", + "xahau.transaction.submit_and_wait", + "xahau.account.get_next_valid_seq_number", ], ) async def test_reliable_submission_no_last_ledger_sequence(self, client): @@ -418,7 +418,7 @@ async def test_reliable_submission_no_last_ledger_sequence(self, client): @test_async_and_sync( globals(), [ - "xrpl.transaction.sign_and_submit", + "xahau.transaction.sign_and_submit", ], ) async def test_sign_and_submit(self, client): diff --git a/tests/integration/sugar/test_wallet.py b/tests/integration/sugar/test_wallet.py index 997f92072..3ac284c3f 100644 --- a/tests/integration/sugar/test_wallet.py +++ b/tests/integration/sugar/test_wallet.py @@ -3,14 +3,14 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import submit_transaction_async -from xrpl.asyncio.clients import AsyncJsonRpcClient, AsyncWebsocketClient -from xrpl.asyncio.wallet import generate_faucet_wallet -from xrpl.clients import JsonRpcClient, WebsocketClient -from xrpl.core.addresscodec.main import classic_address_to_xaddress -from xrpl.models.requests import AccountInfo -from xrpl.models.transactions import Payment -from xrpl.wallet import generate_faucet_wallet as sync_generate_faucet_wallet -from xrpl.wallet.main import Wallet +from xahau.asyncio.clients import AsyncJsonRpcClient, AsyncWebsocketClient +from xahau.asyncio.wallet import generate_faucet_wallet +from xahau.clients import JsonRpcClient, WebsocketClient +from xahau.core.addresscodec.main import classic_address_to_xaddress +from xahau.models.requests import AccountInfo +from xahau.models.transactions import Payment +from xahau.wallet import generate_faucet_wallet as sync_generate_faucet_wallet +from xahau.wallet.main import Wallet def sync_generate_faucet_wallet_and_fund_again( @@ -93,7 +93,7 @@ def run_test(test_name): # ensure that the wallet creation has been validated and the account actually exists async def _parallel_test_generate_faucet_wallet_rel_sub(self): - client = JsonRpcClient("https://s.devnet.rippletest.net:51234") + client = JsonRpcClient("https://xahau-test.net") destination = await generate_faucet_wallet(client) wallet = await generate_faucet_wallet(client) # TODO: refactor so this actually waits for validation @@ -112,49 +112,41 @@ async def _parallel_test_generate_faucet_wallet_rel_sub(self): # Custom host tests async def _parallel_test_generate_faucet_wallet_custom_host_async_websockets(self): - async with AsyncWebsocketClient( - "wss://s.devnet.rippletest.net:51233" - ) as client: + async with AsyncWebsocketClient("wss://xahau-test.net:51233") as client: await generate_faucet_wallet_and_fund_again( self, client, - "faucet.devnet.rippletest.net", + "xahau-test.net", usage_context="integration_test", ) async def _parallel_test_generate_faucet_wallet_custom_host_async_json_rpc(self): - client = AsyncJsonRpcClient("https://s.devnet.rippletest.net:51234") + client = AsyncJsonRpcClient("https://xahau-test.net") await generate_faucet_wallet_and_fund_again( self, client, - "faucet.devnet.rippletest.net", + "xahau-test.net", usage_context="integration_test", ) def _parallel_test_generate_faucet_wallet_custom_host_sync_websockets(self): - with WebsocketClient("wss://s.devnet.rippletest.net:51233") as client: - sync_generate_faucet_wallet_and_fund_again( - self, client, "faucet.devnet.rippletest.net" - ) + with WebsocketClient("wss://xahau-test.net:51233") as client: + sync_generate_faucet_wallet_and_fund_again(self, client, "xahau-test.net") def _parallel_test_generate_faucet_wallet_custom_host_sync_json_rpc(self): - client = JsonRpcClient("https://s.devnet.rippletest.net:51234") - sync_generate_faucet_wallet_and_fund_again( - self, client, "faucet.devnet.rippletest.net" - ) + client = JsonRpcClient("https://xahau-test.net") + sync_generate_faucet_wallet_and_fund_again(self, client, "xahau-test.net") # Network tests async def _parallel_test_generate_faucet_wallet_testnet_async_websockets(self): async with AsyncWebsocketClient( - "wss://s.altnet.rippletest.net:51233" + "wss://xahau-test.net" ) as client: await generate_faucet_wallet_and_fund_again(self, client) async def _parallel_test_generate_faucet_wallet_devnet_async_websockets(self): - async with AsyncWebsocketClient( - "wss://s.devnet.rippletest.net:51233" - ) as client: + async with AsyncWebsocketClient("wss://xahau-test.net:51233") as client: await generate_faucet_wallet_and_fund_again(self, client) def test_wallet_get_xaddress(self): diff --git a/tests/integration/transactions/test_account_delete.py b/tests/integration/transactions/test_account_delete.py index 63dff7bcf..bc3c36373 100644 --- a/tests/integration/transactions/test_account_delete.py +++ b/tests/integration/transactions/test_account_delete.py @@ -4,9 +4,9 @@ test_async_and_sync, ) from tests.integration.reusable_values import DESTINATION, WALLET -from xrpl.models.response import ResponseStatus -from xrpl.models.transactions import AccountDelete -from xrpl.utils import xrp_to_drops +from xahau.models.response import ResponseStatus +from xahau.models.transactions import AccountDelete +from xahau.utils import xrp_to_drops # We can re-use the shared wallet bc this test should fail to actually delete # the associated account. @@ -18,7 +18,7 @@ DESTINATION_TAG = 3 -class TestAccountDelete(IntegrationTestCase): +class NoTestAccountDelete(IntegrationTestCase): @test_async_and_sync(globals()) async def test_all_fields(self, client): account_delete = AccountDelete( diff --git a/tests/integration/transactions/test_account_set.py b/tests/integration/transactions/test_account_set.py index 2d1b67cd8..cd5d3649d 100644 --- a/tests/integration/transactions/test_account_set.py +++ b/tests/integration/transactions/test_account_set.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models.response import ResponseStatus -from xrpl.models.transactions import AccountSet +from xahau.models.response import ResponseStatus +from xahau.models.transactions import AccountSet ACCOUNT = WALLET.address diff --git a/tests/integration/transactions/test_amm_bid.py b/tests/integration/transactions/test_amm_bid.py index 6ec0c222f..2248337b8 100644 --- a/tests/integration/transactions/test_amm_bid.py +++ b/tests/integration/transactions/test_amm_bid.py @@ -10,17 +10,17 @@ AMM_ISSUER_WALLET, WALLET, ) -from xrpl.models.amounts.issued_currency_amount import IssuedCurrencyAmount -from xrpl.models.auth_account import AuthAccount -from xrpl.models.requests.amm_info import AMMInfo -from xrpl.models.transactions.amm_bid import AMMBid +from xahau.models.amounts.issued_currency_amount import IssuedCurrencyAmount +from xahau.models.auth_account import AuthAccount +from xahau.models.requests.amm_info import AMMInfo +from xahau.models.transactions.amm_bid import AMMBid asset = AMM_ASSET asset2 = AMM_ASSET2 issuer_wallet = AMM_ISSUER_WALLET -class TestAMMBid(IntegrationTestCase): +class NoTestAMMBid(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): pre_amm_info = await client.request( diff --git a/tests/integration/transactions/test_amm_create.py b/tests/integration/transactions/test_amm_create.py index abca68160..f1cca74a8 100644 --- a/tests/integration/transactions/test_amm_create.py +++ b/tests/integration/transactions/test_amm_create.py @@ -1,9 +1,9 @@ from tests.integration.integration_test_case import IntegrationTestCase from tests.integration.it_utils import create_amm_pool_async, test_async_and_sync -from xrpl.models.requests.amm_info import AMMInfo +from xahau.models.requests.amm_info import AMMInfo -class TestAMMCreate(IntegrationTestCase): +class NoTestAMMCreate(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): amm_pool = await create_amm_pool_async(client) diff --git a/tests/integration/transactions/test_amm_deposit.py b/tests/integration/transactions/test_amm_deposit.py index 78b4f5556..8a419c2ba 100644 --- a/tests/integration/transactions/test_amm_deposit.py +++ b/tests/integration/transactions/test_amm_deposit.py @@ -10,17 +10,17 @@ AMM_ISSUER_WALLET, WALLET, ) -from xrpl.models import AMMDeposit -from xrpl.models.amounts.issued_currency_amount import IssuedCurrencyAmount -from xrpl.models.requests.amm_info import AMMInfo -from xrpl.models.transactions.amm_deposit import AMMDepositFlag +from xahau.models import AMMDeposit +from xahau.models.amounts.issued_currency_amount import IssuedCurrencyAmount +from xahau.models.requests.amm_info import AMMInfo +from xahau.models.transactions.amm_deposit import AMMDepositFlag asset = AMM_ASSET asset2 = AMM_ASSET2 issuer_wallet = AMM_ISSUER_WALLET -class TestAMMDeposit(IntegrationTestCase): +class NoTestAMMDeposit(IntegrationTestCase): @test_async_and_sync(globals()) async def test_single_asset(self, client): pre_amm_info = await client.request( diff --git a/tests/integration/transactions/test_amm_vote.py b/tests/integration/transactions/test_amm_vote.py index 82a752add..607216f28 100644 --- a/tests/integration/transactions/test_amm_vote.py +++ b/tests/integration/transactions/test_amm_vote.py @@ -10,15 +10,15 @@ AMM_ISSUER_WALLET, WALLET, ) -from xrpl.models.requests.amm_info import AMMInfo -from xrpl.models.transactions.amm_vote import AMMVote +from xahau.models.requests.amm_info import AMMInfo +from xahau.models.transactions.amm_vote import AMMVote asset = AMM_ASSET asset2 = AMM_ASSET2 issuer_wallet = AMM_ISSUER_WALLET -class TestAMMVote(IntegrationTestCase): +class NoTestAMMVote(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): pre_amm_info = await client.request( diff --git a/tests/integration/transactions/test_amm_withdraw.py b/tests/integration/transactions/test_amm_withdraw.py index 779337139..441e4bbeb 100644 --- a/tests/integration/transactions/test_amm_withdraw.py +++ b/tests/integration/transactions/test_amm_withdraw.py @@ -10,16 +10,16 @@ AMM_ISSUER_WALLET, WALLET, ) -from xrpl.models.amounts.issued_currency_amount import IssuedCurrencyAmount -from xrpl.models.requests.amm_info import AMMInfo -from xrpl.models.transactions.amm_withdraw import AMMWithdraw, AMMWithdrawFlag +from xahau.models.amounts.issued_currency_amount import IssuedCurrencyAmount +from xahau.models.requests.amm_info import AMMInfo +from xahau.models.transactions.amm_withdraw import AMMWithdraw, AMMWithdrawFlag asset = AMM_ASSET asset2 = AMM_ASSET2 issuer_wallet = AMM_ISSUER_WALLET -class TestAMMWithdraw(IntegrationTestCase): +class NoTestAMMWithdraw(IntegrationTestCase): @test_async_and_sync(globals()) async def test_single_asset(self, client): pre_amm_info = await client.request( diff --git a/tests/integration/transactions/test_check_cancel.py b/tests/integration/transactions/test_check_cancel.py index c0f8c131a..9606eddbb 100644 --- a/tests/integration/transactions/test_check_cancel.py +++ b/tests/integration/transactions/test_check_cancel.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models.response import ResponseStatus -from xrpl.models.transactions import CheckCancel +from xahau.models.response import ResponseStatus +from xahau.models.transactions import CheckCancel ACCOUNT = WALLET.address diff --git a/tests/integration/transactions/test_check_cash.py b/tests/integration/transactions/test_check_cash.py index 0d1c03b96..ea763fae0 100644 --- a/tests/integration/transactions/test_check_cash.py +++ b/tests/integration/transactions/test_check_cash.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models.response import ResponseStatus -from xrpl.models.transactions import CheckCash +from xahau.models.response import ResponseStatus +from xahau.models.transactions import CheckCash ACCOUNT = WALLET.address CHECK_ID = "838766BA2B995C00744175F69A1B11E32C3DBC40E64801A4056FCBD657F57334" diff --git a/tests/integration/transactions/test_check_create.py b/tests/integration/transactions/test_check_create.py index 9ac11284f..3972044b5 100644 --- a/tests/integration/transactions/test_check_create.py +++ b/tests/integration/transactions/test_check_create.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import DESTINATION, WALLET -from xrpl.models.response import ResponseStatus -from xrpl.models.transactions import CheckCreate +from xahau.models.response import ResponseStatus +from xahau.models.transactions import CheckCreate ACCOUNT = WALLET.address DESTINATION_TAG = 1 diff --git a/tests/integration/transactions/test_clawback.py b/tests/integration/transactions/test_clawback.py index dff68e264..5f401fa55 100644 --- a/tests/integration/transactions/test_clawback.py +++ b/tests/integration/transactions/test_clawback.py @@ -5,7 +5,7 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models import ( +from xahau.models import ( AccountSet, AccountSetAsfFlag, Clawback, @@ -14,13 +14,13 @@ TrustSet, TrustSetFlag, ) -from xrpl.wallet import Wallet +from xahau.wallet import Wallet HOLDER = Wallet.create() fund_wallet(HOLDER) -class TestClawback(IntegrationTestCase): +class NoTestClawback(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): # test setup diff --git a/tests/integration/transactions/test_delete_oracle.py b/tests/integration/transactions/test_delete_oracle.py index 702025af8..afdb3dbfa 100644 --- a/tests/integration/transactions/test_delete_oracle.py +++ b/tests/integration/transactions/test_delete_oracle.py @@ -6,16 +6,16 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models import AccountObjects, AccountObjectType, OracleDelete, OracleSet -from xrpl.models.response import ResponseStatus -from xrpl.models.transactions.oracle_set import PriceData -from xrpl.utils import str_to_hex +from xahau.models import AccountObjects, AccountObjectType, OracleDelete, OracleSet +from xahau.models.response import ResponseStatus +from xahau.models.transactions.oracle_set import PriceData +from xahau.utils import str_to_hex _PROVIDER = str_to_hex("chainlink") _ASSET_CLASS = str_to_hex("currency") -class TestDeleteOracle(IntegrationTestCase): +class NoTestDeleteOracle(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic(self, client): oracle_id = self.value diff --git a/tests/integration/transactions/test_deposit_preauth.py b/tests/integration/transactions/test_deposit_preauth.py index 3f6aa3118..283b9d6b0 100644 --- a/tests/integration/transactions/test_deposit_preauth.py +++ b/tests/integration/transactions/test_deposit_preauth.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models.response import ResponseStatus -from xrpl.models.transactions import DepositPreauth +from xahau.models.response import ResponseStatus +from xahau.models.transactions import DepositPreauth ACCOUNT = WALLET.address ADDRESS = "rEhxGqkqPPSxQ3P25J66ft5TwpzV14k2de" diff --git a/tests/integration/transactions/test_did_delete.py b/tests/integration/transactions/test_did_delete.py index d189c849a..c1060e765 100644 --- a/tests/integration/transactions/test_did_delete.py +++ b/tests/integration/transactions/test_did_delete.py @@ -4,13 +4,13 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models import AccountObjects, AccountObjectType, DIDDelete, DIDSet -from xrpl.models.response import ResponseStatus +from xahau.models import AccountObjects, AccountObjectType, DIDDelete, DIDSet +from xahau.models.response import ResponseStatus _VALID_FIELD = "1234567890abcdefABCDEF" -class TestDIDDelete(IntegrationTestCase): +class NoTestDIDDelete(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic(self, client): # Create DID to delete diff --git a/tests/integration/transactions/test_did_set.py b/tests/integration/transactions/test_did_set.py index 48b378593..042b65b30 100644 --- a/tests/integration/transactions/test_did_set.py +++ b/tests/integration/transactions/test_did_set.py @@ -4,13 +4,13 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models import AccountObjects, AccountObjectType, DIDSet -from xrpl.models.response import ResponseStatus +from xahau.models import AccountObjects, AccountObjectType, DIDSet +from xahau.models.response import ResponseStatus _VALID_FIELD = "1234567890abcdefABCDEF" -class TestDIDSet(IntegrationTestCase): +class NoTestDIDSet(IntegrationTestCase): @test_async_and_sync(globals()) async def test_all_fields(self, client): tx = DIDSet( diff --git a/tests/integration/transactions/test_escrow_cancel.py b/tests/integration/transactions/test_escrow_cancel.py index 42cae81d6..a993cc2fd 100644 --- a/tests/integration/transactions/test_escrow_cancel.py +++ b/tests/integration/transactions/test_escrow_cancel.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models.response import ResponseStatus -from xrpl.models.transactions import EscrowCancel +from xahau.models.response import ResponseStatus +from xahau.models.transactions import EscrowCancel ACCOUNT = WALLET.address OWNER = "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn" diff --git a/tests/integration/transactions/test_escrow_create.py b/tests/integration/transactions/test_escrow_create.py index 4e1df99ac..d8782fb72 100644 --- a/tests/integration/transactions/test_escrow_create.py +++ b/tests/integration/transactions/test_escrow_create.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import DESTINATION, WALLET -from xrpl.models import EscrowCreate, Ledger -from xrpl.models.response import ResponseStatus +from xahau.models import EscrowCreate, Ledger +from xahau.models.response import ResponseStatus ACCOUNT = WALLET.address diff --git a/tests/integration/transactions/test_escrow_finish.py b/tests/integration/transactions/test_escrow_finish.py index a415cb3fa..f798d82e8 100644 --- a/tests/integration/transactions/test_escrow_finish.py +++ b/tests/integration/transactions/test_escrow_finish.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models.response import ResponseStatus -from xrpl.models.transactions import EscrowFinish +from xahau.models.response import ResponseStatus +from xahau.models.transactions import EscrowFinish # Special fee for EscrowFinish transactions that contain a fulfillment. # See note here: https://xrpl.org/escrowfinish.html diff --git a/tests/integration/transactions/test_offer_cancel.py b/tests/integration/transactions/test_offer_cancel.py index 1b4f017c8..71c999641 100644 --- a/tests/integration/transactions/test_offer_cancel.py +++ b/tests/integration/transactions/test_offer_cancel.py @@ -4,7 +4,7 @@ test_async_and_sync, ) from tests.integration.reusable_values import OFFER, WALLET -from xrpl.models.transactions import OfferCancel +from xahau.models.transactions import OfferCancel class TestOfferCancel(IntegrationTestCase): diff --git a/tests/integration/transactions/test_offer_create.py b/tests/integration/transactions/test_offer_create.py index 56eb24802..6bf9e167d 100644 --- a/tests/integration/transactions/test_offer_create.py +++ b/tests/integration/transactions/test_offer_create.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.transactions import OfferCreate +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.transactions import OfferCreate class TestOfferCreate(IntegrationTestCase): diff --git a/tests/integration/transactions/test_payment.py b/tests/integration/transactions/test_payment.py index a4b33f914..3be19c737 100644 --- a/tests/integration/transactions/test_payment.py +++ b/tests/integration/transactions/test_payment.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import DESTINATION, WALLET -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import Payment +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import Payment class TestPayment(IntegrationTestCase): diff --git a/tests/integration/transactions/test_payment_channel_claim.py b/tests/integration/transactions/test_payment_channel_claim.py index 6a76e829a..896815328 100644 --- a/tests/integration/transactions/test_payment_channel_claim.py +++ b/tests/integration/transactions/test_payment_channel_claim.py @@ -4,7 +4,7 @@ test_async_and_sync, ) from tests.integration.reusable_values import PAYMENT_CHANNEL, WALLET -from xrpl.models.transactions import PaymentChannelClaim +from xahau.models.transactions import PaymentChannelClaim class TestPaymentChannelClaim(IntegrationTestCase): diff --git a/tests/integration/transactions/test_payment_channel_create.py b/tests/integration/transactions/test_payment_channel_create.py index 954f86d7f..8e07b6eec 100644 --- a/tests/integration/transactions/test_payment_channel_create.py +++ b/tests/integration/transactions/test_payment_channel_create.py @@ -4,7 +4,7 @@ test_async_and_sync, ) from tests.integration.reusable_values import DESTINATION, WALLET -from xrpl.models.transactions import PaymentChannelCreate +from xahau.models.transactions import PaymentChannelCreate class TestPaymentChannelCreate(IntegrationTestCase): diff --git a/tests/integration/transactions/test_payment_channel_fund.py b/tests/integration/transactions/test_payment_channel_fund.py index b87f43fbb..6422557cc 100644 --- a/tests/integration/transactions/test_payment_channel_fund.py +++ b/tests/integration/transactions/test_payment_channel_fund.py @@ -4,7 +4,7 @@ test_async_and_sync, ) from tests.integration.reusable_values import PAYMENT_CHANNEL, WALLET -from xrpl.models.transactions import PaymentChannelFund +from xahau.models.transactions import PaymentChannelFund class TestPaymentChannelFund(IntegrationTestCase): diff --git a/tests/integration/transactions/test_set_oracle.py b/tests/integration/transactions/test_set_oracle.py index fc948c16c..19ec0858e 100644 --- a/tests/integration/transactions/test_set_oracle.py +++ b/tests/integration/transactions/test_set_oracle.py @@ -6,16 +6,16 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models import AccountObjects, AccountObjectType, OracleSet -from xrpl.models.response import ResponseStatus -from xrpl.models.transactions.oracle_set import PriceData -from xrpl.utils import str_to_hex +from xahau.models import AccountObjects, AccountObjectType, OracleSet +from xahau.models.response import ResponseStatus +from xahau.models.transactions.oracle_set import PriceData +from xahau.utils import str_to_hex _PROVIDER = str_to_hex("provider") _ASSET_CLASS = str_to_hex("currency") -class TestSetOracle(IntegrationTestCase): +class NoTestSetOracle(IntegrationTestCase): @test_async_and_sync(globals()) async def test_all_fields(self, client): tx = OracleSet( diff --git a/tests/integration/transactions/test_set_regular_key.py b/tests/integration/transactions/test_set_regular_key.py index 492ba234f..7487d61fd 100644 --- a/tests/integration/transactions/test_set_regular_key.py +++ b/tests/integration/transactions/test_set_regular_key.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models.transactions import SetRegularKey -from xrpl.wallet import Wallet +from xahau.models.transactions import SetRegularKey +from xahau.wallet import Wallet class TestSetRegularKey(IntegrationTestCase): diff --git a/tests/integration/transactions/test_signer_list_set.py b/tests/integration/transactions/test_signer_list_set.py index 3f7a83688..6e1d15962 100644 --- a/tests/integration/transactions/test_signer_list_set.py +++ b/tests/integration/transactions/test_signer_list_set.py @@ -4,8 +4,8 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models.transactions import SignerEntry, SignerListSet -from xrpl.wallet import Wallet +from xahau.models.transactions import SignerEntry, SignerListSet +from xahau.wallet import Wallet class TestSignerListSet(IntegrationTestCase): diff --git a/tests/integration/transactions/test_ticket_create.py b/tests/integration/transactions/test_ticket_create.py index 1311b1199..eea8f514f 100644 --- a/tests/integration/transactions/test_ticket_create.py +++ b/tests/integration/transactions/test_ticket_create.py @@ -4,7 +4,7 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models.transactions import TicketCreate +from xahau.models.transactions import TicketCreate class TestTicketCreate(IntegrationTestCase): diff --git a/tests/integration/transactions/test_trust_set.py b/tests/integration/transactions/test_trust_set.py index dd98c93d2..745e945a0 100644 --- a/tests/integration/transactions/test_trust_set.py +++ b/tests/integration/transactions/test_trust_set.py @@ -4,10 +4,10 @@ test_async_and_sync, ) from tests.integration.reusable_values import WALLET -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import TrustSet, TrustSetFlag -from xrpl.wallet import Wallet +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import TrustSet, TrustSetFlag +from xahau.wallet import Wallet class TestTrustSet(IntegrationTestCase): diff --git a/tests/integration/transactions/test_xchain_account_create_commit.py b/tests/integration/transactions/test_xchain_account_create_commit.py index 3a5400f57..0cbb3de85 100644 --- a/tests/integration/transactions/test_xchain_account_create_commit.py +++ b/tests/integration/transactions/test_xchain_account_create_commit.py @@ -4,11 +4,11 @@ test_async_and_sync, ) from tests.integration.reusable_values import BRIDGE, WALLET -from xrpl.models import AccountInfo, XChainAccountCreateCommit -from xrpl.wallet import Wallet +from xahau.models import AccountInfo, XChainAccountCreateCommit +from xahau.wallet import Wallet -class TestXChainAccountCreateCommit(IntegrationTestCase): +class NoTestXChainAccountCreateCommit(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): locking_chain_door = BRIDGE.xchain_bridge.locking_chain_door diff --git a/tests/integration/transactions/test_xchain_add_account_create_attestation.py b/tests/integration/transactions/test_xchain_add_account_create_attestation.py index 3c66ba3b8..8f85d1349 100644 --- a/tests/integration/transactions/test_xchain_add_account_create_attestation.py +++ b/tests/integration/transactions/test_xchain_add_account_create_attestation.py @@ -4,20 +4,20 @@ test_async_and_sync, ) from tests.integration.reusable_values import BRIDGE, WITNESS_WALLET -from xrpl.asyncio.account import does_account_exist -from xrpl.core.binarycodec import encode -from xrpl.core.keypairs import sign -from xrpl.models import ( +from xahau.asyncio.account import does_account_exist +from xahau.core.binarycodec import encode +from xahau.core.keypairs import sign +from xahau.models import ( AccountObjects, AccountObjectType, XChainAddAccountCreateAttestation, ) -from xrpl.utils import xrp_to_drops -from xrpl.wallet import Wallet +from xahau.utils import xrp_to_drops +from xahau.wallet import Wallet -class TestXChainAddAccountCreateAttestation(IntegrationTestCase): - @test_async_and_sync(globals(), ["xrpl.account.does_account_exist"]) +class NoTestXChainAddAccountCreateAttestation(IntegrationTestCase): + @test_async_and_sync(globals(), ["xahau.account.does_account_exist"]) async def test_basic_functionality(self, client): destination = Wallet.create().classic_address other_chain_source = Wallet.create().classic_address diff --git a/tests/integration/transactions/test_xchain_add_claim_attestation.py b/tests/integration/transactions/test_xchain_add_claim_attestation.py index c94b6be13..623d82fea 100644 --- a/tests/integration/transactions/test_xchain_add_claim_attestation.py +++ b/tests/integration/transactions/test_xchain_add_claim_attestation.py @@ -4,14 +4,14 @@ test_async_and_sync, ) from tests.integration.reusable_values import BRIDGE, DESTINATION, WITNESS_WALLET -from xrpl.core.binarycodec import encode -from xrpl.core.keypairs import sign -from xrpl.models import AccountInfo, Tx, XChainAddClaimAttestation, XChainCreateClaimID -from xrpl.utils import get_xchain_claim_id, xrp_to_drops -from xrpl.wallet import Wallet +from xahau.core.binarycodec import encode +from xahau.core.keypairs import sign +from xahau.models import AccountInfo, Tx, XChainAddClaimAttestation, XChainCreateClaimID +from xahau.utils import get_xchain_claim_id, xrp_to_drops +from xahau.wallet import Wallet -class TestXChainAddClaimAttestation(IntegrationTestCase): +class NoTestXChainAddClaimAttestation(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): other_chain_source = Wallet.create().classic_address diff --git a/tests/integration/transactions/test_xchain_claim.py b/tests/integration/transactions/test_xchain_claim.py index ebfd3eb1f..bd66da050 100644 --- a/tests/integration/transactions/test_xchain_claim.py +++ b/tests/integration/transactions/test_xchain_claim.py @@ -4,20 +4,20 @@ test_async_and_sync, ) from tests.integration.reusable_values import BRIDGE, DESTINATION, WITNESS_WALLET -from xrpl.core.binarycodec import encode -from xrpl.core.keypairs import sign -from xrpl.models import ( +from xahau.core.binarycodec import encode +from xahau.core.keypairs import sign +from xahau.models import ( AccountInfo, Tx, XChainAddClaimAttestation, XChainClaim, XChainCreateClaimID, ) -from xrpl.utils import get_xchain_claim_id, xrp_to_drops -from xrpl.wallet import Wallet +from xahau.utils import get_xchain_claim_id, xrp_to_drops +from xahau.wallet import Wallet -class TestXChainClaim(IntegrationTestCase): +class NoTestXChainClaim(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): other_chain_source = Wallet.create().classic_address diff --git a/tests/integration/transactions/test_xchain_commit.py b/tests/integration/transactions/test_xchain_commit.py index a76552942..a8f07aa44 100644 --- a/tests/integration/transactions/test_xchain_commit.py +++ b/tests/integration/transactions/test_xchain_commit.py @@ -4,10 +4,10 @@ test_async_and_sync, ) from tests.integration.reusable_values import BRIDGE, WALLET -from xrpl.models import AccountInfo, XChainCommit +from xahau.models import AccountInfo, XChainCommit -class TestXChainCommit(IntegrationTestCase): +class NoTestXChainCommit(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): locking_chain_door = BRIDGE.xchain_bridge.locking_chain_door diff --git a/tests/integration/transactions/test_xchain_create_bridge.py b/tests/integration/transactions/test_xchain_create_bridge.py index 94fbe2598..fa9e73e8d 100644 --- a/tests/integration/transactions/test_xchain_create_bridge.py +++ b/tests/integration/transactions/test_xchain_create_bridge.py @@ -5,17 +5,17 @@ sign_and_reliable_submission_async, test_async_and_sync, ) -from xrpl.models import ( +from xahau.models import ( XRP, AccountObjects, AccountObjectType, XChainBridge, XChainCreateBridge, ) -from xrpl.wallet import Wallet +from xahau.wallet import Wallet -class TestXChainCreateBridge(IntegrationTestCase): +class NoTestXChainCreateBridge(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): door_wallet = Wallet.create() diff --git a/tests/integration/transactions/test_xchain_create_claim_id.py b/tests/integration/transactions/test_xchain_create_claim_id.py index 00ba2fc91..2ee6a1d6d 100644 --- a/tests/integration/transactions/test_xchain_create_claim_id.py +++ b/tests/integration/transactions/test_xchain_create_claim_id.py @@ -5,11 +5,11 @@ test_async_and_sync, ) from tests.integration.reusable_values import BRIDGE -from xrpl.models import AccountObjects, AccountObjectType, XChainCreateClaimID -from xrpl.wallet import Wallet +from xahau.models import AccountObjects, AccountObjectType, XChainCreateClaimID +from xahau.wallet import Wallet -class TestXChainCreateClaimID(IntegrationTestCase): +class NoTestXChainCreateClaimID(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): account = Wallet.create() diff --git a/tests/integration/transactions/test_xchain_modify_bridge.py b/tests/integration/transactions/test_xchain_modify_bridge.py index 80ec7fc24..150c80559 100644 --- a/tests/integration/transactions/test_xchain_modify_bridge.py +++ b/tests/integration/transactions/test_xchain_modify_bridge.py @@ -5,7 +5,7 @@ sign_and_reliable_submission_async, test_async_and_sync, ) -from xrpl.models import ( +from xahau.models import ( XRP, AccountObjects, AccountObjectType, @@ -13,10 +13,10 @@ XChainCreateBridge, XChainModifyBridge, ) -from xrpl.wallet import Wallet +from xahau.wallet import Wallet -class TestXChainCreateBridge(IntegrationTestCase): +class NoTestXChainCreateBridge(IntegrationTestCase): @test_async_and_sync(globals()) async def test_basic_functionality(self, client): door_wallet = Wallet.create() diff --git a/tests/unit/asyn/ledger/test_calculate_fee_dynamically.py b/tests/unit/asyn/ledger/test_calculate_fee_dynamically.py index 991c7e498..a64c8d129 100644 --- a/tests/unit/asyn/ledger/test_calculate_fee_dynamically.py +++ b/tests/unit/asyn/ledger/test_calculate_fee_dynamically.py @@ -1,6 +1,6 @@ from unittest import TestCase -from xrpl.asyncio.ledger.main import calculate_fee_dynamically +from xahau.asyncio.ledger.main import calculate_fee_dynamically class TestCalculateFeeDynamically(TestCase): diff --git a/tests/unit/asyn/wallet/test_main.py b/tests/unit/asyn/wallet/test_main.py index 1b53b1ec7..1193d32b3 100644 --- a/tests/unit/asyn/wallet/test_main.py +++ b/tests/unit/asyn/wallet/test_main.py @@ -1,8 +1,8 @@ from unittest import TestCase -from xrpl.constants import CryptoAlgorithm, XRPLException -from xrpl.core.addresscodec.exceptions import XRPLAddressCodecException -from xrpl.wallet.main import Wallet +from xahau.constants import CryptoAlgorithm, XRPLException +from xahau.core.addresscodec.exceptions import XRPLAddressCodecException +from xahau.wallet.main import Wallet constants = { "regular_key_pair": { diff --git a/tests/unit/asyn/wallet/test_wallet.py b/tests/unit/asyn/wallet/test_wallet.py index 71ff4a342..fada34b45 100644 --- a/tests/unit/asyn/wallet/test_wallet.py +++ b/tests/unit/asyn/wallet/test_wallet.py @@ -1,13 +1,13 @@ from unittest import TestCase -from xrpl.asyncio.wallet.wallet_generation import ( +from xahau.asyncio.wallet.wallet_generation import ( _DEV_FAUCET_URL, _TEST_FAUCET_URL, get_faucet_url, process_faucet_host_url, ) -from xrpl.core.addresscodec import classic_address_to_xaddress -from xrpl.wallet import Wallet +from xahau.core.addresscodec import classic_address_to_xaddress +from xahau.wallet import Wallet class TestWallet(TestCase): @@ -17,16 +17,16 @@ def test_wallet_get_xaddress(self): self.assertEqual(wallet.get_xaddress(), expected) def test_get_faucet_wallet_dev(self): - json_client_url = "https://s.devnet.rippletest.net:51234" - ws_client_url = "wss://s.devnet.rippletest.net/" + json_client_url = "https://xahau-test.net" + ws_client_url = "wss://xahau-test.net/" expected_faucet = _DEV_FAUCET_URL self.assertEqual(get_faucet_url(json_client_url), expected_faucet) self.assertEqual(get_faucet_url(ws_client_url), expected_faucet) def test_get_faucet_wallet_custom(self): - json_client_url = "https://s.devnet.rippletest.net:51234" - ws_client_url = "wss://s.devnet.rippletest.net/" + json_client_url = "https://xahau-test.net" + ws_client_url = "wss://xahau-test.net/" custom_host = "my_host.org" expected_faucet = "https://my_host.org/accounts" @@ -34,8 +34,8 @@ def test_get_faucet_wallet_custom(self): self.assertEqual(get_faucet_url(ws_client_url, custom_host), expected_faucet) def test_get_faucet_wallet_test(self): - json_client_url = "https://testnet.xrpl-labs.com" - ws_client_url = "wss://testnet.xrpl-labs.com" + json_client_url = "https://xahau-test.net" + ws_client_url = "wss://xahau-test.net" expected_faucet = _TEST_FAUCET_URL self.assertEqual(get_faucet_url(json_client_url), expected_faucet) @@ -48,44 +48,44 @@ class TestProcessFaucetHostURL(TestCase): def test_process_faucet_host_url_no_protocol(self) -> None: """Test with domain only, no protocol. Lacks a protocol and path, so it defaults to https://abcd.com/accounts""" - input_url = "faucet.devnet.rippletest.net" - expected_url = "https://faucet.devnet.rippletest.net/accounts" + input_url = "xahau-test.net" + expected_url = "https://xahau-test.net/accounts" self.assertEqual(process_faucet_host_url(input_url), expected_url) def test_process_faucet_host_url_with_https(self) -> None: """Test with HTTPS protocol specified. Has a complete URL but lacks a path, thus "/accounts" is appended.""" - input_url = "https://faucet.devnet.rippletest.net" - expected_url = "https://faucet.devnet.rippletest.net/accounts" + input_url = "https://xahau-test.net" + expected_url = "https://xahau-test.net/accounts" self.assertEqual(process_faucet_host_url(input_url), expected_url) def test_process_faucet_host_url_with_path(self) -> None: """Test with domain and path, no protocol. Lacks a protocol, defaults to "https://", and already specifies a path.""" - input_url = "faucet.devnet.rippletest.net/accounts" - expected_url = "https://faucet.devnet.rippletest.net/accounts" + input_url = "xahau-test.net/accounts" + expected_url = "https://xahau-test.net/accounts" self.assertEqual(process_faucet_host_url(input_url), expected_url) def test_process_faucet_host_url_full(self) -> None: """Test with full URL.""" - input_url = "https://faucet.devnet.rippletest.net/accounts" - expected_url = "https://faucet.devnet.rippletest.net/accounts" + input_url = "https://xahau-test.net/accounts" + expected_url = "https://xahau-test.net/accounts" self.assertEqual(process_faucet_host_url(input_url), expected_url) def test_process_faucet_host_url_different_protocol(self) -> None: """Test with a non-HTTP protocol specified.""" - input_url = "ftp://faucet.devnet.rippletest.net" - expected_url = "ftp://faucet.devnet.rippletest.net/accounts" + input_url = "ftp://xahau-test.net" + expected_url = "ftp://xahau-test.net/accounts" self.assertEqual(process_faucet_host_url(input_url), expected_url) def test_process_faucet_host_url_trailing_slash(self) -> None: """Test with a non-HTTP protocol specified.""" - input_url = "https://faucet.devnet.rippletest.net/" - expected_url = "https://faucet.devnet.rippletest.net/accounts" + input_url = "https://xahau-test.net/" + expected_url = "https://xahau-test.net/accounts" self.assertEqual(process_faucet_host_url(input_url), expected_url) def test_process_faucet_host_url_custom_path(self) -> None: """Test with a non-HTTP protocol specified.""" - input_url = "https://faucet.devnet.rippletest.net/america/" - expected_url = "https://faucet.devnet.rippletest.net/america" + input_url = "https://xahau-test.net/america/" + expected_url = "https://xahau-test.net/america" self.assertEqual(process_faucet_host_url(input_url), expected_url) diff --git a/tests/unit/core/addresscodec/test_codec.py b/tests/unit/core/addresscodec/test_codec.py index 350f278c5..d9d00740b 100644 --- a/tests/unit/core/addresscodec/test_codec.py +++ b/tests/unit/core/addresscodec/test_codec.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.constants import CryptoAlgorithm -from xrpl.core import addresscodec +from xahau.constants import CryptoAlgorithm +from xahau.core import addresscodec class TestCodec(TestCase): diff --git a/tests/unit/core/addresscodec/test_main.py b/tests/unit/core/addresscodec/test_main.py index f1cbb4a22..5f6833336 100644 --- a/tests/unit/core/addresscodec/test_main.py +++ b/tests/unit/core/addresscodec/test_main.py @@ -2,11 +2,11 @@ from unittest import TestCase from tests.unit.core.addresscodec.test_main_test_cases import test_cases -from xrpl.asyncio.transaction.main import _calculate_fee_per_transaction_type -from xrpl.core import addresscodec -from xrpl.core.addresscodec.main import MAX_32_BIT_UNSIGNED_INT -from xrpl.models.amounts.issued_currency_amount import IssuedCurrencyAmount -from xrpl.models.transactions.payment import Payment +from xahau.asyncio.transaction.main import _calculate_fee_per_transaction_type +from xahau.core import addresscodec +from xahau.core.addresscodec.main import MAX_32_BIT_UNSIGNED_INT +from xahau.models.amounts.issued_currency_amount import IssuedCurrencyAmount +from xahau.models.transactions.payment import Payment class TestMain(TestCase): diff --git a/tests/unit/core/binarycodec/test_binary_parser.py b/tests/unit/core/binarycodec/test_binary_parser.py index 2b32f1f26..918f24491 100644 --- a/tests/unit/core/binarycodec/test_binary_parser.py +++ b/tests/unit/core/binarycodec/test_binary_parser.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.core.binarycodec.binary_wrappers import BinaryParser, BinarySerializer -from xrpl.core.binarycodec.types.blob import Blob +from xahau.core.binarycodec.binary_wrappers import BinaryParser, BinarySerializer +from xahau.core.binarycodec.types.blob import Blob # Note that core field-reading logic will be tested by the implementation of # specific field type classes. These tests just sanity-check key helper methods. diff --git a/tests/unit/core/binarycodec/test_binary_serializer.py b/tests/unit/core/binarycodec/test_binary_serializer.py index 342f1ece7..28e72b8ab 100644 --- a/tests/unit/core/binarycodec/test_binary_serializer.py +++ b/tests/unit/core/binarycodec/test_binary_serializer.py @@ -1,8 +1,8 @@ from unittest import TestCase -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.binary_wrappers.binary_serializer import BinarySerializer -from xrpl.core.binarycodec.types.blob import Blob +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.binary_wrappers.binary_serializer import BinarySerializer +from xahau.core.binarycodec.types.blob import Blob class TestBinarySerializer(TestCase): diff --git a/tests/unit/core/binarycodec/test_definition_service.py b/tests/unit/core/binarycodec/test_definition_service.py index b3d25e219..1137388c0 100644 --- a/tests/unit/core/binarycodec/test_definition_service.py +++ b/tests/unit/core/binarycodec/test_definition_service.py @@ -1,6 +1,6 @@ from unittest import TestCase -import xrpl.core.binarycodec.definitions.definitions as definitions +import xahau.core.binarycodec.definitions.definitions as definitions class TestDefinitionService(TestCase): diff --git a/tests/unit/core/binarycodec/test_field_id_codec.py b/tests/unit/core/binarycodec/test_field_id_codec.py index 6bce4b2fe..8ac42f181 100644 --- a/tests/unit/core/binarycodec/test_field_id_codec.py +++ b/tests/unit/core/binarycodec/test_field_id_codec.py @@ -1,6 +1,6 @@ from unittest import TestCase -import xrpl.core.binarycodec.field_id_codec as field_id_codec +import xahau.core.binarycodec.field_id_codec as field_id_codec from tests.unit.core.binarycodec.fixtures import data_driven_fixtures diff --git a/tests/unit/core/binarycodec/test_main.py b/tests/unit/core/binarycodec/test_main.py index 6c6ead083..24fd56eac 100644 --- a/tests/unit/core/binarycodec/test_main.py +++ b/tests/unit/core/binarycodec/test_main.py @@ -5,8 +5,8 @@ from tests.unit.core.binarycodec.fixtures.data_driven_fixtures import ( get_whole_object_tests, ) -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.main import ( +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.main import ( decode, encode, encode_for_multisigning, diff --git a/tests/unit/core/binarycodec/types/test_account_id.py b/tests/unit/core/binarycodec/types/test_account_id.py index aab9694a7..800b6a13e 100644 --- a/tests/unit/core/binarycodec/types/test_account_id.py +++ b/tests/unit/core/binarycodec/types/test_account_id.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.core.binarycodec import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.account_id import AccountID +from xahau.core.binarycodec import XRPLBinaryCodecException +from xahau.core.binarycodec.types.account_id import AccountID HEX_ENCODING = "5E7B112523F68D2F5E879DB4EAC51C6698A69304" BASE58_ENCODING = "r9cZA1mLK5R5Am25ArfXFmqgNwjZgnfk59" diff --git a/tests/unit/core/binarycodec/types/test_amount.py b/tests/unit/core/binarycodec/types/test_amount.py index dd5099035..e5822d30e 100644 --- a/tests/unit/core/binarycodec/types/test_amount.py +++ b/tests/unit/core/binarycodec/types/test_amount.py @@ -1,12 +1,12 @@ -import xrpl.core.binarycodec.types.amount as amount +import xahau.core.binarycodec.types.amount as amount from tests.unit.core.binarycodec.types.test_serialized_type import ( TestSerializedType, data_driven_fixtures_for_type, ) -from xrpl.core.binarycodec.binary_wrappers import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.models.amounts.amount import is_issued_currency -from xrpl.models.amounts.issued_currency_amount import IssuedCurrencyAmount +from xahau.core.binarycodec.binary_wrappers import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.models.amounts.amount import is_issued_currency +from xahau.models.amounts.issued_currency_amount import IssuedCurrencyAmount # [IOU dict, expected serialized hex] IOU_CASES = [ diff --git a/tests/unit/core/binarycodec/types/test_blob.py b/tests/unit/core/binarycodec/types/test_blob.py index 515c5f5c0..6d8de336b 100644 --- a/tests/unit/core/binarycodec/types/test_blob.py +++ b/tests/unit/core/binarycodec/types/test_blob.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.core.binarycodec import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.blob import Blob +from xahau.core.binarycodec import XRPLBinaryCodecException +from xahau.core.binarycodec.types.blob import Blob class TestBlob(TestCase): diff --git a/tests/unit/core/binarycodec/types/test_currency.py b/tests/unit/core/binarycodec/types/test_currency.py index 32bf1afb5..bfbbc92b8 100644 --- a/tests/unit/core/binarycodec/types/test_currency.py +++ b/tests/unit/core/binarycodec/types/test_currency.py @@ -1,7 +1,7 @@ from unittest import TestCase -import xrpl.core.binarycodec.types.currency as currency -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException +import xahau.core.binarycodec.types.currency as currency +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException XRP_HEX_CODE = "0000000000000000000000000000000000000000" ILLEGAL_XRP_HEX_CODE = "0000000000000000000000005852500000000000" diff --git a/tests/unit/core/binarycodec/types/test_hash_types.py b/tests/unit/core/binarycodec/types/test_hash_types.py index 8fc54c68d..96265ad7f 100644 --- a/tests/unit/core/binarycodec/types/test_hash_types.py +++ b/tests/unit/core/binarycodec/types/test_hash_types.py @@ -1,10 +1,10 @@ from unittest import TestCase -from xrpl.core.binarycodec.binary_wrappers import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.hash128 import Hash128 -from xrpl.core.binarycodec.types.hash160 import Hash160 -from xrpl.core.binarycodec.types.hash256 import Hash256 +from xahau.core.binarycodec.binary_wrappers import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.hash128 import Hash128 +from xahau.core.binarycodec.types.hash160 import Hash160 +from xahau.core.binarycodec.types.hash256 import Hash256 class TestHash128(TestCase): diff --git a/tests/unit/core/binarycodec/types/test_path_set.py b/tests/unit/core/binarycodec/types/test_path_set.py index 568879f6d..26d8f4b8a 100644 --- a/tests/unit/core/binarycodec/types/test_path_set.py +++ b/tests/unit/core/binarycodec/types/test_path_set.py @@ -1,8 +1,8 @@ from unittest import TestCase -from xrpl.core.binarycodec import XRPLBinaryCodecException -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.types.path_set import PathSet +from xahau.core.binarycodec import XRPLBinaryCodecException +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.types.path_set import PathSet buffer = ( "31585E1F3BD02A15D6" diff --git a/tests/unit/core/binarycodec/types/test_serialized_dict.py b/tests/unit/core/binarycodec/types/test_serialized_dict.py index 6c73c589e..756e241f9 100644 --- a/tests/unit/core/binarycodec/types/test_serialized_dict.py +++ b/tests/unit/core/binarycodec/types/test_serialized_dict.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.types.st_object import STObject +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.types.st_object import STObject expected_json = { "Account": "raD5qJMAShLeHZXf9wjUmo6vRK4arj9cF3", diff --git a/tests/unit/core/binarycodec/types/test_serialized_list.py b/tests/unit/core/binarycodec/types/test_serialized_list.py index 30c8cf7a8..e9134294f 100644 --- a/tests/unit/core/binarycodec/types/test_serialized_list.py +++ b/tests/unit/core/binarycodec/types/test_serialized_list.py @@ -1,8 +1,8 @@ from unittest import TestCase -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.st_array import _ARRAY_END_MARKER, STArray +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.st_array import _ARRAY_END_MARKER, STArray MEMO = { "Memo": { diff --git a/tests/unit/core/binarycodec/types/test_serialized_type.py b/tests/unit/core/binarycodec/types/test_serialized_type.py index 79e3ca1ba..f5de48415 100644 --- a/tests/unit/core/binarycodec/types/test_serialized_type.py +++ b/tests/unit/core/binarycodec/types/test_serialized_type.py @@ -4,21 +4,21 @@ ValueTest, get_value_tests, ) -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.account_id import AccountID -from xrpl.core.binarycodec.types.amount import Amount -from xrpl.core.binarycodec.types.blob import Blob -from xrpl.core.binarycodec.types.currency import Currency -from xrpl.core.binarycodec.types.hash128 import Hash128 -from xrpl.core.binarycodec.types.hash160 import Hash160 -from xrpl.core.binarycodec.types.hash256 import Hash256 -from xrpl.core.binarycodec.types.path_set import PathSet -from xrpl.core.binarycodec.types.serialized_type import SerializedType -from xrpl.core.binarycodec.types.uint8 import UInt8 -from xrpl.core.binarycodec.types.uint16 import UInt16 -from xrpl.core.binarycodec.types.uint32 import UInt32 -from xrpl.core.binarycodec.types.uint64 import UInt64 -from xrpl.core.binarycodec.types.vector256 import Vector256 +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.account_id import AccountID +from xahau.core.binarycodec.types.amount import Amount +from xahau.core.binarycodec.types.blob import Blob +from xahau.core.binarycodec.types.currency import Currency +from xahau.core.binarycodec.types.hash128 import Hash128 +from xahau.core.binarycodec.types.hash160 import Hash160 +from xahau.core.binarycodec.types.hash256 import Hash256 +from xahau.core.binarycodec.types.path_set import PathSet +from xahau.core.binarycodec.types.serialized_type import SerializedType +from xahau.core.binarycodec.types.uint8 import UInt8 +from xahau.core.binarycodec.types.uint16 import UInt16 +from xahau.core.binarycodec.types.uint32 import UInt32 +from xahau.core.binarycodec.types.uint64 import UInt64 +from xahau.core.binarycodec.types.vector256 import Vector256 TYPE_MAP = { "AccountID": AccountID, diff --git a/tests/unit/core/binarycodec/types/test_uint.py b/tests/unit/core/binarycodec/types/test_uint.py index 5e0cd12e8..750ec2447 100644 --- a/tests/unit/core/binarycodec/types/test_uint.py +++ b/tests/unit/core/binarycodec/types/test_uint.py @@ -1,10 +1,10 @@ from unittest import TestCase -from xrpl.core.binarycodec import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.uint8 import UInt8 -from xrpl.core.binarycodec.types.uint16 import UInt16 -from xrpl.core.binarycodec.types.uint32 import UInt32 -from xrpl.core.binarycodec.types.uint64 import UInt64 +from xahau.core.binarycodec import XRPLBinaryCodecException +from xahau.core.binarycodec.types.uint8 import UInt8 +from xahau.core.binarycodec.types.uint16 import UInt16 +from xahau.core.binarycodec.types.uint32 import UInt32 +from xahau.core.binarycodec.types.uint64 import UInt64 class TestUInt(TestCase): diff --git a/tests/unit/core/binarycodec/types/test_vector256.py b/tests/unit/core/binarycodec/types/test_vector256.py index c142d5b50..362e5b9c6 100644 --- a/tests/unit/core/binarycodec/types/test_vector256.py +++ b/tests/unit/core/binarycodec/types/test_vector256.py @@ -1,8 +1,8 @@ from unittest import TestCase -from xrpl.core.binarycodec import XRPLBinaryCodecException -from xrpl.core.binarycodec.binary_wrappers import BinaryParser -from xrpl.core.binarycodec.types.vector256 import Vector256 +from xahau.core.binarycodec import XRPLBinaryCodecException +from xahau.core.binarycodec.binary_wrappers import BinaryParser +from xahau.core.binarycodec.types.vector256 import Vector256 HASH1 = "42426C4D4F1009EE67080A9B7965B44656D7714D104A72F9B4369F97ABF044EE" HASH2 = "4C97EBA926031A7CF7D7B36FDE3ED66DDA5421192D63DE53FFB46E43B9DC8373" diff --git a/tests/unit/core/keypairs/test_main.py b/tests/unit/core/keypairs/test_main.py index 14893e316..643118418 100644 --- a/tests/unit/core/keypairs/test_main.py +++ b/tests/unit/core/keypairs/test_main.py @@ -1,10 +1,10 @@ from unittest import TestCase from unittest.mock import patch -from xrpl.constants import CryptoAlgorithm -from xrpl.core import keypairs -from xrpl.core.addresscodec.exceptions import XRPLAddressCodecException -from xrpl.core.keypairs.exceptions import XRPLKeypairsException +from xahau.constants import CryptoAlgorithm +from xahau.core import keypairs +from xahau.core.addresscodec.exceptions import XRPLAddressCodecException +from xahau.core.keypairs.exceptions import XRPLKeypairsException _DUMMY_HEX = "0102030405060708090a0b0c0d0e0f10" _DUMMY_HEX_TOO_SHORT = "0102030405060708090a0b0c0d0e" @@ -15,7 +15,7 @@ class TestMain(TestCase): # unfortunately, this patching is very brittle; it depends on the syntax # used to import secrets within the calling module. @patch( - "xrpl.core.keypairs.main.token_bytes", + "xahau.core.keypairs.main.token_bytes", autospec=True, return_value=bytes.fromhex(_DUMMY_HEX), ) diff --git a/tests/unit/models/amounts/test_issued_currency_amount.py b/tests/unit/models/amounts/test_issued_currency_amount.py index 732af7bc6..a8fcc0e75 100644 --- a/tests/unit/models/amounts/test_issued_currency_amount.py +++ b/tests/unit/models/amounts/test_issued_currency_amount.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.currencies import IssuedCurrency +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.currencies import IssuedCurrency _ISSUER = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" diff --git a/tests/unit/models/currencies/test_issued_currency.py b/tests/unit/models/currencies/test_issued_currency.py index 1a231cb42..cd48917ce 100644 --- a/tests/unit/models/currencies/test_issued_currency.py +++ b/tests/unit/models/currencies/test_issued_currency.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.currencies import IssuedCurrency -from xrpl.models.exceptions import XRPLModelException +from xahau.models.currencies import IssuedCurrency +from xahau.models.exceptions import XRPLModelException _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" diff --git a/tests/unit/models/currencies/test_xrp.py b/tests/unit/models/currencies/test_xrp.py index 473cd0969..e48464846 100644 --- a/tests/unit/models/currencies/test_xrp.py +++ b/tests/unit/models/currencies/test_xrp.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.currencies import XRP -from xrpl.utils import xrp_to_drops +from xahau.models.currencies import XRP +from xahau.utils import xrp_to_drops class TestXRP(TestCase): diff --git a/tests/unit/models/requests/test_amm_info.py b/tests/unit/models/requests/test_amm_info.py index 6e76ae1eb..cbafc7069 100644 --- a/tests/unit/models/requests/test_amm_info.py +++ b/tests/unit/models/requests/test_amm_info.py @@ -1,14 +1,14 @@ from unittest import TestCase -from xrpl.models.currencies import XRP, IssuedCurrency -from xrpl.models.requests import AMMInfo -from xrpl.models.requests.request import _DEFAULT_API_VERSION +from xahau.models.currencies import XRP, IssuedCurrency +from xahau.models.requests import AMMInfo +from xahau.models.requests.request import _DEFAULT_API_VERSION _ASSET = XRP() _ASSET_2 = IssuedCurrency(currency="USD", issuer="rN6zcSynkRnf8zcgTVrRL8K7r4ovE7J4Zj") -class TestAMMInfo(TestCase): +class NoTestAMMInfo(TestCase): def test_populate_api_version_field(self): request = AMMInfo( asset=_ASSET, diff --git a/tests/unit/models/requests/test_channel_authorize.py b/tests/unit/models/requests/test_channel_authorize.py index 766de8266..530eb431d 100644 --- a/tests/unit/models/requests/test_channel_authorize.py +++ b/tests/unit/models/requests/test_channel_authorize.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.requests import ChannelAuthorize +from xahau.models.exceptions import XRPLModelException +from xahau.models.requests import ChannelAuthorize _CHANNEL_ID = "5DB01B7FFED6B67E6B0414DED11E051D2EE2B7619CE0EAA6286D67A3A4D5BDB3" _AMOUNT = "10000" diff --git a/tests/unit/models/requests/test_get_aggregate_price.py b/tests/unit/models/requests/test_get_aggregate_price.py index 1a3f8e09b..c12dd2aad 100644 --- a/tests/unit/models/requests/test_get_aggregate_price.py +++ b/tests/unit/models/requests/test_get_aggregate_price.py @@ -1,8 +1,8 @@ from unittest import TestCase -from xrpl.models import XRPLModelException -from xrpl.models.requests import GetAggregatePrice -from xrpl.models.requests.ledger_entry import Oracle +from xahau.models import XRPLModelException +from xahau.models.requests import GetAggregatePrice +from xahau.models.requests.ledger_entry import Oracle _ACCT_STR_1 = "rBwHKFS534tfG3mATXSycCnX8PAd3XJswj" _ORACLE_DOC_ID_1 = 1 diff --git a/tests/unit/models/requests/test_ledger_entry.py b/tests/unit/models/requests/test_ledger_entry.py index 56ba0e84f..a3f9e9666 100644 --- a/tests/unit/models/requests/test_ledger_entry.py +++ b/tests/unit/models/requests/test_ledger_entry.py @@ -1,8 +1,8 @@ from unittest import TestCase -from xrpl.models import XRP, LedgerEntry, XChainBridge -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.requests.ledger_entry import Oracle, RippleState +from xahau.models import XRP, LedgerEntry, XChainBridge +from xahau.models.exceptions import XRPLModelException +from xahau.models.requests.ledger_entry import Oracle, RippleState class TestLedgerEntry(TestCase): diff --git a/tests/unit/models/requests/test_requests.py b/tests/unit/models/requests/test_requests.py index a5923d602..ab6b009d8 100644 --- a/tests/unit/models/requests/test_requests.py +++ b/tests/unit/models/requests/test_requests.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.requests import Fee, GenericRequest -from xrpl.models.requests.request import _DEFAULT_API_VERSION +from xahau.models.requests import Fee, GenericRequest +from xahau.models.requests.request import _DEFAULT_API_VERSION class TestRequest(TestCase): diff --git a/tests/unit/models/requests/test_sign.py b/tests/unit/models/requests/test_sign.py index abf274967..2f11bd335 100644 --- a/tests/unit/models/requests/test_sign.py +++ b/tests/unit/models/requests/test_sign.py @@ -1,9 +1,9 @@ from unittest import TestCase -from xrpl.constants import CryptoAlgorithm -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.requests import Sign -from xrpl.models.transactions import AccountSet, AccountSetAsfFlag +from xahau.constants import CryptoAlgorithm +from xahau.models.exceptions import XRPLModelException +from xahau.models.requests import Sign +from xahau.models.transactions import AccountSet, AccountSetAsfFlag _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/requests/test_tx.py b/tests/unit/models/requests/test_tx.py index 9a55f456f..e8b5dd5c0 100644 --- a/tests/unit/models/requests/test_tx.py +++ b/tests/unit/models/requests/test_tx.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.requests import Tx +from xahau.models.exceptions import XRPLModelException +from xahau.models.requests import Tx _TRANSACTION_HASH = "C53ECF838647FA5A4C780377025FEC7999AB4182590510CA461444B207AB74A9" _CTID = "C005523E00000000" diff --git a/tests/unit/models/test_base_model.py b/tests/unit/models/test_base_model.py index 03c628c97..1701065c0 100644 --- a/tests/unit/models/test_base_model.py +++ b/tests/unit/models/test_base_model.py @@ -2,10 +2,10 @@ import os from unittest import TestCase -from xrpl.models import XRPLModelException -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.currencies import XRP, IssuedCurrency -from xrpl.models.requests import ( +from xahau.models import XRPLModelException +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.currencies import XRP, IssuedCurrency +from xahau.models.requests import ( AccountChannels, BookOffers, PathFind, @@ -16,8 +16,8 @@ SubmitMultisigned, SubmitOnly, ) -from xrpl.models.requests.request import _DEFAULT_API_VERSION -from xrpl.models.transactions import ( +from xahau.models.requests.request import _DEFAULT_API_VERSION +from xahau.models.transactions import ( AMMBid, AuthAccount, CheckCreate, @@ -30,8 +30,8 @@ TrustSetFlag, XChainClaim, ) -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.xchain_bridge import XChainBridge +from xahau.models.transactions.transaction import Transaction +from xahau.models.xchain_bridge import XChainBridge currency = "BTC" value = "100" diff --git a/tests/unit/models/test_response.py b/tests/unit/models/test_response.py index d4af73e32..624430eef 100644 --- a/tests/unit/models/test_response.py +++ b/tests/unit/models/test_response.py @@ -1,7 +1,7 @@ import warnings from unittest import TestCase -from xrpl.models.response import Response, ResponseStatus +from xahau.models.response import Response, ResponseStatus class TestResponse(TestCase): diff --git a/tests/unit/models/test_utils.py b/tests/unit/models/test_utils.py index 8bb222411..4df56e335 100644 --- a/tests/unit/models/test_utils.py +++ b/tests/unit/models/test_utils.py @@ -1,10 +1,10 @@ from unittest import TestCase -from xrpl.models.currencies import IssuedCurrency -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.requests import AccountInfo -from xrpl.models.transactions import Payment, PaymentFlag -from xrpl.models.utils import _is_kw_only_attr_defined_in_dataclass +from xahau.models.currencies import IssuedCurrency +from xahau.models.exceptions import XRPLModelException +from xahau.models.requests import AccountInfo +from xahau.models.transactions import Payment, PaymentFlag +from xahau.models.utils import _is_kw_only_attr_defined_in_dataclass _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/transactions/test_account_set.py b/tests/unit/models/transactions/test_account_set.py index 623a32e91..a5964410a 100644 --- a/tests/unit/models/transactions/test_account_set.py +++ b/tests/unit/models/transactions/test_account_set.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import AccountSet, AccountSetAsfFlag +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import AccountSet, AccountSetAsfFlag _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _ANOTHER_ACCOUNT = "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW" diff --git a/tests/unit/models/transactions/test_amm_bid.py b/tests/unit/models/transactions/test_amm_bid.py index 21a33f9ba..1e9eed870 100644 --- a/tests/unit/models/transactions/test_amm_bid.py +++ b/tests/unit/models/transactions/test_amm_bid.py @@ -1,9 +1,9 @@ from unittest import TestCase -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.currencies import XRP, IssuedCurrency -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import AMMBid, AuthAccount +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.currencies import XRP, IssuedCurrency +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import AMMBid, AuthAccount _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _ASSET = XRP() @@ -26,7 +26,7 @@ _LPTOKEN_ISSUER = "r3628pXjRqfw5zfwGfhSusjZTvE3BoxEBw" -class TestAMMBid(TestCase): +class NoTestAMMBid(TestCase): def test_tx_valid(self): tx = AMMBid( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_amm_create.py b/tests/unit/models/transactions/test_amm_create.py index f8b3d392a..9abed8f5f 100644 --- a/tests/unit/models/transactions/test_amm_create.py +++ b/tests/unit/models/transactions/test_amm_create.py @@ -1,15 +1,15 @@ from sys import maxsize from unittest import TestCase -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import AMMCreate +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import AMMCreate _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _IOU_ISSUER = "rPyfep3gcLzkosKC9XiE77Y8DZWG6iWDT9" -class TestAMMCreate(TestCase): +class NoTestAMMCreate(TestCase): def test_tx_is_valid(self): tx = AMMCreate( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_amm_delete.py b/tests/unit/models/transactions/test_amm_delete.py index 37ff6b9f6..2ef613093 100644 --- a/tests/unit/models/transactions/test_amm_delete.py +++ b/tests/unit/models/transactions/test_amm_delete.py @@ -1,10 +1,10 @@ from unittest import TestCase -from xrpl.models.currencies import XRP, IssuedCurrency -from xrpl.models.transactions import AMMDelete +from xahau.models.currencies import XRP, IssuedCurrency +from xahau.models.transactions import AMMDelete -class TestAMMDeposit(TestCase): +class NoTestAMMDeposit(TestCase): def test_tx_valid(self): tx = AMMDelete( account="r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ", diff --git a/tests/unit/models/transactions/test_amm_deposit.py b/tests/unit/models/transactions/test_amm_deposit.py index d39d94aeb..5cf561d8d 100644 --- a/tests/unit/models/transactions/test_amm_deposit.py +++ b/tests/unit/models/transactions/test_amm_deposit.py @@ -1,10 +1,10 @@ from unittest import TestCase -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.currencies import XRP, IssuedCurrency -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import AMMDeposit -from xrpl.models.transactions.amm_deposit import AMMDepositFlag +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.currencies import XRP, IssuedCurrency +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import AMMDeposit +from xahau.models.transactions.amm_deposit import AMMDepositFlag _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _ASSET = XRP() @@ -14,7 +14,7 @@ _LPTOKEN_ISSUER = "rH438jEAzTs5PYtV6CHZqpDpwCKQmPW9Cg" -class TestAMMDeposit(TestCase): +class NoTestAMMDeposit(TestCase): def test_tx_valid_xrpl_lptokenout(self): tx = AMMDeposit( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_amm_vote.py b/tests/unit/models/transactions/test_amm_vote.py index 45c28bc7e..6442c53ff 100644 --- a/tests/unit/models/transactions/test_amm_vote.py +++ b/tests/unit/models/transactions/test_amm_vote.py @@ -1,9 +1,9 @@ from sys import maxsize from unittest import TestCase -from xrpl.models.currencies import XRP, IssuedCurrency -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import AMMVote +from xahau.models.currencies import XRP, IssuedCurrency +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import AMMVote _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _ASSET = XRP() @@ -11,7 +11,7 @@ _TRADING_FEE = 234 -class TestAMMVote(TestCase): +class NoTestAMMVote(TestCase): def test_tx_valid(self): tx = AMMVote( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_amm_withdraw.py b/tests/unit/models/transactions/test_amm_withdraw.py index aae365a25..5b209c464 100644 --- a/tests/unit/models/transactions/test_amm_withdraw.py +++ b/tests/unit/models/transactions/test_amm_withdraw.py @@ -1,10 +1,10 @@ from unittest import TestCase -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.currencies import XRP, IssuedCurrency -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import AMMWithdraw -from xrpl.models.transactions.amm_withdraw import AMMWithdrawFlag +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.currencies import XRP, IssuedCurrency +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import AMMWithdraw +from xahau.models.transactions.amm_withdraw import AMMWithdrawFlag _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _ASSET = XRP() @@ -14,7 +14,7 @@ _LPTOKEN_ISSUER = "rH438jEAzTs5PYtV6CHZqpDpwCKQmPW9Cg" -class TestAMMWithdraw(TestCase): +class NoTestAMMWithdraw(TestCase): def test_tx_valid_lptokenin(self): tx = AMMWithdraw( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_better_transaction_flags.py b/tests/unit/models/transactions/test_better_transaction_flags.py index 7cb096ead..0497d4b47 100644 --- a/tests/unit/models/transactions/test_better_transaction_flags.py +++ b/tests/unit/models/transactions/test_better_transaction_flags.py @@ -1,9 +1,9 @@ from unittest import TestCase -from xrpl import models -from xrpl.models.exceptions import XRPLModelException -from xrpl.transaction.main import sign -from xrpl.wallet.main import Wallet +from xahau import models +from xahau.models.exceptions import XRPLModelException +from xahau.transaction.main import sign +from xahau.wallet.main import Wallet # from typing import Iterable diff --git a/tests/unit/models/transactions/test_check_cash.py b/tests/unit/models/transactions/test_check_cash.py index 4fadb8537..80271c1b1 100644 --- a/tests/unit/models/transactions/test_check_cash.py +++ b/tests/unit/models/transactions/test_check_cash.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions.check_cash import CheckCash +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions.check_cash import CheckCash _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/transactions/test_clawback.py b/tests/unit/models/transactions/test_clawback.py index 3f4811d49..1485abf28 100644 --- a/tests/unit/models/transactions/test_clawback.py +++ b/tests/unit/models/transactions/test_clawback.py @@ -1,8 +1,8 @@ from unittest import TestCase -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import Clawback +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import Clawback _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _XRP_AMOUNT = "1000" @@ -11,7 +11,7 @@ ) -class TestClawback(TestCase): +class NoTestClawback(TestCase): def test_amount_is_XRP(self): with self.assertRaises(XRPLModelException): Clawback( diff --git a/tests/unit/models/transactions/test_deposit_preauth.py b/tests/unit/models/transactions/test_deposit_preauth.py index 8901aa090..745cdd5c0 100644 --- a/tests/unit/models/transactions/test_deposit_preauth.py +++ b/tests/unit/models/transactions/test_deposit_preauth.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import DepositPreauth +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import DepositPreauth _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/transactions/test_did_delete.py b/tests/unit/models/transactions/test_did_delete.py index f0e0d6bbe..e212d8298 100644 --- a/tests/unit/models/transactions/test_did_delete.py +++ b/tests/unit/models/transactions/test_did_delete.py @@ -1,11 +1,11 @@ from unittest import TestCase -from xrpl.models import DIDDelete +from xahau.models import DIDDelete _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" -class TestDIDDelete(TestCase): +class NoTestDIDDelete(TestCase): def test_valid(self): tx = DIDDelete( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_did_set.py b/tests/unit/models/transactions/test_did_set.py index 5c1d1859b..67cc831a5 100644 --- a/tests/unit/models/transactions/test_did_set.py +++ b/tests/unit/models/transactions/test_did_set.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import DIDSet +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import DIDSet _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _VALID_FIELD = "1234567890abcdefABCDEF" @@ -10,7 +10,7 @@ _BAD_HEX_TOO_LONG_FIELD = "q" * 257 -class TestDIDSet(TestCase): +class NoTestDIDSet(TestCase): def test_valid(self): tx = DIDSet( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_escrow_create.py b/tests/unit/models/transactions/test_escrow_create.py index d7f301a7a..ed48e90fa 100644 --- a/tests/unit/models/transactions/test_escrow_create.py +++ b/tests/unit/models/transactions/test_escrow_create.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import EscrowCreate +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import EscrowCreate class TestEscrowCreate(TestCase): diff --git a/tests/unit/models/transactions/test_escrow_finish.py b/tests/unit/models/transactions/test_escrow_finish.py index 12f73b2d1..c502f2e6d 100644 --- a/tests/unit/models/transactions/test_escrow_finish.py +++ b/tests/unit/models/transactions/test_escrow_finish.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import EscrowFinish +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import EscrowFinish _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/transactions/test_nftoken_accept_offer.py b/tests/unit/models/transactions/test_nftoken_accept_offer.py index 6b3f06e9e..30a18601a 100644 --- a/tests/unit/models/transactions/test_nftoken_accept_offer.py +++ b/tests/unit/models/transactions/test_nftoken_accept_offer.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import NFTokenAcceptOffer +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import NFTokenAcceptOffer _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/transactions/test_nftoken_cancel_offer.py b/tests/unit/models/transactions/test_nftoken_cancel_offer.py index a8d3b095d..b03dedbea 100644 --- a/tests/unit/models/transactions/test_nftoken_cancel_offer.py +++ b/tests/unit/models/transactions/test_nftoken_cancel_offer.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import NFTokenCancelOffer +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import NFTokenCancelOffer _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/transactions/test_nftoken_create_offer.py b/tests/unit/models/transactions/test_nftoken_create_offer.py index c8e985246..4541fcdb6 100644 --- a/tests/unit/models/transactions/test_nftoken_create_offer.py +++ b/tests/unit/models/transactions/test_nftoken_create_offer.py @@ -1,7 +1,7 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import NFTokenCreateOffer, NFTokenCreateOfferFlag +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import NFTokenCreateOffer, NFTokenCreateOfferFlag _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _ANOTHER_ACCOUNT = "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW" diff --git a/tests/unit/models/transactions/test_nftoken_mint.py b/tests/unit/models/transactions/test_nftoken_mint.py index 912452e55..d0ee25101 100644 --- a/tests/unit/models/transactions/test_nftoken_mint.py +++ b/tests/unit/models/transactions/test_nftoken_mint.py @@ -1,8 +1,8 @@ from sys import maxsize from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import NFTokenMint +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import NFTokenMint _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/transactions/test_oracle_delete.py b/tests/unit/models/transactions/test_oracle_delete.py index 84cf112c3..a7c507e87 100644 --- a/tests/unit/models/transactions/test_oracle_delete.py +++ b/tests/unit/models/transactions/test_oracle_delete.py @@ -1,11 +1,11 @@ from unittest import TestCase -from xrpl.models.transactions import OracleDelete +from xahau.models.transactions import OracleDelete _ACCOUNT = "rsA2LpzuawewSBQXkiju3YQTMzW13pAAdW" -class TestDeleteOracle(TestCase): +class NoTestDeleteOracle(TestCase): def test_valid(self): tx = OracleDelete( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_oracle_set.py b/tests/unit/models/transactions/test_oracle_set.py index efd106d41..c6ff9d4e3 100644 --- a/tests/unit/models/transactions/test_oracle_set.py +++ b/tests/unit/models/transactions/test_oracle_set.py @@ -1,9 +1,9 @@ import time from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import OracleSet -from xrpl.models.transactions.oracle_set import ( +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import OracleSet +from xahau.models.transactions.oracle_set import ( EPOCH_OFFSET, MAX_ORACLE_PROVIDER, MAX_ORACLE_SYMBOL_CLASS, @@ -19,7 +19,7 @@ _LENGTHY_PROVIDER = "X" * (MAX_ORACLE_PROVIDER + 1) -class TestSetOracle(TestCase): +class NoTestSetOracle(TestCase): def test_valid(self): tx = OracleSet( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_payment.py b/tests/unit/models/transactions/test_payment.py index bd69b5682..9fb174d02 100644 --- a/tests/unit/models/transactions/test_payment.py +++ b/tests/unit/models/transactions/test_payment.py @@ -1,9 +1,9 @@ from unittest import TestCase -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import Payment, PaymentFlag -from xrpl.wallet import Wallet +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import Payment, PaymentFlag +from xahau.wallet import Wallet _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/transactions/test_pseudo_transactions.py b/tests/unit/models/transactions/test_pseudo_transactions.py index 487b488f0..7daf7963c 100644 --- a/tests/unit/models/transactions/test_pseudo_transactions.py +++ b/tests/unit/models/transactions/test_pseudo_transactions.py @@ -1,14 +1,14 @@ from unittest import TestCase -from xrpl.models.transactions.pseudo_transactions import ( +from xahau.models.transactions.pseudo_transactions import ( EnableAmendment, SetFee, UNLModify, ) -from xrpl.models.transactions.pseudo_transactions.pseudo_transaction import ( +from xahau.models.transactions.pseudo_transactions.pseudo_transaction import ( PseudoTransaction, ) -from xrpl.models.transactions.transaction import Transaction +from xahau.models.transactions.transaction import Transaction _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/transactions/test_signer_list_set.py b/tests/unit/models/transactions/test_signer_list_set.py index c5ccba6cf..ecfc06ca3 100644 --- a/tests/unit/models/transactions/test_signer_list_set.py +++ b/tests/unit/models/transactions/test_signer_list_set.py @@ -1,8 +1,8 @@ from unittest import TestCase -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import SignerListSet -from xrpl.models.transactions.signer_list_set import SignerEntry +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import SignerListSet +from xahau.models.transactions.signer_list_set import SignerEntry _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/transactions/test_transaction.py b/tests/unit/models/transactions/test_transaction.py index dea0bb267..c4b68687f 100644 --- a/tests/unit/models/transactions/test_transaction.py +++ b/tests/unit/models/transactions/test_transaction.py @@ -1,13 +1,13 @@ from unittest import TestCase -from xrpl.asyncio.transaction.main import sign -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions import AccountSet, OfferCreate, Payment -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types.transaction_type import TransactionType -from xrpl.transaction.multisign import multisign -from xrpl.utils.str_conversions import str_to_hex -from xrpl.wallet import Wallet +from xahau.asyncio.transaction.main import sign +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions import AccountSet, OfferCreate, Payment +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types.transaction_type import TransactionType +from xahau.transaction.multisign import multisign +from xahau.utils.str_conversions import str_to_hex +from xahau.wallet import Wallet _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _FEE = "0.00001" diff --git a/tests/unit/models/transactions/test_xchain_account_create_commit.py b/tests/unit/models/transactions/test_xchain_account_create_commit.py index 26651610c..d123cfae4 100644 --- a/tests/unit/models/transactions/test_xchain_account_create_commit.py +++ b/tests/unit/models/transactions/test_xchain_account_create_commit.py @@ -1,6 +1,6 @@ from unittest import TestCase -from xrpl.models import ( +from xahau.models import ( XRP, IssuedCurrency, XChainAccountCreateCommit, @@ -30,7 +30,7 @@ ) -class TestXChainAccountCreateCommit(TestCase): +class NoTestXChainAccountCreateCommit(TestCase): def test_successful(self): XChainAccountCreateCommit( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_xchain_claim.py b/tests/unit/models/transactions/test_xchain_claim.py index 82f9e690d..f3f8ae664 100644 --- a/tests/unit/models/transactions/test_xchain_claim.py +++ b/tests/unit/models/transactions/test_xchain_claim.py @@ -1,6 +1,6 @@ from unittest import TestCase -from xrpl.models import ( +from xahau.models import ( XRP, IssuedCurrency, IssuedCurrencyAmount, @@ -37,7 +37,7 @@ ) -class TestXChainClaim(TestCase): +class NoTestXChainClaim(TestCase): def test_successful_claim_xrp(self): XChainClaim( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_xchain_create_bridge.py b/tests/unit/models/transactions/test_xchain_create_bridge.py index 47e3f49c7..8248906d3 100644 --- a/tests/unit/models/transactions/test_xchain_create_bridge.py +++ b/tests/unit/models/transactions/test_xchain_create_bridge.py @@ -1,6 +1,6 @@ from unittest import TestCase -from xrpl.models import ( +from xahau.models import ( XRP, IssuedCurrency, XChainBridge, @@ -18,7 +18,7 @@ _GENESIS = "rHb9CJAWyB4rj91VRWn96DkukG4bwdtyTh" -class TestXChainCreateBridge(TestCase): +class NoTestXChainCreateBridge(TestCase): def test_successful_xrp_xrp_bridge(self): bridge = XChainBridge( locking_chain_door=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_xchain_create_claim_id.py b/tests/unit/models/transactions/test_xchain_create_claim_id.py index 589646b23..1da40f36a 100644 --- a/tests/unit/models/transactions/test_xchain_create_claim_id.py +++ b/tests/unit/models/transactions/test_xchain_create_claim_id.py @@ -1,6 +1,6 @@ from unittest import TestCase -from xrpl.models import XRP, XChainBridge, XChainCreateClaimID, XRPLModelException +from xahau.models import XRP, XChainBridge, XChainCreateClaimID, XRPLModelException _ACCOUNT = "r9LqNeG6qHxjeUocjvVki2XR35weJ9mZgQ" _ACCOUNT2 = "rpZc4mVfWUif9CRoHRKKcmhu1nx2xktxBo" @@ -19,7 +19,7 @@ ) -class TestXChainCreateClaimID(TestCase): +class NoTestXChainCreateClaimID(TestCase): def test_successful(self): XChainCreateClaimID( account=_ACCOUNT, diff --git a/tests/unit/models/transactions/test_xchain_modify_bridge.py b/tests/unit/models/transactions/test_xchain_modify_bridge.py index 63177024b..d5c253a66 100644 --- a/tests/unit/models/transactions/test_xchain_modify_bridge.py +++ b/tests/unit/models/transactions/test_xchain_modify_bridge.py @@ -1,6 +1,6 @@ from unittest import TestCase -from xrpl.models import ( +from xahau.models import ( XRP, IssuedCurrency, XChainBridge, @@ -32,7 +32,7 @@ ) -class TestXChainModifyBridge(TestCase): +class NoTestXChainModifyBridge(TestCase): def test_successful_modify_bridge(self): XChainModifyBridge( account=_ACCOUNT, diff --git a/tests/unit/utils/test_get_nftoken_id.py b/tests/unit/utils/test_get_nftoken_id.py index c8bb71d68..c869b580f 100644 --- a/tests/unit/utils/test_get_nftoken_id.py +++ b/tests/unit/utils/test_get_nftoken_id.py @@ -5,7 +5,7 @@ import json from unittest import TestCase -from xrpl.utils import get_nftoken_id +from xahau.utils import get_nftoken_id path_to_json = "tests/unit/utils/txn_parser/transaction_jsons/" with open(path_to_json + "nftokenmint_response1.json", "r") as infile: diff --git a/tests/unit/utils/test_get_xchain_claim_id.py b/tests/unit/utils/test_get_xchain_claim_id.py index a99b0c91d..aa50c3f8f 100644 --- a/tests/unit/utils/test_get_xchain_claim_id.py +++ b/tests/unit/utils/test_get_xchain_claim_id.py @@ -5,7 +5,7 @@ import json from unittest import TestCase -from xrpl.utils import get_xchain_claim_id +from xahau.utils import get_xchain_claim_id path_to_json = "tests/unit/utils/txn_parser/transaction_jsons/" with open(path_to_json + "XChainCreateClaimID.json", "r") as f: diff --git a/tests/unit/utils/test_parse_nftoken_id.py b/tests/unit/utils/test_parse_nftoken_id.py index cd5445780..42cc3f8ce 100644 --- a/tests/unit/utils/test_parse_nftoken_id.py +++ b/tests/unit/utils/test_parse_nftoken_id.py @@ -4,8 +4,8 @@ from unittest import TestCase -from xrpl import XRPLException -from xrpl.utils import parse_nftoken_id +from xahau import XRPLException +from xahau.utils import parse_nftoken_id class TestParseNFTokenID(TestCase): diff --git a/tests/unit/utils/test_str_conversions.py b/tests/unit/utils/test_str_conversions.py index 8209f13fc..60e30b775 100644 --- a/tests/unit/utils/test_str_conversions.py +++ b/tests/unit/utils/test_str_conversions.py @@ -1,6 +1,6 @@ from unittest import TestCase -import xrpl.utils +import xahau.utils _ORIGINAL = "https://en.wikipedia.org/wiki/Sunn_O%29%29%29" _HEX = """\ @@ -11,7 +11,7 @@ class TestStrConversions(TestCase): def test_str_to_hex(self): - self.assertTrue(xrpl.utils.str_to_hex(_ORIGINAL) == _HEX) + self.assertTrue(xahau.utils.str_to_hex(_ORIGINAL) == _HEX) def test_hex_to_str(self): - self.assertTrue(xrpl.utils.hex_to_str(_HEX) == _ORIGINAL) + self.assertTrue(xahau.utils.hex_to_str(_HEX) == _ORIGINAL) diff --git a/tests/unit/utils/test_time_conversions.py b/tests/unit/utils/test_time_conversions.py index 8c83b808a..131383dc2 100644 --- a/tests/unit/utils/test_time_conversions.py +++ b/tests/unit/utils/test_time_conversions.py @@ -2,53 +2,53 @@ from datetime import datetime, timezone from unittest import TestCase -import xrpl.utils +import xahau.utils class TestTimeConversions(TestCase): def test_posix_round_trip(self): current_time = time.time() time_whole_seconds = int(current_time) - ripple_time = xrpl.utils.posix_to_ripple_time(current_time) - round_trip_time = xrpl.utils.ripple_time_to_posix(ripple_time) + ripple_time = xahau.utils.posix_to_ripple_time(current_time) + round_trip_time = xahau.utils.ripple_time_to_posix(ripple_time) self.assertEqual(time_whole_seconds, round_trip_time) def test_datetime_round_trip(self): now = datetime.now(timezone.utc) now_whole_seconds = now.replace(microsecond=0) - ripple_time = xrpl.utils.datetime_to_ripple_time(now) - round_trip_time = xrpl.utils.ripple_time_to_datetime(ripple_time) + ripple_time = xahau.utils.datetime_to_ripple_time(now) + round_trip_time = xahau.utils.ripple_time_to_datetime(ripple_time) self.assertEqual(now_whole_seconds, round_trip_time) def test_ripple_epoch(self): - dt = xrpl.utils.ripple_time_to_datetime(0) + dt = xahau.utils.ripple_time_to_datetime(0) self.assertEqual(dt.isoformat(), "2000-01-01T00:00:00+00:00") def test_datetime_underflow(self): # "Ripple Epoch" time starts in the year 2000 year_1999 = datetime(1999, 1, 1, 0, 0, tzinfo=timezone.utc) - with self.assertRaises(xrpl.utils.XRPLTimeRangeException): - xrpl.utils.datetime_to_ripple_time(year_1999) + with self.assertRaises(xahau.utils.XRPLTimeRangeException): + xahau.utils.datetime_to_ripple_time(year_1999) def test_posix_underflow(self): # "Ripple Epoch" time starts in the year 2000 year_1999 = time.mktime( time.strptime("1999-01-01T00:00 UTC", "%Y-%m-%dT%M:%S %Z") ) - with self.assertRaises(xrpl.utils.XRPLTimeRangeException): - xrpl.utils.posix_to_ripple_time(year_1999) + with self.assertRaises(xahau.utils.XRPLTimeRangeException): + xahau.utils.posix_to_ripple_time(year_1999) def test_datetime_overflow(self): # "Ripple Epoch" time's equivalent to the "Year 2038 problem" is not until # 2136 because it uses an *unsigned* 32-bit int starting 30 years after # UNIX time's signed 32-bit int. year_2137 = datetime(2137, 1, 1, 0, 0, tzinfo=timezone.utc) - with self.assertRaises(xrpl.utils.XRPLTimeRangeException): - xrpl.utils.datetime_to_ripple_time(year_2137) + with self.assertRaises(xahau.utils.XRPLTimeRangeException): + xahau.utils.datetime_to_ripple_time(year_2137) def test_posix_overflow(self): year_2137 = time.mktime( time.strptime("2137-01-01T00:00 UTC", "%Y-%m-%dT%M:%S %Z") ) - with self.assertRaises(xrpl.utils.XRPLTimeRangeException): - xrpl.utils.posix_to_ripple_time(year_2137) + with self.assertRaises(xahau.utils.XRPLTimeRangeException): + xahau.utils.posix_to_ripple_time(year_2137) diff --git a/tests/unit/utils/test_xrp_conversions.py b/tests/unit/utils/test_xrp_conversions.py index f544f3da2..2dfc261ef 100644 --- a/tests/unit/utils/test_xrp_conversions.py +++ b/tests/unit/utils/test_xrp_conversions.py @@ -1,69 +1,69 @@ from decimal import Decimal from unittest import TestCase -import xrpl.utils +import xahau.utils class TestXRPConversions(TestCase): def test_1_xrp(self): - self.assertEqual(xrpl.utils.xrp_to_drops(1), "1000000") + self.assertEqual(xahau.utils.xrp_to_drops(1), "1000000") def test_0_xrp(self): - self.assertEqual(xrpl.utils.xrp_to_drops(0), "0") + self.assertEqual(xahau.utils.xrp_to_drops(0), "0") def test_min_xrp(self): - self.assertEqual(xrpl.utils.xrp_to_drops(Decimal("0.000001")), "1") + self.assertEqual(xahau.utils.xrp_to_drops(Decimal("0.000001")), "1") def test_max_xrp(self): - self.assertEqual(xrpl.utils.xrp_to_drops(10**11), "100000000000000000") + self.assertEqual(xahau.utils.xrp_to_drops(10**11), "100000000000000000") def test_too_small_xrp(self): - with self.assertRaises(xrpl.utils.XRPRangeException): - xrpl.utils.xrp_to_drops(Decimal(0.0000001)) + with self.assertRaises(xahau.utils.XRPRangeException): + xahau.utils.xrp_to_drops(Decimal(0.0000001)) def test_too_big_xrp(self): - with self.assertRaises(xrpl.utils.XRPRangeException): - xrpl.utils.xrp_to_drops(10**11 + 1) + with self.assertRaises(xahau.utils.XRPRangeException): + xahau.utils.xrp_to_drops(10**11 + 1) def test_nan_xrp(self): - with self.assertRaises(xrpl.utils.XRPRangeException): - xrpl.utils.xrp_to_drops(Decimal("NaN")) + with self.assertRaises(xahau.utils.XRPRangeException): + xahau.utils.xrp_to_drops(Decimal("NaN")) def test_str_xrp(self): with self.assertRaises(TypeError): - xrpl.utils.xrp_to_drops("1000000") + xahau.utils.xrp_to_drops("1000000") def test_1_drop(self): - self.assertEqual(xrpl.utils.drops_to_xrp("1"), Decimal("0.000001")) + self.assertEqual(xahau.utils.drops_to_xrp("1"), Decimal("0.000001")) def test_0_drops(self): - self.assertEqual(xrpl.utils.drops_to_xrp("0"), Decimal(0)) + self.assertEqual(xahau.utils.drops_to_xrp("0"), Decimal(0)) def test_1mil_drops(self): - self.assertEqual(xrpl.utils.drops_to_xrp("1000000"), Decimal(1)) + self.assertEqual(xahau.utils.drops_to_xrp("1000000"), Decimal(1)) def test_1mil_drops_with_exponent(self): - self.assertEqual(xrpl.utils.drops_to_xrp("1e6"), Decimal(1)) + self.assertEqual(xahau.utils.drops_to_xrp("1e6"), Decimal(1)) def test_max_drops(self): - self.assertEqual(xrpl.utils.drops_to_xrp(str(10**17)), Decimal(10**11)) + self.assertEqual(xahau.utils.drops_to_xrp(str(10**17)), Decimal(10**11)) def test_float_drops(self): with self.assertRaises(TypeError): - xrpl.utils.drops_to_xrp(10.1) + xahau.utils.drops_to_xrp(10.1) def test_nan_drops(self): - with self.assertRaises(xrpl.utils.XRPRangeException): - xrpl.utils.drops_to_xrp("NaN") + with self.assertRaises(xahau.utils.XRPRangeException): + xahau.utils.drops_to_xrp("NaN") def test_emptystring_drops(self): - with self.assertRaises(xrpl.utils.XRPRangeException): - xrpl.utils.drops_to_xrp("") + with self.assertRaises(xahau.utils.XRPRangeException): + xahau.utils.drops_to_xrp("") def test_too_many_drops(self): - with self.assertRaises(xrpl.utils.XRPRangeException): - xrpl.utils.drops_to_xrp(str(10**17 + 1)) + with self.assertRaises(xahau.utils.XRPRangeException): + xahau.utils.drops_to_xrp(str(10**17 + 1)) def test_negative_drops(self): - with self.assertRaises(xrpl.utils.XRPRangeException): - xrpl.utils.drops_to_xrp("-1") + with self.assertRaises(xahau.utils.XRPRangeException): + xahau.utils.drops_to_xrp("-1") diff --git a/tests/unit/utils/txn_parser/test_get_balance_changes.py b/tests/unit/utils/txn_parser/test_get_balance_changes.py index f73fcd8ae..6086bb132 100644 --- a/tests/unit/utils/txn_parser/test_get_balance_changes.py +++ b/tests/unit/utils/txn_parser/test_get_balance_changes.py @@ -3,7 +3,7 @@ import json from unittest import TestCase -from xrpl.utils import get_balance_changes +from xahau.utils import get_balance_changes path_to_json = "tests/unit/utils/txn_parser/transaction_jsons/" with open(path_to_json + "payment_iou_destination_no_balance.json", "r") as infile: diff --git a/tests/unit/utils/txn_parser/test_get_final_balances.py b/tests/unit/utils/txn_parser/test_get_final_balances.py index 0a950d8f3..9e3c39e48 100644 --- a/tests/unit/utils/txn_parser/test_get_final_balances.py +++ b/tests/unit/utils/txn_parser/test_get_final_balances.py @@ -3,7 +3,7 @@ import json from unittest import TestCase -from xrpl.utils import get_final_balances +from xahau.utils import get_final_balances path_to_json = "tests/unit/utils/txn_parser/transaction_jsons/" with open(path_to_json + "payment_iou_destination_no_balance.json", "r") as infile: diff --git a/tests/unit/utils/txn_parser/test_get_order_book_changes.py b/tests/unit/utils/txn_parser/test_get_order_book_changes.py index 6c6effd22..201d34e8a 100644 --- a/tests/unit/utils/txn_parser/test_get_order_book_changes.py +++ b/tests/unit/utils/txn_parser/test_get_order_book_changes.py @@ -3,7 +3,7 @@ import json from unittest import TestCase -from xrpl.utils import get_order_book_changes +from xahau.utils import get_order_book_changes path_to_json = "tests/unit/utils/txn_parser/transaction_jsons/" with open(path_to_json + "offer_created.json", "r") as infile: diff --git a/tests/unit/wallet/test_wallet.py b/tests/unit/wallet/test_wallet.py index aa52cdc55..f02731d81 100644 --- a/tests/unit/wallet/test_wallet.py +++ b/tests/unit/wallet/test_wallet.py @@ -1,8 +1,8 @@ from unittest import TestCase -from xrpl import CryptoAlgorithm -from xrpl.core.addresscodec.exceptions import XRPLAddressCodecException -from xrpl.wallet import Wallet +from xahau import CryptoAlgorithm +from xahau.core.addresscodec.exceptions import XRPLAddressCodecException +from xahau.wallet import Wallet SEED = "ssQgsaM2ujhyWoDw3Yb1TNjkZTVT2" SECP_ADDRESS = "r9o97fQwt54s73b1UzgbhvZTPDHYgSqz7G" diff --git a/tools/generate_tx_models.py b/tools/generate_tx_models.py index 28b0dcbef..10f706765 100644 --- a/tools/generate_tx_models.py +++ b/tools/generate_tx_models.py @@ -5,9 +5,9 @@ import sys from typing import Dict, List, Tuple -from xrpl.models.base_model import _key_to_json -from xrpl.models.transactions.types.pseudo_transaction_type import PseudoTransactionType -from xrpl.models.transactions.types.transaction_type import TransactionType +from xahau.models.base_model import _key_to_json +from xahau.models.transactions.types.pseudo_transaction_type import PseudoTransactionType +from xahau.models.transactions.types.transaction_type import TransactionType def _read_file(filename: str) -> str: @@ -70,11 +70,11 @@ def _parse_rippled_source( } IMPORT_MAP = { - "Amount": "from xrpl.models.amounts import Amount", - "Currency": "from xrpl.models.currencies import Currency", - "Path": "from xrpl.models.path import Path", - "XChainBridge": "from xrpl.models.xchain_bridge import XChainBridge", - "REQUIRED": "from xrpl.models.required import REQUIRED", + "Amount": "from xahau.models.amounts import Amount", + "Currency": "from xahau.models.currencies import Currency", + "Path": "from xahau.models.path import Path", + "XChainBridge": "from xahau.models.xchain_bridge import XChainBridge", + "REQUIRED": "from xahau.models.required import REQUIRED", } @@ -85,7 +85,7 @@ def _update_index_file(tx: str, name: str) -> None: index_file = index_file.replace( " XChainModifyBridgeFlagInterface,\n)", " XChainModifyBridgeFlagInterface,\n)\n" - + f"from xrpl.models.transactions.{name} import {tx}", + + f"from xahau.models.transactions.{name} import {tx}", ) index_file = index_file.replace( '"XChainModifyBridgeFlagInterface",', @@ -166,9 +166,9 @@ class {tx}(Transaction): {type_line} {other_import_lines} -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init """ imported_models = imported_models.replace("\n\n\n\n", "\n\n") diff --git a/xrpl/__init__.py b/xahau/__init__.py similarity index 58% rename from xrpl/__init__.py rename to xahau/__init__.py index 4c61f86ed..cc172f66f 100644 --- a/xrpl/__init__.py +++ b/xahau/__init__.py @@ -1,6 +1,6 @@ """High-level XRPL exports.""" -from xrpl import account, clients, core, ledger, models, transaction, utils, wallet -from xrpl.constants import CryptoAlgorithm, XRPLException +from xahau import account, clients, core, ledger, models, transaction, utils, wallet +from xahau.constants import CryptoAlgorithm, XRPLException __all__ = [ "CryptoAlgorithm", diff --git a/xrpl/account/__init__.py b/xahau/account/__init__.py similarity index 74% rename from xrpl/account/__init__.py rename to xahau/account/__init__.py index 5f575c43b..5b0895d8a 100644 --- a/xrpl/account/__init__.py +++ b/xahau/account/__init__.py @@ -1,11 +1,11 @@ """Methods for interacting with XRPL accounts.""" -from xrpl.account.main import ( +from xahau.account.main import ( does_account_exist, get_account_root, get_balance, get_next_valid_seq_number, ) -from xrpl.account.transaction_history import get_latest_transaction +from xahau.account.transaction_history import get_latest_transaction __all__ = [ "get_next_valid_seq_number", diff --git a/xrpl/account/main.py b/xahau/account/main.py similarity index 97% rename from xrpl/account/main.py rename to xahau/account/main.py index 028468f15..1eb478d44 100644 --- a/xrpl/account/main.py +++ b/xahau/account/main.py @@ -3,8 +3,8 @@ import asyncio from typing import Dict, Union -from xrpl.asyncio.account import main -from xrpl.clients.sync_client import SyncClient +from xahau.asyncio.account import main +from xahau.clients.sync_client import SyncClient def does_account_exist( diff --git a/xrpl/account/py.typed b/xahau/account/py.typed similarity index 100% rename from xrpl/account/py.typed rename to xahau/account/py.typed diff --git a/xrpl/account/transaction_history.py b/xahau/account/transaction_history.py similarity index 81% rename from xrpl/account/transaction_history.py rename to xahau/account/transaction_history.py index 79677dcd8..1d38b2a60 100644 --- a/xrpl/account/transaction_history.py +++ b/xahau/account/transaction_history.py @@ -1,9 +1,9 @@ """High-level methods to obtain information about account transaction history.""" import asyncio -from xrpl.asyncio.account import transaction_history -from xrpl.clients.sync_client import SyncClient -from xrpl.models.response import Response +from xahau.asyncio.account import transaction_history +from xahau.clients.sync_client import SyncClient +from xahau.models.response import Response def get_latest_transaction(account: str, client: SyncClient) -> Response: diff --git a/xrpl/asyncio/__init__.py b/xahau/asyncio/__init__.py similarity index 62% rename from xrpl/asyncio/__init__.py rename to xahau/asyncio/__init__.py index 641deb4ab..08449c1a5 100644 --- a/xrpl/asyncio/__init__.py +++ b/xahau/asyncio/__init__.py @@ -1,4 +1,4 @@ """High-level XRPL exports for async support.""" -from xrpl.asyncio import account, clients, ledger, transaction, wallet +from xahau.asyncio import account, clients, ledger, transaction, wallet __all__ = ["account", "clients", "ledger", "transaction", "wallet"] diff --git a/xrpl/asyncio/account/__init__.py b/xahau/asyncio/account/__init__.py similarity index 71% rename from xrpl/asyncio/account/__init__.py rename to xahau/asyncio/account/__init__.py index 44b5907df..614aad04a 100644 --- a/xrpl/asyncio/account/__init__.py +++ b/xahau/asyncio/account/__init__.py @@ -1,11 +1,11 @@ """Async methods for interacting with XRPL accounts.""" -from xrpl.asyncio.account.main import ( +from xahau.asyncio.account.main import ( does_account_exist, get_account_root, get_balance, get_next_valid_seq_number, ) -from xrpl.asyncio.account.transaction_history import get_latest_transaction +from xahau.asyncio.account.transaction_history import get_latest_transaction __all__ = [ "get_next_valid_seq_number", diff --git a/xrpl/asyncio/account/main.py b/xahau/asyncio/account/main.py similarity index 95% rename from xrpl/asyncio/account/main.py rename to xahau/asyncio/account/main.py index 0741114b4..4a5f5b7a9 100644 --- a/xrpl/asyncio/account/main.py +++ b/xahau/asyncio/account/main.py @@ -2,9 +2,9 @@ from typing import Dict, Union, cast -from xrpl.asyncio.clients import Client, XRPLRequestFailureException -from xrpl.core.addresscodec import is_valid_xaddress, xaddress_to_classic_address -from xrpl.models.requests import AccountInfo +from xahau.asyncio.clients import Client, XRPLRequestFailureException +from xahau.core.addresscodec import is_valid_xaddress, xaddress_to_classic_address +from xahau.models.requests import AccountInfo async def does_account_exist( diff --git a/xrpl/asyncio/account/py.typed b/xahau/asyncio/account/py.typed similarity index 100% rename from xrpl/asyncio/account/py.typed rename to xahau/asyncio/account/py.typed diff --git a/xrpl/asyncio/account/transaction_history.py b/xahau/asyncio/account/transaction_history.py similarity index 79% rename from xrpl/asyncio/account/transaction_history.py rename to xahau/asyncio/account/transaction_history.py index 84767aed7..33d46e955 100644 --- a/xrpl/asyncio/account/transaction_history.py +++ b/xahau/asyncio/account/transaction_history.py @@ -1,8 +1,8 @@ """High-level methods to obtain information about account transaction history.""" -from xrpl.asyncio.clients import Client, XRPLRequestFailureException -from xrpl.core.addresscodec import is_valid_xaddress, xaddress_to_classic_address -from xrpl.models.requests import AccountTx -from xrpl.models.response import Response +from xahau.asyncio.clients import Client, XRPLRequestFailureException +from xahau.core.addresscodec import is_valid_xaddress, xaddress_to_classic_address +from xahau.models.requests import AccountTx +from xahau.models.response import Response async def get_latest_transaction(account: str, client: Client) -> Response: diff --git a/xrpl/asyncio/clients/__init__.py b/xahau/asyncio/clients/__init__.py similarity index 55% rename from xrpl/asyncio/clients/__init__.py rename to xahau/asyncio/clients/__init__.py index 7a4143731..595764ebd 100644 --- a/xrpl/asyncio/clients/__init__.py +++ b/xahau/asyncio/clients/__init__.py @@ -1,9 +1,9 @@ """Asynchronous network clients for interacting with the XRPL.""" -from xrpl.asyncio.clients.async_json_rpc_client import AsyncJsonRpcClient -from xrpl.asyncio.clients.async_websocket_client import AsyncWebsocketClient -from xrpl.asyncio.clients.client import Client -from xrpl.asyncio.clients.exceptions import XRPLRequestFailureException -from xrpl.asyncio.clients.utils import ( +from xahau.asyncio.clients.async_json_rpc_client import AsyncJsonRpcClient +from xahau.asyncio.clients.async_websocket_client import AsyncWebsocketClient +from xahau.asyncio.clients.client import Client +from xahau.asyncio.clients.exceptions import XRPLRequestFailureException +from xahau.asyncio.clients.utils import ( json_to_response, request_to_json_rpc, request_to_websocket, diff --git a/xrpl/asyncio/clients/async_client.py b/xahau/asyncio/clients/async_client.py similarity index 80% rename from xrpl/asyncio/clients/async_client.py rename to xahau/asyncio/clients/async_client.py index 796be8cbc..ecee7e7cb 100644 --- a/xrpl/asyncio/clients/async_client.py +++ b/xahau/asyncio/clients/async_client.py @@ -4,9 +4,9 @@ from typing_extensions import Self -from xrpl.asyncio.clients.client import Client -from xrpl.models.requests.request import Request -from xrpl.models.response import Response +from xahau.asyncio.clients.client import Client +from xahau.models.requests.request import Request +from xahau.models.response import Response class AsyncClient(Client): diff --git a/xrpl/asyncio/clients/async_json_rpc_client.py b/xahau/asyncio/clients/async_json_rpc_client.py similarity index 62% rename from xrpl/asyncio/clients/async_json_rpc_client.py rename to xahau/asyncio/clients/async_json_rpc_client.py index d4b72f4ff..f5402d929 100644 --- a/xrpl/asyncio/clients/async_json_rpc_client.py +++ b/xahau/asyncio/clients/async_json_rpc_client.py @@ -1,6 +1,6 @@ """An async client for interacting with the rippled JSON RPC.""" -from xrpl.asyncio.clients.async_client import AsyncClient -from xrpl.asyncio.clients.json_rpc_base import JsonRpcBase +from xahau.asyncio.clients.async_client import AsyncClient +from xahau.asyncio.clients.json_rpc_base import JsonRpcBase class AsyncJsonRpcClient(AsyncClient, JsonRpcBase): diff --git a/xrpl/asyncio/clients/async_websocket_client.py b/xahau/asyncio/clients/async_websocket_client.py similarity index 91% rename from xrpl/asyncio/clients/async_websocket_client.py rename to xahau/asyncio/clients/async_websocket_client.py index 905ae46f5..fd7110479 100644 --- a/xrpl/asyncio/clients/async_websocket_client.py +++ b/xahau/asyncio/clients/async_websocket_client.py @@ -8,12 +8,12 @@ from typing_extensions import Self -from xrpl.asyncio.clients.async_client import AsyncClient -from xrpl.asyncio.clients.client import REQUEST_TIMEOUT -from xrpl.asyncio.clients.exceptions import XRPLWebsocketException -from xrpl.asyncio.clients.websocket_base import WebsocketBase -from xrpl.models.requests.request import Request -from xrpl.models.response import Response +from xahau.asyncio.clients.async_client import AsyncClient +from xahau.asyncio.clients.client import REQUEST_TIMEOUT +from xahau.asyncio.clients.exceptions import XRPLWebsocketException +from xahau.asyncio.clients.websocket_base import WebsocketBase +from xahau.models.requests.request import Request +from xahau.models.response import Response class AsyncWebsocketClient(AsyncClient, WebsocketBase): @@ -34,9 +34,9 @@ class AsyncWebsocketClient(AsyncClient, WebsocketBase): features of rippled, you may not need to do anything other than open the client and make requests:: - from xrpl.asyncio.clients import AsyncWebsocketClient - from xrpl.asyncio.ledger import get_fee - from xrpl.models import Fee + from xahau.asyncio.clients import AsyncWebsocketClient + from xahau.asyncio.ledger import get_fee + from xahau.models import Fee async with AsyncWebsocketClient(url) as client: @@ -65,10 +65,10 @@ class AsyncWebsocketClient(AsyncClient, WebsocketBase): import asyncio - from xrpl.asyncio.clients import AsyncWebsocketClient - from xrpl.models import Subscribe, Unsubscribe, StreamParameter + from xahau.asyncio.clients import AsyncWebsocketClient + from xahau.models import Subscribe, Unsubscribe, StreamParameter - URL = "wss://s.altnet.rippletest.net:51233" + URL = "wss://xahau-test.net" def on_open(): @@ -164,10 +164,10 @@ async def main(): import asyncio - from xrpl.asyncio.clients import AsyncWebsocketClient - from xrpl.models import Subscribe, StreamParameter + from xahau.asyncio.clients import AsyncWebsocketClient + from xahau.models import Subscribe, StreamParameter - URL = "wss://s.altnet.rippletest.net:51233" + URL = "wss://xahau-test.net" async def websocket_supervisor(): diff --git a/xrpl/asyncio/clients/client.py b/xahau/asyncio/clients/client.py similarity index 93% rename from xrpl/asyncio/clients/client.py rename to xahau/asyncio/clients/client.py index f4697778b..9428d633f 100644 --- a/xrpl/asyncio/clients/client.py +++ b/xahau/asyncio/clients/client.py @@ -7,8 +7,8 @@ from typing_extensions import Final, Self -from xrpl.models.requests.request import Request -from xrpl.models.response import Response +from xahau.models.requests.request import Request +from xahau.models.response import Response # The default request timeout duration. Set in Client._request_impl to allow more time # for longer running commands. diff --git a/xrpl/asyncio/clients/exceptions.py b/xahau/asyncio/clients/exceptions.py similarity index 96% rename from xrpl/asyncio/clients/exceptions.py rename to xahau/asyncio/clients/exceptions.py index 82b664220..a1678eb3c 100644 --- a/xrpl/asyncio/clients/exceptions.py +++ b/xahau/asyncio/clients/exceptions.py @@ -6,7 +6,7 @@ from typing_extensions import Self -from xrpl.constants import XRPLException +from xahau.constants import XRPLException class XRPLRequestFailureException(XRPLException): diff --git a/xrpl/asyncio/clients/json_rpc_base.py b/xahau/asyncio/clients/json_rpc_base.py similarity index 82% rename from xrpl/asyncio/clients/json_rpc_base.py rename to xahau/asyncio/clients/json_rpc_base.py index be6eb0605..f376f08d1 100644 --- a/xrpl/asyncio/clients/json_rpc_base.py +++ b/xahau/asyncio/clients/json_rpc_base.py @@ -7,11 +7,11 @@ from httpx import AsyncClient from typing_extensions import Self -from xrpl.asyncio.clients.client import REQUEST_TIMEOUT, Client -from xrpl.asyncio.clients.exceptions import XRPLRequestFailureException -from xrpl.asyncio.clients.utils import json_to_response, request_to_json_rpc -from xrpl.models.requests.request import Request -from xrpl.models.response import Response +from xahau.asyncio.clients.client import REQUEST_TIMEOUT, Client +from xahau.asyncio.clients.exceptions import XRPLRequestFailureException +from xahau.asyncio.clients.utils import json_to_response, request_to_json_rpc +from xahau.models.requests.request import Request +from xahau.models.response import Response class JsonRpcBase(Client): diff --git a/xrpl/asyncio/clients/py.typed b/xahau/asyncio/clients/py.typed similarity index 100% rename from xrpl/asyncio/clients/py.typed rename to xahau/asyncio/clients/py.typed diff --git a/xrpl/asyncio/clients/utils.py b/xahau/asyncio/clients/utils.py similarity index 96% rename from xrpl/asyncio/clients/utils.py rename to xahau/asyncio/clients/utils.py index 1f15f954b..2d88cac47 100644 --- a/xrpl/asyncio/clients/utils.py +++ b/xahau/asyncio/clients/utils.py @@ -2,8 +2,8 @@ from typing import Any, Dict -from xrpl.models.requests.request import Request -from xrpl.models.response import Response, ResponseStatus, ResponseType +from xahau.models.requests.request import Request +from xahau.models.response import Response, ResponseStatus, ResponseType def request_to_json_rpc(request_object: Request) -> Dict[str, Any]: diff --git a/xrpl/asyncio/clients/websocket_base.py b/xahau/asyncio/clients/websocket_base.py similarity index 96% rename from xrpl/asyncio/clients/websocket_base.py rename to xahau/asyncio/clients/websocket_base.py index 339a33fb9..dbc337fa0 100644 --- a/xrpl/asyncio/clients/websocket_base.py +++ b/xahau/asyncio/clients/websocket_base.py @@ -10,11 +10,11 @@ from typing_extensions import Final, Self from websockets import client as websocket_client -from xrpl.asyncio.clients.client import Client -from xrpl.asyncio.clients.exceptions import XRPLWebsocketException -from xrpl.asyncio.clients.utils import request_to_websocket, websocket_to_response -from xrpl.models.requests.request import Request -from xrpl.models.response import Response +from xahau.asyncio.clients.client import Client +from xahau.asyncio.clients.exceptions import XRPLWebsocketException +from xahau.asyncio.clients.utils import request_to_websocket, websocket_to_response +from xahau.models.requests.request import Request +from xahau.models.response import Response _REQ_ID_MAX: Final[int] = 1_000_000 diff --git a/xrpl/asyncio/ledger/__init__.py b/xahau/asyncio/ledger/__init__.py similarity index 87% rename from xrpl/asyncio/ledger/__init__.py rename to xahau/asyncio/ledger/__init__.py index 2d2ec70ac..a7a39658a 100644 --- a/xrpl/asyncio/ledger/__init__.py +++ b/xahau/asyncio/ledger/__init__.py @@ -1,5 +1,5 @@ """Async methods for obtaining information about the status of the XRP Ledger.""" -from xrpl.asyncio.ledger.main import ( +from xahau.asyncio.ledger.main import ( get_fee, get_latest_open_ledger_sequence, get_latest_validated_ledger_sequence, diff --git a/xrpl/asyncio/ledger/main.py b/xahau/asyncio/ledger/main.py similarity index 92% rename from xrpl/asyncio/ledger/main.py rename to xahau/asyncio/ledger/main.py index f83a591c9..4ec4ae820 100644 --- a/xrpl/asyncio/ledger/main.py +++ b/xahau/asyncio/ledger/main.py @@ -2,11 +2,11 @@ from typing import Optional, cast -from xrpl.asyncio.clients import Client, XRPLRequestFailureException -from xrpl.asyncio.ledger.utils import calculate_fee_dynamically -from xrpl.constants import XRPLException -from xrpl.models.requests import Fee, Ledger -from xrpl.utils import xrp_to_drops +from xahau.asyncio.clients import Client, XRPLRequestFailureException +from xahau.asyncio.ledger.utils import calculate_fee_dynamically +from xahau.constants import XRPLException +from xahau.models.requests import Fee, Ledger +from xahau.utils import xrp_to_drops async def get_latest_validated_ledger_sequence(client: Client) -> int: diff --git a/xrpl/asyncio/ledger/py.typed b/xahau/asyncio/ledger/py.typed similarity index 100% rename from xrpl/asyncio/ledger/py.typed rename to xahau/asyncio/ledger/py.typed diff --git a/xrpl/asyncio/ledger/utils.py b/xahau/asyncio/ledger/utils.py similarity index 100% rename from xrpl/asyncio/ledger/utils.py rename to xahau/asyncio/ledger/utils.py diff --git a/xrpl/asyncio/py.typed b/xahau/asyncio/py.typed similarity index 100% rename from xrpl/asyncio/py.typed rename to xahau/asyncio/py.typed diff --git a/xrpl/asyncio/transaction/__init__.py b/xahau/asyncio/transaction/__init__.py similarity index 81% rename from xrpl/asyncio/transaction/__init__.py rename to xahau/asyncio/transaction/__init__.py index abe53a886..df1c7a32a 100644 --- a/xrpl/asyncio/transaction/__init__.py +++ b/xahau/asyncio/transaction/__init__.py @@ -1,5 +1,5 @@ """Async methods for working with transactions on the XRP Ledger.""" -from xrpl.asyncio.transaction.main import ( +from xahau.asyncio.transaction.main import ( autofill, autofill_and_sign, sign, @@ -7,7 +7,7 @@ submit, transaction_json_to_binary_codec_form, ) -from xrpl.asyncio.transaction.reliable_submission import ( +from xahau.asyncio.transaction.reliable_submission import ( XRPLReliableSubmissionException, submit_and_wait, ) diff --git a/xrpl/asyncio/transaction/main.py b/xahau/asyncio/transaction/main.py similarity index 93% rename from xrpl/asyncio/transaction/main.py rename to xahau/asyncio/transaction/main.py index 3c7bb8a52..7681362e8 100644 --- a/xrpl/asyncio/transaction/main.py +++ b/xahau/asyncio/transaction/main.py @@ -4,23 +4,23 @@ from typing_extensions import Final -from xrpl.asyncio.account import get_next_valid_seq_number -from xrpl.asyncio.clients import Client, XRPLRequestFailureException -from xrpl.asyncio.ledger import get_fee, get_latest_validated_ledger_sequence -from xrpl.constants import XRPLException -from xrpl.core.addresscodec import is_valid_xaddress, xaddress_to_classic_address -from xrpl.core.binarycodec import encode, encode_for_multisigning, encode_for_signing -from xrpl.core.keypairs.main import sign as keypairs_sign -from xrpl.models.requests import ServerInfo, ServerState, SubmitOnly -from xrpl.models.response import Response -from xrpl.models.transactions import EscrowFinish -from xrpl.models.transactions.transaction import Signer, Transaction -from xrpl.models.transactions.transaction import ( +from xahau.asyncio.account import get_next_valid_seq_number +from xahau.asyncio.clients import Client, XRPLRequestFailureException +from xahau.asyncio.ledger import get_fee, get_latest_validated_ledger_sequence +from xahau.constants import XRPLException +from xahau.core.addresscodec import is_valid_xaddress, xaddress_to_classic_address +from xahau.core.binarycodec import encode, encode_for_multisigning, encode_for_signing +from xahau.core.keypairs.main import sign as keypairs_sign +from xahau.models.requests import ServerInfo, ServerState, SubmitOnly +from xahau.models.response import Response +from xahau.models.transactions import EscrowFinish +from xahau.models.transactions.transaction import Signer, Transaction +from xahau.models.transactions.transaction import ( transaction_json_to_binary_codec_form as model_transaction_to_binary_codec, ) -from xrpl.models.transactions.types.transaction_type import TransactionType -from xrpl.utils import drops_to_xrp, xrp_to_drops -from xrpl.wallet.main import Wallet +from xahau.models.transactions.types.transaction_type import TransactionType +from xahau.utils import drops_to_xrp, xrp_to_drops +from xahau.wallet.main import Wallet _LEDGER_OFFSET: Final[int] = 20 # Sidechains are expected to have network IDs above this. @@ -66,8 +66,8 @@ async def sign_and_submit( # Even though this is synchronous - this is here because it used to be async in -# xrpl-py 1.0, and we decided it wasn't worth breaking people's imports to move -# It to a central location as part of the xrpl-py 2.0 changes. It is aliased in +# xahau-py 1.0, and we decided it wasn't worth breaking people's imports to move +# It to a central location as part of the xahau-py 2.0 changes. It is aliased in # The synchronous half of the library as well. def sign( transaction: Transaction, diff --git a/xrpl/asyncio/transaction/py.typed b/xahau/asyncio/transaction/py.typed similarity index 100% rename from xrpl/asyncio/transaction/py.typed rename to xahau/asyncio/transaction/py.typed diff --git a/xrpl/asyncio/transaction/reliable_submission.py b/xahau/asyncio/transaction/reliable_submission.py similarity index 93% rename from xrpl/asyncio/transaction/reliable_submission.py rename to xahau/asyncio/transaction/reliable_submission.py index ddf202408..c2ed40ade 100644 --- a/xrpl/asyncio/transaction/reliable_submission.py +++ b/xahau/asyncio/transaction/reliable_submission.py @@ -5,17 +5,17 @@ from typing_extensions import Final -from xrpl.asyncio.clients import Client -from xrpl.asyncio.ledger import get_latest_validated_ledger_sequence -from xrpl.asyncio.transaction.main import _check_fee -from xrpl.asyncio.transaction.main import autofill as _autofill -from xrpl.asyncio.transaction.main import sign, submit -from xrpl.clients import XRPLRequestFailureException -from xrpl.constants import XRPLException -from xrpl.models.requests import Tx -from xrpl.models.response import Response -from xrpl.models.transactions.transaction import Transaction -from xrpl.wallet.main import Wallet +from xahau.asyncio.clients import Client +from xahau.asyncio.ledger import get_latest_validated_ledger_sequence +from xahau.asyncio.transaction.main import _check_fee +from xahau.asyncio.transaction.main import autofill as _autofill +from xahau.asyncio.transaction.main import sign, submit +from xahau.clients import XRPLRequestFailureException +from xahau.constants import XRPLException +from xahau.models.requests import Tx +from xahau.models.response import Response +from xahau.models.transactions.transaction import Transaction +from xahau.wallet.main import Wallet _LEDGER_CLOSE_TIME: Final[int] = 1 diff --git a/xrpl/asyncio/wallet/__init__.py b/xahau/asyncio/wallet/__init__.py similarity index 75% rename from xrpl/asyncio/wallet/__init__.py rename to xahau/asyncio/wallet/__init__.py index 220964348..f42619037 100644 --- a/xrpl/asyncio/wallet/__init__.py +++ b/xahau/asyncio/wallet/__init__.py @@ -1,5 +1,5 @@ """Async methods for working with XRPL wallets.""" -from xrpl.asyncio.wallet.wallet_generation import ( +from xahau.asyncio.wallet.wallet_generation import ( XRPLFaucetException, generate_faucet_wallet, ) diff --git a/xrpl/asyncio/wallet/py.typed b/xahau/asyncio/wallet/py.typed similarity index 100% rename from xrpl/asyncio/wallet/py.typed rename to xahau/asyncio/wallet/py.typed diff --git a/xrpl/asyncio/wallet/wallet_generation.py b/xahau/asyncio/wallet/wallet_generation.py similarity index 93% rename from xrpl/asyncio/wallet/wallet_generation.py rename to xahau/asyncio/wallet/wallet_generation.py index 08cb36418..0d30cfeb6 100644 --- a/xrpl/asyncio/wallet/wallet_generation.py +++ b/xahau/asyncio/wallet/wallet_generation.py @@ -1,4 +1,5 @@ """Handles wallet generation from a faucet.""" + import asyncio from typing import Optional from urllib.parse import urlparse, urlunparse @@ -6,13 +7,13 @@ import httpx from typing_extensions import Final -from xrpl.asyncio.account import get_balance, get_next_valid_seq_number -from xrpl.asyncio.clients import Client, XRPLRequestFailureException -from xrpl.constants import XRPLException -from xrpl.wallet.main import Wallet +from xahau.asyncio.account import get_balance, get_next_valid_seq_number +from xahau.asyncio.clients import Client, XRPLRequestFailureException +from xahau.constants import XRPLException +from xahau.wallet.main import Wallet -_TEST_FAUCET_URL: Final[str] = "https://faucet.altnet.rippletest.net/accounts" -_DEV_FAUCET_URL: Final[str] = "https://faucet.devnet.rippletest.net/accounts" +_TEST_FAUCET_URL: Final[str] = "https://xahau-test.net/accounts" +_DEV_FAUCET_URL: Final[str] = "https://xahau-test.net/accounts" _TIMEOUT_SECONDS: Final[int] = 40 @@ -29,7 +30,7 @@ async def generate_faucet_wallet( debug: bool = False, faucet_host: Optional[str] = None, usage_context: Optional[str] = None, - user_agent: Optional[str] = "xrpl-py", + user_agent: Optional[str] = "xahau-py", ) -> Wallet: """ Generates a random wallet and funds it using the XRPL Testnet Faucet. @@ -44,7 +45,7 @@ async def generate_faucet_wallet( (for example, testing). This information will be included in the json body of the HTTP request to the faucet. user_agent: A string representing the user agent (software/ client used) - for the HTTP request. Default is "xrpl-py". + for the HTTP request. Default is "xahau-py". Returns: @@ -167,7 +168,7 @@ def get_faucet_url(url: str, faucet_host: Optional[str] = None) -> str: """ if faucet_host is not None: return process_faucet_host_url(faucet_host) - if "altnet" in url or "testnet" in url: # testnet + if "xahau-test" in url or "testnet" in url: # testnet return _TEST_FAUCET_URL if "sidechain-net2" in url: # sidechain issuing chain devnet raise XRPLFaucetException( diff --git a/xrpl/clients/__init__.py b/xahau/clients/__init__.py similarity index 57% rename from xrpl/clients/__init__.py rename to xahau/clients/__init__.py index 66108d5e4..66ebbafa1 100644 --- a/xrpl/clients/__init__.py +++ b/xahau/clients/__init__.py @@ -1,14 +1,14 @@ """Synchronous network clients for interacting with the XRPL.""" -from xrpl.asyncio.clients.client import Client -from xrpl.asyncio.clients.exceptions import XRPLRequestFailureException -from xrpl.asyncio.clients.utils import ( +from xahau.asyncio.clients.client import Client +from xahau.asyncio.clients.exceptions import XRPLRequestFailureException +from xahau.asyncio.clients.utils import ( json_to_response, request_to_json_rpc, request_to_websocket, websocket_to_response, ) -from xrpl.clients.json_rpc_client import JsonRpcClient -from xrpl.clients.websocket_client import WebsocketClient +from xahau.clients.json_rpc_client import JsonRpcClient +from xahau.clients.websocket_client import WebsocketClient __all__ = [ "Client", diff --git a/xrpl/clients/json_rpc_client.py b/xahau/clients/json_rpc_client.py similarity index 63% rename from xrpl/clients/json_rpc_client.py rename to xahau/clients/json_rpc_client.py index b5877dd79..c9466020a 100644 --- a/xrpl/clients/json_rpc_client.py +++ b/xahau/clients/json_rpc_client.py @@ -1,6 +1,6 @@ """A sync client for interacting with the rippled JSON RPC.""" -from xrpl.asyncio.clients.json_rpc_base import JsonRpcBase -from xrpl.clients.sync_client import SyncClient +from xahau.asyncio.clients.json_rpc_base import JsonRpcBase +from xahau.clients.sync_client import SyncClient class JsonRpcClient(SyncClient, JsonRpcBase): diff --git a/xrpl/clients/py.typed b/xahau/clients/py.typed similarity index 100% rename from xrpl/clients/py.typed rename to xahau/clients/py.typed diff --git a/xrpl/clients/sync_client.py b/xahau/clients/sync_client.py similarity index 80% rename from xrpl/clients/sync_client.py rename to xahau/clients/sync_client.py index bb8153035..6b929518a 100644 --- a/xrpl/clients/sync_client.py +++ b/xahau/clients/sync_client.py @@ -6,9 +6,9 @@ from typing_extensions import Self -from xrpl.asyncio.clients.client import Client -from xrpl.models.requests.request import Request -from xrpl.models.response import Response +from xahau.asyncio.clients.client import Client +from xahau.models.requests.request import Request +from xahau.models.response import Response class SyncClient(Client): diff --git a/xrpl/clients/websocket_client.py b/xahau/clients/websocket_client.py similarity index 94% rename from xrpl/clients/websocket_client.py rename to xahau/clients/websocket_client.py index b19e70e80..66f7d770a 100644 --- a/xrpl/clients/websocket_client.py +++ b/xahau/clients/websocket_client.py @@ -10,12 +10,12 @@ from typing_extensions import Self -from xrpl.asyncio.clients.client import REQUEST_TIMEOUT -from xrpl.asyncio.clients.exceptions import XRPLWebsocketException -from xrpl.asyncio.clients.websocket_base import WebsocketBase -from xrpl.clients.sync_client import SyncClient -from xrpl.models.requests.request import Request -from xrpl.models.response import Response +from xahau.asyncio.clients.client import REQUEST_TIMEOUT +from xahau.asyncio.clients.exceptions import XRPLWebsocketException +from xahau.asyncio.clients.websocket_base import WebsocketBase +from xahau.clients.sync_client import SyncClient +from xahau.models.requests.request import Request +from xahau.models.response import Response class WebsocketClient(SyncClient, WebsocketBase): @@ -36,9 +36,9 @@ class WebsocketClient(SyncClient, WebsocketBase): features of rippled, you may not need to do anything other than open the client and make requests:: - from xrpl.clients import WebsocketClient - from xrpl.ledger import get_fee - from xrpl.models import Fee + from xahau.clients import WebsocketClient + from xahau.ledger import get_fee + from xahau.models import Fee with WebsocketClient(url) as client: diff --git a/xrpl/constants.py b/xahau/constants.py similarity index 100% rename from xrpl/constants.py rename to xahau/constants.py diff --git a/xrpl/core/__init__.py b/xahau/core/__init__.py similarity index 65% rename from xrpl/core/__init__.py rename to xahau/core/__init__.py index d8250d894..607f775eb 100644 --- a/xrpl/core/__init__.py +++ b/xahau/core/__init__.py @@ -1,4 +1,4 @@ """Core codec functions for interacting with the XRPL.""" -from xrpl.core import addresscodec, binarycodec, keypairs +from xahau.core import addresscodec, binarycodec, keypairs __all__ = ["addresscodec", "binarycodec", "keypairs"] diff --git a/xrpl/core/addresscodec/__init__.py b/xahau/core/addresscodec/__init__.py similarity index 80% rename from xrpl/core/addresscodec/__init__.py rename to xahau/core/addresscodec/__init__.py index 0d3826e36..2c4aa8849 100644 --- a/xrpl/core/addresscodec/__init__.py +++ b/xahau/core/addresscodec/__init__.py @@ -1,5 +1,5 @@ """Functions for encoding and decoding XRP Ledger addresses and seeds.""" -from xrpl.core.addresscodec.codec import ( +from xahau.core.addresscodec.codec import ( SEED_LENGTH, decode_account_public_key, decode_classic_address, @@ -11,14 +11,14 @@ encode_seed, is_valid_classic_address, ) -from xrpl.core.addresscodec.exceptions import XRPLAddressCodecException -from xrpl.core.addresscodec.main import ( +from xahau.core.addresscodec.exceptions import XRPLAddressCodecException +from xahau.core.addresscodec.main import ( classic_address_to_xaddress, ensure_classic_address, is_valid_xaddress, xaddress_to_classic_address, ) -from xrpl.core.addresscodec.utils import XRPL_ALPHABET +from xahau.core.addresscodec.utils import XRPL_ALPHABET __all__ = [ "classic_address_to_xaddress", diff --git a/xrpl/core/addresscodec/codec.py b/xahau/core/addresscodec/codec.py similarity index 97% rename from xrpl/core/addresscodec/codec.py rename to xahau/core/addresscodec/codec.py index 479023acf..542045007 100644 --- a/xrpl/core/addresscodec/codec.py +++ b/xahau/core/addresscodec/codec.py @@ -5,9 +5,9 @@ import base58 from typing_extensions import Final -from xrpl.constants import CryptoAlgorithm -from xrpl.core.addresscodec.exceptions import XRPLAddressCodecException -from xrpl.core.addresscodec.utils import XRPL_ALPHABET +from xahau.constants import CryptoAlgorithm +from xahau.core.addresscodec.exceptions import XRPLAddressCodecException +from xahau.core.addresscodec.utils import XRPL_ALPHABET # base58 encodings: https://xrpl.org/base58-encodings.html # Account address (20 bytes) diff --git a/xrpl/core/addresscodec/exceptions.py b/xahau/core/addresscodec/exceptions.py similarity index 78% rename from xrpl/core/addresscodec/exceptions.py rename to xahau/core/addresscodec/exceptions.py index 5f7182e16..f6d254af1 100644 --- a/xrpl/core/addresscodec/exceptions.py +++ b/xahau/core/addresscodec/exceptions.py @@ -1,5 +1,5 @@ """General XRPL Address Codec Exceptions.""" -from xrpl.constants import XRPLException +from xahau.constants import XRPLException class XRPLAddressCodecException(XRPLException): diff --git a/xrpl/core/addresscodec/main.py b/xahau/core/addresscodec/main.py similarity index 96% rename from xrpl/core/addresscodec/main.py rename to xahau/core/addresscodec/main.py index 0d0a4f68f..5731d6212 100644 --- a/xrpl/core/addresscodec/main.py +++ b/xahau/core/addresscodec/main.py @@ -5,9 +5,9 @@ import base58 from typing_extensions import Final -from xrpl.core.addresscodec.codec import decode_classic_address, encode_classic_address -from xrpl.core.addresscodec.exceptions import XRPLAddressCodecException -from xrpl.core.addresscodec.utils import XRPL_ALPHABET +from xahau.core.addresscodec.codec import decode_classic_address, encode_classic_address +from xahau.core.addresscodec.exceptions import XRPLAddressCodecException +from xahau.core.addresscodec.utils import XRPL_ALPHABET MAX_32_BIT_UNSIGNED_INT: Final[int] = 4294967295 diff --git a/xrpl/core/addresscodec/py.typed b/xahau/core/addresscodec/py.typed similarity index 100% rename from xrpl/core/addresscodec/py.typed rename to xahau/core/addresscodec/py.typed diff --git a/xrpl/core/addresscodec/utils.py b/xahau/core/addresscodec/utils.py similarity index 100% rename from xrpl/core/addresscodec/utils.py rename to xahau/core/addresscodec/utils.py diff --git a/xrpl/core/binarycodec/__init__.py b/xahau/core/binarycodec/__init__.py similarity index 76% rename from xrpl/core/binarycodec/__init__.py rename to xahau/core/binarycodec/__init__.py index b73ffeb68..6e55cdc0b 100644 --- a/xrpl/core/binarycodec/__init__.py +++ b/xahau/core/binarycodec/__init__.py @@ -2,8 +2,8 @@ Functions for encoding objects into the XRP Ledger's canonical binary format and decoding them. """ -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.main import ( +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.main import ( decode, encode, encode_for_multisigning, diff --git a/xahau/core/binarycodec/binary_wrappers/__init__.py b/xahau/core/binarycodec/binary_wrappers/__init__.py new file mode 100644 index 000000000..ce7fdd493 --- /dev/null +++ b/xahau/core/binarycodec/binary_wrappers/__init__.py @@ -0,0 +1,5 @@ +"""Wrapper classes around byte buffers used for serialization and deserialization.""" +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.binary_wrappers.binary_serializer import BinarySerializer + +__all__ = ["BinaryParser", "BinarySerializer"] diff --git a/xrpl/core/binarycodec/binary_wrappers/binary_parser.py b/xahau/core/binarycodec/binary_wrappers/binary_parser.py similarity index 96% rename from xrpl/core/binarycodec/binary_wrappers/binary_parser.py rename to xahau/core/binarycodec/binary_wrappers/binary_parser.py index 32e314596..232c5173d 100644 --- a/xrpl/core/binarycodec/binary_wrappers/binary_parser.py +++ b/xahau/core/binarycodec/binary_wrappers/binary_parser.py @@ -6,14 +6,14 @@ from typing_extensions import Final, Self -from xrpl.core.binarycodec.definitions import definitions -from xrpl.core.binarycodec.definitions.field_header import FieldHeader -from xrpl.core.binarycodec.definitions.field_instance import FieldInstance -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.definitions import definitions +from xahau.core.binarycodec.definitions.field_header import FieldHeader +from xahau.core.binarycodec.definitions.field_instance import FieldInstance +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException if TYPE_CHECKING: # To prevent a circular dependency. - from xrpl.core.binarycodec.types.serialized_type import SerializedType + from xahau.core.binarycodec.types.serialized_type import SerializedType # Constants used in length prefix decoding: # Max length that can be represented in a single byte per XRPL serialization encoding diff --git a/xrpl/core/binarycodec/binary_wrappers/binary_serializer.py b/xahau/core/binarycodec/binary_wrappers/binary_serializer.py similarity index 96% rename from xrpl/core/binarycodec/binary_wrappers/binary_serializer.py rename to xahau/core/binarycodec/binary_wrappers/binary_serializer.py index 9655dc411..09fb12d24 100644 --- a/xrpl/core/binarycodec/binary_wrappers/binary_serializer.py +++ b/xahau/core/binarycodec/binary_wrappers/binary_serializer.py @@ -4,8 +4,8 @@ from typing_extensions import Final, Self -from xrpl.core.binarycodec.definitions.field_instance import FieldInstance -from xrpl.core.binarycodec.types.serialized_type import SerializedType +from xahau.core.binarycodec.definitions.field_instance import FieldInstance +from xahau.core.binarycodec.types.serialized_type import SerializedType # Constants used in length prefix encoding: # max length that can be represented in a single byte per XRPL serialization encoding diff --git a/xrpl/core/binarycodec/definitions/__init__.py b/xahau/core/binarycodec/definitions/__init__.py similarity index 73% rename from xrpl/core/binarycodec/definitions/__init__.py rename to xahau/core/binarycodec/definitions/__init__.py index b8287cde2..9885934d5 100644 --- a/xrpl/core/binarycodec/definitions/__init__.py +++ b/xahau/core/binarycodec/definitions/__init__.py @@ -1,5 +1,5 @@ """Handles the XRPL type and definition specifics.""" -from xrpl.core.binarycodec.definitions.definitions import ( +from xahau.core.binarycodec.definitions.definitions import ( get_field_header_from_name, get_field_instance, get_field_name_from_header, @@ -11,9 +11,9 @@ get_transaction_type_name, load_definitions, ) -from xrpl.core.binarycodec.definitions.field_header import FieldHeader -from xrpl.core.binarycodec.definitions.field_info import FieldInfo -from xrpl.core.binarycodec.definitions.field_instance import FieldInstance +from xahau.core.binarycodec.definitions.field_header import FieldHeader +from xahau.core.binarycodec.definitions.field_info import FieldInfo +from xahau.core.binarycodec.definitions.field_instance import FieldInstance __all__ = [ "FieldHeader", diff --git a/xrpl/core/binarycodec/definitions/definitions.json b/xahau/core/binarycodec/definitions/definitions.json similarity index 100% rename from xrpl/core/binarycodec/definitions/definitions.json rename to xahau/core/binarycodec/definitions/definitions.json diff --git a/xrpl/core/binarycodec/definitions/definitions.py b/xahau/core/binarycodec/definitions/definitions.py similarity index 96% rename from xrpl/core/binarycodec/definitions/definitions.py rename to xahau/core/binarycodec/definitions/definitions.py index e82608a09..b7b6279d9 100644 --- a/xrpl/core/binarycodec/definitions/definitions.py +++ b/xahau/core/binarycodec/definitions/definitions.py @@ -4,10 +4,10 @@ import os from typing import Any, Dict, cast -from xrpl.core.binarycodec.definitions.field_header import FieldHeader -from xrpl.core.binarycodec.definitions.field_info import FieldInfo -from xrpl.core.binarycodec.definitions.field_instance import FieldInstance -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.definitions.field_header import FieldHeader +from xahau.core.binarycodec.definitions.field_info import FieldInfo +from xahau.core.binarycodec.definitions.field_instance import FieldInstance +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException def load_definitions(filename: str = "definitions.json") -> Dict[str, Any]: diff --git a/xrpl/core/binarycodec/definitions/field_header.py b/xahau/core/binarycodec/definitions/field_header.py similarity index 100% rename from xrpl/core/binarycodec/definitions/field_header.py rename to xahau/core/binarycodec/definitions/field_header.py diff --git a/xrpl/core/binarycodec/definitions/field_info.py b/xahau/core/binarycodec/definitions/field_info.py similarity index 100% rename from xrpl/core/binarycodec/definitions/field_info.py rename to xahau/core/binarycodec/definitions/field_info.py diff --git a/xrpl/core/binarycodec/definitions/field_instance.py b/xahau/core/binarycodec/definitions/field_instance.py similarity index 86% rename from xrpl/core/binarycodec/definitions/field_instance.py rename to xahau/core/binarycodec/definitions/field_instance.py index dc192ee6d..03923dca2 100644 --- a/xrpl/core/binarycodec/definitions/field_instance.py +++ b/xahau/core/binarycodec/definitions/field_instance.py @@ -6,12 +6,12 @@ from typing_extensions import Self -from xrpl.core.binarycodec.definitions.field_header import FieldHeader -from xrpl.core.binarycodec.definitions.field_info import FieldInfo +from xahau.core.binarycodec.definitions.field_header import FieldHeader +from xahau.core.binarycodec.definitions.field_info import FieldInfo if TYPE_CHECKING: # To prevent a circular dependency. - from xrpl.core.binarycodec.types.serialized_type import SerializedType + from xahau.core.binarycodec.types.serialized_type import SerializedType def _get_type_by_name(name: str) -> Type[SerializedType]: @@ -24,7 +24,7 @@ def _get_type_by_name(name: str) -> Type[SerializedType]: Returns: The corresponding class object. """ - import xrpl.core.binarycodec.types as types + import xahau.core.binarycodec.types as types type_map: Dict[str, Type[SerializedType]] = { name: object_type diff --git a/xrpl/core/binarycodec/exceptions.py b/xahau/core/binarycodec/exceptions.py similarity index 78% rename from xrpl/core/binarycodec/exceptions.py rename to xahau/core/binarycodec/exceptions.py index 85fb09552..fbdaa23ca 100644 --- a/xrpl/core/binarycodec/exceptions.py +++ b/xahau/core/binarycodec/exceptions.py @@ -1,5 +1,5 @@ """General XRPL Binary Codec Exceptions.""" -from xrpl.constants import XRPLException +from xahau.constants import XRPLException class XRPLBinaryCodecException(XRPLException): diff --git a/xrpl/core/binarycodec/field_id_codec.py b/xahau/core/binarycodec/field_id_codec.py similarity index 94% rename from xrpl/core/binarycodec/field_id_codec.py rename to xahau/core/binarycodec/field_id_codec.py index 21b7b6698..43dfbe3bd 100644 --- a/xrpl/core/binarycodec/field_id_codec.py +++ b/xahau/core/binarycodec/field_id_codec.py @@ -3,9 +3,9 @@ `Field IDs `_ """ -from xrpl.core.binarycodec.definitions import definitions -from xrpl.core.binarycodec.definitions.field_header import FieldHeader -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.definitions import definitions +from xahau.core.binarycodec.definitions.field_header import FieldHeader +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException def encode(field_name: str) -> bytes: diff --git a/xrpl/core/binarycodec/main.py b/xahau/core/binarycodec/main.py similarity index 91% rename from xrpl/core/binarycodec/main.py rename to xahau/core/binarycodec/main.py index a2b5cec86..04363d11c 100644 --- a/xrpl/core/binarycodec/main.py +++ b/xahau/core/binarycodec/main.py @@ -7,11 +7,11 @@ from typing_extensions import Final -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.types.account_id import AccountID -from xrpl.core.binarycodec.types.hash256 import Hash256 -from xrpl.core.binarycodec.types.st_object import STObject -from xrpl.core.binarycodec.types.uint64 import UInt64 +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.types.account_id import AccountID +from xahau.core.binarycodec.types.hash256 import Hash256 +from xahau.core.binarycodec.types.st_object import STObject +from xahau.core.binarycodec.types.uint64 import UInt64 def _num_to_bytes(num: int) -> bytes: diff --git a/xrpl/core/binarycodec/py.typed b/xahau/core/binarycodec/py.typed similarity index 100% rename from xrpl/core/binarycodec/py.typed rename to xahau/core/binarycodec/py.typed diff --git a/xahau/core/binarycodec/types/__init__.py b/xahau/core/binarycodec/types/__init__.py new file mode 100644 index 000000000..4dc6d8d17 --- /dev/null +++ b/xahau/core/binarycodec/types/__init__.py @@ -0,0 +1,42 @@ +"""Top-level exports for types used in binary_codec.""" +from xahau.core.binarycodec.types.account_id import AccountID +from xahau.core.binarycodec.types.amount import Amount +from xahau.core.binarycodec.types.blob import Blob +from xahau.core.binarycodec.types.currency import Currency +from xahau.core.binarycodec.types.hash import Hash +from xahau.core.binarycodec.types.hash128 import Hash128 +from xahau.core.binarycodec.types.hash160 import Hash160 +from xahau.core.binarycodec.types.hash256 import Hash256 +from xahau.core.binarycodec.types.issue import Issue +from xahau.core.binarycodec.types.path_set import PathSet +from xahau.core.binarycodec.types.st_array import STArray +from xahau.core.binarycodec.types.st_object import STObject +from xahau.core.binarycodec.types.uint import UInt +from xahau.core.binarycodec.types.uint8 import UInt8 +from xahau.core.binarycodec.types.uint16 import UInt16 +from xahau.core.binarycodec.types.uint32 import UInt32 +from xahau.core.binarycodec.types.uint64 import UInt64 +from xahau.core.binarycodec.types.vector256 import Vector256 +from xahau.core.binarycodec.types.xchain_bridge import XChainBridge + +__all__ = [ + "AccountID", + "Amount", + "Blob", + "Currency", + "Hash", + "Hash128", + "Hash160", + "Hash256", + "Issue", + "PathSet", + "STObject", + "STArray", + "UInt", + "UInt8", + "UInt16", + "UInt32", + "UInt64", + "Vector256", + "XChainBridge", +] diff --git a/xrpl/core/binarycodec/types/account_id.py b/xahau/core/binarycodec/types/account_id.py similarity index 94% rename from xrpl/core/binarycodec/types/account_id.py rename to xahau/core/binarycodec/types/account_id.py index b8071fe4d..54e2ce860 100644 --- a/xrpl/core/binarycodec/types/account_id.py +++ b/xahau/core/binarycodec/types/account_id.py @@ -9,15 +9,15 @@ from typing_extensions import Final, Self -from xrpl.core.addresscodec import ( +from xahau.core.addresscodec import ( decode_classic_address, encode_classic_address, is_valid_classic_address, is_valid_xaddress, xaddress_to_classic_address, ) -from xrpl.core.binarycodec import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.hash160 import Hash160 +from xahau.core.binarycodec import XRPLBinaryCodecException +from xahau.core.binarycodec.types.hash160 import Hash160 # matches hex-encoded accounts. this happens to be the same format as the # hex currency encoding, but that might change so we're redefining it here. diff --git a/xrpl/core/binarycodec/types/amount.py b/xahau/core/binarycodec/types/amount.py similarity index 96% rename from xrpl/core/binarycodec/types/amount.py rename to xahau/core/binarycodec/types/amount.py index 8a1facdcd..2acc2170a 100644 --- a/xrpl/core/binarycodec/types/amount.py +++ b/xahau/core/binarycodec/types/amount.py @@ -10,7 +10,7 @@ from typing_extensions import Final, Self -from xrpl.constants import ( +from xahau.constants import ( IOU_DECIMAL_CONTEXT, MAX_IOU_EXPONENT, MAX_IOU_MANTISSA, @@ -18,12 +18,12 @@ MIN_IOU_EXPONENT, MIN_IOU_MANTISSA, ) -from xrpl.core.binarycodec.binary_wrappers import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.account_id import AccountID -from xrpl.core.binarycodec.types.currency import Currency -from xrpl.core.binarycodec.types.serialized_type import SerializedType -from xrpl.models.amounts import IssuedCurrencyAmount +from xahau.core.binarycodec.binary_wrappers import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.account_id import AccountID +from xahau.core.binarycodec.types.currency import Currency +from xahau.core.binarycodec.types.serialized_type import SerializedType +from xahau.models.amounts import IssuedCurrencyAmount _MAX_DROPS: Final[Decimal] = Decimal("1e17") _MIN_XRP: Final[Decimal] = Decimal("1e-6") diff --git a/xrpl/core/binarycodec/types/blob.py b/xahau/core/binarycodec/types/blob.py similarity index 88% rename from xrpl/core/binarycodec/types/blob.py rename to xahau/core/binarycodec/types/blob.py index cc44ff206..0610ef434 100644 --- a/xrpl/core/binarycodec/types/blob.py +++ b/xahau/core/binarycodec/types/blob.py @@ -9,9 +9,9 @@ from typing_extensions import Self -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.serialized_type import SerializedType +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.serialized_type import SerializedType class Blob(SerializedType): diff --git a/xrpl/core/binarycodec/types/currency.py b/xahau/core/binarycodec/types/currency.py similarity index 95% rename from xrpl/core/binarycodec/types/currency.py rename to xahau/core/binarycodec/types/currency.py index a39d53e92..f1d69008b 100644 --- a/xrpl/core/binarycodec/types/currency.py +++ b/xahau/core/binarycodec/types/currency.py @@ -6,9 +6,9 @@ from typing_extensions import Final, Self -from xrpl.constants import HEX_CURRENCY_REGEX, ISO_CURRENCY_REGEX -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.hash160 import Hash160 +from xahau.constants import HEX_CURRENCY_REGEX, ISO_CURRENCY_REGEX +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.hash160 import Hash160 _CURRENCY_CODE_LENGTH: Final[int] = 20 # bytes diff --git a/xrpl/core/binarycodec/types/hash.py b/xahau/core/binarycodec/types/hash.py similarity index 91% rename from xrpl/core/binarycodec/types/hash.py rename to xahau/core/binarycodec/types/hash.py index 33f5c3228..b6a3fee41 100644 --- a/xrpl/core/binarycodec/types/hash.py +++ b/xahau/core/binarycodec/types/hash.py @@ -9,9 +9,9 @@ from typing_extensions import Self -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.serialized_type import SerializedType +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.serialized_type import SerializedType class Hash(SerializedType, ABC): diff --git a/xrpl/core/binarycodec/types/hash128.py b/xahau/core/binarycodec/types/hash128.py similarity index 91% rename from xrpl/core/binarycodec/types/hash128.py rename to xahau/core/binarycodec/types/hash128.py index 788700e95..7c7efdad0 100644 --- a/xrpl/core/binarycodec/types/hash128.py +++ b/xahau/core/binarycodec/types/hash128.py @@ -10,8 +10,8 @@ from typing_extensions import Self -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.hash import Hash +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.hash import Hash class Hash128(Hash): diff --git a/xrpl/core/binarycodec/types/hash160.py b/xahau/core/binarycodec/types/hash160.py similarity index 91% rename from xrpl/core/binarycodec/types/hash160.py rename to xahau/core/binarycodec/types/hash160.py index 3faa50cf0..307546084 100644 --- a/xrpl/core/binarycodec/types/hash160.py +++ b/xahau/core/binarycodec/types/hash160.py @@ -9,7 +9,7 @@ from typing_extensions import Self -from xrpl.core.binarycodec.types.hash import Hash +from xahau.core.binarycodec.types.hash import Hash class Hash160(Hash): diff --git a/xrpl/core/binarycodec/types/hash256.py b/xahau/core/binarycodec/types/hash256.py similarity index 91% rename from xrpl/core/binarycodec/types/hash256.py rename to xahau/core/binarycodec/types/hash256.py index c5bd6ffad..c9c721dcc 100644 --- a/xrpl/core/binarycodec/types/hash256.py +++ b/xahau/core/binarycodec/types/hash256.py @@ -10,7 +10,7 @@ from typing_extensions import Self -from xrpl.core.binarycodec.types.hash import Hash +from xahau.core.binarycodec.types.hash import Hash class Hash256(Hash): diff --git a/xrpl/core/binarycodec/types/issue.py b/xahau/core/binarycodec/types/issue.py similarity index 86% rename from xrpl/core/binarycodec/types/issue.py rename to xahau/core/binarycodec/types/issue.py index 175eca060..7a76e3925 100644 --- a/xrpl/core/binarycodec/types/issue.py +++ b/xahau/core/binarycodec/types/issue.py @@ -6,13 +6,13 @@ from typing_extensions import Self -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.account_id import AccountID -from xrpl.core.binarycodec.types.currency import Currency -from xrpl.core.binarycodec.types.serialized_type import SerializedType -from xrpl.models.currencies import XRP as XRPModel -from xrpl.models.currencies import IssuedCurrency as IssuedCurrencyModel +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.account_id import AccountID +from xahau.core.binarycodec.types.currency import Currency +from xahau.core.binarycodec.types.serialized_type import SerializedType +from xahau.models.currencies import XRP as XRPModel +from xahau.models.currencies import IssuedCurrency as IssuedCurrencyModel class Issue(SerializedType): diff --git a/xrpl/core/binarycodec/types/path_set.py b/xahau/core/binarycodec/types/path_set.py similarity index 96% rename from xrpl/core/binarycodec/types/path_set.py rename to xahau/core/binarycodec/types/path_set.py index 0964ff6b7..17b6248b6 100644 --- a/xrpl/core/binarycodec/types/path_set.py +++ b/xahau/core/binarycodec/types/path_set.py @@ -8,11 +8,11 @@ from typing_extensions import Final, Self -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.account_id import AccountID -from xrpl.core.binarycodec.types.currency import Currency -from xrpl.core.binarycodec.types.serialized_type import SerializedType +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.account_id import AccountID +from xahau.core.binarycodec.types.currency import Currency +from xahau.core.binarycodec.types.serialized_type import SerializedType # Constant for masking types of a PathStep _TYPE_ACCOUNT: Final[int] = 0x01 diff --git a/xrpl/core/binarycodec/types/serialized_type.py b/xahau/core/binarycodec/types/serialized_type.py similarity index 96% rename from xrpl/core/binarycodec/types/serialized_type.py rename to xahau/core/binarycodec/types/serialized_type.py index 4feb90a75..06eba281c 100644 --- a/xrpl/core/binarycodec/types/serialized_type.py +++ b/xahau/core/binarycodec/types/serialized_type.py @@ -9,7 +9,7 @@ if TYPE_CHECKING: # To prevent a circular dependency. - from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser + from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser class SerializedType(ABC): diff --git a/xrpl/core/binarycodec/types/st_array.py b/xahau/core/binarycodec/types/st_array.py similarity index 91% rename from xrpl/core/binarycodec/types/st_array.py rename to xahau/core/binarycodec/types/st_array.py index c5af28228..79dd81b13 100644 --- a/xrpl/core/binarycodec/types/st_array.py +++ b/xahau/core/binarycodec/types/st_array.py @@ -8,10 +8,10 @@ from typing_extensions import Final, Self -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.serialized_type import SerializedType -from xrpl.core.binarycodec.types.st_object import STObject +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.serialized_type import SerializedType +from xahau.core.binarycodec.types.st_object import STObject _ARRAY_END_MARKER: Final[bytes] = bytes([0xF1]) _ARRAY_END_MARKER_NAME: Final[str] = "ArrayEndMarker" diff --git a/xrpl/core/binarycodec/types/st_object.py b/xahau/core/binarycodec/types/st_object.py similarity index 93% rename from xrpl/core/binarycodec/types/st_object.py rename to xahau/core/binarycodec/types/st_object.py index 272ce19e5..39af0825d 100644 --- a/xrpl/core/binarycodec/types/st_object.py +++ b/xahau/core/binarycodec/types/st_object.py @@ -6,9 +6,9 @@ from typing_extensions import Final, Self -from xrpl.core.addresscodec import is_valid_xaddress, xaddress_to_classic_address -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.definitions import ( +from xahau.core.addresscodec import is_valid_xaddress, xaddress_to_classic_address +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.definitions import ( FieldInstance, get_field_instance, get_ledger_entry_type_code, @@ -18,8 +18,8 @@ get_transaction_type_code, get_transaction_type_name, ) -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.serialized_type import SerializedType +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.serialized_type import SerializedType _OBJECT_END_MARKER_BYTE: Final[bytes] = bytes([0xE1]) _OBJECT_END_MARKER: Final[str] = "ObjectEndMarker" @@ -99,7 +99,7 @@ def from_parser( Returns: The STObject constructed from parser. """ - from xrpl.core.binarycodec.binary_wrappers.binary_serializer import ( + from xahau.core.binarycodec.binary_wrappers.binary_serializer import ( BinarySerializer, ) @@ -135,7 +135,7 @@ def from_value( XRPLBinaryCodecException: If the STObject can't be constructed from value. """ - from xrpl.core.binarycodec.binary_wrappers.binary_serializer import ( + from xahau.core.binarycodec.binary_wrappers.binary_serializer import ( BinarySerializer, ) diff --git a/xrpl/core/binarycodec/types/uint.py b/xahau/core/binarycodec/types/uint.py similarity index 95% rename from xrpl/core/binarycodec/types/uint.py rename to xahau/core/binarycodec/types/uint.py index adaf8a92c..c4878a39a 100644 --- a/xrpl/core/binarycodec/types/uint.py +++ b/xahau/core/binarycodec/types/uint.py @@ -8,8 +8,8 @@ from typing_extensions import Self -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.serialized_type import SerializedType +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.serialized_type import SerializedType class UInt(SerializedType): diff --git a/xrpl/core/binarycodec/types/uint16.py b/xahau/core/binarycodec/types/uint16.py similarity index 90% rename from xrpl/core/binarycodec/types/uint16.py rename to xahau/core/binarycodec/types/uint16.py index 1f65f0f61..383c7281d 100644 --- a/xrpl/core/binarycodec/types/uint16.py +++ b/xahau/core/binarycodec/types/uint16.py @@ -8,9 +8,9 @@ from typing_extensions import Final, Self -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.uint import UInt +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.uint import UInt _WIDTH: Final[int] = 2 # 16 / 8 diff --git a/xrpl/core/binarycodec/types/uint32.py b/xahau/core/binarycodec/types/uint32.py similarity index 91% rename from xrpl/core/binarycodec/types/uint32.py rename to xahau/core/binarycodec/types/uint32.py index cc1d34d98..90b399352 100644 --- a/xrpl/core/binarycodec/types/uint32.py +++ b/xahau/core/binarycodec/types/uint32.py @@ -8,9 +8,9 @@ from typing_extensions import Final, Self -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.uint import UInt +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.uint import UInt _WIDTH: Final[int] = 4 # 32 / 8 diff --git a/xrpl/core/binarycodec/types/uint64.py b/xahau/core/binarycodec/types/uint64.py similarity index 92% rename from xrpl/core/binarycodec/types/uint64.py rename to xahau/core/binarycodec/types/uint64.py index ba7f42118..bede22e51 100644 --- a/xrpl/core/binarycodec/types/uint64.py +++ b/xahau/core/binarycodec/types/uint64.py @@ -10,9 +10,9 @@ from typing_extensions import Final, Self -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.uint import UInt +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.uint import UInt _WIDTH: Final[int] = 8 # 64 / 8 diff --git a/xrpl/core/binarycodec/types/uint8.py b/xahau/core/binarycodec/types/uint8.py similarity index 89% rename from xrpl/core/binarycodec/types/uint8.py rename to xahau/core/binarycodec/types/uint8.py index 6e7634be4..21cbde195 100644 --- a/xrpl/core/binarycodec/types/uint8.py +++ b/xahau/core/binarycodec/types/uint8.py @@ -9,9 +9,9 @@ from typing_extensions import Final, Self -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.uint import UInt +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.uint import UInt _WIDTH: Final[int] = 1 # 8 / 8 diff --git a/xrpl/core/binarycodec/types/vector256.py b/xahau/core/binarycodec/types/vector256.py similarity index 90% rename from xrpl/core/binarycodec/types/vector256.py rename to xahau/core/binarycodec/types/vector256.py index ca7089f12..688c2461c 100644 --- a/xrpl/core/binarycodec/types/vector256.py +++ b/xahau/core/binarycodec/types/vector256.py @@ -6,10 +6,10 @@ from typing_extensions import Final, Self -from xrpl.core.binarycodec import XRPLBinaryCodecException -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.types.hash256 import Hash256 -from xrpl.core.binarycodec.types.serialized_type import SerializedType +from xahau.core.binarycodec import XRPLBinaryCodecException +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.types.hash256 import Hash256 +from xahau.core.binarycodec.types.serialized_type import SerializedType _HASH_LENGTH_BYTES: Final[int] = 32 diff --git a/xrpl/core/binarycodec/types/xchain_bridge.py b/xahau/core/binarycodec/types/xchain_bridge.py similarity index 90% rename from xrpl/core/binarycodec/types/xchain_bridge.py rename to xahau/core/binarycodec/types/xchain_bridge.py index e22e35ccd..e4a6e704a 100644 --- a/xrpl/core/binarycodec/types/xchain_bridge.py +++ b/xahau/core/binarycodec/types/xchain_bridge.py @@ -6,11 +6,11 @@ from typing_extensions import Self -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.exceptions import XRPLBinaryCodecException -from xrpl.core.binarycodec.types.account_id import AccountID -from xrpl.core.binarycodec.types.issue import Issue -from xrpl.core.binarycodec.types.serialized_type import SerializedType +from xahau.core.binarycodec.binary_wrappers.binary_parser import BinaryParser +from xahau.core.binarycodec.exceptions import XRPLBinaryCodecException +from xahau.core.binarycodec.types.account_id import AccountID +from xahau.core.binarycodec.types.issue import Issue +from xahau.core.binarycodec.types.serialized_type import SerializedType _TYPE_ORDER: List[Tuple[str, Type[SerializedType]]] = [ ("LockingChainDoor", AccountID), diff --git a/xrpl/core/keypairs/__init__.py b/xahau/core/keypairs/__init__.py similarity index 76% rename from xrpl/core/keypairs/__init__.py rename to xahau/core/keypairs/__init__.py index 5ebf2306f..943d0c558 100644 --- a/xrpl/core/keypairs/__init__.py +++ b/xahau/core/keypairs/__init__.py @@ -2,8 +2,8 @@ Low-level functions for creating and using cryptographic keys with the XRP Ledger. """ -from xrpl.core.keypairs.exceptions import XRPLKeypairsException -from xrpl.core.keypairs.main import ( +from xahau.core.keypairs.exceptions import XRPLKeypairsException +from xahau.core.keypairs.main import ( derive_classic_address, derive_keypair, generate_seed, diff --git a/xrpl/core/keypairs/crypto_implementation.py b/xahau/core/keypairs/crypto_implementation.py similarity index 100% rename from xrpl/core/keypairs/crypto_implementation.py rename to xahau/core/keypairs/crypto_implementation.py diff --git a/xrpl/core/keypairs/ed25519.py b/xahau/core/keypairs/ed25519.py similarity index 94% rename from xrpl/core/keypairs/ed25519.py rename to xahau/core/keypairs/ed25519.py index 1e664dd79..52c2a10b2 100644 --- a/xrpl/core/keypairs/ed25519.py +++ b/xahau/core/keypairs/ed25519.py @@ -10,9 +10,9 @@ from ecpy.keys import ECPrivateKey, ECPublicKey # type: ignore from typing_extensions import Final, Self -from xrpl.core.keypairs.crypto_implementation import CryptoImplementation -from xrpl.core.keypairs.exceptions import XRPLKeypairsException -from xrpl.core.keypairs.helpers import sha512_first_half +from xahau.core.keypairs.crypto_implementation import CryptoImplementation +from xahau.core.keypairs.exceptions import XRPLKeypairsException +from xahau.core.keypairs.helpers import sha512_first_half PREFIX: Final[str] = "ED" _CURVE: Final[Curve] = Curve.get_curve("Ed25519") diff --git a/xrpl/core/keypairs/exceptions.py b/xahau/core/keypairs/exceptions.py similarity index 77% rename from xrpl/core/keypairs/exceptions.py rename to xahau/core/keypairs/exceptions.py index 9ddd4dea6..a74124425 100644 --- a/xrpl/core/keypairs/exceptions.py +++ b/xahau/core/keypairs/exceptions.py @@ -1,5 +1,5 @@ """XRPL keypair codec exceptions.""" -from xrpl.constants import XRPLException +from xahau.constants import XRPLException class XRPLKeypairsException(XRPLException): diff --git a/xrpl/core/keypairs/helpers.py b/xahau/core/keypairs/helpers.py similarity index 92% rename from xrpl/core/keypairs/helpers.py rename to xahau/core/keypairs/helpers.py index b49fc0fb7..9bf382303 100644 --- a/xrpl/core/keypairs/helpers.py +++ b/xahau/core/keypairs/helpers.py @@ -1,4 +1,4 @@ -"""Miscellaneous functions that are private to xrpl.core.keypairs.""" +"""Miscellaneous functions that are private to xahau.core.keypairs.""" import hashlib import Crypto.Hash.RIPEMD160 as RIPEMD160 diff --git a/xrpl/core/keypairs/main.py b/xahau/core/keypairs/main.py similarity index 89% rename from xrpl/core/keypairs/main.py rename to xahau/core/keypairs/main.py index 7eae73c52..31c2d821c 100644 --- a/xrpl/core/keypairs/main.py +++ b/xahau/core/keypairs/main.py @@ -4,14 +4,14 @@ from typing_extensions import Final -from xrpl.constants import CryptoAlgorithm -from xrpl.core import addresscodec -from xrpl.core.keypairs.crypto_implementation import CryptoImplementation -from xrpl.core.keypairs.ed25519 import ED25519 -from xrpl.core.keypairs.ed25519 import PREFIX as ED_PREFIX -from xrpl.core.keypairs.exceptions import XRPLKeypairsException -from xrpl.core.keypairs.helpers import get_account_id -from xrpl.core.keypairs.secp256k1 import SECP256K1 +from xahau.constants import CryptoAlgorithm +from xahau.core import addresscodec +from xahau.core.keypairs.crypto_implementation import CryptoImplementation +from xahau.core.keypairs.ed25519 import ED25519 +from xahau.core.keypairs.ed25519 import PREFIX as ED_PREFIX +from xahau.core.keypairs.exceptions import XRPLKeypairsException +from xahau.core.keypairs.helpers import get_account_id +from xahau.core.keypairs.secp256k1 import SECP256K1 _VERIFICATION_MESSAGE: Final[bytes] = b"This test message should verify." @@ -56,7 +56,7 @@ def derive_keypair( Args: seed: Seed to derive the key pair from. Use - :func:`generate_seed() ` to generate an + :func:`generate_seed() ` to generate an appropriate value. validator: Whether the keypair is a validator keypair. algorithm: The algorithm used to encode the keys. Inferred from the seed if not diff --git a/xrpl/core/keypairs/py.typed b/xahau/core/keypairs/py.typed similarity index 100% rename from xrpl/core/keypairs/py.typed rename to xahau/core/keypairs/py.typed diff --git a/xrpl/core/keypairs/secp256k1.py b/xahau/core/keypairs/secp256k1.py similarity index 97% rename from xrpl/core/keypairs/secp256k1.py rename to xahau/core/keypairs/secp256k1.py index c3e06331d..e88545664 100644 --- a/xrpl/core/keypairs/secp256k1.py +++ b/xahau/core/keypairs/secp256k1.py @@ -14,9 +14,9 @@ from ecpy.keys import ECPrivateKey, ECPublicKey # type: ignore from typing_extensions import Final, Literal, Self -from xrpl.core.keypairs.crypto_implementation import CryptoImplementation -from xrpl.core.keypairs.exceptions import XRPLKeypairsException -from xrpl.core.keypairs.helpers import sha512_first_half +from xahau.core.keypairs.crypto_implementation import CryptoImplementation +from xahau.core.keypairs.exceptions import XRPLKeypairsException +from xahau.core.keypairs.helpers import sha512_first_half _CURVE: Final[Curve] = Curve.get_curve("secp256k1") _GROUP_ORDER: Final[int] = _CURVE.order diff --git a/xrpl/core/py.typed b/xahau/core/py.typed similarity index 100% rename from xrpl/core/py.typed rename to xahau/core/py.typed diff --git a/xrpl/ledger/__init__.py b/xahau/ledger/__init__.py similarity index 89% rename from xrpl/ledger/__init__.py rename to xahau/ledger/__init__.py index 756e1797d..0a4dd858d 100644 --- a/xrpl/ledger/__init__.py +++ b/xahau/ledger/__init__.py @@ -1,5 +1,5 @@ """Methods for obtaining information about the status of the XRP Ledger.""" -from xrpl.ledger.main import ( +from xahau.ledger.main import ( get_fee, get_latest_open_ledger_sequence, get_latest_validated_ledger_sequence, diff --git a/xrpl/ledger/main.py b/xahau/ledger/main.py similarity index 96% rename from xrpl/ledger/main.py rename to xahau/ledger/main.py index 37a6b9673..7069b1967 100644 --- a/xrpl/ledger/main.py +++ b/xahau/ledger/main.py @@ -3,8 +3,8 @@ import asyncio from typing import Optional -from xrpl.asyncio.ledger import main -from xrpl.clients.sync_client import SyncClient +from xahau.asyncio.ledger import main +from xahau.clients.sync_client import SyncClient def get_latest_validated_ledger_sequence(client: SyncClient) -> int: diff --git a/xrpl/ledger/py.typed b/xahau/ledger/py.typed similarity index 100% rename from xrpl/ledger/py.typed rename to xahau/ledger/py.typed diff --git a/xahau/models/__init__.py b/xahau/models/__init__.py new file mode 100644 index 000000000..8bf12ea8c --- /dev/null +++ b/xahau/models/__init__.py @@ -0,0 +1,30 @@ +"""Top-level exports for the models package.""" +from xahau.models import amounts, currencies, requests, transactions +from xahau.models.amounts import * # noqa: F401, F403 +from xahau.models.auth_account import AuthAccount +from xahau.models.currencies import * # noqa: F401, F403 +from xahau.models.exceptions import XRPLModelException +from xahau.models.path import Path, PathStep +from xahau.models.requests import * # noqa: F401, F403 +from xahau.models.response import Response +from xahau.models.transactions import * # noqa: F401, F403 +from xahau.models.transactions.pseudo_transactions import * # noqa: F401, F403 +from xahau.models.xchain_bridge import XChainBridge + +__all__ = [ + "XRPLModelException", + "amounts", + *amounts.__all__, + "AuthAccount", + "currencies", + *currencies.__all__, + "requests", + *requests.__all__, + "transactions", + *transactions.__all__, + *transactions.pseudo_transactions.__all__, + "Path", + "PathStep", + "Response", + "XChainBridge", +] diff --git a/xrpl/models/amounts/__init__.py b/xahau/models/amounts/__init__.py similarity index 76% rename from xrpl/models/amounts/__init__.py rename to xahau/models/amounts/__init__.py index 1f1b5aa73..77ad91df6 100644 --- a/xrpl/models/amounts/__init__.py +++ b/xahau/models/amounts/__init__.py @@ -3,13 +3,13 @@ of that currency, and the counterparty (issuer) on the trustline that holds the value. For XRP, there is no counterparty. """ -from xrpl.models.amounts.amount import ( +from xahau.models.amounts.amount import ( Amount, get_amount_value, is_issued_currency, is_xrp, ) -from xrpl.models.amounts.issued_currency_amount import IssuedCurrencyAmount +from xahau.models.amounts.issued_currency_amount import IssuedCurrencyAmount __all__ = [ "Amount", diff --git a/xrpl/models/amounts/amount.py b/xahau/models/amounts/amount.py similarity index 94% rename from xrpl/models/amounts/amount.py rename to xahau/models/amounts/amount.py index 4b06933c1..e15b916fc 100644 --- a/xrpl/models/amounts/amount.py +++ b/xahau/models/amounts/amount.py @@ -5,7 +5,7 @@ """ from typing import Union, cast -from xrpl.models.amounts.issued_currency_amount import IssuedCurrencyAmount +from xahau.models.amounts.issued_currency_amount import IssuedCurrencyAmount Amount = Union[IssuedCurrencyAmount, str] diff --git a/xrpl/models/amounts/issued_currency_amount.py b/xahau/models/amounts/issued_currency_amount.py similarity index 88% rename from xrpl/models/amounts/issued_currency_amount.py rename to xahau/models/amounts/issued_currency_amount.py index 5d472f1e6..b278fcb60 100644 --- a/xrpl/models/amounts/issued_currency_amount.py +++ b/xahau/models/amounts/issued_currency_amount.py @@ -11,9 +11,9 @@ from typing_extensions import Self -from xrpl.models.currencies import IssuedCurrency -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.currencies import IssuedCurrency +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/amounts/py.typed b/xahau/models/amounts/py.typed similarity index 100% rename from xrpl/models/amounts/py.typed rename to xahau/models/amounts/py.typed diff --git a/xrpl/models/auth_account.py b/xahau/models/auth_account.py similarity index 71% rename from xrpl/models/auth_account.py rename to xahau/models/auth_account.py index e03393f41..12f6e54d3 100644 --- a/xrpl/models/auth_account.py +++ b/xahau/models/auth_account.py @@ -3,9 +3,9 @@ from dataclasses import dataclass -from xrpl.models.nested_model import NestedModel -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.nested_model import NestedModel +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/base_model.py b/xahau/models/base_model.py similarity index 98% rename from xrpl/models/base_model.py rename to xahau/models/base_model.py index 84c0416fc..1898b9d52 100644 --- a/xrpl/models/base_model.py +++ b/xahau/models/base_model.py @@ -11,9 +11,9 @@ from typing_extensions import Final, Literal, Self, get_args, get_origin -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.required import REQUIRED -from xrpl.models.types import XRPL_VALUE_TYPE +from xahau.models.exceptions import XRPLModelException +from xahau.models.required import REQUIRED +from xahau.models.types import XRPL_VALUE_TYPE _PASCAL_OR_CAMEL_CASE: Final[Pattern[str]] = re.compile("^[A-Za-z]+(?:[A-Za-z0-9]+)*$") # this regex splits words based on one of three cases: diff --git a/xrpl/models/currencies/__init__.py b/xahau/models/currencies/__init__.py similarity index 55% rename from xrpl/models/currencies/__init__.py rename to xahau/models/currencies/__init__.py index 256b2b203..c5915e14a 100644 --- a/xrpl/models/currencies/__init__.py +++ b/xahau/models/currencies/__init__.py @@ -3,9 +3,9 @@ currencies. Both types have high precision, although their formats are different. """ -from xrpl.models.currencies.currency import Currency -from xrpl.models.currencies.issued_currency import IssuedCurrency -from xrpl.models.currencies.xrp import XRP +from xahau.models.currencies.currency import Currency +from xahau.models.currencies.issued_currency import IssuedCurrency +from xahau.models.currencies.xrp import XRP __all__ = [ "Currency", diff --git a/xrpl/models/currencies/currency.py b/xahau/models/currencies/currency.py similarity index 65% rename from xrpl/models/currencies/currency.py rename to xahau/models/currencies/currency.py index 1c665ff72..025fe99b9 100644 --- a/xrpl/models/currencies/currency.py +++ b/xahau/models/currencies/currency.py @@ -5,7 +5,7 @@ """ from typing import Union -from xrpl.models.currencies.issued_currency import IssuedCurrency -from xrpl.models.currencies.xrp import XRP +from xahau.models.currencies.issued_currency import IssuedCurrency +from xahau.models.currencies.xrp import XRP Currency = Union[IssuedCurrency, XRP] diff --git a/xrpl/models/currencies/issued_currency.py b/xahau/models/currencies/issued_currency.py similarity index 81% rename from xrpl/models/currencies/issued_currency.py rename to xahau/models/currencies/issued_currency.py index 79067f7b4..b9b1ce8f2 100644 --- a/xrpl/models/currencies/issued_currency.py +++ b/xahau/models/currencies/issued_currency.py @@ -12,11 +12,11 @@ from typing_extensions import Self -import xrpl.models.amounts # not a direct import, to get around circular imports -from xrpl.constants import HEX_CURRENCY_REGEX, ISO_CURRENCY_REGEX -from xrpl.models.base_model import BaseModel -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +import xahau.models.amounts # not a direct import, to get around circular imports +from xahau.constants import HEX_CURRENCY_REGEX, ISO_CURRENCY_REGEX +from xahau.models.base_model import BaseModel +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init def _is_valid_currency(candidate: str) -> bool: @@ -60,7 +60,7 @@ def _get_errors(self: Self) -> Dict[str, str]: def to_amount( self: Self, value: Union[str, int, float] - ) -> xrpl.models.amounts.IssuedCurrencyAmount: + ) -> xahau.models.amounts.IssuedCurrencyAmount: """ Converts an IssuedCurrency to an IssuedCurrencyAmount. @@ -71,6 +71,6 @@ def to_amount( An IssuedCurrencyAmount that represents the issued currency and the provided value. """ - return xrpl.models.amounts.IssuedCurrencyAmount( + return xahau.models.amounts.IssuedCurrencyAmount( currency=self.currency, issuer=self.issuer, value=str(value) ) diff --git a/xrpl/models/currencies/py.typed b/xahau/models/currencies/py.typed similarity index 100% rename from xrpl/models/currencies/py.typed rename to xahau/models/currencies/py.typed diff --git a/xrpl/models/currencies/xrp.py b/xahau/models/currencies/xrp.py similarity index 92% rename from xrpl/models/currencies/xrp.py rename to xahau/models/currencies/xrp.py index f83cfad81..60851d3a6 100644 --- a/xrpl/models/currencies/xrp.py +++ b/xahau/models/currencies/xrp.py @@ -16,9 +16,9 @@ from typing_extensions import Self -from xrpl.models.base_model import BaseModel -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.base_model import BaseModel +from xahau.models.exceptions import XRPLModelException +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init @@ -75,7 +75,7 @@ def to_amount(self: Self, value: Union[str, int, float]) -> str: A string representation of XRP amount. """ # import needed here to avoid circular dependency - from xrpl.utils.xrp_conversions import xrp_to_drops + from xahau.utils.xrp_conversions import xrp_to_drops if isinstance(value, str): return xrp_to_drops(float(value)) diff --git a/xrpl/models/exceptions.py b/xahau/models/exceptions.py similarity index 75% rename from xrpl/models/exceptions.py rename to xahau/models/exceptions.py index 2982d3027..436fad033 100644 --- a/xrpl/models/exceptions.py +++ b/xahau/models/exceptions.py @@ -1,5 +1,5 @@ """General XRPL Model Exceptions.""" -from xrpl.constants import XRPLException +from xahau.constants import XRPLException class XRPLModelException(XRPLException): diff --git a/xrpl/models/flags.py b/xahau/models/flags.py similarity index 92% rename from xrpl/models/flags.py rename to xahau/models/flags.py index 67662b8f0..81799a7ac 100644 --- a/xrpl/models/flags.py +++ b/xahau/models/flags.py @@ -5,9 +5,11 @@ from typing_extensions import TypedDict -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.transactions.types.pseudo_transaction_type import PseudoTransactionType -from xrpl.models.transactions.types.transaction_type import TransactionType +from xahau.models.exceptions import XRPLModelException +from xahau.models.transactions.types.pseudo_transaction_type import ( + PseudoTransactionType, +) +from xahau.models.transactions.types.transaction_type import TransactionType class FlagInterface(TypedDict): @@ -34,7 +36,7 @@ def interface_to_flag_list( List[int]: A list of flags expressed as integers. """ - from xrpl.models import transactions # Avoid circular dependencies + from xahau.models import transactions # Avoid circular dependencies # Get all exported classes with names of the form `{TxType}Flag` # These are all the flag value enums for transactions/pseudo-transactions diff --git a/xrpl/models/nested_model.py b/xahau/models/nested_model.py similarity index 97% rename from xrpl/models/nested_model.py rename to xahau/models/nested_model.py index 96a400e5e..30e3e81dc 100644 --- a/xrpl/models/nested_model.py +++ b/xahau/models/nested_model.py @@ -6,7 +6,7 @@ from typing_extensions import Self -from xrpl.models.base_model import BaseModel, _key_to_json +from xahau.models.base_model import BaseModel, _key_to_json def _get_nested_name(cls: Union[NestedModel, Type[NestedModel]]) -> str: diff --git a/xrpl/models/path.py b/xahau/models/path.py similarity index 94% rename from xrpl/models/path.py rename to xahau/models/path.py index e1671c85c..54ee3ddec 100644 --- a/xrpl/models/path.py +++ b/xahau/models/path.py @@ -10,8 +10,8 @@ from typing_extensions import Self -from xrpl.models.base_model import BaseModel -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.base_model import BaseModel +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/py.typed b/xahau/models/py.typed similarity index 100% rename from xrpl/models/py.typed rename to xahau/models/py.typed diff --git a/xahau/models/requests/__init__.py b/xahau/models/requests/__init__.py new file mode 100644 index 000000000..38ec7a8a1 --- /dev/null +++ b/xahau/models/requests/__init__.py @@ -0,0 +1,111 @@ +"""Request models.""" + +from xahau.models.auth_account import AuthAccount +from xahau.models.path import PathStep +from xahau.models.requests.account_channels import AccountChannels +from xahau.models.requests.account_currencies import AccountCurrencies +from xahau.models.requests.account_info import AccountInfo +from xahau.models.requests.account_lines import AccountLines +from xahau.models.requests.account_nfts import AccountNFTs +from xahau.models.requests.account_objects import AccountObjects, AccountObjectType +from xahau.models.requests.account_offers import AccountOffers +from xahau.models.requests.account_tx import AccountTx +from xahau.models.requests.amm_info import AMMInfo +from xahau.models.requests.book_offers import BookOffers +from xahau.models.requests.channel_authorize import ChannelAuthorize +from xahau.models.requests.channel_verify import ChannelVerify +from xahau.models.requests.deposit_authorized import DepositAuthorized +from xahau.models.requests.feature import Feature +from xahau.models.requests.fee import Fee +from xahau.models.requests.gateway_balances import GatewayBalances +from xahau.models.requests.generic_request import GenericRequest +from xahau.models.requests.get_aggregate_price import GetAggregatePrice +from xahau.models.requests.ledger import Ledger +from xahau.models.requests.ledger_closed import LedgerClosed +from xahau.models.requests.ledger_current import LedgerCurrent +from xahau.models.requests.ledger_data import LedgerData +from xahau.models.requests.ledger_entry import LedgerEntry, LedgerEntryType +from xahau.models.requests.manifest import Manifest +from xahau.models.requests.nft_buy_offers import NFTBuyOffers +from xahau.models.requests.nft_history import NFTHistory +from xahau.models.requests.nft_info import NFTInfo +from xahau.models.requests.nft_sell_offers import NFTSellOffers +from xahau.models.requests.nfts_by_issuer import NFTsByIssuer +from xahau.models.requests.no_ripple_check import NoRippleCheck, NoRippleCheckRole +from xahau.models.requests.path_find import PathFind, PathFindSubcommand +from xahau.models.requests.ping import Ping +from xahau.models.requests.random import Random +from xahau.models.requests.request import Request +from xahau.models.requests.ripple_path_find import RipplePathFind +from xahau.models.requests.server_definitions import ServerDefinitions +from xahau.models.requests.server_info import ServerInfo +from xahau.models.requests.server_state import ServerState +from xahau.models.requests.sign import Sign +from xahau.models.requests.sign_and_submit import SignAndSubmit +from xahau.models.requests.sign_for import SignFor +from xahau.models.requests.submit import Submit +from xahau.models.requests.submit_multisigned import SubmitMultisigned +from xahau.models.requests.submit_only import SubmitOnly +from xahau.models.requests.subscribe import StreamParameter, Subscribe, SubscribeBook +from xahau.models.requests.transaction_entry import TransactionEntry +from xahau.models.requests.tx import Tx +from xahau.models.requests.unsubscribe import Unsubscribe + +__all__ = [ + "AccountChannels", + "AccountCurrencies", + "AccountInfo", + "AccountLines", + "AccountNFTs", + "AccountObjects", + "AccountObjectType", + "AccountOffers", + "AccountTx", + "AMMInfo", + "AuthAccount", + "BookOffers", + "ChannelAuthorize", + "ChannelVerify", + "DepositAuthorized", + "Feature", + "Fee", + "GatewayBalances", + "GenericRequest", + "GetAggregatePrice", + "Ledger", + "LedgerClosed", + "LedgerCurrent", + "LedgerData", + "LedgerEntry", + "LedgerEntryType", + "Manifest", + "NFTBuyOffers", + "NFTSellOffers", + "NFTInfo", + "NFTHistory", + "NFTsByIssuer", + "NoRippleCheck", + "NoRippleCheckRole", + "PathFind", + "PathFindSubcommand", + "PathStep", + "Ping", + "Random", + "Request", + "RipplePathFind", + "ServerDefinitions", + "ServerInfo", + "ServerState", + "Sign", + "SignAndSubmit", + "SignFor", + "Submit", + "SubmitMultisigned", + "SubmitOnly", + "StreamParameter", + "Subscribe", + "SubscribeBook", + "TransactionEntry", + "Tx", + "Unsubscribe", +] diff --git a/xrpl/models/requests/account_channels.py b/xahau/models/requests/account_channels.py similarity index 87% rename from xrpl/models/requests/account_channels.py rename to xahau/models/requests/account_channels.py index 9739c492e..7a4d0b41a 100644 --- a/xrpl/models/requests/account_channels.py +++ b/xahau/models/requests/account_channels.py @@ -10,9 +10,9 @@ from dataclasses import dataclass, field from typing import Any, Optional -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/account_currencies.py b/xahau/models/requests/account_currencies.py similarity index 82% rename from xrpl/models/requests/account_currencies.py rename to xahau/models/requests/account_currencies.py index 8fdb51d92..f3a759ca1 100644 --- a/xrpl/models/requests/account_currencies.py +++ b/xahau/models/requests/account_currencies.py @@ -9,9 +9,9 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/account_info.py b/xahau/models/requests/account_info.py similarity index 81% rename from xrpl/models/requests/account_info.py rename to xahau/models/requests/account_info.py index 2bd342055..b6f489ea5 100644 --- a/xrpl/models/requests/account_info.py +++ b/xahau/models/requests/account_info.py @@ -8,9 +8,9 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/account_lines.py b/xahau/models/requests/account_lines.py similarity index 85% rename from xrpl/models/requests/account_lines.py rename to xahau/models/requests/account_lines.py index ec8245748..5343aa0ba 100644 --- a/xrpl/models/requests/account_lines.py +++ b/xahau/models/requests/account_lines.py @@ -8,9 +8,9 @@ from dataclasses import dataclass, field from typing import Any, Optional -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/account_nfts.py b/xahau/models/requests/account_nfts.py similarity index 83% rename from xrpl/models/requests/account_nfts.py rename to xahau/models/requests/account_nfts.py index 01fbfda0a..8f3f3e422 100644 --- a/xrpl/models/requests/account_nfts.py +++ b/xahau/models/requests/account_nfts.py @@ -2,9 +2,9 @@ from dataclasses import dataclass, field from typing import Any, Optional -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/account_objects.py b/xahau/models/requests/account_objects.py similarity index 89% rename from xrpl/models/requests/account_objects.py rename to xahau/models/requests/account_objects.py index 321e83abf..efc79d59a 100644 --- a/xrpl/models/requests/account_objects.py +++ b/xahau/models/requests/account_objects.py @@ -10,9 +10,9 @@ from enum import Enum from typing import Any, Optional -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class AccountObjectType(str, Enum): diff --git a/xrpl/models/requests/account_offers.py b/xahau/models/requests/account_offers.py similarity index 83% rename from xrpl/models/requests/account_offers.py rename to xahau/models/requests/account_offers.py index bb5077b35..36b8fee3f 100644 --- a/xrpl/models/requests/account_offers.py +++ b/xahau/models/requests/account_offers.py @@ -7,9 +7,9 @@ from dataclasses import dataclass, field from typing import Any, Optional -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/account_tx.py b/xahau/models/requests/account_tx.py similarity index 83% rename from xrpl/models/requests/account_tx.py rename to xahau/models/requests/account_tx.py index 862074094..5640faba4 100644 --- a/xrpl/models/requests/account_tx.py +++ b/xahau/models/requests/account_tx.py @@ -7,9 +7,9 @@ from dataclasses import dataclass, field from typing import Any, Optional -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/amm_info.py b/xahau/models/requests/amm_info.py similarity index 80% rename from xrpl/models/requests/amm_info.py rename to xahau/models/requests/amm_info.py index 9c2e8a235..8298b8863 100644 --- a/xrpl/models/requests/amm_info.py +++ b/xahau/models/requests/amm_info.py @@ -4,9 +4,9 @@ from dataclasses import dataclass, field from typing import Optional -from xrpl.models.currencies import Currency -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.currencies import Currency +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/book_offers.py b/xahau/models/requests/book_offers.py similarity index 76% rename from xrpl/models/requests/book_offers.py rename to xahau/models/requests/book_offers.py index 877b3ed77..333ae29c7 100644 --- a/xrpl/models/requests/book_offers.py +++ b/xahau/models/requests/book_offers.py @@ -5,10 +5,10 @@ from dataclasses import dataclass, field from typing import Optional -from xrpl.models.currencies import Currency -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.currencies import Currency +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/channel_authorize.py b/xahau/models/requests/channel_authorize.py similarity index 92% rename from xrpl/models/requests/channel_authorize.py rename to xahau/models/requests/channel_authorize.py index 5b7304390..17e7c5cfe 100644 --- a/xrpl/models/requests/channel_authorize.py +++ b/xahau/models/requests/channel_authorize.py @@ -20,10 +20,10 @@ from typing_extensions import Self -from xrpl.constants import CryptoAlgorithm -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.constants import CryptoAlgorithm +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/channel_verify.py b/xahau/models/requests/channel_verify.py similarity index 84% rename from xrpl/models/requests/channel_verify.py rename to xahau/models/requests/channel_verify.py index 08057f00d..2130bb414 100644 --- a/xrpl/models/requests/channel_verify.py +++ b/xahau/models/requests/channel_verify.py @@ -5,9 +5,9 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/deposit_authorized.py b/xahau/models/requests/deposit_authorized.py similarity index 82% rename from xrpl/models/requests/deposit_authorized.py rename to xahau/models/requests/deposit_authorized.py index d15ec459a..ad9ee0f44 100644 --- a/xrpl/models/requests/deposit_authorized.py +++ b/xahau/models/requests/deposit_authorized.py @@ -6,9 +6,9 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/feature.py b/xahau/models/requests/feature.py similarity index 78% rename from xrpl/models/requests/feature.py rename to xahau/models/requests/feature.py index 9a37d2551..f0061d630 100644 --- a/xrpl/models/requests/feature.py +++ b/xahau/models/requests/feature.py @@ -5,8 +5,8 @@ from dataclasses import dataclass, field from typing import Optional -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/fee.py b/xahau/models/requests/fee.py similarity index 83% rename from xrpl/models/requests/fee.py rename to xahau/models/requests/fee.py index 5aaed7eb7..5d01e4144 100644 --- a/xrpl/models/requests/fee.py +++ b/xahau/models/requests/fee.py @@ -7,8 +7,8 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/gateway_balances.py b/xahau/models/requests/gateway_balances.py similarity index 81% rename from xrpl/models/requests/gateway_balances.py rename to xahau/models/requests/gateway_balances.py index 3cb49e621..be11f8a66 100644 --- a/xrpl/models/requests/gateway_balances.py +++ b/xahau/models/requests/gateway_balances.py @@ -7,9 +7,9 @@ from dataclasses import dataclass, field from typing import List, Optional, Union -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/generic_request.py b/xahau/models/requests/generic_request.py similarity index 91% rename from xrpl/models/requests/generic_request.py rename to xahau/models/requests/generic_request.py index d11b89244..0601eb6ad 100644 --- a/xrpl/models/requests/generic_request.py +++ b/xahau/models/requests/generic_request.py @@ -7,9 +7,9 @@ from typing_extensions import Self -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.exceptions import XRPLModelException +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init @@ -18,7 +18,7 @@ class GenericRequest(Request): """ A request object representing all unsupported requests. - There is no analog in rippled - this is an xrpl-py-specific model. + There is no analog in rippled - this is an xahau-py-specific model. """ method: RequestMethod = field(default=RequestMethod.GENERIC_REQUEST, init=False) diff --git a/xrpl/models/requests/get_aggregate_price.py b/xahau/models/requests/get_aggregate_price.py similarity index 87% rename from xrpl/models/requests/get_aggregate_price.py rename to xahau/models/requests/get_aggregate_price.py index 853a10ef4..43abcf873 100644 --- a/xrpl/models/requests/get_aggregate_price.py +++ b/xahau/models/requests/get_aggregate_price.py @@ -10,10 +10,10 @@ from typing_extensions import Self -from xrpl.models.requests.ledger_entry import Oracle -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import require_kwargs_on_init +from xahau.models.requests.ledger_entry import Oracle +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/ledger.py b/xahau/models/requests/ledger.py similarity index 78% rename from xrpl/models/requests/ledger.py rename to xahau/models/requests/ledger.py index de84b8a37..973b10492 100644 --- a/xrpl/models/requests/ledger.py +++ b/xahau/models/requests/ledger.py @@ -4,8 +4,8 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/ledger_closed.py b/xahau/models/requests/ledger_closed.py similarity index 80% rename from xrpl/models/requests/ledger_closed.py rename to xahau/models/requests/ledger_closed.py index 0ca61bc44..7b390a542 100644 --- a/xrpl/models/requests/ledger_closed.py +++ b/xahau/models/requests/ledger_closed.py @@ -6,8 +6,8 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/ledger_current.py b/xahau/models/requests/ledger_current.py similarity index 82% rename from xrpl/models/requests/ledger_current.py rename to xahau/models/requests/ledger_current.py index 7e718da91..ce1d7340c 100644 --- a/xrpl/models/requests/ledger_current.py +++ b/xahau/models/requests/ledger_current.py @@ -6,8 +6,8 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/ledger_data.py b/xahau/models/requests/ledger_data.py similarity index 81% rename from xrpl/models/requests/ledger_data.py rename to xahau/models/requests/ledger_data.py index 858e4bccd..3c2aebee1 100644 --- a/xrpl/models/requests/ledger_data.py +++ b/xahau/models/requests/ledger_data.py @@ -8,9 +8,9 @@ from dataclasses import dataclass, field from typing import Any, Optional -from xrpl.models.requests.ledger_entry import LedgerEntryType -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.ledger_entry import LedgerEntryType +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/ledger_entry.py b/xahau/models/requests/ledger_entry.py similarity index 96% rename from xrpl/models/requests/ledger_entry.py rename to xahau/models/requests/ledger_entry.py index 9e92650d0..ae63f1689 100644 --- a/xrpl/models/requests/ledger_entry.py +++ b/xahau/models/requests/ledger_entry.py @@ -14,11 +14,11 @@ from typing_extensions import Self -from xrpl.models.base_model import BaseModel -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init -from xrpl.models.xchain_bridge import XChainBridge +from xahau.models.base_model import BaseModel +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.xchain_bridge import XChainBridge class LedgerEntryType(str, Enum): diff --git a/xrpl/models/requests/manifest.py b/xahau/models/requests/manifest.py similarity index 79% rename from xrpl/models/requests/manifest.py rename to xahau/models/requests/manifest.py index 21363f9af..afa104f24 100644 --- a/xrpl/models/requests/manifest.py +++ b/xahau/models/requests/manifest.py @@ -6,9 +6,9 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/nft_buy_offers.py b/xahau/models/requests/nft_buy_offers.py similarity index 76% rename from xrpl/models/requests/nft_buy_offers.py rename to xahau/models/requests/nft_buy_offers.py index fb30770e4..595567c7e 100644 --- a/xrpl/models/requests/nft_buy_offers.py +++ b/xahau/models/requests/nft_buy_offers.py @@ -4,9 +4,9 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/nft_history.py b/xahau/models/requests/nft_history.py similarity index 83% rename from xrpl/models/requests/nft_history.py rename to xahau/models/requests/nft_history.py index 3d04537e9..4f92784d5 100644 --- a/xrpl/models/requests/nft_history.py +++ b/xahau/models/requests/nft_history.py @@ -5,9 +5,9 @@ from dataclasses import dataclass, field from typing import Any, Optional -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/nft_info.py b/xahau/models/requests/nft_info.py similarity index 74% rename from xrpl/models/requests/nft_info.py rename to xahau/models/requests/nft_info.py index 6389a3f9f..0f1db6099 100644 --- a/xrpl/models/requests/nft_info.py +++ b/xahau/models/requests/nft_info.py @@ -4,9 +4,9 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/nft_sell_offers.py b/xahau/models/requests/nft_sell_offers.py similarity index 76% rename from xrpl/models/requests/nft_sell_offers.py rename to xahau/models/requests/nft_sell_offers.py index 6ee22f516..5ffa2e939 100644 --- a/xrpl/models/requests/nft_sell_offers.py +++ b/xahau/models/requests/nft_sell_offers.py @@ -4,9 +4,9 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/nfts_by_issuer.py b/xahau/models/requests/nfts_by_issuer.py similarity index 80% rename from xrpl/models/requests/nfts_by_issuer.py rename to xahau/models/requests/nfts_by_issuer.py index 87af80b05..11566c6fe 100644 --- a/xrpl/models/requests/nfts_by_issuer.py +++ b/xahau/models/requests/nfts_by_issuer.py @@ -5,9 +5,9 @@ from dataclasses import dataclass, field from typing import Any, Optional -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/no_ripple_check.py b/xahau/models/requests/no_ripple_check.py similarity index 86% rename from xrpl/models/requests/no_ripple_check.py rename to xahau/models/requests/no_ripple_check.py index 1cdf7ec61..b505385d0 100644 --- a/xrpl/models/requests/no_ripple_check.py +++ b/xahau/models/requests/no_ripple_check.py @@ -9,9 +9,9 @@ from enum import Enum from typing import Optional -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class NoRippleCheckRole(str, Enum): diff --git a/xrpl/models/requests/path_find.py b/xahau/models/requests/path_find.py similarity index 94% rename from xrpl/models/requests/path_find.py rename to xahau/models/requests/path_find.py index 2a3863276..de41fe406 100644 --- a/xrpl/models/requests/path_find.py +++ b/xahau/models/requests/path_find.py @@ -32,11 +32,11 @@ from enum import Enum from typing import List, Optional -from xrpl.models.amounts import Amount -from xrpl.models.path import Path -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount +from xahau.models.path import Path +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class PathFindSubcommand(str, Enum): diff --git a/xrpl/models/requests/ping.py b/xahau/models/requests/ping.py similarity index 76% rename from xrpl/models/requests/ping.py rename to xahau/models/requests/ping.py index 25951c0a3..7b8eba01d 100644 --- a/xrpl/models/requests/ping.py +++ b/xahau/models/requests/ping.py @@ -4,8 +4,8 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/py.typed b/xahau/models/requests/py.typed similarity index 100% rename from xrpl/models/requests/py.typed rename to xahau/models/requests/py.typed diff --git a/xrpl/models/requests/random.py b/xahau/models/requests/random.py similarity index 77% rename from xrpl/models/requests/random.py rename to xahau/models/requests/random.py index a0a27197d..b7468458c 100644 --- a/xrpl/models/requests/random.py +++ b/xahau/models/requests/random.py @@ -4,8 +4,8 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/request.py b/xahau/models/requests/request.py similarity index 86% rename from xrpl/models/requests/request.py rename to xahau/models/requests/request.py index aeb731bdd..bbd1dfef2 100644 --- a/xrpl/models/requests/request.py +++ b/xahau/models/requests/request.py @@ -11,13 +11,13 @@ from typing_extensions import Final, Self -import xrpl.models.requests # bare import to get around circular dependency -from xrpl.models.base_model import BaseModel -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +import xahau.models.requests # bare import to get around circular dependency +from xahau.models.base_model import BaseModel +from xahau.models.exceptions import XRPLModelException +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init -_DEFAULT_API_VERSION: Final[int] = 2 +_DEFAULT_API_VERSION: Final[int] = 1 class RequestMethod(str, Enum): @@ -90,7 +90,7 @@ class RequestMethod(str, Enum): GET_AGGREGATE_PRICE = "get_aggregate_price" # generic unknown/unsupported request - # (there is no XRPL analog, this model is specific to xrpl-py) + # (there is no XRPL analog, this model is specific to xahau-py) GENERIC_REQUEST = "zzgeneric_request" @@ -170,23 +170,23 @@ def get_method(cls: Type[Self], method: str) -> Type[Request]: """ # special case for NoRippleCheck and NFT methods if method == RequestMethod.NO_RIPPLE_CHECK: - return xrpl.models.requests.NoRippleCheck + return xahau.models.requests.NoRippleCheck if method == RequestMethod.ACCOUNT_NFTS: - return xrpl.models.requests.AccountNFTs + return xahau.models.requests.AccountNFTs if method == RequestMethod.NFT_BUY_OFFERS: - return xrpl.models.requests.NFTBuyOffers + return xahau.models.requests.NFTBuyOffers if method == RequestMethod.NFT_SELL_OFFERS: - return xrpl.models.requests.NFTSellOffers + return xahau.models.requests.NFTSellOffers if method == RequestMethod.NFT_INFO: - return xrpl.models.requests.NFTInfo + return xahau.models.requests.NFTInfo if method == RequestMethod.NFT_HISTORY: - return xrpl.models.requests.NFTHistory + return xahau.models.requests.NFTHistory if method == RequestMethod.NFTS_BY_ISSUER: - return xrpl.models.requests.NFTsByIssuer + return xahau.models.requests.NFTsByIssuer parsed_name = "".join([word.capitalize() for word in method.split("_")]) - if parsed_name in xrpl.models.requests.__all__: - return cast(Type[Request], getattr(xrpl.models.requests, parsed_name)) - return xrpl.models.requests.GenericRequest + if parsed_name in xahau.models.requests.__all__: + return cast(Type[Request], getattr(xahau.models.requests, parsed_name)) + return xahau.models.requests.GenericRequest def to_dict(self: Self) -> Dict[str, Any]: """ diff --git a/xrpl/models/requests/ripple_path_find.py b/xahau/models/requests/ripple_path_find.py similarity index 87% rename from xrpl/models/requests/ripple_path_find.py rename to xahau/models/requests/ripple_path_find.py index 2e82ca2b2..6460ae983 100644 --- a/xrpl/models/requests/ripple_path_find.py +++ b/xahau/models/requests/ripple_path_find.py @@ -14,11 +14,11 @@ from dataclasses import dataclass, field from typing import List, Optional -from xrpl.models.amounts import Amount -from xrpl.models.currencies import Currency -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount +from xahau.models.currencies import Currency +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/server_definitions.py b/xahau/models/requests/server_definitions.py similarity index 81% rename from xrpl/models/requests/server_definitions.py rename to xahau/models/requests/server_definitions.py index b20b73123..223565a41 100644 --- a/xrpl/models/requests/server_definitions.py +++ b/xahau/models/requests/server_definitions.py @@ -6,8 +6,8 @@ from dataclasses import dataclass, field from typing import Optional -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/server_info.py b/xahau/models/requests/server_info.py similarity index 79% rename from xrpl/models/requests/server_info.py rename to xahau/models/requests/server_info.py index cb8f6a36b..08c13fd16 100644 --- a/xrpl/models/requests/server_info.py +++ b/xahau/models/requests/server_info.py @@ -5,8 +5,8 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/server_state.py b/xahau/models/requests/server_state.py similarity index 88% rename from xrpl/models/requests/server_state.py rename to xahau/models/requests/server_state.py index e2e1296b9..c4d5f3fb1 100644 --- a/xrpl/models/requests/server_state.py +++ b/xahau/models/requests/server_state.py @@ -10,8 +10,8 @@ """ from dataclasses import dataclass, field -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/sign.py b/xahau/models/requests/sign.py similarity index 93% rename from xrpl/models/requests/sign.py rename to xahau/models/requests/sign.py index 3b18041f5..056f53283 100644 --- a/xrpl/models/requests/sign.py +++ b/xahau/models/requests/sign.py @@ -22,11 +22,11 @@ from typing_extensions import Self -from xrpl.constants import CryptoAlgorithm -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.constants import CryptoAlgorithm +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/sign_and_submit.py b/xahau/models/requests/sign_and_submit.py similarity index 94% rename from xrpl/models/requests/sign_and_submit.py rename to xahau/models/requests/sign_and_submit.py index bae4d1805..2a2f6431c 100644 --- a/xrpl/models/requests/sign_and_submit.py +++ b/xahau/models/requests/sign_and_submit.py @@ -27,11 +27,11 @@ from typing_extensions import Self -from xrpl.constants import CryptoAlgorithm -from xrpl.models.requests.submit import Submit -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.constants import CryptoAlgorithm +from xahau.models.requests.submit import Submit +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/sign_for.py b/xahau/models/requests/sign_for.py similarity index 91% rename from xrpl/models/requests/sign_for.py rename to xahau/models/requests/sign_for.py index 5c6c17486..33e08f9bd 100644 --- a/xrpl/models/requests/sign_for.py +++ b/xahau/models/requests/sign_for.py @@ -16,11 +16,11 @@ from typing_extensions import Self -from xrpl.constants import CryptoAlgorithm -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.constants import CryptoAlgorithm +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/submit.py b/xahau/models/requests/submit.py similarity index 94% rename from xrpl/models/requests/submit.py rename to xahau/models/requests/submit.py index 15751b498..311a177aa 100644 --- a/xrpl/models/requests/submit.py +++ b/xahau/models/requests/submit.py @@ -27,8 +27,8 @@ from typing_extensions import Self -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init @@ -75,7 +75,7 @@ def from_dict(cls: Type[Self], value: Dict[str, Any]) -> Self: Raises: XRPLModelException: If the dictionary provided is invalid. """ - from xrpl.models.requests import SignAndSubmit, SubmitOnly + from xahau.models.requests import SignAndSubmit, SubmitOnly if cls.__name__ == "Submit": if "tx_blob" in value: diff --git a/xrpl/models/requests/submit_multisigned.py b/xahau/models/requests/submit_multisigned.py similarity index 90% rename from xrpl/models/requests/submit_multisigned.py rename to xahau/models/requests/submit_multisigned.py index f778e7846..a217e0066 100644 --- a/xrpl/models/requests/submit_multisigned.py +++ b/xahau/models/requests/submit_multisigned.py @@ -15,10 +15,10 @@ from typing_extensions import Self -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/submit_only.py b/xahau/models/requests/submit_only.py similarity index 94% rename from xrpl/models/requests/submit_only.py rename to xahau/models/requests/submit_only.py index 2258b7e63..eda831272 100644 --- a/xrpl/models/requests/submit_only.py +++ b/xahau/models/requests/submit_only.py @@ -22,9 +22,9 @@ from dataclasses import dataclass -from xrpl.models.requests.submit import Submit -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.submit import Submit +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/subscribe.py b/xahau/models/requests/subscribe.py similarity index 87% rename from xrpl/models/requests/subscribe.py rename to xahau/models/requests/subscribe.py index 4a72c08a9..681aff127 100644 --- a/xrpl/models/requests/subscribe.py +++ b/xahau/models/requests/subscribe.py @@ -10,11 +10,11 @@ from enum import Enum from typing import List, Optional -from xrpl.models.base_model import BaseModel -from xrpl.models.currencies import Currency -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.base_model import BaseModel +from xahau.models.currencies import Currency +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class StreamParameter(str, Enum): diff --git a/xrpl/models/requests/transaction_entry.py b/xahau/models/requests/transaction_entry.py similarity index 83% rename from xrpl/models/requests/transaction_entry.py rename to xahau/models/requests/transaction_entry.py index b34b6b4c4..9eca34de4 100644 --- a/xrpl/models/requests/transaction_entry.py +++ b/xahau/models/requests/transaction_entry.py @@ -10,9 +10,9 @@ from dataclasses import dataclass, field -from xrpl.models.requests.request import LookupByLedgerRequest, Request, RequestMethod -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import LookupByLedgerRequest, Request, RequestMethod +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/tx.py b/xahau/models/requests/tx.py similarity index 94% rename from xrpl/models/requests/tx.py rename to xahau/models/requests/tx.py index 7d9ead48a..7b50010c3 100644 --- a/xrpl/models/requests/tx.py +++ b/xahau/models/requests/tx.py @@ -11,8 +11,8 @@ from typing_extensions import Self -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/requests/unsubscribe.py b/xahau/models/requests/unsubscribe.py similarity index 80% rename from xrpl/models/requests/unsubscribe.py rename to xahau/models/requests/unsubscribe.py index 045e2ed7b..83cf43dfc 100644 --- a/xrpl/models/requests/unsubscribe.py +++ b/xahau/models/requests/unsubscribe.py @@ -9,12 +9,12 @@ from dataclasses import dataclass, field from typing import List, Optional -from xrpl.models.base_model import BaseModel -from xrpl.models.currencies import Currency -from xrpl.models.requests.request import Request, RequestMethod -from xrpl.models.requests.subscribe import StreamParameter -from xrpl.models.required import REQUIRED -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.base_model import BaseModel +from xahau.models.currencies import Currency +from xahau.models.requests.request import Request, RequestMethod +from xahau.models.requests.subscribe import StreamParameter +from xahau.models.required import REQUIRED +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/required.py b/xahau/models/required.py similarity index 100% rename from xrpl/models/required.py rename to xahau/models/required.py diff --git a/xrpl/models/response.py b/xahau/models/response.py similarity index 92% rename from xrpl/models/response.py rename to xahau/models/response.py index 84e369a6f..ad0682386 100644 --- a/xrpl/models/response.py +++ b/xahau/models/response.py @@ -13,11 +13,11 @@ from typing_extensions import Self -from xrpl.models.base_model import BaseModel -from xrpl.models.required import REQUIRED -from xrpl.models.transactions import PaymentFlag -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.base_model import BaseModel +from xahau.models.required import REQUIRED +from xahau.models.transactions import PaymentFlag +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class ResponseStatus(str, Enum): diff --git a/xahau/models/transactions/__init__.py b/xahau/models/transactions/__init__.py new file mode 100644 index 000000000..11ddcccea --- /dev/null +++ b/xahau/models/transactions/__init__.py @@ -0,0 +1,166 @@ +""" +Model objects for specific `types of Transactions +`_ in the XRP Ledger. +""" + +from xahau.models.transactions.account_delete import AccountDelete +from xahau.models.transactions.account_set import ( + AccountSet, + AccountSetAsfFlag, + AccountSetFlag, + AccountSetFlagInterface, +) +from xahau.models.transactions.amm_bid import AMMBid, AuthAccount +from xahau.models.transactions.amm_create import AMMCreate +from xahau.models.transactions.amm_delete import AMMDelete +from xahau.models.transactions.amm_deposit import ( + AMMDeposit, + AMMDepositFlag, + AMMDepositFlagInterface, +) +from xahau.models.transactions.amm_vote import AMMVote +from xahau.models.transactions.amm_withdraw import ( + AMMWithdraw, + AMMWithdrawFlag, + AMMWithdrawFlagInterface, +) +from xahau.models.transactions.check_cancel import CheckCancel +from xahau.models.transactions.check_cash import CheckCash +from xahau.models.transactions.check_create import CheckCreate +from xahau.models.transactions.clawback import Clawback +from xahau.models.transactions.deposit_preauth import DepositPreauth +from xahau.models.transactions.did_delete import DIDDelete +from xahau.models.transactions.did_set import DIDSet +from xahau.models.transactions.escrow_cancel import EscrowCancel +from xahau.models.transactions.escrow_create import EscrowCreate +from xahau.models.transactions.escrow_finish import EscrowFinish +from xahau.models.transactions.metadata import TransactionMetadata +from xahau.models.transactions.nftoken_accept_offer import NFTokenAcceptOffer +from xahau.models.transactions.nftoken_burn import NFTokenBurn +from xahau.models.transactions.nftoken_cancel_offer import NFTokenCancelOffer +from xahau.models.transactions.nftoken_create_offer import ( + NFTokenCreateOffer, + NFTokenCreateOfferFlag, + NFTokenCreateOfferFlagInterface, +) +from xahau.models.transactions.nftoken_mint import ( + NFTokenMint, + NFTokenMintFlag, + NFTokenMintFlagInterface, +) +from xahau.models.transactions.offer_cancel import OfferCancel +from xahau.models.transactions.offer_create import ( + OfferCreate, + OfferCreateFlag, + OfferCreateFlagInterface, +) +from xahau.models.transactions.oracle_delete import OracleDelete +from xahau.models.transactions.oracle_set import OracleSet +from xahau.models.transactions.payment import Payment, PaymentFlag, PaymentFlagInterface +from xahau.models.transactions.payment_channel_claim import ( + PaymentChannelClaim, + PaymentChannelClaimFlag, + PaymentChannelClaimFlagInterface, +) +from xahau.models.transactions.payment_channel_create import PaymentChannelCreate +from xahau.models.transactions.payment_channel_fund import PaymentChannelFund +from xahau.models.transactions.set_regular_key import SetRegularKey +from xahau.models.transactions.signer_list_set import SignerEntry, SignerListSet +from xahau.models.transactions.ticket_create import TicketCreate +from xahau.models.transactions.transaction import Memo, Signer, Transaction +from xahau.models.transactions.trust_set import ( + TrustSet, + TrustSetFlag, + TrustSetFlagInterface, +) +from xahau.models.transactions.xchain_account_create_commit import ( + XChainAccountCreateCommit, +) +from xahau.models.transactions.xchain_add_account_create_attestation import ( + XChainAddAccountCreateAttestation, +) +from xahau.models.transactions.xchain_add_claim_attestation import ( + XChainAddClaimAttestation, +) +from xahau.models.transactions.xchain_claim import XChainClaim +from xahau.models.transactions.xchain_commit import XChainCommit +from xahau.models.transactions.xchain_create_bridge import XChainCreateBridge +from xahau.models.transactions.xchain_create_claim_id import XChainCreateClaimID +from xahau.models.transactions.xchain_modify_bridge import ( + XChainModifyBridge, + XChainModifyBridgeFlag, + XChainModifyBridgeFlagInterface, +) + +__all__ = [ + "AccountDelete", + "AccountSet", + "AccountSetAsfFlag", + "AccountSetFlag", + "AccountSetFlagInterface", + "AMMBid", + "AMMCreate", + "AMMDelete", + "AMMDeposit", + "AMMDepositFlag", + "AMMDepositFlagInterface", + "AMMVote", + "AMMWithdraw", + "AMMWithdrawFlag", + "AMMWithdrawFlagInterface", + "AuthAccount", + "CheckCancel", + "CheckCash", + "CheckCreate", + "Clawback", + "DepositPreauth", + "DIDDelete", + "DIDSet", + "EscrowCancel", + "EscrowCreate", + "EscrowFinish", + "Memo", + "NFTokenAcceptOffer", + "NFTokenBurn", + "NFTokenCancelOffer", + "NFTokenCreateOffer", + "NFTokenCreateOfferFlag", + "NFTokenCreateOfferFlagInterface", + "NFTokenMint", + "NFTokenMintFlag", + "NFTokenMintFlagInterface", + "OfferCancel", + "OfferCreate", + "OfferCreateFlag", + "OfferCreateFlagInterface", + "OracleDelete", + "OracleSet", + "Payment", + "PaymentChannelClaim", + "PaymentChannelClaimFlag", + "PaymentChannelClaimFlagInterface", + "PaymentChannelCreate", + "PaymentChannelFund", + "PaymentFlag", + "PaymentFlagInterface", + "SetRegularKey", + "Signer", + "SignerEntry", + "SignerListSet", + "TicketCreate", + "Transaction", + "TransactionMetadata", + "TrustSet", + "TrustSetFlag", + "TrustSetFlagInterface", + "XChainAccountCreateCommit", + "XChainAddAccountCreateAttestation", + "XChainAddClaimAttestation", + "XChainClaim", + "XChainCommit", + "XChainCreateBridge", + "XChainCreateClaimID", + "XChainModifyBridge", + "XChainModifyBridgeFlag", + "XChainModifyBridgeFlagInterface", +] diff --git a/xrpl/models/transactions/account_delete.py b/xahau/models/transactions/account_delete.py similarity index 82% rename from xrpl/models/transactions/account_delete.py rename to xahau/models/transactions/account_delete.py index f724a3f02..955cc33a7 100644 --- a/xrpl/models/transactions/account_delete.py +++ b/xahau/models/transactions/account_delete.py @@ -3,10 +3,10 @@ from dataclasses import dataclass, field from typing import Optional -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/account_set.py b/xahau/models/transactions/account_set.py similarity index 96% rename from xrpl/models/transactions/account_set.py rename to xahau/models/transactions/account_set.py index 3ae891641..cc34680aa 100644 --- a/xrpl/models/transactions/account_set.py +++ b/xahau/models/transactions/account_set.py @@ -8,10 +8,10 @@ from typing_extensions import Final, Self -from xrpl.models.flags import FlagInterface -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.flags import FlagInterface +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init _MAX_TRANSFER_RATE: Final[int] = 2000000000 _MIN_TRANSFER_RATE: Final[int] = 1000000000 @@ -182,7 +182,7 @@ class AccountSet(Transaction): domain: Optional[str] = None """ Set the DNS domain of the account owner. Must be hex-encoded. You can - use `xrpl.utils.str_to_hex` to convert a UTF-8 string to hex. + use `xahau.utils.str_to_hex` to convert a UTF-8 string to hex. """ email_hash: Optional[str] = None diff --git a/xrpl/models/transactions/amm_bid.py b/xahau/models/transactions/amm_bid.py similarity index 86% rename from xrpl/models/transactions/amm_bid.py rename to xahau/models/transactions/amm_bid.py index 6ba2eb22c..daa289e2e 100644 --- a/xrpl/models/transactions/amm_bid.py +++ b/xahau/models/transactions/amm_bid.py @@ -7,13 +7,13 @@ from typing_extensions import Final, Self -from xrpl.models.amounts.issued_currency_amount import IssuedCurrencyAmount -from xrpl.models.auth_account import AuthAccount -from xrpl.models.currencies import Currency -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts.issued_currency_amount import IssuedCurrencyAmount +from xahau.models.auth_account import AuthAccount +from xahau.models.currencies import Currency +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init _MAX_AUTH_ACCOUNTS: Final[int] = 4 diff --git a/xrpl/models/transactions/amm_create.py b/xahau/models/transactions/amm_create.py similarity index 90% rename from xrpl/models/transactions/amm_create.py rename to xahau/models/transactions/amm_create.py index ff8586ff4..2119b0045 100644 --- a/xrpl/models/transactions/amm_create.py +++ b/xahau/models/transactions/amm_create.py @@ -7,11 +7,11 @@ from typing_extensions import Final, Self -from xrpl.models.amounts import Amount -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init AMM_MAX_TRADING_FEE: Final[int] = 1000 diff --git a/xrpl/models/transactions/amm_delete.py b/xahau/models/transactions/amm_delete.py similarity index 83% rename from xrpl/models/transactions/amm_delete.py rename to xahau/models/transactions/amm_delete.py index 2def520b3..452d9ed55 100644 --- a/xrpl/models/transactions/amm_delete.py +++ b/xahau/models/transactions/amm_delete.py @@ -3,11 +3,11 @@ from dataclasses import dataclass, field -from xrpl.models.currencies import Currency -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.currencies import Currency +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/amm_deposit.py b/xahau/models/transactions/amm_deposit.py similarity index 88% rename from xrpl/models/transactions/amm_deposit.py rename to xahau/models/transactions/amm_deposit.py index 3bfba4a7a..fe47b92de 100644 --- a/xrpl/models/transactions/amm_deposit.py +++ b/xahau/models/transactions/amm_deposit.py @@ -8,13 +8,13 @@ from typing_extensions import Self -from xrpl.models.amounts import Amount, IssuedCurrencyAmount -from xrpl.models.currencies import Currency -from xrpl.models.flags import FlagInterface -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount, IssuedCurrencyAmount +from xahau.models.currencies import Currency +from xahau.models.flags import FlagInterface +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class AMMDepositFlag(int, Enum): diff --git a/xrpl/models/transactions/amm_vote.py b/xahau/models/transactions/amm_vote.py similarity index 83% rename from xrpl/models/transactions/amm_vote.py rename to xahau/models/transactions/amm_vote.py index 0b06b8e5e..3887fcf82 100644 --- a/xrpl/models/transactions/amm_vote.py +++ b/xahau/models/transactions/amm_vote.py @@ -7,12 +7,12 @@ from typing_extensions import Self -from xrpl.models.currencies import Currency -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.amm_create import AMM_MAX_TRADING_FEE -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.currencies import Currency +from xahau.models.required import REQUIRED +from xahau.models.transactions.amm_create import AMM_MAX_TRADING_FEE +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/amm_withdraw.py b/xahau/models/transactions/amm_withdraw.py similarity index 87% rename from xrpl/models/transactions/amm_withdraw.py rename to xahau/models/transactions/amm_withdraw.py index 19ad840ee..636bdc2c2 100644 --- a/xrpl/models/transactions/amm_withdraw.py +++ b/xahau/models/transactions/amm_withdraw.py @@ -8,13 +8,13 @@ from typing_extensions import Self -from xrpl.models.amounts import Amount, IssuedCurrencyAmount -from xrpl.models.currencies import Currency -from xrpl.models.flags import FlagInterface -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount, IssuedCurrencyAmount +from xahau.models.currencies import Currency +from xahau.models.flags import FlagInterface +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class AMMWithdrawFlag(int, Enum): diff --git a/xrpl/models/transactions/check_cancel.py b/xahau/models/transactions/check_cancel.py similarity index 79% rename from xrpl/models/transactions/check_cancel.py rename to xahau/models/transactions/check_cancel.py index ad6c960e3..d957e1090 100644 --- a/xrpl/models/transactions/check_cancel.py +++ b/xahau/models/transactions/check_cancel.py @@ -1,10 +1,10 @@ """Model for CheckCancel transaction type.""" from dataclasses import dataclass, field -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/check_cash.py b/xahau/models/transactions/check_cash.py similarity index 86% rename from xrpl/models/transactions/check_cash.py rename to xahau/models/transactions/check_cash.py index 9966e0999..506e48420 100644 --- a/xrpl/models/transactions/check_cash.py +++ b/xahau/models/transactions/check_cash.py @@ -7,11 +7,11 @@ from typing_extensions import Self -from xrpl.models.amounts import Amount -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/check_create.py b/xahau/models/transactions/check_create.py similarity index 85% rename from xrpl/models/transactions/check_create.py rename to xahau/models/transactions/check_create.py index 1ca3a296a..b7aa54bf4 100644 --- a/xrpl/models/transactions/check_create.py +++ b/xahau/models/transactions/check_create.py @@ -2,11 +2,11 @@ from dataclasses import dataclass, field from typing import Optional -from xrpl.models.amounts import Amount -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/clawback.py b/xahau/models/transactions/clawback.py similarity index 78% rename from xrpl/models/transactions/clawback.py rename to xahau/models/transactions/clawback.py index a9455bba5..9536a5606 100644 --- a/xrpl/models/transactions/clawback.py +++ b/xahau/models/transactions/clawback.py @@ -7,11 +7,11 @@ from typing_extensions import Self -from xrpl.models.amounts import IssuedCurrencyAmount, is_issued_currency, is_xrp -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import IssuedCurrencyAmount, is_issued_currency, is_xrp +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/deposit_preauth.py b/xahau/models/transactions/deposit_preauth.py similarity index 88% rename from xrpl/models/transactions/deposit_preauth.py rename to xahau/models/transactions/deposit_preauth.py index b3c94e8c7..bff1474ad 100644 --- a/xrpl/models/transactions/deposit_preauth.py +++ b/xahau/models/transactions/deposit_preauth.py @@ -7,9 +7,9 @@ from typing_extensions import Self -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/did_delete.py b/xahau/models/transactions/did_delete.py similarity index 66% rename from xrpl/models/transactions/did_delete.py rename to xahau/models/transactions/did_delete.py index 48532198e..f089ae7d4 100644 --- a/xrpl/models/transactions/did_delete.py +++ b/xahau/models/transactions/did_delete.py @@ -4,9 +4,9 @@ from dataclasses import dataclass, field -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/did_set.py b/xahau/models/transactions/did_set.py similarity index 92% rename from xrpl/models/transactions/did_set.py rename to xahau/models/transactions/did_set.py index 36f0492cb..3f4ee2578 100644 --- a/xrpl/models/transactions/did_set.py +++ b/xahau/models/transactions/did_set.py @@ -8,9 +8,9 @@ from typing_extensions import Final, Self -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init HEX_REGEX: Final[Pattern[str]] = re.compile("[a-fA-F0-9]*") diff --git a/xrpl/models/transactions/escrow_cancel.py b/xahau/models/transactions/escrow_cancel.py similarity index 78% rename from xrpl/models/transactions/escrow_cancel.py rename to xahau/models/transactions/escrow_cancel.py index c1c24c51e..c64f39b1c 100644 --- a/xrpl/models/transactions/escrow_cancel.py +++ b/xahau/models/transactions/escrow_cancel.py @@ -2,10 +2,10 @@ from dataclasses import dataclass, field -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/escrow_create.py b/xahau/models/transactions/escrow_create.py similarity index 89% rename from xrpl/models/transactions/escrow_create.py rename to xahau/models/transactions/escrow_create.py index fa170df2c..fcf26879e 100644 --- a/xrpl/models/transactions/escrow_create.py +++ b/xahau/models/transactions/escrow_create.py @@ -7,11 +7,11 @@ from typing_extensions import Self -from xrpl.models.amounts import Amount -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/escrow_finish.py b/xahau/models/transactions/escrow_finish.py similarity index 89% rename from xrpl/models/transactions/escrow_finish.py rename to xahau/models/transactions/escrow_finish.py index 130e2d5b2..5aead2795 100644 --- a/xrpl/models/transactions/escrow_finish.py +++ b/xahau/models/transactions/escrow_finish.py @@ -7,10 +7,10 @@ from typing_extensions import Self -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/metadata.py b/xahau/models/transactions/metadata.py similarity index 98% rename from xrpl/models/transactions/metadata.py rename to xahau/models/transactions/metadata.py index 76e2873dc..966fd3c0e 100644 --- a/xrpl/models/transactions/metadata.py +++ b/xahau/models/transactions/metadata.py @@ -4,7 +4,7 @@ from typing_extensions import Literal, NotRequired, TypeAlias, TypedDict, TypeGuard -from xrpl.models.amounts.amount import Amount +from xahau.models.amounts.amount import Amount class NFTokenMetadataFields(TypedDict): diff --git a/xrpl/models/transactions/nftoken_accept_offer.py b/xahau/models/transactions/nftoken_accept_offer.py similarity index 94% rename from xrpl/models/transactions/nftoken_accept_offer.py rename to xahau/models/transactions/nftoken_accept_offer.py index ea41a9301..bca3b2217 100644 --- a/xrpl/models/transactions/nftoken_accept_offer.py +++ b/xahau/models/transactions/nftoken_accept_offer.py @@ -7,10 +7,10 @@ from typing_extensions import Self -from xrpl.models.amounts import Amount, get_amount_value -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount, get_amount_value +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/nftoken_burn.py b/xahau/models/transactions/nftoken_burn.py similarity index 86% rename from xrpl/models/transactions/nftoken_burn.py rename to xahau/models/transactions/nftoken_burn.py index e98f57421..ecd2b6dc2 100644 --- a/xrpl/models/transactions/nftoken_burn.py +++ b/xahau/models/transactions/nftoken_burn.py @@ -3,10 +3,10 @@ from dataclasses import dataclass, field from typing import Optional -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/nftoken_cancel_offer.py b/xahau/models/transactions/nftoken_cancel_offer.py similarity index 88% rename from xrpl/models/transactions/nftoken_cancel_offer.py rename to xahau/models/transactions/nftoken_cancel_offer.py index ddf88e5fc..658a1ef2c 100644 --- a/xrpl/models/transactions/nftoken_cancel_offer.py +++ b/xahau/models/transactions/nftoken_cancel_offer.py @@ -7,10 +7,10 @@ from typing_extensions import Self -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/nftoken_create_offer.py b/xahau/models/transactions/nftoken_create_offer.py similarity index 92% rename from xrpl/models/transactions/nftoken_create_offer.py rename to xahau/models/transactions/nftoken_create_offer.py index a05d0df5c..04cfd2e94 100644 --- a/xrpl/models/transactions/nftoken_create_offer.py +++ b/xahau/models/transactions/nftoken_create_offer.py @@ -8,12 +8,12 @@ from typing_extensions import Self -from xrpl.models.amounts import Amount, get_amount_value -from xrpl.models.flags import FlagInterface -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount, get_amount_value +from xahau.models.flags import FlagInterface +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class NFTokenCreateOfferFlag(int, Enum): diff --git a/xrpl/models/transactions/nftoken_mint.py b/xahau/models/transactions/nftoken_mint.py similarity index 92% rename from xrpl/models/transactions/nftoken_mint.py rename to xahau/models/transactions/nftoken_mint.py index 0e3154c41..dce32705a 100644 --- a/xrpl/models/transactions/nftoken_mint.py +++ b/xahau/models/transactions/nftoken_mint.py @@ -8,11 +8,11 @@ from typing_extensions import Final, Self -from xrpl.models.flags import FlagInterface -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.flags import FlagInterface +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init _MAX_URI_LENGTH: Final[int] = 512 _MAX_TRANSFER_FEE: Final[int] = 50000 @@ -102,7 +102,7 @@ class NFTokenMint(Transaction): magnet link, immediate data encoded as an RFC2379 "data" URL, or even an opaque issuer-specific encoding. The URI is not checked for validity. - This field must be hex-encoded. You can use `xrpl.utils.str_to_hex` to + This field must be hex-encoded. You can use `xahau.utils.str_to_hex` to convert a UTF-8 string to hex. """ diff --git a/xrpl/models/transactions/offer_cancel.py b/xahau/models/transactions/offer_cancel.py similarity index 78% rename from xrpl/models/transactions/offer_cancel.py rename to xahau/models/transactions/offer_cancel.py index 492d153e4..b643933cf 100644 --- a/xrpl/models/transactions/offer_cancel.py +++ b/xahau/models/transactions/offer_cancel.py @@ -1,10 +1,10 @@ """Model for OfferCancel transaction type.""" from dataclasses import dataclass, field -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/offer_create.py b/xahau/models/transactions/offer_create.py similarity index 91% rename from xrpl/models/transactions/offer_create.py rename to xahau/models/transactions/offer_create.py index cce104c16..a09111c93 100644 --- a/xrpl/models/transactions/offer_create.py +++ b/xahau/models/transactions/offer_create.py @@ -3,12 +3,12 @@ from enum import Enum from typing import Optional -from xrpl.models.amounts import Amount -from xrpl.models.flags import FlagInterface -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount +from xahau.models.flags import FlagInterface +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class OfferCreateFlag(int, Enum): diff --git a/xrpl/models/transactions/oracle_delete.py b/xahau/models/transactions/oracle_delete.py similarity index 74% rename from xrpl/models/transactions/oracle_delete.py rename to xahau/models/transactions/oracle_delete.py index 1e8def6c0..b3c623bcf 100644 --- a/xrpl/models/transactions/oracle_delete.py +++ b/xahau/models/transactions/oracle_delete.py @@ -4,10 +4,10 @@ from dataclasses import dataclass, field -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import require_kwargs_on_init +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/oracle_set.py b/xahau/models/transactions/oracle_set.py similarity index 93% rename from xrpl/models/transactions/oracle_set.py rename to xahau/models/transactions/oracle_set.py index 17b7f0147..da2d8eabf 100644 --- a/xrpl/models/transactions/oracle_set.py +++ b/xahau/models/transactions/oracle_set.py @@ -8,11 +8,11 @@ from typing_extensions import Self -from xrpl.models.nested_model import NestedModel -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import require_kwargs_on_init +from xahau.models.nested_model import NestedModel +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import require_kwargs_on_init MAX_ORACLE_DATA_SERIES = 10 MAX_ORACLE_PROVIDER = 256 @@ -48,7 +48,7 @@ class OracleSet(Transaction): provider: Optional[str] = None """ - This field must be hex-encoded. You can use `xrpl.utils.str_to_hex` to + This field must be hex-encoded. You can use `xahau.utils.str_to_hex` to convert a UTF-8 string to hex. An arbitrary value that identifies an oracle provider, such as Chainlink, Band, or @@ -59,7 +59,7 @@ class OracleSet(Transaction): uri: Optional[str] = None """ - This field must be hex-encoded. You can use `xrpl.utils.str_to_hex` to + This field must be hex-encoded. You can use `xahau.utils.str_to_hex` to convert a UTF-8 string to hex. An optional Universal Resource Identifier to reference price data off-chain. This @@ -68,7 +68,7 @@ class OracleSet(Transaction): asset_class: Optional[str] = None """ - This field must be hex-encoded. You can use `xrpl.utils.str_to_hex` to + This field must be hex-encoded. You can use `xahau.utils.str_to_hex` to convert a UTF-8 string to hex. Describes the type of asset, such as "currency", "commodity", or "index". This diff --git a/xrpl/models/transactions/payment.py b/xahau/models/transactions/payment.py similarity index 93% rename from xrpl/models/transactions/payment.py rename to xahau/models/transactions/payment.py index 8fa8ccb6b..9dfb821b5 100644 --- a/xrpl/models/transactions/payment.py +++ b/xahau/models/transactions/payment.py @@ -8,13 +8,13 @@ from typing_extensions import Self -from xrpl.models.amounts import Amount, is_xrp -from xrpl.models.flags import FlagInterface -from xrpl.models.path import Path -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount, is_xrp +from xahau.models.flags import FlagInterface +from xahau.models.path import Path +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class PaymentFlag(int, Enum): diff --git a/xrpl/models/transactions/payment_channel_claim.py b/xahau/models/transactions/payment_channel_claim.py similarity index 92% rename from xrpl/models/transactions/payment_channel_claim.py rename to xahau/models/transactions/payment_channel_claim.py index 8e3b32c74..3ed95ada2 100644 --- a/xrpl/models/transactions/payment_channel_claim.py +++ b/xahau/models/transactions/payment_channel_claim.py @@ -3,11 +3,11 @@ from enum import Enum from typing import Optional -from xrpl.models.flags import FlagInterface -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.flags import FlagInterface +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class PaymentChannelClaimFlag(int, Enum): diff --git a/xrpl/models/transactions/payment_channel_create.py b/xahau/models/transactions/payment_channel_create.py similarity index 88% rename from xrpl/models/transactions/payment_channel_create.py rename to xahau/models/transactions/payment_channel_create.py index 5eacd574a..8bce384b4 100644 --- a/xrpl/models/transactions/payment_channel_create.py +++ b/xahau/models/transactions/payment_channel_create.py @@ -2,11 +2,11 @@ from dataclasses import dataclass, field from typing import Optional -from xrpl.models.amounts import Amount -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import Amount +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/payment_channel_fund.py b/xahau/models/transactions/payment_channel_fund.py similarity index 85% rename from xrpl/models/transactions/payment_channel_fund.py rename to xahau/models/transactions/payment_channel_fund.py index 296a23bb6..f2b9a5c8d 100644 --- a/xrpl/models/transactions/payment_channel_fund.py +++ b/xahau/models/transactions/payment_channel_fund.py @@ -2,10 +2,10 @@ from dataclasses import dataclass, field from typing import Optional -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/pseudo_transactions/__init__.py b/xahau/models/transactions/pseudo_transactions/__init__.py similarity index 60% rename from xrpl/models/transactions/pseudo_transactions/__init__.py rename to xahau/models/transactions/pseudo_transactions/__init__.py index 86757b03b..1bfb48a7c 100644 --- a/xrpl/models/transactions/pseudo_transactions/__init__.py +++ b/xahau/models/transactions/pseudo_transactions/__init__.py @@ -2,13 +2,13 @@ Model objects for specific `types of Pseudo-Transactions `_ in the XRP Ledger. """ -from xrpl.models.transactions.pseudo_transactions.enable_amendment import ( +from xahau.models.transactions.pseudo_transactions.enable_amendment import ( EnableAmendment, EnableAmendmentFlag, EnableAmendmentFlagInterface, ) -from xrpl.models.transactions.pseudo_transactions.set_fee import SetFee -from xrpl.models.transactions.pseudo_transactions.unl_modify import UNLModify +from xahau.models.transactions.pseudo_transactions.set_fee import SetFee +from xahau.models.transactions.pseudo_transactions.unl_modify import UNLModify __all__ = [ "EnableAmendment", diff --git a/xrpl/models/transactions/pseudo_transactions/enable_amendment.py b/xahau/models/transactions/pseudo_transactions/enable_amendment.py similarity index 91% rename from xrpl/models/transactions/pseudo_transactions/enable_amendment.py rename to xahau/models/transactions/pseudo_transactions/enable_amendment.py index 180ed56de..48b466ccd 100644 --- a/xrpl/models/transactions/pseudo_transactions/enable_amendment.py +++ b/xahau/models/transactions/pseudo_transactions/enable_amendment.py @@ -4,13 +4,13 @@ from enum import Enum from typing import List, Optional, Union -from xrpl.models.flags import FlagInterface -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.pseudo_transactions.pseudo_transaction import ( +from xahau.models.flags import FlagInterface +from xahau.models.required import REQUIRED +from xahau.models.transactions.pseudo_transactions.pseudo_transaction import ( PseudoTransaction, ) -from xrpl.models.transactions.types import PseudoTransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.transactions.types import PseudoTransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class EnableAmendmentFlag(int, Enum): diff --git a/xrpl/models/transactions/pseudo_transactions/pseudo_transaction.py b/xahau/models/transactions/pseudo_transactions/pseudo_transaction.py similarity index 82% rename from xrpl/models/transactions/pseudo_transactions/pseudo_transaction.py rename to xahau/models/transactions/pseudo_transactions/pseudo_transaction.py index ffcfe0075..4e61c8cbd 100644 --- a/xrpl/models/transactions/pseudo_transactions/pseudo_transaction.py +++ b/xahau/models/transactions/pseudo_transactions/pseudo_transaction.py @@ -2,10 +2,10 @@ from dataclasses import dataclass, field -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import PseudoTransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import PseudoTransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init _ACCOUNT_ZERO = "rrrrrrrrrrrrrrrrrrrrrhoLvTp" # base58 encoding of the value `0` diff --git a/xrpl/models/transactions/pseudo_transactions/set_fee.py b/xahau/models/transactions/pseudo_transactions/set_fee.py similarity index 92% rename from xrpl/models/transactions/pseudo_transactions/set_fee.py rename to xahau/models/transactions/pseudo_transactions/set_fee.py index dffc693b0..8b999687f 100644 --- a/xrpl/models/transactions/pseudo_transactions/set_fee.py +++ b/xahau/models/transactions/pseudo_transactions/set_fee.py @@ -4,11 +4,11 @@ from dataclasses import dataclass, field from typing import Optional -from xrpl.models.transactions.pseudo_transactions.pseudo_transaction import ( +from xahau.models.transactions.pseudo_transactions.pseudo_transaction import ( PseudoTransaction, ) -from xrpl.models.transactions.types import PseudoTransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.transactions.types import PseudoTransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/pseudo_transactions/unl_modify.py b/xahau/models/transactions/pseudo_transactions/unl_modify.py similarity index 88% rename from xrpl/models/transactions/pseudo_transactions/unl_modify.py rename to xahau/models/transactions/pseudo_transactions/unl_modify.py index 32065c7bd..6ff06bba3 100644 --- a/xrpl/models/transactions/pseudo_transactions/unl_modify.py +++ b/xahau/models/transactions/pseudo_transactions/unl_modify.py @@ -7,12 +7,12 @@ from typing_extensions import Self -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.pseudo_transactions.pseudo_transaction import ( +from xahau.models.required import REQUIRED +from xahau.models.transactions.pseudo_transactions.pseudo_transaction import ( PseudoTransaction, ) -from xrpl.models.transactions.types import PseudoTransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.transactions.types import PseudoTransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/py.typed b/xahau/models/transactions/py.typed similarity index 100% rename from xrpl/models/transactions/py.typed rename to xahau/models/transactions/py.typed diff --git a/xrpl/models/transactions/set_regular_key.py b/xahau/models/transactions/set_regular_key.py similarity index 80% rename from xrpl/models/transactions/set_regular_key.py rename to xahau/models/transactions/set_regular_key.py index 24946cb98..e87542d66 100644 --- a/xrpl/models/transactions/set_regular_key.py +++ b/xahau/models/transactions/set_regular_key.py @@ -2,9 +2,9 @@ from dataclasses import dataclass, field from typing import Optional -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/signer_list_set.py b/xahau/models/transactions/signer_list_set.py similarity index 94% rename from xrpl/models/transactions/signer_list_set.py rename to xahau/models/transactions/signer_list_set.py index 374c45a6c..a3aef2b48 100644 --- a/xrpl/models/transactions/signer_list_set.py +++ b/xahau/models/transactions/signer_list_set.py @@ -8,11 +8,11 @@ from typing_extensions import Final, Self -from xrpl.models.nested_model import NestedModel -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.nested_model import NestedModel +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init MAX_SIGNER_ENTRIES: Final[int] = 32 """ diff --git a/xrpl/models/transactions/ticket_create.py b/xahau/models/transactions/ticket_create.py similarity index 76% rename from xrpl/models/transactions/ticket_create.py rename to xahau/models/transactions/ticket_create.py index 0cc1883a2..f8b0320f6 100644 --- a/xrpl/models/transactions/ticket_create.py +++ b/xahau/models/transactions/ticket_create.py @@ -2,10 +2,10 @@ from dataclasses import dataclass, field -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/models/transactions/transaction.py b/xahau/models/transactions/transaction.py similarity index 95% rename from xrpl/models/transactions/transaction.py rename to xahau/models/transactions/transaction.py index ea25aab8c..1a8b9c4b3 100644 --- a/xrpl/models/transactions/transaction.py +++ b/xahau/models/transactions/transaction.py @@ -8,17 +8,17 @@ from typing_extensions import Final, Self -from xrpl.core.binarycodec import decode, encode -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.base_model import ABBREVIATIONS, BaseModel -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.flags import check_false_flag_definition, interface_to_flag_list -from xrpl.models.nested_model import NestedModel -from xrpl.models.requests import PathStep -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.types import PseudoTransactionType, TransactionType -from xrpl.models.types import XRPL_VALUE_TYPE -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.core.binarycodec import decode, encode +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.base_model import ABBREVIATIONS, BaseModel +from xahau.models.exceptions import XRPLModelException +from xahau.models.flags import check_false_flag_definition, interface_to_flag_list +from xahau.models.nested_model import NestedModel +from xahau.models.requests import PathStep +from xahau.models.required import REQUIRED +from xahau.models.transactions.types import PseudoTransactionType, TransactionType +from xahau.models.types import XRPL_VALUE_TYPE +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init _TRANSACTION_HASH_PREFIX: Final[int] = 0x54584E00 @@ -252,7 +252,7 @@ class Transaction(BaseModel): def _get_errors(self: Self) -> Dict[str, str]: # import must be here to avoid circular dependencies - from xrpl.wallet.main import Wallet + from xahau.wallet.main import Wallet errors = super()._get_errors() if self.ticket_sequence is not None and ( @@ -435,8 +435,8 @@ def get_transaction_type( Raises: XRPLModelException: If `transaction_type` is not a valid Transaction type. """ - import xrpl.models.transactions as transaction_models - import xrpl.models.transactions.pseudo_transactions as pseudo_transaction_models + import xahau.models.transactions as transaction_models + import xahau.models.transactions.pseudo_transactions as pseudo_transaction_models # noqa: E501 transaction_types: Dict[str, Type[Transaction]] = { t.value: getattr(transaction_models, t) diff --git a/xrpl/models/transactions/trust_set.py b/xahau/models/transactions/trust_set.py similarity index 86% rename from xrpl/models/transactions/trust_set.py rename to xahau/models/transactions/trust_set.py index bc01269fa..8eb00b52e 100644 --- a/xrpl/models/transactions/trust_set.py +++ b/xahau/models/transactions/trust_set.py @@ -8,12 +8,12 @@ from enum import Enum from typing import Optional -from xrpl.models.amounts import IssuedCurrencyAmount -from xrpl.models.flags import FlagInterface -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.amounts import IssuedCurrencyAmount +from xahau.models.flags import FlagInterface +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init class TrustSetFlag(int, Enum): diff --git a/xahau/models/transactions/types/__init__.py b/xahau/models/transactions/types/__init__.py new file mode 100644 index 000000000..2da82408f --- /dev/null +++ b/xahau/models/transactions/types/__init__.py @@ -0,0 +1,8 @@ +"""Transaction and pseudo-transaction type Enums.""" + +from xahau.models.transactions.types.pseudo_transaction_type import ( + PseudoTransactionType, +) +from xahau.models.transactions.types.transaction_type import TransactionType + +__all__ = ["PseudoTransactionType", "TransactionType"] diff --git a/xrpl/models/transactions/types/pseudo_transaction_type.py b/xahau/models/transactions/types/pseudo_transaction_type.py similarity index 100% rename from xrpl/models/transactions/types/pseudo_transaction_type.py rename to xahau/models/transactions/types/pseudo_transaction_type.py diff --git a/xrpl/models/transactions/types/transaction_type.py b/xahau/models/transactions/types/transaction_type.py similarity index 100% rename from xrpl/models/transactions/types/transaction_type.py rename to xahau/models/transactions/types/transaction_type.py diff --git a/xrpl/models/transactions/xchain_account_create_commit.py b/xahau/models/transactions/xchain_account_create_commit.py similarity index 87% rename from xrpl/models/transactions/xchain_account_create_commit.py rename to xahau/models/transactions/xchain_account_create_commit.py index 5c8410334..933a7cac3 100644 --- a/xrpl/models/transactions/xchain_account_create_commit.py +++ b/xahau/models/transactions/xchain_account_create_commit.py @@ -7,11 +7,11 @@ from typing_extensions import Self -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init -from xrpl.models.xchain_bridge import XChainBridge +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.xchain_bridge import XChainBridge @require_kwargs_on_init diff --git a/xrpl/models/transactions/xchain_add_account_create_attestation.py b/xahau/models/transactions/xchain_add_account_create_attestation.py similarity index 90% rename from xrpl/models/transactions/xchain_add_account_create_attestation.py rename to xahau/models/transactions/xchain_add_account_create_attestation.py index f4b1a15ce..297881697 100644 --- a/xrpl/models/transactions/xchain_add_account_create_attestation.py +++ b/xahau/models/transactions/xchain_add_account_create_attestation.py @@ -7,12 +7,12 @@ from typing_extensions import Literal -from xrpl.models.amounts import Amount -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init -from xrpl.models.xchain_bridge import XChainBridge +from xahau.models.amounts import Amount +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.xchain_bridge import XChainBridge @require_kwargs_on_init diff --git a/xrpl/models/transactions/xchain_add_claim_attestation.py b/xahau/models/transactions/xchain_add_claim_attestation.py similarity index 89% rename from xrpl/models/transactions/xchain_add_claim_attestation.py rename to xahau/models/transactions/xchain_add_claim_attestation.py index 0fe6d2f69..80cfac94e 100644 --- a/xrpl/models/transactions/xchain_add_claim_attestation.py +++ b/xahau/models/transactions/xchain_add_claim_attestation.py @@ -7,12 +7,12 @@ from typing_extensions import Literal -from xrpl.models.amounts import Amount -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init -from xrpl.models.xchain_bridge import XChainBridge +from xahau.models.amounts import Amount +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.xchain_bridge import XChainBridge @require_kwargs_on_init diff --git a/xrpl/models/transactions/xchain_claim.py b/xahau/models/transactions/xchain_claim.py similarity index 86% rename from xrpl/models/transactions/xchain_claim.py rename to xahau/models/transactions/xchain_claim.py index d7dadb5ff..90e8eb205 100644 --- a/xrpl/models/transactions/xchain_claim.py +++ b/xahau/models/transactions/xchain_claim.py @@ -7,13 +7,13 @@ from typing_extensions import Self -from xrpl.models.amounts import Amount -from xrpl.models.currencies import XRP -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init -from xrpl.models.xchain_bridge import XChainBridge +from xahau.models.amounts import Amount +from xahau.models.currencies import XRP +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.xchain_bridge import XChainBridge @require_kwargs_on_init diff --git a/xrpl/models/transactions/xchain_commit.py b/xahau/models/transactions/xchain_commit.py similarity index 85% rename from xrpl/models/transactions/xchain_commit.py rename to xahau/models/transactions/xchain_commit.py index 44ff48ccb..6da82aa46 100644 --- a/xrpl/models/transactions/xchain_commit.py +++ b/xahau/models/transactions/xchain_commit.py @@ -3,12 +3,12 @@ from dataclasses import dataclass, field from typing import Optional, Union -from xrpl.models.amounts import Amount -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init -from xrpl.models.xchain_bridge import XChainBridge +from xahau.models.amounts import Amount +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.xchain_bridge import XChainBridge @require_kwargs_on_init diff --git a/xrpl/models/transactions/xchain_create_bridge.py b/xahau/models/transactions/xchain_create_bridge.py similarity index 89% rename from xrpl/models/transactions/xchain_create_bridge.py rename to xahau/models/transactions/xchain_create_bridge.py index 29097864d..dd75b0ce1 100644 --- a/xrpl/models/transactions/xchain_create_bridge.py +++ b/xahau/models/transactions/xchain_create_bridge.py @@ -7,12 +7,12 @@ from typing_extensions import Self -from xrpl.models.currencies import XRP -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init -from xrpl.models.xchain_bridge import XChainBridge +from xahau.models.currencies import XRP +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.xchain_bridge import XChainBridge @require_kwargs_on_init diff --git a/xrpl/models/transactions/xchain_create_claim_id.py b/xahau/models/transactions/xchain_create_claim_id.py similarity index 84% rename from xrpl/models/transactions/xchain_create_claim_id.py rename to xahau/models/transactions/xchain_create_claim_id.py index 48906d587..4e9fc1750 100644 --- a/xrpl/models/transactions/xchain_create_claim_id.py +++ b/xahau/models/transactions/xchain_create_claim_id.py @@ -7,12 +7,12 @@ from typing_extensions import Self -from xrpl.core.addresscodec import is_valid_classic_address -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init -from xrpl.models.xchain_bridge import XChainBridge +from xahau.core.addresscodec import is_valid_classic_address +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.xchain_bridge import XChainBridge @require_kwargs_on_init diff --git a/xrpl/models/transactions/xchain_modify_bridge.py b/xahau/models/transactions/xchain_modify_bridge.py similarity index 89% rename from xrpl/models/transactions/xchain_modify_bridge.py rename to xahau/models/transactions/xchain_modify_bridge.py index ec0be90c4..d3aa9d552 100644 --- a/xrpl/models/transactions/xchain_modify_bridge.py +++ b/xahau/models/transactions/xchain_modify_bridge.py @@ -8,13 +8,13 @@ from typing_extensions import Self -from xrpl.models.currencies import XRP -from xrpl.models.flags import FlagInterface -from xrpl.models.required import REQUIRED -from xrpl.models.transactions.transaction import Transaction -from xrpl.models.transactions.types import TransactionType -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init -from xrpl.models.xchain_bridge import XChainBridge +from xahau.models.currencies import XRP +from xahau.models.flags import FlagInterface +from xahau.models.required import REQUIRED +from xahau.models.transactions.transaction import Transaction +from xahau.models.transactions.types import TransactionType +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.xchain_bridge import XChainBridge class XChainModifyBridgeFlag(int, Enum): diff --git a/xrpl/models/types.py b/xahau/models/types.py similarity index 100% rename from xrpl/models/types.py rename to xahau/models/types.py diff --git a/xrpl/models/utils.py b/xahau/models/utils.py similarity index 98% rename from xrpl/models/utils.py rename to xahau/models/utils.py index 1ecf53709..521683ff0 100644 --- a/xrpl/models/utils.py +++ b/xahau/models/utils.py @@ -2,7 +2,7 @@ from dataclasses import dataclass, is_dataclass from typing import Any, Dict, List, Type, TypeVar, cast -from xrpl.models.exceptions import XRPLModelException +from xahau.models.exceptions import XRPLModelException # Code source for requiring kwargs: # https://gist.github.com/mikeholler/4be180627d3f8fceb55704b729464adb diff --git a/xrpl/models/xchain_bridge.py b/xahau/models/xchain_bridge.py similarity index 85% rename from xrpl/models/xchain_bridge.py rename to xahau/models/xchain_bridge.py index f5db939dd..c88153ef9 100644 --- a/xrpl/models/xchain_bridge.py +++ b/xahau/models/xchain_bridge.py @@ -4,9 +4,9 @@ from dataclasses import dataclass -from xrpl.models.base_model import BaseModel -from xrpl.models.currencies import Currency -from xrpl.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init +from xahau.models.base_model import BaseModel +from xahau.models.currencies import Currency +from xahau.models.utils import KW_ONLY_DATACLASS, require_kwargs_on_init @require_kwargs_on_init diff --git a/xrpl/py.typed b/xahau/py.typed similarity index 100% rename from xrpl/py.typed rename to xahau/py.typed diff --git a/xrpl/transaction/__init__.py b/xahau/transaction/__init__.py similarity index 70% rename from xrpl/transaction/__init__.py rename to xahau/transaction/__init__.py index 0e04ea191..39fa1ced8 100644 --- a/xrpl/transaction/__init__.py +++ b/xahau/transaction/__init__.py @@ -1,17 +1,17 @@ """Methods for working with transactions on the XRP Ledger.""" -from xrpl.asyncio.transaction import ( +from xahau.asyncio.transaction import ( XRPLReliableSubmissionException, transaction_json_to_binary_codec_form, ) -from xrpl.transaction.main import ( +from xahau.transaction.main import ( autofill, autofill_and_sign, sign, sign_and_submit, submit, ) -from xrpl.transaction.multisign import multisign -from xrpl.transaction.reliable_submission import submit_and_wait +from xahau.transaction.multisign import multisign +from xahau.transaction.reliable_submission import submit_and_wait __all__ = [ "autofill", diff --git a/xrpl/transaction/main.py b/xahau/transaction/main.py similarity index 93% rename from xrpl/transaction/main.py rename to xahau/transaction/main.py index 99f1ff43e..89101bc44 100644 --- a/xrpl/transaction/main.py +++ b/xahau/transaction/main.py @@ -2,11 +2,11 @@ import asyncio from typing import Optional -from xrpl.asyncio.transaction import main -from xrpl.clients.sync_client import SyncClient -from xrpl.models.response import Response -from xrpl.models.transactions.transaction import Transaction -from xrpl.wallet.main import Wallet +from xahau.asyncio.transaction import main +from xahau.clients.sync_client import SyncClient +from xahau.models.response import Response +from xahau.models.transactions.transaction import Transaction +from xahau.wallet.main import Wallet def sign_and_submit( diff --git a/xrpl/transaction/multisign.py b/xahau/transaction/multisign.py similarity index 89% rename from xrpl/transaction/multisign.py rename to xahau/transaction/multisign.py index b6b1af2e4..03704a356 100644 --- a/xrpl/transaction/multisign.py +++ b/xahau/transaction/multisign.py @@ -1,8 +1,8 @@ """Multisign transaction methods with XRPL transactions.""" from typing import List -from xrpl.core.addresscodec import decode_classic_address -from xrpl.models.transactions.transaction import Signer, Transaction +from xahau.core.addresscodec import decode_classic_address +from xahau.models.transactions.transaction import Signer, Transaction def multisign(transaction: Transaction, tx_list: List[Transaction]) -> Transaction: diff --git a/xrpl/transaction/py.typed b/xahau/transaction/py.typed similarity index 100% rename from xrpl/transaction/py.typed rename to xahau/transaction/py.typed diff --git a/xrpl/transaction/reliable_submission.py b/xahau/transaction/reliable_submission.py similarity index 87% rename from xrpl/transaction/reliable_submission.py rename to xahau/transaction/reliable_submission.py index cfd27a11f..e3cd64a87 100644 --- a/xrpl/transaction/reliable_submission.py +++ b/xahau/transaction/reliable_submission.py @@ -3,11 +3,11 @@ import asyncio from typing import Optional -from xrpl.asyncio.transaction import submit_and_wait as async_submit_and_wait -from xrpl.clients.sync_client import SyncClient -from xrpl.models.response import Response -from xrpl.models.transactions.transaction import Transaction -from xrpl.wallet.main import Wallet +from xahau.asyncio.transaction import submit_and_wait as async_submit_and_wait +from xahau.clients.sync_client import SyncClient +from xahau.models.response import Response +from xahau.models.transactions.transaction import Transaction +from xahau.wallet.main import Wallet def submit_and_wait( diff --git a/xrpl/utils/__init__.py b/xahau/utils/__init__.py similarity index 62% rename from xrpl/utils/__init__.py rename to xahau/utils/__init__.py index 6a0ae8a7f..dd3d6bc1a 100644 --- a/xrpl/utils/__init__.py +++ b/xahau/utils/__init__.py @@ -1,22 +1,22 @@ """Convenience utilities for the XRP Ledger""" -from xrpl.utils.get_nftoken_id import get_nftoken_id -from xrpl.utils.get_xchain_claim_id import get_xchain_claim_id -from xrpl.utils.parse_nftoken_id import parse_nftoken_id -from xrpl.utils.str_conversions import hex_to_str, str_to_hex -from xrpl.utils.time_conversions import ( +from xahau.utils.get_nftoken_id import get_nftoken_id +from xahau.utils.get_xchain_claim_id import get_xchain_claim_id +from xahau.utils.parse_nftoken_id import parse_nftoken_id +from xahau.utils.str_conversions import hex_to_str, str_to_hex +from xahau.utils.time_conversions import ( XRPLTimeRangeException, datetime_to_ripple_time, posix_to_ripple_time, ripple_time_to_datetime, ripple_time_to_posix, ) -from xrpl.utils.txn_parser import ( +from xahau.utils.txn_parser import ( get_balance_changes, get_final_balances, get_order_book_changes, ) -from xrpl.utils.xrp_conversions import XRPRangeException, drops_to_xrp, xrp_to_drops +from xahau.utils.xrp_conversions import XRPRangeException, drops_to_xrp, xrp_to_drops __all__ = [ "str_to_hex", diff --git a/xrpl/utils/get_nftoken_id.py b/xahau/utils/get_nftoken_id.py similarity index 98% rename from xrpl/utils/get_nftoken_id.py rename to xahau/utils/get_nftoken_id.py index 52a77b4c5..b18019cde 100644 --- a/xrpl/utils/get_nftoken_id.py +++ b/xahau/utils/get_nftoken_id.py @@ -1,7 +1,7 @@ """Utils to get an NFTokenID from metadata""" from typing import Callable, List, TypeVar, Union -from xrpl.models.transactions.metadata import ( +from xahau.models.transactions.metadata import ( NFTokenMetadata, Node, TransactionMetadata, diff --git a/xrpl/utils/get_xchain_claim_id.py b/xahau/utils/get_xchain_claim_id.py similarity index 94% rename from xrpl/utils/get_xchain_claim_id.py rename to xahau/utils/get_xchain_claim_id.py index 8da6f8c42..7fcabb7db 100644 --- a/xrpl/utils/get_xchain_claim_id.py +++ b/xahau/utils/get_xchain_claim_id.py @@ -1,5 +1,5 @@ """Utils to get an XChainClaimID from metadata.""" -from xrpl.models.transactions.metadata import TransactionMetadata, isCreatedNode +from xahau.models.transactions.metadata import TransactionMetadata, isCreatedNode def get_xchain_claim_id(meta: TransactionMetadata) -> str: diff --git a/xrpl/utils/parse_nftoken_id.py b/xahau/utils/parse_nftoken_id.py similarity index 96% rename from xrpl/utils/parse_nftoken_id.py rename to xahau/utils/parse_nftoken_id.py index 9ed3bdf60..7bdbb0b85 100644 --- a/xrpl/utils/parse_nftoken_id.py +++ b/xahau/utils/parse_nftoken_id.py @@ -1,8 +1,8 @@ """Utils to parse NFTokenIDs.""" from typing_extensions import TypedDict -from xrpl.constants import XRPLException -from xrpl.core.addresscodec.codec import encode_classic_address +from xahau.constants import XRPLException +from xahau.core.addresscodec.codec import encode_classic_address class NFTokenID(TypedDict): diff --git a/xrpl/utils/py.typed b/xahau/utils/py.typed similarity index 100% rename from xrpl/utils/py.typed rename to xahau/utils/py.typed diff --git a/xrpl/utils/str_conversions.py b/xahau/utils/str_conversions.py similarity index 100% rename from xrpl/utils/str_conversions.py rename to xahau/utils/str_conversions.py diff --git a/xrpl/utils/time_conversions.py b/xahau/utils/time_conversions.py similarity index 99% rename from xrpl/utils/time_conversions.py rename to xahau/utils/time_conversions.py index c14bbd2de..fa0807330 100644 --- a/xrpl/utils/time_conversions.py +++ b/xahau/utils/time_conversions.py @@ -8,7 +8,7 @@ from typing_extensions import Final -from xrpl.constants import XRPLException +from xahau.constants import XRPLException RIPPLE_EPOCH: Final[int] = 946684800 """The "Ripple Epoch" of 2000-01-01T00:00:00 UTC""" diff --git a/xahau/utils/txn_parser/__init__.py b/xahau/utils/txn_parser/__init__.py new file mode 100644 index 000000000..69df41814 --- /dev/null +++ b/xahau/utils/txn_parser/__init__.py @@ -0,0 +1,7 @@ +"""Functions to parse a transaction.""" + +from xahau.utils.txn_parser.get_balance_changes import get_balance_changes +from xahau.utils.txn_parser.get_final_balances import get_final_balances +from xahau.utils.txn_parser.get_order_book_changes import get_order_book_changes + +__all__ = ["get_balance_changes", "get_final_balances", "get_order_book_changes"] diff --git a/xrpl/utils/txn_parser/get_balance_changes.py b/xahau/utils/txn_parser/get_balance_changes.py similarity index 94% rename from xrpl/utils/txn_parser/get_balance_changes.py rename to xahau/utils/txn_parser/get_balance_changes.py index c82511ace..8163aaa4e 100644 --- a/xrpl/utils/txn_parser/get_balance_changes.py +++ b/xahau/utils/txn_parser/get_balance_changes.py @@ -3,8 +3,8 @@ from decimal import Decimal from typing import List, Optional -from xrpl.models import TransactionMetadata -from xrpl.utils.txn_parser.utils import ( +from xahau.models import TransactionMetadata +from xahau.utils.txn_parser.utils import ( AccountBalances, NormalizedNode, derive_account_balances, diff --git a/xrpl/utils/txn_parser/get_final_balances.py b/xahau/utils/txn_parser/get_final_balances.py similarity index 93% rename from xrpl/utils/txn_parser/get_final_balances.py rename to xahau/utils/txn_parser/get_final_balances.py index 0fa634a43..387b4e525 100644 --- a/xrpl/utils/txn_parser/get_final_balances.py +++ b/xahau/utils/txn_parser/get_final_balances.py @@ -3,8 +3,8 @@ from decimal import Decimal from typing import List, Optional -from xrpl.models import TransactionMetadata -from xrpl.utils.txn_parser.utils import ( +from xahau.models import TransactionMetadata +from xahau.utils.txn_parser.utils import ( AccountBalances, NormalizedNode, derive_account_balances, diff --git a/xrpl/utils/txn_parser/get_order_book_changes.py b/xahau/utils/txn_parser/get_order_book_changes.py similarity index 79% rename from xrpl/utils/txn_parser/get_order_book_changes.py rename to xahau/utils/txn_parser/get_order_book_changes.py index f66c69fe1..a6e597e73 100644 --- a/xrpl/utils/txn_parser/get_order_book_changes.py +++ b/xahau/utils/txn_parser/get_order_book_changes.py @@ -2,8 +2,8 @@ from typing import List -from xrpl.models import TransactionMetadata -from xrpl.utils.txn_parser.utils import AccountOfferChanges, compute_order_book_changes +from xahau.models import TransactionMetadata +from xahau.utils.txn_parser.utils import AccountOfferChanges, compute_order_book_changes def get_order_book_changes(metadata: TransactionMetadata) -> List[AccountOfferChanges]: diff --git a/xahau/utils/txn_parser/utils/__init__.py b/xahau/utils/txn_parser/utils/__init__.py new file mode 100644 index 000000000..dc6fac4ab --- /dev/null +++ b/xahau/utils/txn_parser/utils/__init__.py @@ -0,0 +1,17 @@ +"""Utility functions for the transaction parser.""" + +from xahau.utils.txn_parser.utils.balance_parser import derive_account_balances +from xahau.utils.txn_parser.utils.nodes import NormalizedNode, normalize_nodes +from xahau.utils.txn_parser.utils.order_book_parser import compute_order_book_changes +from xahau.utils.txn_parser.utils.parser import get_value +from xahau.utils.txn_parser.utils.types import AccountBalances, AccountOfferChanges + +__all__ = [ + "get_value", + "derive_account_balances", + "NormalizedNode", + "normalize_nodes", + "AccountBalances", + "AccountOfferChanges", + "compute_order_book_changes", +] diff --git a/xrpl/utils/txn_parser/utils/balance_parser.py b/xahau/utils/txn_parser/utils/balance_parser.py similarity index 93% rename from xrpl/utils/txn_parser/utils/balance_parser.py rename to xahau/utils/txn_parser/utils/balance_parser.py index b1ab1c26f..e8db20c46 100644 --- a/xrpl/utils/txn_parser/utils/balance_parser.py +++ b/xahau/utils/txn_parser/utils/balance_parser.py @@ -3,11 +3,11 @@ from decimal import Decimal from typing import Callable, List, Optional -from xrpl.models.transactions.metadata import TransactionMetadata -from xrpl.utils.txn_parser.utils.nodes import NormalizedNode, normalize_nodes -from xrpl.utils.txn_parser.utils.parser import group_by_account -from xrpl.utils.txn_parser.utils.types import AccountBalance, AccountBalances, Balance -from xrpl.utils.xrp_conversions import drops_to_xrp +from xahau.models.transactions.metadata import TransactionMetadata +from xahau.utils.txn_parser.utils.nodes import NormalizedNode, normalize_nodes +from xahau.utils.txn_parser.utils.parser import group_by_account +from xahau.utils.txn_parser.utils.types import AccountBalance, AccountBalances, Balance +from xahau.utils.xrp_conversions import drops_to_xrp def _get_xrp_quantity( diff --git a/xrpl/utils/txn_parser/utils/nodes.py b/xahau/utils/txn_parser/utils/nodes.py similarity index 96% rename from xrpl/utils/txn_parser/utils/nodes.py rename to xahau/utils/txn_parser/utils/nodes.py index cacf7e17f..775cf8a10 100644 --- a/xrpl/utils/txn_parser/utils/nodes.py +++ b/xahau/utils/txn_parser/utils/nodes.py @@ -4,8 +4,8 @@ from typing_extensions import Literal, TypedDict -from xrpl.models import TransactionMetadata -from xrpl.models.transactions.metadata import ( +from xahau.models import TransactionMetadata +from xahau.models.transactions.metadata import ( CreatedNode, CreatedNodeFields, DeletedNode, diff --git a/xrpl/utils/txn_parser/utils/order_book_parser.py b/xahau/utils/txn_parser/utils/order_book_parser.py similarity index 95% rename from xrpl/utils/txn_parser/utils/order_book_parser.py rename to xahau/utils/txn_parser/utils/order_book_parser.py index ea433c8cb..683391efb 100644 --- a/xrpl/utils/txn_parser/utils/order_book_parser.py +++ b/xahau/utils/txn_parser/utils/order_book_parser.py @@ -5,16 +5,16 @@ from typing_extensions import Literal -from xrpl.models import TransactionMetadata -from xrpl.utils.txn_parser.utils import NormalizedNode, normalize_nodes -from xrpl.utils.txn_parser.utils.parser import get_value, group_by_account -from xrpl.utils.txn_parser.utils.types import ( +from xahau.models import TransactionMetadata +from xahau.utils.txn_parser.utils import NormalizedNode, normalize_nodes +from xahau.utils.txn_parser.utils.parser import get_value, group_by_account +from xahau.utils.txn_parser.utils.types import ( AccountOfferChange, AccountOfferChanges, CurrencyAmount, OfferChange, ) -from xrpl.utils.xrp_conversions import drops_to_xrp +from xahau.utils.xrp_conversions import drops_to_xrp LSF_SELL = 0x00020000 diff --git a/xrpl/utils/txn_parser/utils/parser.py b/xahau/utils/txn_parser/utils/parser.py similarity index 95% rename from xrpl/utils/txn_parser/utils/parser.py rename to xahau/utils/txn_parser/utils/parser.py index 6888c2fb4..56d2bf25d 100644 --- a/xrpl/utils/txn_parser/utils/parser.py +++ b/xahau/utils/txn_parser/utils/parser.py @@ -3,7 +3,7 @@ from decimal import Decimal from typing import Any, Dict, List, Union -from xrpl.utils.txn_parser.utils.types import ( +from xahau.utils.txn_parser.utils.types import ( AccountBalance, AccountOfferChange, CurrencyAmount, diff --git a/xrpl/utils/txn_parser/utils/types.py b/xahau/utils/txn_parser/utils/types.py similarity index 100% rename from xrpl/utils/txn_parser/utils/types.py rename to xahau/utils/txn_parser/utils/types.py diff --git a/xrpl/utils/xrp_conversions.py b/xahau/utils/xrp_conversions.py similarity index 98% rename from xrpl/utils/xrp_conversions.py rename to xahau/utils/xrp_conversions.py index d8aa2cf3c..f5bafa998 100644 --- a/xrpl/utils/xrp_conversions.py +++ b/xahau/utils/xrp_conversions.py @@ -5,7 +5,7 @@ from typing_extensions import Final -from xrpl.constants import DROPS_DECIMAL_CONTEXT, XRPLException +from xahau.constants import DROPS_DECIMAL_CONTEXT, XRPLException ONE_DROP: Final[Decimal] = Decimal("0.000001") """Indivisible unit of XRP""" diff --git a/xahau/wallet/__init__.py b/xahau/wallet/__init__.py new file mode 100644 index 000000000..2b819b6ae --- /dev/null +++ b/xahau/wallet/__init__.py @@ -0,0 +1,6 @@ +"""Methods for working with XRPL wallets.""" +from xahau.asyncio.wallet import XRPLFaucetException +from xahau.wallet.main import Wallet +from xahau.wallet.wallet_generation import generate_faucet_wallet + +__all__ = ["Wallet", "generate_faucet_wallet", "XRPLFaucetException"] diff --git a/xrpl/wallet/main.py b/xahau/wallet/main.py similarity index 95% rename from xrpl/wallet/main.py rename to xahau/wallet/main.py index f103aab44..13abca0de 100644 --- a/xrpl/wallet/main.py +++ b/xahau/wallet/main.py @@ -6,11 +6,11 @@ from typing_extensions import Self -from xrpl.constants import CryptoAlgorithm, XRPLException -from xrpl.core import addresscodec -from xrpl.core.addresscodec import classic_address_to_xaddress, ensure_classic_address -from xrpl.core.addresscodec.exceptions import XRPLAddressCodecException -from xrpl.core.keypairs import derive_classic_address, derive_keypair, generate_seed +from xahau.constants import CryptoAlgorithm, XRPLException +from xahau.core import addresscodec +from xahau.core.addresscodec import classic_address_to_xaddress, ensure_classic_address +from xahau.core.addresscodec.exceptions import XRPLAddressCodecException +from xahau.core.keypairs import derive_classic_address, derive_keypair, generate_seed class Wallet: @@ -228,7 +228,7 @@ def from_secret_numbers( any secret number is not 6. If the checksum of any secret number is invalid. """ - # Logic adapted from xrpl-secret-numbers secretToEntropy function + # Logic adapted from xahau-secret-numbers secretToEntropy function # https://github.com/XRPLF/xrpl.js/blob/main/packages/secret-numbers/src/utils/index.ts parsed_secret_numbers = ( diff --git a/xrpl/wallet/py.typed b/xahau/wallet/py.typed similarity index 100% rename from xrpl/wallet/py.typed rename to xahau/wallet/py.typed diff --git a/xrpl/wallet/wallet_generation.py b/xahau/wallet/wallet_generation.py similarity index 89% rename from xrpl/wallet/wallet_generation.py rename to xahau/wallet/wallet_generation.py index af9511962..8534bc1fa 100644 --- a/xrpl/wallet/wallet_generation.py +++ b/xahau/wallet/wallet_generation.py @@ -2,9 +2,9 @@ import asyncio from typing import Optional -from xrpl.asyncio.wallet import generate_faucet_wallet as async_generate_faucet_wallet -from xrpl.clients.sync_client import SyncClient -from xrpl.wallet.main import Wallet +from xahau.asyncio.wallet import generate_faucet_wallet as async_generate_faucet_wallet +from xahau.clients.sync_client import SyncClient +from xahau.wallet.main import Wallet def generate_faucet_wallet( diff --git a/xrpl/core/binarycodec/binary_wrappers/__init__.py b/xrpl/core/binarycodec/binary_wrappers/__init__.py deleted file mode 100644 index ec27a6694..000000000 --- a/xrpl/core/binarycodec/binary_wrappers/__init__.py +++ /dev/null @@ -1,5 +0,0 @@ -"""Wrapper classes around byte buffers used for serialization and deserialization.""" -from xrpl.core.binarycodec.binary_wrappers.binary_parser import BinaryParser -from xrpl.core.binarycodec.binary_wrappers.binary_serializer import BinarySerializer - -__all__ = ["BinaryParser", "BinarySerializer"] diff --git a/xrpl/core/binarycodec/types/__init__.py b/xrpl/core/binarycodec/types/__init__.py deleted file mode 100644 index e9d31a608..000000000 --- a/xrpl/core/binarycodec/types/__init__.py +++ /dev/null @@ -1,42 +0,0 @@ -"""Top-level exports for types used in binary_codec.""" -from xrpl.core.binarycodec.types.account_id import AccountID -from xrpl.core.binarycodec.types.amount import Amount -from xrpl.core.binarycodec.types.blob import Blob -from xrpl.core.binarycodec.types.currency import Currency -from xrpl.core.binarycodec.types.hash import Hash -from xrpl.core.binarycodec.types.hash128 import Hash128 -from xrpl.core.binarycodec.types.hash160 import Hash160 -from xrpl.core.binarycodec.types.hash256 import Hash256 -from xrpl.core.binarycodec.types.issue import Issue -from xrpl.core.binarycodec.types.path_set import PathSet -from xrpl.core.binarycodec.types.st_array import STArray -from xrpl.core.binarycodec.types.st_object import STObject -from xrpl.core.binarycodec.types.uint import UInt -from xrpl.core.binarycodec.types.uint8 import UInt8 -from xrpl.core.binarycodec.types.uint16 import UInt16 -from xrpl.core.binarycodec.types.uint32 import UInt32 -from xrpl.core.binarycodec.types.uint64 import UInt64 -from xrpl.core.binarycodec.types.vector256 import Vector256 -from xrpl.core.binarycodec.types.xchain_bridge import XChainBridge - -__all__ = [ - "AccountID", - "Amount", - "Blob", - "Currency", - "Hash", - "Hash128", - "Hash160", - "Hash256", - "Issue", - "PathSet", - "STObject", - "STArray", - "UInt", - "UInt8", - "UInt16", - "UInt32", - "UInt64", - "Vector256", - "XChainBridge", -] diff --git a/xrpl/models/__init__.py b/xrpl/models/__init__.py deleted file mode 100644 index 8d7d4e63a..000000000 --- a/xrpl/models/__init__.py +++ /dev/null @@ -1,30 +0,0 @@ -"""Top-level exports for the models package.""" -from xrpl.models import amounts, currencies, requests, transactions -from xrpl.models.amounts import * # noqa: F401, F403 -from xrpl.models.auth_account import AuthAccount -from xrpl.models.currencies import * # noqa: F401, F403 -from xrpl.models.exceptions import XRPLModelException -from xrpl.models.path import Path, PathStep -from xrpl.models.requests import * # noqa: F401, F403 -from xrpl.models.response import Response -from xrpl.models.transactions import * # noqa: F401, F403 -from xrpl.models.transactions.pseudo_transactions import * # noqa: F401, F403 -from xrpl.models.xchain_bridge import XChainBridge - -__all__ = [ - "XRPLModelException", - "amounts", - *amounts.__all__, - "AuthAccount", - "currencies", - *currencies.__all__, - "requests", - *requests.__all__, - "transactions", - *transactions.__all__, - *transactions.pseudo_transactions.__all__, - "Path", - "PathStep", - "Response", - "XChainBridge", -] diff --git a/xrpl/models/requests/__init__.py b/xrpl/models/requests/__init__.py deleted file mode 100644 index 5c52dd738..000000000 --- a/xrpl/models/requests/__init__.py +++ /dev/null @@ -1,111 +0,0 @@ -"""Request models.""" - -from xrpl.models.auth_account import AuthAccount -from xrpl.models.path import PathStep -from xrpl.models.requests.account_channels import AccountChannels -from xrpl.models.requests.account_currencies import AccountCurrencies -from xrpl.models.requests.account_info import AccountInfo -from xrpl.models.requests.account_lines import AccountLines -from xrpl.models.requests.account_nfts import AccountNFTs -from xrpl.models.requests.account_objects import AccountObjects, AccountObjectType -from xrpl.models.requests.account_offers import AccountOffers -from xrpl.models.requests.account_tx import AccountTx -from xrpl.models.requests.amm_info import AMMInfo -from xrpl.models.requests.book_offers import BookOffers -from xrpl.models.requests.channel_authorize import ChannelAuthorize -from xrpl.models.requests.channel_verify import ChannelVerify -from xrpl.models.requests.deposit_authorized import DepositAuthorized -from xrpl.models.requests.feature import Feature -from xrpl.models.requests.fee import Fee -from xrpl.models.requests.gateway_balances import GatewayBalances -from xrpl.models.requests.generic_request import GenericRequest -from xrpl.models.requests.get_aggregate_price import GetAggregatePrice -from xrpl.models.requests.ledger import Ledger -from xrpl.models.requests.ledger_closed import LedgerClosed -from xrpl.models.requests.ledger_current import LedgerCurrent -from xrpl.models.requests.ledger_data import LedgerData -from xrpl.models.requests.ledger_entry import LedgerEntry, LedgerEntryType -from xrpl.models.requests.manifest import Manifest -from xrpl.models.requests.nft_buy_offers import NFTBuyOffers -from xrpl.models.requests.nft_history import NFTHistory -from xrpl.models.requests.nft_info import NFTInfo -from xrpl.models.requests.nft_sell_offers import NFTSellOffers -from xrpl.models.requests.nfts_by_issuer import NFTsByIssuer -from xrpl.models.requests.no_ripple_check import NoRippleCheck, NoRippleCheckRole -from xrpl.models.requests.path_find import PathFind, PathFindSubcommand -from xrpl.models.requests.ping import Ping -from xrpl.models.requests.random import Random -from xrpl.models.requests.request import Request -from xrpl.models.requests.ripple_path_find import RipplePathFind -from xrpl.models.requests.server_definitions import ServerDefinitions -from xrpl.models.requests.server_info import ServerInfo -from xrpl.models.requests.server_state import ServerState -from xrpl.models.requests.sign import Sign -from xrpl.models.requests.sign_and_submit import SignAndSubmit -from xrpl.models.requests.sign_for import SignFor -from xrpl.models.requests.submit import Submit -from xrpl.models.requests.submit_multisigned import SubmitMultisigned -from xrpl.models.requests.submit_only import SubmitOnly -from xrpl.models.requests.subscribe import StreamParameter, Subscribe, SubscribeBook -from xrpl.models.requests.transaction_entry import TransactionEntry -from xrpl.models.requests.tx import Tx -from xrpl.models.requests.unsubscribe import Unsubscribe - -__all__ = [ - "AccountChannels", - "AccountCurrencies", - "AccountInfo", - "AccountLines", - "AccountNFTs", - "AccountObjects", - "AccountObjectType", - "AccountOffers", - "AccountTx", - "AMMInfo", - "AuthAccount", - "BookOffers", - "ChannelAuthorize", - "ChannelVerify", - "DepositAuthorized", - "Feature", - "Fee", - "GatewayBalances", - "GenericRequest", - "GetAggregatePrice", - "Ledger", - "LedgerClosed", - "LedgerCurrent", - "LedgerData", - "LedgerEntry", - "LedgerEntryType", - "Manifest", - "NFTBuyOffers", - "NFTSellOffers", - "NFTInfo", - "NFTHistory", - "NFTsByIssuer", - "NoRippleCheck", - "NoRippleCheckRole", - "PathFind", - "PathFindSubcommand", - "PathStep", - "Ping", - "Random", - "Request", - "RipplePathFind", - "ServerDefinitions", - "ServerInfo", - "ServerState", - "Sign", - "SignAndSubmit", - "SignFor", - "Submit", - "SubmitMultisigned", - "SubmitOnly", - "StreamParameter", - "Subscribe", - "SubscribeBook", - "TransactionEntry", - "Tx", - "Unsubscribe", -] diff --git a/xrpl/models/transactions/__init__.py b/xrpl/models/transactions/__init__.py deleted file mode 100644 index ee3304f1b..000000000 --- a/xrpl/models/transactions/__init__.py +++ /dev/null @@ -1,166 +0,0 @@ -""" -Model objects for specific `types of Transactions -`_ in the XRP Ledger. -""" - -from xrpl.models.transactions.account_delete import AccountDelete -from xrpl.models.transactions.account_set import ( - AccountSet, - AccountSetAsfFlag, - AccountSetFlag, - AccountSetFlagInterface, -) -from xrpl.models.transactions.amm_bid import AMMBid, AuthAccount -from xrpl.models.transactions.amm_create import AMMCreate -from xrpl.models.transactions.amm_delete import AMMDelete -from xrpl.models.transactions.amm_deposit import ( - AMMDeposit, - AMMDepositFlag, - AMMDepositFlagInterface, -) -from xrpl.models.transactions.amm_vote import AMMVote -from xrpl.models.transactions.amm_withdraw import ( - AMMWithdraw, - AMMWithdrawFlag, - AMMWithdrawFlagInterface, -) -from xrpl.models.transactions.check_cancel import CheckCancel -from xrpl.models.transactions.check_cash import CheckCash -from xrpl.models.transactions.check_create import CheckCreate -from xrpl.models.transactions.clawback import Clawback -from xrpl.models.transactions.deposit_preauth import DepositPreauth -from xrpl.models.transactions.did_delete import DIDDelete -from xrpl.models.transactions.did_set import DIDSet -from xrpl.models.transactions.escrow_cancel import EscrowCancel -from xrpl.models.transactions.escrow_create import EscrowCreate -from xrpl.models.transactions.escrow_finish import EscrowFinish -from xrpl.models.transactions.metadata import TransactionMetadata -from xrpl.models.transactions.nftoken_accept_offer import NFTokenAcceptOffer -from xrpl.models.transactions.nftoken_burn import NFTokenBurn -from xrpl.models.transactions.nftoken_cancel_offer import NFTokenCancelOffer -from xrpl.models.transactions.nftoken_create_offer import ( - NFTokenCreateOffer, - NFTokenCreateOfferFlag, - NFTokenCreateOfferFlagInterface, -) -from xrpl.models.transactions.nftoken_mint import ( - NFTokenMint, - NFTokenMintFlag, - NFTokenMintFlagInterface, -) -from xrpl.models.transactions.offer_cancel import OfferCancel -from xrpl.models.transactions.offer_create import ( - OfferCreate, - OfferCreateFlag, - OfferCreateFlagInterface, -) -from xrpl.models.transactions.oracle_delete import OracleDelete -from xrpl.models.transactions.oracle_set import OracleSet -from xrpl.models.transactions.payment import Payment, PaymentFlag, PaymentFlagInterface -from xrpl.models.transactions.payment_channel_claim import ( - PaymentChannelClaim, - PaymentChannelClaimFlag, - PaymentChannelClaimFlagInterface, -) -from xrpl.models.transactions.payment_channel_create import PaymentChannelCreate -from xrpl.models.transactions.payment_channel_fund import PaymentChannelFund -from xrpl.models.transactions.set_regular_key import SetRegularKey -from xrpl.models.transactions.signer_list_set import SignerEntry, SignerListSet -from xrpl.models.transactions.ticket_create import TicketCreate -from xrpl.models.transactions.transaction import Memo, Signer, Transaction -from xrpl.models.transactions.trust_set import ( - TrustSet, - TrustSetFlag, - TrustSetFlagInterface, -) -from xrpl.models.transactions.xchain_account_create_commit import ( - XChainAccountCreateCommit, -) -from xrpl.models.transactions.xchain_add_account_create_attestation import ( - XChainAddAccountCreateAttestation, -) -from xrpl.models.transactions.xchain_add_claim_attestation import ( - XChainAddClaimAttestation, -) -from xrpl.models.transactions.xchain_claim import XChainClaim -from xrpl.models.transactions.xchain_commit import XChainCommit -from xrpl.models.transactions.xchain_create_bridge import XChainCreateBridge -from xrpl.models.transactions.xchain_create_claim_id import XChainCreateClaimID -from xrpl.models.transactions.xchain_modify_bridge import ( - XChainModifyBridge, - XChainModifyBridgeFlag, - XChainModifyBridgeFlagInterface, -) - -__all__ = [ - "AccountDelete", - "AccountSet", - "AccountSetAsfFlag", - "AccountSetFlag", - "AccountSetFlagInterface", - "AMMBid", - "AMMCreate", - "AMMDelete", - "AMMDeposit", - "AMMDepositFlag", - "AMMDepositFlagInterface", - "AMMVote", - "AMMWithdraw", - "AMMWithdrawFlag", - "AMMWithdrawFlagInterface", - "AuthAccount", - "CheckCancel", - "CheckCash", - "CheckCreate", - "Clawback", - "DepositPreauth", - "DIDDelete", - "DIDSet", - "EscrowCancel", - "EscrowCreate", - "EscrowFinish", - "Memo", - "NFTokenAcceptOffer", - "NFTokenBurn", - "NFTokenCancelOffer", - "NFTokenCreateOffer", - "NFTokenCreateOfferFlag", - "NFTokenCreateOfferFlagInterface", - "NFTokenMint", - "NFTokenMintFlag", - "NFTokenMintFlagInterface", - "OfferCancel", - "OfferCreate", - "OfferCreateFlag", - "OfferCreateFlagInterface", - "OracleDelete", - "OracleSet", - "Payment", - "PaymentChannelClaim", - "PaymentChannelClaimFlag", - "PaymentChannelClaimFlagInterface", - "PaymentChannelCreate", - "PaymentChannelFund", - "PaymentFlag", - "PaymentFlagInterface", - "SetRegularKey", - "Signer", - "SignerEntry", - "SignerListSet", - "TicketCreate", - "Transaction", - "TransactionMetadata", - "TrustSet", - "TrustSetFlag", - "TrustSetFlagInterface", - "XChainAccountCreateCommit", - "XChainAddAccountCreateAttestation", - "XChainAddClaimAttestation", - "XChainClaim", - "XChainCommit", - "XChainCreateBridge", - "XChainCreateClaimID", - "XChainModifyBridge", - "XChainModifyBridgeFlag", - "XChainModifyBridgeFlagInterface", -] diff --git a/xrpl/models/transactions/types/__init__.py b/xrpl/models/transactions/types/__init__.py deleted file mode 100644 index 8daefa0f6..000000000 --- a/xrpl/models/transactions/types/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Transaction and pseudo-transaction type Enums.""" - -from xrpl.models.transactions.types.pseudo_transaction_type import PseudoTransactionType -from xrpl.models.transactions.types.transaction_type import TransactionType - -__all__ = ["PseudoTransactionType", "TransactionType"] diff --git a/xrpl/utils/txn_parser/__init__.py b/xrpl/utils/txn_parser/__init__.py deleted file mode 100644 index 56a4300d1..000000000 --- a/xrpl/utils/txn_parser/__init__.py +++ /dev/null @@ -1,7 +0,0 @@ -"""Functions to parse a transaction.""" - -from xrpl.utils.txn_parser.get_balance_changes import get_balance_changes -from xrpl.utils.txn_parser.get_final_balances import get_final_balances -from xrpl.utils.txn_parser.get_order_book_changes import get_order_book_changes - -__all__ = ["get_balance_changes", "get_final_balances", "get_order_book_changes"] diff --git a/xrpl/utils/txn_parser/utils/__init__.py b/xrpl/utils/txn_parser/utils/__init__.py deleted file mode 100644 index 8d9798d6f..000000000 --- a/xrpl/utils/txn_parser/utils/__init__.py +++ /dev/null @@ -1,17 +0,0 @@ -"""Utility functions for the transaction parser.""" - -from xrpl.utils.txn_parser.utils.balance_parser import derive_account_balances -from xrpl.utils.txn_parser.utils.nodes import NormalizedNode, normalize_nodes -from xrpl.utils.txn_parser.utils.order_book_parser import compute_order_book_changes -from xrpl.utils.txn_parser.utils.parser import get_value -from xrpl.utils.txn_parser.utils.types import AccountBalances, AccountOfferChanges - -__all__ = [ - "get_value", - "derive_account_balances", - "NormalizedNode", - "normalize_nodes", - "AccountBalances", - "AccountOfferChanges", - "compute_order_book_changes", -] diff --git a/xrpl/wallet/__init__.py b/xrpl/wallet/__init__.py deleted file mode 100644 index 4410e593d..000000000 --- a/xrpl/wallet/__init__.py +++ /dev/null @@ -1,6 +0,0 @@ -"""Methods for working with XRPL wallets.""" -from xrpl.asyncio.wallet import XRPLFaucetException -from xrpl.wallet.main import Wallet -from xrpl.wallet.wallet_generation import generate_faucet_wallet - -__all__ = ["Wallet", "generate_faucet_wallet", "XRPLFaucetException"]