circle-developer-controlled-wallets 6.3.0__py3-none-any.whl → 8.0.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 +3 -1
- circle/web3/developer_controlled_wallets/api/signing_api.py +6 -6
- circle/web3/developer_controlled_wallets/api/transactions_api.py +4 -4
- circle/web3/developer_controlled_wallets/api/wallets_api.py +4 -4
- circle/web3/developer_controlled_wallets/api_client.py +1 -1
- circle/web3/developer_controlled_wallets/configuration.py +1 -1
- circle/web3/developer_controlled_wallets/models/__init__.py +2 -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/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/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 +1 -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 +32 -17
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py +35 -20
- 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 +20 -12
- 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 +22 -14
- circle/web3/developer_controlled_wallets/models/eoa_wallet_with_balances.py +23 -15
- 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/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 +23 -15
- circle/web3/developer_controlled_wallets/models/sca_wallet_with_balances.py +24 -16
- 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 +23 -8
- circle/web3/developer_controlled_wallets/models/sign_transaction_request.py +23 -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 +22 -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_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/token_response_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/transaction.py +40 -32
- circle/web3/developer_controlled_wallets/models/transaction_fee.py +20 -8
- 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 +52 -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.3.0.dist-info → circle_developer_controlled_wallets-8.0.0.dist-info}/METADATA +3 -4
- {circle_developer_controlled_wallets-6.3.0.dist-info → circle_developer_controlled_wallets-8.0.0.dist-info}/RECORD +92 -90
- {circle_developer_controlled_wallets-6.3.0.dist-info → circle_developer_controlled_wallets-8.0.0.dist-info}/WHEEL +0 -0
- {circle_developer_controlled_wallets-6.3.0.dist-info → circle_developer_controlled_wallets-8.0.0.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
|
|
@@ -44,8 +49,10 @@ class CreateContractExecutionTransactionForDeveloper(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) -> CreateContractExecutionTransactionForDeveloper:
|
|
@@ -81,6 +88,7 @@ class CreateContractExecutionTransactionForDeveloper(BaseModel):
|
|
|
81
88
|
|
|
82
89
|
_obj = CreateContractExecutionTransactionForDeveloper.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,10 +13,16 @@ 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, conlist
|
|
19
24
|
from circle.web3.developer_controlled_wallets.models.abi_parameters_inner import AbiParametersInner
|
|
25
|
+
from circle.web3.developer_controlled_wallets.models.contract_execution_blockchain import ContractExecutionBlockchain
|
|
20
26
|
from circle.web3.developer_controlled_wallets.models.fee_level import FeeLevel
|
|
21
27
|
|
|
22
28
|
class CreateContractExecutionTransactionForDeveloperRequest(BaseModel):
|
|
@@ -36,8 +42,10 @@ class CreateContractExecutionTransactionForDeveloperRequest(BaseModel):
|
|
|
36
42
|
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. ")
|
|
37
43
|
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. ")
|
|
38
44
|
ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Optional reference or description used to identify the transaction.")
|
|
39
|
-
wallet_id: StrictStr = Field(
|
|
40
|
-
|
|
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
|
+
blockchain: Optional[ContractExecutionBlockchain] = None
|
|
47
|
+
wallet_address: Optional[StrictStr] = Field(None, alias="walletAddress", description="Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects. ")
|
|
48
|
+
__properties = ["idempotencyKey", "abiFunctionSignature", "abiParameters", "callData", "amount", "contractAddress", "entitySecretCiphertext", "feeLevel", "gasLimit", "gasPrice", "maxFee", "priorityFee", "refId", "walletId", "blockchain", "walletAddress"]
|
|
41
49
|
|
|
42
50
|
def __init__(self, **kwargs):
|
|
43
51
|
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
@@ -58,8 +66,10 @@ class CreateContractExecutionTransactionForDeveloperRequest(BaseModel):
|
|
|
58
66
|
return pprint.pformat(self.dict(by_alias=True))
|
|
59
67
|
|
|
60
68
|
def to_json(self) -> str:
|
|
61
|
-
"""
|
|
62
|
-
|
|
69
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
70
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
71
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
72
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
63
73
|
|
|
64
74
|
@classmethod
|
|
65
75
|
def from_json(cls, json_str: str) -> CreateContractExecutionTransactionForDeveloperRequest:
|
|
@@ -72,6 +82,7 @@ class CreateContractExecutionTransactionForDeveloperRequest(BaseModel):
|
|
|
72
82
|
exclude={
|
|
73
83
|
},
|
|
74
84
|
exclude_none=True)
|
|
85
|
+
# Handle anyOf models where allVars is empty - use vars instead
|
|
75
86
|
# override the default output from pydantic by calling `to_dict()` of each item in abi_parameters (list)
|
|
76
87
|
_items = []
|
|
77
88
|
if self.abi_parameters:
|
|
@@ -98,20 +109,24 @@ class CreateContractExecutionTransactionForDeveloperRequest(BaseModel):
|
|
|
98
109
|
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
99
110
|
|
|
100
111
|
_obj = CreateContractExecutionTransactionForDeveloperRequest.parse_obj({
|
|
112
|
+
|
|
101
113
|
"idempotency_key": obj.get("idempotencyKey"),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
114
|
+
"abi_function_signature": obj.get("abiFunctionSignature"),
|
|
115
|
+
"abi_parameters": obj.get("abiParameters"),
|
|
116
|
+
"call_data": obj.get("callData"),
|
|
117
|
+
"amount": obj.get("amount"),
|
|
118
|
+
"contract_address": obj.get("contractAddress"),
|
|
119
|
+
"entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
|
|
120
|
+
"fee_level": obj.get("feeLevel"),
|
|
121
|
+
"gas_limit": obj.get("gasLimit"),
|
|
122
|
+
"gas_price": obj.get("gasPrice"),
|
|
123
|
+
"max_fee": obj.get("maxFee"),
|
|
124
|
+
"priority_fee": obj.get("priorityFee"),
|
|
125
|
+
"ref_id": obj.get("refId"),
|
|
126
|
+
"wallet_id": obj.get("walletId"),
|
|
127
|
+
"blockchain": obj.get("blockchain"),
|
|
128
|
+
"wallet_address": obj.get("walletAddress")
|
|
129
|
+
|
|
115
130
|
})
|
|
116
131
|
return _obj
|
|
117
132
|
|
circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py
CHANGED
|
@@ -13,11 +13,16 @@ 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, conlist
|
|
24
|
+
from circle.web3.developer_controlled_wallets.models.create_transfer_transaction_for_developer_request_blockchain import CreateTransferTransactionForDeveloperRequestBlockchain
|
|
19
25
|
from circle.web3.developer_controlled_wallets.models.fee_level import FeeLevel
|
|
20
|
-
from circle.web3.developer_controlled_wallets.models.token_blockchain import TokenBlockchain
|
|
21
26
|
|
|
22
27
|
class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
23
28
|
"""
|
|
@@ -36,9 +41,10 @@ class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
|
36
41
|
ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Optional reference or description used to identify the transaction.")
|
|
37
42
|
token_id: Optional[StrictStr] = Field(None, alias="tokenId", description="System generated identifier of the token. Excluded with `tokenAddress` and `tokenBlockchain`.")
|
|
38
43
|
token_address: Optional[StrictStr] = Field(None, alias="tokenAddress", description="Blockchain address of the transferred token. Empty for native tokens. Excluded with `tokenId`.")
|
|
39
|
-
blockchain: Optional[
|
|
40
|
-
wallet_id: StrictStr = Field(
|
|
41
|
-
|
|
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"]
|
|
42
48
|
|
|
43
49
|
def __init__(self, **kwargs):
|
|
44
50
|
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
@@ -59,8 +65,10 @@ class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
|
59
65
|
return pprint.pformat(self.dict(by_alias=True))
|
|
60
66
|
|
|
61
67
|
def to_json(self) -> str:
|
|
62
|
-
"""
|
|
63
|
-
|
|
68
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
69
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
70
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
71
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
64
72
|
|
|
65
73
|
@classmethod
|
|
66
74
|
def from_json(cls, json_str: str) -> CreateTransferTransactionForDeveloperRequest:
|
|
@@ -73,6 +81,10 @@ class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
|
73
81
|
exclude={
|
|
74
82
|
},
|
|
75
83
|
exclude_none=True)
|
|
84
|
+
# Handle anyOf models where allVars is empty - use vars instead
|
|
85
|
+
# override the default output from pydantic by calling `to_dict()` of blockchain
|
|
86
|
+
if self.blockchain:
|
|
87
|
+
_dict['blockchain'] = self.blockchain.to_dict()
|
|
76
88
|
return _dict
|
|
77
89
|
|
|
78
90
|
@classmethod
|
|
@@ -92,21 +104,24 @@ class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
|
92
104
|
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
93
105
|
|
|
94
106
|
_obj = CreateTransferTransactionForDeveloperRequest.parse_obj({
|
|
107
|
+
|
|
95
108
|
"idempotency_key": obj.get("idempotencyKey"),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
109
|
+
"amounts": obj.get("amounts"),
|
|
110
|
+
"destination_address": obj.get("destinationAddress"),
|
|
111
|
+
"entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
|
|
112
|
+
"fee_level": obj.get("feeLevel"),
|
|
113
|
+
"gas_limit": obj.get("gasLimit"),
|
|
114
|
+
"gas_price": obj.get("gasPrice"),
|
|
115
|
+
"max_fee": obj.get("maxFee"),
|
|
116
|
+
"priority_fee": obj.get("priorityFee"),
|
|
117
|
+
"nft_token_ids": obj.get("nftTokenIds"),
|
|
118
|
+
"ref_id": obj.get("refId"),
|
|
119
|
+
"token_id": obj.get("tokenId"),
|
|
120
|
+
"token_address": obj.get("tokenAddress"),
|
|
121
|
+
"blockchain": obj.get("blockchain"),
|
|
122
|
+
"wallet_id": obj.get("walletId"),
|
|
123
|
+
"wallet_address": obj.get("walletAddress")
|
|
124
|
+
|
|
110
125
|
})
|
|
111
126
|
return _obj
|
|
112
127
|
|
|
@@ -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
|
|
@@ -32,7 +37,7 @@ class CreateWalletUpgradeTransactionForDeveloperRequest(BaseModel):
|
|
|
32
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. ")
|
|
33
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
|
|