circle-developer-controlled-wallets 7.0.0__py3-none-any.whl → 8.1.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of circle-developer-controlled-wallets might be problematic. Click here for more details.

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