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.
Files changed (100) hide show
  1. circle/web3/developer_controlled_wallets/__init__.py +6 -1
  2. circle/web3/developer_controlled_wallets/api/signing_api.py +65 -31
  3. circle/web3/developer_controlled_wallets/api/transactions_api.py +299 -58
  4. circle/web3/developer_controlled_wallets/api/wallet_sets_api.py +16 -8
  5. circle/web3/developer_controlled_wallets/api/wallets_api.py +62 -30
  6. circle/web3/developer_controlled_wallets/api_client.py +1 -1
  7. circle/web3/developer_controlled_wallets/configuration.py +9 -2
  8. circle/web3/developer_controlled_wallets/models/__init__.py +5 -0
  9. circle/web3/developer_controlled_wallets/models/abi_parameters_inner.py +5 -5
  10. circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer.py +10 -2
  11. circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_data.py +10 -2
  12. circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_request.py +11 -3
  13. circle/web3/developer_controlled_wallets/models/account_type.py +1 -1
  14. circle/web3/developer_controlled_wallets/models/bad_request_response.py +11 -3
  15. circle/web3/developer_controlled_wallets/models/balance.py +12 -4
  16. circle/web3/developer_controlled_wallets/models/balances.py +10 -2
  17. circle/web3/developer_controlled_wallets/models/balances_data.py +10 -2
  18. circle/web3/developer_controlled_wallets/models/base_screening_decision.py +12 -4
  19. circle/web3/developer_controlled_wallets/models/blockchain.py +3 -0
  20. circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer.py +10 -2
  21. circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer_request.py +11 -3
  22. circle/web3/developer_controlled_wallets/models/contract_execution_blockchain.py +2 -1
  23. circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer.py +10 -2
  24. circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer_request.py +34 -21
  25. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py +37 -24
  26. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request_blockchain.py +130 -0
  27. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response.py +10 -2
  28. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response_data.py +11 -3
  29. circle/web3/developer_controlled_wallets/models/create_wallet_request.py +16 -8
  30. circle/web3/developer_controlled_wallets/models/create_wallet_set_request.py +12 -4
  31. circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer.py +10 -2
  32. circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer_request.py +24 -16
  33. circle/web3/developer_controlled_wallets/models/derive_wallet_request.py +10 -2
  34. circle/web3/developer_controlled_wallets/models/developer_wallet_set.py +13 -5
  35. circle/web3/developer_controlled_wallets/models/end_user_wallet_set.py +14 -6
  36. circle/web3/developer_controlled_wallets/models/eoa_wallet.py +23 -15
  37. circle/web3/developer_controlled_wallets/models/eoa_wallet_with_balances.py +24 -16
  38. circle/web3/developer_controlled_wallets/models/error.py +11 -3
  39. circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request.py +18 -10
  40. circle/web3/developer_controlled_wallets/models/estimate_transaction_fee.py +10 -2
  41. circle/web3/developer_controlled_wallets/models/estimate_transaction_fee_data.py +15 -7
  42. circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py +18 -10
  43. circle/web3/developer_controlled_wallets/models/evm_blockchain.py +2 -0
  44. circle/web3/developer_controlled_wallets/models/fee_level.py +1 -1
  45. circle/web3/developer_controlled_wallets/models/get_lowest_nonce_transaction_response.py +95 -0
  46. circle/web3/developer_controlled_wallets/models/get_lowest_nonce_transaction_response_data.py +101 -0
  47. circle/web3/developer_controlled_wallets/models/lowest_nonce_transaction_fee_info.py +97 -0
  48. circle/web3/developer_controlled_wallets/models/nft.py +14 -6
  49. circle/web3/developer_controlled_wallets/models/nfts.py +10 -2
  50. circle/web3/developer_controlled_wallets/models/nfts_data.py +10 -2
  51. circle/web3/developer_controlled_wallets/models/not_authorized_response.py +11 -3
  52. circle/web3/developer_controlled_wallets/models/not_found_response.py +11 -3
  53. circle/web3/developer_controlled_wallets/models/risk_signal.py +14 -6
  54. circle/web3/developer_controlled_wallets/models/sca_wallet.py +24 -16
  55. circle/web3/developer_controlled_wallets/models/sca_wallet_with_balances.py +25 -17
  56. circle/web3/developer_controlled_wallets/models/sign_delegate_action_request.py +12 -4
  57. circle/web3/developer_controlled_wallets/models/sign_delegate_action_response.py +10 -2
  58. circle/web3/developer_controlled_wallets/models/sign_delegate_action_response_data.py +11 -3
  59. circle/web3/developer_controlled_wallets/models/sign_message_request.py +21 -8
  60. circle/web3/developer_controlled_wallets/models/sign_transaction_request.py +21 -8
  61. circle/web3/developer_controlled_wallets/models/sign_transaction_response.py +10 -2
  62. circle/web3/developer_controlled_wallets/models/sign_transaction_response_data.py +12 -4
  63. circle/web3/developer_controlled_wallets/models/sign_typed_data_request.py +20 -7
  64. circle/web3/developer_controlled_wallets/models/signature_response.py +10 -2
  65. circle/web3/developer_controlled_wallets/models/signature_response_data.py +10 -2
  66. circle/web3/developer_controlled_wallets/models/token.py +19 -11
  67. circle/web3/developer_controlled_wallets/models/token_blockchain.py +3 -0
  68. circle/web3/developer_controlled_wallets/models/token_response.py +10 -2
  69. circle/web3/developer_controlled_wallets/models/token_response_data.py +10 -2
  70. circle/web3/developer_controlled_wallets/models/transaction.py +41 -33
  71. circle/web3/developer_controlled_wallets/models/transaction_fee.py +24 -12
  72. circle/web3/developer_controlled_wallets/models/transaction_response.py +10 -2
  73. circle/web3/developer_controlled_wallets/models/transaction_response_data.py +10 -2
  74. circle/web3/developer_controlled_wallets/models/transaction_screening_decision.py +13 -5
  75. circle/web3/developer_controlled_wallets/models/transaction_state.py +2 -1
  76. circle/web3/developer_controlled_wallets/models/transactions.py +10 -2
  77. circle/web3/developer_controlled_wallets/models/transactions_data.py +10 -2
  78. circle/web3/developer_controlled_wallets/models/transfer_blockchain.py +53 -0
  79. circle/web3/developer_controlled_wallets/models/update_wallet_request.py +11 -3
  80. circle/web3/developer_controlled_wallets/models/update_wallet_set_request.py +10 -2
  81. circle/web3/developer_controlled_wallets/models/validate_address.py +10 -2
  82. circle/web3/developer_controlled_wallets/models/validate_address_data.py +10 -2
  83. circle/web3/developer_controlled_wallets/models/validate_address_request.py +11 -3
  84. circle/web3/developer_controlled_wallets/models/wallet.py +21 -13
  85. circle/web3/developer_controlled_wallets/models/wallet_metadata.py +11 -3
  86. circle/web3/developer_controlled_wallets/models/wallet_response.py +10 -2
  87. circle/web3/developer_controlled_wallets/models/wallet_response_data.py +10 -2
  88. circle/web3/developer_controlled_wallets/models/wallet_set.py +12 -4
  89. circle/web3/developer_controlled_wallets/models/wallet_set_response.py +10 -2
  90. circle/web3/developer_controlled_wallets/models/wallet_set_response_data.py +10 -2
  91. circle/web3/developer_controlled_wallets/models/wallet_sets.py +10 -2
  92. circle/web3/developer_controlled_wallets/models/wallet_sets_data.py +10 -2
  93. circle/web3/developer_controlled_wallets/models/wallets.py +10 -2
  94. circle/web3/developer_controlled_wallets/models/wallets_data.py +10 -2
  95. circle/web3/developer_controlled_wallets/models/wallets_with_balances.py +10 -2
  96. circle/web3/developer_controlled_wallets/models/wallets_with_balances_data.py +10 -2
  97. {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/METADATA +4 -4
  98. {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/RECORD +100 -95
  99. {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/WHEEL +1 -1
  100. {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/top_level.txt +0 -0
@@ -13,6 +13,11 @@ import pprint
13
13
  import re # noqa: F401
14
14
  import json
15
15
 
16
+ # CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
17
+ # pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
18
+ # which are not handled by the default JSON encoder.
19
+ from pydantic.json import pydantic_encoder
20
+
16
21
 
17
22
 
18
23
  from pydantic import BaseModel, Field, StrictInt, StrictStr
@@ -44,8 +49,10 @@ class NotAuthorizedResponse(BaseModel):
44
49
  return pprint.pformat(self.dict(by_alias=True))
45
50
 
46
51
  def to_json(self) -> str:
47
- """Returns the JSON representation of the model using alias"""
48
- return json.dumps(self.to_dict())
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) -> NotAuthorizedResponse:
@@ -78,7 +85,8 @@ class NotAuthorizedResponse(BaseModel):
78
85
 
79
86
  _obj = NotAuthorizedResponse.parse_obj({
80
87
  "code": obj.get("code"),
81
- "message": obj.get("message")
88
+ "message": obj.get("message")
89
+
82
90
  })
83
91
  return _obj
84
92
 
@@ -13,6 +13,11 @@ import pprint
13
13
  import re # noqa: F401
14
14
  import json
15
15
 
16
+ # CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
17
+ # pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
18
+ # which are not handled by the default JSON encoder.
19
+ from pydantic.json import pydantic_encoder
20
+
16
21
 
17
22
 
18
23
  from pydantic import BaseModel, Field, StrictInt, StrictStr
@@ -44,8 +49,10 @@ class NotFoundResponse(BaseModel):
44
49
  return pprint.pformat(self.dict(by_alias=True))
45
50
 
46
51
  def to_json(self) -> str:
47
- """Returns the JSON representation of the model using alias"""
48
- return json.dumps(self.to_dict())
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) -> NotFoundResponse:
@@ -78,7 +85,8 @@ class NotFoundResponse(BaseModel):
78
85
 
79
86
  _obj = NotFoundResponse.parse_obj({
80
87
  "code": obj.get("code"),
81
- "message": obj.get("message")
88
+ "message": obj.get("message")
89
+
82
90
  })
83
91
  return _obj
84
92
 
@@ -13,6 +13,11 @@ import pprint
13
13
  import re # noqa: F401
14
14
  import json
15
15
 
16
+ # CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
17
+ # pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
18
+ # which are not handled by the default JSON encoder.
19
+ from pydantic.json import pydantic_encoder
20
+
16
21
 
17
22
  from typing import List
18
23
  from pydantic import BaseModel, Field, StrictStr, conlist, validator
@@ -57,8 +62,10 @@ class RiskSignal(BaseModel):
57
62
  return pprint.pformat(self.dict(by_alias=True))
58
63
 
59
64
  def to_json(self) -> str:
60
- """Returns the JSON representation of the model using alias"""
61
- return json.dumps(self.to_dict())
65
+ """Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
66
+ # CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
67
+ # This differs from the default OpenAPI Generator template which doesn't handle these types properly
68
+ return json.dumps(self.to_dict(), default=pydantic_encoder)
62
69
 
63
70
  @classmethod
64
71
  def from_json(cls, json_str: str) -> RiskSignal:
@@ -91,10 +98,11 @@ class RiskSignal(BaseModel):
91
98
 
92
99
  _obj = RiskSignal.parse_obj({
93
100
  "source": obj.get("source"),
94
- "source_value": obj.get("sourceValue"),
95
- "risk_score": obj.get("riskScore"),
96
- "risk_categories": obj.get("riskCategories"),
97
- "type": obj.get("type")
101
+ "source_value": obj.get("sourceValue"),
102
+ "risk_score": obj.get("riskScore"),
103
+ "risk_categories": obj.get("riskCategories"),
104
+ "type": obj.get("type")
105
+
98
106
  })
99
107
  return _obj
100
108
 
@@ -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
@@ -37,7 +42,7 @@ class SCAWallet(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 doesn't support Smart Contract Account (SCA). ")
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
  sca_core: ScaCore = Field(..., alias="scaCore")
42
47
  __properties = ["id", "address", "blockchain", "createDate", "updateDate", "custodyType", "name", "refId", "state", "userId", "walletSetId", "initialPublicKey", "accountType", "scaCore"]
43
48
 
@@ -67,8 +72,10 @@ class SCAWallet(BaseModel):
67
72
  return pprint.pformat(self.dict(by_alias=True))
68
73
 
69
74
  def to_json(self) -> str:
70
- """Returns the JSON representation of the model using alias"""
71
- return json.dumps(self.to_dict())
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) -> SCAWallet:
@@ -101,19 +108,20 @@ class SCAWallet(BaseModel):
101
108
 
102
109
  _obj = SCAWallet.parse_obj({
103
110
  "id": obj.get("id"),
104
- "address": obj.get("address"),
105
- "blockchain": obj.get("blockchain"),
106
- "create_date": obj.get("createDate"),
107
- "update_date": obj.get("updateDate"),
108
- "custody_type": obj.get("custodyType"),
109
- "name": obj.get("name"),
110
- "ref_id": obj.get("refId"),
111
- "state": obj.get("state"),
112
- "user_id": obj.get("userId"),
113
- "wallet_set_id": obj.get("walletSetId"),
114
- "initial_public_key": obj.get("initialPublicKey"),
115
- "account_type": obj.get("accountType"),
116
- "sca_core": obj.get("scaCore")
111
+ "address": obj.get("address"),
112
+ "blockchain": obj.get("blockchain"),
113
+ "create_date": obj.get("createDate"),
114
+ "update_date": obj.get("updateDate"),
115
+ "custody_type": obj.get("custodyType"),
116
+ "name": obj.get("name"),
117
+ "ref_id": obj.get("refId"),
118
+ "state": obj.get("state"),
119
+ "user_id": obj.get("userId"),
120
+ "wallet_set_id": obj.get("walletSetId"),
121
+ "initial_public_key": obj.get("initialPublicKey"),
122
+ "account_type": obj.get("accountType"),
123
+ "sca_core": obj.get("scaCore")
124
+
117
125
  })
118
126
  return _obj
119
127
 
@@ -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
@@ -38,7 +43,7 @@ class SCAWalletWithBalances(BaseModel):
38
43
  user_id: Optional[constr(strict=True, max_length=50, min_length=5)] = Field(None, alias="userId", description="Unique system generated identifier for the user.")
39
44
  wallet_set_id: StrictStr = Field(..., alias="walletSetId", description="System-generated unique identifier of the resource.")
40
45
  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.")
41
- 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 doesn't support Smart Contract Account (SCA). ")
46
+ 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). ")
42
47
  sca_core: ScaCore = Field(..., alias="scaCore")
43
48
  token_balances: conlist(Balance) = Field(..., alias="tokenBalances", description="Lists native token balances and, if specified, USDC/EURC balances for the wallets.")
44
49
  __properties = ["id", "address", "blockchain", "createDate", "updateDate", "custodyType", "name", "refId", "state", "userId", "walletSetId", "initialPublicKey", "accountType", "scaCore", "tokenBalances"]
@@ -69,8 +74,10 @@ class SCAWalletWithBalances(BaseModel):
69
74
  return pprint.pformat(self.dict(by_alias=True))
70
75
 
71
76
  def to_json(self) -> str:
72
- """Returns the JSON representation of the model using alias"""
73
- return json.dumps(self.to_dict())
77
+ """Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
78
+ # CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
79
+ # This differs from the default OpenAPI Generator template which doesn't handle these types properly
80
+ return json.dumps(self.to_dict(), default=pydantic_encoder)
74
81
 
75
82
  @classmethod
76
83
  def from_json(cls, json_str: str) -> SCAWalletWithBalances:
@@ -110,20 +117,21 @@ class SCAWalletWithBalances(BaseModel):
110
117
 
111
118
  _obj = SCAWalletWithBalances.parse_obj({
112
119
  "id": obj.get("id"),
113
- "address": obj.get("address"),
114
- "blockchain": obj.get("blockchain"),
115
- "create_date": obj.get("createDate"),
116
- "update_date": obj.get("updateDate"),
117
- "custody_type": obj.get("custodyType"),
118
- "name": obj.get("name"),
119
- "ref_id": obj.get("refId"),
120
- "state": obj.get("state"),
121
- "user_id": obj.get("userId"),
122
- "wallet_set_id": obj.get("walletSetId"),
123
- "initial_public_key": obj.get("initialPublicKey"),
124
- "account_type": obj.get("accountType"),
125
- "sca_core": obj.get("scaCore"),
126
- "token_balances": [Balance.from_dict(_item) for _item in obj.get("tokenBalances")] if obj.get("tokenBalances") is not None else None
120
+ "address": obj.get("address"),
121
+ "blockchain": obj.get("blockchain"),
122
+ "create_date": obj.get("createDate"),
123
+ "update_date": obj.get("updateDate"),
124
+ "custody_type": obj.get("custodyType"),
125
+ "name": obj.get("name"),
126
+ "ref_id": obj.get("refId"),
127
+ "state": obj.get("state"),
128
+ "user_id": obj.get("userId"),
129
+ "wallet_set_id": obj.get("walletSetId"),
130
+ "initial_public_key": obj.get("initialPublicKey"),
131
+ "account_type": obj.get("accountType"),
132
+ "sca_core": obj.get("scaCore"),
133
+ "token_balances": [Balance.from_dict(_item) for _item in obj.get("tokenBalances")] if obj.get("tokenBalances") is not None else None
134
+
127
135
  })
128
136
  return _obj
129
137
 
@@ -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 Union
18
23
  from pydantic import BaseModel, Field, StrictBytes, StrictStr
@@ -45,8 +50,10 @@ class SignDelegateActionRequest(BaseModel):
45
50
  return pprint.pformat(self.dict(by_alias=True))
46
51
 
47
52
  def to_json(self) -> str:
48
- """Returns the JSON representation of the model using alias"""
49
- return json.dumps(self.to_dict())
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) -> SignDelegateActionRequest:
@@ -79,8 +86,9 @@ class SignDelegateActionRequest(BaseModel):
79
86
 
80
87
  _obj = SignDelegateActionRequest.parse_obj({
81
88
  "wallet_id": obj.get("walletId"),
82
- "unsigned_delegate_action": obj.get("unsignedDelegateAction"),
83
- "entity_secret_ciphertext": obj.get("entitySecretCiphertext")
89
+ "unsigned_delegate_action": obj.get("unsignedDelegateAction"),
90
+ "entity_secret_ciphertext": obj.get("entitySecretCiphertext")
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
@@ -44,8 +49,10 @@ class SignDelegateActionResponse(BaseModel):
44
49
  return pprint.pformat(self.dict(by_alias=True))
45
50
 
46
51
  def to_json(self) -> str:
47
- """Returns the JSON representation of the model using alias"""
48
- return json.dumps(self.to_dict())
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) -> SignDelegateActionResponse:
@@ -81,6 +88,7 @@ class SignDelegateActionResponse(BaseModel):
81
88
 
82
89
  _obj = SignDelegateActionResponse.parse_obj({
83
90
  "data": SignDelegateActionResponseData.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
@@ -44,8 +49,10 @@ class SignDelegateActionResponseData(BaseModel):
44
49
  return pprint.pformat(self.dict(by_alias=True))
45
50
 
46
51
  def to_json(self) -> str:
47
- """Returns the JSON representation of the model using alias"""
48
- return json.dumps(self.to_dict())
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) -> SignDelegateActionResponseData:
@@ -78,7 +85,8 @@ class SignDelegateActionResponseData(BaseModel):
78
85
 
79
86
  _obj = SignDelegateActionResponseData.parse_obj({
80
87
  "signature": obj.get("signature"),
81
- "signed_delegate_action": obj.get("signedDelegateAction")
88
+ "signed_delegate_action": obj.get("signedDelegateAction")
89
+
82
90
  })
83
91
  return _obj
84
92
 
@@ -13,20 +13,28 @@ 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, StrictBool, StrictBytes, StrictStr
24
+ from circle.web3.developer_controlled_wallets.models.blockchain import Blockchain
19
25
 
20
26
  class SignMessageRequest(BaseModel):
21
27
  """
22
28
  SignMessageRequest
23
29
  """
24
- wallet_id: StrictStr = Field(..., alias="walletId", description="System-generated unique identifier of the resource.")
30
+ wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="System-generated unique identifier of the resource.")
25
31
  encoded_by_hex: Optional[StrictBool] = Field(None, alias="encodedByHex", description="Indicator of whether the input message is encoded by hex. If TRUE, then the message should be a hex string. By default, it is False.")
26
32
  message: StrictStr = Field(..., description="The user friendly message that needs to be signed. If it is a hex string, encodedByHex needs to be TRUE. The hex string should start with “0x” and have even length.")
27
33
  memo: Optional[StrictStr] = Field(None, description="The human readable explanation for this sign action. Useful for presenting with extra information.")
28
34
  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
- __properties = ["walletId", "encodedByHex", "message", "memo", "entitySecretCiphertext"]
35
+ blockchain: Optional[Blockchain] = None
36
+ wallet_address: Optional[StrictStr] = Field(None, alias="walletAddress", description="Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects. ")
37
+ __properties = ["walletId", "encodedByHex", "message", "memo", "entitySecretCiphertext", "blockchain", "walletAddress"]
30
38
 
31
39
  def __init__(self, **kwargs):
32
40
  if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
@@ -47,8 +55,10 @@ class SignMessageRequest(BaseModel):
47
55
  return pprint.pformat(self.dict(by_alias=True))
48
56
 
49
57
  def to_json(self) -> str:
50
- """Returns the JSON representation of the model using alias"""
51
- return json.dumps(self.to_dict())
58
+ """Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
59
+ # CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
60
+ # This differs from the default OpenAPI Generator template which doesn't handle these types properly
61
+ return json.dumps(self.to_dict(), default=pydantic_encoder)
52
62
 
53
63
  @classmethod
54
64
  def from_json(cls, json_str: str) -> SignMessageRequest:
@@ -81,10 +91,13 @@ class SignMessageRequest(BaseModel):
81
91
 
82
92
  _obj = SignMessageRequest.parse_obj({
83
93
  "wallet_id": obj.get("walletId"),
84
- "encoded_by_hex": obj.get("encodedByHex"),
85
- "message": obj.get("message"),
86
- "memo": obj.get("memo"),
87
- "entity_secret_ciphertext": obj.get("entitySecretCiphertext")
94
+ "encoded_by_hex": obj.get("encodedByHex"),
95
+ "message": obj.get("message"),
96
+ "memo": obj.get("memo"),
97
+ "entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
98
+ "blockchain": obj.get("blockchain"),
99
+ "wallet_address": obj.get("walletAddress")
100
+
88
101
  })
89
102
  return _obj
90
103
 
@@ -13,20 +13,28 @@ 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
24
+ from circle.web3.developer_controlled_wallets.models.blockchain import Blockchain
19
25
 
20
26
  class SignTransactionRequest(BaseModel):
21
27
  """
22
28
  SignTransactionRequest
23
29
  """
24
- wallet_id: StrictStr = Field(..., alias="walletId", description="System-generated unique identifier of the resource.")
30
+ wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="System-generated unique identifier of the resource.")
25
31
  raw_transaction: Optional[StrictStr] = Field(None, alias="rawTransaction", description="Raw transaction string that needs to be signed. Excluded with `transaction`. Required without `transaction`. Required to be base64 encoded for NEAR, Solana chains. Required to be hex encoded for EVM chains. ")
26
32
  transaction: Optional[StrictStr] = Field(None, description="Transaction object in JSON that needs to be signed. Excluded with `rawTransaction`. Required without `rawTransaction`. NOTE: This field is only supported by `EVM` chains. ")
27
33
  memo: Optional[StrictStr] = Field(None, description="The human readable explanation for this sign action. Useful for presenting with extra information.")
28
34
  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
- __properties = ["walletId", "rawTransaction", "transaction", "memo", "entitySecretCiphertext"]
35
+ blockchain: Optional[Blockchain] = None
36
+ wallet_address: Optional[StrictStr] = Field(None, alias="walletAddress", description="Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects. ")
37
+ __properties = ["walletId", "rawTransaction", "transaction", "memo", "entitySecretCiphertext", "blockchain", "walletAddress"]
30
38
 
31
39
  def __init__(self, **kwargs):
32
40
  if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
@@ -47,8 +55,10 @@ class SignTransactionRequest(BaseModel):
47
55
  return pprint.pformat(self.dict(by_alias=True))
48
56
 
49
57
  def to_json(self) -> str:
50
- """Returns the JSON representation of the model using alias"""
51
- return json.dumps(self.to_dict())
58
+ """Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
59
+ # CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
60
+ # This differs from the default OpenAPI Generator template which doesn't handle these types properly
61
+ return json.dumps(self.to_dict(), default=pydantic_encoder)
52
62
 
53
63
  @classmethod
54
64
  def from_json(cls, json_str: str) -> SignTransactionRequest:
@@ -81,10 +91,13 @@ class SignTransactionRequest(BaseModel):
81
91
 
82
92
  _obj = SignTransactionRequest.parse_obj({
83
93
  "wallet_id": obj.get("walletId"),
84
- "raw_transaction": obj.get("rawTransaction"),
85
- "transaction": obj.get("transaction"),
86
- "memo": obj.get("memo"),
87
- "entity_secret_ciphertext": obj.get("entitySecretCiphertext")
94
+ "raw_transaction": obj.get("rawTransaction"),
95
+ "transaction": obj.get("transaction"),
96
+ "memo": obj.get("memo"),
97
+ "entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
98
+ "blockchain": obj.get("blockchain"),
99
+ "wallet_address": obj.get("walletAddress")
100
+
88
101
  })
89
102
  return _obj
90
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
 
17
22
 
18
23
  from pydantic import BaseModel, Field
@@ -44,8 +49,10 @@ class SignTransactionResponse(BaseModel):
44
49
  return pprint.pformat(self.dict(by_alias=True))
45
50
 
46
51
  def to_json(self) -> str:
47
- """Returns the JSON representation of the model using alias"""
48
- return json.dumps(self.to_dict())
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) -> SignTransactionResponse:
@@ -81,6 +88,7 @@ class SignTransactionResponse(BaseModel):
81
88
 
82
89
  _obj = SignTransactionResponse.parse_obj({
83
90
  "data": SignTransactionResponseData.from_dict(obj.get("data")) if obj.get("data") is not None else None
91
+
84
92
  })
85
93
  return _obj
86
94
 
@@ -13,6 +13,11 @@ import pprint
13
13
  import re # noqa: F401
14
14
  import json
15
15
 
16
+ # CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
17
+ # pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
18
+ # which are not handled by the default JSON encoder.
19
+ from pydantic.json import pydantic_encoder
20
+
16
21
 
17
22
  from typing import Optional
18
23
  from pydantic import BaseModel, Field, StrictStr
@@ -45,8 +50,10 @@ class SignTransactionResponseData(BaseModel):
45
50
  return pprint.pformat(self.dict(by_alias=True))
46
51
 
47
52
  def to_json(self) -> str:
48
- """Returns the JSON representation of the model using alias"""
49
- return json.dumps(self.to_dict())
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) -> SignTransactionResponseData:
@@ -79,8 +86,9 @@ class SignTransactionResponseData(BaseModel):
79
86
 
80
87
  _obj = SignTransactionResponseData.parse_obj({
81
88
  "signature": obj.get("signature"),
82
- "signed_transaction": obj.get("signedTransaction"),
83
- "tx_hash": obj.get("txHash")
89
+ "signed_transaction": obj.get("signedTransaction"),
90
+ "tx_hash": obj.get("txHash")
91
+
84
92
  })
85
93
  return _obj
86
94
 
@@ -13,19 +13,27 @@ 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
24
+ from circle.web3.developer_controlled_wallets.models.blockchain import Blockchain
19
25
 
20
26
  class SignTypedDataRequest(BaseModel):
21
27
  """
22
28
  SignTypedDataRequest
23
29
  """
24
- wallet_id: StrictStr = Field(..., alias="walletId", description="System-generated unique identifier of the resource.")
30
+ wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="System-generated unique identifier of the resource.")
25
31
  data: StrictStr = Field(..., description="A string represents the typed structured data in EIP-712")
26
32
  memo: Optional[StrictStr] = Field(None, description="The human readable explanation for this sign action. Useful for presenting with extra information.")
27
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. ")
28
- __properties = ["walletId", "data", "memo", "entitySecretCiphertext"]
34
+ blockchain: Optional[Blockchain] = None
35
+ wallet_address: Optional[StrictStr] = Field(None, alias="walletAddress", description="Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects. ")
36
+ __properties = ["walletId", "data", "memo", "entitySecretCiphertext", "blockchain", "walletAddress"]
29
37
 
30
38
  def __init__(self, **kwargs):
31
39
  if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
@@ -46,8 +54,10 @@ class SignTypedDataRequest(BaseModel):
46
54
  return pprint.pformat(self.dict(by_alias=True))
47
55
 
48
56
  def to_json(self) -> str:
49
- """Returns the JSON representation of the model using alias"""
50
- return json.dumps(self.to_dict())
57
+ """Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
58
+ # CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
59
+ # This differs from the default OpenAPI Generator template which doesn't handle these types properly
60
+ return json.dumps(self.to_dict(), default=pydantic_encoder)
51
61
 
52
62
  @classmethod
53
63
  def from_json(cls, json_str: str) -> SignTypedDataRequest:
@@ -80,9 +90,12 @@ class SignTypedDataRequest(BaseModel):
80
90
 
81
91
  _obj = SignTypedDataRequest.parse_obj({
82
92
  "wallet_id": obj.get("walletId"),
83
- "data": obj.get("data"),
84
- "memo": obj.get("memo"),
85
- "entity_secret_ciphertext": obj.get("entitySecretCiphertext")
93
+ "data": obj.get("data"),
94
+ "memo": obj.get("memo"),
95
+ "entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
96
+ "blockchain": obj.get("blockchain"),
97
+ "wallet_address": obj.get("walletAddress")
98
+
86
99
  })
87
100
  return _obj
88
101