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
|
@@ -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
|
+
|
|
@@ -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
|
|
@@ -44,8 +49,10 @@ class CreateTransferTransactionForDeveloperResponse(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) -> CreateTransferTransactionForDeveloperResponse:
|
|
@@ -81,6 +88,7 @@ class CreateTransferTransactionForDeveloperResponse(BaseModel):
|
|
|
81
88
|
|
|
82
89
|
_obj = CreateTransferTransactionForDeveloperResponse.parse_obj({
|
|
83
90
|
"data": CreateTransferTransactionForDeveloperResponseData.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
|
|
|
18
23
|
from pydantic import BaseModel, Field, StrictStr
|
|
@@ -45,8 +50,10 @@ class CreateTransferTransactionForDeveloperResponseData(BaseModel):
|
|
|
45
50
|
return pprint.pformat(self.dict(by_alias=True))
|
|
46
51
|
|
|
47
52
|
def to_json(self) -> str:
|
|
48
|
-
"""
|
|
49
|
-
|
|
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)
|
|
50
57
|
|
|
51
58
|
@classmethod
|
|
52
59
|
def from_json(cls, json_str: str) -> CreateTransferTransactionForDeveloperResponseData:
|
|
@@ -79,7 +86,8 @@ class CreateTransferTransactionForDeveloperResponseData(BaseModel):
|
|
|
79
86
|
|
|
80
87
|
_obj = CreateTransferTransactionForDeveloperResponseData.parse_obj({
|
|
81
88
|
"id": obj.get("id"),
|
|
82
|
-
|
|
89
|
+
"state": obj.get("state")
|
|
90
|
+
|
|
83
91
|
})
|
|
84
92
|
return _obj
|
|
85
93
|
|
|
@@ -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, Union
|
|
18
23
|
from pydantic import BaseModel, Field, StrictBytes, StrictStr, conint, conlist
|
|
@@ -52,8 +57,10 @@ class CreateWalletRequest(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) -> CreateWalletRequest:
|
|
@@ -93,12 +100,13 @@ class CreateWalletRequest(BaseModel):
|
|
|
93
100
|
|
|
94
101
|
_obj = CreateWalletRequest.parse_obj({
|
|
95
102
|
"idempotency_key": obj.get("idempotencyKey"),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
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
|
+
|
|
102
110
|
})
|
|
103
111
|
return _obj
|
|
104
112
|
|
|
@@ -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, Union
|
|
18
23
|
from pydantic import BaseModel, Field, StrictBytes, StrictStr
|
|
@@ -45,8 +50,10 @@ class CreateWalletSetRequest(BaseModel):
|
|
|
45
50
|
return pprint.pformat(self.dict(by_alias=True))
|
|
46
51
|
|
|
47
52
|
def to_json(self) -> str:
|
|
48
|
-
"""
|
|
49
|
-
|
|
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)
|
|
50
57
|
|
|
51
58
|
@classmethod
|
|
52
59
|
def from_json(cls, json_str: str) -> CreateWalletSetRequest:
|
|
@@ -79,8 +86,9 @@ class CreateWalletSetRequest(BaseModel):
|
|
|
79
86
|
|
|
80
87
|
_obj = CreateWalletSetRequest.parse_obj({
|
|
81
88
|
"entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
|
|
82
|
-
|
|
83
|
-
|
|
89
|
+
"idempotency_key": obj.get("idempotencyKey"),
|
|
90
|
+
"name": obj.get("name")
|
|
91
|
+
|
|
84
92
|
})
|
|
85
93
|
return _obj
|
|
86
94
|
|
circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer.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
|
|
|
18
23
|
from pydantic import BaseModel, Field
|
|
@@ -44,8 +49,10 @@ class CreateWalletUpgradeTransactionForDeveloper(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) -> CreateWalletUpgradeTransactionForDeveloper:
|
|
@@ -81,6 +88,7 @@ class CreateWalletUpgradeTransactionForDeveloper(BaseModel):
|
|
|
81
88
|
|
|
82
89
|
_obj = CreateWalletUpgradeTransactionForDeveloper.parse_obj({
|
|
83
90
|
"data": CreateTransferTransactionForDeveloperResponseData.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, Union
|
|
18
23
|
from pydantic import BaseModel, Field, StrictBytes, StrictStr
|
|
@@ -27,12 +32,12 @@ class CreateWalletUpgradeTransactionForDeveloperRequest(BaseModel):
|
|
|
27
32
|
new_sca_core: NewScaCore = Field(..., alias="newScaCore")
|
|
28
33
|
entity_secret_ciphertext: Union[StrictBytes, StrictStr] = Field(..., alias="entitySecretCiphertext", description="A base64 string expression of the entity secret ciphertext. The entity secret should be encrypted by the entity public key. Circle mandates that the entity secret ciphertext is unique for each API request. ")
|
|
29
34
|
fee_level: Optional[FeeLevel] = Field(None, alias="feeLevel")
|
|
30
|
-
gas_limit: Optional[StrictStr] = Field(None, alias="gasLimit", description="The maximum units of gas to use for the transaction. Required if `feeLevel` is not provided. Estimates for this limit can be obtained through the `POST /transactions/transfer/estimateFee` API. GasLimit override (only supported for EOA wallets): Using `gasLimit` together with `feeLevel`, the provided `gasLimit` is required to be greater or equal to `feeLevel` estimation and will override the estimation's gasLimit. ")
|
|
31
|
-
gas_price: Optional[StrictStr] = Field(None, alias="gasPrice", description="For blockchains without EIP-1559 support, the maximum price of gas, in gwei, to use per each unit of gas (see `gasLimit`). Requires `gasLimit`. Cannot be used with `feeLevel`, `priorityFee`, or `maxFee`. Estimates for this fee can be obtained through the `POST /transactions/transfer/estimateFee` API. ")
|
|
32
|
-
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. ")
|
|
33
|
-
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. ")
|
|
35
|
+
gas_limit: Optional[StrictStr] = Field(None, alias="gasLimit", description="The maximum units of gas to use for the transaction. Required if `feeLevel` is not provided. Estimates for this limit can be obtained through the [`POST /transactions/transfer/estimateFee`](/api-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) API. GasLimit override (only supported for EOA wallets): Using `gasLimit` together with `feeLevel`, the provided `gasLimit` is required to be greater or equal to `feeLevel` estimation and will override the estimation's gasLimit. ")
|
|
36
|
+
gas_price: Optional[StrictStr] = Field(None, alias="gasPrice", description="For blockchains without EIP-1559 support, the maximum price of gas, in gwei, to use per each unit of gas (see `gasLimit`). Requires `gasLimit`. Cannot be used with `feeLevel`, `priorityFee`, or `maxFee`. Estimates for this fee can be obtained through the [`POST /transactions/transfer/estimateFee`](/api-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) API. ")
|
|
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
|
+
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. ")
|
|
34
39
|
ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Optional reference or description used to identify the transaction.")
|
|
35
|
-
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. ")
|
|
36
41
|
__properties = ["idempotencyKey", "newScaCore", "entitySecretCiphertext", "feeLevel", "gasLimit", "gasPrice", "maxFee", "priorityFee", "refId", "walletId"]
|
|
37
42
|
|
|
38
43
|
def __init__(self, **kwargs):
|
|
@@ -54,8 +59,10 @@ class CreateWalletUpgradeTransactionForDeveloperRequest(BaseModel):
|
|
|
54
59
|
return pprint.pformat(self.dict(by_alias=True))
|
|
55
60
|
|
|
56
61
|
def to_json(self) -> str:
|
|
57
|
-
"""
|
|
58
|
-
|
|
62
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
63
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
64
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
65
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
59
66
|
|
|
60
67
|
@classmethod
|
|
61
68
|
def from_json(cls, json_str: str) -> CreateWalletUpgradeTransactionForDeveloperRequest:
|
|
@@ -88,15 +95,16 @@ class CreateWalletUpgradeTransactionForDeveloperRequest(BaseModel):
|
|
|
88
95
|
|
|
89
96
|
_obj = CreateWalletUpgradeTransactionForDeveloperRequest.parse_obj({
|
|
90
97
|
"idempotency_key": obj.get("idempotencyKey"),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
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
|
+
|
|
100
108
|
})
|
|
101
109
|
return _obj
|
|
102
110
|
|
|
@@ -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
|
|
@@ -44,8 +49,10 @@ class DeriveWalletRequest(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) -> DeriveWalletRequest:
|
|
@@ -81,6 +88,7 @@ class DeriveWalletRequest(BaseModel):
|
|
|
81
88
|
|
|
82
89
|
_obj = DeriveWalletRequest.parse_obj({
|
|
83
90
|
"metadata": WalletMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") 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
|
from datetime import datetime
|
|
17
22
|
|
|
18
23
|
from pydantic import BaseModel, Field, StrictStr, validator
|
|
@@ -53,8 +58,10 @@ class DeveloperWalletSet(BaseModel):
|
|
|
53
58
|
return pprint.pformat(self.dict(by_alias=True))
|
|
54
59
|
|
|
55
60
|
def to_json(self) -> str:
|
|
56
|
-
"""
|
|
57
|
-
|
|
61
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
62
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
63
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
64
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
58
65
|
|
|
59
66
|
@classmethod
|
|
60
67
|
def from_json(cls, json_str: str) -> DeveloperWalletSet:
|
|
@@ -87,9 +94,10 @@ class DeveloperWalletSet(BaseModel):
|
|
|
87
94
|
|
|
88
95
|
_obj = DeveloperWalletSet.parse_obj({
|
|
89
96
|
"id": obj.get("id"),
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
97
|
+
"create_date": obj.get("createDate"),
|
|
98
|
+
"update_date": obj.get("updateDate"),
|
|
99
|
+
"custody_type": obj.get("custodyType")
|
|
100
|
+
|
|
93
101
|
})
|
|
94
102
|
return _obj
|
|
95
103
|
|
|
@@ -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
|
|
|
18
23
|
from pydantic import BaseModel, Field, StrictStr, constr, validator
|
|
@@ -54,8 +59,10 @@ class EndUserWalletSet(BaseModel):
|
|
|
54
59
|
return pprint.pformat(self.dict(by_alias=True))
|
|
55
60
|
|
|
56
61
|
def to_json(self) -> str:
|
|
57
|
-
"""
|
|
58
|
-
|
|
62
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
63
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
64
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
65
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
59
66
|
|
|
60
67
|
@classmethod
|
|
61
68
|
def from_json(cls, json_str: str) -> EndUserWalletSet:
|
|
@@ -88,10 +95,11 @@ class EndUserWalletSet(BaseModel):
|
|
|
88
95
|
|
|
89
96
|
_obj = EndUserWalletSet.parse_obj({
|
|
90
97
|
"id": obj.get("id"),
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
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
|
+
|
|
95
103
|
})
|
|
96
104
|
return _obj
|
|
97
105
|
|
|
@@ -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, constr, validator
|
|
@@ -36,7 +41,7 @@ class EOAWallet(BaseModel):
|
|
|
36
41
|
user_id: Optional[constr(strict=True, max_length=50, min_length=5)] = Field(None, alias="userId", description="Unique system generated identifier for the user.")
|
|
37
42
|
wallet_set_id: StrictStr = Field(..., alias="walletSetId", description="System-generated unique identifier of the resource.")
|
|
38
43
|
initial_public_key: Optional[StrictStr] = Field(None, alias="initialPublicKey", description="For NEAR blockchains only, the originally assigned public key of a wallet at the time of its creation.")
|
|
39
|
-
account_type: StrictStr = Field(..., alias="accountType", description="An account can be a Smart Contract Account (SCA) or an Externally Owned Account (EOA). To learn more, see the [account types guide](https://developers.circle.com/w3s/docs/programmable-wallets-account-types). If an account type is not specified during the creation of a wallet, it defaults to `EOA` (Externally Owned Account). Note that Solana
|
|
44
|
+
account_type: StrictStr = Field(..., alias="accountType", description="An account can be a Smart Contract Account (SCA) or an Externally Owned Account (EOA). To learn more, see the [account types guide](https://developers.circle.com/w3s/docs/programmable-wallets-account-types). If an account type is not specified during the creation of a wallet, it defaults to `EOA` (Externally Owned Account). Note that Solana and Aptos don't support Smart Contract Account (SCA). ")
|
|
40
45
|
__properties = ["id", "address", "blockchain", "createDate", "updateDate", "custodyType", "name", "refId", "state", "userId", "walletSetId", "initialPublicKey", "accountType"]
|
|
41
46
|
|
|
42
47
|
def __init__(self, **kwargs):
|
|
@@ -65,8 +70,10 @@ class EOAWallet(BaseModel):
|
|
|
65
70
|
return pprint.pformat(self.dict(by_alias=True))
|
|
66
71
|
|
|
67
72
|
def to_json(self) -> str:
|
|
68
|
-
"""
|
|
69
|
-
|
|
73
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
74
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
75
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
76
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
70
77
|
|
|
71
78
|
@classmethod
|
|
72
79
|
def from_json(cls, json_str: str) -> EOAWallet:
|
|
@@ -99,18 +106,19 @@ class EOAWallet(BaseModel):
|
|
|
99
106
|
|
|
100
107
|
_obj = EOAWallet.parse_obj({
|
|
101
108
|
"id": obj.get("id"),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
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
|
+
|
|
114
122
|
})
|
|
115
123
|
return _obj
|
|
116
124
|
|
|
@@ -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 List, Optional
|
|
18
23
|
from pydantic import BaseModel, Field, StrictStr, conlist, constr, validator
|
|
@@ -37,7 +42,7 @@ class EOAWalletWithBalances(BaseModel):
|
|
|
37
42
|
user_id: Optional[constr(strict=True, max_length=50, min_length=5)] = Field(None, alias="userId", description="Unique system generated identifier for the user.")
|
|
38
43
|
wallet_set_id: StrictStr = Field(..., alias="walletSetId", description="System-generated unique identifier of the resource.")
|
|
39
44
|
initial_public_key: Optional[StrictStr] = Field(None, alias="initialPublicKey", description="For NEAR blockchains only, the originally assigned public key of a wallet at the time of its creation.")
|
|
40
|
-
account_type: StrictStr = Field(..., alias="accountType", description="An account can be a Smart Contract Account (SCA) or an Externally Owned Account (EOA). To learn more, see the [account types guide](https://developers.circle.com/w3s/docs/programmable-wallets-account-types). If an account type is not specified during the creation of a wallet, it defaults to `EOA` (Externally Owned Account). Note that Solana
|
|
45
|
+
account_type: StrictStr = Field(..., alias="accountType", description="An account can be a Smart Contract Account (SCA) or an Externally Owned Account (EOA). To learn more, see the [account types guide](https://developers.circle.com/w3s/docs/programmable-wallets-account-types). If an account type is not specified during the creation of a wallet, it defaults to `EOA` (Externally Owned Account). Note that Solana and Aptos don't support Smart Contract Account (SCA). ")
|
|
41
46
|
token_balances: conlist(Balance) = Field(..., alias="tokenBalances", description="Lists native token balances and, if specified, USDC/EURC balances for the wallets.")
|
|
42
47
|
__properties = ["id", "address", "blockchain", "createDate", "updateDate", "custodyType", "name", "refId", "state", "userId", "walletSetId", "initialPublicKey", "accountType", "tokenBalances"]
|
|
43
48
|
|
|
@@ -67,8 +72,10 @@ class EOAWalletWithBalances(BaseModel):
|
|
|
67
72
|
return pprint.pformat(self.dict(by_alias=True))
|
|
68
73
|
|
|
69
74
|
def to_json(self) -> str:
|
|
70
|
-
"""
|
|
71
|
-
|
|
75
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
76
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
77
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
78
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
72
79
|
|
|
73
80
|
@classmethod
|
|
74
81
|
def from_json(cls, json_str: str) -> EOAWalletWithBalances:
|
|
@@ -108,19 +115,20 @@ class EOAWalletWithBalances(BaseModel):
|
|
|
108
115
|
|
|
109
116
|
_obj = EOAWalletWithBalances.parse_obj({
|
|
110
117
|
"id": obj.get("id"),
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
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
|
+
|
|
124
132
|
})
|
|
125
133
|
return _obj
|
|
126
134
|
|