From fd968df28fa96a1dcc8b37cbe0b400f7a6a5b667 Mon Sep 17 00:00:00 2001 From: Shanshan Li Date: Wed, 12 Nov 2025 10:03:35 +0800 Subject: [PATCH 1/2] release v1.26.0 --- .openapi-generator/FILES | 51 +- README.md | 28 +- cobo_waas2/__init__.py | 19 +- cobo_waas2/api/auto_sweep_api.py | 6 +- cobo_waas2/api/compliance_api.py | 12 +- cobo_waas2/api/fee_station_api.py | 18 +- cobo_waas2/api/payment_api.py | 194 +++++++- cobo_waas2/api/tokenization_api.py | 469 +++++++++++++++++- cobo_waas2/api/transactions_api.py | 6 +- cobo_waas2/api_client.py | 2 +- cobo_waas2/models/__init__.py | 17 +- cobo_waas2/models/auto_fuel_type.py | 3 +- .../models/create_crypto_address_request.py | 2 +- cobo_waas2/models/create_merchant_request.py | 2 +- .../models/create_payment_order_request.py | 10 +- .../models/create_refund_link_request.py | 96 ++++ .../fee_station_check_fee_station_usage.py | 15 +- ...tation_check_fee_station_usage_response.py | 18 +- .../models/fee_station_gas_station_type.py | 2 +- ...station_sponsor_transaction_description.py | 88 ++++ cobo_waas2/models/link.py | 2 +- cobo_waas2/models/link_display_info.py | 4 +- cobo_waas2/models/merchant_balance.py | 2 +- cobo_waas2/models/order.py | 2 +- cobo_waas2/models/order_link_business_info.py | 14 +- ...siness_info_custom_exchange_rates_inner.py | 4 +- cobo_waas2/models/payment_order_event_data.py | 2 +- cobo_waas2/models/psp_balance.py | 2 +- .../models/refund_link_business_info.py | 95 ++++ cobo_waas2/models/refund_status.py | 4 +- .../submit_kyt_screenings_review_body.py | 2 +- cobo_waas2/models/swap_quote.py | 20 +- .../models/tokenization_erc20_token_params.py | 6 +- ...nization_erc20_token_permission_params.py} | 6 +- ...tokenization_erc20_wrapped_token_params.py | 101 ++++ ...n_erc20_wrapped_token_permission_params.py | 98 ++++ ...n_estimate_fee_request_operation_params.py | 40 +- ...ization_issue_token_params_token_params.py | 66 ++- ...tokenization_list_permissions_response.py} | 34 +- ...on_list_permissions_response_data_inner.py | 89 ++++ .../models/tokenization_operation_type.py | 1 + .../models/tokenization_permission_action.py | 42 ++ .../tokenization_sol_wrapped_token_params.py | 101 ++++ ...ion_sol_wrapped_token_permission_params.py | 92 ++++ .../models/tokenization_token_detail_info.py | 15 +- cobo_waas2/models/tokenization_token_info.py | 9 +- .../tokenization_token_permission_type.py | 3 +- .../models/tokenization_token_standard.py | 2 + ...tokenization_update_address_permissions.py | 92 ++++ ..._update_permissions_estimate_fee_params.py | 107 ++++ .../tokenization_update_permissions_params.py | 100 ++++ ...tokenization_update_permissions_request.py | 110 ++++ .../models/transaction_cobo_category.py | 9 +- .../models/update_merchant_by_id_request.py | 2 +- docs/AutoFuelType.md | 2 +- docs/AutoSweepApi.md | 6 +- docs/ComplianceApi.md | 2 +- docs/CreateCryptoAddressRequest.md | 2 +- docs/CreateMerchantRequest.md | 2 +- docs/CreatePaymentOrderRequest.md | 10 +- docs/CreateRefundLinkRequest.md | 30 ++ docs/FeeStationApi.md | 10 +- docs/FeeStationCheckFeeStationUsage.md | 6 +- .../FeeStationCheckFeeStationUsageResponse.md | 9 +- docs/FeeStationGasStationType.md | 2 +- ...FeeStationSponsorTransactionDescription.md | 30 ++ docs/Link.md | 2 +- docs/LinkDisplayInfo.md | 4 +- docs/MerchantBalance.md | 2 +- docs/Order.md | 2 +- docs/OrderLinkBusinessInfo.md | 14 +- ...inkBusinessInfoCustomExchangeRatesInner.md | 4 +- docs/PaymentApi.md | 81 ++- docs/PaymentOrderEventData.md | 2 +- docs/PspBalance.md | 2 +- docs/RefundLinkBusinessInfo.md | 33 ++ docs/RefundStatus.md | 2 +- docs/SubmitKytScreeningsReviewBody.md | 2 +- docs/SwapQuote.md | 20 +- docs/TokenizationApi.md | 170 ++++++- docs/TokenizationERC20TokenParams.md | 2 +- ...TokenizationERC20TokenPermissionParams.md} | 16 +- docs/TokenizationERC20WrappedTokenParams.md | 34 ++ ...zationERC20WrappedTokenPermissionParams.md | 36 ++ ...zationEstimateFeeRequestOperationParams.md | 2 +- ...TokenizationIssueTokenParamsTokenParams.md | 3 +- docs/TokenizationListPermissionsResponse.md | 30 ++ ...izationListPermissionsResponseDataInner.md | 30 ++ docs/TokenizationPermissionAction.md | 12 + docs/TokenizationSOLWrappedTokenParams.md | 34 ++ ...nizationSolWrappedTokenPermissionParams.md | 33 ++ docs/TokenizationTokenDetailInfo.md | 3 + docs/TokenizationTokenInfo.md | 2 + docs/TokenizationTokenPermissionType.md | 2 +- docs/TokenizationTokenPermissionsResponse.md | 30 -- docs/TokenizationUpdateAddressPermissions.md | 31 ++ ...ationUpdatePermissionsEstimateFeeParams.md | 33 ++ docs/TokenizationUpdatePermissionsParams.md | 30 ++ docs/TokenizationUpdatePermissionsRequest.md | 33 ++ docs/TransactionCoboCategory.md | 2 +- docs/TransactionsApi.md | 2 +- docs/UpdateMerchantByIdRequest.md | 2 +- docs/WebhookEventData.md | 2 +- pyproject.toml | 2 +- setup.py | 2 +- test/test_auto_sweep_api.py | 2 +- test/test_create_refund_link_request.py | 65 +++ test/test_fee_station_api.py | 2 +- ...est_fee_station_check_fee_station_usage.py | 6 +- ...tation_check_fee_station_usage_response.py | 7 +- ...station_sponsor_transaction_description.py | 54 ++ test/test_payment_api.py | 12 + test/test_refund_link_business_info.py | 58 +++ test/test_tokenization_api.py | 33 +- test/test_tokenization_erc20_token_params.py | 14 +- ...nization_erc20_token_permission_params.py} | 34 +- ...tokenization_erc20_wrapped_token_params.py | 67 +++ ...n_erc20_wrapped_token_permission_params.py | 57 +++ ...n_estimate_fee_request_operation_params.py | 18 +- ...ization_issue_token_params_token_params.py | 11 +- ..._tokenization_list_permissions_response.py | 72 +++ ...on_list_permissions_response_data_inner.py | 58 +++ ...t_tokenization_list_token_info_response.py | 8 +- test/test_tokenization_permission_action.py | 33 ++ ...t_tokenization_sol_wrapped_token_params.py | 64 +++ ...ion_sol_wrapped_token_permission_params.py | 54 ++ test/test_tokenization_token_detail_info.py | 19 +- test/test_tokenization_token_info.py | 6 +- ...tokenization_token_permissions_response.py | 66 --- ...tokenization_update_address_permissions.py | 60 +++ ..._update_permissions_estimate_fee_params.py | 73 +++ ..._tokenization_update_permissions_params.py | 68 +++ ...tokenization_update_permissions_request.py | 72 +++ 133 files changed, 3918 insertions(+), 370 deletions(-) create mode 100644 cobo_waas2/models/create_refund_link_request.py create mode 100644 cobo_waas2/models/fee_station_sponsor_transaction_description.py create mode 100644 cobo_waas2/models/refund_link_business_info.py rename cobo_waas2/models/{tokenization_token_permission_params.py => tokenization_erc20_token_permission_params.py} (93%) create mode 100644 cobo_waas2/models/tokenization_erc20_wrapped_token_params.py create mode 100644 cobo_waas2/models/tokenization_erc20_wrapped_token_permission_params.py rename cobo_waas2/models/{tokenization_token_permissions_response.py => tokenization_list_permissions_response.py} (63%) create mode 100644 cobo_waas2/models/tokenization_list_permissions_response_data_inner.py create mode 100644 cobo_waas2/models/tokenization_permission_action.py create mode 100644 cobo_waas2/models/tokenization_sol_wrapped_token_params.py create mode 100644 cobo_waas2/models/tokenization_sol_wrapped_token_permission_params.py create mode 100644 cobo_waas2/models/tokenization_update_address_permissions.py create mode 100644 cobo_waas2/models/tokenization_update_permissions_estimate_fee_params.py create mode 100644 cobo_waas2/models/tokenization_update_permissions_params.py create mode 100644 cobo_waas2/models/tokenization_update_permissions_request.py create mode 100644 docs/CreateRefundLinkRequest.md create mode 100644 docs/FeeStationSponsorTransactionDescription.md create mode 100644 docs/RefundLinkBusinessInfo.md rename docs/{TokenizationTokenPermissionParams.md => TokenizationERC20TokenPermissionParams.md} (60%) create mode 100644 docs/TokenizationERC20WrappedTokenParams.md create mode 100644 docs/TokenizationERC20WrappedTokenPermissionParams.md create mode 100644 docs/TokenizationListPermissionsResponse.md create mode 100644 docs/TokenizationListPermissionsResponseDataInner.md create mode 100644 docs/TokenizationPermissionAction.md create mode 100644 docs/TokenizationSOLWrappedTokenParams.md create mode 100644 docs/TokenizationSolWrappedTokenPermissionParams.md delete mode 100644 docs/TokenizationTokenPermissionsResponse.md create mode 100644 docs/TokenizationUpdateAddressPermissions.md create mode 100644 docs/TokenizationUpdatePermissionsEstimateFeeParams.md create mode 100644 docs/TokenizationUpdatePermissionsParams.md create mode 100644 docs/TokenizationUpdatePermissionsRequest.md create mode 100644 test/test_create_refund_link_request.py create mode 100644 test/test_fee_station_sponsor_transaction_description.py create mode 100644 test/test_refund_link_business_info.py rename test/{test_tokenization_token_permission_params.py => test_tokenization_erc20_token_permission_params.py} (53%) create mode 100644 test/test_tokenization_erc20_wrapped_token_params.py create mode 100644 test/test_tokenization_erc20_wrapped_token_permission_params.py create mode 100644 test/test_tokenization_list_permissions_response.py create mode 100644 test/test_tokenization_list_permissions_response_data_inner.py create mode 100644 test/test_tokenization_permission_action.py create mode 100644 test/test_tokenization_sol_wrapped_token_params.py create mode 100644 test/test_tokenization_sol_wrapped_token_permission_params.py delete mode 100644 test/test_tokenization_token_permissions_response.py create mode 100644 test/test_tokenization_update_address_permissions.py create mode 100644 test/test_tokenization_update_permissions_estimate_fee_params.py create mode 100644 test/test_tokenization_update_permissions_params.py create mode 100644 test/test_tokenization_update_permissions_request.py diff --git a/.openapi-generator/FILES b/.openapi-generator/FILES index d9a0fa65..ff5b48cf 100644 --- a/.openapi-generator/FILES +++ b/.openapi-generator/FILES @@ -153,6 +153,7 @@ cobo_waas2/models/create_order_link_request.py cobo_waas2/models/create_payment_order_request.py cobo_waas2/models/create_prime_broker_address201_response.py cobo_waas2/models/create_prime_broker_address_request.py +cobo_waas2/models/create_refund_link_request.py cobo_waas2/models/create_refund_request.py cobo_waas2/models/create_safe_wallet_params.py cobo_waas2/models/create_settlement.py @@ -247,6 +248,7 @@ cobo_waas2/models/fee_station_check_fee_station_usage.py cobo_waas2/models/fee_station_check_fee_station_usage_response.py cobo_waas2/models/fee_station_destination.py cobo_waas2/models/fee_station_gas_station_type.py +cobo_waas2/models/fee_station_sponsor_transaction_description.py cobo_waas2/models/fee_station_transaction_type.py cobo_waas2/models/fee_station_transfer.py cobo_waas2/models/fee_type.py @@ -403,6 +405,7 @@ cobo_waas2/models/refresh_token2_xx_response.py cobo_waas2/models/refresh_token_request.py cobo_waas2/models/refund.py cobo_waas2/models/refund_disposition.py +cobo_waas2/models/refund_link_business_info.py cobo_waas2/models/refund_status.py cobo_waas2/models/refund_type.py cobo_waas2/models/replace_type.py @@ -505,6 +508,9 @@ cobo_waas2/models/tokenization_contract_call_params_data.py cobo_waas2/models/tokenization_contract_call_request.py cobo_waas2/models/tokenization_contract_call_type.py cobo_waas2/models/tokenization_erc20_token_params.py +cobo_waas2/models/tokenization_erc20_token_permission_params.py +cobo_waas2/models/tokenization_erc20_wrapped_token_params.py +cobo_waas2/models/tokenization_erc20_wrapped_token_permission_params.py cobo_waas2/models/tokenization_estimate_fee_request.py cobo_waas2/models/tokenization_estimate_fee_request_operation_params.py cobo_waas2/models/tokenization_evm_contract_call_params.py @@ -516,6 +522,8 @@ cobo_waas2/models/tokenization_issued_token_request.py cobo_waas2/models/tokenization_list_activities_response.py cobo_waas2/models/tokenization_list_enabled_chains_response.py cobo_waas2/models/tokenization_list_holdings_response.py +cobo_waas2/models/tokenization_list_permissions_response.py +cobo_waas2/models/tokenization_list_permissions_response_data_inner.py cobo_waas2/models/tokenization_list_token_info_response.py cobo_waas2/models/tokenization_mint_estimate_fee_params.py cobo_waas2/models/tokenization_mint_token_params.py @@ -528,23 +536,25 @@ cobo_waas2/models/tokenization_operation_type.py cobo_waas2/models/tokenization_pause_estimate_fee_params.py cobo_waas2/models/tokenization_pause_token_params.py cobo_waas2/models/tokenization_pause_token_request.py +cobo_waas2/models/tokenization_permission_action.py cobo_waas2/models/tokenization_sol_contract_call_params.py cobo_waas2/models/tokenization_sol_token_params.py cobo_waas2/models/tokenization_sol_token_permission_params.py +cobo_waas2/models/tokenization_sol_wrapped_token_params.py +cobo_waas2/models/tokenization_sol_wrapped_token_permission_params.py cobo_waas2/models/tokenization_status.py cobo_waas2/models/tokenization_toggle_allowlist_estimate_fee_params.py cobo_waas2/models/tokenization_token_detail_info.py cobo_waas2/models/tokenization_token_info.py cobo_waas2/models/tokenization_token_operation_source.py cobo_waas2/models/tokenization_token_permission.py -cobo_waas2/models/tokenization_token_permission_params.py cobo_waas2/models/tokenization_token_permission_type.py -cobo_waas2/models/tokenization_token_permissions_response.py cobo_waas2/models/tokenization_token_standard.py cobo_waas2/models/tokenization_unpause_estimate_fee_params.py cobo_waas2/models/tokenization_unpause_token_params.py cobo_waas2/models/tokenization_unpause_token_request.py cobo_waas2/models/tokenization_update_address_action.py +cobo_waas2/models/tokenization_update_address_permissions.py cobo_waas2/models/tokenization_update_allowlist_addresses_estimate_fee_params.py cobo_waas2/models/tokenization_update_allowlist_addresses_params.py cobo_waas2/models/tokenization_update_allowlist_addresses_params_addresses_inner.py @@ -553,6 +563,9 @@ cobo_waas2/models/tokenization_update_blocklist_addresses_estimate_fee_params.py cobo_waas2/models/tokenization_update_blocklist_addresses_params.py cobo_waas2/models/tokenization_update_blocklist_addresses_params_addresses_inner.py cobo_waas2/models/tokenization_update_blocklist_addresses_request.py +cobo_waas2/models/tokenization_update_permissions_estimate_fee_params.py +cobo_waas2/models/tokenization_update_permissions_params.py +cobo_waas2/models/tokenization_update_permissions_request.py cobo_waas2/models/tokenization_web3_operation_source.py cobo_waas2/models/tokens_event_data.py cobo_waas2/models/top_up_address.py @@ -863,6 +876,7 @@ docs/CreateOrderLinkRequest.md docs/CreatePaymentOrderRequest.md docs/CreatePrimeBrokerAddress201Response.md docs/CreatePrimeBrokerAddressRequest.md +docs/CreateRefundLinkRequest.md docs/CreateRefundRequest.md docs/CreateSafeWalletParams.md docs/CreateSettlement.md @@ -962,6 +976,7 @@ docs/FeeStationCheckFeeStationUsage.md docs/FeeStationCheckFeeStationUsageResponse.md docs/FeeStationDestination.md docs/FeeStationGasStationType.md +docs/FeeStationSponsorTransactionDescription.md docs/FeeStationTransactionType.md docs/FeeStationTransfer.md docs/FeeType.md @@ -1120,6 +1135,7 @@ docs/RefreshToken2XXResponse.md docs/RefreshTokenRequest.md docs/Refund.md docs/RefundDisposition.md +docs/RefundLinkBusinessInfo.md docs/RefundStatus.md docs/RefundType.md docs/ReplaceType.md @@ -1265,6 +1281,9 @@ docs/TokenizationContractCallParamsData.md docs/TokenizationContractCallRequest.md docs/TokenizationContractCallType.md docs/TokenizationERC20TokenParams.md +docs/TokenizationERC20TokenPermissionParams.md +docs/TokenizationERC20WrappedTokenParams.md +docs/TokenizationERC20WrappedTokenPermissionParams.md docs/TokenizationEstimateFeeRequest.md docs/TokenizationEstimateFeeRequestOperationParams.md docs/TokenizationEvmContractCallParams.md @@ -1276,6 +1295,8 @@ docs/TokenizationIssuedTokenRequest.md docs/TokenizationListActivitiesResponse.md docs/TokenizationListEnabledChainsResponse.md docs/TokenizationListHoldingsResponse.md +docs/TokenizationListPermissionsResponse.md +docs/TokenizationListPermissionsResponseDataInner.md docs/TokenizationListTokenInfoResponse.md docs/TokenizationMintEstimateFeeParams.md docs/TokenizationMintTokenParams.md @@ -1288,23 +1309,25 @@ docs/TokenizationOperationType.md docs/TokenizationPauseEstimateFeeParams.md docs/TokenizationPauseTokenParams.md docs/TokenizationPauseTokenRequest.md +docs/TokenizationPermissionAction.md docs/TokenizationSOLTokenParams.md +docs/TokenizationSOLWrappedTokenParams.md docs/TokenizationSolContractCallParams.md docs/TokenizationSolTokenPermissionParams.md +docs/TokenizationSolWrappedTokenPermissionParams.md docs/TokenizationStatus.md docs/TokenizationToggleAllowlistEstimateFeeParams.md docs/TokenizationTokenDetailInfo.md docs/TokenizationTokenInfo.md docs/TokenizationTokenOperationSource.md docs/TokenizationTokenPermission.md -docs/TokenizationTokenPermissionParams.md docs/TokenizationTokenPermissionType.md -docs/TokenizationTokenPermissionsResponse.md docs/TokenizationTokenStandard.md docs/TokenizationUnpauseEstimateFeeParams.md docs/TokenizationUnpauseTokenParams.md docs/TokenizationUnpauseTokenRequest.md docs/TokenizationUpdateAddressAction.md +docs/TokenizationUpdateAddressPermissions.md docs/TokenizationUpdateAllowlistAddressesEstimateFeeParams.md docs/TokenizationUpdateAllowlistAddressesParams.md docs/TokenizationUpdateAllowlistAddressesParamsAddressesInner.md @@ -1313,6 +1336,9 @@ docs/TokenizationUpdateBlocklistAddressesEstimateFeeParams.md docs/TokenizationUpdateBlocklistAddressesParams.md docs/TokenizationUpdateBlocklistAddressesParamsAddressesInner.md docs/TokenizationUpdateBlocklistAddressesRequest.md +docs/TokenizationUpdatePermissionsEstimateFeeParams.md +docs/TokenizationUpdatePermissionsParams.md +docs/TokenizationUpdatePermissionsRequest.md docs/TokenizationWeb3OperationSource.md docs/TokensEventData.md docs/TopUpAddress.md @@ -1593,6 +1619,7 @@ test/test_create_order_link_request.py test/test_create_payment_order_request.py test/test_create_prime_broker_address201_response.py test/test_create_prime_broker_address_request.py +test/test_create_refund_link_request.py test/test_create_refund_request.py test/test_create_safe_wallet_params.py test/test_create_settlement.py @@ -1690,6 +1717,7 @@ test/test_fee_station_check_fee_station_usage.py test/test_fee_station_check_fee_station_usage_response.py test/test_fee_station_destination.py test/test_fee_station_gas_station_type.py +test/test_fee_station_sponsor_transaction_description.py test/test_fee_station_transaction_type.py test/test_fee_station_transfer.py test/test_fee_type.py @@ -1850,6 +1878,7 @@ test/test_refresh_token2_xx_response.py test/test_refresh_token_request.py test/test_refund.py test/test_refund_disposition.py +test/test_refund_link_business_info.py test/test_refund_status.py test/test_refund_type.py test/test_replace_type.py @@ -1955,6 +1984,9 @@ test/test_tokenization_contract_call_params_data.py test/test_tokenization_contract_call_request.py test/test_tokenization_contract_call_type.py test/test_tokenization_erc20_token_params.py +test/test_tokenization_erc20_token_permission_params.py +test/test_tokenization_erc20_wrapped_token_params.py +test/test_tokenization_erc20_wrapped_token_permission_params.py test/test_tokenization_estimate_fee_request.py test/test_tokenization_estimate_fee_request_operation_params.py test/test_tokenization_evm_contract_call_params.py @@ -1966,6 +1998,8 @@ test/test_tokenization_issued_token_request.py test/test_tokenization_list_activities_response.py test/test_tokenization_list_enabled_chains_response.py test/test_tokenization_list_holdings_response.py +test/test_tokenization_list_permissions_response.py +test/test_tokenization_list_permissions_response_data_inner.py test/test_tokenization_list_token_info_response.py test/test_tokenization_mint_estimate_fee_params.py test/test_tokenization_mint_token_params.py @@ -1978,23 +2012,25 @@ test/test_tokenization_operation_type.py test/test_tokenization_pause_estimate_fee_params.py test/test_tokenization_pause_token_params.py test/test_tokenization_pause_token_request.py +test/test_tokenization_permission_action.py test/test_tokenization_sol_contract_call_params.py test/test_tokenization_sol_token_params.py test/test_tokenization_sol_token_permission_params.py +test/test_tokenization_sol_wrapped_token_params.py +test/test_tokenization_sol_wrapped_token_permission_params.py test/test_tokenization_status.py test/test_tokenization_toggle_allowlist_estimate_fee_params.py test/test_tokenization_token_detail_info.py test/test_tokenization_token_info.py test/test_tokenization_token_operation_source.py test/test_tokenization_token_permission.py -test/test_tokenization_token_permission_params.py test/test_tokenization_token_permission_type.py -test/test_tokenization_token_permissions_response.py test/test_tokenization_token_standard.py test/test_tokenization_unpause_estimate_fee_params.py test/test_tokenization_unpause_token_params.py test/test_tokenization_unpause_token_request.py test/test_tokenization_update_address_action.py +test/test_tokenization_update_address_permissions.py test/test_tokenization_update_allowlist_addresses_estimate_fee_params.py test/test_tokenization_update_allowlist_addresses_params.py test/test_tokenization_update_allowlist_addresses_params_addresses_inner.py @@ -2003,6 +2039,9 @@ test/test_tokenization_update_blocklist_addresses_estimate_fee_params.py test/test_tokenization_update_blocklist_addresses_params.py test/test_tokenization_update_blocklist_addresses_params_addresses_inner.py test/test_tokenization_update_blocklist_addresses_request.py +test/test_tokenization_update_permissions_estimate_fee_params.py +test/test_tokenization_update_permissions_params.py +test/test_tokenization_update_permissions_request.py test/test_tokenization_web3_operation_source.py test/test_tokens_event_data.py test/test_top_up_address.py diff --git a/README.md b/README.md index 68115d22..e6ce8ad9 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ For more information about the WaaS 2.0 API, see [Introduction to WaaS 2.0](http This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project: - API version: v2 -- Package version: 1.25.0 +- Package version: 1.26.0 - Generator version: 7.6.0 - Build package: org.openapitools.codegen.languages.PythonClientCodegen For more information, please visit [https://www.cobo.com/waas](https://www.cobo.com/waas) @@ -27,7 +27,7 @@ Python 3.7+ ### pip install ```sh -pip install cobo-waas2==1.25.0 +pip install cobo-waas2==1.26.0 ``` Then import the package: @@ -88,7 +88,7 @@ Class | Method | HTTP request | Description *AppWorkflowsApi* | [**list_approval_requests**](docs/AppWorkflowsApi.md#list_approval_requests) | **GET** /app/workflows/approval_requests | List approval requests *AppWorkflowsApi* | [**revoke_approval_request**](docs/AppWorkflowsApi.md#revoke_approval_request) | **POST** /app/workflows/approval_requests/{approval_id}/revoke | Revoke approval request *AutoSweepApi* | [**create_auto_sweep_task**](docs/AutoSweepApi.md#create_auto_sweep_task) | **POST** /auto_sweep/tasks | Create auto-sweep task -*AutoSweepApi* | [**create_wallet_sweep_to_addresses**](docs/AutoSweepApi.md#create_wallet_sweep_to_addresses) | **POST** /auto_sweep/sweep_to_addresses | create sweep-to address +*AutoSweepApi* | [**create_wallet_sweep_to_addresses**](docs/AutoSweepApi.md#create_wallet_sweep_to_addresses) | **POST** /auto_sweep/sweep_to_addresses | Create sweep-to address *AutoSweepApi* | [**get_auto_sweep_task_by_id**](docs/AutoSweepApi.md#get_auto_sweep_task_by_id) | **GET** /auto_sweep/tasks/{task_id} | Get auto-sweep task details *AutoSweepApi* | [**list_auto_sweep_task**](docs/AutoSweepApi.md#list_auto_sweep_task) | **GET** /auto_sweep/tasks | List auto-sweep tasks *AutoSweepApi* | [**list_wallet_sweep_to_addresses**](docs/AutoSweepApi.md#list_wallet_sweep_to_addresses) | **GET** /auto_sweep/sweep_to_addresses | List sweep-to addresses @@ -113,7 +113,7 @@ Class | Method | HTTP request | Description *DevelopersWebhooksApi* | [**trigger_test_webhook_event**](docs/DevelopersWebhooksApi.md#trigger_test_webhook_event) | **POST** /webhooks/events/trigger | Trigger test event *DevelopersWebhooksApi* | [**update_webhook_endpoint_by_id**](docs/DevelopersWebhooksApi.md#update_webhook_endpoint_by_id) | **PUT** /webhooks/endpoints/{endpoint_id} | Update webhook endpoint *FeeStationApi* | [**check_fee_station_usage**](docs/FeeStationApi.md#check_fee_station_usage) | **POST** /fee_station/check_fee_station_usage | Check Fee Station usage -*FeeStationApi* | [**estimate_fee_station_fee**](docs/FeeStationApi.md#estimate_fee_station_fee) | **POST** /fee_station/transactions/estimate_fee | Estimate fee for Fee Station transaction +*FeeStationApi* | [**estimate_fee_station_fee**](docs/FeeStationApi.md#estimate_fee_station_fee) | **POST** /fee_station/transactions/estimate_fee | Estimate transaction fee *FeeStationApi* | [**get_fee_station_transaction_by_id**](docs/FeeStationApi.md#get_fee_station_transaction_by_id) | **GET** /fee_station/transactions/{transaction_id} | Get Fee Station transaction information *FeeStationApi* | [**list_fee_station_addresses**](docs/FeeStationApi.md#list_fee_station_addresses) | **GET** /fee_station/addresses | List Fee Station addresses *FeeStationApi* | [**list_fee_station_transactions**](docs/FeeStationApi.md#list_fee_station_transactions) | **GET** /fee_station/transactions | List all Fee Station transactions @@ -130,6 +130,7 @@ Class | Method | HTTP request | Description *PaymentApi* | [**create_order_link**](docs/PaymentApi.md#create_order_link) | **POST** /payments/links/orders | Create order link *PaymentApi* | [**create_payment_order**](docs/PaymentApi.md#create_payment_order) | **POST** /payments/orders | Create pay-in order *PaymentApi* | [**create_refund**](docs/PaymentApi.md#create_refund) | **POST** /payments/refunds | Create refund order +*PaymentApi* | [**create_refund_link**](docs/PaymentApi.md#create_refund_link) | **POST** /payments/links/refunds | Create refund link *PaymentApi* | [**create_settlement_request**](docs/PaymentApi.md#create_settlement_request) | **POST** /payments/settlement_requests | Create settlement request *PaymentApi* | [**delete_crypto_address**](docs/PaymentApi.md#delete_crypto_address) | **POST** /payments/crypto_addresses/{crypto_address_id}/delete | Delete crypto address *PaymentApi* | [**get_exchange_rate**](docs/PaymentApi.md#get_exchange_rate) | **GET** /payments/exchange_rates/{token_id}/{currency} | Get exchange rate @@ -202,6 +203,7 @@ Class | Method | HTTP request | Description *TokenizationApi* | [**list_tokenization_allowlist_addresses**](docs/TokenizationApi.md#list_tokenization_allowlist_addresses) | **GET** /tokenization/tokens/{token_id}/allowlist/addresses | List addresses on allowlist *TokenizationApi* | [**list_tokenization_blocklist_addresses**](docs/TokenizationApi.md#list_tokenization_blocklist_addresses) | **GET** /tokenization/tokens/{token_id}/blocklist/addresses | List addresses on blocklist *TokenizationApi* | [**list_tokenization_holdings**](docs/TokenizationApi.md#list_tokenization_holdings) | **GET** /tokenization/tokens/{token_id}/holdings | Get token holdings information +*TokenizationApi* | [**list_tokenization_permissions**](docs/TokenizationApi.md#list_tokenization_permissions) | **GET** /tokenization/tokens/{token_id}/permissions | List token permissions *TokenizationApi* | [**list_tokenization_supported_chains**](docs/TokenizationApi.md#list_tokenization_supported_chains) | **GET** /tokenization/enabled_chains | List supported chains for tokenization *TokenizationApi* | [**mint_tokenization**](docs/TokenizationApi.md#mint_tokenization) | **POST** /tokenization/tokens/{token_id}/mint | Mint tokens *TokenizationApi* | [**pause_tokenization**](docs/TokenizationApi.md#pause_tokenization) | **POST** /tokenization/tokens/{token_id}/pause | Pause token contract @@ -210,6 +212,7 @@ Class | Method | HTTP request | Description *TokenizationApi* | [**update_tokenization_allowlist_activation**](docs/TokenizationApi.md#update_tokenization_allowlist_activation) | **POST** /tokenization/tokens/{token_id}/allowlist/activation | Activate or deactivate allowlist *TokenizationApi* | [**update_tokenization_allowlist_addresses**](docs/TokenizationApi.md#update_tokenization_allowlist_addresses) | **POST** /tokenization/tokens/{token_id}/allowlist/addresses | Update addresses on allowlist *TokenizationApi* | [**update_tokenization_blocklist_addresses**](docs/TokenizationApi.md#update_tokenization_blocklist_addresses) | **POST** /tokenization/tokens/{token_id}/blocklist/addresses | Update addresses on blocklist +*TokenizationApi* | [**update_tokenization_permissions**](docs/TokenizationApi.md#update_tokenization_permissions) | **POST** /tokenization/tokens/{token_id}/permissions | Update token permissions *TransactionsApi* | [**broadcast_signed_transactions**](docs/TransactionsApi.md#broadcast_signed_transactions) | **POST** /transactions/broadcast | Broadcast signed transactions *TransactionsApi* | [**cancel_transaction_by_id**](docs/TransactionsApi.md#cancel_transaction_by_id) | **POST** /transactions/{transaction_id}/cancel | Cancel transaction *TransactionsApi* | [**check_loop_transfers**](docs/TransactionsApi.md#check_loop_transfers) | **GET** /transactions/check_loop_transfers | Check Cobo Loop transfers @@ -406,6 +409,7 @@ Class | Method | HTTP request | Description - [CreatePaymentOrderRequest](docs/CreatePaymentOrderRequest.md) - [CreatePrimeBrokerAddress201Response](docs/CreatePrimeBrokerAddress201Response.md) - [CreatePrimeBrokerAddressRequest](docs/CreatePrimeBrokerAddressRequest.md) + - [CreateRefundLinkRequest](docs/CreateRefundLinkRequest.md) - [CreateRefundRequest](docs/CreateRefundRequest.md) - [CreateSafeWalletParams](docs/CreateSafeWalletParams.md) - [CreateSettlement](docs/CreateSettlement.md) @@ -502,6 +506,7 @@ Class | Method | HTTP request | Description - [FeeStationCheckFeeStationUsageResponse](docs/FeeStationCheckFeeStationUsageResponse.md) - [FeeStationDestination](docs/FeeStationDestination.md) - [FeeStationGasStationType](docs/FeeStationGasStationType.md) + - [FeeStationSponsorTransactionDescription](docs/FeeStationSponsorTransactionDescription.md) - [FeeStationTransactionType](docs/FeeStationTransactionType.md) - [FeeStationTransfer](docs/FeeStationTransfer.md) - [FeeType](docs/FeeType.md) @@ -656,6 +661,7 @@ Class | Method | HTTP request | Description - [RefreshTokenRequest](docs/RefreshTokenRequest.md) - [Refund](docs/Refund.md) - [RefundDisposition](docs/RefundDisposition.md) + - [RefundLinkBusinessInfo](docs/RefundLinkBusinessInfo.md) - [RefundStatus](docs/RefundStatus.md) - [RefundType](docs/RefundType.md) - [ReplaceType](docs/ReplaceType.md) @@ -798,6 +804,9 @@ Class | Method | HTTP request | Description - [TokenizationContractCallRequest](docs/TokenizationContractCallRequest.md) - [TokenizationContractCallType](docs/TokenizationContractCallType.md) - [TokenizationERC20TokenParams](docs/TokenizationERC20TokenParams.md) + - [TokenizationERC20TokenPermissionParams](docs/TokenizationERC20TokenPermissionParams.md) + - [TokenizationERC20WrappedTokenParams](docs/TokenizationERC20WrappedTokenParams.md) + - [TokenizationERC20WrappedTokenPermissionParams](docs/TokenizationERC20WrappedTokenPermissionParams.md) - [TokenizationEstimateFeeRequest](docs/TokenizationEstimateFeeRequest.md) - [TokenizationEstimateFeeRequestOperationParams](docs/TokenizationEstimateFeeRequestOperationParams.md) - [TokenizationEvmContractCallParams](docs/TokenizationEvmContractCallParams.md) @@ -809,6 +818,8 @@ Class | Method | HTTP request | Description - [TokenizationListActivitiesResponse](docs/TokenizationListActivitiesResponse.md) - [TokenizationListEnabledChainsResponse](docs/TokenizationListEnabledChainsResponse.md) - [TokenizationListHoldingsResponse](docs/TokenizationListHoldingsResponse.md) + - [TokenizationListPermissionsResponse](docs/TokenizationListPermissionsResponse.md) + - [TokenizationListPermissionsResponseDataInner](docs/TokenizationListPermissionsResponseDataInner.md) - [TokenizationListTokenInfoResponse](docs/TokenizationListTokenInfoResponse.md) - [TokenizationMintEstimateFeeParams](docs/TokenizationMintEstimateFeeParams.md) - [TokenizationMintTokenParams](docs/TokenizationMintTokenParams.md) @@ -821,23 +832,25 @@ Class | Method | HTTP request | Description - [TokenizationPauseEstimateFeeParams](docs/TokenizationPauseEstimateFeeParams.md) - [TokenizationPauseTokenParams](docs/TokenizationPauseTokenParams.md) - [TokenizationPauseTokenRequest](docs/TokenizationPauseTokenRequest.md) + - [TokenizationPermissionAction](docs/TokenizationPermissionAction.md) - [TokenizationSOLTokenParams](docs/TokenizationSOLTokenParams.md) + - [TokenizationSOLWrappedTokenParams](docs/TokenizationSOLWrappedTokenParams.md) - [TokenizationSolContractCallParams](docs/TokenizationSolContractCallParams.md) - [TokenizationSolTokenPermissionParams](docs/TokenizationSolTokenPermissionParams.md) + - [TokenizationSolWrappedTokenPermissionParams](docs/TokenizationSolWrappedTokenPermissionParams.md) - [TokenizationStatus](docs/TokenizationStatus.md) - [TokenizationToggleAllowlistEstimateFeeParams](docs/TokenizationToggleAllowlistEstimateFeeParams.md) - [TokenizationTokenDetailInfo](docs/TokenizationTokenDetailInfo.md) - [TokenizationTokenInfo](docs/TokenizationTokenInfo.md) - [TokenizationTokenOperationSource](docs/TokenizationTokenOperationSource.md) - [TokenizationTokenPermission](docs/TokenizationTokenPermission.md) - - [TokenizationTokenPermissionParams](docs/TokenizationTokenPermissionParams.md) - [TokenizationTokenPermissionType](docs/TokenizationTokenPermissionType.md) - - [TokenizationTokenPermissionsResponse](docs/TokenizationTokenPermissionsResponse.md) - [TokenizationTokenStandard](docs/TokenizationTokenStandard.md) - [TokenizationUnpauseEstimateFeeParams](docs/TokenizationUnpauseEstimateFeeParams.md) - [TokenizationUnpauseTokenParams](docs/TokenizationUnpauseTokenParams.md) - [TokenizationUnpauseTokenRequest](docs/TokenizationUnpauseTokenRequest.md) - [TokenizationUpdateAddressAction](docs/TokenizationUpdateAddressAction.md) + - [TokenizationUpdateAddressPermissions](docs/TokenizationUpdateAddressPermissions.md) - [TokenizationUpdateAllowlistAddressesEstimateFeeParams](docs/TokenizationUpdateAllowlistAddressesEstimateFeeParams.md) - [TokenizationUpdateAllowlistAddressesParams](docs/TokenizationUpdateAllowlistAddressesParams.md) - [TokenizationUpdateAllowlistAddressesParamsAddressesInner](docs/TokenizationUpdateAllowlistAddressesParamsAddressesInner.md) @@ -846,6 +859,9 @@ Class | Method | HTTP request | Description - [TokenizationUpdateBlocklistAddressesParams](docs/TokenizationUpdateBlocklistAddressesParams.md) - [TokenizationUpdateBlocklistAddressesParamsAddressesInner](docs/TokenizationUpdateBlocklistAddressesParamsAddressesInner.md) - [TokenizationUpdateBlocklistAddressesRequest](docs/TokenizationUpdateBlocklistAddressesRequest.md) + - [TokenizationUpdatePermissionsEstimateFeeParams](docs/TokenizationUpdatePermissionsEstimateFeeParams.md) + - [TokenizationUpdatePermissionsParams](docs/TokenizationUpdatePermissionsParams.md) + - [TokenizationUpdatePermissionsRequest](docs/TokenizationUpdatePermissionsRequest.md) - [TokenizationWeb3OperationSource](docs/TokenizationWeb3OperationSource.md) - [TokensEventData](docs/TokensEventData.md) - [TopUpAddress](docs/TopUpAddress.md) diff --git a/cobo_waas2/__init__.py b/cobo_waas2/__init__.py index eec9703b..2f1d7f5a 100644 --- a/cobo_waas2/__init__.py +++ b/cobo_waas2/__init__.py @@ -12,7 +12,7 @@ """ # noqa: E501 -__version__ = "1.25.0" +__version__ = "1.26.0" # import apis into sdk package from cobo_waas2.api.address_books_api import AddressBooksApi @@ -165,6 +165,7 @@ from cobo_waas2.models.create_payment_order_request import CreatePaymentOrderRequest from cobo_waas2.models.create_prime_broker_address201_response import CreatePrimeBrokerAddress201Response from cobo_waas2.models.create_prime_broker_address_request import CreatePrimeBrokerAddressRequest +from cobo_waas2.models.create_refund_link_request import CreateRefundLinkRequest from cobo_waas2.models.create_refund_request import CreateRefundRequest from cobo_waas2.models.create_safe_wallet_params import CreateSafeWalletParams from cobo_waas2.models.create_settlement import CreateSettlement @@ -261,6 +262,7 @@ from cobo_waas2.models.fee_station_check_fee_station_usage_response import FeeStationCheckFeeStationUsageResponse from cobo_waas2.models.fee_station_destination import FeeStationDestination from cobo_waas2.models.fee_station_gas_station_type import FeeStationGasStationType +from cobo_waas2.models.fee_station_sponsor_transaction_description import FeeStationSponsorTransactionDescription from cobo_waas2.models.fee_station_transaction_type import FeeStationTransactionType from cobo_waas2.models.fee_station_transfer import FeeStationTransfer from cobo_waas2.models.fee_type import FeeType @@ -415,6 +417,7 @@ from cobo_waas2.models.refresh_token_request import RefreshTokenRequest from cobo_waas2.models.refund import Refund from cobo_waas2.models.refund_disposition import RefundDisposition +from cobo_waas2.models.refund_link_business_info import RefundLinkBusinessInfo from cobo_waas2.models.refund_status import RefundStatus from cobo_waas2.models.refund_type import RefundType from cobo_waas2.models.replace_type import ReplaceType @@ -557,6 +560,9 @@ from cobo_waas2.models.tokenization_contract_call_request import TokenizationContractCallRequest from cobo_waas2.models.tokenization_contract_call_type import TokenizationContractCallType from cobo_waas2.models.tokenization_erc20_token_params import TokenizationERC20TokenParams +from cobo_waas2.models.tokenization_erc20_token_permission_params import TokenizationERC20TokenPermissionParams +from cobo_waas2.models.tokenization_erc20_wrapped_token_params import TokenizationERC20WrappedTokenParams +from cobo_waas2.models.tokenization_erc20_wrapped_token_permission_params import TokenizationERC20WrappedTokenPermissionParams from cobo_waas2.models.tokenization_estimate_fee_request import TokenizationEstimateFeeRequest from cobo_waas2.models.tokenization_estimate_fee_request_operation_params import TokenizationEstimateFeeRequestOperationParams from cobo_waas2.models.tokenization_evm_contract_call_params import TokenizationEvmContractCallParams @@ -568,6 +574,8 @@ from cobo_waas2.models.tokenization_list_activities_response import TokenizationListActivitiesResponse from cobo_waas2.models.tokenization_list_enabled_chains_response import TokenizationListEnabledChainsResponse from cobo_waas2.models.tokenization_list_holdings_response import TokenizationListHoldingsResponse +from cobo_waas2.models.tokenization_list_permissions_response import TokenizationListPermissionsResponse +from cobo_waas2.models.tokenization_list_permissions_response_data_inner import TokenizationListPermissionsResponseDataInner from cobo_waas2.models.tokenization_list_token_info_response import TokenizationListTokenInfoResponse from cobo_waas2.models.tokenization_mint_estimate_fee_params import TokenizationMintEstimateFeeParams from cobo_waas2.models.tokenization_mint_token_params import TokenizationMintTokenParams @@ -580,23 +588,25 @@ from cobo_waas2.models.tokenization_pause_estimate_fee_params import TokenizationPauseEstimateFeeParams from cobo_waas2.models.tokenization_pause_token_params import TokenizationPauseTokenParams from cobo_waas2.models.tokenization_pause_token_request import TokenizationPauseTokenRequest +from cobo_waas2.models.tokenization_permission_action import TokenizationPermissionAction from cobo_waas2.models.tokenization_sol_token_params import TokenizationSOLTokenParams +from cobo_waas2.models.tokenization_sol_wrapped_token_params import TokenizationSOLWrappedTokenParams from cobo_waas2.models.tokenization_sol_contract_call_params import TokenizationSolContractCallParams from cobo_waas2.models.tokenization_sol_token_permission_params import TokenizationSolTokenPermissionParams +from cobo_waas2.models.tokenization_sol_wrapped_token_permission_params import TokenizationSolWrappedTokenPermissionParams from cobo_waas2.models.tokenization_status import TokenizationStatus from cobo_waas2.models.tokenization_toggle_allowlist_estimate_fee_params import TokenizationToggleAllowlistEstimateFeeParams from cobo_waas2.models.tokenization_token_detail_info import TokenizationTokenDetailInfo from cobo_waas2.models.tokenization_token_info import TokenizationTokenInfo from cobo_waas2.models.tokenization_token_operation_source import TokenizationTokenOperationSource from cobo_waas2.models.tokenization_token_permission import TokenizationTokenPermission -from cobo_waas2.models.tokenization_token_permission_params import TokenizationTokenPermissionParams from cobo_waas2.models.tokenization_token_permission_type import TokenizationTokenPermissionType -from cobo_waas2.models.tokenization_token_permissions_response import TokenizationTokenPermissionsResponse from cobo_waas2.models.tokenization_token_standard import TokenizationTokenStandard from cobo_waas2.models.tokenization_unpause_estimate_fee_params import TokenizationUnpauseEstimateFeeParams from cobo_waas2.models.tokenization_unpause_token_params import TokenizationUnpauseTokenParams from cobo_waas2.models.tokenization_unpause_token_request import TokenizationUnpauseTokenRequest from cobo_waas2.models.tokenization_update_address_action import TokenizationUpdateAddressAction +from cobo_waas2.models.tokenization_update_address_permissions import TokenizationUpdateAddressPermissions from cobo_waas2.models.tokenization_update_allowlist_addresses_estimate_fee_params import TokenizationUpdateAllowlistAddressesEstimateFeeParams from cobo_waas2.models.tokenization_update_allowlist_addresses_params import TokenizationUpdateAllowlistAddressesParams from cobo_waas2.models.tokenization_update_allowlist_addresses_params_addresses_inner import TokenizationUpdateAllowlistAddressesParamsAddressesInner @@ -605,6 +615,9 @@ from cobo_waas2.models.tokenization_update_blocklist_addresses_params import TokenizationUpdateBlocklistAddressesParams from cobo_waas2.models.tokenization_update_blocklist_addresses_params_addresses_inner import TokenizationUpdateBlocklistAddressesParamsAddressesInner from cobo_waas2.models.tokenization_update_blocklist_addresses_request import TokenizationUpdateBlocklistAddressesRequest +from cobo_waas2.models.tokenization_update_permissions_estimate_fee_params import TokenizationUpdatePermissionsEstimateFeeParams +from cobo_waas2.models.tokenization_update_permissions_params import TokenizationUpdatePermissionsParams +from cobo_waas2.models.tokenization_update_permissions_request import TokenizationUpdatePermissionsRequest from cobo_waas2.models.tokenization_web3_operation_source import TokenizationWeb3OperationSource from cobo_waas2.models.tokens_event_data import TokensEventData from cobo_waas2.models.top_up_address import TopUpAddress diff --git a/cobo_waas2/api/auto_sweep_api.py b/cobo_waas2/api/auto_sweep_api.py index 70df3d16..b4da9eb7 100644 --- a/cobo_waas2/api/auto_sweep_api.py +++ b/cobo_waas2/api/auto_sweep_api.py @@ -222,7 +222,7 @@ def create_wallet_sweep_to_addresses( ] ] = None, ) -> SweepToAddress: - """create sweep-to address + """Create sweep-to address This operation creates a new sweep-to address for the specified wallet. The previously sweep-to address for the same token becomes invalid once the new one is created. Use this operation to change the sweep-to address when your setup changes, you switch networks, or the current address is compromised or tainted by suspicious funds. You can withdraw any remaining balances from the old sweep-to addresses to the new address or another designated destination. Sweep-to addresses are only applicable to MPC Wallets and Web3 Wallets with the auto-sweep feature enabled. @@ -268,7 +268,7 @@ def create_wallet_sweep_to_addresses_with_http_info( ] ] = None, ) -> ApiResponse[SweepToAddress]: - """create sweep-to address + """Create sweep-to address This operation creates a new sweep-to address for the specified wallet. The previously sweep-to address for the same token becomes invalid once the new one is created. Use this operation to change the sweep-to address when your setup changes, you switch networks, or the current address is compromised or tainted by suspicious funds. You can withdraw any remaining balances from the old sweep-to addresses to the new address or another designated destination. Sweep-to addresses are only applicable to MPC Wallets and Web3 Wallets with the auto-sweep feature enabled. @@ -314,7 +314,7 @@ def create_wallet_sweep_to_addresses_without_preload_content( ] ] = None, ) -> RESTResponseType: - """create sweep-to address + """Create sweep-to address This operation creates a new sweep-to address for the specified wallet. The previously sweep-to address for the same token becomes invalid once the new one is created. Use this operation to change the sweep-to address when your setup changes, you switch networks, or the current address is compromised or tainted by suspicious funds. You can withdraw any remaining balances from the old sweep-to addresses to the new address or another designated destination. Sweep-to addresses are only applicable to MPC Wallets and Web3 Wallets with the auto-sweep feature enabled. diff --git a/cobo_waas2/api/compliance_api.py b/cobo_waas2/api/compliance_api.py index 9e53afc4..79db2501 100644 --- a/cobo_waas2/api/compliance_api.py +++ b/cobo_waas2/api/compliance_api.py @@ -726,7 +726,7 @@ def _refund_funds_serialize( @validate_call def submit_kyt_manual_review( self, - submit_kyt_screenings_review_body: Annotated[Optional[SubmitKytScreeningsReviewBody], Field(description="The request body to submit a manual review result for KYT screening case that requires human analysis.")] = None, + submit_kyt_screenings_review_body: Annotated[Optional[SubmitKytScreeningsReviewBody], Field(description="The request body to submit a manual review result for a KYT screening case that requires human analysis.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -740,7 +740,7 @@ def submit_kyt_manual_review( This operation submits a manual review result for a KYT (Know Your Transaction) screening case that requires human analysis. Use this endpoint when transactions flagged for manual review have been analyzed by compliance officers and require submission of review outcomes with detailed comments and justifications. This endpoint is specifically designed for submitting comprehensive manual review findings rather than automated screening decisions. Submitting a manual review result will update the KYT screening status and initiate appropriate compliance workflow actions based on the review outcome. - :param submit_kyt_screenings_review_body: The request body to submit a manual review result for KYT screening case that requires human analysis. + :param submit_kyt_screenings_review_body: The request body to submit a manual review result for a KYT screening case that requires human analysis. :type submit_kyt_screenings_review_body: SubmitKytScreeningsReviewBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -772,7 +772,7 @@ def submit_kyt_manual_review( @validate_call def submit_kyt_manual_review_with_http_info( self, - submit_kyt_screenings_review_body: Annotated[Optional[SubmitKytScreeningsReviewBody], Field(description="The request body to submit a manual review result for KYT screening case that requires human analysis.")] = None, + submit_kyt_screenings_review_body: Annotated[Optional[SubmitKytScreeningsReviewBody], Field(description="The request body to submit a manual review result for a KYT screening case that requires human analysis.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -786,7 +786,7 @@ def submit_kyt_manual_review_with_http_info( This operation submits a manual review result for a KYT (Know Your Transaction) screening case that requires human analysis. Use this endpoint when transactions flagged for manual review have been analyzed by compliance officers and require submission of review outcomes with detailed comments and justifications. This endpoint is specifically designed for submitting comprehensive manual review findings rather than automated screening decisions. Submitting a manual review result will update the KYT screening status and initiate appropriate compliance workflow actions based on the review outcome. - :param submit_kyt_screenings_review_body: The request body to submit a manual review result for KYT screening case that requires human analysis. + :param submit_kyt_screenings_review_body: The request body to submit a manual review result for a KYT screening case that requires human analysis. :type submit_kyt_screenings_review_body: SubmitKytScreeningsReviewBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -818,7 +818,7 @@ def submit_kyt_manual_review_with_http_info( @validate_call def submit_kyt_manual_review_without_preload_content( self, - submit_kyt_screenings_review_body: Annotated[Optional[SubmitKytScreeningsReviewBody], Field(description="The request body to submit a manual review result for KYT screening case that requires human analysis.")] = None, + submit_kyt_screenings_review_body: Annotated[Optional[SubmitKytScreeningsReviewBody], Field(description="The request body to submit a manual review result for a KYT screening case that requires human analysis.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -832,7 +832,7 @@ def submit_kyt_manual_review_without_preload_content( This operation submits a manual review result for a KYT (Know Your Transaction) screening case that requires human analysis. Use this endpoint when transactions flagged for manual review have been analyzed by compliance officers and require submission of review outcomes with detailed comments and justifications. This endpoint is specifically designed for submitting comprehensive manual review findings rather than automated screening decisions. Submitting a manual review result will update the KYT screening status and initiate appropriate compliance workflow actions based on the review outcome. - :param submit_kyt_screenings_review_body: The request body to submit a manual review result for KYT screening case that requires human analysis. + :param submit_kyt_screenings_review_body: The request body to submit a manual review result for a KYT screening case that requires human analysis. :type submit_kyt_screenings_review_body: SubmitKytScreeningsReviewBody :param _request_timeout: timeout setting for this request. If one number provided, it will be total request diff --git a/cobo_waas2/api/fee_station_api.py b/cobo_waas2/api/fee_station_api.py index fcaf217f..2db0055c 100644 --- a/cobo_waas2/api/fee_station_api.py +++ b/cobo_waas2/api/fee_station_api.py @@ -57,7 +57,7 @@ def check_fee_station_usage( ) -> FeeStationCheckFeeStationUsageResponse: """Check Fee Station usage - This operation evaluates Fee Station usage for the current transaction. It determines whether Fee station can be used, checks if the Fee Station balance is sufficient, and returns a breakdown of the amounts involved, including any portion that must be covered by the user or sponsored in USDT (U). + This operation evaluates Fee Station usage for the current transaction. It determines whether Fee station can be used, checks if the Fee Station balance is sufficient, and returns a breakdown of the amounts involved, including any portion that must be covered by the user or sponsored in USD stablecoin. :param fee_station_check_fee_station_usage: The information for evaluating Fee Station usage. :type fee_station_check_fee_station_usage: FeeStationCheckFeeStationUsage @@ -103,7 +103,7 @@ def check_fee_station_usage_with_http_info( ) -> ApiResponse[FeeStationCheckFeeStationUsageResponse]: """Check Fee Station usage - This operation evaluates Fee Station usage for the current transaction. It determines whether Fee station can be used, checks if the Fee Station balance is sufficient, and returns a breakdown of the amounts involved, including any portion that must be covered by the user or sponsored in USDT (U). + This operation evaluates Fee Station usage for the current transaction. It determines whether Fee station can be used, checks if the Fee Station balance is sufficient, and returns a breakdown of the amounts involved, including any portion that must be covered by the user or sponsored in USD stablecoin. :param fee_station_check_fee_station_usage: The information for evaluating Fee Station usage. :type fee_station_check_fee_station_usage: FeeStationCheckFeeStationUsage @@ -149,7 +149,7 @@ def check_fee_station_usage_without_preload_content( ) -> RESTResponseType: """Check Fee Station usage - This operation evaluates Fee Station usage for the current transaction. It determines whether Fee station can be used, checks if the Fee Station balance is sufficient, and returns a breakdown of the amounts involved, including any portion that must be covered by the user or sponsored in USDT (U). + This operation evaluates Fee Station usage for the current transaction. It determines whether Fee station can be used, checks if the Fee Station balance is sufficient, and returns a breakdown of the amounts involved, including any portion that must be covered by the user or sponsored in USD stablecoin. :param fee_station_check_fee_station_usage: The information for evaluating Fee Station usage. :type fee_station_check_fee_station_usage: FeeStationCheckFeeStationUsage @@ -224,9 +224,9 @@ def estimate_fee_station_fee( ] ] = None, ) -> EstimatedFixedFee: - """Estimate fee for Fee Station transaction + """Estimate transaction fee - This operation estimates the gas fee required for a top-up transaction sent by [Fee Station](https://manuals.cobo.com/en/portal/fee-station/introduction) to provide gas to the sender of the original transaction. You need to provide the token ID and transfer amount. For more information about transaction fee models and how fees are calculated, refer to [Estimate transaction fee](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees). + This operation is **deprecated**. Please use the enhanced version [Check Fee Station usage](https://www.cobo.com/developers/v2/api-references/feestation/check-fee-station-usage) instead. This operation estimates the transaction fee of a token transfer based on the fee model that the chain uses, considering factors such as network congestion and transaction complexity. You need to specify the transaction information, including destination address, token ID. The response can contain different properties based on the transaction fee model used by the chain. For the legacy, EIP-1559, and UTXO fee models, Cobo also supports three different transaction speed levels: slow, recommended, and fast. For more information about estimating transaction fees, refer to [Estimate transaction fee](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees). :param fee_station_transfer: The information about a Fee Station top-up transaction. :type fee_station_transfer: FeeStationTransfer @@ -270,9 +270,9 @@ def estimate_fee_station_fee_with_http_info( ] ] = None, ) -> ApiResponse[EstimatedFixedFee]: - """Estimate fee for Fee Station transaction + """Estimate transaction fee - This operation estimates the gas fee required for a top-up transaction sent by [Fee Station](https://manuals.cobo.com/en/portal/fee-station/introduction) to provide gas to the sender of the original transaction. You need to provide the token ID and transfer amount. For more information about transaction fee models and how fees are calculated, refer to [Estimate transaction fee](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees). + This operation is **deprecated**. Please use the enhanced version [Check Fee Station usage](https://www.cobo.com/developers/v2/api-references/feestation/check-fee-station-usage) instead. This operation estimates the transaction fee of a token transfer based on the fee model that the chain uses, considering factors such as network congestion and transaction complexity. You need to specify the transaction information, including destination address, token ID. The response can contain different properties based on the transaction fee model used by the chain. For the legacy, EIP-1559, and UTXO fee models, Cobo also supports three different transaction speed levels: slow, recommended, and fast. For more information about estimating transaction fees, refer to [Estimate transaction fee](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees). :param fee_station_transfer: The information about a Fee Station top-up transaction. :type fee_station_transfer: FeeStationTransfer @@ -316,9 +316,9 @@ def estimate_fee_station_fee_without_preload_content( ] ] = None, ) -> RESTResponseType: - """Estimate fee for Fee Station transaction + """Estimate transaction fee - This operation estimates the gas fee required for a top-up transaction sent by [Fee Station](https://manuals.cobo.com/en/portal/fee-station/introduction) to provide gas to the sender of the original transaction. You need to provide the token ID and transfer amount. For more information about transaction fee models and how fees are calculated, refer to [Estimate transaction fee](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees). + This operation is **deprecated**. Please use the enhanced version [Check Fee Station usage](https://www.cobo.com/developers/v2/api-references/feestation/check-fee-station-usage) instead. This operation estimates the transaction fee of a token transfer based on the fee model that the chain uses, considering factors such as network congestion and transaction complexity. You need to specify the transaction information, including destination address, token ID. The response can contain different properties based on the transaction fee model used by the chain. For the legacy, EIP-1559, and UTXO fee models, Cobo also supports three different transaction speed levels: slow, recommended, and fast. For more information about estimating transaction fees, refer to [Estimate transaction fee](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees). :param fee_station_transfer: The information about a Fee Station top-up transaction. :type fee_station_transfer: FeeStationTransfer diff --git a/cobo_waas2/api/payment_api.py b/cobo_waas2/api/payment_api.py index fc443b44..7d459b09 100644 --- a/cobo_waas2/api/payment_api.py +++ b/cobo_waas2/api/payment_api.py @@ -22,6 +22,7 @@ from cobo_waas2.models.create_merchant_request import CreateMerchantRequest from cobo_waas2.models.create_order_link_request import CreateOrderLinkRequest from cobo_waas2.models.create_payment_order_request import CreatePaymentOrderRequest +from cobo_waas2.models.create_refund_link_request import CreateRefundLinkRequest from cobo_waas2.models.create_refund_request import CreateRefundRequest from cobo_waas2.models.create_settlement_request_request import CreateSettlementRequestRequest from cobo_waas2.models.crypto_address import CryptoAddress @@ -754,7 +755,7 @@ def _create_merchant_serialize( @validate_call def create_order_link( self, - create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link of a pay-in order.")] = None, + create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link for a pay-in order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -766,9 +767,9 @@ def create_order_link( ) -> Link: """Create order link - This operation creates a payment link of a pay-in order. + This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/developers/v2/payments/payment-link). - :param create_order_link_request: The request body to create a payment link of a pay-in order. + :param create_order_link_request: The request body to create a payment link for a pay-in order. :type create_order_link_request: CreateOrderLinkRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -800,7 +801,7 @@ def create_order_link( @validate_call def create_order_link_with_http_info( self, - create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link of a pay-in order.")] = None, + create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link for a pay-in order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -812,9 +813,9 @@ def create_order_link_with_http_info( ) -> ApiResponse[Link]: """Create order link - This operation creates a payment link of a pay-in order. + This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/developers/v2/payments/payment-link). - :param create_order_link_request: The request body to create a payment link of a pay-in order. + :param create_order_link_request: The request body to create a payment link for a pay-in order. :type create_order_link_request: CreateOrderLinkRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -846,7 +847,7 @@ def create_order_link_with_http_info( @validate_call def create_order_link_without_preload_content( self, - create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link of a pay-in order.")] = None, + create_order_link_request: Annotated[Optional[CreateOrderLinkRequest], Field(description="The request body to create a payment link for a pay-in order.")] = None, _request_timeout: Union[ None, Annotated[StrictFloat, Field(gt=0)], @@ -858,9 +859,9 @@ def create_order_link_without_preload_content( ) -> RESTResponseType: """Create order link - This operation creates a payment link of a pay-in order. + This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/developers/v2/payments/payment-link). - :param create_order_link_request: The request body to create a payment link of a pay-in order. + :param create_order_link_request: The request body to create a payment link for a pay-in order. :type create_order_link_request: CreateOrderLinkRequest :param _request_timeout: timeout setting for this request. If one number provided, it will be total request @@ -1258,6 +1259,175 @@ def _create_refund_serialize( files=_files, ) + @validate_call + def create_refund_link( + self, + create_refund_link_request: Annotated[Optional[CreateRefundLinkRequest], Field(description="The request body to create a payment link for a refund.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> Link: + """Create refund link + + This operation creates a payment link for a refund. + + :param create_refund_link_request: The request body to create a payment link for a refund. + :type create_refund_link_request: CreateRefundLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_refund_link_serialize( + create_refund_link_request=create_refund_link_request, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Link", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def create_refund_link_with_http_info( + self, + create_refund_link_request: Annotated[Optional[CreateRefundLinkRequest], Field(description="The request body to create a payment link for a refund.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> ApiResponse[Link]: + """Create refund link + + This operation creates a payment link for a refund. + + :param create_refund_link_request: The request body to create a payment link for a refund. + :type create_refund_link_request: CreateRefundLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_refund_link_serialize( + create_refund_link_request=create_refund_link_request, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Link", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def create_refund_link_without_preload_content( + self, + create_refund_link_request: Annotated[Optional[CreateRefundLinkRequest], Field(description="The request body to create a payment link for a refund.")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> RESTResponseType: + """Create refund link + + This operation creates a payment link for a refund. + + :param create_refund_link_request: The request body to create a payment link for a refund. + :type create_refund_link_request: CreateRefundLinkRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._create_refund_link_serialize( + create_refund_link_request=create_refund_link_request, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "Link", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + def _create_refund_link_serialize( + self, + create_refund_link_request, + ) -> RequestSerialized: + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if create_refund_link_request is not None: + _body_params = create_refund_link_request + + # set the HTTP header `Accept` + _header_params = { + "Accept": "application/json", + "Content-Type": "application/json" + } + + return self.api_client.param_serialize( + method='POST', + resource_path='/payments/links/refunds', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + ) + @validate_call def create_settlement_request( self, @@ -6797,7 +6967,7 @@ def update_top_up_address( ) -> TopUpAddress: """Update top-up address - This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain. + This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain. You can update the top-up address for a given payer a maximum of 10 times. If you exceed this limit, the API request will return an error. :param update_top_up_address: The request body to update top-up address. :type update_top_up_address: UpdateTopUpAddress @@ -6843,7 +7013,7 @@ def update_top_up_address_with_http_info( ) -> ApiResponse[TopUpAddress]: """Update top-up address - This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain. + This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain. You can update the top-up address for a given payer a maximum of 10 times. If you exceed this limit, the API request will return an error. :param update_top_up_address: The request body to update top-up address. :type update_top_up_address: UpdateTopUpAddress @@ -6889,7 +7059,7 @@ def update_top_up_address_without_preload_content( ) -> RESTResponseType: """Update top-up address - This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain. + This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain. You can update the top-up address for a given payer a maximum of 10 times. If you exceed this limit, the API request will return an error. :param update_top_up_address: The request body to update top-up address. :type update_top_up_address: UpdateTopUpAddress diff --git a/cobo_waas2/api/tokenization_api.py b/cobo_waas2/api/tokenization_api.py index 5aef3525..e44befa3 100644 --- a/cobo_waas2/api/tokenization_api.py +++ b/cobo_waas2/api/tokenization_api.py @@ -30,6 +30,7 @@ from cobo_waas2.models.tokenization_list_activities_response import TokenizationListActivitiesResponse from cobo_waas2.models.tokenization_list_enabled_chains_response import TokenizationListEnabledChainsResponse from cobo_waas2.models.tokenization_list_holdings_response import TokenizationListHoldingsResponse +from cobo_waas2.models.tokenization_list_permissions_response import TokenizationListPermissionsResponse from cobo_waas2.models.tokenization_list_token_info_response import TokenizationListTokenInfoResponse from cobo_waas2.models.tokenization_mint_token_request import TokenizationMintTokenRequest from cobo_waas2.models.tokenization_operation_response import TokenizationOperationResponse @@ -41,6 +42,7 @@ from cobo_waas2.models.tokenization_unpause_token_request import TokenizationUnpauseTokenRequest from cobo_waas2.models.tokenization_update_allowlist_addresses_request import TokenizationUpdateAllowlistAddressesRequest from cobo_waas2.models.tokenization_update_blocklist_addresses_request import TokenizationUpdateBlocklistAddressesRequest +from cobo_waas2.models.tokenization_update_permissions_request import TokenizationUpdatePermissionsRequest from cobo_waas2.api_client import ApiClient, RequestSerialized from cobo_waas2.api_response import ApiResponse @@ -75,7 +77,7 @@ def burn_tokenization( ) -> TokenizationOperationResponse: """Burn tokens - This operation burns tokens from a specified address. Creates a burn transaction that will decrease the token supply. + This operation burns tokens from a specified address. Creates a burn transaction that will decrease the token supply. **Note**: This operation is not supported for CoboERC20Wrapper and SOLWrapper tokens. :param token_id: The token ID, which is the unique identifier of a token. (required) :type token_id: str @@ -125,7 +127,7 @@ def burn_tokenization_with_http_info( ) -> ApiResponse[TokenizationOperationResponse]: """Burn tokens - This operation burns tokens from a specified address. Creates a burn transaction that will decrease the token supply. + This operation burns tokens from a specified address. Creates a burn transaction that will decrease the token supply. **Note**: This operation is not supported for CoboERC20Wrapper and SOLWrapper tokens. :param token_id: The token ID, which is the unique identifier of a token. (required) :type token_id: str @@ -175,7 +177,7 @@ def burn_tokenization_without_preload_content( ) -> RESTResponseType: """Burn tokens - This operation burns tokens from a specified address. Creates a burn transaction that will decrease the token supply. + This operation burns tokens from a specified address. Creates a burn transaction that will decrease the token supply. **Note**: This operation is not supported for CoboERC20Wrapper and SOLWrapper tokens. :param token_id: The token ID, which is the unique identifier of a token. (required) :type token_id: str @@ -2328,9 +2330,264 @@ def _list_tokenization_holdings_serialize( files=_files, ) + @validate_call + def list_tokenization_permissions( + self, + token_id: Annotated[StrictStr, Field(description="The token ID, which is the unique identifier of a token.")], + address: Annotated[Optional[StrictStr], Field(description="The address to query permissions for. If not provided, returns all addresses with permissions.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, + after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, + before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, + direction: Annotated[Optional[StrictStr], Field(description="The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> TokenizationListPermissionsResponse: + """List token permissions + + This operation retrieves the permission settings for a tokenization contract. + + :param token_id: The token ID, which is the unique identifier of a token. (required) + :type token_id: str + :param address: The address to query permissions for. If not provided, returns all addresses with permissions. + :type address: str + :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. + :type limit: int + :param after: A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. + :type after: str + :param before: A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. + :type before: str + :param direction: The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. + :type direction: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_tokenization_permissions_serialize( + token_id=token_id, + address=address, + limit=limit, + after=after, + before=before, + direction=direction, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenizationListPermissionsResponse", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def list_tokenization_permissions_with_http_info( + self, + token_id: Annotated[StrictStr, Field(description="The token ID, which is the unique identifier of a token.")], + address: Annotated[Optional[StrictStr], Field(description="The address to query permissions for. If not provided, returns all addresses with permissions.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, + after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, + before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, + direction: Annotated[Optional[StrictStr], Field(description="The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> ApiResponse[TokenizationListPermissionsResponse]: + """List token permissions + + This operation retrieves the permission settings for a tokenization contract. + + :param token_id: The token ID, which is the unique identifier of a token. (required) + :type token_id: str + :param address: The address to query permissions for. If not provided, returns all addresses with permissions. + :type address: str + :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. + :type limit: int + :param after: A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. + :type after: str + :param before: A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. + :type before: str + :param direction: The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. + :type direction: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_tokenization_permissions_serialize( + token_id=token_id, + address=address, + limit=limit, + after=after, + before=before, + direction=direction, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenizationListPermissionsResponse", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def list_tokenization_permissions_without_preload_content( + self, + token_id: Annotated[StrictStr, Field(description="The token ID, which is the unique identifier of a token.")], + address: Annotated[Optional[StrictStr], Field(description="The address to query permissions for. If not provided, returns all addresses with permissions.")] = None, + limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, + after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, + before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, + direction: Annotated[Optional[StrictStr], Field(description="The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. ")] = None, + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> RESTResponseType: + """List token permissions + + This operation retrieves the permission settings for a tokenization contract. + + :param token_id: The token ID, which is the unique identifier of a token. (required) + :type token_id: str + :param address: The address to query permissions for. If not provided, returns all addresses with permissions. + :type address: str + :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. + :type limit: int + :param after: A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. + :type after: str + :param before: A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. + :type before: str + :param direction: The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. + :type direction: str + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._list_tokenization_permissions_serialize( + token_id=token_id, + address=address, + limit=limit, + after=after, + before=before, + direction=direction, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '200': "TokenizationListPermissionsResponse", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + def _list_tokenization_permissions_serialize( + self, + token_id, + address, + limit, + after, + before, + direction, + ) -> RequestSerialized: + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if token_id is not None: + _path_params['token_id'] = token_id + # process the query parameters + if address is not None: + + _query_params.append(('address', address)) + + if limit is not None: + + _query_params.append(('limit', limit)) + + if after is not None: + + _query_params.append(('after', after)) + + if before is not None: + + _query_params.append(('before', before)) + + if direction is not None: + + _query_params.append(('direction', direction)) + + # process the header parameters + # process the form parameters + # process the body parameter + + # set the HTTP header `Accept` + _header_params = { + "Accept": "application/json", + "Content-Type": "application/json" + } + + return self.api_client.param_serialize( + method='GET', + resource_path='/tokenization/tokens/{token_id}/permissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + ) + @validate_call def list_tokenization_supported_chains( self, + token_standard: Annotated[Optional[TokenizationTokenStandard], Field(description="Filter by token standard.")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, @@ -2347,6 +2604,8 @@ def list_tokenization_supported_chains( This operation retrieves a list of tokenization supported chains. + :param token_standard: Filter by token standard. + :type token_standard: TokenizationTokenStandard :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int :param after: A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. @@ -2362,6 +2621,7 @@ def list_tokenization_supported_chains( """ # noqa: E501 _param = self._list_tokenization_supported_chains_serialize( + token_standard=token_standard, limit=limit, after=after, before=before, @@ -2385,6 +2645,7 @@ def list_tokenization_supported_chains( @validate_call def list_tokenization_supported_chains_with_http_info( self, + token_standard: Annotated[Optional[TokenizationTokenStandard], Field(description="Filter by token standard.")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, @@ -2401,6 +2662,8 @@ def list_tokenization_supported_chains_with_http_info( This operation retrieves a list of tokenization supported chains. + :param token_standard: Filter by token standard. + :type token_standard: TokenizationTokenStandard :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int :param after: A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. @@ -2416,6 +2679,7 @@ def list_tokenization_supported_chains_with_http_info( """ # noqa: E501 _param = self._list_tokenization_supported_chains_serialize( + token_standard=token_standard, limit=limit, after=after, before=before, @@ -2439,6 +2703,7 @@ def list_tokenization_supported_chains_with_http_info( @validate_call def list_tokenization_supported_chains_without_preload_content( self, + token_standard: Annotated[Optional[TokenizationTokenStandard], Field(description="Filter by token standard.")] = None, limit: Annotated[Optional[StrictInt], Field(description="The maximum number of objects to return. For most operations, the value range is [1, 50].")] = None, after: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. ")] = None, before: Annotated[Optional[StrictStr], Field(description="A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. ")] = None, @@ -2455,6 +2720,8 @@ def list_tokenization_supported_chains_without_preload_content( This operation retrieves a list of tokenization supported chains. + :param token_standard: Filter by token standard. + :type token_standard: TokenizationTokenStandard :param limit: The maximum number of objects to return. For most operations, the value range is [1, 50]. :type limit: int :param after: A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. @@ -2470,6 +2737,7 @@ def list_tokenization_supported_chains_without_preload_content( """ # noqa: E501 _param = self._list_tokenization_supported_chains_serialize( + token_standard=token_standard, limit=limit, after=after, before=before, @@ -2488,6 +2756,7 @@ def list_tokenization_supported_chains_without_preload_content( def _list_tokenization_supported_chains_serialize( self, + token_standard, limit, after, before, @@ -2500,6 +2769,10 @@ def _list_tokenization_supported_chains_serialize( # process the path parameters # process the query parameters + if token_standard is not None: + + _query_params.append(('token_standard', token_standard.value)) + if limit is not None: _query_params.append(('limit', limit)) @@ -2549,7 +2822,7 @@ def mint_tokenization( ) -> TokenizationOperationResponse: """Mint tokens - This operation mints new tokens to a specified address. Creates a mint transaction that will increase the token supply. + This operation mints new tokens to a specified address. Creates a mint transaction that will increase the token supply. **Note**: This operation is not supported for CoboERC20Wrapper and SOLWrapper tokens. :param token_id: The token ID, which is the unique identifier of a token. (required) :type token_id: str @@ -2599,7 +2872,7 @@ def mint_tokenization_with_http_info( ) -> ApiResponse[TokenizationOperationResponse]: """Mint tokens - This operation mints new tokens to a specified address. Creates a mint transaction that will increase the token supply. + This operation mints new tokens to a specified address. Creates a mint transaction that will increase the token supply. **Note**: This operation is not supported for CoboERC20Wrapper and SOLWrapper tokens. :param token_id: The token ID, which is the unique identifier of a token. (required) :type token_id: str @@ -2649,7 +2922,7 @@ def mint_tokenization_without_preload_content( ) -> RESTResponseType: """Mint tokens - This operation mints new tokens to a specified address. Creates a mint transaction that will increase the token supply. + This operation mints new tokens to a specified address. Creates a mint transaction that will increase the token supply. **Note**: This operation is not supported for CoboERC20Wrapper and SOLWrapper tokens. :param token_id: The token ID, which is the unique identifier of a token. (required) :type token_id: str @@ -3820,3 +4093,187 @@ def _update_tokenization_blocklist_addresses_serialize( post_params=_form_params, files=_files, ) + + @validate_call + def update_tokenization_permissions( + self, + token_id: Annotated[StrictStr, Field(description="The token ID, which is the unique identifier of a token.")], + tokenization_update_permissions_request: Annotated[TokenizationUpdatePermissionsRequest, Field(description="The request body for managing permissions.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> TokenizationOperationResponse: + """Update token permissions + + This operation updates permission settings for a tokenization contract. + + :param token_id: The token ID, which is the unique identifier of a token. (required) + :type token_id: str + :param tokenization_update_permissions_request: The request body for managing permissions. (required) + :type tokenization_update_permissions_request: TokenizationUpdatePermissionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_tokenization_permissions_serialize( + token_id=token_id, + tokenization_update_permissions_request=tokenization_update_permissions_request, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TokenizationOperationResponse", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ).data + + @validate_call + def update_tokenization_permissions_with_http_info( + self, + token_id: Annotated[StrictStr, Field(description="The token ID, which is the unique identifier of a token.")], + tokenization_update_permissions_request: Annotated[TokenizationUpdatePermissionsRequest, Field(description="The request body for managing permissions.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> ApiResponse[TokenizationOperationResponse]: + """Update token permissions + + This operation updates permission settings for a tokenization contract. + + :param token_id: The token ID, which is the unique identifier of a token. (required) + :type token_id: str + :param tokenization_update_permissions_request: The request body for managing permissions. (required) + :type tokenization_update_permissions_request: TokenizationUpdatePermissionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_tokenization_permissions_serialize( + token_id=token_id, + tokenization_update_permissions_request=tokenization_update_permissions_request, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TokenizationOperationResponse", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + response_data.read() + return self.api_client.response_deserialize( + response_data=response_data, + response_types_map=_response_types_map, + ) + + @validate_call + def update_tokenization_permissions_without_preload_content( + self, + token_id: Annotated[StrictStr, Field(description="The token ID, which is the unique identifier of a token.")], + tokenization_update_permissions_request: Annotated[TokenizationUpdatePermissionsRequest, Field(description="The request body for managing permissions.")], + _request_timeout: Union[ + None, + Annotated[StrictFloat, Field(gt=0)], + Tuple[ + Annotated[StrictFloat, Field(gt=0)], + Annotated[StrictFloat, Field(gt=0)] + ] + ] = None, + ) -> RESTResponseType: + """Update token permissions + + This operation updates permission settings for a tokenization contract. + + :param token_id: The token ID, which is the unique identifier of a token. (required) + :type token_id: str + :param tokenization_update_permissions_request: The request body for managing permissions. (required) + :type tokenization_update_permissions_request: TokenizationUpdatePermissionsRequest + :param _request_timeout: timeout setting for this request. If one + number provided, it will be total request + timeout. It can also be a pair (tuple) of + (connection, read) timeouts. + :type _request_timeout: int, tuple(int, int), optional + :return: Returns the result object. + """ # noqa: E501 + + _param = self._update_tokenization_permissions_serialize( + token_id=token_id, + tokenization_update_permissions_request=tokenization_update_permissions_request, + ) + + _response_types_map: Dict[str, Optional[str]] = { + '201': "TokenizationOperationResponse", + '4XX': "ErrorResponse", + '5XX': "ErrorResponse", + } + response_data = self.api_client.call_api( + *_param, + _request_timeout=_request_timeout + ) + return response_data.response + + def _update_tokenization_permissions_serialize( + self, + token_id, + tokenization_update_permissions_request, + ) -> RequestSerialized: + _path_params: Dict[str, str] = {} + _query_params: List[Tuple[str, str]] = [] + _form_params: List[Tuple[str, str]] = [] + _files: Dict[str, Union[str, bytes]] = {} + _body_params: Optional[bytes] = None + + # process the path parameters + if token_id is not None: + _path_params['token_id'] = token_id + # process the query parameters + # process the header parameters + # process the form parameters + # process the body parameter + if tokenization_update_permissions_request is not None: + _body_params = tokenization_update_permissions_request + + # set the HTTP header `Accept` + _header_params = { + "Accept": "application/json", + "Content-Type": "application/json" + } + + return self.api_client.param_serialize( + method='POST', + resource_path='/tokenization/tokens/{token_id}/permissions', + path_params=_path_params, + query_params=_query_params, + header_params=_header_params, + body=_body_params, + post_params=_form_params, + files=_files, + ) diff --git a/cobo_waas2/api/transactions_api.py b/cobo_waas2/api/transactions_api.py index f1b6dc65..41dbedcc 100644 --- a/cobo_waas2/api/transactions_api.py +++ b/cobo_waas2/api/transactions_api.py @@ -2885,7 +2885,7 @@ def resend_transaction_by_id( ) -> CreateTransferTransaction201Response: """Resend transaction - This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). Resending a transaction is a high‑risk operation. Ensure that the original transaction has not been broadcast to the blockchain, has already expired, and will never be confirmed. Otherwise, the same transaction may be confirmed on‑chain twice. This operation only applies to transactions from MPC Wallets in the SOL token. + Resending failed transactions is not supported on the Solana network. This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). Resending a transaction is a high‑risk operation. Ensure that the original transaction has not been broadcast to the blockchain, has already expired, and will never be confirmed. Otherwise, the same transaction may be confirmed on‑chain twice. This operation only applies to transactions from MPC Wallets in the SOL token. :param transaction_id: The transaction ID. (required) :type transaction_id: str @@ -2935,7 +2935,7 @@ def resend_transaction_by_id_with_http_info( ) -> ApiResponse[CreateTransferTransaction201Response]: """Resend transaction - This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). Resending a transaction is a high‑risk operation. Ensure that the original transaction has not been broadcast to the blockchain, has already expired, and will never be confirmed. Otherwise, the same transaction may be confirmed on‑chain twice. This operation only applies to transactions from MPC Wallets in the SOL token. + Resending failed transactions is not supported on the Solana network. This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). Resending a transaction is a high‑risk operation. Ensure that the original transaction has not been broadcast to the blockchain, has already expired, and will never be confirmed. Otherwise, the same transaction may be confirmed on‑chain twice. This operation only applies to transactions from MPC Wallets in the SOL token. :param transaction_id: The transaction ID. (required) :type transaction_id: str @@ -2985,7 +2985,7 @@ def resend_transaction_by_id_without_preload_content( ) -> RESTResponseType: """Resend transaction - This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). Resending a transaction is a high‑risk operation. Ensure that the original transaction has not been broadcast to the blockchain, has already expired, and will never be confirmed. Otherwise, the same transaction may be confirmed on‑chain twice. This operation only applies to transactions from MPC Wallets in the SOL token. + Resending failed transactions is not supported on the Solana network. This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). Resending a transaction is a high‑risk operation. Ensure that the original transaction has not been broadcast to the blockchain, has already expired, and will never be confirmed. Otherwise, the same transaction may be confirmed on‑chain twice. This operation only applies to transactions from MPC Wallets in the SOL token. :param transaction_id: The transaction ID. (required) :type transaction_id: str diff --git a/cobo_waas2/api_client.py b/cobo_waas2/api_client.py index 7c93fc3a..2e24b39b 100644 --- a/cobo_waas2/api_client.py +++ b/cobo_waas2/api_client.py @@ -68,7 +68,7 @@ def __init__( self.rest_client = rest.RESTClientObject(configuration) self.default_headers = {} # Set default User-Agent. - self.user_agent = 'cobo-waas2-python-sdk/1.25.0' + self.user_agent = 'cobo-waas2-python-sdk/1.26.0' def __enter__(self): return self diff --git a/cobo_waas2/models/__init__.py b/cobo_waas2/models/__init__.py index 39c6621c..790c838d 100644 --- a/cobo_waas2/models/__init__.py +++ b/cobo_waas2/models/__init__.py @@ -129,6 +129,7 @@ from cobo_waas2.models.create_payment_order_request import CreatePaymentOrderRequest from cobo_waas2.models.create_prime_broker_address201_response import CreatePrimeBrokerAddress201Response from cobo_waas2.models.create_prime_broker_address_request import CreatePrimeBrokerAddressRequest +from cobo_waas2.models.create_refund_link_request import CreateRefundLinkRequest from cobo_waas2.models.create_refund_request import CreateRefundRequest from cobo_waas2.models.create_safe_wallet_params import CreateSafeWalletParams from cobo_waas2.models.create_settlement import CreateSettlement @@ -225,6 +226,7 @@ from cobo_waas2.models.fee_station_check_fee_station_usage_response import FeeStationCheckFeeStationUsageResponse from cobo_waas2.models.fee_station_destination import FeeStationDestination from cobo_waas2.models.fee_station_gas_station_type import FeeStationGasStationType +from cobo_waas2.models.fee_station_sponsor_transaction_description import FeeStationSponsorTransactionDescription from cobo_waas2.models.fee_station_transaction_type import FeeStationTransactionType from cobo_waas2.models.fee_station_transfer import FeeStationTransfer from cobo_waas2.models.fee_type import FeeType @@ -379,6 +381,7 @@ from cobo_waas2.models.refresh_token_request import RefreshTokenRequest from cobo_waas2.models.refund import Refund from cobo_waas2.models.refund_disposition import RefundDisposition +from cobo_waas2.models.refund_link_business_info import RefundLinkBusinessInfo from cobo_waas2.models.refund_status import RefundStatus from cobo_waas2.models.refund_type import RefundType from cobo_waas2.models.replace_type import ReplaceType @@ -521,6 +524,9 @@ from cobo_waas2.models.tokenization_contract_call_request import TokenizationContractCallRequest from cobo_waas2.models.tokenization_contract_call_type import TokenizationContractCallType from cobo_waas2.models.tokenization_erc20_token_params import TokenizationERC20TokenParams +from cobo_waas2.models.tokenization_erc20_token_permission_params import TokenizationERC20TokenPermissionParams +from cobo_waas2.models.tokenization_erc20_wrapped_token_params import TokenizationERC20WrappedTokenParams +from cobo_waas2.models.tokenization_erc20_wrapped_token_permission_params import TokenizationERC20WrappedTokenPermissionParams from cobo_waas2.models.tokenization_estimate_fee_request import TokenizationEstimateFeeRequest from cobo_waas2.models.tokenization_estimate_fee_request_operation_params import TokenizationEstimateFeeRequestOperationParams from cobo_waas2.models.tokenization_evm_contract_call_params import TokenizationEvmContractCallParams @@ -532,6 +538,8 @@ from cobo_waas2.models.tokenization_list_activities_response import TokenizationListActivitiesResponse from cobo_waas2.models.tokenization_list_enabled_chains_response import TokenizationListEnabledChainsResponse from cobo_waas2.models.tokenization_list_holdings_response import TokenizationListHoldingsResponse +from cobo_waas2.models.tokenization_list_permissions_response import TokenizationListPermissionsResponse +from cobo_waas2.models.tokenization_list_permissions_response_data_inner import TokenizationListPermissionsResponseDataInner from cobo_waas2.models.tokenization_list_token_info_response import TokenizationListTokenInfoResponse from cobo_waas2.models.tokenization_mint_estimate_fee_params import TokenizationMintEstimateFeeParams from cobo_waas2.models.tokenization_mint_token_params import TokenizationMintTokenParams @@ -544,23 +552,25 @@ from cobo_waas2.models.tokenization_pause_estimate_fee_params import TokenizationPauseEstimateFeeParams from cobo_waas2.models.tokenization_pause_token_params import TokenizationPauseTokenParams from cobo_waas2.models.tokenization_pause_token_request import TokenizationPauseTokenRequest +from cobo_waas2.models.tokenization_permission_action import TokenizationPermissionAction from cobo_waas2.models.tokenization_sol_token_params import TokenizationSOLTokenParams +from cobo_waas2.models.tokenization_sol_wrapped_token_params import TokenizationSOLWrappedTokenParams from cobo_waas2.models.tokenization_sol_contract_call_params import TokenizationSolContractCallParams from cobo_waas2.models.tokenization_sol_token_permission_params import TokenizationSolTokenPermissionParams +from cobo_waas2.models.tokenization_sol_wrapped_token_permission_params import TokenizationSolWrappedTokenPermissionParams from cobo_waas2.models.tokenization_status import TokenizationStatus from cobo_waas2.models.tokenization_toggle_allowlist_estimate_fee_params import TokenizationToggleAllowlistEstimateFeeParams from cobo_waas2.models.tokenization_token_detail_info import TokenizationTokenDetailInfo from cobo_waas2.models.tokenization_token_info import TokenizationTokenInfo from cobo_waas2.models.tokenization_token_operation_source import TokenizationTokenOperationSource from cobo_waas2.models.tokenization_token_permission import TokenizationTokenPermission -from cobo_waas2.models.tokenization_token_permission_params import TokenizationTokenPermissionParams from cobo_waas2.models.tokenization_token_permission_type import TokenizationTokenPermissionType -from cobo_waas2.models.tokenization_token_permissions_response import TokenizationTokenPermissionsResponse from cobo_waas2.models.tokenization_token_standard import TokenizationTokenStandard from cobo_waas2.models.tokenization_unpause_estimate_fee_params import TokenizationUnpauseEstimateFeeParams from cobo_waas2.models.tokenization_unpause_token_params import TokenizationUnpauseTokenParams from cobo_waas2.models.tokenization_unpause_token_request import TokenizationUnpauseTokenRequest from cobo_waas2.models.tokenization_update_address_action import TokenizationUpdateAddressAction +from cobo_waas2.models.tokenization_update_address_permissions import TokenizationUpdateAddressPermissions from cobo_waas2.models.tokenization_update_allowlist_addresses_estimate_fee_params import TokenizationUpdateAllowlistAddressesEstimateFeeParams from cobo_waas2.models.tokenization_update_allowlist_addresses_params import TokenizationUpdateAllowlistAddressesParams from cobo_waas2.models.tokenization_update_allowlist_addresses_params_addresses_inner import TokenizationUpdateAllowlistAddressesParamsAddressesInner @@ -569,6 +579,9 @@ from cobo_waas2.models.tokenization_update_blocklist_addresses_params import TokenizationUpdateBlocklistAddressesParams from cobo_waas2.models.tokenization_update_blocklist_addresses_params_addresses_inner import TokenizationUpdateBlocklistAddressesParamsAddressesInner from cobo_waas2.models.tokenization_update_blocklist_addresses_request import TokenizationUpdateBlocklistAddressesRequest +from cobo_waas2.models.tokenization_update_permissions_estimate_fee_params import TokenizationUpdatePermissionsEstimateFeeParams +from cobo_waas2.models.tokenization_update_permissions_params import TokenizationUpdatePermissionsParams +from cobo_waas2.models.tokenization_update_permissions_request import TokenizationUpdatePermissionsRequest from cobo_waas2.models.tokenization_web3_operation_source import TokenizationWeb3OperationSource from cobo_waas2.models.tokens_event_data import TokensEventData from cobo_waas2.models.top_up_address import TopUpAddress diff --git a/cobo_waas2/models/auto_fuel_type.py b/cobo_waas2/models/auto_fuel_type.py index ad8c547b..e98228de 100644 --- a/cobo_waas2/models/auto_fuel_type.py +++ b/cobo_waas2/models/auto_fuel_type.py @@ -18,7 +18,7 @@ class AutoFuelType(str, Enum): """ - The mode of transaction fee payment using Fee Station. Currently, Fee Station supports EVM-compatible and TRON transactions initiated from MPC Wallets (Organization-Controlled) and Custodial Wallets (Web3 Wallets). For more details, refer to [Fee Station](https://manuals.cobo.com/en/portal/fee-station/introduction). - `ProActiveAutoFuel`: Always use Fee Station to pay transaction fees. - `PassiveAutoFuel`: Use Fee Station only when the source address balance is insufficient to cover the transaction fees. - `UsePortalPreference`: Use payment preferences set on Cobo Portal. Please note that the TRON chain does not support `PassiveAutoFuel` due to its fee delegation mechanism. + The mode of transaction fee payment using Fee Station. Currently, Fee Station supports transactions made with MPC Wallets on EVM-compatible chains, TRON, and Solana. For more details, refer to [Fee Station](https://manuals.cobo.com/en/portal/fee-station/introduction). - `ProActiveAutoFuel`: Always use Fee Station to pay transaction fees. - `PassiveAutoFuel`: Use Fee Station only when the source address balance is insufficient to cover transaction fees. - `UsePortalPreference`: Use fueling strategy based on the Portal configuration. - `DisableAutoFuel`: Do not use Fee Station for transaction fee payment under any circumstances. If this parameter is **not specified**, it defaults to the behavior of `UsePortalPreference`. **Note**: TRON and Solana does not support `PassiveAutoFuel` due to its fee delegation mechanism. """ """ @@ -27,6 +27,7 @@ class AutoFuelType(str, Enum): PASSIVEAUTOFUEL = 'PassiveAutoFuel' PROACTIVEAUTOFUEL = 'ProActiveAutoFuel' USEPORTALPREFERENCE = 'UsePortalPreference' + DISABLEAUTOFUEL = 'DisableAutoFuel' UNKNOWN = None diff --git a/cobo_waas2/models/create_crypto_address_request.py b/cobo_waas2/models/create_crypto_address_request.py index 255d6a80..9c425aa0 100644 --- a/cobo_waas2/models/create_crypto_address_request.py +++ b/cobo_waas2/models/create_crypto_address_request.py @@ -27,7 +27,7 @@ class CreateCryptoAddressRequest(BaseModel): """ # noqa: E501 token_id: StrictStr = Field(description="The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` ") address: StrictStr = Field(description="The blockchain address in its native format. This is the actual destination address where funds will be sent. The address must match the format required by the specified blockchain. For example: - For `SOL_USDC`: Provide a Solana address - For `ETH_USDT`: Provide an Ethereum address ") - label: Optional[StrictStr] = Field(default=None, description="A label to help identify the address's purpose.") + label: Optional[StrictStr] = Field(default=None, description="A label to help identify the address's purpose. Can contain up to 128 characters.") __properties: ClassVar[List[str]] = ["token_id", "address", "label"] model_config = ConfigDict( diff --git a/cobo_waas2/models/create_merchant_request.py b/cobo_waas2/models/create_merchant_request.py index 6e2ac8c4..68e4f6cd 100644 --- a/cobo_waas2/models/create_merchant_request.py +++ b/cobo_waas2/models/create_merchant_request.py @@ -28,7 +28,7 @@ class CreateMerchantRequest(BaseModel): """ # noqa: E501 name: StrictStr = Field(description="The merchant name.") wallet_id: Optional[StrictStr] = Field(default=None, description="This field has been deprecated.") - developer_fee_rate: Optional[StrictStr] = Field(default=None, description="The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. For more information on developer fee rate, please refer to [Amounts and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances).") + developer_fee_rate: Optional[StrictStr] = Field(default=None, description="The developer fee rate applied to this merchant. Must be a valid float between 0 and 1 (inclusive), with up to 4 decimal places. For more information on developer fee rate, please refer to [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances).") wallet_setup: Optional[WalletSetup] = None __properties: ClassVar[List[str]] = ["name", "wallet_id", "developer_fee_rate", "wallet_setup"] diff --git a/cobo_waas2/models/create_payment_order_request.py b/cobo_waas2/models/create_payment_order_request.py index 91949f3f..99d12b99 100644 --- a/cobo_waas2/models/create_payment_order_request.py +++ b/cobo_waas2/models/create_payment_order_request.py @@ -25,17 +25,17 @@ class CreatePaymentOrderRequest(BaseModel): """ CreatePaymentOrderRequest """ # noqa: E501 - merchant_id: StrictStr = Field(description="The merchant ID.") + merchant_id: StrictStr = Field(description="The merchant ID. This ID is assigned by Cobo when you create the merchant.") token_id: StrictStr = Field(description="The ID of the cryptocurrency used for payment. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` ") - currency: Optional[StrictStr] = Field(default='', description="The fiat currency for the base order amount and the developer fee. Currently, only `USD` is supported. If left empty, both `order_amount` and `fee_amount` will be denominated in the cryptocurrency specified by `token_id` ") - order_amount: StrictStr = Field(description=" The base amount of the order, excluding the developer fee (specified in `fee_amount`), in the currency specified by `currency`. If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`. Values must be greater than `0` and contain two decimal places. ") - fee_amount: StrictStr = Field(description=" The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places. ") + currency: Optional[StrictStr] = Field(default='', description="The fiat currency for the base order amount and the developer fee. If left empty, both `order_amount` and `fee_amount` will be denominated in the cryptocurrency specified by `token_id` Currently, only `USD` is supported. ") + order_amount: StrictStr = Field(description=" The base amount of the order, excluding the developer fee (specified in `fee_amount`). The denomination of the amount depends on if `currency` is specified: - If `currency` is specified, the amount is in the currency specified by `currency`, e.g. \"USD\". - If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`, e.g. \"ETH_USDT\". Values must be greater than `0` and contain two decimal places. ") + fee_amount: StrictStr = Field(description=" The developer fee for the order. - **When to set:** If you are a merchant serving payers directly, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. For details, see [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances). - **Denomination:** The denomination of `fee_amount` depends on the presence of `currency`: - If `currency` is set, the amount is denominated in that currency (e.g., \"USD\"). - If `currency` is not set, the amount is denominated in the cryptocurrency specified by `token_id` (e.g., \"ETH_USDT\"). - **Calculation:** The developer fee is added to the base order amount (`order_amount`) to determine the final amount charged to the customer. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - **Total charged:** \"102.00\" - **Formatting:** The value can contain up to two decimal places. ") merchant_order_code: Optional[StrictStr] = Field(default=None, description="A unique reference code assigned by the merchant to identify this order in their system. The code should have a maximum length of 128 characters.") psp_order_code: StrictStr = Field(description="A unique reference code assigned by you as a developer to identify this order in your system. This code must be unique across all orders in your system. The code should have a maximum length of 128 characters. ") expired_in: Optional[StrictInt] = Field(default=1800, description="The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to `1800`, the order will expire in 30 minutes. Must be greater than zero and cannot exceed 3 hours (10800 seconds). After expiration: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event. ") use_dedicated_address: Optional[StrictBool] = Field(default=None, description="This field has been deprecated. ") custom_exchange_rate: Optional[StrictStr] = Field(default=None, description=" A custom exchange rate that defines how much fiat currency equals 1 unit of cryptocurrency. If not provided, the system's default exchange rate will be used. For example, if the fiat currency is USD and the cryptocurrency is USDT, setting `custom_exchange_rate` to `\"0.99\"` means that 1 USDT will be valued at 0.99 USD. ") - amount_tolerance: Optional[StrictStr] = Field(default=None, description="Allowed amount deviation, precision to 1 decimal place.") + amount_tolerance: Optional[StrictStr] = Field(default=None, description="The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`. ") __properties: ClassVar[List[str]] = ["merchant_id", "token_id", "currency", "order_amount", "fee_amount", "merchant_order_code", "psp_order_code", "expired_in", "use_dedicated_address", "custom_exchange_rate", "amount_tolerance"] model_config = ConfigDict( diff --git a/cobo_waas2/models/create_refund_link_request.py b/cobo_waas2/models/create_refund_link_request.py new file mode 100644 index 00000000..a824aefe --- /dev/null +++ b/cobo_waas2/models/create_refund_link_request.py @@ -0,0 +1,96 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.link_display_info import LinkDisplayInfo +from cobo_waas2.models.refund_link_business_info import RefundLinkBusinessInfo +from typing import Optional, Set +from typing_extensions import Self + + +class CreateRefundLinkRequest(BaseModel): + """ + CreateRefundLinkRequest + """ # noqa: E501 + business_info: RefundLinkBusinessInfo + display_info: Optional[LinkDisplayInfo] = None + __properties: ClassVar[List[str]] = ["business_info", "display_info"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of CreateRefundLinkRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of business_info + if self.business_info: + _dict['business_info'] = self.business_info.to_dict() + # override the default output from pydantic by calling `to_dict()` of display_info + if self.display_info: + _dict['display_info'] = self.display_info.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of CreateRefundLinkRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "business_info": RefundLinkBusinessInfo.from_dict(obj["business_info"]) if obj.get("business_info") is not None else None, + "display_info": LinkDisplayInfo.from_dict(obj["display_info"]) if obj.get("display_info") is not None else None + }) + return _obj + + diff --git a/cobo_waas2/models/fee_station_check_fee_station_usage.py b/cobo_waas2/models/fee_station_check_fee_station_usage.py index 901d19b0..446f36c8 100644 --- a/cobo_waas2/models/fee_station_check_fee_station_usage.py +++ b/cobo_waas2/models/fee_station_check_fee_station_usage.py @@ -16,7 +16,8 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.auto_fuel_type import AutoFuelType from typing import Optional, Set from typing_extensions import Self @@ -26,12 +27,14 @@ class FeeStationCheckFeeStationUsage(BaseModel): The information for evaluating Fee Station usage. """ # noqa: E501 request_id: StrictStr = Field(description="The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.") - amount: StrictStr = Field(description="The amount of tokens to be transferred in this request.") - token_id: StrictStr = Field(description="The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).") + amount: Optional[StrictStr] = Field(default=None, description="Applicable to transfer requests only. The amount of tokens to be transferred in this request.") + token_id: Optional[StrictStr] = Field(default=None, description="Applicable to transfer requests only. The token ID of the asset to be transferred. You can retrieve available token IDs by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). ") + fee_token_id: Optional[StrictStr] = Field(default=None, description="The token ID used to pay the gas fee for the main transaction. You can retrieve available token IDs by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).") estimated_fee_amount: StrictStr = Field(description="The estimated transaction fee required for this transfer, before applying any Fee Station rules.") from_address: StrictStr = Field(description="The blockchain address that initiates the transfer.") from_wallet_id: StrictStr = Field(description="The wallet ID.") - __properties: ClassVar[List[str]] = ["request_id", "amount", "token_id", "estimated_fee_amount", "from_address", "from_wallet_id"] + auto_fuel: Optional[AutoFuelType] = None + __properties: ClassVar[List[str]] = ["request_id", "amount", "token_id", "fee_token_id", "estimated_fee_amount", "from_address", "from_wallet_id", "auto_fuel"] model_config = ConfigDict( populate_by_name=True, @@ -87,9 +90,11 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "request_id": obj.get("request_id"), "amount": obj.get("amount"), "token_id": obj.get("token_id"), + "fee_token_id": obj.get("fee_token_id"), "estimated_fee_amount": obj.get("estimated_fee_amount"), "from_address": obj.get("from_address"), - "from_wallet_id": obj.get("from_wallet_id") + "from_wallet_id": obj.get("from_wallet_id"), + "auto_fuel": obj.get("auto_fuel") }) return _obj diff --git a/cobo_waas2/models/fee_station_check_fee_station_usage_response.py b/cobo_waas2/models/fee_station_check_fee_station_usage_response.py index dbaca276..0c42b205 100644 --- a/cobo_waas2/models/fee_station_check_fee_station_usage_response.py +++ b/cobo_waas2/models/fee_station_check_fee_station_usage_response.py @@ -16,7 +16,7 @@ import json from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr -from typing import Any, ClassVar, Dict, List +from typing import Any, ClassVar, Dict, List, Optional from cobo_waas2.models.fee_station_gas_station_type import FeeStationGasStationType from typing import Optional, Set from typing_extensions import Self @@ -24,17 +24,18 @@ class FeeStationCheckFeeStationUsageResponse(BaseModel): """ - The Fee Station usage evaluation result for the transfer request. + The fee station evaluation result for the transfer request. """ # noqa: E501 token_id: StrictStr = Field(description="The token used to pay the gas fee for this specific transaction. You can retrieve the IDs of all supported tokens by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens).") + balance: StrictStr = Field(description="The current token balance available in Fee Station.") gas_station_type: FeeStationGasStationType is_fee_station_applicable: StrictBool = Field(description="Indicates whether Fee Station is applied for this transfer request.") is_balance_sufficient: StrictBool = Field(description="If Fee Station is used, indicates whether its balance is sufficient to cover the required gas fee.") - balance: StrictStr = Field(description="The current token balance available in Fee Station.") total_fee_amount: StrictStr = Field(description="The total gas amount required for this transfer request.") - is_sponsor_applicable: StrictBool = Field(description="Indicates whether USDT (U) sponsorship is applied when Fee Station balance is insufficient.") - sponsored_fee_amount: StrictStr = Field(description="The amount of gas fee sponsored by USDT (U) when applicable.") - __properties: ClassVar[List[str]] = ["token_id", "gas_station_type", "is_fee_station_applicable", "is_balance_sufficient", "balance", "total_fee_amount", "is_sponsor_applicable", "sponsored_fee_amount"] + is_sponsor_applicable: StrictBool = Field(description="Indicates whether USD stablecoin sponsorship is applied when the Fee Station balance is insufficient.") + sponsored_fee_amount: StrictStr = Field(description="The amount of gas fee sponsored by USD stablecoin when applicable.") + sponsored_token_id: Optional[StrictStr] = Field(default=None, description="The token ID used to sponsor the gas fee.") + __properties: ClassVar[List[str]] = ["token_id", "balance", "gas_station_type", "is_fee_station_applicable", "is_balance_sufficient", "total_fee_amount", "is_sponsor_applicable", "sponsored_fee_amount", "sponsored_token_id"] model_config = ConfigDict( populate_by_name=True, @@ -88,13 +89,14 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: _obj = cls.model_validate({ "token_id": obj.get("token_id"), + "balance": obj.get("balance"), "gas_station_type": obj.get("gas_station_type"), "is_fee_station_applicable": obj.get("is_fee_station_applicable"), "is_balance_sufficient": obj.get("is_balance_sufficient"), - "balance": obj.get("balance"), "total_fee_amount": obj.get("total_fee_amount"), "is_sponsor_applicable": obj.get("is_sponsor_applicable"), - "sponsored_fee_amount": obj.get("sponsored_fee_amount") + "sponsored_fee_amount": obj.get("sponsored_fee_amount"), + "sponsored_token_id": obj.get("sponsored_token_id") }) return _obj diff --git a/cobo_waas2/models/fee_station_gas_station_type.py b/cobo_waas2/models/fee_station_gas_station_type.py index 9ed1f9a7..84d949c9 100644 --- a/cobo_waas2/models/fee_station_gas_station_type.py +++ b/cobo_waas2/models/fee_station_gas_station_type.py @@ -18,7 +18,7 @@ class FeeStationGasStationType(str, Enum): """ - The Fee Station mode used for automatic gas payment: - `FeeStation`: The client uses their own Fee Station balance to cover the gas fee. - `CoboOperationStation`: Cobo covers the gas fee on behalf of the client. + The Fee Station mode used for automatic gas payment: - `FeeStation`: The user uses their own Fee Station balance to cover the gas fee. - `CoboOperationStation`: Cobo covers the gas fee on behalf of the user. """ """ diff --git a/cobo_waas2/models/fee_station_sponsor_transaction_description.py b/cobo_waas2/models/fee_station_sponsor_transaction_description.py new file mode 100644 index 00000000..88f5e13e --- /dev/null +++ b/cobo_waas2/models/fee_station_sponsor_transaction_description.py @@ -0,0 +1,88 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from typing import Optional, Set +from typing_extensions import Self + + +class FeeStationSponsorTransactionDescription(BaseModel): + """ + FeeStationSponsorTransactionDescription + """ # noqa: E501 + total_fee_amount: StrictStr = Field(description="The total amount used to sponsor the gas fee required for executing the main transaction on behalf of the user.") + commission_fee: StrictStr = Field(description="The commission fee charged for sponsoring the gas fee. ") + __properties: ClassVar[List[str]] = ["total_fee_amount", "commission_fee"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of FeeStationSponsorTransactionDescription from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of FeeStationSponsorTransactionDescription from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "total_fee_amount": obj.get("total_fee_amount"), + "commission_fee": obj.get("commission_fee") + }) + return _obj + + diff --git a/cobo_waas2/models/link.py b/cobo_waas2/models/link.py index fdbf6ef8..af966238 100644 --- a/cobo_waas2/models/link.py +++ b/cobo_waas2/models/link.py @@ -25,7 +25,7 @@ class Link(BaseModel): """ Link """ # noqa: E501 - url: StrictStr = Field(description="The base URL of the payment page. This URL should be combined with the token parameter to form the complete payment link. Example: `https://checkout.cobo.com/payment` ") + url: StrictStr = Field(description="The base URL of the payment page. This URL should be combined with the `token` parameter to form the complete payment link. ") token: StrictStr = Field(description="The unique payment token that should be appended to the URL as a query parameter. This token authenticates and identifies the specific payment session. The complete payment link should be constructed as: `[url]?token=[token]` ") __properties: ClassVar[List[str]] = ["url", "token"] diff --git a/cobo_waas2/models/link_display_info.py b/cobo_waas2/models/link_display_info.py index 51015eaa..d3dae8c9 100644 --- a/cobo_waas2/models/link_display_info.py +++ b/cobo_waas2/models/link_display_info.py @@ -26,8 +26,8 @@ class LinkDisplayInfo(BaseModel): """ LinkDisplayInfo """ # noqa: E501 - developer_name: Optional[Annotated[str, Field(strict=True, max_length=128)]] = Field(default=None, description="Optional display name for the developer/platform. This name may be shown to end users during the payment process. ") - logo: Optional[StrictStr] = Field(default=None, description="Optional URL to the developer's logo image. The logo may be displayed to end users during the payment process. Supported formats: PNG, JPG, SVG. Maximum file size: 2MB. ") + developer_name: Optional[Annotated[str, Field(strict=True, max_length=128)]] = Field(default=None, description="The brand name to display to end users during the payment process. ") + logo: Optional[StrictStr] = Field(default=None, description="The URL of your logo image to display to end users during the payment process. ") __properties: ClassVar[List[str]] = ["developer_name", "logo"] model_config = ConfigDict( diff --git a/cobo_waas2/models/merchant_balance.py b/cobo_waas2/models/merchant_balance.py index 9abce080..5ca364b8 100644 --- a/cobo_waas2/models/merchant_balance.py +++ b/cobo_waas2/models/merchant_balance.py @@ -32,7 +32,7 @@ class MerchantBalance(BaseModel): total_received_amount: Optional[StrictStr] = Field(default=None, description="The total amount of the token that has been received by the merchant.") settled_amount: Optional[StrictStr] = Field(default=None, description="The total amount of the token that has been paid out from the merchant's balance.") refunded_amount: Optional[StrictStr] = Field(default=None, description="The total amount of the token that has been refunded from the merchant's balance.") - total_balance: Optional[StrictStr] = Field(default=None, description=" The total balance of the token available for payout or refund for the merchant. `total_balance` = `total_received_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Amounts and Balances](/v2_cn/payments/amounts-and-balances) ") + total_balance: Optional[StrictStr] = Field(default=None, description=" The total balance of the token available for payout or refund for the merchant. `total_balance` = `total_received_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances) ") available_balance: Optional[StrictStr] = Field(default=None, description="This field has been deprecated.") __properties: ClassVar[List[str]] = ["merchant_id", "token_id", "acquiring_type", "total_received_amount", "settled_amount", "refunded_amount", "total_balance", "available_balance"] diff --git a/cobo_waas2/models/order.py b/cobo_waas2/models/order.py index b24e4e45..967843af 100644 --- a/cobo_waas2/models/order.py +++ b/cobo_waas2/models/order.py @@ -47,7 +47,7 @@ class Order(BaseModel): updated_timestamp: Optional[StrictInt] = Field(default=None, description="The last update time of the order, represented as a UNIX timestamp in seconds.") transactions: Optional[List[PaymentTransaction]] = Field(default=None, description="An array of transactions associated with this pay-in order. Each transaction represents a separate blockchain operation related to the pay-in process.") settlement_status: Optional[SettleStatus] = None - amount_tolerance: Optional[StrictStr] = Field(default=None, description="Allowed amount deviation.") + amount_tolerance: Optional[StrictStr] = Field(default=None, description="The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`. ") __properties: ClassVar[List[str]] = ["order_id", "merchant_id", "token_id", "chain_id", "payable_amount", "receive_address", "currency", "order_amount", "fee_amount", "exchange_rate", "expired_at", "merchant_order_code", "psp_order_code", "status", "received_token_amount", "created_timestamp", "updated_timestamp", "transactions", "settlement_status", "amount_tolerance"] model_config = ConfigDict( diff --git a/cobo_waas2/models/order_link_business_info.py b/cobo_waas2/models/order_link_business_info.py index c9bdf5e5..4c52be3c 100644 --- a/cobo_waas2/models/order_link_business_info.py +++ b/cobo_waas2/models/order_link_business_info.py @@ -26,17 +26,17 @@ class OrderLinkBusinessInfo(BaseModel): """ OrderLinkBusinessInfo """ # noqa: E501 - token_ids: List[StrictStr] = Field(description="List of supported cryptocurrency token IDs for this payment. Each token ID must be from the supported values. ") - custom_exchange_rates: Optional[List[OrderLinkBusinessInfoCustomExchangeRatesInner]] = Field(default=None, description="Optional list of final exchange rates for different tokens. If provided, these rates will be used instead of real-time market rates. ") - currency: StrictStr = Field(description="The currency for the base order amount and the developer fee. Currently, only `USD`/`USDT`/`USDC` are supported. ") - fee_amount: StrictStr = Field(description="The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places. ") + token_ids: List[StrictStr] = Field(description="An array of token IDs representing the cryptocurrencies and chains available for payment. These options will be shown to users on the payment page for them to choose from. Supported token IDs include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` ") + custom_exchange_rates: Optional[List[OrderLinkBusinessInfoCustomExchangeRatesInner]] = Field(default=None, description="A list of custom exchange rates defining how much one unit of a specific cryptocurrency (`token_id`) is valued in the selected fiat or crypto currency (`currency`). If this field is omitted, the system’s default exchange rates will apply. Each item specifies a `token_id` and its corresponding `exchange_rate`. For example, to treat 1 USDT (on Ethereum) as equivalent to 0.99 USD, provide: ```json { \"custom_exchange_rates\": [ { \"token_id\": \"ETH_USDT\", \"exchange_rate\": \"0.99\" } ], \"currency\": \"USD\" } ``` ") + currency: StrictStr = Field(description="The currency in which both the order amount (`order_amount`) and the developer fee (`fee_amount`) are denominated. Only the following values are supported: `USD`, `USDT`, or `USDC`. ") + fee_amount: StrictStr = Field(description="The developer fee for the order, denominated in the currency specified by `currency`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places. ") merchant_id: StrictStr = Field(description="The merchant ID.") - order_amount: StrictStr = Field(description="The base amount of the order, excluding the developer fee (specified in `fee_amount`), in the currency specified by `currency`. If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`. Values must be greater than `0` and contain two decimal places. ") + order_amount: StrictStr = Field(description="The base amount of the order, excluding the developer fee (specified in `fee_amount`), denominated in the currency specified by `currency`. Values must be greater than `0` and contain two decimal places. ") merchant_order_code: Optional[StrictStr] = Field(default=None, description="A unique reference code assigned by the merchant to identify this order in their system. The code should have a maximum length of 128 characters.") psp_order_code: StrictStr = Field(description="A unique reference code assigned by you as a developer to identify this order in your system. This code must be unique across all orders in your system. The code should have a maximum length of 128 characters. ") expired_in: Optional[StrictInt] = Field(default=1800, description="The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to `1800`, the order will expire in 30 minutes. Must be greater than zero and cannot exceed 3 hours (10800 seconds). After expiration: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event. ") - use_dedicated_address: Optional[StrictBool] = Field(default=None, description="Whether to allocate a dedicated address for this order. - `true`: A dedicated address will be allocated for this order. - `false`: A shared address from the address pool will be used. ") - amount_tolerance: Optional[StrictStr] = Field(default=None, description="Allowed amount deviation, precision to 1 decimal place.") + use_dedicated_address: Optional[StrictBool] = Field(default=None, description="This field has been deprecated. ") + amount_tolerance: Optional[StrictStr] = Field(default=None, description="The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`. ") __properties: ClassVar[List[str]] = ["token_ids", "custom_exchange_rates", "currency", "fee_amount", "merchant_id", "order_amount", "merchant_order_code", "psp_order_code", "expired_in", "use_dedicated_address", "amount_tolerance"] model_config = ConfigDict( diff --git a/cobo_waas2/models/order_link_business_info_custom_exchange_rates_inner.py b/cobo_waas2/models/order_link_business_info_custom_exchange_rates_inner.py index 9caa58cd..a026d2c6 100644 --- a/cobo_waas2/models/order_link_business_info_custom_exchange_rates_inner.py +++ b/cobo_waas2/models/order_link_business_info_custom_exchange_rates_inner.py @@ -25,8 +25,8 @@ class OrderLinkBusinessInfoCustomExchangeRatesInner(BaseModel): """ OrderLinkBusinessInfoCustomExchangeRatesInner """ # noqa: E501 - token_id: StrictStr = Field(description="The cryptocurrency token ID") - exchange_rate: StrictStr = Field(description="The fixed exchange rate to use for this token") + token_id: StrictStr = Field(description="The token ID.") + exchange_rate: StrictStr = Field(description="The exchange rate to use for this token.") __properties: ClassVar[List[str]] = ["token_id", "exchange_rate"] model_config = ConfigDict( diff --git a/cobo_waas2/models/payment_order_event_data.py b/cobo_waas2/models/payment_order_event_data.py index 1437dd50..2e31e9d0 100644 --- a/cobo_waas2/models/payment_order_event_data.py +++ b/cobo_waas2/models/payment_order_event_data.py @@ -48,7 +48,7 @@ class PaymentOrderEventData(BaseModel): updated_timestamp: Optional[StrictInt] = Field(default=None, description="The last update time of the order, represented as a UNIX timestamp in seconds.") transactions: Optional[List[PaymentTransaction]] = Field(default=None, description="An array of transactions associated with this pay-in order. Each transaction represents a separate blockchain operation related to the pay-in process.") settlement_status: Optional[SettleStatus] = None - amount_tolerance: Optional[StrictStr] = Field(default=None, description="Allowed amount deviation.") + amount_tolerance: Optional[StrictStr] = Field(default=None, description="The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`. ") __properties: ClassVar[List[str]] = ["data_type", "order_id", "merchant_id", "token_id", "chain_id", "payable_amount", "receive_address", "currency", "order_amount", "fee_amount", "exchange_rate", "expired_at", "merchant_order_code", "psp_order_code", "status", "received_token_amount", "created_timestamp", "updated_timestamp", "transactions", "settlement_status", "amount_tolerance"] @field_validator('data_type') diff --git a/cobo_waas2/models/psp_balance.py b/cobo_waas2/models/psp_balance.py index 3fb33053..ce2c8ef7 100644 --- a/cobo_waas2/models/psp_balance.py +++ b/cobo_waas2/models/psp_balance.py @@ -29,7 +29,7 @@ class PspBalance(BaseModel): developer_fee_amount: Optional[StrictStr] = Field(default=None, description="The total amount of the token that has been received as developer fee.") settled_amount: Optional[StrictStr] = Field(default=None, description="The total amount of the token that has been paid out from the developer's balance.") refunded_amount: Optional[StrictStr] = Field(default=None, description="The total amount of the token that has been refunded from the developer's balance.") - total_balance: Optional[StrictStr] = Field(default=None, description=" The total balance of the token available for payout or refund for the developer. `total_balance` = `developer_fee_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Amounts and Balances](/v2_cn/payments/amounts-and-balances) ") + total_balance: Optional[StrictStr] = Field(default=None, description=" The total balance of the token available for payout or refund for the developer. `total_balance` = `developer_fee_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances) ") available_balance: Optional[StrictStr] = Field(default=None, description="This field has been deprecated.") __properties: ClassVar[List[str]] = ["token_id", "developer_fee_amount", "settled_amount", "refunded_amount", "total_balance", "available_balance"] diff --git a/cobo_waas2/models/refund_link_business_info.py b/cobo_waas2/models/refund_link_business_info.py new file mode 100644 index 00000000..8a168643 --- /dev/null +++ b/cobo_waas2/models/refund_link_business_info.py @@ -0,0 +1,95 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.refund_type import RefundType +from typing import Optional, Set +from typing_extensions import Self + + +class RefundLinkBusinessInfo(BaseModel): + """ + RefundLinkBusinessInfo + """ # noqa: E501 + transaction_id: StrictStr = Field(description="The transaction ID.") + amount: StrictStr = Field(description="The amount to refund in cryptocurrency.") + refund_source: RefundType + merchant_id: Optional[StrictStr] = Field(default=None, description="The merchant ID, required if the refund amount source is `Merchant`.") + fee_amount: Optional[StrictStr] = Field(default=None, description="The amount of the transaction fee that the merchant will bear for the refund. ") + __properties: ClassVar[List[str]] = ["transaction_id", "amount", "refund_source", "merchant_id", "fee_amount"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of RefundLinkBusinessInfo from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of RefundLinkBusinessInfo from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "transaction_id": obj.get("transaction_id"), + "amount": obj.get("amount"), + "refund_source": obj.get("refund_source"), + "merchant_id": obj.get("merchant_id"), + "fee_amount": obj.get("fee_amount") + }) + return _obj + + diff --git a/cobo_waas2/models/refund_status.py b/cobo_waas2/models/refund_status.py index 80be716a..66c9d990 100644 --- a/cobo_waas2/models/refund_status.py +++ b/cobo_waas2/models/refund_status.py @@ -18,12 +18,14 @@ class RefundStatus(str, Enum): """ - The current status of the refund order. For information about transaction status, see [Transaction statuses and sub-statuses](https://www.cobo.com/developers/v2/guides/transactions/status). - `Pending`: The refund order has been created but the transaction has not been initiated. - `Processing`: The refund order is currently being processed, with at least one refund transaction in progress. - `Completed`: All refund transactions have been completed successfully. - `PartiallyCompleted`: Some refund transactions have been completed successfully, while others have failed. - `Failed`: All refund transactions have failed. - `PendingConfirmation`: The refund order has been created but the address to send (`to_address`) has not been specified. Once you use the [Update refund order](https://www.cobo.com/developers/v2/api-references/payment/update-refund-order) operation to specify the address, the status will be updated to `Pending`. + The current status of the refund order. For information about transaction status, see [Transaction statuses and sub-statuses](https://www.cobo.com/developers/v2/guides/transactions/status). - `AddressPending`: The refund link has been created and opened but the address is not yet submitted. - `AddressSubmitted`: The address of the refund link has been submitted. - `Pending`: The refund order has been created but the transaction has not been initiated. - `Processing`: The refund order is currently being processed, with at least one refund transaction in progress. - `Completed`: All refund transactions have been completed successfully. - `PartiallyCompleted`: Some refund transactions have been completed successfully, while others have failed. - `Failed`: All refund transactions have failed. - `PendingConfirmation`: The refund order has been created but the address to send (`to_address`) has not been specified. Once you use the [Update refund order](https://www.cobo.com/developers/v2/api-references/payment/update-refund-order) operation to specify the address, the status will be updated to `Pending`. """ """ allowed enum values """ + ADDRESSPENDING = 'AddressPending' + ADDRESSSUBMITTED = 'AddressSubmitted' PENDING = 'Pending' PROCESSING = 'Processing' COMPLETED = 'Completed' diff --git a/cobo_waas2/models/submit_kyt_screenings_review_body.py b/cobo_waas2/models/submit_kyt_screenings_review_body.py index 347e60f2..9e81d9cb 100644 --- a/cobo_waas2/models/submit_kyt_screenings_review_body.py +++ b/cobo_waas2/models/submit_kyt_screenings_review_body.py @@ -24,7 +24,7 @@ class SubmitKytScreeningsReviewBody(BaseModel): """ - The information about submitting a manual KYT review result for KYT screening cases that require human analysis. + Submission of a manual KYT review result. """ # noqa: E501 transaction_id: StrictStr = Field(description="The UUID of the transaction that requires a manual KYT review.") result: KytScreeningsReviewType diff --git a/cobo_waas2/models/swap_quote.py b/cobo_waas2/models/swap_quote.py index cfd15b6a..8e477c9c 100644 --- a/cobo_waas2/models/swap_quote.py +++ b/cobo_waas2/models/swap_quote.py @@ -25,16 +25,16 @@ class SwapQuote(BaseModel): """ SwapQuote """ # noqa: E501 - quote_id: StrictStr = Field(description="The unique identifier of the swap quote.") - pay_token_id: StrictStr = Field(description="The ID of the token to pay.") - pay_amount: StrictStr = Field(description="The amount of the token to pay.") - receive_token_id: StrictStr = Field(description="The ID of the token to receive.") - receive_amount: StrictStr = Field(description="The amount of the token to receive.") - fee_token_id: StrictStr = Field(description="The ID of the token for the service fee.") - fee_amount: StrictStr = Field(description="The amount of the token for the service fee.") - min_receive_amount: Optional[StrictStr] = Field(default=None, description="The minimum amount of the token to receive if `pay_amount` is specified.") - max_pay_amount: Optional[StrictStr] = Field(default=None, description="The maximum amount of the token to pay if `receive_amount` is specified.") - quote_expired_timestamp: StrictInt = Field(description="The time when the swap quote expires, in Unix timestamp format, measured in milliseconds.") + quote_id: StrictStr = Field(description="The unique id of quote.") + pay_token_id: StrictStr = Field(description="The token ID to pay.") + pay_amount: StrictStr = Field(description="The amount of tokens to pay.") + receive_token_id: StrictStr = Field(description="The token ID to receive.") + receive_amount: StrictStr = Field(description="The amount of tokens to receive.") + fee_token_id: StrictStr = Field(description="The token ID for the service fee.") + fee_amount: StrictStr = Field(description="The amount of tokens for the service fee.") + min_receive_amount: Optional[StrictStr] = Field(default=None, description="The minimum amount of tokens to receive if the pay amount is specified.") + max_pay_amount: Optional[StrictStr] = Field(default=None, description="The maximum amount of tokens to pay if the receive amount is specified.") + quote_expired_timestamp: StrictInt = Field(description="The time when the quote will expire, in Unix timestamp format, measured in milliseconds.") __properties: ClassVar[List[str]] = ["quote_id", "pay_token_id", "pay_amount", "receive_token_id", "receive_amount", "fee_token_id", "fee_amount", "min_receive_amount", "max_pay_amount", "quote_expired_timestamp"] model_config = ConfigDict( diff --git a/cobo_waas2/models/tokenization_erc20_token_params.py b/cobo_waas2/models/tokenization_erc20_token_params.py index 18b979e9..74c0ca9e 100644 --- a/cobo_waas2/models/tokenization_erc20_token_params.py +++ b/cobo_waas2/models/tokenization_erc20_token_params.py @@ -18,7 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr from typing import Any, ClassVar, Dict, List, Optional from typing_extensions import Annotated -from cobo_waas2.models.tokenization_token_permission_params import TokenizationTokenPermissionParams +from cobo_waas2.models.tokenization_erc20_token_permission_params import TokenizationERC20TokenPermissionParams from cobo_waas2.models.tokenization_token_standard import TokenizationTokenStandard from typing import Optional, Set from typing_extensions import Self @@ -33,7 +33,7 @@ class TokenizationERC20TokenParams(BaseModel): symbol: StrictStr = Field(description="The symbol of the token.") decimals: Annotated[int, Field(le=18, strict=True, ge=0)] = Field(description="The number of decimals for the token (0-18).") token_access_activated: Optional[StrictBool] = Field(default=False, description="Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations.") - permissions: Optional[TokenizationTokenPermissionParams] = None + permissions: Optional[TokenizationERC20TokenPermissionParams] = None __properties: ClassVar[List[str]] = ["standard", "name", "symbol", "decimals", "token_access_activated", "permissions"] model_config = ConfigDict( @@ -95,7 +95,7 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "symbol": obj.get("symbol"), "decimals": obj.get("decimals"), "token_access_activated": obj.get("token_access_activated") if obj.get("token_access_activated") is not None else False, - "permissions": TokenizationTokenPermissionParams.from_dict(obj["permissions"]) if obj.get("permissions") is not None else None + "permissions": TokenizationERC20TokenPermissionParams.from_dict(obj["permissions"]) if obj.get("permissions") is not None else None }) return _obj diff --git a/cobo_waas2/models/tokenization_token_permission_params.py b/cobo_waas2/models/tokenization_erc20_token_permission_params.py similarity index 93% rename from cobo_waas2/models/tokenization_token_permission_params.py rename to cobo_waas2/models/tokenization_erc20_token_permission_params.py index 58f273ca..034418d5 100644 --- a/cobo_waas2/models/tokenization_token_permission_params.py +++ b/cobo_waas2/models/tokenization_erc20_token_permission_params.py @@ -21,7 +21,7 @@ from typing_extensions import Self -class TokenizationTokenPermissionParams(BaseModel): +class TokenizationERC20TokenPermissionParams(BaseModel): """ Role-based permission settings for token contract. If not provided, all permissions will be granted to the issuing wallet by default. """ # noqa: E501 @@ -52,7 +52,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TokenizationTokenPermissionParams from a JSON string""" + """Create an instance of TokenizationERC20TokenPermissionParams from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -77,7 +77,7 @@ def to_dict(self) -> Dict[str, Any]: @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TokenizationTokenPermissionParams from a dict""" + """Create an instance of TokenizationERC20TokenPermissionParams from a dict""" if obj is None: return None diff --git a/cobo_waas2/models/tokenization_erc20_wrapped_token_params.py b/cobo_waas2/models/tokenization_erc20_wrapped_token_params.py new file mode 100644 index 00000000..5f41523e --- /dev/null +++ b/cobo_waas2/models/tokenization_erc20_wrapped_token_params.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.tokenization_erc20_wrapped_token_permission_params import TokenizationERC20WrappedTokenPermissionParams +from cobo_waas2.models.tokenization_token_standard import TokenizationTokenStandard +from typing import Optional, Set +from typing_extensions import Self + + +class TokenizationERC20WrappedTokenParams(BaseModel): + """ + TokenizationERC20WrappedTokenParams + """ # noqa: E501 + standard: TokenizationTokenStandard + name: StrictStr = Field(description="The name of the token.") + symbol: StrictStr = Field(description="The symbol of the token.") + permissions: Optional[TokenizationERC20WrappedTokenPermissionParams] = None + token_access_activated: Optional[StrictBool] = Field(default=False, description="Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations.") + underlying_token: StrictStr = Field(description="The address of the underlying token that this tokenized asset represents.") + __properties: ClassVar[List[str]] = ["standard", "name", "symbol", "permissions", "token_access_activated", "underlying_token"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenizationERC20WrappedTokenParams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of permissions + if self.permissions: + _dict['permissions'] = self.permissions.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenizationERC20WrappedTokenParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "standard": obj.get("standard"), + "name": obj.get("name"), + "symbol": obj.get("symbol"), + "permissions": TokenizationERC20WrappedTokenPermissionParams.from_dict(obj["permissions"]) if obj.get("permissions") is not None else None, + "token_access_activated": obj.get("token_access_activated") if obj.get("token_access_activated") is not None else False, + "underlying_token": obj.get("underlying_token") + }) + return _obj + + diff --git a/cobo_waas2/models/tokenization_erc20_wrapped_token_permission_params.py b/cobo_waas2/models/tokenization_erc20_wrapped_token_permission_params.py new file mode 100644 index 00000000..00b4ff2a --- /dev/null +++ b/cobo_waas2/models/tokenization_erc20_wrapped_token_permission_params.py @@ -0,0 +1,98 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + + +class TokenizationERC20WrappedTokenPermissionParams(BaseModel): + """ + Role-based permission settings for token contract. If not provided, all permissions will be granted to the issuing wallet by default. + """ # noqa: E501 + admin: Optional[List[StrictStr]] = Field(default=None, description="List of addresses for the admin role.") + minter: Optional[List[StrictStr]] = Field(default=None, description="List of addresses for the minter role.") + wrapper: Optional[List[StrictStr]] = Field(default=None, description="List of addresses for the wrapper role.") + manager: Optional[List[StrictStr]] = Field(default=None, description="List of addresses for the manager role.") + pauser: Optional[List[StrictStr]] = Field(default=None, description="List of addresses for the pauser role.") + salvager: Optional[List[StrictStr]] = Field(default=None, description="List of addresses for the salvager role.") + upgrader: Optional[List[StrictStr]] = Field(default=None, description="List of addresses for the upgrader role.") + __properties: ClassVar[List[str]] = ["admin", "minter", "wrapper", "manager", "pauser", "salvager", "upgrader"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenizationERC20WrappedTokenPermissionParams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenizationERC20WrappedTokenPermissionParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "admin": obj.get("admin"), + "minter": obj.get("minter"), + "wrapper": obj.get("wrapper"), + "manager": obj.get("manager"), + "pauser": obj.get("pauser"), + "salvager": obj.get("salvager"), + "upgrader": obj.get("upgrader") + }) + return _obj + + diff --git a/cobo_waas2/models/tokenization_estimate_fee_request_operation_params.py b/cobo_waas2/models/tokenization_estimate_fee_request_operation_params.py index 5e8b5b70..becc1608 100644 --- a/cobo_waas2/models/tokenization_estimate_fee_request_operation_params.py +++ b/cobo_waas2/models/tokenization_estimate_fee_request_operation_params.py @@ -24,11 +24,12 @@ from cobo_waas2.models.tokenization_unpause_estimate_fee_params import TokenizationUnpauseEstimateFeeParams from cobo_waas2.models.tokenization_update_allowlist_addresses_estimate_fee_params import TokenizationUpdateAllowlistAddressesEstimateFeeParams from cobo_waas2.models.tokenization_update_blocklist_addresses_estimate_fee_params import TokenizationUpdateBlocklistAddressesEstimateFeeParams +from cobo_waas2.models.tokenization_update_permissions_estimate_fee_params import TokenizationUpdatePermissionsEstimateFeeParams from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -TOKENIZATIONESTIMATEFEEREQUESTOPERATIONPARAMS_ONE_OF_SCHEMAS = ["TokenizationBurnEstimateFeeParams", "TokenizationContractCallEstimateFeeParams", "TokenizationIssueEstimateFeeParams", "TokenizationMintEstimateFeeParams", "TokenizationPauseEstimateFeeParams", "TokenizationToggleAllowlistEstimateFeeParams", "TokenizationUnpauseEstimateFeeParams", "TokenizationUpdateAllowlistAddressesEstimateFeeParams", "TokenizationUpdateBlocklistAddressesEstimateFeeParams"] +TOKENIZATIONESTIMATEFEEREQUESTOPERATIONPARAMS_ONE_OF_SCHEMAS = ["TokenizationBurnEstimateFeeParams", "TokenizationContractCallEstimateFeeParams", "TokenizationIssueEstimateFeeParams", "TokenizationMintEstimateFeeParams", "TokenizationPauseEstimateFeeParams", "TokenizationToggleAllowlistEstimateFeeParams", "TokenizationUnpauseEstimateFeeParams", "TokenizationUpdateAllowlistAddressesEstimateFeeParams", "TokenizationUpdateBlocklistAddressesEstimateFeeParams", "TokenizationUpdatePermissionsEstimateFeeParams"] class TokenizationEstimateFeeRequestOperationParams(BaseModel): """ @@ -52,8 +53,10 @@ class TokenizationEstimateFeeRequestOperationParams(BaseModel): oneof_schema_8_validator: Optional[TokenizationToggleAllowlistEstimateFeeParams] = None # data type: TokenizationContractCallEstimateFeeParams oneof_schema_9_validator: Optional[TokenizationContractCallEstimateFeeParams] = None - actual_instance: Optional[Union[TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams]] = None - one_of_schemas: Set[str] = { "TokenizationBurnEstimateFeeParams", "TokenizationContractCallEstimateFeeParams", "TokenizationIssueEstimateFeeParams", "TokenizationMintEstimateFeeParams", "TokenizationPauseEstimateFeeParams", "TokenizationToggleAllowlistEstimateFeeParams", "TokenizationUnpauseEstimateFeeParams", "TokenizationUpdateAllowlistAddressesEstimateFeeParams", "TokenizationUpdateBlocklistAddressesEstimateFeeParams" } + # data type: TokenizationUpdatePermissionsEstimateFeeParams + oneof_schema_10_validator: Optional[TokenizationUpdatePermissionsEstimateFeeParams] = None + actual_instance: Optional[Union[TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams, TokenizationUpdatePermissionsEstimateFeeParams]] = None + one_of_schemas: Set[str] = { "TokenizationBurnEstimateFeeParams", "TokenizationContractCallEstimateFeeParams", "TokenizationIssueEstimateFeeParams", "TokenizationMintEstimateFeeParams", "TokenizationPauseEstimateFeeParams", "TokenizationToggleAllowlistEstimateFeeParams", "TokenizationUnpauseEstimateFeeParams", "TokenizationUpdateAllowlistAddressesEstimateFeeParams", "TokenizationUpdateBlocklistAddressesEstimateFeeParams", "TokenizationUpdatePermissionsEstimateFeeParams" } model_config = ConfigDict( validate_assignment=True, @@ -124,12 +127,17 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `TokenizationContractCallEstimateFeeParams`") else: match += 1 + # validate data type: TokenizationUpdatePermissionsEstimateFeeParams + if not isinstance(v, TokenizationUpdatePermissionsEstimateFeeParams): + error_messages.append(f"Error! Input type `{type(v)}` is not `TokenizationUpdatePermissionsEstimateFeeParams`") + else: + match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in TokenizationEstimateFeeRequestOperationParams with oneOf schemas: TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in TokenizationEstimateFeeRequestOperationParams with oneOf schemas: TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams, TokenizationUpdatePermissionsEstimateFeeParams. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in TokenizationEstimateFeeRequestOperationParams with oneOf schemas: TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in TokenizationEstimateFeeRequestOperationParams with oneOf schemas: TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams, TokenizationUpdatePermissionsEstimateFeeParams. Details: " + ", ".join(error_messages)) else: return v @@ -194,6 +202,11 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = TokenizationUpdateBlocklistAddressesEstimateFeeParams.from_json(json_str) return instance + # check if data type is `TokenizationUpdatePermissionsEstimateFeeParams` + if _data_type == "UpdatePermissions": + instance.actual_instance = TokenizationUpdatePermissionsEstimateFeeParams.from_json(json_str) + return instance + # check if data type is `TokenizationBurnEstimateFeeParams` if _data_type == "TokenizationBurnEstimateFeeParams": instance.actual_instance = TokenizationBurnEstimateFeeParams.from_json(json_str) @@ -239,6 +252,11 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = TokenizationUpdateBlocklistAddressesEstimateFeeParams.from_json(json_str) return instance + # check if data type is `TokenizationUpdatePermissionsEstimateFeeParams` + if _data_type == "TokenizationUpdatePermissionsEstimateFeeParams": + instance.actual_instance = TokenizationUpdatePermissionsEstimateFeeParams.from_json(json_str) + return instance + return instance # deserialize data into TokenizationIssueEstimateFeeParams try: @@ -294,14 +312,20 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into TokenizationUpdatePermissionsEstimateFeeParams + try: + instance.actual_instance = TokenizationUpdatePermissionsEstimateFeeParams.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into TokenizationEstimateFeeRequestOperationParams with oneOf schemas: TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into TokenizationEstimateFeeRequestOperationParams with oneOf schemas: TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams, TokenizationUpdatePermissionsEstimateFeeParams. Details: " + ", ".join(error_messages)) elif match == 0: # no match return instance - # raise ValueError("No match found when deserializing the JSON string into TokenizationEstimateFeeRequestOperationParams with oneOf schemas: TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams. Details: " + ", ".join(error_messages)) + # raise ValueError("No match found when deserializing the JSON string into TokenizationEstimateFeeRequestOperationParams with oneOf schemas: TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams, TokenizationUpdatePermissionsEstimateFeeParams. Details: " + ", ".join(error_messages)) else: return instance @@ -315,7 +339,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], TokenizationBurnEstimateFeeParams, TokenizationContractCallEstimateFeeParams, TokenizationIssueEstimateFeeParams, TokenizationMintEstimateFeeParams, TokenizationPauseEstimateFeeParams, TokenizationToggleAllowlistEstimateFeeParams, TokenizationUnpauseEstimateFeeParams, TokenizationUpdateAllowlistAddressesEstimateFeeParams, TokenizationUpdateBlocklistAddressesEstimateFeeParams, TokenizationUpdatePermissionsEstimateFeeParams]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/cobo_waas2/models/tokenization_issue_token_params_token_params.py b/cobo_waas2/models/tokenization_issue_token_params_token_params.py index 42390063..a5a18a69 100644 --- a/cobo_waas2/models/tokenization_issue_token_params_token_params.py +++ b/cobo_waas2/models/tokenization_issue_token_params_token_params.py @@ -16,12 +16,14 @@ from pydantic import BaseModel, ConfigDict, Field, StrictStr, ValidationError, field_validator from typing import Any, List, Optional from cobo_waas2.models.tokenization_erc20_token_params import TokenizationERC20TokenParams +from cobo_waas2.models.tokenization_erc20_wrapped_token_params import TokenizationERC20WrappedTokenParams from cobo_waas2.models.tokenization_sol_token_params import TokenizationSOLTokenParams +from cobo_waas2.models.tokenization_sol_wrapped_token_params import TokenizationSOLWrappedTokenParams from pydantic import StrictStr, Field from typing import Union, List, Set, Optional, Dict from typing_extensions import Literal, Self -TOKENIZATIONISSUETOKENPARAMSTOKENPARAMS_ONE_OF_SCHEMAS = ["TokenizationERC20TokenParams", "TokenizationSOLTokenParams"] +TOKENIZATIONISSUETOKENPARAMSTOKENPARAMS_ONE_OF_SCHEMAS = ["TokenizationERC20TokenParams", "TokenizationERC20WrappedTokenParams", "TokenizationSOLTokenParams", "TokenizationSOLWrappedTokenParams"] class TokenizationIssueTokenParamsTokenParams(BaseModel): """ @@ -29,10 +31,14 @@ class TokenizationIssueTokenParamsTokenParams(BaseModel): """ # data type: TokenizationERC20TokenParams oneof_schema_1_validator: Optional[TokenizationERC20TokenParams] = None + # data type: TokenizationERC20WrappedTokenParams + oneof_schema_2_validator: Optional[TokenizationERC20WrappedTokenParams] = None # data type: TokenizationSOLTokenParams - oneof_schema_2_validator: Optional[TokenizationSOLTokenParams] = None - actual_instance: Optional[Union[TokenizationERC20TokenParams, TokenizationSOLTokenParams]] = None - one_of_schemas: Set[str] = { "TokenizationERC20TokenParams", "TokenizationSOLTokenParams" } + oneof_schema_3_validator: Optional[TokenizationSOLTokenParams] = None + # data type: TokenizationSOLWrappedTokenParams + oneof_schema_4_validator: Optional[TokenizationSOLWrappedTokenParams] = None + actual_instance: Optional[Union[TokenizationERC20TokenParams, TokenizationERC20WrappedTokenParams, TokenizationSOLTokenParams, TokenizationSOLWrappedTokenParams]] = None + one_of_schemas: Set[str] = { "TokenizationERC20TokenParams", "TokenizationERC20WrappedTokenParams", "TokenizationSOLTokenParams", "TokenizationSOLWrappedTokenParams" } model_config = ConfigDict( validate_assignment=True, @@ -63,17 +69,27 @@ def actual_instance_must_validate_oneof(cls, v): error_messages.append(f"Error! Input type `{type(v)}` is not `TokenizationERC20TokenParams`") else: match += 1 + # validate data type: TokenizationERC20WrappedTokenParams + if not isinstance(v, TokenizationERC20WrappedTokenParams): + error_messages.append(f"Error! Input type `{type(v)}` is not `TokenizationERC20WrappedTokenParams`") + else: + match += 1 # validate data type: TokenizationSOLTokenParams if not isinstance(v, TokenizationSOLTokenParams): error_messages.append(f"Error! Input type `{type(v)}` is not `TokenizationSOLTokenParams`") else: match += 1 + # validate data type: TokenizationSOLWrappedTokenParams + if not isinstance(v, TokenizationSOLWrappedTokenParams): + error_messages.append(f"Error! Input type `{type(v)}` is not `TokenizationSOLWrappedTokenParams`") + else: + match += 1 if match > 1: # more than 1 match - raise ValueError("Multiple matches found when setting `actual_instance` in TokenizationIssueTokenParamsTokenParams with oneOf schemas: TokenizationERC20TokenParams, TokenizationSOLTokenParams. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when setting `actual_instance` in TokenizationIssueTokenParamsTokenParams with oneOf schemas: TokenizationERC20TokenParams, TokenizationERC20WrappedTokenParams, TokenizationSOLTokenParams, TokenizationSOLWrappedTokenParams. Details: " + ", ".join(error_messages)) elif match == 0: # no match - raise ValueError("No match found when setting `actual_instance` in TokenizationIssueTokenParamsTokenParams with oneOf schemas: TokenizationERC20TokenParams, TokenizationSOLTokenParams. Details: " + ", ".join(error_messages)) + raise ValueError("No match found when setting `actual_instance` in TokenizationIssueTokenParamsTokenParams with oneOf schemas: TokenizationERC20TokenParams, TokenizationERC20WrappedTokenParams, TokenizationSOLTokenParams, TokenizationSOLWrappedTokenParams. Details: " + ", ".join(error_messages)) else: return v @@ -98,6 +114,16 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = TokenizationERC20TokenParams.from_json(json_str) return instance + # check if data type is `TokenizationERC20WrappedTokenParams` + if _data_type == "ERC20Wrapper": + instance.actual_instance = TokenizationERC20WrappedTokenParams.from_json(json_str) + return instance + + # check if data type is `TokenizationSOLWrappedTokenParams` + if _data_type == "SOLWrapper": + instance.actual_instance = TokenizationSOLWrappedTokenParams.from_json(json_str) + return instance + # check if data type is `TokenizationSOLTokenParams` if _data_type == "SPLToken2022": instance.actual_instance = TokenizationSOLTokenParams.from_json(json_str) @@ -108,11 +134,21 @@ def from_json(cls, json_str: str) -> Self: instance.actual_instance = TokenizationERC20TokenParams.from_json(json_str) return instance + # check if data type is `TokenizationERC20WrappedTokenParams` + if _data_type == "TokenizationERC20WrappedTokenParams": + instance.actual_instance = TokenizationERC20WrappedTokenParams.from_json(json_str) + return instance + # check if data type is `TokenizationSOLTokenParams` if _data_type == "TokenizationSOLTokenParams": instance.actual_instance = TokenizationSOLTokenParams.from_json(json_str) return instance + # check if data type is `TokenizationSOLWrappedTokenParams` + if _data_type == "TokenizationSOLWrappedTokenParams": + instance.actual_instance = TokenizationSOLWrappedTokenParams.from_json(json_str) + return instance + return instance # deserialize data into TokenizationERC20TokenParams try: @@ -120,20 +156,32 @@ def from_json(cls, json_str: str) -> Self: match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into TokenizationERC20WrappedTokenParams + try: + instance.actual_instance = TokenizationERC20WrappedTokenParams.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) # deserialize data into TokenizationSOLTokenParams try: instance.actual_instance = TokenizationSOLTokenParams.from_json(json_str) match += 1 except (ValidationError, ValueError) as e: error_messages.append(str(e)) + # deserialize data into TokenizationSOLWrappedTokenParams + try: + instance.actual_instance = TokenizationSOLWrappedTokenParams.from_json(json_str) + match += 1 + except (ValidationError, ValueError) as e: + error_messages.append(str(e)) if match > 1: # more than 1 match - raise ValueError("Multiple matches found when deserializing the JSON string into TokenizationIssueTokenParamsTokenParams with oneOf schemas: TokenizationERC20TokenParams, TokenizationSOLTokenParams. Details: " + ", ".join(error_messages)) + raise ValueError("Multiple matches found when deserializing the JSON string into TokenizationIssueTokenParamsTokenParams with oneOf schemas: TokenizationERC20TokenParams, TokenizationERC20WrappedTokenParams, TokenizationSOLTokenParams, TokenizationSOLWrappedTokenParams. Details: " + ", ".join(error_messages)) elif match == 0: # no match return instance - # raise ValueError("No match found when deserializing the JSON string into TokenizationIssueTokenParamsTokenParams with oneOf schemas: TokenizationERC20TokenParams, TokenizationSOLTokenParams. Details: " + ", ".join(error_messages)) + # raise ValueError("No match found when deserializing the JSON string into TokenizationIssueTokenParamsTokenParams with oneOf schemas: TokenizationERC20TokenParams, TokenizationERC20WrappedTokenParams, TokenizationSOLTokenParams, TokenizationSOLWrappedTokenParams. Details: " + ", ".join(error_messages)) else: return instance @@ -147,7 +195,7 @@ def to_json(self) -> str: else: return json.dumps(self.actual_instance) - def to_dict(self) -> Optional[Union[Dict[str, Any], TokenizationERC20TokenParams, TokenizationSOLTokenParams]]: + def to_dict(self) -> Optional[Union[Dict[str, Any], TokenizationERC20TokenParams, TokenizationERC20WrappedTokenParams, TokenizationSOLTokenParams, TokenizationSOLWrappedTokenParams]]: """Returns the dict representation of the actual instance""" if self.actual_instance is None: return None diff --git a/cobo_waas2/models/tokenization_token_permissions_response.py b/cobo_waas2/models/tokenization_list_permissions_response.py similarity index 63% rename from cobo_waas2/models/tokenization_token_permissions_response.py rename to cobo_waas2/models/tokenization_list_permissions_response.py index 04a958f6..5c12753b 100644 --- a/cobo_waas2/models/tokenization_token_permissions_response.py +++ b/cobo_waas2/models/tokenization_list_permissions_response.py @@ -15,20 +15,21 @@ import re # noqa: F401 import json -from pydantic import BaseModel, ConfigDict, Field, StrictInt +from pydantic import BaseModel, ConfigDict, Field from typing import Any, ClassVar, Dict, List -from cobo_waas2.models.tokenization_token_permission import TokenizationTokenPermission +from cobo_waas2.models.pagination import Pagination +from cobo_waas2.models.tokenization_list_permissions_response_data_inner import TokenizationListPermissionsResponseDataInner from typing import Optional, Set from typing_extensions import Self -class TokenizationTokenPermissionsResponse(BaseModel): +class TokenizationListPermissionsResponse(BaseModel): """ - TokenizationTokenPermissionsResponse + TokenizationListPermissionsResponse """ # noqa: E501 - permissions: List[TokenizationTokenPermission] = Field(description="List of available token permissions.") - total_count: StrictInt = Field(description="Total number of permissions.") - __properties: ClassVar[List[str]] = ["permissions", "total_count"] + data: List[TokenizationListPermissionsResponseDataInner] = Field(description="List of permissions.") + pagination: Pagination + __properties: ClassVar[List[str]] = ["data", "pagination"] model_config = ConfigDict( populate_by_name=True, @@ -48,7 +49,7 @@ def to_json(self) -> str: @classmethod def from_json(cls, json_str: str) -> Optional[Self]: - """Create an instance of TokenizationTokenPermissionsResponse from a JSON string""" + """Create an instance of TokenizationListPermissionsResponse from a JSON string""" return cls.from_dict(json.loads(json_str)) def to_dict(self) -> Dict[str, Any]: @@ -69,18 +70,21 @@ def to_dict(self) -> Dict[str, Any]: exclude=excluded_fields, exclude_none=True, ) - # override the default output from pydantic by calling `to_dict()` of each item in permissions (list) + # override the default output from pydantic by calling `to_dict()` of each item in data (list) _items = [] - if self.permissions: - for _item in self.permissions: + if self.data: + for _item in self.data: if _item: _items.append(_item.to_dict()) - _dict['permissions'] = _items + _dict['data'] = _items + # override the default output from pydantic by calling `to_dict()` of pagination + if self.pagination: + _dict['pagination'] = self.pagination.to_dict() return _dict @classmethod def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: - """Create an instance of TokenizationTokenPermissionsResponse from a dict""" + """Create an instance of TokenizationListPermissionsResponse from a dict""" if obj is None: return None @@ -88,8 +92,8 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: return cls.model_validate(obj) _obj = cls.model_validate({ - "permissions": [TokenizationTokenPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None, - "total_count": obj.get("total_count") + "data": [TokenizationListPermissionsResponseDataInner.from_dict(_item) for _item in obj["data"]] if obj.get("data") is not None else None, + "pagination": Pagination.from_dict(obj["pagination"]) if obj.get("pagination") is not None else None }) return _obj diff --git a/cobo_waas2/models/tokenization_list_permissions_response_data_inner.py b/cobo_waas2/models/tokenization_list_permissions_response_data_inner.py new file mode 100644 index 00000000..10cf8d0a --- /dev/null +++ b/cobo_waas2/models/tokenization_list_permissions_response_data_inner.py @@ -0,0 +1,89 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from cobo_waas2.models.tokenization_token_permission_type import TokenizationTokenPermissionType +from typing import Optional, Set +from typing_extensions import Self + + +class TokenizationListPermissionsResponseDataInner(BaseModel): + """ + TokenizationListPermissionsResponseDataInner + """ # noqa: E501 + address: StrictStr = Field(description="The address with permissions.") + permissions: List[TokenizationTokenPermissionType] = Field(description="The permissions assigned to this address.") + __properties: ClassVar[List[str]] = ["address", "permissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenizationListPermissionsResponseDataInner from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenizationListPermissionsResponseDataInner from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/cobo_waas2/models/tokenization_operation_type.py b/cobo_waas2/models/tokenization_operation_type.py index 28ea95d1..6b1b487c 100644 --- a/cobo_waas2/models/tokenization_operation_type.py +++ b/cobo_waas2/models/tokenization_operation_type.py @@ -33,6 +33,7 @@ class TokenizationOperationType(str, Enum): UPDATEBLOCKLISTADDRESSES = 'UpdateBlocklistAddresses' TOGGLEALLOWLIST = 'ToggleAllowlist' CONTRACTCALL = 'ContractCall' + UPDATEPERMISSIONS = 'UpdatePermissions' UNKNOWN = None diff --git a/cobo_waas2/models/tokenization_permission_action.py b/cobo_waas2/models/tokenization_permission_action.py new file mode 100644 index 00000000..4ed8c21a --- /dev/null +++ b/cobo_waas2/models/tokenization_permission_action.py @@ -0,0 +1,42 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import json +from enum import Enum +from typing_extensions import Self + + +class TokenizationPermissionAction(str, Enum): + """ + The permission action to perform: - `add`: Grant permissions to specified addresses - `remove`: Revoke permissions from specified addresses - `set`: Set permissions for specified addresses exclusively Supported actions by chain: - **EVM**: add, remove - **Solana Authority**: set - **Solana Wrapper**: add, remove + """ + + """ + allowed enum values + """ + ADD = 'add' + REMOVE = 'remove' + SET = 'set' + + UNKNOWN = None + + @classmethod + def from_json(cls, json_str: str) -> Self: + """Create an instance of TokenizationPermissionAction from a JSON string""" + return cls(json.loads(json_str)) + + @classmethod + def _missing_(cls, value): + return cls.UNKNOWN + + diff --git a/cobo_waas2/models/tokenization_sol_wrapped_token_params.py b/cobo_waas2/models/tokenization_sol_wrapped_token_params.py new file mode 100644 index 00000000..655afd57 --- /dev/null +++ b/cobo_waas2/models/tokenization_sol_wrapped_token_params.py @@ -0,0 +1,101 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.tokenization_sol_wrapped_token_permission_params import TokenizationSolWrappedTokenPermissionParams +from cobo_waas2.models.tokenization_token_standard import TokenizationTokenStandard +from typing import Optional, Set +from typing_extensions import Self + + +class TokenizationSOLWrappedTokenParams(BaseModel): + """ + TokenizationSOLWrappedTokenParams + """ # noqa: E501 + standard: TokenizationTokenStandard + name: StrictStr = Field(description="The name of the token.") + symbol: StrictStr = Field(description="The symbol of the token.") + underlying_token: StrictStr = Field(description="The address of the underlying token that this tokenized asset represents.") + token_access_activated: Optional[StrictBool] = Field(default=False, description="Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations.") + permissions: Optional[TokenizationSolWrappedTokenPermissionParams] = None + __properties: ClassVar[List[str]] = ["standard", "name", "symbol", "underlying_token", "token_access_activated", "permissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenizationSOLWrappedTokenParams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of permissions + if self.permissions: + _dict['permissions'] = self.permissions.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenizationSOLWrappedTokenParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "standard": obj.get("standard"), + "name": obj.get("name"), + "symbol": obj.get("symbol"), + "underlying_token": obj.get("underlying_token"), + "token_access_activated": obj.get("token_access_activated") if obj.get("token_access_activated") is not None else False, + "permissions": TokenizationSolWrappedTokenPermissionParams.from_dict(obj["permissions"]) if obj.get("permissions") is not None else None + }) + return _obj + + diff --git a/cobo_waas2/models/tokenization_sol_wrapped_token_permission_params.py b/cobo_waas2/models/tokenization_sol_wrapped_token_permission_params.py new file mode 100644 index 00000000..ea6eab05 --- /dev/null +++ b/cobo_waas2/models/tokenization_sol_wrapped_token_permission_params.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from typing import Optional, Set +from typing_extensions import Self + + +class TokenizationSolWrappedTokenPermissionParams(BaseModel): + """ + Role-based permission settings for Solana wrapped token. The owner is automatically set to the address that calls the initialize function (typically the issuing wallet) and cannot be specified here. Only the wrapper and pauser roles can be configured during initialization. + """ # noqa: E501 + wrapper: Optional[List[StrictStr]] = Field(default=None, description="List of Solana wallet addresses that can perform wrap/unwrap operations. Multiple addresses can be assigned this role.") + pauser: Optional[StrictStr] = Field(default=None, description="Solana wallet address that acts as a pauser authority for the token. This authority can pause token transfers.") + freezer: Optional[StrictStr] = Field(default=None, description="Solana wallet address that acts as a freezer authority for the token. This authority can freeze token accounts.") + updater: Optional[StrictStr] = Field(default=None, description="Solana wallet address that acts as an updater authority for the token. This authority can update token metadata.") + __properties: ClassVar[List[str]] = ["wrapper", "pauser", "freezer", "updater"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenizationSolWrappedTokenPermissionParams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenizationSolWrappedTokenPermissionParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "wrapper": obj.get("wrapper"), + "pauser": obj.get("pauser"), + "freezer": obj.get("freezer"), + "updater": obj.get("updater") + }) + return _obj + + diff --git a/cobo_waas2/models/tokenization_token_detail_info.py b/cobo_waas2/models/tokenization_token_detail_info.py index dd11a82d..54143a83 100644 --- a/cobo_waas2/models/tokenization_token_detail_info.py +++ b/cobo_waas2/models/tokenization_token_detail_info.py @@ -19,6 +19,8 @@ from typing import Any, ClassVar, Dict, List, Optional from cobo_waas2.models.tokenization_address_permission import TokenizationAddressPermission from cobo_waas2.models.tokenization_status import TokenizationStatus +from cobo_waas2.models.tokenization_token_info import TokenizationTokenInfo +from cobo_waas2.models.tokenization_token_standard import TokenizationTokenStandard from typing import Optional, Set from typing_extensions import Self @@ -32,13 +34,16 @@ class TokenizationTokenDetailInfo(BaseModel): token_address: Optional[StrictStr] = Field(default=None, description="The address of the token contract.") token_name: Optional[StrictStr] = Field(default=None, description="The name of the token.") token_symbol: StrictStr = Field(description="The unique token symbol.") + token_standard: TokenizationTokenStandard decimals: StrictInt = Field(description="The number of decimals of the token.") token_access_activated: Optional[StrictBool] = Field(default=None, description="Whether the allowlist feature is activated for the token.") status: TokenizationStatus total_supply: Optional[StrictStr] = Field(default=None, description="The total supply of the token.") holdings: Optional[StrictStr] = Field(default=None, description="The amount of tokens held by the organization.") + archived: StrictBool = Field(description="Whether the token is archived. If the token is archived, no operations can be initiated on it.") permissions: Optional[List[TokenizationAddressPermission]] = Field(default=None, description="List of execution addresses and their permissions.") - __properties: ClassVar[List[str]] = ["token_id", "chain_id", "token_address", "token_name", "token_symbol", "decimals", "token_access_activated", "status", "total_supply", "holdings", "permissions"] + underlying_token: Optional[TokenizationTokenInfo] = None + __properties: ClassVar[List[str]] = ["token_id", "chain_id", "token_address", "token_name", "token_symbol", "token_standard", "decimals", "token_access_activated", "status", "total_supply", "holdings", "archived", "permissions", "underlying_token"] model_config = ConfigDict( populate_by_name=True, @@ -86,6 +91,9 @@ def to_dict(self) -> Dict[str, Any]: if _item: _items.append(_item.to_dict()) _dict['permissions'] = _items + # override the default output from pydantic by calling `to_dict()` of underlying_token + if self.underlying_token: + _dict['underlying_token'] = self.underlying_token.to_dict() return _dict @classmethod @@ -103,12 +111,15 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "token_address": obj.get("token_address"), "token_name": obj.get("token_name"), "token_symbol": obj.get("token_symbol"), + "token_standard": obj.get("token_standard"), "decimals": obj.get("decimals"), "token_access_activated": obj.get("token_access_activated"), "status": obj.get("status"), "total_supply": obj.get("total_supply"), "holdings": obj.get("holdings"), - "permissions": [TokenizationAddressPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None + "archived": obj.get("archived"), + "permissions": [TokenizationAddressPermission.from_dict(_item) for _item in obj["permissions"]] if obj.get("permissions") is not None else None, + "underlying_token": TokenizationTokenInfo.from_dict(obj["underlying_token"]) if obj.get("underlying_token") is not None else None }) return _obj diff --git a/cobo_waas2/models/tokenization_token_info.py b/cobo_waas2/models/tokenization_token_info.py index 55ac9c74..61df38c1 100644 --- a/cobo_waas2/models/tokenization_token_info.py +++ b/cobo_waas2/models/tokenization_token_info.py @@ -18,6 +18,7 @@ from pydantic import BaseModel, ConfigDict, Field, StrictBool, StrictInt, StrictStr from typing import Any, ClassVar, Dict, List, Optional from cobo_waas2.models.tokenization_status import TokenizationStatus +from cobo_waas2.models.tokenization_token_standard import TokenizationTokenStandard from typing import Optional, Set from typing_extensions import Self @@ -31,12 +32,14 @@ class TokenizationTokenInfo(BaseModel): token_address: Optional[StrictStr] = Field(default=None, description="The address of the token contract.") token_name: Optional[StrictStr] = Field(default=None, description="The name of the token.") token_symbol: StrictStr = Field(description="The unique token symbol.") + token_standard: TokenizationTokenStandard decimals: StrictInt = Field(description="The number of decimals of the token.") token_access_activated: Optional[StrictBool] = Field(default=None, description="Whether the allowlist feature is activated for the token.") status: TokenizationStatus total_supply: Optional[StrictStr] = Field(default=None, description="The total supply of the token.") holdings: Optional[StrictStr] = Field(default=None, description="The amount of tokens held by the organization.") - __properties: ClassVar[List[str]] = ["token_id", "chain_id", "token_address", "token_name", "token_symbol", "decimals", "token_access_activated", "status", "total_supply", "holdings"] + archived: StrictBool = Field(description="Whether the token is archived. If the token is archived, no operations can be initiated on it.") + __properties: ClassVar[List[str]] = ["token_id", "chain_id", "token_address", "token_name", "token_symbol", "token_standard", "decimals", "token_access_activated", "status", "total_supply", "holdings", "archived"] model_config = ConfigDict( populate_by_name=True, @@ -94,11 +97,13 @@ def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: "token_address": obj.get("token_address"), "token_name": obj.get("token_name"), "token_symbol": obj.get("token_symbol"), + "token_standard": obj.get("token_standard"), "decimals": obj.get("decimals"), "token_access_activated": obj.get("token_access_activated"), "status": obj.get("status"), "total_supply": obj.get("total_supply"), - "holdings": obj.get("holdings") + "holdings": obj.get("holdings"), + "archived": obj.get("archived") }) return _obj diff --git a/cobo_waas2/models/tokenization_token_permission_type.py b/cobo_waas2/models/tokenization_token_permission_type.py index 744a5b2f..5d751384 100644 --- a/cobo_waas2/models/tokenization_token_permission_type.py +++ b/cobo_waas2/models/tokenization_token_permission_type.py @@ -18,7 +18,7 @@ class TokenizationTokenPermissionType(str, Enum): """ - The type of permission for token operations. + The type of permission for token operations. Each permission grants specific capabilities: - `ManagePermissions`: Ability to grant and revoke permissions to addresses. - `ManageAccessAndControls`: Ability to manage access control mechanisms including allowlist and blocklist operations. - `MintTokens`: Ability to mint tokens and increase the total supply. - `BurnTokens`: Ability to burn tokens and decrease the total supply. - `RecoverTokens`: Ability to recover tokens from specified addresses. - `UpgradeContract`: Ability to upgrade the smart contract implementation. - `PauseContract`: Ability to pause and unpause the contract. - `FreezeAccounts`: Ability to freeze and unfreeze addresses. - `UpdateMetadata`: Ability to update token metadata. - `WrapTokens`: Ability to wrap and unwrap tokens for wrapped token implementations. - `PermanentDelegate`: An immutable delegate authority that cannot be changed once set. Has unlimited control over all token accounts including transfer and burn operations. Supported permissions by chain: - **EVM (CoboERC20)**: ManagePermissions, ManageAccessAndControls, MintTokens, BurnTokens, RecoverTokens, UpgradeContract, PauseContract - **EVM (CoboERC20Wrapper)**: ManagePermissions, ManageAccessAndControls, MintTokens, WrapTokens, RecoverTokens, UpgradeContract, PauseContract - **Solana (SPL Token 2022)**: MintTokens, PauseContract, FreezeAccounts, UpdateMetadata, PermanentDelegate """ """ @@ -28,6 +28,7 @@ class TokenizationTokenPermissionType(str, Enum): MANAGEACCESSANDCONTROLS = 'ManageAccessAndControls' MINTTOKENS = 'MintTokens' BURNTOKENS = 'BurnTokens' + WRAPTOKENS = 'WrapTokens' RECOVERTOKENS = 'RecoverTokens' UPGRADECONTRACT = 'UpgradeContract' PAUSECONTRACT = 'PauseContract' diff --git a/cobo_waas2/models/tokenization_token_standard.py b/cobo_waas2/models/tokenization_token_standard.py index f2a894a0..544681be 100644 --- a/cobo_waas2/models/tokenization_token_standard.py +++ b/cobo_waas2/models/tokenization_token_standard.py @@ -26,6 +26,8 @@ class TokenizationTokenStandard(str, Enum): """ ERC20 = 'ERC20' SPLTOKEN2022 = 'SPLToken2022' + ERC20WRAPPER = 'ERC20Wrapper' + SOLWRAPPER = 'SOLWrapper' UNKNOWN = None diff --git a/cobo_waas2/models/tokenization_update_address_permissions.py b/cobo_waas2/models/tokenization_update_address_permissions.py new file mode 100644 index 00000000..3ebc72ac --- /dev/null +++ b/cobo_waas2/models/tokenization_update_address_permissions.py @@ -0,0 +1,92 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List +from cobo_waas2.models.tokenization_permission_action import TokenizationPermissionAction +from cobo_waas2.models.tokenization_token_permission_type import TokenizationTokenPermissionType +from typing import Optional, Set +from typing_extensions import Self + + +class TokenizationUpdateAddressPermissions(BaseModel): + """ + TokenizationUpdateAddressPermissions + """ # noqa: E501 + address: StrictStr = Field(description="The address to manage permissions for.") + action: TokenizationPermissionAction + permissions: List[TokenizationTokenPermissionType] = Field(description="The list of permissions to be applied.") + __properties: ClassVar[List[str]] = ["address", "action", "permissions"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenizationUpdateAddressPermissions from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenizationUpdateAddressPermissions from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "address": obj.get("address"), + "action": obj.get("action"), + "permissions": obj.get("permissions") + }) + return _obj + + diff --git a/cobo_waas2/models/tokenization_update_permissions_estimate_fee_params.py b/cobo_waas2/models/tokenization_update_permissions_estimate_fee_params.py new file mode 100644 index 00000000..cae02c1a --- /dev/null +++ b/cobo_waas2/models/tokenization_update_permissions_estimate_fee_params.py @@ -0,0 +1,107 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.tokenization_operation_type import TokenizationOperationType +from cobo_waas2.models.tokenization_token_operation_source import TokenizationTokenOperationSource +from cobo_waas2.models.tokenization_update_address_permissions import TokenizationUpdateAddressPermissions +from typing import Optional, Set +from typing_extensions import Self + + +class TokenizationUpdatePermissionsEstimateFeeParams(BaseModel): + """ + TokenizationUpdatePermissionsEstimateFeeParams + """ # noqa: E501 + source: TokenizationTokenOperationSource + addresses: List[TokenizationUpdateAddressPermissions] + operation_type: TokenizationOperationType + token_id: StrictStr = Field(description="The ID of the token.") + request_id: Optional[StrictStr] = Field(default=None, description="The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.") + __properties: ClassVar[List[str]] = ["source", "addresses", "operation_type", "token_id", "request_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenizationUpdatePermissionsEstimateFeeParams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of source + if self.source: + _dict['source'] = self.source.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in addresses (list) + _items = [] + if self.addresses: + for _item in self.addresses: + if _item: + _items.append(_item.to_dict()) + _dict['addresses'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenizationUpdatePermissionsEstimateFeeParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "source": TokenizationTokenOperationSource.from_dict(obj["source"]) if obj.get("source") is not None else None, + "addresses": [TokenizationUpdateAddressPermissions.from_dict(_item) for _item in obj["addresses"]] if obj.get("addresses") is not None else None, + "operation_type": obj.get("operation_type"), + "token_id": obj.get("token_id"), + "request_id": obj.get("request_id") + }) + return _obj + + diff --git a/cobo_waas2/models/tokenization_update_permissions_params.py b/cobo_waas2/models/tokenization_update_permissions_params.py new file mode 100644 index 00000000..f32ed12c --- /dev/null +++ b/cobo_waas2/models/tokenization_update_permissions_params.py @@ -0,0 +1,100 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict +from typing import Any, ClassVar, Dict, List +from cobo_waas2.models.tokenization_token_operation_source import TokenizationTokenOperationSource +from cobo_waas2.models.tokenization_update_address_permissions import TokenizationUpdateAddressPermissions +from typing import Optional, Set +from typing_extensions import Self + + +class TokenizationUpdatePermissionsParams(BaseModel): + """ + TokenizationUpdatePermissionsParams + """ # noqa: E501 + source: TokenizationTokenOperationSource + addresses: List[TokenizationUpdateAddressPermissions] + __properties: ClassVar[List[str]] = ["source", "addresses"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenizationUpdatePermissionsParams from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of source + if self.source: + _dict['source'] = self.source.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in addresses (list) + _items = [] + if self.addresses: + for _item in self.addresses: + if _item: + _items.append(_item.to_dict()) + _dict['addresses'] = _items + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenizationUpdatePermissionsParams from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "source": TokenizationTokenOperationSource.from_dict(obj["source"]) if obj.get("source") is not None else None, + "addresses": [TokenizationUpdateAddressPermissions.from_dict(_item) for _item in obj["addresses"]] if obj.get("addresses") is not None else None + }) + return _obj + + diff --git a/cobo_waas2/models/tokenization_update_permissions_request.py b/cobo_waas2/models/tokenization_update_permissions_request.py new file mode 100644 index 00000000..5c6acf54 --- /dev/null +++ b/cobo_waas2/models/tokenization_update_permissions_request.py @@ -0,0 +1,110 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +from __future__ import annotations +import pprint +import re # noqa: F401 +import json + +from pydantic import BaseModel, ConfigDict, Field, StrictStr +from typing import Any, ClassVar, Dict, List, Optional +from cobo_waas2.models.tokenization_token_operation_source import TokenizationTokenOperationSource +from cobo_waas2.models.tokenization_update_address_permissions import TokenizationUpdateAddressPermissions +from cobo_waas2.models.transaction_request_fee import TransactionRequestFee +from typing import Optional, Set +from typing_extensions import Self + + +class TokenizationUpdatePermissionsRequest(BaseModel): + """ + TokenizationUpdatePermissionsRequest + """ # noqa: E501 + source: TokenizationTokenOperationSource + addresses: List[TokenizationUpdateAddressPermissions] + app_initiator: Optional[StrictStr] = Field(default=None, description="The initiator of the tokenization activity. If you do not specify this property, the WaaS service will automatically designate the API key as the initiator.") + fee: TransactionRequestFee + request_id: Optional[StrictStr] = Field(default=None, description="The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization.") + __properties: ClassVar[List[str]] = ["source", "addresses", "app_initiator", "fee", "request_id"] + + model_config = ConfigDict( + populate_by_name=True, + validate_assignment=True, + protected_namespaces=(), + ) + + + def to_str(self) -> str: + """Returns the string representation of the model using alias""" + return pprint.pformat(self.model_dump(by_alias=True)) + + def to_json(self) -> str: + """Returns the JSON representation of the model using alias""" + # TODO: pydantic v2: use .model_dump_json(by_alias=True, exclude_unset=True) instead + return json.dumps(self.to_dict()) + + @classmethod + def from_json(cls, json_str: str) -> Optional[Self]: + """Create an instance of TokenizationUpdatePermissionsRequest from a JSON string""" + return cls.from_dict(json.loads(json_str)) + + def to_dict(self) -> Dict[str, Any]: + """Return the dictionary representation of the model using alias. + + This has the following differences from calling pydantic's + `self.model_dump(by_alias=True)`: + + * `None` is only added to the output dict for nullable fields that + were set at model initialization. Other fields with value `None` + are ignored. + """ + excluded_fields: Set[str] = set([ + ]) + + _dict = self.model_dump( + by_alias=True, + exclude=excluded_fields, + exclude_none=True, + ) + # override the default output from pydantic by calling `to_dict()` of source + if self.source: + _dict['source'] = self.source.to_dict() + # override the default output from pydantic by calling `to_dict()` of each item in addresses (list) + _items = [] + if self.addresses: + for _item in self.addresses: + if _item: + _items.append(_item.to_dict()) + _dict['addresses'] = _items + # override the default output from pydantic by calling `to_dict()` of fee + if self.fee: + _dict['fee'] = self.fee.to_dict() + return _dict + + @classmethod + def from_dict(cls, obj: Optional[Dict[str, Any]]) -> Optional[Self]: + """Create an instance of TokenizationUpdatePermissionsRequest from a dict""" + if obj is None: + return None + + if not isinstance(obj, dict): + return cls.model_validate(obj) + + _obj = cls.model_validate({ + "source": TokenizationTokenOperationSource.from_dict(obj["source"]) if obj.get("source") is not None else None, + "addresses": [TokenizationUpdateAddressPermissions.from_dict(_item) for _item in obj["addresses"]] if obj.get("addresses") is not None else None, + "app_initiator": obj.get("app_initiator"), + "fee": TransactionRequestFee.from_dict(obj["fee"]) if obj.get("fee") is not None else None, + "request_id": obj.get("request_id") + }) + return _obj + + diff --git a/cobo_waas2/models/transaction_cobo_category.py b/cobo_waas2/models/transaction_cobo_category.py index 27717090..27f01c71 100644 --- a/cobo_waas2/models/transaction_cobo_category.py +++ b/cobo_waas2/models/transaction_cobo_category.py @@ -18,7 +18,7 @@ class TransactionCoboCategory(str, Enum): """ - The transaction category defined by Cobo. Possible values include: - `AutoSweep`: An auto-sweep transaction. - `AutoFueling`: A transaction where Fee Station pays transaction fees to an address within your MPC Wallets. - `AutoFuelingRefund`: A refund for an auto-fueling transaction. - `SafeTxMessage`: A message signing transaction initiated by an MPC wallet to authorize a Smart Contract Wallet (Safe\\{Wallet\\}) transaction. - `BillPayment`: A transaction to pay Cobo bills through Fee Station. - `BillRefund`: A refund for a previously made bill payment. - `CommissionFeeCharge`: A transaction to charge commission fees via Fee Station. - `CommissionFeeRefund`: A refund of previously charged commission fees. - `StakingBabylonBtcDelegation`: A transaction for delegating BTC in Babylon staking. - `StakingBabylonBtcSignBabylon`: A transaction for signing Babylon operations with BTC. - `StakingBabylonClaim`: A transaction for claiming rewards from Babylon staking. - `StakingBabylonSlashing`: A transaction related to slashing penalties in Babylon staking. - `StakingBabylonStake`: A transaction for staking assets in the Babylon platform. - `StakingBabylonUnstake`: A transaction for unstaking assets from the Babylon platform. - `StakingBabylonWithdraw`: A transaction for withdrawing assets from Babylon staking. - `StakingBithiveClaim`: A transaction for claiming rewards from BitHive staking. - `StakingBithiveStake`: A transaction for staking assets in the BitHive platform. - `StakingBithiveUnstake`: A transaction for unstaking assets from the BitHive platform. - `StakingBithiveWithdraw`: A transaction for withdrawing assets from BitHive staking. - `StakingCoreStake`: A transaction for staking assets in the Core staking platform. - `StakingCoreWithdraw`: A transaction for withdrawing assets from Core staking. - `StakingEthClaim`: A transaction for claiming rewards from ETH staking. - `StakingEthStake`: A transaction for staking ETH assets. - `StakingEthUnstake`: A transaction for unstaking ETH assets. - `StakingSkyfarmClaim`: A transaction for claiming rewards from Skyfarm staking. - `StakingSkyfarmStake`: A transaction for staking assets in the Skyfarm platform. - `StakingSkyfarmUnstake`: A transaction for unstaking assets from the Skyfarm platform. - `ScreenAppRefund`: A refund transaction initiated through the Screening App. - `ScreenAppIsolate`: An isolation transaction initiated through the Screening App. - `ComplianceRefund`: A refund transaction initiated by Cobo KYT. - `ComplianceIsolate`: An isolation transaction initiated by Cobo KYT. - `StellarChangeTrust`: A transaction to manage trustlines on the Stellar network. + The transaction category defined by Cobo. Possible values include: - `AutoSweep`: An auto-sweep transaction. - `AutoFueling`: A transaction where Fee Station pays transaction fees to an address within your MPC Wallets. - `AutoFuelingRefund`: A refund for an auto-fueling transaction. - `SafeTxMessage`: A message signing transaction initiated by an MPC wallet to authorize a Smart Contract Wallet (Safe\\{Wallet\\}) transaction. - `BillPayment`: A transaction to pay Cobo bills through Fee Station. - `BillRefund`: A refund for a previously made bill payment. - `CommissionFeeCharge`: A transaction for commission-fee users that charges the commission fee incurred from various services. - `CommissionFeeRefund`: A refund of previously charged commission fees. - `StakingBabylonBtcDelegation`: A transaction for delegating BTC in Babylon staking. - `StakingBabylonBtcSignBabylon`: A transaction for signing Babylon operations with BTC. - `StakingBabylonClaim`: A transaction for claiming rewards from Babylon staking. - `StakingBabylonSlashing`: A transaction related to slashing penalties in Babylon staking. - `StakingBabylonStake`: A transaction for staking assets in the Babylon platform. - `StakingBabylonUnstake`: A transaction for unstaking assets from the Babylon platform. - `StakingBabylonWithdraw`: A transaction for withdrawing assets from Babylon staking. - `StakingBithiveClaim`: A transaction for claiming rewards from BitHive staking. - `StakingBithiveStake`: A transaction for staking assets in the BitHive platform. - `StakingBithiveUnstake`: A transaction for unstaking assets from the BitHive platform. - `StakingBithiveWithdraw`: A transaction for withdrawing assets from BitHive staking. - `StakingCoreStake`: A transaction for staking assets in the Core staking platform. - `StakingCoreWithdraw`: A transaction for withdrawing assets from Core staking. - `StakingEthClaim`: A transaction for claiming rewards from ETH staking. - `StakingEthStake`: A transaction for staking ETH assets. - `StakingEthUnstake`: A transaction for unstaking ETH assets. - `StakingSkyfarmClaim`: A transaction for claiming rewards from Skyfarm staking. - `StakingSkyfarmStake`: A transaction for staking assets in the Skyfarm platform. - `StakingSkyfarmUnstake`: A transaction for unstaking assets from the Skyfarm platform. - `ScreenAppRefund`: A refund transaction initiated through the Screening App. - `ScreenAppIsolate`: An isolation transaction initiated through the Screening App. - `ComplianceRefund`: A refund transaction initiated by Cobo KYT. - `ComplianceIsolate`: An isolation transaction initiated by Cobo KYT. - `StellarChangeTrust`: A transaction for establishing a trustline on the Stellar network. - `Tokenization`: A transaction for managing tokenized assets, such as minting or wrapping tokens. - `TokenizationGasSponsor`: A transaction where gas fees are sponsored for tokenization-related operations, ensuring the transaction proceeds even if the source address lacks sufficient balance. - `TokenSwap`: A transaction for token swapping or cross-chain bridging. - `NonceAccountSign`: A transaction signed using a **Solana nonce account**, enabling deterministic and replay-safe transaction execution on the Solana network. - `FeePayerSign`: A transaction where a **designated Solana fee payer account** covers the transaction fees, separating the fee payment from the main signer or source account. - `GasFeeSponsor`: A transaction where Fee Station pays the on-chain gas fee in USD stablecoin. - `GasFeeSponsorRefund`: A transaction that refunds gas fees previously sponsored and paid by Fee Station. """ """ @@ -56,6 +56,13 @@ class TransactionCoboCategory(str, Enum): COMPLIANCEREFUND = 'ComplianceRefund' COMPLIANCEISOLATE = 'ComplianceIsolate' STELLARCHANGETRUST = 'StellarChangeTrust' + TOKENIZATION = 'Tokenization' + TOKENIZATIONGASSPONSOR = 'TokenizationGasSponsor' + TOKENSWAP = 'TokenSwap' + NONCEACCOUNTSIGN = 'NonceAccountSign' + FEEPAYERSIGN = 'FeePayerSign' + GASFEESPONSOR = 'GasFeeSponsor' + GASFEESPONSORREFUND = 'GasFeeSponsorRefund' UNKNOWN = None diff --git a/cobo_waas2/models/update_merchant_by_id_request.py b/cobo_waas2/models/update_merchant_by_id_request.py index c4db0894..9f66892e 100644 --- a/cobo_waas2/models/update_merchant_by_id_request.py +++ b/cobo_waas2/models/update_merchant_by_id_request.py @@ -26,7 +26,7 @@ class UpdateMerchantByIdRequest(BaseModel): UpdateMerchantByIdRequest """ # noqa: E501 name: Optional[StrictStr] = Field(default=None, description="The merchant name.") - developer_fee_rate: Optional[StrictStr] = Field(default=None, description="The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. This fee is deducted from the payment amount and only applies to top-up transactions. If you are a merchant (directly serving the payer), you do not need to configure the developer fee rate.") + developer_fee_rate: Optional[StrictStr] = Field(default=None, description="The developer fee rate applied to this merchant. Must be a valid float between 0 and 1 (inclusive), with up to 4 decimal places. For more information on developer fee rate, please refer to [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances).") __properties: ClassVar[List[str]] = ["name", "developer_fee_rate"] model_config = ConfigDict( diff --git a/docs/AutoFuelType.md b/docs/AutoFuelType.md index 0d79d06d..aabd2676 100644 --- a/docs/AutoFuelType.md +++ b/docs/AutoFuelType.md @@ -1,6 +1,6 @@ # AutoFuelType -The mode of transaction fee payment using Fee Station. Currently, Fee Station supports EVM-compatible and TRON transactions initiated from MPC Wallets (Organization-Controlled) and Custodial Wallets (Web3 Wallets). For more details, refer to [Fee Station](https://manuals.cobo.com/en/portal/fee-station/introduction). - `ProActiveAutoFuel`: Always use Fee Station to pay transaction fees. - `PassiveAutoFuel`: Use Fee Station only when the source address balance is insufficient to cover the transaction fees. - `UsePortalPreference`: Use payment preferences set on Cobo Portal. Please note that the TRON chain does not support `PassiveAutoFuel` due to its fee delegation mechanism. +The mode of transaction fee payment using Fee Station. Currently, Fee Station supports transactions made with MPC Wallets on EVM-compatible chains, TRON, and Solana. For more details, refer to [Fee Station](https://manuals.cobo.com/en/portal/fee-station/introduction). - `ProActiveAutoFuel`: Always use Fee Station to pay transaction fees. - `PassiveAutoFuel`: Use Fee Station only when the source address balance is insufficient to cover transaction fees. - `UsePortalPreference`: Use fueling strategy based on the Portal configuration. - `DisableAutoFuel`: Do not use Fee Station for transaction fee payment under any circumstances. If this parameter is **not specified**, it defaults to the behavior of `UsePortalPreference`. **Note**: TRON and Solana does not support `PassiveAutoFuel` due to its fee delegation mechanism. ## Properties diff --git a/docs/AutoSweepApi.md b/docs/AutoSweepApi.md index c07ea293..82132f14 100644 --- a/docs/AutoSweepApi.md +++ b/docs/AutoSweepApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.dev.cobo.com/v2* Method | HTTP request | Description ------------- | ------------- | ------------- [**create_auto_sweep_task**](AutoSweepApi.md#create_auto_sweep_task) | **POST** /auto_sweep/tasks | Create auto-sweep task -[**create_wallet_sweep_to_addresses**](AutoSweepApi.md#create_wallet_sweep_to_addresses) | **POST** /auto_sweep/sweep_to_addresses | create sweep-to address +[**create_wallet_sweep_to_addresses**](AutoSweepApi.md#create_wallet_sweep_to_addresses) | **POST** /auto_sweep/sweep_to_addresses | Create sweep-to address [**get_auto_sweep_task_by_id**](AutoSweepApi.md#get_auto_sweep_task_by_id) | **GET** /auto_sweep/tasks/{task_id} | Get auto-sweep task details [**list_auto_sweep_task**](AutoSweepApi.md#list_auto_sweep_task) | **GET** /auto_sweep/tasks | List auto-sweep tasks [**list_wallet_sweep_to_addresses**](AutoSweepApi.md#list_wallet_sweep_to_addresses) | **GET** /auto_sweep/sweep_to_addresses | List sweep-to addresses @@ -87,7 +87,7 @@ Name | Type | Description | Notes # **create_wallet_sweep_to_addresses** > SweepToAddress create_wallet_sweep_to_addresses(create_sweep_to_address=create_sweep_to_address) -create sweep-to address +Create sweep-to address This operation creates a new sweep-to address for the specified wallet. The previously sweep-to address for the same token becomes invalid once the new one is created. Use this operation to change the sweep-to address when your setup changes, you switch networks, or the current address is compromised or tainted by suspicious funds. You can withdraw any remaining balances from the old sweep-to addresses to the new address or another designated destination. Sweep-to addresses are only applicable to MPC Wallets and Web3 Wallets with the auto-sweep feature enabled. @@ -117,7 +117,7 @@ with cobo_waas2.ApiClient(configuration) as api_client: create_sweep_to_address = cobo_waas2.CreateSweepToAddress() try: - # create sweep-to address + # Create sweep-to address api_response = api_instance.create_wallet_sweep_to_addresses(create_sweep_to_address=create_sweep_to_address) print("The response of AutoSweepApi->create_wallet_sweep_to_addresses:\n") pprint(api_response) diff --git a/docs/ComplianceApi.md b/docs/ComplianceApi.md index 12c998a0..ae95b402 100644 --- a/docs/ComplianceApi.md +++ b/docs/ComplianceApi.md @@ -351,7 +351,7 @@ with cobo_waas2.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **submit_kyt_screenings_review_body** | [**SubmitKytScreeningsReviewBody**](SubmitKytScreeningsReviewBody.md)| The request body to submit a manual review result for KYT screening case that requires human analysis. | [optional] + **submit_kyt_screenings_review_body** | [**SubmitKytScreeningsReviewBody**](SubmitKytScreeningsReviewBody.md)| The request body to submit a manual review result for a KYT screening case that requires human analysis. | [optional] ### Return type diff --git a/docs/CreateCryptoAddressRequest.md b/docs/CreateCryptoAddressRequest.md index 25fb43d7..dd00b740 100644 --- a/docs/CreateCryptoAddressRequest.md +++ b/docs/CreateCryptoAddressRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **token_id** | **str** | The token ID, which is a unique identifier that specifies both the blockchain network and cryptocurrency token in the format `{CHAIN}_{TOKEN}`. Supported values include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` | **address** | **str** | The blockchain address in its native format. This is the actual destination address where funds will be sent. The address must match the format required by the specified blockchain. For example: - For `SOL_USDC`: Provide a Solana address - For `ETH_USDT`: Provide an Ethereum address | -**label** | **str** | A label to help identify the address's purpose. | [optional] +**label** | **str** | A label to help identify the address's purpose. Can contain up to 128 characters. | [optional] ## Example diff --git a/docs/CreateMerchantRequest.md b/docs/CreateMerchantRequest.md index 283a1f57..1052fd7d 100644 --- a/docs/CreateMerchantRequest.md +++ b/docs/CreateMerchantRequest.md @@ -7,7 +7,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The merchant name. | **wallet_id** | **str** | This field has been deprecated. | [optional] -**developer_fee_rate** | **str** | The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. For more information on developer fee rate, please refer to [Amounts and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances). | [optional] +**developer_fee_rate** | **str** | The developer fee rate applied to this merchant. Must be a valid float between 0 and 1 (inclusive), with up to 4 decimal places. For more information on developer fee rate, please refer to [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances). | [optional] **wallet_setup** | [**WalletSetup**](WalletSetup.md) | | [optional] ## Example diff --git a/docs/CreatePaymentOrderRequest.md b/docs/CreatePaymentOrderRequest.md index e6a0884f..9e8f521e 100644 --- a/docs/CreatePaymentOrderRequest.md +++ b/docs/CreatePaymentOrderRequest.md @@ -5,17 +5,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**merchant_id** | **str** | The merchant ID. | +**merchant_id** | **str** | The merchant ID. This ID is assigned by Cobo when you create the merchant. | **token_id** | **str** | The ID of the cryptocurrency used for payment. Supported values: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` | -**currency** | **str** | The fiat currency for the base order amount and the developer fee. Currently, only `USD` is supported. If left empty, both `order_amount` and `fee_amount` will be denominated in the cryptocurrency specified by `token_id` | [optional] [default to ''] -**order_amount** | **str** | The base amount of the order, excluding the developer fee (specified in `fee_amount`), in the currency specified by `currency`. If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`. Values must be greater than `0` and contain two decimal places. | -**fee_amount** | **str** | The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places. | +**currency** | **str** | The fiat currency for the base order amount and the developer fee. If left empty, both `order_amount` and `fee_amount` will be denominated in the cryptocurrency specified by `token_id` Currently, only `USD` is supported. | [optional] [default to ''] +**order_amount** | **str** | The base amount of the order, excluding the developer fee (specified in `fee_amount`). The denomination of the amount depends on if `currency` is specified: - If `currency` is specified, the amount is in the currency specified by `currency`, e.g. \"USD\". - If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`, e.g. \"ETH_USDT\". Values must be greater than `0` and contain two decimal places. | +**fee_amount** | **str** | The developer fee for the order. - **When to set:** If you are a merchant serving payers directly, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. For details, see [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances). - **Denomination:** The denomination of `fee_amount` depends on the presence of `currency`: - If `currency` is set, the amount is denominated in that currency (e.g., \"USD\"). - If `currency` is not set, the amount is denominated in the cryptocurrency specified by `token_id` (e.g., \"ETH_USDT\"). - **Calculation:** The developer fee is added to the base order amount (`order_amount`) to determine the final amount charged to the customer. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - **Total charged:** \"102.00\" - **Formatting:** The value can contain up to two decimal places. | **merchant_order_code** | **str** | A unique reference code assigned by the merchant to identify this order in their system. The code should have a maximum length of 128 characters. | [optional] **psp_order_code** | **str** | A unique reference code assigned by you as a developer to identify this order in your system. This code must be unique across all orders in your system. The code should have a maximum length of 128 characters. | **expired_in** | **int** | The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to `1800`, the order will expire in 30 minutes. Must be greater than zero and cannot exceed 3 hours (10800 seconds). After expiration: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event. | [optional] [default to 1800] **use_dedicated_address** | **bool** | This field has been deprecated. | [optional] **custom_exchange_rate** | **str** | A custom exchange rate that defines how much fiat currency equals 1 unit of cryptocurrency. If not provided, the system's default exchange rate will be used. For example, if the fiat currency is USD and the cryptocurrency is USDT, setting `custom_exchange_rate` to `\"0.99\"` means that 1 USDT will be valued at 0.99 USD. | [optional] -**amount_tolerance** | **str** | Allowed amount deviation, precision to 1 decimal place. | [optional] +**amount_tolerance** | **str** | The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`. | [optional] ## Example diff --git a/docs/CreateRefundLinkRequest.md b/docs/CreateRefundLinkRequest.md new file mode 100644 index 00000000..a3772f6c --- /dev/null +++ b/docs/CreateRefundLinkRequest.md @@ -0,0 +1,30 @@ +# CreateRefundLinkRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**business_info** | [**RefundLinkBusinessInfo**](RefundLinkBusinessInfo.md) | | +**display_info** | [**LinkDisplayInfo**](LinkDisplayInfo.md) | | [optional] + +## Example + +```python +from cobo_waas2.models.create_refund_link_request import CreateRefundLinkRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of CreateRefundLinkRequest from a JSON string +create_refund_link_request_instance = CreateRefundLinkRequest.from_json(json) +# print the JSON string representation of the object +print(CreateRefundLinkRequest.to_json()) + +# convert the object into a dict +create_refund_link_request_dict = create_refund_link_request_instance.to_dict() +# create an instance of CreateRefundLinkRequest from a dict +create_refund_link_request_from_dict = CreateRefundLinkRequest.from_dict(create_refund_link_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/FeeStationApi.md b/docs/FeeStationApi.md index 33588f50..6f290222 100644 --- a/docs/FeeStationApi.md +++ b/docs/FeeStationApi.md @@ -5,7 +5,7 @@ All URIs are relative to *https://api.dev.cobo.com/v2* Method | HTTP request | Description ------------- | ------------- | ------------- [**check_fee_station_usage**](FeeStationApi.md#check_fee_station_usage) | **POST** /fee_station/check_fee_station_usage | Check Fee Station usage -[**estimate_fee_station_fee**](FeeStationApi.md#estimate_fee_station_fee) | **POST** /fee_station/transactions/estimate_fee | Estimate fee for Fee Station transaction +[**estimate_fee_station_fee**](FeeStationApi.md#estimate_fee_station_fee) | **POST** /fee_station/transactions/estimate_fee | Estimate transaction fee [**get_fee_station_transaction_by_id**](FeeStationApi.md#get_fee_station_transaction_by_id) | **GET** /fee_station/transactions/{transaction_id} | Get Fee Station transaction information [**list_fee_station_addresses**](FeeStationApi.md#list_fee_station_addresses) | **GET** /fee_station/addresses | List Fee Station addresses [**list_fee_station_transactions**](FeeStationApi.md#list_fee_station_transactions) | **GET** /fee_station/transactions | List all Fee Station transactions @@ -17,7 +17,7 @@ Method | HTTP request | Description Check Fee Station usage -This operation evaluates Fee Station usage for the current transaction. It determines whether Fee station can be used, checks if the Fee Station balance is sufficient, and returns a breakdown of the amounts involved, including any portion that must be covered by the user or sponsored in USDT (U). +This operation evaluates Fee Station usage for the current transaction. It determines whether Fee station can be used, checks if the Fee Station balance is sufficient, and returns a breakdown of the amounts involved, including any portion that must be covered by the user or sponsored in USD stablecoin. ### Example @@ -88,9 +88,9 @@ Name | Type | Description | Notes # **estimate_fee_station_fee** > EstimatedFixedFee estimate_fee_station_fee(fee_station_transfer=fee_station_transfer) -Estimate fee for Fee Station transaction +Estimate transaction fee -This operation estimates the gas fee required for a top-up transaction sent by [Fee Station](https://manuals.cobo.com/en/portal/fee-station/introduction) to provide gas to the sender of the original transaction. You need to provide the token ID and transfer amount. For more information about transaction fee models and how fees are calculated, refer to [Estimate transaction fee](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees). +This operation is **deprecated**. Please use the enhanced version [Check Fee Station usage](https://www.cobo.com/developers/v2/api-references/feestation/check-fee-station-usage) instead. This operation estimates the transaction fee of a token transfer based on the fee model that the chain uses, considering factors such as network congestion and transaction complexity. You need to specify the transaction information, including destination address, token ID. The response can contain different properties based on the transaction fee model used by the chain. For the legacy, EIP-1559, and UTXO fee models, Cobo also supports three different transaction speed levels: slow, recommended, and fast. For more information about estimating transaction fees, refer to [Estimate transaction fee](https://www.cobo.com/developers/v2/guides/transactions/estimate-fees). ### Example @@ -118,7 +118,7 @@ with cobo_waas2.ApiClient(configuration) as api_client: fee_station_transfer = cobo_waas2.FeeStationTransfer() try: - # Estimate fee for Fee Station transaction + # Estimate transaction fee api_response = api_instance.estimate_fee_station_fee(fee_station_transfer=fee_station_transfer) print("The response of FeeStationApi->estimate_fee_station_fee:\n") pprint(api_response) diff --git a/docs/FeeStationCheckFeeStationUsage.md b/docs/FeeStationCheckFeeStationUsage.md index 02c7d98b..9e0be903 100644 --- a/docs/FeeStationCheckFeeStationUsage.md +++ b/docs/FeeStationCheckFeeStationUsage.md @@ -7,11 +7,13 @@ The information for evaluating Fee Station usage. Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **request_id** | **str** | The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. | -**amount** | **str** | The amount of tokens to be transferred in this request. | -**token_id** | **str** | The token ID of the transferred token. You can retrieve the IDs of all the tokens you can use by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). | +**amount** | **str** | Applicable to transfer requests only. The amount of tokens to be transferred in this request. | [optional] +**token_id** | **str** | Applicable to transfer requests only. The token ID of the asset to be transferred. You can retrieve available token IDs by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). | [optional] +**fee_token_id** | **str** | The token ID used to pay the gas fee for the main transaction. You can retrieve available token IDs by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). | [optional] **estimated_fee_amount** | **str** | The estimated transaction fee required for this transfer, before applying any Fee Station rules. | **from_address** | **str** | The blockchain address that initiates the transfer. | **from_wallet_id** | **str** | The wallet ID. | +**auto_fuel** | [**AutoFuelType**](AutoFuelType.md) | | [optional] ## Example diff --git a/docs/FeeStationCheckFeeStationUsageResponse.md b/docs/FeeStationCheckFeeStationUsageResponse.md index 3945b90a..bc44b9b5 100644 --- a/docs/FeeStationCheckFeeStationUsageResponse.md +++ b/docs/FeeStationCheckFeeStationUsageResponse.md @@ -1,19 +1,20 @@ # FeeStationCheckFeeStationUsageResponse -The Fee Station usage evaluation result for the transfer request. +The fee station evaluation result for the transfer request. ## Properties Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **token_id** | **str** | The token used to pay the gas fee for this specific transaction. You can retrieve the IDs of all supported tokens by calling [List enabled tokens](https://www.cobo.com/developers/v2/api-references/wallets/list-enabled-tokens). | +**balance** | **str** | The current token balance available in Fee Station. | **gas_station_type** | [**FeeStationGasStationType**](FeeStationGasStationType.md) | | **is_fee_station_applicable** | **bool** | Indicates whether Fee Station is applied for this transfer request. | **is_balance_sufficient** | **bool** | If Fee Station is used, indicates whether its balance is sufficient to cover the required gas fee. | -**balance** | **str** | The current token balance available in Fee Station. | **total_fee_amount** | **str** | The total gas amount required for this transfer request. | -**is_sponsor_applicable** | **bool** | Indicates whether USDT (U) sponsorship is applied when Fee Station balance is insufficient. | -**sponsored_fee_amount** | **str** | The amount of gas fee sponsored by USDT (U) when applicable. | +**is_sponsor_applicable** | **bool** | Indicates whether USD stablecoin sponsorship is applied when the Fee Station balance is insufficient. | +**sponsored_fee_amount** | **str** | The amount of gas fee sponsored by USD stablecoin when applicable. | +**sponsored_token_id** | **str** | The token ID used to sponsor the gas fee. | [optional] ## Example diff --git a/docs/FeeStationGasStationType.md b/docs/FeeStationGasStationType.md index 447cf372..fff1d3ea 100644 --- a/docs/FeeStationGasStationType.md +++ b/docs/FeeStationGasStationType.md @@ -1,6 +1,6 @@ # FeeStationGasStationType -The Fee Station mode used for automatic gas payment: - `FeeStation`: The client uses their own Fee Station balance to cover the gas fee. - `CoboOperationStation`: Cobo covers the gas fee on behalf of the client. +The Fee Station mode used for automatic gas payment: - `FeeStation`: The user uses their own Fee Station balance to cover the gas fee. - `CoboOperationStation`: Cobo covers the gas fee on behalf of the user. ## Properties diff --git a/docs/FeeStationSponsorTransactionDescription.md b/docs/FeeStationSponsorTransactionDescription.md new file mode 100644 index 00000000..e2e9cfd7 --- /dev/null +++ b/docs/FeeStationSponsorTransactionDescription.md @@ -0,0 +1,30 @@ +# FeeStationSponsorTransactionDescription + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**total_fee_amount** | **str** | The total amount used to sponsor the gas fee required for executing the main transaction on behalf of the user. | +**commission_fee** | **str** | The commission fee charged for sponsoring the gas fee. | + +## Example + +```python +from cobo_waas2.models.fee_station_sponsor_transaction_description import FeeStationSponsorTransactionDescription + +# TODO update the JSON string below +json = "{}" +# create an instance of FeeStationSponsorTransactionDescription from a JSON string +fee_station_sponsor_transaction_description_instance = FeeStationSponsorTransactionDescription.from_json(json) +# print the JSON string representation of the object +print(FeeStationSponsorTransactionDescription.to_json()) + +# convert the object into a dict +fee_station_sponsor_transaction_description_dict = fee_station_sponsor_transaction_description_instance.to_dict() +# create an instance of FeeStationSponsorTransactionDescription from a dict +fee_station_sponsor_transaction_description_from_dict = FeeStationSponsorTransactionDescription.from_dict(fee_station_sponsor_transaction_description_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/Link.md b/docs/Link.md index 3116ddcf..6a460298 100644 --- a/docs/Link.md +++ b/docs/Link.md @@ -5,7 +5,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**url** | **str** | The base URL of the payment page. This URL should be combined with the token parameter to form the complete payment link. Example: `https://checkout.cobo.com/payment` | +**url** | **str** | The base URL of the payment page. This URL should be combined with the `token` parameter to form the complete payment link. | **token** | **str** | The unique payment token that should be appended to the URL as a query parameter. This token authenticates and identifies the specific payment session. The complete payment link should be constructed as: `[url]?token=[token]` | ## Example diff --git a/docs/LinkDisplayInfo.md b/docs/LinkDisplayInfo.md index 7dc22d56..f3d8313d 100644 --- a/docs/LinkDisplayInfo.md +++ b/docs/LinkDisplayInfo.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**developer_name** | **str** | Optional display name for the developer/platform. This name may be shown to end users during the payment process. | [optional] -**logo** | **str** | Optional URL to the developer's logo image. The logo may be displayed to end users during the payment process. Supported formats: PNG, JPG, SVG. Maximum file size: 2MB. | [optional] +**developer_name** | **str** | The brand name to display to end users during the payment process. | [optional] +**logo** | **str** | The URL of your logo image to display to end users during the payment process. | [optional] ## Example diff --git a/docs/MerchantBalance.md b/docs/MerchantBalance.md index a35ac952..42c07081 100644 --- a/docs/MerchantBalance.md +++ b/docs/MerchantBalance.md @@ -11,7 +11,7 @@ Name | Type | Description | Notes **total_received_amount** | **str** | The total amount of the token that has been received by the merchant. | [optional] **settled_amount** | **str** | The total amount of the token that has been paid out from the merchant's balance. | [optional] **refunded_amount** | **str** | The total amount of the token that has been refunded from the merchant's balance. | [optional] -**total_balance** | **str** | The total balance of the token available for payout or refund for the merchant. `total_balance` = `total_received_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Amounts and Balances](/v2_cn/payments/amounts-and-balances) | [optional] +**total_balance** | **str** | The total balance of the token available for payout or refund for the merchant. `total_balance` = `total_received_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances) | [optional] **available_balance** | **str** | This field has been deprecated. | [optional] ## Example diff --git a/docs/Order.md b/docs/Order.md index 5644dbec..ba4d5187 100644 --- a/docs/Order.md +++ b/docs/Order.md @@ -24,7 +24,7 @@ Name | Type | Description | Notes **updated_timestamp** | **int** | The last update time of the order, represented as a UNIX timestamp in seconds. | [optional] **transactions** | [**List[PaymentTransaction]**](PaymentTransaction.md) | An array of transactions associated with this pay-in order. Each transaction represents a separate blockchain operation related to the pay-in process. | [optional] **settlement_status** | [**SettleStatus**](SettleStatus.md) | | [optional] -**amount_tolerance** | **str** | Allowed amount deviation. | [optional] +**amount_tolerance** | **str** | The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`. | [optional] ## Example diff --git a/docs/OrderLinkBusinessInfo.md b/docs/OrderLinkBusinessInfo.md index 6707313b..c76a5178 100644 --- a/docs/OrderLinkBusinessInfo.md +++ b/docs/OrderLinkBusinessInfo.md @@ -5,17 +5,17 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**token_ids** | **List[str]** | List of supported cryptocurrency token IDs for this payment. Each token ID must be from the supported values. | -**custom_exchange_rates** | [**List[OrderLinkBusinessInfoCustomExchangeRatesInner]**](OrderLinkBusinessInfoCustomExchangeRatesInner.md) | Optional list of final exchange rates for different tokens. If provided, these rates will be used instead of real-time market rates. | [optional] -**currency** | **str** | The currency for the base order amount and the developer fee. Currently, only `USD`/`USDT`/`USDC` are supported. | -**fee_amount** | **str** | The developer fee for the order, in the currency specified by `currency`. If `currency` is not specified, the fee is in the cryptocurrency specified by `token_id`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places. | +**token_ids** | **List[str]** | An array of token IDs representing the cryptocurrencies and chains available for payment. These options will be shown to users on the payment page for them to choose from. Supported token IDs include: - USDC: `ETH_USDC`, `ARBITRUM_USDCOIN`, `SOL_USDC`, `BASE_USDC`, `MATIC_USDC2`, `BSC_USDC` - USDT: `TRON_USDT`, `ETH_USDT`, `ARBITRUM_USDT`, `SOL_USDT`, `BASE_USDT`, `MATIC_USDT`, `BSC_USDT` | +**custom_exchange_rates** | [**List[OrderLinkBusinessInfoCustomExchangeRatesInner]**](OrderLinkBusinessInfoCustomExchangeRatesInner.md) | A list of custom exchange rates defining how much one unit of a specific cryptocurrency (`token_id`) is valued in the selected fiat or crypto currency (`currency`). If this field is omitted, the system’s default exchange rates will apply. Each item specifies a `token_id` and its corresponding `exchange_rate`. For example, to treat 1 USDT (on Ethereum) as equivalent to 0.99 USD, provide: ```json { \"custom_exchange_rates\": [ { \"token_id\": \"ETH_USDT\", \"exchange_rate\": \"0.99\" } ], \"currency\": \"USD\" } ``` | [optional] +**currency** | **str** | The currency in which both the order amount (`order_amount`) and the developer fee (`fee_amount`) are denominated. Only the following values are supported: `USD`, `USDT`, or `USDC`. | +**fee_amount** | **str** | The developer fee for the order, denominated in the currency specified by `currency`. If you are a merchant directly serving payers, set this field to `0`. Developer fees are only relevant for platforms like payment service providers (PSPs) that charge fees to their downstream merchants. The developer fee is added to the base amount (`order_amount`) to determine the final charge. For example: - Base amount (`order_amount`): \"100.00\" - Developer fee (`fee_amount`): \"2.00\" - Total charged to customer: \"102.00\" Values can contain up to two decimal places. | **merchant_id** | **str** | The merchant ID. | -**order_amount** | **str** | The base amount of the order, excluding the developer fee (specified in `fee_amount`), in the currency specified by `currency`. If `currency` is not specified, the amount is in the cryptocurrency specified by `token_id`. Values must be greater than `0` and contain two decimal places. | +**order_amount** | **str** | The base amount of the order, excluding the developer fee (specified in `fee_amount`), denominated in the currency specified by `currency`. Values must be greater than `0` and contain two decimal places. | **merchant_order_code** | **str** | A unique reference code assigned by the merchant to identify this order in their system. The code should have a maximum length of 128 characters. | [optional] **psp_order_code** | **str** | A unique reference code assigned by you as a developer to identify this order in your system. This code must be unique across all orders in your system. The code should have a maximum length of 128 characters. | **expired_in** | **int** | The number of seconds until the pay-in order expires, counted from when the request is sent. For example, if set to `1800`, the order will expire in 30 minutes. Must be greater than zero and cannot exceed 3 hours (10800 seconds). After expiration: - The order status becomes final and cannot be changed - The `received_token_amount` field will no longer be updated - Funds received after expiration will be categorized as late payments and can only be settled from the developer balance. - A late payment will trigger a `transactionLate` webhook event. | [optional] [default to 1800] -**use_dedicated_address** | **bool** | Whether to allocate a dedicated address for this order. - `true`: A dedicated address will be allocated for this order. - `false`: A shared address from the address pool will be used. | [optional] -**amount_tolerance** | **str** | Allowed amount deviation, precision to 1 decimal place. | [optional] +**use_dedicated_address** | **bool** | This field has been deprecated. | [optional] +**amount_tolerance** | **str** | The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`. | [optional] ## Example diff --git a/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md b/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md index d8e6d674..2867b63d 100644 --- a/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md +++ b/docs/OrderLinkBusinessInfoCustomExchangeRatesInner.md @@ -5,8 +5,8 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**token_id** | **str** | The cryptocurrency token ID | -**exchange_rate** | **str** | The fixed exchange rate to use for this token | +**token_id** | **str** | The token ID. | +**exchange_rate** | **str** | The exchange rate to use for this token. | ## Example diff --git a/docs/PaymentApi.md b/docs/PaymentApi.md index 413fe986..2f6b4ff0 100644 --- a/docs/PaymentApi.md +++ b/docs/PaymentApi.md @@ -11,6 +11,7 @@ Method | HTTP request | Description [**create_order_link**](PaymentApi.md#create_order_link) | **POST** /payments/links/orders | Create order link [**create_payment_order**](PaymentApi.md#create_payment_order) | **POST** /payments/orders | Create pay-in order [**create_refund**](PaymentApi.md#create_refund) | **POST** /payments/refunds | Create refund order +[**create_refund_link**](PaymentApi.md#create_refund_link) | **POST** /payments/links/refunds | Create refund link [**create_settlement_request**](PaymentApi.md#create_settlement_request) | **POST** /payments/settlement_requests | Create settlement request [**delete_crypto_address**](PaymentApi.md#delete_crypto_address) | **POST** /payments/crypto_addresses/{crypto_address_id}/delete | Delete crypto address [**get_exchange_rate**](PaymentApi.md#get_exchange_rate) | **GET** /payments/exchange_rates/{token_id}/{currency} | Get exchange rate @@ -338,7 +339,7 @@ Name | Type | Description | Notes Create order link -This operation creates a payment link of a pay-in order. +This operation generates a payment link for a pay-in order. The link directs users to a hosted payment page where they can complete their payment for the order. You can share the link directly with users or embed the payment page in your website or application using an iframe. For more details, see [Payment Link](https://www.cobo.com/developers/v2/payments/payment-link). ### Example @@ -380,7 +381,7 @@ with cobo_waas2.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- - **create_order_link_request** | [**CreateOrderLinkRequest**](CreateOrderLinkRequest.md)| The request body to create a payment link of a pay-in order. | [optional] + **create_order_link_request** | [**CreateOrderLinkRequest**](CreateOrderLinkRequest.md)| The request body to create a payment link for a pay-in order. | [optional] ### Return type @@ -399,7 +400,7 @@ Name | Type | Description | Notes | Status code | Description | Response headers | |-------------|-------------|------------------| -**201** | Infos of a newly initiated payment link. | - | +**201** | Order link created successfully. | - | **4XX** | Bad request. Your request contains malformed syntax or invalid parameters. | - | **5XX** | Internal server error. | - | @@ -551,6 +552,78 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **create_refund_link** +> Link create_refund_link(create_refund_link_request=create_refund_link_request) + +Create refund link + +This operation creates a payment link for a refund. + +### Example + +* Api Key Authentication (CoboAuth): + +```python +import cobo_waas2 +from cobo_waas2.models.create_refund_link_request import CreateRefundLinkRequest +from cobo_waas2.models.link import Link +from cobo_waas2.rest import ApiException +from pprint import pprint + +# See configuration.py for a list of all supported configurations. +configuration = cobo_waas2.Configuration( + # Replace `` with your private key + api_private_key="", + # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2. + host="https://api.dev.cobo.com/v2" +) +# Enter a context with an instance of the API client +with cobo_waas2.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cobo_waas2.PaymentApi(api_client) + create_refund_link_request = cobo_waas2.CreateRefundLinkRequest() + + try: + # Create refund link + api_response = api_instance.create_refund_link(create_refund_link_request=create_refund_link_request) + print("The response of PaymentApi->create_refund_link:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling PaymentApi->create_refund_link: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **create_refund_link_request** | [**CreateRefundLinkRequest**](CreateRefundLinkRequest.md)| The request body to create a payment link for a refund. | [optional] + +### Return type + +[**Link**](Link.md) + +### Authorization + +[CoboAuth](../README.md#CoboAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Order link created successfully. | - | +**4XX** | Bad request. Your request contains malformed syntax or invalid parameters. | - | +**5XX** | Internal server error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **create_settlement_request** > Settlement create_settlement_request(create_settlement_request_request=create_settlement_request_request) @@ -2667,7 +2740,7 @@ Name | Type | Description | Notes Update top-up address -This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain. +This operation updates the dedicated top-up address assigned to a specific payer under a merchant on a specified chain. You can update the top-up address for a given payer a maximum of 10 times. If you exceed this limit, the API request will return an error. ### Example diff --git a/docs/PaymentOrderEventData.md b/docs/PaymentOrderEventData.md index c439a162..c0b04e48 100644 --- a/docs/PaymentOrderEventData.md +++ b/docs/PaymentOrderEventData.md @@ -25,7 +25,7 @@ Name | Type | Description | Notes **updated_timestamp** | **int** | The last update time of the order, represented as a UNIX timestamp in seconds. | [optional] **transactions** | [**List[PaymentTransaction]**](PaymentTransaction.md) | An array of transactions associated with this pay-in order. Each transaction represents a separate blockchain operation related to the pay-in process. | [optional] **settlement_status** | [**SettleStatus**](SettleStatus.md) | | [optional] -**amount_tolerance** | **str** | Allowed amount deviation. | [optional] +**amount_tolerance** | **str** | The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`. | [optional] ## Example diff --git a/docs/PspBalance.md b/docs/PspBalance.md index 8befca10..bf9bd4c5 100644 --- a/docs/PspBalance.md +++ b/docs/PspBalance.md @@ -9,7 +9,7 @@ Name | Type | Description | Notes **developer_fee_amount** | **str** | The total amount of the token that has been received as developer fee. | [optional] **settled_amount** | **str** | The total amount of the token that has been paid out from the developer's balance. | [optional] **refunded_amount** | **str** | The total amount of the token that has been refunded from the developer's balance. | [optional] -**total_balance** | **str** | The total balance of the token available for payout or refund for the developer. `total_balance` = `developer_fee_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Amounts and Balances](/v2_cn/payments/amounts-and-balances) | [optional] +**total_balance** | **str** | The total balance of the token available for payout or refund for the developer. `total_balance` = `developer_fee_amount` - `settled_amount` - `refunded_amount` For more information, please refer to [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances) | [optional] **available_balance** | **str** | This field has been deprecated. | [optional] ## Example diff --git a/docs/RefundLinkBusinessInfo.md b/docs/RefundLinkBusinessInfo.md new file mode 100644 index 00000000..00e3f081 --- /dev/null +++ b/docs/RefundLinkBusinessInfo.md @@ -0,0 +1,33 @@ +# RefundLinkBusinessInfo + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**transaction_id** | **str** | The transaction ID. | +**amount** | **str** | The amount to refund in cryptocurrency. | +**refund_source** | [**RefundType**](RefundType.md) | | +**merchant_id** | **str** | The merchant ID, required if the refund amount source is `Merchant`. | [optional] +**fee_amount** | **str** | The amount of the transaction fee that the merchant will bear for the refund. | [optional] + +## Example + +```python +from cobo_waas2.models.refund_link_business_info import RefundLinkBusinessInfo + +# TODO update the JSON string below +json = "{}" +# create an instance of RefundLinkBusinessInfo from a JSON string +refund_link_business_info_instance = RefundLinkBusinessInfo.from_json(json) +# print the JSON string representation of the object +print(RefundLinkBusinessInfo.to_json()) + +# convert the object into a dict +refund_link_business_info_dict = refund_link_business_info_instance.to_dict() +# create an instance of RefundLinkBusinessInfo from a dict +refund_link_business_info_from_dict = RefundLinkBusinessInfo.from_dict(refund_link_business_info_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/RefundStatus.md b/docs/RefundStatus.md index e8ed89c9..a8a4aa56 100644 --- a/docs/RefundStatus.md +++ b/docs/RefundStatus.md @@ -1,6 +1,6 @@ # RefundStatus -The current status of the refund order. For information about transaction status, see [Transaction statuses and sub-statuses](https://www.cobo.com/developers/v2/guides/transactions/status). - `Pending`: The refund order has been created but the transaction has not been initiated. - `Processing`: The refund order is currently being processed, with at least one refund transaction in progress. - `Completed`: All refund transactions have been completed successfully. - `PartiallyCompleted`: Some refund transactions have been completed successfully, while others have failed. - `Failed`: All refund transactions have failed. - `PendingConfirmation`: The refund order has been created but the address to send (`to_address`) has not been specified. Once you use the [Update refund order](https://www.cobo.com/developers/v2/api-references/payment/update-refund-order) operation to specify the address, the status will be updated to `Pending`. +The current status of the refund order. For information about transaction status, see [Transaction statuses and sub-statuses](https://www.cobo.com/developers/v2/guides/transactions/status). - `AddressPending`: The refund link has been created and opened but the address is not yet submitted. - `AddressSubmitted`: The address of the refund link has been submitted. - `Pending`: The refund order has been created but the transaction has not been initiated. - `Processing`: The refund order is currently being processed, with at least one refund transaction in progress. - `Completed`: All refund transactions have been completed successfully. - `PartiallyCompleted`: Some refund transactions have been completed successfully, while others have failed. - `Failed`: All refund transactions have failed. - `PendingConfirmation`: The refund order has been created but the address to send (`to_address`) has not been specified. Once you use the [Update refund order](https://www.cobo.com/developers/v2/api-references/payment/update-refund-order) operation to specify the address, the status will be updated to `Pending`. ## Properties diff --git a/docs/SubmitKytScreeningsReviewBody.md b/docs/SubmitKytScreeningsReviewBody.md index ed71dbee..e597583f 100644 --- a/docs/SubmitKytScreeningsReviewBody.md +++ b/docs/SubmitKytScreeningsReviewBody.md @@ -1,6 +1,6 @@ # SubmitKytScreeningsReviewBody -The information about submitting a manual KYT review result for KYT screening cases that require human analysis. +Submission of a manual KYT review result. ## Properties diff --git a/docs/SwapQuote.md b/docs/SwapQuote.md index 95365cf6..af2154d6 100644 --- a/docs/SwapQuote.md +++ b/docs/SwapQuote.md @@ -5,16 +5,16 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- -**quote_id** | **str** | The unique identifier of the swap quote. | -**pay_token_id** | **str** | The ID of the token to pay. | -**pay_amount** | **str** | The amount of the token to pay. | -**receive_token_id** | **str** | The ID of the token to receive. | -**receive_amount** | **str** | The amount of the token to receive. | -**fee_token_id** | **str** | The ID of the token for the service fee. | -**fee_amount** | **str** | The amount of the token for the service fee. | -**min_receive_amount** | **str** | The minimum amount of the token to receive if `pay_amount` is specified. | [optional] -**max_pay_amount** | **str** | The maximum amount of the token to pay if `receive_amount` is specified. | [optional] -**quote_expired_timestamp** | **int** | The time when the swap quote expires, in Unix timestamp format, measured in milliseconds. | +**quote_id** | **str** | The unique id of quote. | +**pay_token_id** | **str** | The token ID to pay. | +**pay_amount** | **str** | The amount of tokens to pay. | +**receive_token_id** | **str** | The token ID to receive. | +**receive_amount** | **str** | The amount of tokens to receive. | +**fee_token_id** | **str** | The token ID for the service fee. | +**fee_amount** | **str** | The amount of tokens for the service fee. | +**min_receive_amount** | **str** | The minimum amount of tokens to receive if the pay amount is specified. | [optional] +**max_pay_amount** | **str** | The maximum amount of tokens to pay if the receive amount is specified. | [optional] +**quote_expired_timestamp** | **int** | The time when the quote will expire, in Unix timestamp format, measured in milliseconds. | ## Example diff --git a/docs/TokenizationApi.md b/docs/TokenizationApi.md index 60ddd4d1..0d929d79 100644 --- a/docs/TokenizationApi.md +++ b/docs/TokenizationApi.md @@ -15,6 +15,7 @@ Method | HTTP request | Description [**list_tokenization_allowlist_addresses**](TokenizationApi.md#list_tokenization_allowlist_addresses) | **GET** /tokenization/tokens/{token_id}/allowlist/addresses | List addresses on allowlist [**list_tokenization_blocklist_addresses**](TokenizationApi.md#list_tokenization_blocklist_addresses) | **GET** /tokenization/tokens/{token_id}/blocklist/addresses | List addresses on blocklist [**list_tokenization_holdings**](TokenizationApi.md#list_tokenization_holdings) | **GET** /tokenization/tokens/{token_id}/holdings | Get token holdings information +[**list_tokenization_permissions**](TokenizationApi.md#list_tokenization_permissions) | **GET** /tokenization/tokens/{token_id}/permissions | List token permissions [**list_tokenization_supported_chains**](TokenizationApi.md#list_tokenization_supported_chains) | **GET** /tokenization/enabled_chains | List supported chains for tokenization [**mint_tokenization**](TokenizationApi.md#mint_tokenization) | **POST** /tokenization/tokens/{token_id}/mint | Mint tokens [**pause_tokenization**](TokenizationApi.md#pause_tokenization) | **POST** /tokenization/tokens/{token_id}/pause | Pause token contract @@ -23,6 +24,7 @@ Method | HTTP request | Description [**update_tokenization_allowlist_activation**](TokenizationApi.md#update_tokenization_allowlist_activation) | **POST** /tokenization/tokens/{token_id}/allowlist/activation | Activate or deactivate allowlist [**update_tokenization_allowlist_addresses**](TokenizationApi.md#update_tokenization_allowlist_addresses) | **POST** /tokenization/tokens/{token_id}/allowlist/addresses | Update addresses on allowlist [**update_tokenization_blocklist_addresses**](TokenizationApi.md#update_tokenization_blocklist_addresses) | **POST** /tokenization/tokens/{token_id}/blocklist/addresses | Update addresses on blocklist +[**update_tokenization_permissions**](TokenizationApi.md#update_tokenization_permissions) | **POST** /tokenization/tokens/{token_id}/permissions | Update token permissions # **burn_tokenization** @@ -30,7 +32,7 @@ Method | HTTP request | Description Burn tokens -This operation burns tokens from a specified address. Creates a burn transaction that will decrease the token supply. +This operation burns tokens from a specified address. Creates a burn transaction that will decrease the token supply. **Note**: This operation is not supported for CoboERC20Wrapper and SOLWrapper tokens. ### Example @@ -872,8 +874,90 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **list_tokenization_permissions** +> TokenizationListPermissionsResponse list_tokenization_permissions(token_id, address=address, limit=limit, after=after, before=before, direction=direction) + +List token permissions + +This operation retrieves the permission settings for a tokenization contract. + +### Example + +* OAuth Authentication (OAuth2): +* Api Key Authentication (CoboAuth): + +```python +import cobo_waas2 +from cobo_waas2.models.tokenization_list_permissions_response import TokenizationListPermissionsResponse +from cobo_waas2.rest import ApiException +from pprint import pprint + +# See configuration.py for a list of all supported configurations. +configuration = cobo_waas2.Configuration( + # Replace `` with your private key + api_private_key="", + # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2. + host="https://api.dev.cobo.com/v2" +) +# Enter a context with an instance of the API client +with cobo_waas2.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cobo_waas2.TokenizationApi(api_client) + token_id = 'ETH_USDT' + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' + limit = 10 + after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' + before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' + direction = 'ASC' + + try: + # List token permissions + api_response = api_instance.list_tokenization_permissions(token_id, address=address, limit=limit, after=after, before=before, direction=direction) + print("The response of TokenizationApi->list_tokenization_permissions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TokenizationApi->list_tokenization_permissions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token_id** | **str**| The token ID, which is the unique identifier of a token. | + **address** | **str**| The address to query permissions for. If not provided, returns all addresses with permissions. | [optional] + **limit** | **int**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] + **after** | **str**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional] + **before** | **str**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional] + **direction** | **str**| The sort direction. Possible values include: - `ASC`: Sort the results in ascending order. - `DESC`: Sort the results in descending order. | [optional] [default to 'ASC'] + +### Return type + +[**TokenizationListPermissionsResponse**](TokenizationListPermissionsResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**200** | Successfully retrieved permissions. | - | +**4XX** | Bad request. Your request contains malformed syntax or invalid parameters. | - | +**5XX** | Internal server error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + # **list_tokenization_supported_chains** -> TokenizationListEnabledChainsResponse list_tokenization_supported_chains(limit=limit, after=after, before=before) +> TokenizationListEnabledChainsResponse list_tokenization_supported_chains(token_standard=token_standard, limit=limit, after=after, before=before) List supported chains for tokenization @@ -887,6 +971,7 @@ This operation retrieves a list of tokenization supported chains. ```python import cobo_waas2 from cobo_waas2.models.tokenization_list_enabled_chains_response import TokenizationListEnabledChainsResponse +from cobo_waas2.models.tokenization_token_standard import TokenizationTokenStandard from cobo_waas2.rest import ApiException from pprint import pprint @@ -901,13 +986,14 @@ configuration = cobo_waas2.Configuration( with cobo_waas2.ApiClient(configuration) as api_client: # Create an instance of the API class api_instance = cobo_waas2.TokenizationApi(api_client) + token_standard = cobo_waas2.TokenizationTokenStandard() limit = 10 after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' try: # List supported chains for tokenization - api_response = api_instance.list_tokenization_supported_chains(limit=limit, after=after, before=before) + api_response = api_instance.list_tokenization_supported_chains(token_standard=token_standard, limit=limit, after=after, before=before) print("The response of TokenizationApi->list_tokenization_supported_chains:\n") pprint(api_response) except Exception as e: @@ -921,6 +1007,7 @@ with cobo_waas2.ApiClient(configuration) as api_client: Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- + **token_standard** | [**TokenizationTokenStandard**](.md)| Filter by token standard. | [optional] **limit** | **int**| The maximum number of objects to return. For most operations, the value range is [1, 50]. | [optional] [default to 10] **after** | **str**| A cursor indicating the position after the current page. This value is generated by Cobo and returned in the response. You do not need to provide it on the first request. When paginating forward (to the next page), you should pass the after value returned from the last response. | [optional] **before** | **str**| A cursor indicating the position before the current page. This value is generated by Cobo and returned in the response. If you are paginating forward from the beginning, you do not need to provide it on the first request. When paginating backward (to the previous page), you should pass the before value returned from the last response. | [optional] @@ -953,7 +1040,7 @@ Name | Type | Description | Notes Mint tokens -This operation mints new tokens to a specified address. Creates a mint transaction that will increase the token supply. +This operation mints new tokens to a specified address. Creates a mint transaction that will increase the token supply. **Note**: This operation is not supported for CoboERC20Wrapper and SOLWrapper tokens. ### Example @@ -1473,3 +1560,78 @@ Name | Type | Description | Notes [[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) +# **update_tokenization_permissions** +> TokenizationOperationResponse update_tokenization_permissions(token_id, tokenization_update_permissions_request) + +Update token permissions + +This operation updates permission settings for a tokenization contract. + +### Example + +* OAuth Authentication (OAuth2): +* Api Key Authentication (CoboAuth): + +```python +import cobo_waas2 +from cobo_waas2.models.tokenization_operation_response import TokenizationOperationResponse +from cobo_waas2.models.tokenization_update_permissions_request import TokenizationUpdatePermissionsRequest +from cobo_waas2.rest import ApiException +from pprint import pprint + +# See configuration.py for a list of all supported configurations. +configuration = cobo_waas2.Configuration( + # Replace `` with your private key + api_private_key="", + # Select the development environment. To use the production environment, change the URL to https://api.cobo.com/v2. + host="https://api.dev.cobo.com/v2" +) +# Enter a context with an instance of the API client +with cobo_waas2.ApiClient(configuration) as api_client: + # Create an instance of the API class + api_instance = cobo_waas2.TokenizationApi(api_client) + token_id = 'ETH_USDT' + tokenization_update_permissions_request = cobo_waas2.TokenizationUpdatePermissionsRequest() + + try: + # Update token permissions + api_response = api_instance.update_tokenization_permissions(token_id, tokenization_update_permissions_request) + print("The response of TokenizationApi->update_tokenization_permissions:\n") + pprint(api_response) + except Exception as e: + print("Exception when calling TokenizationApi->update_tokenization_permissions: %s\n" % e) +``` + + + +### Parameters + + +Name | Type | Description | Notes +------------- | ------------- | ------------- | ------------- + **token_id** | **str**| The token ID, which is the unique identifier of a token. | + **tokenization_update_permissions_request** | [**TokenizationUpdatePermissionsRequest**](TokenizationUpdatePermissionsRequest.md)| The request body for managing permissions. | + +### Return type + +[**TokenizationOperationResponse**](TokenizationOperationResponse.md) + +### Authorization + +[OAuth2](../README.md#OAuth2), [CoboAuth](../README.md#CoboAuth) + +### HTTP request headers + + - **Content-Type**: application/json + - **Accept**: application/json + +### HTTP response details + +| Status code | Description | Response headers | +|-------------|-------------|------------------| +**201** | Tokenization operation transaction created successfully | - | +**4XX** | Bad request. Your request contains malformed syntax or invalid parameters. | - | +**5XX** | Internal server error. | - | + +[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md) + diff --git a/docs/TokenizationERC20TokenParams.md b/docs/TokenizationERC20TokenParams.md index 2f824b60..34cec638 100644 --- a/docs/TokenizationERC20TokenParams.md +++ b/docs/TokenizationERC20TokenParams.md @@ -10,7 +10,7 @@ Name | Type | Description | Notes **symbol** | **str** | The symbol of the token. | **decimals** | **int** | The number of decimals for the token (0-18). | **token_access_activated** | **bool** | Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations. | [optional] [default to False] -**permissions** | [**TokenizationTokenPermissionParams**](TokenizationTokenPermissionParams.md) | | [optional] +**permissions** | [**TokenizationERC20TokenPermissionParams**](TokenizationERC20TokenPermissionParams.md) | | [optional] ## Example diff --git a/docs/TokenizationTokenPermissionParams.md b/docs/TokenizationERC20TokenPermissionParams.md similarity index 60% rename from docs/TokenizationTokenPermissionParams.md rename to docs/TokenizationERC20TokenPermissionParams.md index d8f23120..9337c44b 100644 --- a/docs/TokenizationTokenPermissionParams.md +++ b/docs/TokenizationERC20TokenPermissionParams.md @@ -1,4 +1,4 @@ -# TokenizationTokenPermissionParams +# TokenizationERC20TokenPermissionParams Role-based permission settings for token contract. If not provided, all permissions will be granted to the issuing wallet by default. @@ -17,19 +17,19 @@ Name | Type | Description | Notes ## Example ```python -from cobo_waas2.models.tokenization_token_permission_params import TokenizationTokenPermissionParams +from cobo_waas2.models.tokenization_erc20_token_permission_params import TokenizationERC20TokenPermissionParams # TODO update the JSON string below json = "{}" -# create an instance of TokenizationTokenPermissionParams from a JSON string -tokenization_token_permission_params_instance = TokenizationTokenPermissionParams.from_json(json) +# create an instance of TokenizationERC20TokenPermissionParams from a JSON string +tokenization_erc20_token_permission_params_instance = TokenizationERC20TokenPermissionParams.from_json(json) # print the JSON string representation of the object -print(TokenizationTokenPermissionParams.to_json()) +print(TokenizationERC20TokenPermissionParams.to_json()) # convert the object into a dict -tokenization_token_permission_params_dict = tokenization_token_permission_params_instance.to_dict() -# create an instance of TokenizationTokenPermissionParams from a dict -tokenization_token_permission_params_from_dict = TokenizationTokenPermissionParams.from_dict(tokenization_token_permission_params_dict) +tokenization_erc20_token_permission_params_dict = tokenization_erc20_token_permission_params_instance.to_dict() +# create an instance of TokenizationERC20TokenPermissionParams from a dict +tokenization_erc20_token_permission_params_from_dict = TokenizationERC20TokenPermissionParams.from_dict(tokenization_erc20_token_permission_params_dict) ``` [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) diff --git a/docs/TokenizationERC20WrappedTokenParams.md b/docs/TokenizationERC20WrappedTokenParams.md new file mode 100644 index 00000000..8d802836 --- /dev/null +++ b/docs/TokenizationERC20WrappedTokenParams.md @@ -0,0 +1,34 @@ +# TokenizationERC20WrappedTokenParams + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**standard** | [**TokenizationTokenStandard**](TokenizationTokenStandard.md) | | +**name** | **str** | The name of the token. | +**symbol** | **str** | The symbol of the token. | +**permissions** | [**TokenizationERC20WrappedTokenPermissionParams**](TokenizationERC20WrappedTokenPermissionParams.md) | | [optional] +**token_access_activated** | **bool** | Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations. | [optional] [default to False] +**underlying_token** | **str** | The address of the underlying token that this tokenized asset represents. | + +## Example + +```python +from cobo_waas2.models.tokenization_erc20_wrapped_token_params import TokenizationERC20WrappedTokenParams + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenizationERC20WrappedTokenParams from a JSON string +tokenization_erc20_wrapped_token_params_instance = TokenizationERC20WrappedTokenParams.from_json(json) +# print the JSON string representation of the object +print(TokenizationERC20WrappedTokenParams.to_json()) + +# convert the object into a dict +tokenization_erc20_wrapped_token_params_dict = tokenization_erc20_wrapped_token_params_instance.to_dict() +# create an instance of TokenizationERC20WrappedTokenParams from a dict +tokenization_erc20_wrapped_token_params_from_dict = TokenizationERC20WrappedTokenParams.from_dict(tokenization_erc20_wrapped_token_params_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenizationERC20WrappedTokenPermissionParams.md b/docs/TokenizationERC20WrappedTokenPermissionParams.md new file mode 100644 index 00000000..84ab6cd9 --- /dev/null +++ b/docs/TokenizationERC20WrappedTokenPermissionParams.md @@ -0,0 +1,36 @@ +# TokenizationERC20WrappedTokenPermissionParams + +Role-based permission settings for token contract. If not provided, all permissions will be granted to the issuing wallet by default. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**admin** | **List[str]** | List of addresses for the admin role. | [optional] +**minter** | **List[str]** | List of addresses for the minter role. | [optional] +**wrapper** | **List[str]** | List of addresses for the wrapper role. | [optional] +**manager** | **List[str]** | List of addresses for the manager role. | [optional] +**pauser** | **List[str]** | List of addresses for the pauser role. | [optional] +**salvager** | **List[str]** | List of addresses for the salvager role. | [optional] +**upgrader** | **List[str]** | List of addresses for the upgrader role. | [optional] + +## Example + +```python +from cobo_waas2.models.tokenization_erc20_wrapped_token_permission_params import TokenizationERC20WrappedTokenPermissionParams + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenizationERC20WrappedTokenPermissionParams from a JSON string +tokenization_erc20_wrapped_token_permission_params_instance = TokenizationERC20WrappedTokenPermissionParams.from_json(json) +# print the JSON string representation of the object +print(TokenizationERC20WrappedTokenPermissionParams.to_json()) + +# convert the object into a dict +tokenization_erc20_wrapped_token_permission_params_dict = tokenization_erc20_wrapped_token_permission_params_instance.to_dict() +# create an instance of TokenizationERC20WrappedTokenPermissionParams from a dict +tokenization_erc20_wrapped_token_permission_params_from_dict = TokenizationERC20WrappedTokenPermissionParams.from_dict(tokenization_erc20_wrapped_token_permission_params_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenizationEstimateFeeRequestOperationParams.md b/docs/TokenizationEstimateFeeRequestOperationParams.md index f6a14dec..498c5b3b 100644 --- a/docs/TokenizationEstimateFeeRequestOperationParams.md +++ b/docs/TokenizationEstimateFeeRequestOperationParams.md @@ -14,7 +14,7 @@ Name | Type | Description | Notes **token_id** | **str** | The ID of the token. | **burns** | [**List[TokenizationBurnTokenParamsBurnsInner]**](TokenizationBurnTokenParamsBurnsInner.md) | Details for each token burn, including amount and address to burn from. | **action** | [**TokenizationUpdateAddressAction**](TokenizationUpdateAddressAction.md) | | -**addresses** | [**List[TokenizationUpdateBlocklistAddressesParamsAddressesInner]**](TokenizationUpdateBlocklistAddressesParamsAddressesInner.md) | A list of addresses to manage. For 'add' operations, notes can be provided. For 'remove' operations, notes are ignored. | +**addresses** | [**List[TokenizationUpdateAddressPermissions]**](TokenizationUpdateAddressPermissions.md) | | **activation** | **bool** | Whether to activate the allowlist feature for the token. | **data** | [**TokenizationContractCallParamsData**](TokenizationContractCallParamsData.md) | | [optional] diff --git a/docs/TokenizationIssueTokenParamsTokenParams.md b/docs/TokenizationIssueTokenParamsTokenParams.md index 42fea6ab..f80ff984 100644 --- a/docs/TokenizationIssueTokenParamsTokenParams.md +++ b/docs/TokenizationIssueTokenParamsTokenParams.md @@ -10,7 +10,8 @@ Name | Type | Description | Notes **symbol** | **str** | The symbol of the token. | **decimals** | **int** | The number of decimals for the token (0-18). | **token_access_activated** | **bool** | Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations. | [optional] [default to False] -**permissions** | [**TokenizationSolTokenPermissionParams**](TokenizationSolTokenPermissionParams.md) | | [optional] +**permissions** | [**TokenizationSolWrappedTokenPermissionParams**](TokenizationSolWrappedTokenPermissionParams.md) | | [optional] +**underlying_token** | **str** | The address of the underlying token that this tokenized asset represents. | ## Example diff --git a/docs/TokenizationListPermissionsResponse.md b/docs/TokenizationListPermissionsResponse.md new file mode 100644 index 00000000..9cd11c44 --- /dev/null +++ b/docs/TokenizationListPermissionsResponse.md @@ -0,0 +1,30 @@ +# TokenizationListPermissionsResponse + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**data** | [**List[TokenizationListPermissionsResponseDataInner]**](TokenizationListPermissionsResponseDataInner.md) | List of permissions. | +**pagination** | [**Pagination**](Pagination.md) | | + +## Example + +```python +from cobo_waas2.models.tokenization_list_permissions_response import TokenizationListPermissionsResponse + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenizationListPermissionsResponse from a JSON string +tokenization_list_permissions_response_instance = TokenizationListPermissionsResponse.from_json(json) +# print the JSON string representation of the object +print(TokenizationListPermissionsResponse.to_json()) + +# convert the object into a dict +tokenization_list_permissions_response_dict = tokenization_list_permissions_response_instance.to_dict() +# create an instance of TokenizationListPermissionsResponse from a dict +tokenization_list_permissions_response_from_dict = TokenizationListPermissionsResponse.from_dict(tokenization_list_permissions_response_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenizationListPermissionsResponseDataInner.md b/docs/TokenizationListPermissionsResponseDataInner.md new file mode 100644 index 00000000..f20272e0 --- /dev/null +++ b/docs/TokenizationListPermissionsResponseDataInner.md @@ -0,0 +1,30 @@ +# TokenizationListPermissionsResponseDataInner + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | The address with permissions. | +**permissions** | [**List[TokenizationTokenPermissionType]**](TokenizationTokenPermissionType.md) | The permissions assigned to this address. | + +## Example + +```python +from cobo_waas2.models.tokenization_list_permissions_response_data_inner import TokenizationListPermissionsResponseDataInner + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenizationListPermissionsResponseDataInner from a JSON string +tokenization_list_permissions_response_data_inner_instance = TokenizationListPermissionsResponseDataInner.from_json(json) +# print the JSON string representation of the object +print(TokenizationListPermissionsResponseDataInner.to_json()) + +# convert the object into a dict +tokenization_list_permissions_response_data_inner_dict = tokenization_list_permissions_response_data_inner_instance.to_dict() +# create an instance of TokenizationListPermissionsResponseDataInner from a dict +tokenization_list_permissions_response_data_inner_from_dict = TokenizationListPermissionsResponseDataInner.from_dict(tokenization_list_permissions_response_data_inner_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenizationPermissionAction.md b/docs/TokenizationPermissionAction.md new file mode 100644 index 00000000..646f453f --- /dev/null +++ b/docs/TokenizationPermissionAction.md @@ -0,0 +1,12 @@ +# TokenizationPermissionAction + +The permission action to perform: - `add`: Grant permissions to specified addresses - `remove`: Revoke permissions from specified addresses - `set`: Set permissions for specified addresses exclusively Supported actions by chain: - **EVM**: add, remove - **Solana Authority**: set - **Solana Wrapper**: add, remove + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- + +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenizationSOLWrappedTokenParams.md b/docs/TokenizationSOLWrappedTokenParams.md new file mode 100644 index 00000000..05768f28 --- /dev/null +++ b/docs/TokenizationSOLWrappedTokenParams.md @@ -0,0 +1,34 @@ +# TokenizationSOLWrappedTokenParams + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**standard** | [**TokenizationTokenStandard**](TokenizationTokenStandard.md) | | +**name** | **str** | The name of the token. | +**symbol** | **str** | The symbol of the token. | +**underlying_token** | **str** | The address of the underlying token that this tokenized asset represents. | +**token_access_activated** | **bool** | Whether the allowlist feature is activated for the token. When activated, only addresses in the allowlist can perform token operations. | [optional] [default to False] +**permissions** | [**TokenizationSolWrappedTokenPermissionParams**](TokenizationSolWrappedTokenPermissionParams.md) | | [optional] + +## Example + +```python +from cobo_waas2.models.tokenization_sol_wrapped_token_params import TokenizationSOLWrappedTokenParams + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenizationSOLWrappedTokenParams from a JSON string +tokenization_sol_wrapped_token_params_instance = TokenizationSOLWrappedTokenParams.from_json(json) +# print the JSON string representation of the object +print(TokenizationSOLWrappedTokenParams.to_json()) + +# convert the object into a dict +tokenization_sol_wrapped_token_params_dict = tokenization_sol_wrapped_token_params_instance.to_dict() +# create an instance of TokenizationSOLWrappedTokenParams from a dict +tokenization_sol_wrapped_token_params_from_dict = TokenizationSOLWrappedTokenParams.from_dict(tokenization_sol_wrapped_token_params_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenizationSolWrappedTokenPermissionParams.md b/docs/TokenizationSolWrappedTokenPermissionParams.md new file mode 100644 index 00000000..5c84e202 --- /dev/null +++ b/docs/TokenizationSolWrappedTokenPermissionParams.md @@ -0,0 +1,33 @@ +# TokenizationSolWrappedTokenPermissionParams + +Role-based permission settings for Solana wrapped token. The owner is automatically set to the address that calls the initialize function (typically the issuing wallet) and cannot be specified here. Only the wrapper and pauser roles can be configured during initialization. + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**wrapper** | **List[str]** | List of Solana wallet addresses that can perform wrap/unwrap operations. Multiple addresses can be assigned this role. | [optional] +**pauser** | **str** | Solana wallet address that acts as a pauser authority for the token. This authority can pause token transfers. | [optional] +**freezer** | **str** | Solana wallet address that acts as a freezer authority for the token. This authority can freeze token accounts. | [optional] +**updater** | **str** | Solana wallet address that acts as an updater authority for the token. This authority can update token metadata. | [optional] + +## Example + +```python +from cobo_waas2.models.tokenization_sol_wrapped_token_permission_params import TokenizationSolWrappedTokenPermissionParams + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenizationSolWrappedTokenPermissionParams from a JSON string +tokenization_sol_wrapped_token_permission_params_instance = TokenizationSolWrappedTokenPermissionParams.from_json(json) +# print the JSON string representation of the object +print(TokenizationSolWrappedTokenPermissionParams.to_json()) + +# convert the object into a dict +tokenization_sol_wrapped_token_permission_params_dict = tokenization_sol_wrapped_token_permission_params_instance.to_dict() +# create an instance of TokenizationSolWrappedTokenPermissionParams from a dict +tokenization_sol_wrapped_token_permission_params_from_dict = TokenizationSolWrappedTokenPermissionParams.from_dict(tokenization_sol_wrapped_token_permission_params_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenizationTokenDetailInfo.md b/docs/TokenizationTokenDetailInfo.md index 21963655..c8f91a45 100644 --- a/docs/TokenizationTokenDetailInfo.md +++ b/docs/TokenizationTokenDetailInfo.md @@ -10,12 +10,15 @@ Name | Type | Description | Notes **token_address** | **str** | The address of the token contract. | [optional] **token_name** | **str** | The name of the token. | [optional] **token_symbol** | **str** | The unique token symbol. | +**token_standard** | [**TokenizationTokenStandard**](TokenizationTokenStandard.md) | | **decimals** | **int** | The number of decimals of the token. | **token_access_activated** | **bool** | Whether the allowlist feature is activated for the token. | [optional] **status** | [**TokenizationStatus**](TokenizationStatus.md) | | **total_supply** | **str** | The total supply of the token. | [optional] **holdings** | **str** | The amount of tokens held by the organization. | [optional] +**archived** | **bool** | Whether the token is archived. If the token is archived, no operations can be initiated on it. | **permissions** | [**List[TokenizationAddressPermission]**](TokenizationAddressPermission.md) | List of execution addresses and their permissions. | [optional] +**underlying_token** | [**TokenizationTokenInfo**](TokenizationTokenInfo.md) | | [optional] ## Example diff --git a/docs/TokenizationTokenInfo.md b/docs/TokenizationTokenInfo.md index e0765d2e..645a6eba 100644 --- a/docs/TokenizationTokenInfo.md +++ b/docs/TokenizationTokenInfo.md @@ -10,11 +10,13 @@ Name | Type | Description | Notes **token_address** | **str** | The address of the token contract. | [optional] **token_name** | **str** | The name of the token. | [optional] **token_symbol** | **str** | The unique token symbol. | +**token_standard** | [**TokenizationTokenStandard**](TokenizationTokenStandard.md) | | **decimals** | **int** | The number of decimals of the token. | **token_access_activated** | **bool** | Whether the allowlist feature is activated for the token. | [optional] **status** | [**TokenizationStatus**](TokenizationStatus.md) | | **total_supply** | **str** | The total supply of the token. | [optional] **holdings** | **str** | The amount of tokens held by the organization. | [optional] +**archived** | **bool** | Whether the token is archived. If the token is archived, no operations can be initiated on it. | ## Example diff --git a/docs/TokenizationTokenPermissionType.md b/docs/TokenizationTokenPermissionType.md index 67da56c5..d38a0dbe 100644 --- a/docs/TokenizationTokenPermissionType.md +++ b/docs/TokenizationTokenPermissionType.md @@ -1,6 +1,6 @@ # TokenizationTokenPermissionType -The type of permission for token operations. +The type of permission for token operations. Each permission grants specific capabilities: - `ManagePermissions`: Ability to grant and revoke permissions to addresses. - `ManageAccessAndControls`: Ability to manage access control mechanisms including allowlist and blocklist operations. - `MintTokens`: Ability to mint tokens and increase the total supply. - `BurnTokens`: Ability to burn tokens and decrease the total supply. - `RecoverTokens`: Ability to recover tokens from specified addresses. - `UpgradeContract`: Ability to upgrade the smart contract implementation. - `PauseContract`: Ability to pause and unpause the contract. - `FreezeAccounts`: Ability to freeze and unfreeze addresses. - `UpdateMetadata`: Ability to update token metadata. - `WrapTokens`: Ability to wrap and unwrap tokens for wrapped token implementations. - `PermanentDelegate`: An immutable delegate authority that cannot be changed once set. Has unlimited control over all token accounts including transfer and burn operations. Supported permissions by chain: - **EVM (CoboERC20)**: ManagePermissions, ManageAccessAndControls, MintTokens, BurnTokens, RecoverTokens, UpgradeContract, PauseContract - **EVM (CoboERC20Wrapper)**: ManagePermissions, ManageAccessAndControls, MintTokens, WrapTokens, RecoverTokens, UpgradeContract, PauseContract - **Solana (SPL Token 2022)**: MintTokens, PauseContract, FreezeAccounts, UpdateMetadata, PermanentDelegate ## Properties diff --git a/docs/TokenizationTokenPermissionsResponse.md b/docs/TokenizationTokenPermissionsResponse.md deleted file mode 100644 index ae5aceea..00000000 --- a/docs/TokenizationTokenPermissionsResponse.md +++ /dev/null @@ -1,30 +0,0 @@ -# TokenizationTokenPermissionsResponse - - -## Properties - -Name | Type | Description | Notes ------------- | ------------- | ------------- | ------------- -**permissions** | [**List[TokenizationTokenPermission]**](TokenizationTokenPermission.md) | List of available token permissions. | -**total_count** | **int** | Total number of permissions. | - -## Example - -```python -from cobo_waas2.models.tokenization_token_permissions_response import TokenizationTokenPermissionsResponse - -# TODO update the JSON string below -json = "{}" -# create an instance of TokenizationTokenPermissionsResponse from a JSON string -tokenization_token_permissions_response_instance = TokenizationTokenPermissionsResponse.from_json(json) -# print the JSON string representation of the object -print(TokenizationTokenPermissionsResponse.to_json()) - -# convert the object into a dict -tokenization_token_permissions_response_dict = tokenization_token_permissions_response_instance.to_dict() -# create an instance of TokenizationTokenPermissionsResponse from a dict -tokenization_token_permissions_response_from_dict = TokenizationTokenPermissionsResponse.from_dict(tokenization_token_permissions_response_dict) -``` -[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) - - diff --git a/docs/TokenizationUpdateAddressPermissions.md b/docs/TokenizationUpdateAddressPermissions.md new file mode 100644 index 00000000..e349f356 --- /dev/null +++ b/docs/TokenizationUpdateAddressPermissions.md @@ -0,0 +1,31 @@ +# TokenizationUpdateAddressPermissions + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**address** | **str** | The address to manage permissions for. | +**action** | [**TokenizationPermissionAction**](TokenizationPermissionAction.md) | | +**permissions** | [**List[TokenizationTokenPermissionType]**](TokenizationTokenPermissionType.md) | The list of permissions to be applied. | + +## Example + +```python +from cobo_waas2.models.tokenization_update_address_permissions import TokenizationUpdateAddressPermissions + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenizationUpdateAddressPermissions from a JSON string +tokenization_update_address_permissions_instance = TokenizationUpdateAddressPermissions.from_json(json) +# print the JSON string representation of the object +print(TokenizationUpdateAddressPermissions.to_json()) + +# convert the object into a dict +tokenization_update_address_permissions_dict = tokenization_update_address_permissions_instance.to_dict() +# create an instance of TokenizationUpdateAddressPermissions from a dict +tokenization_update_address_permissions_from_dict = TokenizationUpdateAddressPermissions.from_dict(tokenization_update_address_permissions_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenizationUpdatePermissionsEstimateFeeParams.md b/docs/TokenizationUpdatePermissionsEstimateFeeParams.md new file mode 100644 index 00000000..fe55115e --- /dev/null +++ b/docs/TokenizationUpdatePermissionsEstimateFeeParams.md @@ -0,0 +1,33 @@ +# TokenizationUpdatePermissionsEstimateFeeParams + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | [**TokenizationTokenOperationSource**](TokenizationTokenOperationSource.md) | | +**addresses** | [**List[TokenizationUpdateAddressPermissions]**](TokenizationUpdateAddressPermissions.md) | | +**operation_type** | [**TokenizationOperationType**](TokenizationOperationType.md) | | +**token_id** | **str** | The ID of the token. | +**request_id** | **str** | The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. | [optional] + +## Example + +```python +from cobo_waas2.models.tokenization_update_permissions_estimate_fee_params import TokenizationUpdatePermissionsEstimateFeeParams + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenizationUpdatePermissionsEstimateFeeParams from a JSON string +tokenization_update_permissions_estimate_fee_params_instance = TokenizationUpdatePermissionsEstimateFeeParams.from_json(json) +# print the JSON string representation of the object +print(TokenizationUpdatePermissionsEstimateFeeParams.to_json()) + +# convert the object into a dict +tokenization_update_permissions_estimate_fee_params_dict = tokenization_update_permissions_estimate_fee_params_instance.to_dict() +# create an instance of TokenizationUpdatePermissionsEstimateFeeParams from a dict +tokenization_update_permissions_estimate_fee_params_from_dict = TokenizationUpdatePermissionsEstimateFeeParams.from_dict(tokenization_update_permissions_estimate_fee_params_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenizationUpdatePermissionsParams.md b/docs/TokenizationUpdatePermissionsParams.md new file mode 100644 index 00000000..ea60e245 --- /dev/null +++ b/docs/TokenizationUpdatePermissionsParams.md @@ -0,0 +1,30 @@ +# TokenizationUpdatePermissionsParams + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | [**TokenizationTokenOperationSource**](TokenizationTokenOperationSource.md) | | +**addresses** | [**List[TokenizationUpdateAddressPermissions]**](TokenizationUpdateAddressPermissions.md) | | + +## Example + +```python +from cobo_waas2.models.tokenization_update_permissions_params import TokenizationUpdatePermissionsParams + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenizationUpdatePermissionsParams from a JSON string +tokenization_update_permissions_params_instance = TokenizationUpdatePermissionsParams.from_json(json) +# print the JSON string representation of the object +print(TokenizationUpdatePermissionsParams.to_json()) + +# convert the object into a dict +tokenization_update_permissions_params_dict = tokenization_update_permissions_params_instance.to_dict() +# create an instance of TokenizationUpdatePermissionsParams from a dict +tokenization_update_permissions_params_from_dict = TokenizationUpdatePermissionsParams.from_dict(tokenization_update_permissions_params_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TokenizationUpdatePermissionsRequest.md b/docs/TokenizationUpdatePermissionsRequest.md new file mode 100644 index 00000000..b8a79c60 --- /dev/null +++ b/docs/TokenizationUpdatePermissionsRequest.md @@ -0,0 +1,33 @@ +# TokenizationUpdatePermissionsRequest + + +## Properties + +Name | Type | Description | Notes +------------ | ------------- | ------------- | ------------- +**source** | [**TokenizationTokenOperationSource**](TokenizationTokenOperationSource.md) | | +**addresses** | [**List[TokenizationUpdateAddressPermissions]**](TokenizationUpdateAddressPermissions.md) | | +**app_initiator** | **str** | The initiator of the tokenization activity. If you do not specify this property, the WaaS service will automatically designate the API key as the initiator. | [optional] +**fee** | [**TransactionRequestFee**](TransactionRequestFee.md) | | +**request_id** | **str** | The request ID that is used to track a transaction request. The request ID is provided by you and must be unique within your organization. | [optional] + +## Example + +```python +from cobo_waas2.models.tokenization_update_permissions_request import TokenizationUpdatePermissionsRequest + +# TODO update the JSON string below +json = "{}" +# create an instance of TokenizationUpdatePermissionsRequest from a JSON string +tokenization_update_permissions_request_instance = TokenizationUpdatePermissionsRequest.from_json(json) +# print the JSON string representation of the object +print(TokenizationUpdatePermissionsRequest.to_json()) + +# convert the object into a dict +tokenization_update_permissions_request_dict = tokenization_update_permissions_request_instance.to_dict() +# create an instance of TokenizationUpdatePermissionsRequest from a dict +tokenization_update_permissions_request_from_dict = TokenizationUpdatePermissionsRequest.from_dict(tokenization_update_permissions_request_dict) +``` +[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) + + diff --git a/docs/TransactionCoboCategory.md b/docs/TransactionCoboCategory.md index 822b18c8..252a1264 100644 --- a/docs/TransactionCoboCategory.md +++ b/docs/TransactionCoboCategory.md @@ -1,6 +1,6 @@ # TransactionCoboCategory -The transaction category defined by Cobo. Possible values include: - `AutoSweep`: An auto-sweep transaction. - `AutoFueling`: A transaction where Fee Station pays transaction fees to an address within your MPC Wallets. - `AutoFuelingRefund`: A refund for an auto-fueling transaction. - `SafeTxMessage`: A message signing transaction initiated by an MPC wallet to authorize a Smart Contract Wallet (Safe\\{Wallet\\}) transaction. - `BillPayment`: A transaction to pay Cobo bills through Fee Station. - `BillRefund`: A refund for a previously made bill payment. - `CommissionFeeCharge`: A transaction to charge commission fees via Fee Station. - `CommissionFeeRefund`: A refund of previously charged commission fees. - `StakingBabylonBtcDelegation`: A transaction for delegating BTC in Babylon staking. - `StakingBabylonBtcSignBabylon`: A transaction for signing Babylon operations with BTC. - `StakingBabylonClaim`: A transaction for claiming rewards from Babylon staking. - `StakingBabylonSlashing`: A transaction related to slashing penalties in Babylon staking. - `StakingBabylonStake`: A transaction for staking assets in the Babylon platform. - `StakingBabylonUnstake`: A transaction for unstaking assets from the Babylon platform. - `StakingBabylonWithdraw`: A transaction for withdrawing assets from Babylon staking. - `StakingBithiveClaim`: A transaction for claiming rewards from BitHive staking. - `StakingBithiveStake`: A transaction for staking assets in the BitHive platform. - `StakingBithiveUnstake`: A transaction for unstaking assets from the BitHive platform. - `StakingBithiveWithdraw`: A transaction for withdrawing assets from BitHive staking. - `StakingCoreStake`: A transaction for staking assets in the Core staking platform. - `StakingCoreWithdraw`: A transaction for withdrawing assets from Core staking. - `StakingEthClaim`: A transaction for claiming rewards from ETH staking. - `StakingEthStake`: A transaction for staking ETH assets. - `StakingEthUnstake`: A transaction for unstaking ETH assets. - `StakingSkyfarmClaim`: A transaction for claiming rewards from Skyfarm staking. - `StakingSkyfarmStake`: A transaction for staking assets in the Skyfarm platform. - `StakingSkyfarmUnstake`: A transaction for unstaking assets from the Skyfarm platform. - `ScreenAppRefund`: A refund transaction initiated through the Screening App. - `ScreenAppIsolate`: An isolation transaction initiated through the Screening App. - `ComplianceRefund`: A refund transaction initiated by Cobo KYT. - `ComplianceIsolate`: An isolation transaction initiated by Cobo KYT. - `StellarChangeTrust`: A transaction to manage trustlines on the Stellar network. +The transaction category defined by Cobo. Possible values include: - `AutoSweep`: An auto-sweep transaction. - `AutoFueling`: A transaction where Fee Station pays transaction fees to an address within your MPC Wallets. - `AutoFuelingRefund`: A refund for an auto-fueling transaction. - `SafeTxMessage`: A message signing transaction initiated by an MPC wallet to authorize a Smart Contract Wallet (Safe\\{Wallet\\}) transaction. - `BillPayment`: A transaction to pay Cobo bills through Fee Station. - `BillRefund`: A refund for a previously made bill payment. - `CommissionFeeCharge`: A transaction for commission-fee users that charges the commission fee incurred from various services. - `CommissionFeeRefund`: A refund of previously charged commission fees. - `StakingBabylonBtcDelegation`: A transaction for delegating BTC in Babylon staking. - `StakingBabylonBtcSignBabylon`: A transaction for signing Babylon operations with BTC. - `StakingBabylonClaim`: A transaction for claiming rewards from Babylon staking. - `StakingBabylonSlashing`: A transaction related to slashing penalties in Babylon staking. - `StakingBabylonStake`: A transaction for staking assets in the Babylon platform. - `StakingBabylonUnstake`: A transaction for unstaking assets from the Babylon platform. - `StakingBabylonWithdraw`: A transaction for withdrawing assets from Babylon staking. - `StakingBithiveClaim`: A transaction for claiming rewards from BitHive staking. - `StakingBithiveStake`: A transaction for staking assets in the BitHive platform. - `StakingBithiveUnstake`: A transaction for unstaking assets from the BitHive platform. - `StakingBithiveWithdraw`: A transaction for withdrawing assets from BitHive staking. - `StakingCoreStake`: A transaction for staking assets in the Core staking platform. - `StakingCoreWithdraw`: A transaction for withdrawing assets from Core staking. - `StakingEthClaim`: A transaction for claiming rewards from ETH staking. - `StakingEthStake`: A transaction for staking ETH assets. - `StakingEthUnstake`: A transaction for unstaking ETH assets. - `StakingSkyfarmClaim`: A transaction for claiming rewards from Skyfarm staking. - `StakingSkyfarmStake`: A transaction for staking assets in the Skyfarm platform. - `StakingSkyfarmUnstake`: A transaction for unstaking assets from the Skyfarm platform. - `ScreenAppRefund`: A refund transaction initiated through the Screening App. - `ScreenAppIsolate`: An isolation transaction initiated through the Screening App. - `ComplianceRefund`: A refund transaction initiated by Cobo KYT. - `ComplianceIsolate`: An isolation transaction initiated by Cobo KYT. - `StellarChangeTrust`: A transaction for establishing a trustline on the Stellar network. - `Tokenization`: A transaction for managing tokenized assets, such as minting or wrapping tokens. - `TokenizationGasSponsor`: A transaction where gas fees are sponsored for tokenization-related operations, ensuring the transaction proceeds even if the source address lacks sufficient balance. - `TokenSwap`: A transaction for token swapping or cross-chain bridging. - `NonceAccountSign`: A transaction signed using a **Solana nonce account**, enabling deterministic and replay-safe transaction execution on the Solana network. - `FeePayerSign`: A transaction where a **designated Solana fee payer account** covers the transaction fees, separating the fee payment from the main signer or source account. - `GasFeeSponsor`: A transaction where Fee Station pays the on-chain gas fee in USD stablecoin. - `GasFeeSponsorRefund`: A transaction that refunds gas fees previously sponsored and paid by Fee Station. ## Properties diff --git a/docs/TransactionsApi.md b/docs/TransactionsApi.md index 9c2e486c..0e82b237 100644 --- a/docs/TransactionsApi.md +++ b/docs/TransactionsApi.md @@ -1096,7 +1096,7 @@ Name | Type | Description | Notes Resend transaction -This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). Resending a transaction is a high‑risk operation. Ensure that the original transaction has not been broadcast to the blockchain, has already expired, and will never be confirmed. Otherwise, the same transaction may be confirmed on‑chain twice. This operation only applies to transactions from MPC Wallets in the SOL token. +Resending failed transactions is not supported on the Solana network. This operation resends a specified transaction. Resending a transaction means retrying a previously failed transaction. For more details about resending a transaction, see [Resend a transaction](https://www.cobo.com/developers/v2/guides/transactions/manage-transactions#resend-a-transaction). Resending a transaction is a high‑risk operation. Ensure that the original transaction has not been broadcast to the blockchain, has already expired, and will never be confirmed. Otherwise, the same transaction may be confirmed on‑chain twice. This operation only applies to transactions from MPC Wallets in the SOL token. ### Example diff --git a/docs/UpdateMerchantByIdRequest.md b/docs/UpdateMerchantByIdRequest.md index f1cff668..bd5890ce 100644 --- a/docs/UpdateMerchantByIdRequest.md +++ b/docs/UpdateMerchantByIdRequest.md @@ -6,7 +6,7 @@ Name | Type | Description | Notes ------------ | ------------- | ------------- | ------------- **name** | **str** | The merchant name. | [optional] -**developer_fee_rate** | **str** | The developer fee rate applied to this merchant. Expressed as a string in decimal format where \"0.1\" represents 10%. This fee is deducted from the payment amount and only applies to top-up transactions. If you are a merchant (directly serving the payer), you do not need to configure the developer fee rate. | [optional] +**developer_fee_rate** | **str** | The developer fee rate applied to this merchant. Must be a valid float between 0 and 1 (inclusive), with up to 4 decimal places. For more information on developer fee rate, please refer to [Funds allocation and balances](https://www.cobo.com/developers/v2/payments/amounts-and-balances). | [optional] ## Example diff --git a/docs/WebhookEventData.md b/docs/WebhookEventData.md index 0d495848..51fd4c3d 100644 --- a/docs/WebhookEventData.md +++ b/docs/WebhookEventData.md @@ -73,7 +73,7 @@ Name | Type | Description | Notes **received_token_amount** | **str** | The total cryptocurrency amount received for this order. Updates until the expiration time. Precision matches the token standard (e.g., 6 decimals for USDT). | **transactions** | [**List[PaymentTransaction]**](PaymentTransaction.md) | An array of transactions associated with this refund order. Each transaction represents a separate blockchain operation related to the refund process. | [optional] **settlement_status** | [**SettleStatus**](SettleStatus.md) | | [optional] -**amount_tolerance** | **str** | Allowed amount deviation. | [optional] +**amount_tolerance** | **str** | The maximum allowed deviation from the payable amount in the case of underpayment, specified as a positive value with up to one decimal place. If you provide more than one decimal place, an error will occur. When the actual received amount is within this deviation (inclusive) of the payable amount, the order status will be set to `Completed` rather than `Underpaid`. | [optional] **refund_id** | **str** | The refund order ID. | **amount** | **str** | The amount in cryptocurrency to be returned for this refund order. | **to_address** | **str** | The recipient's wallet address where the refund will be sent. | diff --git a/pyproject.toml b/pyproject.toml index 8580375f..4beb43cd 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,6 +1,6 @@ [tool.poetry] name = "cobo_waas2" -version = "1.25.0" +version = "1.26.0" description = "Cobo Wallet as a Service 2.0" authors = ["Cobo WaaS "] license = "Apache 2.0" diff --git a/setup.py b/setup.py index 2250a1ae..057861de 100644 --- a/setup.py +++ b/setup.py @@ -19,7 +19,7 @@ # prerequisite: setuptools # http://pypi.python.org/pypi/setuptools NAME = "cobo-waas2" -VERSION = "1.25.0" +VERSION = "1.26.0" PYTHON_REQUIRES = ">=3.7" REQUIRES = [ "urllib3 >= 1.25.3, < 2.1.0", diff --git a/test/test_auto_sweep_api.py b/test/test_auto_sweep_api.py index c8aa53b1..c91f59c7 100644 --- a/test/test_auto_sweep_api.py +++ b/test/test_auto_sweep_api.py @@ -45,7 +45,7 @@ def test_create_wallet_sweep_to_addresses(self) -> None: """ Test case for create_wallet_sweep_to_addresses - create sweep-to address + Create sweep-to address """ """ create_sweep_to_address = cobo_waas2.CreateSweepToAddress() diff --git a/test/test_create_refund_link_request.py b/test/test_create_refund_link_request.py new file mode 100644 index 00000000..b4613595 --- /dev/null +++ b/test/test_create_refund_link_request.py @@ -0,0 +1,65 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.create_refund_link_request import CreateRefundLinkRequest + + +class TestCreateRefundLinkRequest(unittest.TestCase): + """CreateRefundLinkRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> CreateRefundLinkRequest: + """Test CreateRefundLinkRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `CreateRefundLinkRequest` + """ + model = CreateRefundLinkRequest() + if include_optional: + return CreateRefundLinkRequest( + business_info = cobo_waas2.models.refund_link_business_info.RefundLinkBusinessInfo( + transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', + amount = '0.0025', + refund_source = 'Merchant', + merchant_id = 'M1001', + fee_amount = '0.0001', ), + display_info = cobo_waas2.models.link_display_info.LinkDisplayInfo( + developer_name = 'Acme Payment Solutions', + logo = 'https://example.com/logo.png', ) + ) + else: + return CreateRefundLinkRequest( + business_info = cobo_waas2.models.refund_link_business_info.RefundLinkBusinessInfo( + transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', + amount = '0.0025', + refund_source = 'Merchant', + merchant_id = 'M1001', + fee_amount = '0.0001', ), + ) + """ + + def testCreateRefundLinkRequest(self): + """Test CreateRefundLinkRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_fee_station_api.py b/test/test_fee_station_api.py index 49d98161..7c7db65c 100644 --- a/test/test_fee_station_api.py +++ b/test/test_fee_station_api.py @@ -45,7 +45,7 @@ def test_estimate_fee_station_fee(self) -> None: """ Test case for estimate_fee_station_fee - Estimate fee for Fee Station transaction + Estimate transaction fee """ """ fee_station_transfer = cobo_waas2.FeeStationTransfer() diff --git a/test/test_fee_station_check_fee_station_usage.py b/test/test_fee_station_check_fee_station_usage.py index 7f700e1e..0862fe13 100644 --- a/test/test_fee_station_check_fee_station_usage.py +++ b/test/test_fee_station_check_fee_station_usage.py @@ -37,15 +37,15 @@ def make_instance(self, include_optional) -> FeeStationCheckFeeStationUsage: request_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', amount = '100.5', token_id = 'ETH_USDT', + fee_token_id = 'ETH', estimated_fee_amount = '0.0021', from_address = '0x1234567890abcdef1234567890abcdef12345678', - from_wallet_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' + from_wallet_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', + auto_fuel = 'PassiveAutoFuel' ) else: return FeeStationCheckFeeStationUsage( request_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', - amount = '100.5', - token_id = 'ETH_USDT', estimated_fee_amount = '0.0021', from_address = '0x1234567890abcdef1234567890abcdef12345678', from_wallet_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479', diff --git a/test/test_fee_station_check_fee_station_usage_response.py b/test/test_fee_station_check_fee_station_usage_response.py index 507457f4..97ddc459 100644 --- a/test/test_fee_station_check_fee_station_usage_response.py +++ b/test/test_fee_station_check_fee_station_usage_response.py @@ -35,21 +35,22 @@ def make_instance(self, include_optional) -> FeeStationCheckFeeStationUsageRespo if include_optional: return FeeStationCheckFeeStationUsageResponse( token_id = 'ETH', + balance = '0.0021', gas_station_type = 'CoboOperationStation', is_fee_station_applicable = True, is_balance_sufficient = False, - balance = '0.0021', total_fee_amount = '0.0021', is_sponsor_applicable = True, - sponsored_fee_amount = '0.0021' + sponsored_fee_amount = '0.0021', + sponsored_token_id = 'ETH_USDT' ) else: return FeeStationCheckFeeStationUsageResponse( token_id = 'ETH', + balance = '0.0021', gas_station_type = 'CoboOperationStation', is_fee_station_applicable = True, is_balance_sufficient = False, - balance = '0.0021', total_fee_amount = '0.0021', is_sponsor_applicable = True, sponsored_fee_amount = '0.0021', diff --git a/test/test_fee_station_sponsor_transaction_description.py b/test/test_fee_station_sponsor_transaction_description.py new file mode 100644 index 00000000..bdd4f3a2 --- /dev/null +++ b/test/test_fee_station_sponsor_transaction_description.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.fee_station_sponsor_transaction_description import FeeStationSponsorTransactionDescription + + +class TestFeeStationSponsorTransactionDescription(unittest.TestCase): + """FeeStationSponsorTransactionDescription unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> FeeStationSponsorTransactionDescription: + """Test FeeStationSponsorTransactionDescription + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `FeeStationSponsorTransactionDescription` + """ + model = FeeStationSponsorTransactionDescription() + if include_optional: + return FeeStationSponsorTransactionDescription( + total_fee_amount = '2', + commission_fee = '0.5' + ) + else: + return FeeStationSponsorTransactionDescription( + total_fee_amount = '2', + commission_fee = '0.5', + ) + """ + + def testFeeStationSponsorTransactionDescription(self): + """Test FeeStationSponsorTransactionDescription""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_payment_api.py b/test/test_payment_api.py index ccbbe73b..66f8dd7a 100644 --- a/test/test_payment_api.py +++ b/test/test_payment_api.py @@ -113,6 +113,18 @@ def test_create_refund(self) -> None: api_response = self.api.create_refund(create_refund_request=create_refund_request) """ + def test_create_refund_link(self) -> None: + """ + Test case for create_refund_link + + Create refund link + """ + """ + create_refund_link_request = cobo_waas2.CreateRefundLinkRequest() + + api_response = self.api.create_refund_link(create_refund_link_request=create_refund_link_request) + """ + def test_create_settlement_request(self) -> None: """ Test case for create_settlement_request diff --git a/test/test_refund_link_business_info.py b/test/test_refund_link_business_info.py new file mode 100644 index 00000000..a8904dc4 --- /dev/null +++ b/test/test_refund_link_business_info.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.refund_link_business_info import RefundLinkBusinessInfo + + +class TestRefundLinkBusinessInfo(unittest.TestCase): + """RefundLinkBusinessInfo unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> RefundLinkBusinessInfo: + """Test RefundLinkBusinessInfo + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `RefundLinkBusinessInfo` + """ + model = RefundLinkBusinessInfo() + if include_optional: + return RefundLinkBusinessInfo( + transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', + amount = '0.0025', + refund_source = 'Merchant', + merchant_id = 'M1001', + fee_amount = '0.0001' + ) + else: + return RefundLinkBusinessInfo( + transaction_id = 'aff0e1cb-15b2-4e1f-9b9d-a9133715986f', + amount = '0.0025', + refund_source = 'Merchant', + ) + """ + + def testRefundLinkBusinessInfo(self): + """Test RefundLinkBusinessInfo""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tokenization_api.py b/test/test_tokenization_api.py index 160c7345..68a6ebb1 100644 --- a/test/test_tokenization_api.py +++ b/test/test_tokenization_api.py @@ -185,6 +185,23 @@ def test_list_tokenization_holdings(self) -> None: api_response = self.api.list_tokenization_holdings(token_id, limit=limit, before=before, after=after) """ + def test_list_tokenization_permissions(self) -> None: + """ + Test case for list_tokenization_permissions + + List token permissions + """ + """ + token_id = 'ETH_USDT' + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045' + limit = 10 + after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' + before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' + direction = 'ASC' + + api_response = self.api.list_tokenization_permissions(token_id, address=address, limit=limit, after=after, before=before, direction=direction) + """ + def test_list_tokenization_supported_chains(self) -> None: """ Test case for list_tokenization_supported_chains @@ -192,11 +209,12 @@ def test_list_tokenization_supported_chains(self) -> None: List supported chains for tokenization """ """ + token_standard = cobo_waas2.TokenizationTokenStandard() limit = 10 after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk' before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1' - api_response = self.api.list_tokenization_supported_chains(limit=limit, after=after, before=before) + api_response = self.api.list_tokenization_supported_chains(token_standard=token_standard, limit=limit, after=after, before=before) """ def test_mint_tokenization(self) -> None: @@ -290,6 +308,19 @@ def test_update_tokenization_blocklist_addresses(self) -> None: api_response = self.api.update_tokenization_blocklist_addresses(token_id, tokenization_update_blocklist_addresses_request=tokenization_update_blocklist_addresses_request) """ + def test_update_tokenization_permissions(self) -> None: + """ + Test case for update_tokenization_permissions + + Update token permissions + """ + """ + token_id = 'ETH_USDT' + tokenization_update_permissions_request = cobo_waas2.TokenizationUpdatePermissionsRequest() + + api_response = self.api.update_tokenization_permissions(token_id, tokenization_update_permissions_request) + """ + if __name__ == '__main__': unittest.main() diff --git a/test/test_tokenization_erc20_token_params.py b/test/test_tokenization_erc20_token_params.py index f96b7f98..c17586b5 100644 --- a/test/test_tokenization_erc20_token_params.py +++ b/test/test_tokenization_erc20_token_params.py @@ -39,14 +39,14 @@ def make_instance(self, include_optional) -> TokenizationERC20TokenParams: symbol = 'MAT', decimals = 18, token_access_activated = False, - permissions = cobo_waas2.models.tokenization_token_permission_params.TokenizationTokenPermissionParams( + permissions = cobo_waas2.models.tokenization_erc20_token_permission_params.TokenizationERC20TokenPermissionParams( admin = ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6"], - minter = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x8ba1f109551bD432803012645Hac136c34B8f7f7"], - burner = ["0x8ba1f109551bD432803012645Hac136c34B8f7f7","0x9cb2f210662eE543904023756Ibd247d45C9g8g8"], - manager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x8ba1f109551bD432803012645Hac136c34B8f7f7"], - pauser = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x8ba1f109551bD432803012645Hac136c34B8f7f7"], - salvager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x8ba1f109551bD432803012645Hac136c34B8f7f7"], - upgrader = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x8ba1f109551bD432803012645Hac136c34B8f7f7"], ) + minter = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + burner = ["0x1FcceD80Cbc2750e0276a53038845eC541E87fa2","0xfc5495292a162810175fbda23697b5a682ba352a"], + manager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + pauser = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + salvager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + upgrader = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], ) ) else: return TokenizationERC20TokenParams( diff --git a/test/test_tokenization_token_permission_params.py b/test/test_tokenization_erc20_token_permission_params.py similarity index 53% rename from test/test_tokenization_token_permission_params.py rename to test/test_tokenization_erc20_token_permission_params.py index f462ad47..9d89570e 100644 --- a/test/test_tokenization_token_permission_params.py +++ b/test/test_tokenization_erc20_token_permission_params.py @@ -12,11 +12,11 @@ import unittest -from cobo_waas2.models.tokenization_token_permission_params import TokenizationTokenPermissionParams +from cobo_waas2.models.tokenization_erc20_token_permission_params import TokenizationERC20TokenPermissionParams -class TestTokenizationTokenPermissionParams(unittest.TestCase): - """TokenizationTokenPermissionParams unit test stubs""" +class TestTokenizationERC20TokenPermissionParams(unittest.TestCase): + """TokenizationERC20TokenPermissionParams unit test stubs""" def setUp(self): pass @@ -24,31 +24,31 @@ def setUp(self): def tearDown(self): pass - def make_instance(self, include_optional) -> TokenizationTokenPermissionParams: - """Test TokenizationTokenPermissionParams + def make_instance(self, include_optional) -> TokenizationERC20TokenPermissionParams: + """Test TokenizationERC20TokenPermissionParams include_option is a boolean, when False only required params are included, when True both required and optional params are included """ - # uncomment below to create an instance of `TokenizationTokenPermissionParams` + # uncomment below to create an instance of `TokenizationERC20TokenPermissionParams` """ - model = TokenizationTokenPermissionParams() + model = TokenizationERC20TokenPermissionParams() if include_optional: - return TokenizationTokenPermissionParams( + return TokenizationERC20TokenPermissionParams( admin = ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6"], - minter = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x8ba1f109551bD432803012645Hac136c34B8f7f7"], - burner = ["0x8ba1f109551bD432803012645Hac136c34B8f7f7","0x9cb2f210662eE543904023756Ibd247d45C9g8g8"], - manager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x8ba1f109551bD432803012645Hac136c34B8f7f7"], - pauser = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x8ba1f109551bD432803012645Hac136c34B8f7f7"], - salvager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x8ba1f109551bD432803012645Hac136c34B8f7f7"], - upgrader = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x8ba1f109551bD432803012645Hac136c34B8f7f7"] + minter = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + burner = ["0x1FcceD80Cbc2750e0276a53038845eC541E87fa2","0xfc5495292a162810175fbda23697b5a682ba352a"], + manager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + pauser = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + salvager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + upgrader = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"] ) else: - return TokenizationTokenPermissionParams( + return TokenizationERC20TokenPermissionParams( ) """ - def testTokenizationTokenPermissionParams(self): - """Test TokenizationTokenPermissionParams""" + def testTokenizationERC20TokenPermissionParams(self): + """Test TokenizationERC20TokenPermissionParams""" # inst_req_only = self.make_instance(include_optional=False) # inst_req_and_optional = self.make_instance(include_optional=True) diff --git a/test/test_tokenization_erc20_wrapped_token_params.py b/test/test_tokenization_erc20_wrapped_token_params.py new file mode 100644 index 00000000..e3f7fe2c --- /dev/null +++ b/test/test_tokenization_erc20_wrapped_token_params.py @@ -0,0 +1,67 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.tokenization_erc20_wrapped_token_params import TokenizationERC20WrappedTokenParams + + +class TestTokenizationERC20WrappedTokenParams(unittest.TestCase): + """TokenizationERC20WrappedTokenParams unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenizationERC20WrappedTokenParams: + """Test TokenizationERC20WrappedTokenParams + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenizationERC20WrappedTokenParams` + """ + model = TokenizationERC20WrappedTokenParams() + if include_optional: + return TokenizationERC20WrappedTokenParams( + standard = 'ERC20', + name = 'My Awesome Token', + symbol = 'MAT', + permissions = cobo_waas2.models.tokenization_erc20_wrapped_token_permission_params.TokenizationERC20WrappedTokenPermissionParams( + admin = ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6"], + minter = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + wrapper = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + manager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + pauser = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + salvager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + upgrader = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], ), + token_access_activated = False, + underlying_token = '0xdac17f958d2ee523a2206206994597c13d831ec7' + ) + else: + return TokenizationERC20WrappedTokenParams( + standard = 'ERC20', + name = 'My Awesome Token', + symbol = 'MAT', + underlying_token = '0xdac17f958d2ee523a2206206994597c13d831ec7', + ) + """ + + def testTokenizationERC20WrappedTokenParams(self): + """Test TokenizationERC20WrappedTokenParams""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tokenization_erc20_wrapped_token_permission_params.py b/test/test_tokenization_erc20_wrapped_token_permission_params.py new file mode 100644 index 00000000..297e614d --- /dev/null +++ b/test/test_tokenization_erc20_wrapped_token_permission_params.py @@ -0,0 +1,57 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.tokenization_erc20_wrapped_token_permission_params import TokenizationERC20WrappedTokenPermissionParams + + +class TestTokenizationERC20WrappedTokenPermissionParams(unittest.TestCase): + """TokenizationERC20WrappedTokenPermissionParams unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenizationERC20WrappedTokenPermissionParams: + """Test TokenizationERC20WrappedTokenPermissionParams + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenizationERC20WrappedTokenPermissionParams` + """ + model = TokenizationERC20WrappedTokenPermissionParams() + if include_optional: + return TokenizationERC20WrappedTokenPermissionParams( + admin = ["0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045","0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6"], + minter = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + wrapper = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + manager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + pauser = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + salvager = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"], + upgrader = ["0x742d35Cc6634C0532925a3b8D4C2C4e4C7C6B5f6","0x1FcceD80Cbc2750e0276a53038845eC541E87fa2"] + ) + else: + return TokenizationERC20WrappedTokenPermissionParams( + ) + """ + + def testTokenizationERC20WrappedTokenPermissionParams(self): + """Test TokenizationERC20WrappedTokenPermissionParams""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tokenization_estimate_fee_request_operation_params.py b/test/test_tokenization_estimate_fee_request_operation_params.py index f8836513..4b269bee 100644 --- a/test/test_tokenization_estimate_fee_request_operation_params.py +++ b/test/test_tokenization_estimate_fee_request_operation_params.py @@ -51,7 +51,14 @@ def make_instance(self, include_optional) -> TokenizationEstimateFeeRequestOpera from_address = '0x051A924H4dCb264226d7B036C2893a0D344', ) ], action = 'Grant', - addresses = [{"address":"0x789abc...","note":"reason for blocklisting"},{"address":"0xdef012..."}], + addresses = [ + cobo_waas2.models.tokenization_update_address_permissions.TokenizationUpdateAddressPermissions( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + action = 'add', + permissions = [ + 'MintTokens' + ], ) + ], activation = True, data = None ) @@ -73,7 +80,14 @@ def make_instance(self, include_optional) -> TokenizationEstimateFeeRequestOpera from_address = '0x051A924H4dCb264226d7B036C2893a0D344', ) ], action = 'Grant', - addresses = [{"address":"0x789abc...","note":"reason for blocklisting"},{"address":"0xdef012..."}], + addresses = [ + cobo_waas2.models.tokenization_update_address_permissions.TokenizationUpdateAddressPermissions( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + action = 'add', + permissions = [ + 'MintTokens' + ], ) + ], activation = True, ) """ diff --git a/test/test_tokenization_issue_token_params_token_params.py b/test/test_tokenization_issue_token_params_token_params.py index 98741950..cce34a1a 100644 --- a/test/test_tokenization_issue_token_params_token_params.py +++ b/test/test_tokenization_issue_token_params_token_params.py @@ -39,12 +39,12 @@ def make_instance(self, include_optional) -> TokenizationIssueTokenParamsTokenPa symbol = 'MAT', decimals = 18, token_access_activated = False, - permissions = cobo_waas2.models.tokenization_sol_token_permission_params.TokenizationSolTokenPermissionParams( - permanent_delegate = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', - minter = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', + permissions = cobo_waas2.models.tokenization_sol_wrapped_token_permission_params.TokenizationSolWrappedTokenPermissionParams( + wrapper = ["9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM","7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"], + pauser = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', freezer = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', - updater = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', - pauser = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', ) + updater = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', ), + underlying_token = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM' ) else: return TokenizationIssueTokenParamsTokenParams( @@ -52,6 +52,7 @@ def make_instance(self, include_optional) -> TokenizationIssueTokenParamsTokenPa name = 'My Awesome Token', symbol = 'MAT', decimals = 18, + underlying_token = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', ) """ diff --git a/test/test_tokenization_list_permissions_response.py b/test/test_tokenization_list_permissions_response.py new file mode 100644 index 00000000..8f1b3825 --- /dev/null +++ b/test/test_tokenization_list_permissions_response.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.tokenization_list_permissions_response import TokenizationListPermissionsResponse + + +class TestTokenizationListPermissionsResponse(unittest.TestCase): + """TokenizationListPermissionsResponse unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenizationListPermissionsResponse: + """Test TokenizationListPermissionsResponse + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenizationListPermissionsResponse` + """ + model = TokenizationListPermissionsResponse() + if include_optional: + return TokenizationListPermissionsResponse( + data = [ + cobo_waas2.models.tokenization_list_permissions_response_data_inner.TokenizationListPermissionsResponse_data_inner( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + permissions = [ + 'MintTokens' + ], ) + ], + pagination = cobo_waas2.models.pagination.Pagination( + before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', + after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk', + total_count = 10000, ) + ) + else: + return TokenizationListPermissionsResponse( + data = [ + cobo_waas2.models.tokenization_list_permissions_response_data_inner.TokenizationListPermissionsResponse_data_inner( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + permissions = [ + 'MintTokens' + ], ) + ], + pagination = cobo_waas2.models.pagination.Pagination( + before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', + after = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGSAk', + total_count = 10000, ), + ) + """ + + def testTokenizationListPermissionsResponse(self): + """Test TokenizationListPermissionsResponse""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tokenization_list_permissions_response_data_inner.py b/test/test_tokenization_list_permissions_response_data_inner.py new file mode 100644 index 00000000..38cf7f70 --- /dev/null +++ b/test/test_tokenization_list_permissions_response_data_inner.py @@ -0,0 +1,58 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.tokenization_list_permissions_response_data_inner import TokenizationListPermissionsResponseDataInner + + +class TestTokenizationListPermissionsResponseDataInner(unittest.TestCase): + """TokenizationListPermissionsResponseDataInner unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenizationListPermissionsResponseDataInner: + """Test TokenizationListPermissionsResponseDataInner + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenizationListPermissionsResponseDataInner` + """ + model = TokenizationListPermissionsResponseDataInner() + if include_optional: + return TokenizationListPermissionsResponseDataInner( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + permissions = [ + 'MintTokens' + ] + ) + else: + return TokenizationListPermissionsResponseDataInner( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + permissions = [ + 'MintTokens' + ], + ) + """ + + def testTokenizationListPermissionsResponseDataInner(self): + """Test TokenizationListPermissionsResponseDataInner""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tokenization_list_token_info_response.py b/test/test_tokenization_list_token_info_response.py index 1b348b5c..620d8305 100644 --- a/test/test_tokenization_list_token_info_response.py +++ b/test/test_tokenization_list_token_info_response.py @@ -41,11 +41,13 @@ def make_instance(self, include_optional) -> TokenizationListTokenInfoResponse: token_address = '0x1234567890123456789012345678901234567890', token_name = 'CUSD', token_symbol = 'CUSD', + token_standard = 'ERC20', decimals = 18, token_access_activated = False, status = 'Active', total_supply = '133399', - holdings = '12399', ) + holdings = '12399', + archived = False, ) ], pagination = cobo_waas2.models.pagination.Pagination( before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', @@ -61,11 +63,13 @@ def make_instance(self, include_optional) -> TokenizationListTokenInfoResponse: token_address = '0x1234567890123456789012345678901234567890', token_name = 'CUSD', token_symbol = 'CUSD', + token_standard = 'ERC20', decimals = 18, token_access_activated = False, status = 'Active', total_supply = '133399', - holdings = '12399', ) + holdings = '12399', + archived = False, ) ], pagination = cobo_waas2.models.pagination.Pagination( before = 'RqeEoTkgKG5rpzqYzg2Hd3szmPoj2cE7w5jWwShz3C1vyGmk1', diff --git a/test/test_tokenization_permission_action.py b/test/test_tokenization_permission_action.py new file mode 100644 index 00000000..62eb7ad6 --- /dev/null +++ b/test/test_tokenization_permission_action.py @@ -0,0 +1,33 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.tokenization_permission_action import TokenizationPermissionAction + + +class TestTokenizationPermissionAction(unittest.TestCase): + """TokenizationPermissionAction unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def testTokenizationPermissionAction(self): + """Test TokenizationPermissionAction""" + # inst = TokenizationPermissionAction() + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tokenization_sol_wrapped_token_params.py b/test/test_tokenization_sol_wrapped_token_params.py new file mode 100644 index 00000000..246f7418 --- /dev/null +++ b/test/test_tokenization_sol_wrapped_token_params.py @@ -0,0 +1,64 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.tokenization_sol_wrapped_token_params import TokenizationSOLWrappedTokenParams + + +class TestTokenizationSOLWrappedTokenParams(unittest.TestCase): + """TokenizationSOLWrappedTokenParams unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenizationSOLWrappedTokenParams: + """Test TokenizationSOLWrappedTokenParams + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenizationSOLWrappedTokenParams` + """ + model = TokenizationSOLWrappedTokenParams() + if include_optional: + return TokenizationSOLWrappedTokenParams( + standard = 'ERC20', + name = 'My Awesome Token', + symbol = 'MAT', + underlying_token = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', + token_access_activated = False, + permissions = cobo_waas2.models.tokenization_sol_wrapped_token_permission_params.TokenizationSolWrappedTokenPermissionParams( + wrapper = ["9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM","7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"], + pauser = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', + freezer = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', + updater = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', ) + ) + else: + return TokenizationSOLWrappedTokenParams( + standard = 'ERC20', + name = 'My Awesome Token', + symbol = 'MAT', + underlying_token = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', + ) + """ + + def testTokenizationSOLWrappedTokenParams(self): + """Test TokenizationSOLWrappedTokenParams""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tokenization_sol_wrapped_token_permission_params.py b/test/test_tokenization_sol_wrapped_token_permission_params.py new file mode 100644 index 00000000..8c985c2b --- /dev/null +++ b/test/test_tokenization_sol_wrapped_token_permission_params.py @@ -0,0 +1,54 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.tokenization_sol_wrapped_token_permission_params import TokenizationSolWrappedTokenPermissionParams + + +class TestTokenizationSolWrappedTokenPermissionParams(unittest.TestCase): + """TokenizationSolWrappedTokenPermissionParams unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenizationSolWrappedTokenPermissionParams: + """Test TokenizationSolWrappedTokenPermissionParams + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenizationSolWrappedTokenPermissionParams` + """ + model = TokenizationSolWrappedTokenPermissionParams() + if include_optional: + return TokenizationSolWrappedTokenPermissionParams( + wrapper = ["9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM","7xKXtg2CW87d97TXJSDpbD5jBkheTqA83TZRuJosgAsU"], + pauser = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', + freezer = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM', + updater = '9WzDXwBbmkg8ZTbNMqUxvQRAyrZzDsGYdLVL9zYtAWWM' + ) + else: + return TokenizationSolWrappedTokenPermissionParams( + ) + """ + + def testTokenizationSolWrappedTokenPermissionParams(self): + """Test TokenizationSolWrappedTokenPermissionParams""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tokenization_token_detail_info.py b/test/test_tokenization_token_detail_info.py index 5e04c503..9bb96fa8 100644 --- a/test/test_tokenization_token_detail_info.py +++ b/test/test_tokenization_token_detail_info.py @@ -39,25 +39,42 @@ def make_instance(self, include_optional) -> TokenizationTokenDetailInfo: token_address = '0x1234567890123456789012345678901234567890', token_name = 'CUSD', token_symbol = 'CUSD', + token_standard = 'ERC20', decimals = 18, token_access_activated = False, status = 'Active', total_supply = '133399', holdings = '12399', + archived = False, permissions = [ cobo_waas2.models.tokenization_address_permission.TokenizationAddressPermission( execution_address = '0x0406db8351aa6839169bb363f63c2c808fee8f99', permissions = ["UpgradeContract","PauseContract"], created_timestamp = 1610445878970, ) - ] + ], + underlying_token = cobo_waas2.models.tokenization_token_info.TokenizationTokenInfo( + token_id = 'ETH_CUSD2', + chain_id = 'ETH', + token_address = '0x1234567890123456789012345678901234567890', + token_name = 'CUSD', + token_symbol = 'CUSD', + token_standard = 'ERC20', + decimals = 18, + token_access_activated = False, + status = 'Active', + total_supply = '133399', + holdings = '12399', + archived = False, ) ) else: return TokenizationTokenDetailInfo( token_id = 'ETH_CUSD2', chain_id = 'ETH', token_symbol = 'CUSD', + token_standard = 'ERC20', decimals = 18, status = 'Active', + archived = False, ) """ diff --git a/test/test_tokenization_token_info.py b/test/test_tokenization_token_info.py index a5e0b018..09dfbd24 100644 --- a/test/test_tokenization_token_info.py +++ b/test/test_tokenization_token_info.py @@ -39,19 +39,23 @@ def make_instance(self, include_optional) -> TokenizationTokenInfo: token_address = '0x1234567890123456789012345678901234567890', token_name = 'CUSD', token_symbol = 'CUSD', + token_standard = 'ERC20', decimals = 18, token_access_activated = False, status = 'Active', total_supply = '133399', - holdings = '12399' + holdings = '12399', + archived = False ) else: return TokenizationTokenInfo( token_id = 'ETH_CUSD2', chain_id = 'ETH', token_symbol = 'CUSD', + token_standard = 'ERC20', decimals = 18, status = 'Active', + archived = False, ) """ diff --git a/test/test_tokenization_token_permissions_response.py b/test/test_tokenization_token_permissions_response.py deleted file mode 100644 index 616e80c8..00000000 --- a/test/test_tokenization_token_permissions_response.py +++ /dev/null @@ -1,66 +0,0 @@ -# coding: utf-8 - -""" - Cobo Wallet as a Service 2.0 - - Contact: help@cobo.com - Generated by OpenAPI Generator (https://openapi-generator.tech) - - Do not edit the class manually. -""" # noqa: E501 - - -import unittest - -from cobo_waas2.models.tokenization_token_permissions_response import TokenizationTokenPermissionsResponse - - -class TestTokenizationTokenPermissionsResponse(unittest.TestCase): - """TokenizationTokenPermissionsResponse unit test stubs""" - - def setUp(self): - pass - - def tearDown(self): - pass - - def make_instance(self, include_optional) -> TokenizationTokenPermissionsResponse: - """Test TokenizationTokenPermissionsResponse - include_option is a boolean, when False only required - params are included, when True both required and - optional params are included """ - # uncomment below to create an instance of `TokenizationTokenPermissionsResponse` - """ - model = TokenizationTokenPermissionsResponse() - if include_optional: - return TokenizationTokenPermissionsResponse( - permissions = [ - cobo_waas2.models.tokenization_token_permission.TokenizationTokenPermission( - permission_type = 'MintTokens', - name = 'Mint Tokens', - description = 'Mint new tokens to a specified address.', - enabled = True, ) - ], - total_count = 7 - ) - else: - return TokenizationTokenPermissionsResponse( - permissions = [ - cobo_waas2.models.tokenization_token_permission.TokenizationTokenPermission( - permission_type = 'MintTokens', - name = 'Mint Tokens', - description = 'Mint new tokens to a specified address.', - enabled = True, ) - ], - total_count = 7, - ) - """ - - def testTokenizationTokenPermissionsResponse(self): - """Test TokenizationTokenPermissionsResponse""" - # inst_req_only = self.make_instance(include_optional=False) - # inst_req_and_optional = self.make_instance(include_optional=True) - - -if __name__ == '__main__': - unittest.main() diff --git a/test/test_tokenization_update_address_permissions.py b/test/test_tokenization_update_address_permissions.py new file mode 100644 index 00000000..40a03518 --- /dev/null +++ b/test/test_tokenization_update_address_permissions.py @@ -0,0 +1,60 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.tokenization_update_address_permissions import TokenizationUpdateAddressPermissions + + +class TestTokenizationUpdateAddressPermissions(unittest.TestCase): + """TokenizationUpdateAddressPermissions unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenizationUpdateAddressPermissions: + """Test TokenizationUpdateAddressPermissions + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenizationUpdateAddressPermissions` + """ + model = TokenizationUpdateAddressPermissions() + if include_optional: + return TokenizationUpdateAddressPermissions( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + action = 'add', + permissions = [ + 'MintTokens' + ] + ) + else: + return TokenizationUpdateAddressPermissions( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + action = 'add', + permissions = [ + 'MintTokens' + ], + ) + """ + + def testTokenizationUpdateAddressPermissions(self): + """Test TokenizationUpdateAddressPermissions""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tokenization_update_permissions_estimate_fee_params.py b/test/test_tokenization_update_permissions_estimate_fee_params.py new file mode 100644 index 00000000..f5f7c9d7 --- /dev/null +++ b/test/test_tokenization_update_permissions_estimate_fee_params.py @@ -0,0 +1,73 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.tokenization_update_permissions_estimate_fee_params import TokenizationUpdatePermissionsEstimateFeeParams + + +class TestTokenizationUpdatePermissionsEstimateFeeParams(unittest.TestCase): + """TokenizationUpdatePermissionsEstimateFeeParams unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenizationUpdatePermissionsEstimateFeeParams: + """Test TokenizationUpdatePermissionsEstimateFeeParams + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenizationUpdatePermissionsEstimateFeeParams` + """ + model = TokenizationUpdatePermissionsEstimateFeeParams() + if include_optional: + return TokenizationUpdatePermissionsEstimateFeeParams( + source = None, + addresses = [ + cobo_waas2.models.tokenization_update_address_permissions.TokenizationUpdateAddressPermissions( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + action = 'add', + permissions = [ + 'MintTokens' + ], ) + ], + operation_type = 'Issue', + token_id = '8a4f9324-ef2a-43cf-9f0e-d7f99999d3e8', + request_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' + ) + else: + return TokenizationUpdatePermissionsEstimateFeeParams( + source = None, + addresses = [ + cobo_waas2.models.tokenization_update_address_permissions.TokenizationUpdateAddressPermissions( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + action = 'add', + permissions = [ + 'MintTokens' + ], ) + ], + operation_type = 'Issue', + token_id = '8a4f9324-ef2a-43cf-9f0e-d7f99999d3e8', + ) + """ + + def testTokenizationUpdatePermissionsEstimateFeeParams(self): + """Test TokenizationUpdatePermissionsEstimateFeeParams""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tokenization_update_permissions_params.py b/test/test_tokenization_update_permissions_params.py new file mode 100644 index 00000000..fb3369ca --- /dev/null +++ b/test/test_tokenization_update_permissions_params.py @@ -0,0 +1,68 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.tokenization_update_permissions_params import TokenizationUpdatePermissionsParams + + +class TestTokenizationUpdatePermissionsParams(unittest.TestCase): + """TokenizationUpdatePermissionsParams unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenizationUpdatePermissionsParams: + """Test TokenizationUpdatePermissionsParams + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenizationUpdatePermissionsParams` + """ + model = TokenizationUpdatePermissionsParams() + if include_optional: + return TokenizationUpdatePermissionsParams( + source = None, + addresses = [ + cobo_waas2.models.tokenization_update_address_permissions.TokenizationUpdateAddressPermissions( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + action = 'add', + permissions = [ + 'MintTokens' + ], ) + ] + ) + else: + return TokenizationUpdatePermissionsParams( + source = None, + addresses = [ + cobo_waas2.models.tokenization_update_address_permissions.TokenizationUpdateAddressPermissions( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + action = 'add', + permissions = [ + 'MintTokens' + ], ) + ], + ) + """ + + def testTokenizationUpdatePermissionsParams(self): + """Test TokenizationUpdatePermissionsParams""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() diff --git a/test/test_tokenization_update_permissions_request.py b/test/test_tokenization_update_permissions_request.py new file mode 100644 index 00000000..2df9d71c --- /dev/null +++ b/test/test_tokenization_update_permissions_request.py @@ -0,0 +1,72 @@ +# coding: utf-8 + +""" + Cobo Wallet as a Service 2.0 + + Contact: help@cobo.com + Generated by OpenAPI Generator (https://openapi-generator.tech) + + Do not edit the class manually. +""" # noqa: E501 + + +import unittest + +from cobo_waas2.models.tokenization_update_permissions_request import TokenizationUpdatePermissionsRequest + + +class TestTokenizationUpdatePermissionsRequest(unittest.TestCase): + """TokenizationUpdatePermissionsRequest unit test stubs""" + + def setUp(self): + pass + + def tearDown(self): + pass + + def make_instance(self, include_optional) -> TokenizationUpdatePermissionsRequest: + """Test TokenizationUpdatePermissionsRequest + include_option is a boolean, when False only required + params are included, when True both required and + optional params are included """ + # uncomment below to create an instance of `TokenizationUpdatePermissionsRequest` + """ + model = TokenizationUpdatePermissionsRequest() + if include_optional: + return TokenizationUpdatePermissionsRequest( + source = None, + addresses = [ + cobo_waas2.models.tokenization_update_address_permissions.TokenizationUpdateAddressPermissions( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + action = 'add', + permissions = [ + 'MintTokens' + ], ) + ], + app_initiator = 'steve@example.com', + fee = None, + request_id = 'f47ac10b-58cc-4372-a567-0e02b2c3d479' + ) + else: + return TokenizationUpdatePermissionsRequest( + source = None, + addresses = [ + cobo_waas2.models.tokenization_update_address_permissions.TokenizationUpdateAddressPermissions( + address = '0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', + action = 'add', + permissions = [ + 'MintTokens' + ], ) + ], + fee = None, + ) + """ + + def testTokenizationUpdatePermissionsRequest(self): + """Test TokenizationUpdatePermissionsRequest""" + # inst_req_only = self.make_instance(include_optional=False) + # inst_req_and_optional = self.make_instance(include_optional=True) + + +if __name__ == '__main__': + unittest.main() From ad038c0cbc00d1ed8f9e90916c93b0bdfc7b7ec0 Mon Sep 17 00:00:00 2001 From: Shanshan Li Date: Wed, 12 Nov 2025 10:24:00 +0800 Subject: [PATCH 2/2] update dependency --- requirements.txt | 2 +- setup.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/requirements.txt b/requirements.txt index 8a6dbcf3..09da8d3c 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,6 +4,6 @@ urllib3 >= 1.25.3, < 2.1.0 pydantic >= 2 typing-extensions >= 4.7.1 PyNaCl==1.5.0 -fastapi==0.103.2 +fastapi >= 0.103.2 uvicorn==0.22.0 ecdsa==0.19.0 diff --git a/setup.py b/setup.py index 057861de..bd1ecd9e 100644 --- a/setup.py +++ b/setup.py @@ -28,7 +28,7 @@ "typing-extensions >= 4.7.1", "PyNaCl==1.5.0", "ecdsa==0.19.0", - "fastapi==0.103.2", + "fastapi >= 0.103.2", "uvicorn==0.22.0", ]