circle-developer-controlled-wallets 7.0.0__py3-none-any.whl → 8.1.0__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.
Potentially problematic release.
This version of circle-developer-controlled-wallets might be problematic. Click here for more details.
- circle/web3/developer_controlled_wallets/__init__.py +6 -1
- circle/web3/developer_controlled_wallets/api/signing_api.py +6 -6
- circle/web3/developer_controlled_wallets/api/transactions_api.py +165 -4
- circle/web3/developer_controlled_wallets/api_client.py +1 -1
- circle/web3/developer_controlled_wallets/configuration.py +6 -2
- circle/web3/developer_controlled_wallets/models/__init__.py +5 -0
- circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer.py +1 -0
- circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_request.py +2 -1
- circle/web3/developer_controlled_wallets/models/bad_request_response.py +2 -1
- circle/web3/developer_controlled_wallets/models/balance.py +3 -2
- circle/web3/developer_controlled_wallets/models/balances.py +1 -0
- circle/web3/developer_controlled_wallets/models/balances_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/base_screening_decision.py +3 -2
- circle/web3/developer_controlled_wallets/models/blockchain.py +1 -0
- circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer.py +1 -0
- circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer_request.py +2 -1
- 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 +1 -0
- circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer_request.py +21 -15
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py +24 -18
- 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 +1 -0
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response_data.py +2 -1
- circle/web3/developer_controlled_wallets/models/create_wallet_request.py +7 -6
- circle/web3/developer_controlled_wallets/models/create_wallet_set_request.py +3 -2
- circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer.py +1 -0
- circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer_request.py +11 -10
- circle/web3/developer_controlled_wallets/models/derive_wallet_request.py +1 -0
- circle/web3/developer_controlled_wallets/models/developer_wallet_set.py +4 -3
- circle/web3/developer_controlled_wallets/models/end_user_wallet_set.py +5 -4
- circle/web3/developer_controlled_wallets/models/eoa_wallet.py +13 -12
- circle/web3/developer_controlled_wallets/models/eoa_wallet_with_balances.py +14 -13
- circle/web3/developer_controlled_wallets/models/error.py +2 -1
- circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request.py +9 -8
- circle/web3/developer_controlled_wallets/models/estimate_transaction_fee.py +1 -0
- circle/web3/developer_controlled_wallets/models/estimate_transaction_fee_data.py +6 -5
- circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py +9 -8
- 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 +5 -4
- circle/web3/developer_controlled_wallets/models/nfts.py +1 -0
- circle/web3/developer_controlled_wallets/models/nfts_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/not_authorized_response.py +2 -1
- circle/web3/developer_controlled_wallets/models/not_found_response.py +2 -1
- circle/web3/developer_controlled_wallets/models/risk_signal.py +5 -4
- circle/web3/developer_controlled_wallets/models/sca_wallet.py +14 -13
- circle/web3/developer_controlled_wallets/models/sca_wallet_with_balances.py +15 -14
- circle/web3/developer_controlled_wallets/models/sign_delegate_action_request.py +3 -2
- circle/web3/developer_controlled_wallets/models/sign_delegate_action_response.py +1 -0
- circle/web3/developer_controlled_wallets/models/sign_delegate_action_response_data.py +2 -1
- circle/web3/developer_controlled_wallets/models/sign_message_request.py +12 -6
- circle/web3/developer_controlled_wallets/models/sign_transaction_request.py +12 -6
- circle/web3/developer_controlled_wallets/models/sign_transaction_response.py +1 -0
- circle/web3/developer_controlled_wallets/models/sign_transaction_response_data.py +3 -2
- circle/web3/developer_controlled_wallets/models/sign_typed_data_request.py +11 -5
- circle/web3/developer_controlled_wallets/models/signature_response.py +1 -0
- circle/web3/developer_controlled_wallets/models/signature_response_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/token.py +10 -9
- circle/web3/developer_controlled_wallets/models/token_blockchain.py +1 -0
- circle/web3/developer_controlled_wallets/models/token_response.py +1 -0
- circle/web3/developer_controlled_wallets/models/token_response_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/transaction.py +31 -30
- circle/web3/developer_controlled_wallets/models/transaction_fee.py +10 -7
- circle/web3/developer_controlled_wallets/models/transaction_response.py +1 -0
- circle/web3/developer_controlled_wallets/models/transaction_response_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/transaction_screening_decision.py +4 -3
- circle/web3/developer_controlled_wallets/models/transaction_state.py +1 -0
- circle/web3/developer_controlled_wallets/models/transactions.py +1 -0
- circle/web3/developer_controlled_wallets/models/transactions_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/transfer_blockchain.py +53 -0
- circle/web3/developer_controlled_wallets/models/update_wallet_request.py +2 -1
- circle/web3/developer_controlled_wallets/models/update_wallet_set_request.py +1 -0
- circle/web3/developer_controlled_wallets/models/validate_address.py +1 -0
- circle/web3/developer_controlled_wallets/models/validate_address_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/validate_address_request.py +2 -1
- circle/web3/developer_controlled_wallets/models/wallet.py +12 -11
- circle/web3/developer_controlled_wallets/models/wallet_metadata.py +2 -1
- circle/web3/developer_controlled_wallets/models/wallet_response.py +1 -0
- circle/web3/developer_controlled_wallets/models/wallet_response_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/wallet_set.py +3 -2
- circle/web3/developer_controlled_wallets/models/wallet_set_response.py +1 -0
- circle/web3/developer_controlled_wallets/models/wallet_set_response_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/wallet_sets.py +1 -0
- circle/web3/developer_controlled_wallets/models/wallet_sets_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/wallets.py +1 -0
- circle/web3/developer_controlled_wallets/models/wallets_data.py +1 -0
- circle/web3/developer_controlled_wallets/models/wallets_with_balances.py +1 -0
- circle/web3/developer_controlled_wallets/models/wallets_with_balances_data.py +1 -0
- {circle_developer_controlled_wallets-7.0.0.dist-info → circle_developer_controlled_wallets-8.1.0.dist-info}/METADATA +3 -3
- {circle_developer_controlled_wallets-7.0.0.dist-info → circle_developer_controlled_wallets-8.1.0.dist-info}/RECORD +94 -89
- {circle_developer_controlled_wallets-7.0.0.dist-info → circle_developer_controlled_wallets-8.1.0.dist-info}/WHEEL +0 -0
- {circle_developer_controlled_wallets-7.0.0.dist-info → circle_developer_controlled_wallets-8.1.0.dist-info}/top_level.txt +0 -0
circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py
CHANGED
|
@@ -21,8 +21,8 @@ from pydantic.json import pydantic_encoder
|
|
|
21
21
|
|
|
22
22
|
from typing import List, Optional, Union
|
|
23
23
|
from pydantic import BaseModel, Field, StrictBytes, StrictStr, conlist
|
|
24
|
+
from circle.web3.developer_controlled_wallets.models.create_transfer_transaction_for_developer_request_blockchain import CreateTransferTransactionForDeveloperRequestBlockchain
|
|
24
25
|
from circle.web3.developer_controlled_wallets.models.fee_level import FeeLevel
|
|
25
|
-
from circle.web3.developer_controlled_wallets.models.token_blockchain import TokenBlockchain
|
|
26
26
|
|
|
27
27
|
class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
28
28
|
"""
|
|
@@ -41,9 +41,10 @@ class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
|
41
41
|
ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Optional reference or description used to identify the transaction.")
|
|
42
42
|
token_id: Optional[StrictStr] = Field(None, alias="tokenId", description="System generated identifier of the token. Excluded with `tokenAddress` and `tokenBlockchain`.")
|
|
43
43
|
token_address: Optional[StrictStr] = Field(None, alias="tokenAddress", description="Blockchain address of the transferred token. Empty for native tokens. Excluded with `tokenId`.")
|
|
44
|
-
blockchain: Optional[
|
|
45
|
-
wallet_id: StrictStr = Field(
|
|
46
|
-
|
|
44
|
+
blockchain: Optional[CreateTransferTransactionForDeveloperRequestBlockchain] = None
|
|
45
|
+
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. ")
|
|
46
|
+
wallet_address: Optional[StrictStr] = Field(None, alias="walletAddress", description="Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects. ")
|
|
47
|
+
__properties = ["idempotencyKey", "amounts", "destinationAddress", "entitySecretCiphertext", "feeLevel", "gasLimit", "gasPrice", "maxFee", "priorityFee", "nftTokenIds", "refId", "tokenId", "tokenAddress", "blockchain", "walletId", "walletAddress"]
|
|
47
48
|
|
|
48
49
|
def __init__(self, **kwargs):
|
|
49
50
|
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
@@ -80,6 +81,9 @@ class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
|
80
81
|
exclude={
|
|
81
82
|
},
|
|
82
83
|
exclude_none=True)
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of blockchain
|
|
85
|
+
if self.blockchain:
|
|
86
|
+
_dict['blockchain'] = self.blockchain.to_dict()
|
|
83
87
|
return _dict
|
|
84
88
|
|
|
85
89
|
@classmethod
|
|
@@ -100,20 +104,22 @@ class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
|
100
104
|
|
|
101
105
|
_obj = CreateTransferTransactionForDeveloperRequest.parse_obj({
|
|
102
106
|
"idempotency_key": obj.get("idempotencyKey"),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
107
|
+
"amounts": obj.get("amounts"),
|
|
108
|
+
"destination_address": obj.get("destinationAddress"),
|
|
109
|
+
"entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
|
|
110
|
+
"fee_level": obj.get("feeLevel"),
|
|
111
|
+
"gas_limit": obj.get("gasLimit"),
|
|
112
|
+
"gas_price": obj.get("gasPrice"),
|
|
113
|
+
"max_fee": obj.get("maxFee"),
|
|
114
|
+
"priority_fee": obj.get("priorityFee"),
|
|
115
|
+
"nft_token_ids": obj.get("nftTokenIds"),
|
|
116
|
+
"ref_id": obj.get("refId"),
|
|
117
|
+
"token_id": obj.get("tokenId"),
|
|
118
|
+
"token_address": obj.get("tokenAddress"),
|
|
119
|
+
"blockchain": CreateTransferTransactionForDeveloperRequestBlockchain.from_dict(obj.get("blockchain")) if obj.get("blockchain") is not None else None,
|
|
120
|
+
"wallet_id": obj.get("walletId"),
|
|
121
|
+
"wallet_address": obj.get("walletAddress")
|
|
122
|
+
|
|
117
123
|
})
|
|
118
124
|
return _obj
|
|
119
125
|
|
|
@@ -0,0 +1,130 @@
|
|
|
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
|
+
from inspect import getfullargspec
|
|
13
|
+
import json
|
|
14
|
+
import pprint
|
|
15
|
+
import re # noqa: F401
|
|
16
|
+
|
|
17
|
+
from typing import Optional
|
|
18
|
+
from pydantic import BaseModel, Field, StrictStr, ValidationError, validator
|
|
19
|
+
from circle.web3.developer_controlled_wallets.models.token_blockchain import TokenBlockchain
|
|
20
|
+
from circle.web3.developer_controlled_wallets.models.transfer_blockchain import TransferBlockchain
|
|
21
|
+
from typing import Union, Any, List, TYPE_CHECKING
|
|
22
|
+
from pydantic import StrictStr, Field
|
|
23
|
+
|
|
24
|
+
CREATETRANSFERTRANSACTIONFORDEVELOPERREQUESTBLOCKCHAIN_ANY_OF_SCHEMAS = ["TokenBlockchain", "TransferBlockchain"]
|
|
25
|
+
|
|
26
|
+
class CreateTransferTransactionForDeveloperRequestBlockchain(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
CreateTransferTransactionForDeveloperRequestBlockchain
|
|
29
|
+
"""
|
|
30
|
+
|
|
31
|
+
# data type: TransferBlockchain
|
|
32
|
+
anyof_schema_1_validator: Optional[TransferBlockchain] = None
|
|
33
|
+
# data type: TokenBlockchain
|
|
34
|
+
anyof_schema_2_validator: Optional[TokenBlockchain] = None
|
|
35
|
+
if TYPE_CHECKING:
|
|
36
|
+
actual_instance: Union[TokenBlockchain, TransferBlockchain]
|
|
37
|
+
else:
|
|
38
|
+
actual_instance: Any
|
|
39
|
+
any_of_schemas: List[str] = Field(CREATETRANSFERTRANSACTIONFORDEVELOPERREQUESTBLOCKCHAIN_ANY_OF_SCHEMAS, const=True)
|
|
40
|
+
|
|
41
|
+
class Config:
|
|
42
|
+
validate_assignment = True
|
|
43
|
+
|
|
44
|
+
def __init__(self, *args, **kwargs):
|
|
45
|
+
if args:
|
|
46
|
+
if len(args) > 1:
|
|
47
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
48
|
+
if kwargs:
|
|
49
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
50
|
+
super().__init__(actual_instance=args[0])
|
|
51
|
+
else:
|
|
52
|
+
super().__init__(**kwargs)
|
|
53
|
+
|
|
54
|
+
@validator('actual_instance')
|
|
55
|
+
def actual_instance_must_validate_anyof(cls, v):
|
|
56
|
+
instance = CreateTransferTransactionForDeveloperRequestBlockchain.construct()
|
|
57
|
+
error_messages = []
|
|
58
|
+
# validate data type: TransferBlockchain
|
|
59
|
+
if not isinstance(v, TransferBlockchain):
|
|
60
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `TransferBlockchain`")
|
|
61
|
+
else:
|
|
62
|
+
return v
|
|
63
|
+
|
|
64
|
+
# validate data type: TokenBlockchain
|
|
65
|
+
if not isinstance(v, TokenBlockchain):
|
|
66
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `TokenBlockchain`")
|
|
67
|
+
else:
|
|
68
|
+
return v
|
|
69
|
+
|
|
70
|
+
if error_messages:
|
|
71
|
+
# no match
|
|
72
|
+
raise ValueError("No match found when setting the actual_instance in CreateTransferTransactionForDeveloperRequestBlockchain with anyOf schemas: TokenBlockchain, TransferBlockchain. Details: " + ", ".join(error_messages))
|
|
73
|
+
else:
|
|
74
|
+
return v
|
|
75
|
+
|
|
76
|
+
@classmethod
|
|
77
|
+
def from_dict(cls, obj: dict) -> CreateTransferTransactionForDeveloperRequestBlockchain:
|
|
78
|
+
return cls.from_json(json.dumps(obj))
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_json(cls, json_str: str) -> CreateTransferTransactionForDeveloperRequestBlockchain:
|
|
82
|
+
"""Returns the object represented by the json string"""
|
|
83
|
+
instance = CreateTransferTransactionForDeveloperRequestBlockchain.construct()
|
|
84
|
+
error_messages = []
|
|
85
|
+
# anyof_schema_1_validator: Optional[TransferBlockchain] = None
|
|
86
|
+
try:
|
|
87
|
+
instance.actual_instance = TransferBlockchain.from_json(json_str)
|
|
88
|
+
return instance
|
|
89
|
+
except (ValidationError, ValueError) as e:
|
|
90
|
+
error_messages.append(str(e))
|
|
91
|
+
# anyof_schema_2_validator: Optional[TokenBlockchain] = None
|
|
92
|
+
try:
|
|
93
|
+
instance.actual_instance = TokenBlockchain.from_json(json_str)
|
|
94
|
+
return instance
|
|
95
|
+
except (ValidationError, ValueError) as e:
|
|
96
|
+
error_messages.append(str(e))
|
|
97
|
+
|
|
98
|
+
if error_messages:
|
|
99
|
+
# no match
|
|
100
|
+
raise ValueError("No match found when deserializing the JSON string into CreateTransferTransactionForDeveloperRequestBlockchain with anyOf schemas: TokenBlockchain, TransferBlockchain. Details: " + ", ".join(error_messages))
|
|
101
|
+
else:
|
|
102
|
+
return instance
|
|
103
|
+
|
|
104
|
+
def to_json(self) -> str:
|
|
105
|
+
"""Returns the JSON representation of the actual instance"""
|
|
106
|
+
if self.actual_instance is None:
|
|
107
|
+
return "null"
|
|
108
|
+
|
|
109
|
+
to_json = getattr(self.actual_instance, "to_json", None)
|
|
110
|
+
if callable(to_json):
|
|
111
|
+
return self.actual_instance.to_json()
|
|
112
|
+
else:
|
|
113
|
+
return json.dumps(self.actual_instance)
|
|
114
|
+
|
|
115
|
+
def to_dict(self):
|
|
116
|
+
"""Returns the dict representation of the actual instance"""
|
|
117
|
+
if self.actual_instance is None:
|
|
118
|
+
return None
|
|
119
|
+
|
|
120
|
+
to_dict = getattr(self.actual_instance, "to_dict", None)
|
|
121
|
+
if callable(to_dict):
|
|
122
|
+
return self.actual_instance.to_dict()
|
|
123
|
+
else:
|
|
124
|
+
return self.actual_instance # Return actual value instead of json.dumps()
|
|
125
|
+
|
|
126
|
+
def to_str(self) -> str:
|
|
127
|
+
"""Returns the string representation of the actual instance"""
|
|
128
|
+
return pprint.pformat(self.dict())
|
|
129
|
+
|
|
130
|
+
|
|
@@ -88,6 +88,7 @@ class CreateTransferTransactionForDeveloperResponse(BaseModel):
|
|
|
88
88
|
|
|
89
89
|
_obj = CreateTransferTransactionForDeveloperResponse.parse_obj({
|
|
90
90
|
"data": CreateTransferTransactionForDeveloperResponseData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
91
|
+
|
|
91
92
|
})
|
|
92
93
|
return _obj
|
|
93
94
|
|
|
@@ -100,12 +100,13 @@ class CreateWalletRequest(BaseModel):
|
|
|
100
100
|
|
|
101
101
|
_obj = CreateWalletRequest.parse_obj({
|
|
102
102
|
"idempotency_key": obj.get("idempotencyKey"),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
"account_type": obj.get("accountType"),
|
|
104
|
+
"blockchains": obj.get("blockchains"),
|
|
105
|
+
"count": obj.get("count"),
|
|
106
|
+
"entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
|
|
107
|
+
"metadata": [WalletMetadata.from_dict(_item) for _item in obj.get("metadata")] if obj.get("metadata") is not None else None,
|
|
108
|
+
"wallet_set_id": obj.get("walletSetId")
|
|
109
|
+
|
|
109
110
|
})
|
|
110
111
|
return _obj
|
|
111
112
|
|
|
@@ -86,8 +86,9 @@ class CreateWalletSetRequest(BaseModel):
|
|
|
86
86
|
|
|
87
87
|
_obj = CreateWalletSetRequest.parse_obj({
|
|
88
88
|
"entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
|
|
89
|
-
|
|
90
|
-
|
|
89
|
+
"idempotency_key": obj.get("idempotencyKey"),
|
|
90
|
+
"name": obj.get("name")
|
|
91
|
+
|
|
91
92
|
})
|
|
92
93
|
return _obj
|
|
93
94
|
|
circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer.py
CHANGED
|
@@ -88,6 +88,7 @@ class CreateWalletUpgradeTransactionForDeveloper(BaseModel):
|
|
|
88
88
|
|
|
89
89
|
_obj = CreateWalletUpgradeTransactionForDeveloper.parse_obj({
|
|
90
90
|
"data": CreateTransferTransactionForDeveloperResponseData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
91
|
+
|
|
91
92
|
})
|
|
92
93
|
return _obj
|
|
93
94
|
|
|
@@ -37,7 +37,7 @@ class CreateWalletUpgradeTransactionForDeveloperRequest(BaseModel):
|
|
|
37
37
|
max_fee: Optional[StrictStr] = Field(None, alias="maxFee", description="For blockchains with EIP-1559 support, the maximum price per unit of gas (see `gasLimit`), in gwei. Requires `priorityFee`, and `gasLimit` to be present. Cannot be used with `feeLevel` or `gasPrice`. Estimates for this fee can be obtained through the [`POST /transactions/transfer/estimateFee`](/api-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) API. ")
|
|
38
38
|
priority_fee: Optional[StrictStr] = Field(None, alias="priorityFee", description="For blockchains with EIP-1559 support, the “tip”, in gwei, to add to the base fee as an incentive for validators. Please note that the `maxFee` and `gasLimit` parameters are required alongside the `priorityFee`. The `feeLevel` and `gasPrice` parameters cannot be used with the `priorityFee`. Estimations for this fee can be obtained through the [`POST /transactions/transfer/estimateFee`](/api-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) API. ")
|
|
39
39
|
ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Optional reference or description used to identify the transaction.")
|
|
40
|
-
wallet_id: StrictStr = Field(..., alias="walletId", description="Unique system generated identifier of the wallet.
|
|
40
|
+
wallet_id: StrictStr = Field(..., alias="walletId", description="Unique system generated identifier of the wallet. For contract deploys this wallet ID will be used as the source. ")
|
|
41
41
|
__properties = ["idempotencyKey", "newScaCore", "entitySecretCiphertext", "feeLevel", "gasLimit", "gasPrice", "maxFee", "priorityFee", "refId", "walletId"]
|
|
42
42
|
|
|
43
43
|
def __init__(self, **kwargs):
|
|
@@ -95,15 +95,16 @@ class CreateWalletUpgradeTransactionForDeveloperRequest(BaseModel):
|
|
|
95
95
|
|
|
96
96
|
_obj = CreateWalletUpgradeTransactionForDeveloperRequest.parse_obj({
|
|
97
97
|
"idempotency_key": obj.get("idempotencyKey"),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
98
|
+
"new_sca_core": obj.get("newScaCore"),
|
|
99
|
+
"entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
|
|
100
|
+
"fee_level": obj.get("feeLevel"),
|
|
101
|
+
"gas_limit": obj.get("gasLimit"),
|
|
102
|
+
"gas_price": obj.get("gasPrice"),
|
|
103
|
+
"max_fee": obj.get("maxFee"),
|
|
104
|
+
"priority_fee": obj.get("priorityFee"),
|
|
105
|
+
"ref_id": obj.get("refId"),
|
|
106
|
+
"wallet_id": obj.get("walletId")
|
|
107
|
+
|
|
107
108
|
})
|
|
108
109
|
return _obj
|
|
109
110
|
|
|
@@ -94,9 +94,10 @@ class DeveloperWalletSet(BaseModel):
|
|
|
94
94
|
|
|
95
95
|
_obj = DeveloperWalletSet.parse_obj({
|
|
96
96
|
"id": obj.get("id"),
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
97
|
+
"create_date": obj.get("createDate"),
|
|
98
|
+
"update_date": obj.get("updateDate"),
|
|
99
|
+
"custody_type": obj.get("custodyType")
|
|
100
|
+
|
|
100
101
|
})
|
|
101
102
|
return _obj
|
|
102
103
|
|
|
@@ -95,10 +95,11 @@ class EndUserWalletSet(BaseModel):
|
|
|
95
95
|
|
|
96
96
|
_obj = EndUserWalletSet.parse_obj({
|
|
97
97
|
"id": obj.get("id"),
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
98
|
+
"create_date": obj.get("createDate"),
|
|
99
|
+
"update_date": obj.get("updateDate"),
|
|
100
|
+
"custody_type": obj.get("custodyType"),
|
|
101
|
+
"user_id": obj.get("userId")
|
|
102
|
+
|
|
102
103
|
})
|
|
103
104
|
return _obj
|
|
104
105
|
|
|
@@ -106,18 +106,19 @@ class EOAWallet(BaseModel):
|
|
|
106
106
|
|
|
107
107
|
_obj = EOAWallet.parse_obj({
|
|
108
108
|
"id": obj.get("id"),
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
109
|
+
"address": obj.get("address"),
|
|
110
|
+
"blockchain": obj.get("blockchain"),
|
|
111
|
+
"create_date": obj.get("createDate"),
|
|
112
|
+
"update_date": obj.get("updateDate"),
|
|
113
|
+
"custody_type": obj.get("custodyType"),
|
|
114
|
+
"name": obj.get("name"),
|
|
115
|
+
"ref_id": obj.get("refId"),
|
|
116
|
+
"state": obj.get("state"),
|
|
117
|
+
"user_id": obj.get("userId"),
|
|
118
|
+
"wallet_set_id": obj.get("walletSetId"),
|
|
119
|
+
"initial_public_key": obj.get("initialPublicKey"),
|
|
120
|
+
"account_type": obj.get("accountType")
|
|
121
|
+
|
|
121
122
|
})
|
|
122
123
|
return _obj
|
|
123
124
|
|
|
@@ -115,19 +115,20 @@ class EOAWalletWithBalances(BaseModel):
|
|
|
115
115
|
|
|
116
116
|
_obj = EOAWalletWithBalances.parse_obj({
|
|
117
117
|
"id": obj.get("id"),
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
118
|
+
"address": obj.get("address"),
|
|
119
|
+
"blockchain": obj.get("blockchain"),
|
|
120
|
+
"create_date": obj.get("createDate"),
|
|
121
|
+
"update_date": obj.get("updateDate"),
|
|
122
|
+
"custody_type": obj.get("custodyType"),
|
|
123
|
+
"name": obj.get("name"),
|
|
124
|
+
"ref_id": obj.get("refId"),
|
|
125
|
+
"state": obj.get("state"),
|
|
126
|
+
"user_id": obj.get("userId"),
|
|
127
|
+
"wallet_set_id": obj.get("walletSetId"),
|
|
128
|
+
"initial_public_key": obj.get("initialPublicKey"),
|
|
129
|
+
"account_type": obj.get("accountType"),
|
|
130
|
+
"token_balances": [Balance.from_dict(_item) for _item in obj.get("tokenBalances")] if obj.get("tokenBalances") is not None else None
|
|
131
|
+
|
|
131
132
|
})
|
|
132
133
|
return _obj
|
|
133
134
|
|
|
@@ -35,7 +35,7 @@ class EstimateContractExecutionTransactionFeeRequest(BaseModel):
|
|
|
35
35
|
blockchain: Optional[ContractExecutionBlockchain] = None
|
|
36
36
|
contract_address: StrictStr = Field(..., alias="contractAddress", description="The blockchain address of the contract to be executed.")
|
|
37
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. ")
|
|
38
|
-
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. ")
|
|
39
39
|
__properties = ["abiFunctionSignature", "abiParameters", "callData", "amount", "blockchain", "contractAddress", "sourceAddress", "walletId"]
|
|
40
40
|
|
|
41
41
|
def __init__(self, **kwargs):
|
|
@@ -100,13 +100,14 @@ class EstimateContractExecutionTransactionFeeRequest(BaseModel):
|
|
|
100
100
|
|
|
101
101
|
_obj = EstimateContractExecutionTransactionFeeRequest.parse_obj({
|
|
102
102
|
"abi_function_signature": obj.get("abiFunctionSignature"),
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
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
|
+
|
|
110
111
|
})
|
|
111
112
|
return _obj
|
|
112
113
|
|
|
@@ -99,11 +99,12 @@ class EstimateTransactionFeeData(BaseModel):
|
|
|
99
99
|
|
|
100
100
|
_obj = EstimateTransactionFeeData.parse_obj({
|
|
101
101
|
"high": TransactionFee.from_dict(obj.get("high")) if obj.get("high") is not None else None,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
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
|
+
|
|
107
108
|
})
|
|
108
109
|
return _obj
|
|
109
110
|
|
circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py
CHANGED
|
@@ -34,7 +34,7 @@ class EstimateTransferTransactionFeeRequest(BaseModel):
|
|
|
34
34
|
token_id: Optional[StrictStr] = Field(None, alias="tokenId", description="System generated identifier of the token. Excluded with `tokenAddress` and `tokenBlockchain`.")
|
|
35
35
|
token_address: Optional[StrictStr] = Field(None, alias="tokenAddress", description="Blockchain address of the transferred token. Empty for native tokens. Excluded with `tokenId`.")
|
|
36
36
|
blockchain: Optional[TokenBlockchain] = None
|
|
37
|
-
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. ")
|
|
38
38
|
__properties = ["amounts", "destinationAddress", "nftTokenIds", "sourceAddress", "tokenId", "tokenAddress", "blockchain", "walletId"]
|
|
39
39
|
|
|
40
40
|
def __init__(self, **kwargs):
|
|
@@ -92,13 +92,14 @@ class EstimateTransferTransactionFeeRequest(BaseModel):
|
|
|
92
92
|
|
|
93
93
|
_obj = EstimateTransferTransactionFeeRequest.parse_obj({
|
|
94
94
|
"amounts": obj.get("amounts"),
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
+
|
|
102
103
|
})
|
|
103
104
|
return _obj
|
|
104
105
|
|
|
@@ -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
|
+
|