circle-developer-controlled-wallets 1.1.1__py3-none-any.whl → 2.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.

Files changed (74) hide show
  1. circle/web3/developer_controlled_wallets/__init__.py +40 -33
  2. circle/web3/developer_controlled_wallets/api/signing_api.py +193 -38
  3. circle/web3/developer_controlled_wallets/api/token_lookup_api.py +8 -8
  4. circle/web3/developer_controlled_wallets/api/transactions_api.py +47 -47
  5. circle/web3/developer_controlled_wallets/api/wallet_sets_api.py +14 -14
  6. circle/web3/developer_controlled_wallets/api/wallets_api.py +30 -30
  7. circle/web3/developer_controlled_wallets/api_client.py +1 -1
  8. circle/web3/developer_controlled_wallets/configuration.py +1 -1
  9. circle/web3/developer_controlled_wallets/models/__init__.py +39 -32
  10. circle/web3/developer_controlled_wallets/models/{create_developer_transaction_cancel200_response.py → accelerate_transaction_for_developer.py} +11 -11
  11. circle/web3/developer_controlled_wallets/models/{accelerate_transaction_for_developer_response.py → accelerate_transaction_for_developer_data.py} +8 -8
  12. circle/web3/developer_controlled_wallets/models/balance.py +3 -3
  13. circle/web3/developer_controlled_wallets/models/{wallet_set2.py → balances.py} +11 -11
  14. circle/web3/developer_controlled_wallets/models/{get_balances_response.py → balances_data.py} +8 -8
  15. circle/web3/developer_controlled_wallets/models/base_screening_decision.py +88 -0
  16. circle/web3/developer_controlled_wallets/models/blockchain.py +2 -0
  17. circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer.py +87 -0
  18. circle/web3/developer_controlled_wallets/models/{create_developer_transaction_contract_execution200_response.py → create_contract_execution_transaction_for_developer.py} +13 -13
  19. circle/web3/developer_controlled_wallets/models/{create_contract_execution_transaction_for_developer_response.py → create_contract_execution_transaction_for_developer_data.py} +8 -8
  20. circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer_request.py +4 -4
  21. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py +4 -4
  22. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response.py +9 -8
  23. circle/web3/developer_controlled_wallets/models/{cancel_transaction_for_developer_response.py → create_transfer_transaction_for_developer_response_data.py} +8 -8
  24. circle/web3/developer_controlled_wallets/models/error.py +3 -3
  25. circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request.py +2 -2
  26. circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request_blockchain.py +2 -0
  27. circle/web3/developer_controlled_wallets/models/{get_transaction200_response.py → estimate_transaction_fee.py} +13 -13
  28. circle/web3/developer_controlled_wallets/models/{estimate_transaction_fee_response.py → estimate_transaction_fee_data.py} +15 -15
  29. circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py +1 -1
  30. circle/web3/developer_controlled_wallets/models/fee_level.py +1 -1
  31. circle/web3/developer_controlled_wallets/models/nft.py +5 -5
  32. circle/web3/developer_controlled_wallets/models/{wallet2.py → nfts.py} +11 -11
  33. circle/web3/developer_controlled_wallets/models/{get_nfts_response.py → nfts_data.py} +8 -8
  34. circle/web3/developer_controlled_wallets/models/risk_action.py +38 -0
  35. circle/web3/developer_controlled_wallets/models/risk_category.py +48 -0
  36. circle/web3/developer_controlled_wallets/models/risk_score.py +40 -0
  37. circle/web3/developer_controlled_wallets/models/risk_signal.py +101 -0
  38. circle/web3/developer_controlled_wallets/models/risk_type.py +37 -0
  39. circle/web3/developer_controlled_wallets/models/{sign_message_for_developer_request.py → sign_message_request.py} +9 -9
  40. circle/web3/developer_controlled_wallets/models/sign_transaction_request.py +89 -0
  41. circle/web3/developer_controlled_wallets/models/sign_transaction_response.py +87 -0
  42. circle/web3/developer_controlled_wallets/models/{sign_typed_data_for_developer_response.py → sign_transaction_response_data.py} +13 -11
  43. circle/web3/developer_controlled_wallets/models/{sign_typed_data_for_developer_request.py → sign_typed_data_request.py} +9 -9
  44. circle/web3/developer_controlled_wallets/models/{list_wallet_nfts200_response.py → signature_response.py} +13 -13
  45. circle/web3/developer_controlled_wallets/models/{sign_message_for_developer_response.py → signature_response_data.py} +8 -8
  46. circle/web3/developer_controlled_wallets/models/token.py +103 -0
  47. circle/web3/developer_controlled_wallets/models/token_blockchain.py +2 -0
  48. circle/web3/developer_controlled_wallets/models/token_response.py +9 -25
  49. circle/web3/developer_controlled_wallets/models/{get_token_by_id_response.py → token_response_data.py} +11 -11
  50. circle/web3/developer_controlled_wallets/models/token_standard.py +6 -0
  51. circle/web3/developer_controlled_wallets/models/transaction.py +12 -6
  52. circle/web3/developer_controlled_wallets/models/{estimated_transaction_fee.py → transaction_fee.py} +16 -14
  53. circle/web3/developer_controlled_wallets/models/{list_transactions200_response.py → transaction_response.py} +13 -13
  54. circle/web3/developer_controlled_wallets/models/{get_transaction_by_id_response.py → transaction_response_data.py} +8 -8
  55. circle/web3/developer_controlled_wallets/models/transaction_screening_decision.py +98 -0
  56. circle/web3/developer_controlled_wallets/models/{get_token_id200_response.py → transactions.py} +11 -11
  57. circle/web3/developer_controlled_wallets/models/{get_transactions_response.py → transactions_data.py} +8 -8
  58. circle/web3/developer_controlled_wallets/models/{list_wallet_ballance200_response.py → validate_address.py} +13 -13
  59. circle/web3/developer_controlled_wallets/models/{validate_address_response.py → validate_address_data.py} +8 -8
  60. circle/web3/developer_controlled_wallets/models/wallet_response.py +87 -0
  61. circle/web3/developer_controlled_wallets/models/{wallet2_data.py → wallet_response_data.py} +8 -8
  62. circle/web3/developer_controlled_wallets/models/wallet_set_response.py +87 -0
  63. circle/web3/developer_controlled_wallets/models/{wallet_set2_data.py → wallet_set_response_data.py} +8 -8
  64. {circle_developer_controlled_wallets-1.1.1.dist-info → circle_developer_controlled_wallets-2.0.0.dist-info}/METADATA +42 -25
  65. circle_developer_controlled_wallets-2.0.0.dist-info/RECORD +104 -0
  66. {circle_developer_controlled_wallets-1.1.1.dist-info → circle_developer_controlled_wallets-2.0.0.dist-info}/WHEEL +1 -1
  67. circle/web3/developer_controlled_wallets/models/create_developer_transaction_accelerate200_response.py +0 -87
  68. circle/web3/developer_controlled_wallets/models/create_developer_transaction_transfer200_response.py +0 -87
  69. circle/web3/developer_controlled_wallets/models/create_transfer_estimate_fee200_response.py +0 -87
  70. circle/web3/developer_controlled_wallets/models/create_validate_address200_response.py +0 -87
  71. circle/web3/developer_controlled_wallets/models/sign_developer_message200_response.py +0 -87
  72. circle/web3/developer_controlled_wallets/models/sign_developer_typed_data200_response.py +0 -87
  73. circle_developer_controlled_wallets-1.1.1.dist-info/RECORD +0 -97
  74. {circle_developer_controlled_wallets-1.1.1.dist-info → circle_developer_controlled_wallets-2.0.0.dist-info}/top_level.txt +0 -0
@@ -17,16 +17,17 @@ import json
17
17
  from typing import Optional
18
18
  from pydantic import BaseModel, Field, StrictStr
19
19
 
20
- class EstimatedTransactionFee(BaseModel):
20
+ class TransactionFee(BaseModel):
21
21
  """
22
- EstimatedTransactionFee
22
+ TransactionFee
23
23
  """
24
- gas_limit: Optional[StrictStr] = Field(None, alias="gasLimit", description="The estimated units of gas to use for the transaction. ")
25
- gas_price: Optional[StrictStr] = Field(None, alias="gasPrice", description="For blockchains without EIP-1559 support, the estimated maximum gas price, in gwei. ")
26
- max_fee: Optional[StrictStr] = Field(None, alias="maxFee", description="For blockchains with EIP-1559 support, the estimated maximum price per unit of gas (see `gasLimit`), in gwei. ")
27
- priority_fee: Optional[StrictStr] = Field(None, alias="priorityFee", description="For blockchains with EIP-1559 support, the estimated “tip”, in gwei, to add to the base fee as an incentive for validators. ")
24
+ gas_limit: Optional[StrictStr] = Field(None, alias="gasLimit", description="The maximum units of gas to use for the transaction. Required if `feeLevel` is not provided. Estimates for this limit can be obtained through the `POST /transactions/transfer/estimateFee` API. GasLimit override (only supported for EOA wallets): Using `gasLimit` together with `feeLevel`, the provided `gasLimit` is required to be greater or equal to `feeLevel` estimation and will override the estimation's gasLimit. ")
25
+ gas_price: Optional[StrictStr] = Field(None, alias="gasPrice", description="For blockchains without EIP-1559 support, the maximum price of gas, in gwei, to use per each unit of gas (see `gasLimit`). Requires `gasLimit`. Cannot be used with `feeLevel`, `priorityFee`, or `maxFee`. Estimates for this fee can be obtained through the `POST /transactions/transfer/estimateFee` API. ")
26
+ 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. ")
27
+ 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. ")
28
28
  base_fee: Optional[StrictStr] = Field(None, alias="baseFee", description="For blockchains with EIP-1559 support, the estimated base fee represents the minimum fee required for a transaction to be included in a block on the blockchain. It is measured in gwei and compensates for the computational resources validators consume to process the transaction. The base fee is supplemented by a separate \"tip\" called the priority fee, which acts as an extra incentive for validators to prioritize the transaction. The priority fee is added to the base fee to calculate the final transaction fee. ")
29
- __properties = ["gasLimit", "gasPrice", "maxFee", "priorityFee", "baseFee"]
29
+ network_fee: Optional[StrictStr] = Field(None, alias="networkFee", description="The estimated network fee is the maximum amount of cryptocurrency (such as ETH, ARB, or SOL) that you will pay for your transaction. This fee depends on the parameters you set, including Gas Limit, Priority Fee, and Max Fee. It compensates for the computational resources that validators consume to process the transaction. It is measured in native token such as ETH, SOL. Each blockchain might use different formula for network fee. Refer to each specific blockchain's documentation to understand how `networkFee` is calculated. ")
30
+ __properties = ["gasLimit", "gasPrice", "maxFee", "priorityFee", "baseFee", "networkFee"]
30
31
 
31
32
  def __init__(self, **kwargs):
32
33
  if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
@@ -51,8 +52,8 @@ class EstimatedTransactionFee(BaseModel):
51
52
  return json.dumps(self.to_dict())
52
53
 
53
54
  @classmethod
54
- def from_json(cls, json_str: str) -> EstimatedTransactionFee:
55
- """Create an instance of EstimatedTransactionFee from a JSON string"""
55
+ def from_json(cls, json_str: str) -> TransactionFee:
56
+ """Create an instance of TransactionFee from a JSON string"""
56
57
  return cls.from_dict(json.loads(json_str))
57
58
 
58
59
  def to_dict(self):
@@ -64,13 +65,13 @@ class EstimatedTransactionFee(BaseModel):
64
65
  return _dict
65
66
 
66
67
  @classmethod
67
- def from_dict(cls, obj: dict) -> EstimatedTransactionFee:
68
- """Create an instance of EstimatedTransactionFee from a dict"""
68
+ def from_dict(cls, obj: dict) -> TransactionFee:
69
+ """Create an instance of TransactionFee from a dict"""
69
70
  if obj is None:
70
71
  return None
71
72
 
72
73
  if not isinstance(obj, dict):
73
- return EstimatedTransactionFee.parse_obj(obj)
74
+ return TransactionFee.parse_obj(obj)
74
75
 
75
76
  # fill idempotency_key and ciphertext with placeholder for auto_fill
76
77
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -79,12 +80,13 @@ class EstimatedTransactionFee(BaseModel):
79
80
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
80
81
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
81
82
 
82
- _obj = EstimatedTransactionFee.parse_obj({
83
+ _obj = TransactionFee.parse_obj({
83
84
  "gas_limit": obj.get("gasLimit"),
84
85
  "gas_price": obj.get("gasPrice"),
85
86
  "max_fee": obj.get("maxFee"),
86
87
  "priority_fee": obj.get("priorityFee"),
87
- "base_fee": obj.get("baseFee")
88
+ "base_fee": obj.get("baseFee"),
89
+ "network_fee": obj.get("networkFee")
88
90
  })
89
91
  return _obj
90
92
 
@@ -14,15 +14,15 @@ import re # noqa: F401
14
14
  import json
15
15
 
16
16
 
17
- from typing import Optional
18
- from pydantic import BaseModel
19
- from circle.web3.developer_controlled_wallets.models.get_transactions_response import GetTransactionsResponse
20
17
 
21
- class ListTransactions200Response(BaseModel):
18
+ from pydantic import BaseModel, Field
19
+ from circle.web3.developer_controlled_wallets.models.transaction_response_data import TransactionResponseData
20
+
21
+ class TransactionResponse(BaseModel):
22
22
  """
23
- ListTransactions200Response
23
+ TransactionResponse
24
24
  """
25
- data: Optional[GetTransactionsResponse] = None
25
+ data: TransactionResponseData = Field(...)
26
26
  __properties = ["data"]
27
27
 
28
28
  def __init__(self, **kwargs):
@@ -48,8 +48,8 @@ class ListTransactions200Response(BaseModel):
48
48
  return json.dumps(self.to_dict())
49
49
 
50
50
  @classmethod
51
- def from_json(cls, json_str: str) -> ListTransactions200Response:
52
- """Create an instance of ListTransactions200Response from a JSON string"""
51
+ def from_json(cls, json_str: str) -> TransactionResponse:
52
+ """Create an instance of TransactionResponse from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self):
@@ -64,13 +64,13 @@ class ListTransactions200Response(BaseModel):
64
64
  return _dict
65
65
 
66
66
  @classmethod
67
- def from_dict(cls, obj: dict) -> ListTransactions200Response:
68
- """Create an instance of ListTransactions200Response from a dict"""
67
+ def from_dict(cls, obj: dict) -> TransactionResponse:
68
+ """Create an instance of TransactionResponse from a dict"""
69
69
  if obj is None:
70
70
  return None
71
71
 
72
72
  if not isinstance(obj, dict):
73
- return ListTransactions200Response.parse_obj(obj)
73
+ return TransactionResponse.parse_obj(obj)
74
74
 
75
75
  # fill idempotency_key and ciphertext with placeholder for auto_fill
76
76
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -79,8 +79,8 @@ class ListTransactions200Response(BaseModel):
79
79
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
80
80
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
81
81
 
82
- _obj = ListTransactions200Response.parse_obj({
83
- "data": GetTransactionsResponse.from_dict(obj.get("data")) if obj.get("data") is not None else None
82
+ _obj = TransactionResponse.parse_obj({
83
+ "data": TransactionResponseData.from_dict(obj.get("data")) if obj.get("data") is not None else None
84
84
  })
85
85
  return _obj
86
86
 
@@ -18,9 +18,9 @@ from typing import Optional
18
18
  from pydantic import BaseModel
19
19
  from circle.web3.developer_controlled_wallets.models.transaction import Transaction
20
20
 
21
- class GetTransactionByIDResponse(BaseModel):
21
+ class TransactionResponseData(BaseModel):
22
22
  """
23
- GetTransactionByIDResponse
23
+ TransactionResponseData
24
24
  """
25
25
  transaction: Optional[Transaction] = None
26
26
  __properties = ["transaction"]
@@ -48,8 +48,8 @@ class GetTransactionByIDResponse(BaseModel):
48
48
  return json.dumps(self.to_dict())
49
49
 
50
50
  @classmethod
51
- def from_json(cls, json_str: str) -> GetTransactionByIDResponse:
52
- """Create an instance of GetTransactionByIDResponse from a JSON string"""
51
+ def from_json(cls, json_str: str) -> TransactionResponseData:
52
+ """Create an instance of TransactionResponseData from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self):
@@ -64,13 +64,13 @@ class GetTransactionByIDResponse(BaseModel):
64
64
  return _dict
65
65
 
66
66
  @classmethod
67
- def from_dict(cls, obj: dict) -> GetTransactionByIDResponse:
68
- """Create an instance of GetTransactionByIDResponse from a dict"""
67
+ def from_dict(cls, obj: dict) -> TransactionResponseData:
68
+ """Create an instance of TransactionResponseData from a dict"""
69
69
  if obj is None:
70
70
  return None
71
71
 
72
72
  if not isinstance(obj, dict):
73
- return GetTransactionByIDResponse.parse_obj(obj)
73
+ return TransactionResponseData.parse_obj(obj)
74
74
 
75
75
  # fill idempotency_key and ciphertext with placeholder for auto_fill
76
76
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -79,7 +79,7 @@ class GetTransactionByIDResponse(BaseModel):
79
79
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
80
80
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
81
81
 
82
- _obj = GetTransactionByIDResponse.parse_obj({
82
+ _obj = TransactionResponseData.parse_obj({
83
83
  "transaction": Transaction.from_dict(obj.get("transaction")) if obj.get("transaction") is not None else None
84
84
  })
85
85
  return _obj
@@ -0,0 +1,98 @@
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
+ from datetime import datetime
17
+ from typing import List, Optional
18
+ from pydantic import BaseModel, Field, StrictStr, conlist
19
+ from circle.web3.developer_controlled_wallets.models.risk_action import RiskAction
20
+ from circle.web3.developer_controlled_wallets.models.risk_signal import RiskSignal
21
+
22
+ class TransactionScreeningDecision(BaseModel):
23
+ """
24
+ Transaction decision detail about matched rule, actions to take, and all related risk signals.
25
+ """
26
+ rule_name: Optional[StrictStr] = Field(None, alias="ruleName", description="Name of the matched rule found in screening.")
27
+ actions: Optional[conlist(RiskAction)] = Field(None, description="Actions to take for the decision.")
28
+ screening_date: datetime = Field(..., alias="screeningDate", description="Date and time the resource was created, in ISO-8601 UTC format.")
29
+ reasons: Optional[conlist(RiskSignal)] = Field(None, description="Risk signals found include source, value, and type of the signal. It also contains risk score and risk category.")
30
+ __properties = ["ruleName", "actions", "screeningDate", "reasons"]
31
+
32
+ def __init__(self, **kwargs):
33
+ if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
34
+ kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
35
+
36
+ if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
37
+ kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
38
+ super().__init__(**kwargs)
39
+
40
+
41
+ class Config:
42
+ """Pydantic configuration"""
43
+ allow_population_by_field_name = True
44
+ validate_assignment = True
45
+
46
+ def to_str(self) -> str:
47
+ """Returns the string representation of the model using alias"""
48
+ return pprint.pformat(self.dict(by_alias=True))
49
+
50
+ def to_json(self) -> str:
51
+ """Returns the JSON representation of the model using alias"""
52
+ return json.dumps(self.to_dict())
53
+
54
+ @classmethod
55
+ def from_json(cls, json_str: str) -> TransactionScreeningDecision:
56
+ """Create an instance of TransactionScreeningDecision from a JSON string"""
57
+ return cls.from_dict(json.loads(json_str))
58
+
59
+ def to_dict(self):
60
+ """Returns the dictionary representation of the model using alias"""
61
+ _dict = self.dict(by_alias=True,
62
+ exclude={
63
+ },
64
+ exclude_none=True)
65
+ # override the default output from pydantic by calling `to_dict()` of each item in reasons (list)
66
+ _items = []
67
+ if self.reasons:
68
+ for _item in self.reasons:
69
+ if _item:
70
+ _items.append(_item.to_dict())
71
+ _dict['reasons'] = _items
72
+ return _dict
73
+
74
+ @classmethod
75
+ def from_dict(cls, obj: dict) -> TransactionScreeningDecision:
76
+ """Create an instance of TransactionScreeningDecision from a dict"""
77
+ if obj is None:
78
+ return None
79
+
80
+ if not isinstance(obj, dict):
81
+ return TransactionScreeningDecision.parse_obj(obj)
82
+
83
+ # fill idempotency_key and ciphertext with placeholder for auto_fill
84
+ if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
85
+ obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
86
+
87
+ if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
88
+ obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
89
+
90
+ _obj = TransactionScreeningDecision.parse_obj({
91
+ "rule_name": obj.get("ruleName"),
92
+ "actions": obj.get("actions"),
93
+ "screening_date": obj.get("screeningDate"),
94
+ "reasons": [RiskSignal.from_dict(_item) for _item in obj.get("reasons")] if obj.get("reasons") is not None else None
95
+ })
96
+ return _obj
97
+
98
+
@@ -16,13 +16,13 @@ import json
16
16
 
17
17
  from typing import Optional
18
18
  from pydantic import BaseModel
19
- from circle.web3.developer_controlled_wallets.models.get_token_by_id_response import GetTokenByIDResponse
19
+ from circle.web3.developer_controlled_wallets.models.transactions_data import TransactionsData
20
20
 
21
- class GetTokenId200Response(BaseModel):
21
+ class Transactions(BaseModel):
22
22
  """
23
- GetTokenId200Response
23
+ Transactions
24
24
  """
25
- data: Optional[GetTokenByIDResponse] = None
25
+ data: Optional[TransactionsData] = None
26
26
  __properties = ["data"]
27
27
 
28
28
  def __init__(self, **kwargs):
@@ -48,8 +48,8 @@ class GetTokenId200Response(BaseModel):
48
48
  return json.dumps(self.to_dict())
49
49
 
50
50
  @classmethod
51
- def from_json(cls, json_str: str) -> GetTokenId200Response:
52
- """Create an instance of GetTokenId200Response from a JSON string"""
51
+ def from_json(cls, json_str: str) -> Transactions:
52
+ """Create an instance of Transactions from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self):
@@ -64,13 +64,13 @@ class GetTokenId200Response(BaseModel):
64
64
  return _dict
65
65
 
66
66
  @classmethod
67
- def from_dict(cls, obj: dict) -> GetTokenId200Response:
68
- """Create an instance of GetTokenId200Response from a dict"""
67
+ def from_dict(cls, obj: dict) -> Transactions:
68
+ """Create an instance of Transactions from a dict"""
69
69
  if obj is None:
70
70
  return None
71
71
 
72
72
  if not isinstance(obj, dict):
73
- return GetTokenId200Response.parse_obj(obj)
73
+ return Transactions.parse_obj(obj)
74
74
 
75
75
  # fill idempotency_key and ciphertext with placeholder for auto_fill
76
76
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -79,8 +79,8 @@ class GetTokenId200Response(BaseModel):
79
79
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
80
80
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
81
81
 
82
- _obj = GetTokenId200Response.parse_obj({
83
- "data": GetTokenByIDResponse.from_dict(obj.get("data")) if obj.get("data") is not None else None
82
+ _obj = Transactions.parse_obj({
83
+ "data": TransactionsData.from_dict(obj.get("data")) if obj.get("data") is not None else None
84
84
  })
85
85
  return _obj
86
86
 
@@ -18,9 +18,9 @@ from typing import List, Optional
18
18
  from pydantic import BaseModel, conlist
19
19
  from circle.web3.developer_controlled_wallets.models.transaction import Transaction
20
20
 
21
- class GetTransactionsResponse(BaseModel):
21
+ class TransactionsData(BaseModel):
22
22
  """
23
- GetTransactionsResponse
23
+ TransactionsData
24
24
  """
25
25
  transactions: Optional[conlist(Transaction)] = None
26
26
  __properties = ["transactions"]
@@ -48,8 +48,8 @@ class GetTransactionsResponse(BaseModel):
48
48
  return json.dumps(self.to_dict())
49
49
 
50
50
  @classmethod
51
- def from_json(cls, json_str: str) -> GetTransactionsResponse:
52
- """Create an instance of GetTransactionsResponse from a JSON string"""
51
+ def from_json(cls, json_str: str) -> TransactionsData:
52
+ """Create an instance of TransactionsData from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self):
@@ -68,13 +68,13 @@ class GetTransactionsResponse(BaseModel):
68
68
  return _dict
69
69
 
70
70
  @classmethod
71
- def from_dict(cls, obj: dict) -> GetTransactionsResponse:
72
- """Create an instance of GetTransactionsResponse from a dict"""
71
+ def from_dict(cls, obj: dict) -> TransactionsData:
72
+ """Create an instance of TransactionsData from a dict"""
73
73
  if obj is None:
74
74
  return None
75
75
 
76
76
  if not isinstance(obj, dict):
77
- return GetTransactionsResponse.parse_obj(obj)
77
+ return TransactionsData.parse_obj(obj)
78
78
 
79
79
  # fill idempotency_key and ciphertext with placeholder for auto_fill
80
80
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -83,7 +83,7 @@ class GetTransactionsResponse(BaseModel):
83
83
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
84
84
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
85
85
 
86
- _obj = GetTransactionsResponse.parse_obj({
86
+ _obj = TransactionsData.parse_obj({
87
87
  "transactions": [Transaction.from_dict(_item) for _item in obj.get("transactions")] if obj.get("transactions") is not None else None
88
88
  })
89
89
  return _obj
@@ -14,15 +14,15 @@ import re # noqa: F401
14
14
  import json
15
15
 
16
16
 
17
- from typing import Optional
18
- from pydantic import BaseModel
19
- from circle.web3.developer_controlled_wallets.models.get_balances_response import GetBalancesResponse
20
17
 
21
- class ListWalletBallance200Response(BaseModel):
18
+ from pydantic import BaseModel, Field
19
+ from circle.web3.developer_controlled_wallets.models.validate_address_data import ValidateAddressData
20
+
21
+ class ValidateAddress(BaseModel):
22
22
  """
23
- ListWalletBallance200Response
23
+ ValidateAddress
24
24
  """
25
- data: Optional[GetBalancesResponse] = None
25
+ data: ValidateAddressData = Field(...)
26
26
  __properties = ["data"]
27
27
 
28
28
  def __init__(self, **kwargs):
@@ -48,8 +48,8 @@ class ListWalletBallance200Response(BaseModel):
48
48
  return json.dumps(self.to_dict())
49
49
 
50
50
  @classmethod
51
- def from_json(cls, json_str: str) -> ListWalletBallance200Response:
52
- """Create an instance of ListWalletBallance200Response from a JSON string"""
51
+ def from_json(cls, json_str: str) -> ValidateAddress:
52
+ """Create an instance of ValidateAddress from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self):
@@ -64,13 +64,13 @@ class ListWalletBallance200Response(BaseModel):
64
64
  return _dict
65
65
 
66
66
  @classmethod
67
- def from_dict(cls, obj: dict) -> ListWalletBallance200Response:
68
- """Create an instance of ListWalletBallance200Response from a dict"""
67
+ def from_dict(cls, obj: dict) -> ValidateAddress:
68
+ """Create an instance of ValidateAddress from a dict"""
69
69
  if obj is None:
70
70
  return None
71
71
 
72
72
  if not isinstance(obj, dict):
73
- return ListWalletBallance200Response.parse_obj(obj)
73
+ return ValidateAddress.parse_obj(obj)
74
74
 
75
75
  # fill idempotency_key and ciphertext with placeholder for auto_fill
76
76
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -79,8 +79,8 @@ class ListWalletBallance200Response(BaseModel):
79
79
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
80
80
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
81
81
 
82
- _obj = ListWalletBallance200Response.parse_obj({
83
- "data": GetBalancesResponse.from_dict(obj.get("data")) if obj.get("data") is not None else None
82
+ _obj = ValidateAddress.parse_obj({
83
+ "data": ValidateAddressData.from_dict(obj.get("data")) if obj.get("data") is not None else None
84
84
  })
85
85
  return _obj
86
86
 
@@ -17,9 +17,9 @@ import json
17
17
 
18
18
  from pydantic import BaseModel, Field, StrictBool
19
19
 
20
- class ValidateAddressResponse(BaseModel):
20
+ class ValidateAddressData(BaseModel):
21
21
  """
22
- ValidateAddressResponse
22
+ ValidateAddressData
23
23
  """
24
24
  is_valid: StrictBool = Field(..., alias="isValid")
25
25
  __properties = ["isValid"]
@@ -47,8 +47,8 @@ class ValidateAddressResponse(BaseModel):
47
47
  return json.dumps(self.to_dict())
48
48
 
49
49
  @classmethod
50
- def from_json(cls, json_str: str) -> ValidateAddressResponse:
51
- """Create an instance of ValidateAddressResponse from a JSON string"""
50
+ def from_json(cls, json_str: str) -> ValidateAddressData:
51
+ """Create an instance of ValidateAddressData from a JSON string"""
52
52
  return cls.from_dict(json.loads(json_str))
53
53
 
54
54
  def to_dict(self):
@@ -60,13 +60,13 @@ class ValidateAddressResponse(BaseModel):
60
60
  return _dict
61
61
 
62
62
  @classmethod
63
- def from_dict(cls, obj: dict) -> ValidateAddressResponse:
64
- """Create an instance of ValidateAddressResponse from a dict"""
63
+ def from_dict(cls, obj: dict) -> ValidateAddressData:
64
+ """Create an instance of ValidateAddressData from a dict"""
65
65
  if obj is None:
66
66
  return None
67
67
 
68
68
  if not isinstance(obj, dict):
69
- return ValidateAddressResponse.parse_obj(obj)
69
+ return ValidateAddressData.parse_obj(obj)
70
70
 
71
71
  # fill idempotency_key and ciphertext with placeholder for auto_fill
72
72
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -75,7 +75,7 @@ class ValidateAddressResponse(BaseModel):
75
75
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
76
76
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
77
77
 
78
- _obj = ValidateAddressResponse.parse_obj({
78
+ _obj = ValidateAddressData.parse_obj({
79
79
  "is_valid": obj.get("isValid")
80
80
  })
81
81
  return _obj
@@ -0,0 +1,87 @@
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
+
17
+
18
+ from pydantic import BaseModel, Field
19
+ from circle.web3.developer_controlled_wallets.models.wallet_response_data import WalletResponseData
20
+
21
+ class WalletResponse(BaseModel):
22
+ """
23
+ WalletResponse
24
+ """
25
+ data: WalletResponseData = Field(...)
26
+ __properties = ["data"]
27
+
28
+ def __init__(self, **kwargs):
29
+ if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
30
+ kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
31
+
32
+ if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
33
+ kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
34
+ super().__init__(**kwargs)
35
+
36
+
37
+ class Config:
38
+ """Pydantic configuration"""
39
+ allow_population_by_field_name = True
40
+ validate_assignment = True
41
+
42
+ def to_str(self) -> str:
43
+ """Returns the string representation of the model using alias"""
44
+ return pprint.pformat(self.dict(by_alias=True))
45
+
46
+ def to_json(self) -> str:
47
+ """Returns the JSON representation of the model using alias"""
48
+ return json.dumps(self.to_dict())
49
+
50
+ @classmethod
51
+ def from_json(cls, json_str: str) -> WalletResponse:
52
+ """Create an instance of WalletResponse from a JSON string"""
53
+ return cls.from_dict(json.loads(json_str))
54
+
55
+ def to_dict(self):
56
+ """Returns the dictionary representation of the model using alias"""
57
+ _dict = self.dict(by_alias=True,
58
+ exclude={
59
+ },
60
+ exclude_none=True)
61
+ # override the default output from pydantic by calling `to_dict()` of data
62
+ if self.data:
63
+ _dict['data'] = self.data.to_dict()
64
+ return _dict
65
+
66
+ @classmethod
67
+ def from_dict(cls, obj: dict) -> WalletResponse:
68
+ """Create an instance of WalletResponse from a dict"""
69
+ if obj is None:
70
+ return None
71
+
72
+ if not isinstance(obj, dict):
73
+ return WalletResponse.parse_obj(obj)
74
+
75
+ # fill idempotency_key and ciphertext with placeholder for auto_fill
76
+ if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
77
+ obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
78
+
79
+ if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
80
+ obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
81
+
82
+ _obj = WalletResponse.parse_obj({
83
+ "data": WalletResponseData.from_dict(obj.get("data")) if obj.get("data") is not None else None
84
+ })
85
+ return _obj
86
+
87
+
@@ -18,9 +18,9 @@ import json
18
18
  from pydantic import BaseModel, Field
19
19
  from circle.web3.developer_controlled_wallets.models.wallets_data_wallets_inner import WalletsDataWalletsInner
20
20
 
21
- class Wallet2Data(BaseModel):
21
+ class WalletResponseData(BaseModel):
22
22
  """
23
- Wallet2Data
23
+ WalletResponseData
24
24
  """
25
25
  wallet: WalletsDataWalletsInner = Field(...)
26
26
  __properties = ["wallet"]
@@ -48,8 +48,8 @@ class Wallet2Data(BaseModel):
48
48
  return json.dumps(self.to_dict())
49
49
 
50
50
  @classmethod
51
- def from_json(cls, json_str: str) -> Wallet2Data:
52
- """Create an instance of Wallet2Data from a JSON string"""
51
+ def from_json(cls, json_str: str) -> WalletResponseData:
52
+ """Create an instance of WalletResponseData from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self):
@@ -64,13 +64,13 @@ class Wallet2Data(BaseModel):
64
64
  return _dict
65
65
 
66
66
  @classmethod
67
- def from_dict(cls, obj: dict) -> Wallet2Data:
68
- """Create an instance of Wallet2Data from a dict"""
67
+ def from_dict(cls, obj: dict) -> WalletResponseData:
68
+ """Create an instance of WalletResponseData from a dict"""
69
69
  if obj is None:
70
70
  return None
71
71
 
72
72
  if not isinstance(obj, dict):
73
- return Wallet2Data.parse_obj(obj)
73
+ return WalletResponseData.parse_obj(obj)
74
74
 
75
75
  # fill idempotency_key and ciphertext with placeholder for auto_fill
76
76
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -79,7 +79,7 @@ class Wallet2Data(BaseModel):
79
79
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
80
80
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
81
81
 
82
- _obj = Wallet2Data.parse_obj({
82
+ _obj = WalletResponseData.parse_obj({
83
83
  "wallet": WalletsDataWalletsInner.from_dict(obj.get("wallet")) if obj.get("wallet") is not None else None
84
84
  })
85
85
  return _obj