circle-developer-controlled-wallets 6.0.0__py3-none-any.whl → 8.1.1__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- circle/web3/developer_controlled_wallets/__init__.py +6 -1
- circle/web3/developer_controlled_wallets/api/signing_api.py +65 -31
- circle/web3/developer_controlled_wallets/api/transactions_api.py +299 -58
- circle/web3/developer_controlled_wallets/api/wallet_sets_api.py +16 -8
- circle/web3/developer_controlled_wallets/api/wallets_api.py +62 -30
- circle/web3/developer_controlled_wallets/api_client.py +1 -1
- circle/web3/developer_controlled_wallets/configuration.py +9 -2
- circle/web3/developer_controlled_wallets/models/__init__.py +5 -0
- circle/web3/developer_controlled_wallets/models/abi_parameters_inner.py +5 -5
- circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer.py +10 -2
- circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_request.py +11 -3
- circle/web3/developer_controlled_wallets/models/account_type.py +1 -1
- circle/web3/developer_controlled_wallets/models/bad_request_response.py +11 -3
- circle/web3/developer_controlled_wallets/models/balance.py +12 -4
- circle/web3/developer_controlled_wallets/models/balances.py +10 -2
- circle/web3/developer_controlled_wallets/models/balances_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/base_screening_decision.py +12 -4
- circle/web3/developer_controlled_wallets/models/blockchain.py +3 -0
- circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer.py +10 -2
- circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer_request.py +11 -3
- circle/web3/developer_controlled_wallets/models/contract_execution_blockchain.py +2 -1
- circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer.py +10 -2
- circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer_request.py +34 -21
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py +37 -24
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request_blockchain.py +130 -0
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response_data.py +11 -3
- circle/web3/developer_controlled_wallets/models/create_wallet_request.py +16 -8
- circle/web3/developer_controlled_wallets/models/create_wallet_set_request.py +12 -4
- circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer.py +10 -2
- circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer_request.py +24 -16
- circle/web3/developer_controlled_wallets/models/derive_wallet_request.py +10 -2
- circle/web3/developer_controlled_wallets/models/developer_wallet_set.py +13 -5
- circle/web3/developer_controlled_wallets/models/end_user_wallet_set.py +14 -6
- circle/web3/developer_controlled_wallets/models/eoa_wallet.py +23 -15
- circle/web3/developer_controlled_wallets/models/eoa_wallet_with_balances.py +24 -16
- circle/web3/developer_controlled_wallets/models/error.py +11 -3
- circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request.py +18 -10
- circle/web3/developer_controlled_wallets/models/estimate_transaction_fee.py +10 -2
- circle/web3/developer_controlled_wallets/models/estimate_transaction_fee_data.py +15 -7
- circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py +18 -10
- circle/web3/developer_controlled_wallets/models/evm_blockchain.py +2 -0
- circle/web3/developer_controlled_wallets/models/fee_level.py +1 -1
- circle/web3/developer_controlled_wallets/models/get_lowest_nonce_transaction_response.py +95 -0
- circle/web3/developer_controlled_wallets/models/get_lowest_nonce_transaction_response_data.py +101 -0
- circle/web3/developer_controlled_wallets/models/lowest_nonce_transaction_fee_info.py +97 -0
- circle/web3/developer_controlled_wallets/models/nft.py +14 -6
- circle/web3/developer_controlled_wallets/models/nfts.py +10 -2
- circle/web3/developer_controlled_wallets/models/nfts_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/not_authorized_response.py +11 -3
- circle/web3/developer_controlled_wallets/models/not_found_response.py +11 -3
- circle/web3/developer_controlled_wallets/models/risk_signal.py +14 -6
- circle/web3/developer_controlled_wallets/models/sca_wallet.py +24 -16
- circle/web3/developer_controlled_wallets/models/sca_wallet_with_balances.py +25 -17
- circle/web3/developer_controlled_wallets/models/sign_delegate_action_request.py +12 -4
- circle/web3/developer_controlled_wallets/models/sign_delegate_action_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/sign_delegate_action_response_data.py +11 -3
- circle/web3/developer_controlled_wallets/models/sign_message_request.py +21 -8
- circle/web3/developer_controlled_wallets/models/sign_transaction_request.py +21 -8
- circle/web3/developer_controlled_wallets/models/sign_transaction_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/sign_transaction_response_data.py +12 -4
- circle/web3/developer_controlled_wallets/models/sign_typed_data_request.py +20 -7
- circle/web3/developer_controlled_wallets/models/signature_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/signature_response_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/token.py +19 -11
- circle/web3/developer_controlled_wallets/models/token_blockchain.py +3 -0
- circle/web3/developer_controlled_wallets/models/token_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/token_response_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/transaction.py +41 -33
- circle/web3/developer_controlled_wallets/models/transaction_fee.py +24 -12
- circle/web3/developer_controlled_wallets/models/transaction_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/transaction_response_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/transaction_screening_decision.py +13 -5
- circle/web3/developer_controlled_wallets/models/transaction_state.py +2 -1
- circle/web3/developer_controlled_wallets/models/transactions.py +10 -2
- circle/web3/developer_controlled_wallets/models/transactions_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/transfer_blockchain.py +53 -0
- circle/web3/developer_controlled_wallets/models/update_wallet_request.py +11 -3
- circle/web3/developer_controlled_wallets/models/update_wallet_set_request.py +10 -2
- circle/web3/developer_controlled_wallets/models/validate_address.py +10 -2
- circle/web3/developer_controlled_wallets/models/validate_address_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/validate_address_request.py +11 -3
- circle/web3/developer_controlled_wallets/models/wallet.py +21 -13
- circle/web3/developer_controlled_wallets/models/wallet_metadata.py +11 -3
- circle/web3/developer_controlled_wallets/models/wallet_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallet_response_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallet_set.py +12 -4
- circle/web3/developer_controlled_wallets/models/wallet_set_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallet_set_response_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallet_sets.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallet_sets_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallets.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallets_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallets_with_balances.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallets_with_balances_data.py +10 -2
- {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/METADATA +4 -4
- {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/RECORD +100 -95
- {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/WHEEL +1 -1
- {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/top_level.txt +0 -0
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
from pydantic import BaseModel, Field, StrictInt, StrictStr
|
|
@@ -44,8 +49,10 @@ class Error(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> Error:
|
|
@@ -78,7 +85,8 @@ class Error(BaseModel):
|
|
|
78
85
|
|
|
79
86
|
_obj = Error.parse_obj({
|
|
80
87
|
"code": obj.get("code"),
|
|
81
|
-
|
|
88
|
+
"message": obj.get("message")
|
|
89
|
+
|
|
82
90
|
})
|
|
83
91
|
return _obj
|
|
84
92
|
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
from typing import List, Optional
|
|
18
23
|
from pydantic import BaseModel, Field, StrictStr, conlist
|
|
@@ -30,7 +35,7 @@ class EstimateContractExecutionTransactionFeeRequest(BaseModel):
|
|
|
30
35
|
blockchain: Optional[ContractExecutionBlockchain] = None
|
|
31
36
|
contract_address: StrictStr = Field(..., alias="contractAddress", description="The blockchain address of the contract to be executed.")
|
|
32
37
|
source_address: Optional[StrictStr] = Field(None, alias="sourceAddress", description="Source address of the transaction. Required along with `blockchain` if `walletId` is not provided. The `sourceAddress` and `walletId` fields are mutually exclusive. ")
|
|
33
|
-
wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="Unique system generated identifier of the wallet.
|
|
38
|
+
wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="Unique system generated identifier of the wallet. For contract deploys this wallet ID will be used as the source. ")
|
|
34
39
|
__properties = ["abiFunctionSignature", "abiParameters", "callData", "amount", "blockchain", "contractAddress", "sourceAddress", "walletId"]
|
|
35
40
|
|
|
36
41
|
def __init__(self, **kwargs):
|
|
@@ -52,8 +57,10 @@ class EstimateContractExecutionTransactionFeeRequest(BaseModel):
|
|
|
52
57
|
return pprint.pformat(self.dict(by_alias=True))
|
|
53
58
|
|
|
54
59
|
def to_json(self) -> str:
|
|
55
|
-
"""
|
|
56
|
-
|
|
60
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
61
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
62
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
63
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
57
64
|
|
|
58
65
|
@classmethod
|
|
59
66
|
def from_json(cls, json_str: str) -> EstimateContractExecutionTransactionFeeRequest:
|
|
@@ -93,13 +100,14 @@ class EstimateContractExecutionTransactionFeeRequest(BaseModel):
|
|
|
93
100
|
|
|
94
101
|
_obj = EstimateContractExecutionTransactionFeeRequest.parse_obj({
|
|
95
102
|
"abi_function_signature": obj.get("abiFunctionSignature"),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
+
"abi_parameters": [AbiParametersInner.from_dict(_item) for _item in obj.get("abiParameters")] if obj.get("abiParameters") is not None else None,
|
|
104
|
+
"call_data": obj.get("callData"),
|
|
105
|
+
"amount": obj.get("amount"),
|
|
106
|
+
"blockchain": obj.get("blockchain"),
|
|
107
|
+
"contract_address": obj.get("contractAddress"),
|
|
108
|
+
"source_address": obj.get("sourceAddress"),
|
|
109
|
+
"wallet_id": obj.get("walletId")
|
|
110
|
+
|
|
103
111
|
})
|
|
104
112
|
return _obj
|
|
105
113
|
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
from pydantic import BaseModel, Field
|
|
@@ -44,8 +49,10 @@ class EstimateTransactionFee(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> EstimateTransactionFee:
|
|
@@ -81,6 +88,7 @@ class EstimateTransactionFee(BaseModel):
|
|
|
81
88
|
|
|
82
89
|
_obj = EstimateTransactionFee.parse_obj({
|
|
83
90
|
"data": EstimateTransactionFeeData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
91
|
+
|
|
84
92
|
})
|
|
85
93
|
return _obj
|
|
86
94
|
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
from typing import Optional
|
|
18
23
|
from pydantic import BaseModel, Field, StrictStr
|
|
@@ -49,8 +54,10 @@ class EstimateTransactionFeeData(BaseModel):
|
|
|
49
54
|
return pprint.pformat(self.dict(by_alias=True))
|
|
50
55
|
|
|
51
56
|
def to_json(self) -> str:
|
|
52
|
-
"""
|
|
53
|
-
|
|
57
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
58
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
59
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
60
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
54
61
|
|
|
55
62
|
@classmethod
|
|
56
63
|
def from_json(cls, json_str: str) -> EstimateTransactionFeeData:
|
|
@@ -92,11 +99,12 @@ class EstimateTransactionFeeData(BaseModel):
|
|
|
92
99
|
|
|
93
100
|
_obj = EstimateTransactionFeeData.parse_obj({
|
|
94
101
|
"high": TransactionFee.from_dict(obj.get("high")) if obj.get("high") is not None else None,
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
102
|
+
"low": TransactionFee.from_dict(obj.get("low")) if obj.get("low") is not None else None,
|
|
103
|
+
"medium": TransactionFee.from_dict(obj.get("medium")) if obj.get("medium") is not None else None,
|
|
104
|
+
"call_gas_limit": obj.get("callGasLimit"),
|
|
105
|
+
"verification_gas_limit": obj.get("verificationGasLimit"),
|
|
106
|
+
"pre_verification_gas": obj.get("preVerificationGas")
|
|
107
|
+
|
|
100
108
|
})
|
|
101
109
|
return _obj
|
|
102
110
|
|
circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py
CHANGED
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
from typing import List, Optional
|
|
18
23
|
from pydantic import BaseModel, Field, StrictStr, conlist
|
|
@@ -29,7 +34,7 @@ class EstimateTransferTransactionFeeRequest(BaseModel):
|
|
|
29
34
|
token_id: Optional[StrictStr] = Field(None, alias="tokenId", description="System generated identifier of the token. Excluded with `tokenAddress` and `tokenBlockchain`.")
|
|
30
35
|
token_address: Optional[StrictStr] = Field(None, alias="tokenAddress", description="Blockchain address of the transferred token. Empty for native tokens. Excluded with `tokenId`.")
|
|
31
36
|
blockchain: Optional[TokenBlockchain] = None
|
|
32
|
-
wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="Unique system generated identifier of the wallet.
|
|
37
|
+
wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="Unique system generated identifier of the wallet. For contract deploys this wallet ID will be used as the source. ")
|
|
33
38
|
__properties = ["amounts", "destinationAddress", "nftTokenIds", "sourceAddress", "tokenId", "tokenAddress", "blockchain", "walletId"]
|
|
34
39
|
|
|
35
40
|
def __init__(self, **kwargs):
|
|
@@ -51,8 +56,10 @@ class EstimateTransferTransactionFeeRequest(BaseModel):
|
|
|
51
56
|
return pprint.pformat(self.dict(by_alias=True))
|
|
52
57
|
|
|
53
58
|
def to_json(self) -> str:
|
|
54
|
-
"""
|
|
55
|
-
|
|
59
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
60
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
61
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
62
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
56
63
|
|
|
57
64
|
@classmethod
|
|
58
65
|
def from_json(cls, json_str: str) -> EstimateTransferTransactionFeeRequest:
|
|
@@ -85,13 +92,14 @@ class EstimateTransferTransactionFeeRequest(BaseModel):
|
|
|
85
92
|
|
|
86
93
|
_obj = EstimateTransferTransactionFeeRequest.parse_obj({
|
|
87
94
|
"amounts": obj.get("amounts"),
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
+
"destination_address": obj.get("destinationAddress"),
|
|
96
|
+
"nft_token_ids": obj.get("nftTokenIds"),
|
|
97
|
+
"source_address": obj.get("sourceAddress"),
|
|
98
|
+
"token_id": obj.get("tokenId"),
|
|
99
|
+
"token_address": obj.get("tokenAddress"),
|
|
100
|
+
"blockchain": obj.get("blockchain"),
|
|
101
|
+
"wallet_id": obj.get("walletId")
|
|
102
|
+
|
|
95
103
|
})
|
|
96
104
|
return _obj
|
|
97
105
|
|
|
@@ -19,7 +19,7 @@ from aenum import Enum, no_arg
|
|
|
19
19
|
|
|
20
20
|
class FeeLevel(str, Enum):
|
|
21
21
|
"""
|
|
22
|
-
A dynamic blockchain fee level setting (`LOW`, `MEDIUM`, or `HIGH`) that will be used to pay gas for the transaction. Calculated based on network traffic, supply of validators, and demand for transaction verification. Cannot be used with `gasPrice`, `priorityFee`, or `maxFee`. Estimates for each fee level can be obtained through the `POST /transactions/transfer/estimateFee` API.
|
|
22
|
+
A dynamic blockchain fee level setting (`LOW`, `MEDIUM`, or `HIGH`) that will be used to pay gas for the transaction. Calculated based on network traffic, supply of validators, and demand for transaction verification. Cannot be used with `gasPrice`, `priorityFee`, or `maxFee`. Estimates for each fee level can be obtained through the [`POST /transactions/transfer/estimateFee`](/api-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) API.
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
25
|
"""
|
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
The version of the OpenAPI document: 1.0
|
|
5
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
6
|
+
|
|
7
|
+
Do not edit the class manually.
|
|
8
|
+
""" # noqa: E501
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
import pprint
|
|
13
|
+
import re # noqa: F401
|
|
14
|
+
import json
|
|
15
|
+
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
from pydantic import BaseModel, Field
|
|
24
|
+
from circle.web3.developer_controlled_wallets.models.get_lowest_nonce_transaction_response_data import GetLowestNonceTransactionResponseData
|
|
25
|
+
|
|
26
|
+
class GetLowestNonceTransactionResponse(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
GetLowestNonceTransactionResponse
|
|
29
|
+
"""
|
|
30
|
+
data: GetLowestNonceTransactionResponseData = Field(...)
|
|
31
|
+
__properties = ["data"]
|
|
32
|
+
|
|
33
|
+
def __init__(self, **kwargs):
|
|
34
|
+
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
35
|
+
kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
|
|
36
|
+
|
|
37
|
+
if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
|
|
38
|
+
kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
|
|
39
|
+
super().__init__(**kwargs)
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
class Config:
|
|
43
|
+
"""Pydantic configuration"""
|
|
44
|
+
allow_population_by_field_name = True
|
|
45
|
+
validate_assignment = True
|
|
46
|
+
|
|
47
|
+
def to_str(self) -> str:
|
|
48
|
+
"""Returns the string representation of the model using alias"""
|
|
49
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
50
|
+
|
|
51
|
+
def to_json(self) -> str:
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
56
|
+
|
|
57
|
+
@classmethod
|
|
58
|
+
def from_json(cls, json_str: str) -> GetLowestNonceTransactionResponse:
|
|
59
|
+
"""Create an instance of GetLowestNonceTransactionResponse from a JSON string"""
|
|
60
|
+
return cls.from_dict(json.loads(json_str))
|
|
61
|
+
|
|
62
|
+
def to_dict(self):
|
|
63
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
64
|
+
_dict = self.dict(by_alias=True,
|
|
65
|
+
exclude={
|
|
66
|
+
},
|
|
67
|
+
exclude_none=True)
|
|
68
|
+
# override the default output from pydantic by calling `to_dict()` of data
|
|
69
|
+
if self.data:
|
|
70
|
+
_dict['data'] = self.data.to_dict()
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: dict) -> GetLowestNonceTransactionResponse:
|
|
75
|
+
"""Create an instance of GetLowestNonceTransactionResponse from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return GetLowestNonceTransactionResponse.parse_obj(obj)
|
|
81
|
+
|
|
82
|
+
# fill idempotency_key and ciphertext with placeholder for auto_fill
|
|
83
|
+
if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
|
|
84
|
+
obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
|
|
85
|
+
|
|
86
|
+
if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
|
|
87
|
+
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
88
|
+
|
|
89
|
+
_obj = GetLowestNonceTransactionResponse.parse_obj({
|
|
90
|
+
"data": GetLowestNonceTransactionResponseData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
91
|
+
|
|
92
|
+
})
|
|
93
|
+
return _obj
|
|
94
|
+
|
|
95
|
+
|
|
@@ -0,0 +1,101 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
The version of the OpenAPI document: 1.0
|
|
5
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
6
|
+
|
|
7
|
+
Do not edit the class manually.
|
|
8
|
+
""" # noqa: E501
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
import pprint
|
|
13
|
+
import re # noqa: F401
|
|
14
|
+
import json
|
|
15
|
+
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
from pydantic import BaseModel, Field
|
|
24
|
+
from circle.web3.developer_controlled_wallets.models.lowest_nonce_transaction_fee_info import LowestNonceTransactionFeeInfo
|
|
25
|
+
from circle.web3.developer_controlled_wallets.models.transaction import Transaction
|
|
26
|
+
|
|
27
|
+
class GetLowestNonceTransactionResponseData(BaseModel):
|
|
28
|
+
"""
|
|
29
|
+
GetLowestNonceTransactionResponseData
|
|
30
|
+
"""
|
|
31
|
+
transaction: Transaction = Field(...)
|
|
32
|
+
fee_info: LowestNonceTransactionFeeInfo = Field(..., alias="feeInfo")
|
|
33
|
+
__properties = ["transaction", "feeInfo"]
|
|
34
|
+
|
|
35
|
+
def __init__(self, **kwargs):
|
|
36
|
+
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
37
|
+
kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
|
|
38
|
+
|
|
39
|
+
if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
|
|
40
|
+
kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
|
|
41
|
+
super().__init__(**kwargs)
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class Config:
|
|
45
|
+
"""Pydantic configuration"""
|
|
46
|
+
allow_population_by_field_name = True
|
|
47
|
+
validate_assignment = True
|
|
48
|
+
|
|
49
|
+
def to_str(self) -> str:
|
|
50
|
+
"""Returns the string representation of the model using alias"""
|
|
51
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
52
|
+
|
|
53
|
+
def to_json(self) -> str:
|
|
54
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
55
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
56
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
57
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
58
|
+
|
|
59
|
+
@classmethod
|
|
60
|
+
def from_json(cls, json_str: str) -> GetLowestNonceTransactionResponseData:
|
|
61
|
+
"""Create an instance of GetLowestNonceTransactionResponseData from a JSON string"""
|
|
62
|
+
return cls.from_dict(json.loads(json_str))
|
|
63
|
+
|
|
64
|
+
def to_dict(self):
|
|
65
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
66
|
+
_dict = self.dict(by_alias=True,
|
|
67
|
+
exclude={
|
|
68
|
+
},
|
|
69
|
+
exclude_none=True)
|
|
70
|
+
# override the default output from pydantic by calling `to_dict()` of transaction
|
|
71
|
+
if self.transaction:
|
|
72
|
+
_dict['transaction'] = self.transaction.to_dict()
|
|
73
|
+
# override the default output from pydantic by calling `to_dict()` of fee_info
|
|
74
|
+
if self.fee_info:
|
|
75
|
+
_dict['feeInfo'] = self.fee_info.to_dict()
|
|
76
|
+
return _dict
|
|
77
|
+
|
|
78
|
+
@classmethod
|
|
79
|
+
def from_dict(cls, obj: dict) -> GetLowestNonceTransactionResponseData:
|
|
80
|
+
"""Create an instance of GetLowestNonceTransactionResponseData from a dict"""
|
|
81
|
+
if obj is None:
|
|
82
|
+
return None
|
|
83
|
+
|
|
84
|
+
if not isinstance(obj, dict):
|
|
85
|
+
return GetLowestNonceTransactionResponseData.parse_obj(obj)
|
|
86
|
+
|
|
87
|
+
# fill idempotency_key and ciphertext with placeholder for auto_fill
|
|
88
|
+
if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
|
|
89
|
+
obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
|
|
90
|
+
|
|
91
|
+
if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
|
|
92
|
+
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
93
|
+
|
|
94
|
+
_obj = GetLowestNonceTransactionResponseData.parse_obj({
|
|
95
|
+
"transaction": Transaction.from_dict(obj.get("transaction")) if obj.get("transaction") is not None else None,
|
|
96
|
+
"fee_info": LowestNonceTransactionFeeInfo.from_dict(obj.get("feeInfo")) if obj.get("feeInfo") is not None else None
|
|
97
|
+
|
|
98
|
+
})
|
|
99
|
+
return _obj
|
|
100
|
+
|
|
101
|
+
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
The version of the OpenAPI document: 1.0
|
|
5
|
+
Generated by OpenAPI Generator (https://openapi-generator.tech)
|
|
6
|
+
|
|
7
|
+
Do not edit the class manually.
|
|
8
|
+
""" # noqa: E501
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
from __future__ import annotations
|
|
12
|
+
import pprint
|
|
13
|
+
import re # noqa: F401
|
|
14
|
+
import json
|
|
15
|
+
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
from pydantic import BaseModel, Field, StrictStr
|
|
24
|
+
from circle.web3.developer_controlled_wallets.models.transaction_fee import TransactionFee
|
|
25
|
+
|
|
26
|
+
class LowestNonceTransactionFeeInfo(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
LowestNonceTransactionFeeInfo
|
|
29
|
+
"""
|
|
30
|
+
new_high_estimated_fee: TransactionFee = Field(..., alias="newHighEstimatedFee")
|
|
31
|
+
fee_difference_amount: StrictStr = Field(..., alias="feeDifferenceAmount", description="Difference between new HIGH estimation and transaction's existing estimated fee, in native token amount unit, for example ETH")
|
|
32
|
+
__properties = ["newHighEstimatedFee", "feeDifferenceAmount"]
|
|
33
|
+
|
|
34
|
+
def __init__(self, **kwargs):
|
|
35
|
+
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
36
|
+
kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
|
|
37
|
+
|
|
38
|
+
if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
|
|
39
|
+
kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
|
|
40
|
+
super().__init__(**kwargs)
|
|
41
|
+
|
|
42
|
+
|
|
43
|
+
class Config:
|
|
44
|
+
"""Pydantic configuration"""
|
|
45
|
+
allow_population_by_field_name = True
|
|
46
|
+
validate_assignment = True
|
|
47
|
+
|
|
48
|
+
def to_str(self) -> str:
|
|
49
|
+
"""Returns the string representation of the model using alias"""
|
|
50
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
51
|
+
|
|
52
|
+
def to_json(self) -> str:
|
|
53
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
54
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
55
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
56
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
57
|
+
|
|
58
|
+
@classmethod
|
|
59
|
+
def from_json(cls, json_str: str) -> LowestNonceTransactionFeeInfo:
|
|
60
|
+
"""Create an instance of LowestNonceTransactionFeeInfo from a JSON string"""
|
|
61
|
+
return cls.from_dict(json.loads(json_str))
|
|
62
|
+
|
|
63
|
+
def to_dict(self):
|
|
64
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
65
|
+
_dict = self.dict(by_alias=True,
|
|
66
|
+
exclude={
|
|
67
|
+
},
|
|
68
|
+
exclude_none=True)
|
|
69
|
+
# override the default output from pydantic by calling `to_dict()` of new_high_estimated_fee
|
|
70
|
+
if self.new_high_estimated_fee:
|
|
71
|
+
_dict['newHighEstimatedFee'] = self.new_high_estimated_fee.to_dict()
|
|
72
|
+
return _dict
|
|
73
|
+
|
|
74
|
+
@classmethod
|
|
75
|
+
def from_dict(cls, obj: dict) -> LowestNonceTransactionFeeInfo:
|
|
76
|
+
"""Create an instance of LowestNonceTransactionFeeInfo from a dict"""
|
|
77
|
+
if obj is None:
|
|
78
|
+
return None
|
|
79
|
+
|
|
80
|
+
if not isinstance(obj, dict):
|
|
81
|
+
return LowestNonceTransactionFeeInfo.parse_obj(obj)
|
|
82
|
+
|
|
83
|
+
# fill idempotency_key and ciphertext with placeholder for auto_fill
|
|
84
|
+
if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
|
|
85
|
+
obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
|
|
86
|
+
|
|
87
|
+
if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
|
|
88
|
+
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
89
|
+
|
|
90
|
+
_obj = LowestNonceTransactionFeeInfo.parse_obj({
|
|
91
|
+
"new_high_estimated_fee": TransactionFee.from_dict(obj.get("newHighEstimatedFee")) if obj.get("newHighEstimatedFee") is not None else None,
|
|
92
|
+
"fee_difference_amount": obj.get("feeDifferenceAmount")
|
|
93
|
+
|
|
94
|
+
})
|
|
95
|
+
return _obj
|
|
96
|
+
|
|
97
|
+
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
from datetime import datetime
|
|
17
22
|
from typing import Optional
|
|
18
23
|
from pydantic import BaseModel, Field, StrictStr
|
|
@@ -48,8 +53,10 @@ class Nft(BaseModel):
|
|
|
48
53
|
return pprint.pformat(self.dict(by_alias=True))
|
|
49
54
|
|
|
50
55
|
def to_json(self) -> str:
|
|
51
|
-
"""
|
|
52
|
-
|
|
56
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
57
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
58
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
59
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
53
60
|
|
|
54
61
|
@classmethod
|
|
55
62
|
def from_json(cls, json_str: str) -> Nft:
|
|
@@ -85,10 +92,11 @@ class Nft(BaseModel):
|
|
|
85
92
|
|
|
86
93
|
_obj = Nft.parse_obj({
|
|
87
94
|
"amount": obj.get("amount"),
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
95
|
+
"metadata": obj.get("metadata"),
|
|
96
|
+
"nft_token_id": obj.get("nftTokenId"),
|
|
97
|
+
"token": Token.from_dict(obj.get("token")) if obj.get("token") is not None else None,
|
|
98
|
+
"update_date": obj.get("updateDate")
|
|
99
|
+
|
|
92
100
|
})
|
|
93
101
|
return _obj
|
|
94
102
|
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
from pydantic import BaseModel, Field
|
|
@@ -44,8 +49,10 @@ class Nfts(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> Nfts:
|
|
@@ -81,6 +88,7 @@ class Nfts(BaseModel):
|
|
|
81
88
|
|
|
82
89
|
_obj = Nfts.parse_obj({
|
|
83
90
|
"data": NftsData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
91
|
+
|
|
84
92
|
})
|
|
85
93
|
return _obj
|
|
86
94
|
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
from typing import List, Optional
|
|
18
23
|
from pydantic import BaseModel, conlist
|
|
@@ -44,8 +49,10 @@ class NftsData(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> NftsData:
|
|
@@ -85,6 +92,7 @@ class NftsData(BaseModel):
|
|
|
85
92
|
|
|
86
93
|
_obj = NftsData.parse_obj({
|
|
87
94
|
"nfts": [Nft.from_dict(_item) for _item in obj.get("nfts")] if obj.get("nfts") is not None else None
|
|
95
|
+
|
|
88
96
|
})
|
|
89
97
|
return _obj
|
|
90
98
|
|