circle-developer-controlled-wallets 0.1.0b1__py3-none-any.whl → 1.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 (61) hide show
  1. circle/web3/developer_controlled_wallets/__init__.py +26 -24
  2. circle/web3/developer_controlled_wallets/api/signing_api.py +2 -2
  3. circle/web3/developer_controlled_wallets/api/token_lookup_api.py +1 -1
  4. circle/web3/developer_controlled_wallets/api/transactions_api.py +25 -23
  5. circle/web3/developer_controlled_wallets/api/wallet_sets_api.py +118 -80
  6. circle/web3/developer_controlled_wallets/api/wallets_api.py +240 -209
  7. circle/web3/developer_controlled_wallets/api_client.py +1 -1
  8. circle/web3/developer_controlled_wallets/configuration.py +3 -3
  9. circle/web3/developer_controlled_wallets/models/__init__.py +25 -23
  10. circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_response.py +1 -1
  11. circle/web3/developer_controlled_wallets/models/account_type.py +1 -1
  12. circle/web3/developer_controlled_wallets/models/bad_request_response.py +85 -0
  13. circle/web3/developer_controlled_wallets/models/balance.py +1 -1
  14. circle/web3/developer_controlled_wallets/models/blockchain.py +3 -1
  15. circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer_response.py +1 -1
  16. circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer_request.py +4 -4
  17. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py +6 -5
  18. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response.py +1 -1
  19. circle/web3/developer_controlled_wallets/models/{create_developer_wallet_request.py → create_wallet_request.py} +9 -9
  20. circle/web3/developer_controlled_wallets/models/{create_developer_wallet_set_request.py → create_wallet_set_request.py} +11 -11
  21. circle/web3/developer_controlled_wallets/models/custody_type.py +1 -1
  22. circle/web3/developer_controlled_wallets/models/{update_wallet_set_metadata_response.py → developer_wallet_set.py} +26 -17
  23. circle/web3/developer_controlled_wallets/models/{wallet_set_response.py → end_user_wallet_set.py} +24 -20
  24. circle/web3/developer_controlled_wallets/models/{ext_wallet_response_wallet.py → eoa_wallet.py} +29 -25
  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 +40 -0
  27. circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py +2 -1
  28. circle/web3/developer_controlled_wallets/models/nft.py +1 -1
  29. circle/web3/developer_controlled_wallets/models/not_authorized_response.py +85 -0
  30. circle/web3/developer_controlled_wallets/models/not_found_response.py +85 -0
  31. circle/web3/developer_controlled_wallets/models/sca_wallet.py +117 -0
  32. circle/web3/developer_controlled_wallets/models/token_blockchain.py +42 -0
  33. circle/web3/developer_controlled_wallets/models/token_response.py +3 -3
  34. circle/web3/developer_controlled_wallets/models/transaction.py +3 -3
  35. circle/web3/developer_controlled_wallets/models/{ext_update_wallet_metadata_request.py → update_wallet_request.py} +9 -9
  36. circle/web3/developer_controlled_wallets/models/{update_wallet_set_metadata_request.py → update_wallet_set_request.py} +8 -8
  37. circle/web3/developer_controlled_wallets/models/{wallet_response.py → wallet.py} +17 -22
  38. circle/web3/developer_controlled_wallets/models/{update_wallet200_response.py → wallet2.py} +13 -13
  39. circle/web3/developer_controlled_wallets/models/{ext_wallet_response.py → wallet2_data.py} +13 -13
  40. circle/web3/developer_controlled_wallets/models/wallet_metadata.py +1 -1
  41. circle/web3/developer_controlled_wallets/models/wallet_set.py +87 -0
  42. circle/web3/developer_controlled_wallets/models/{get_wallet200_response.py → wallet_set2.py} +13 -13
  43. circle/web3/developer_controlled_wallets/models/{get_wallet_set_by_id_response.py → wallet_set2_data.py} +12 -12
  44. circle/web3/developer_controlled_wallets/models/{list_wallets200_response.py → wallet_sets.py} +13 -13
  45. circle/web3/developer_controlled_wallets/models/{get_wallet_sets_response.py → wallet_sets_data.py} +12 -12
  46. circle/web3/developer_controlled_wallets/models/wallet_sets_data_wallet_sets_inner.py +140 -0
  47. circle/web3/developer_controlled_wallets/models/wallet_state.py +1 -1
  48. circle/web3/developer_controlled_wallets/models/{get_wallet_set200_response.py → wallets.py} +13 -13
  49. circle/web3/developer_controlled_wallets/models/{ext_get_all_wallets_response.py → wallets_data.py} +13 -13
  50. circle/web3/developer_controlled_wallets/models/wallets_data_wallets_inner.py +140 -0
  51. {circle_developer_controlled_wallets-0.1.0b1.dist-info → circle_developer_controlled_wallets-1.1.0.dist-info}/METADATA +4 -4
  52. {circle_developer_controlled_wallets-0.1.0b1.dist-info → circle_developer_controlled_wallets-1.1.0.dist-info}/RECORD +54 -52
  53. circle/web3/developer_controlled_wallets/models/create_developer_wallet200_response.py +0 -87
  54. circle/web3/developer_controlled_wallets/models/create_developer_wallet_response.py +0 -91
  55. circle/web3/developer_controlled_wallets/models/create_developer_wallet_set_response.py +0 -87
  56. circle/web3/developer_controlled_wallets/models/create_wallet_set200_response.py +0 -87
  57. circle/web3/developer_controlled_wallets/models/ext_get_wallet_by_id_response.py +0 -87
  58. circle/web3/developer_controlled_wallets/models/list_wallet_sets200_response.py +0 -87
  59. circle/web3/developer_controlled_wallets/models/update_wallet_set200_response.py +0 -87
  60. {circle_developer_controlled_wallets-0.1.0b1.dist-info → circle_developer_controlled_wallets-1.1.0.dist-info}/WHEEL +0 -0
  61. {circle_developer_controlled_wallets-0.1.0b1.dist-info → circle_developer_controlled_wallets-1.1.0.dist-info}/top_level.txt +0 -0
@@ -14,21 +14,19 @@ import re # noqa: F401
14
14
  import json
15
15
 
16
16
  from datetime import datetime
17
- from typing import Optional
18
- from pydantic import BaseModel, Field, StrictStr, constr
19
- from circle.web3.developer_controlled_wallets.models.custody_type import CustodyType
20
17
 
21
- class WalletSetResponse(BaseModel):
18
+ from pydantic import BaseModel, Field, StrictStr, constr, validator
19
+
20
+ class EndUserWalletSet(BaseModel):
22
21
  """
23
- WalletSetResponse
22
+ EndUserWalletSet
24
23
  """
25
- id: StrictStr = Field(..., description="Unique system generated identifier of the resource.")
26
- create_date: datetime = Field(..., alias="createDate", description="Date and time the resource was created. ISO-8601 UTC date/time.")
27
- custody_type: CustodyType = Field(..., alias="custodyType")
28
- name: Optional[StrictStr] = Field(None, description="Name or description of the wallet set.")
29
- update_date: datetime = Field(..., alias="updateDate", description="Last update date of the wallet set. ISO-8601 UTC date/time.")
30
- user_id: Optional[constr(strict=True, max_length=50, min_length=5)] = Field(None, alias="userId", description="Unique system generated identifier for the user.")
31
- __properties = ["id", "createDate", "custodyType", "name", "updateDate", "userId"]
24
+ id: StrictStr = Field(..., description="System-generated unique identifier of the resource.")
25
+ create_date: datetime = Field(..., alias="createDate", description="Date and time the resource was created, in ISO-8601 UTC format.")
26
+ update_date: datetime = Field(..., alias="updateDate", description="Date and time the resource was last updated, in ISO-8601 UTC format.")
27
+ custody_type: StrictStr = Field(..., alias="custodyType")
28
+ user_id: constr(strict=True, max_length=50, min_length=5) = Field(..., alias="userId", description="Unique system generated identifier for the user.")
29
+ __properties = ["id", "createDate", "updateDate", "custodyType", "userId"]
32
30
 
33
31
  def __init__(self, **kwargs):
34
32
  if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
@@ -39,6 +37,13 @@ class WalletSetResponse(BaseModel):
39
37
  super().__init__(**kwargs)
40
38
 
41
39
 
40
+ @validator('custody_type')
41
+ def custody_type_validate_enum(cls, value):
42
+ """Validates the enum"""
43
+ if value not in ('ENDUSER'):
44
+ raise ValueError("must be one of enum values ('ENDUSER')")
45
+ return value
46
+
42
47
  class Config:
43
48
  """Pydantic configuration"""
44
49
  allow_population_by_field_name = True
@@ -53,8 +58,8 @@ class WalletSetResponse(BaseModel):
53
58
  return json.dumps(self.to_dict())
54
59
 
55
60
  @classmethod
56
- def from_json(cls, json_str: str) -> WalletSetResponse:
57
- """Create an instance of WalletSetResponse from a JSON string"""
61
+ def from_json(cls, json_str: str) -> EndUserWalletSet:
62
+ """Create an instance of EndUserWalletSet from a JSON string"""
58
63
  return cls.from_dict(json.loads(json_str))
59
64
 
60
65
  def to_dict(self):
@@ -66,13 +71,13 @@ class WalletSetResponse(BaseModel):
66
71
  return _dict
67
72
 
68
73
  @classmethod
69
- def from_dict(cls, obj: dict) -> WalletSetResponse:
70
- """Create an instance of WalletSetResponse from a dict"""
74
+ def from_dict(cls, obj: dict) -> EndUserWalletSet:
75
+ """Create an instance of EndUserWalletSet from a dict"""
71
76
  if obj is None:
72
77
  return None
73
78
 
74
79
  if not isinstance(obj, dict):
75
- return WalletSetResponse.parse_obj(obj)
80
+ return EndUserWalletSet.parse_obj(obj)
76
81
 
77
82
  # fill idempotency_key and ciphertext with placeholder for auto_fill
78
83
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -81,12 +86,11 @@ class WalletSetResponse(BaseModel):
81
86
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
82
87
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
83
88
 
84
- _obj = WalletSetResponse.parse_obj({
89
+ _obj = EndUserWalletSet.parse_obj({
85
90
  "id": obj.get("id"),
86
91
  "create_date": obj.get("createDate"),
87
- "custody_type": obj.get("custodyType"),
88
- "name": obj.get("name"),
89
92
  "update_date": obj.get("updateDate"),
93
+ "custody_type": obj.get("custodyType"),
90
94
  "user_id": obj.get("userId")
91
95
  })
92
96
  return _obj
@@ -15,30 +15,28 @@ import json
15
15
 
16
16
  from datetime import datetime
17
17
  from typing import Optional
18
- from pydantic import BaseModel, Field, StrictStr, constr
19
- from circle.web3.developer_controlled_wallets.models.account_type import AccountType
18
+ from pydantic import BaseModel, Field, StrictStr, constr, validator
20
19
  from circle.web3.developer_controlled_wallets.models.blockchain import Blockchain
21
20
  from circle.web3.developer_controlled_wallets.models.custody_type import CustodyType
22
21
  from circle.web3.developer_controlled_wallets.models.wallet_state import WalletState
23
22
 
24
- class ExtWalletResponseWallet(BaseModel):
23
+ class EOAWallet(BaseModel):
25
24
  """
26
- ExtWalletResponseWallet
25
+ EOAWallet
27
26
  """
28
- id: Optional[StrictStr] = Field(None, description="Unique system generated identifier of the resource.")
29
- address: Optional[StrictStr] = Field(None, description="The blockchain address generated upon wallet creation.")
30
- blockchain: Optional[Blockchain] = None
31
- create_date: Optional[datetime] = Field(None, alias="createDate", description="Date and time the resource was created. ISO-8601 UTC date/time.")
32
- custody_type: Optional[CustodyType] = Field(None, alias="custodyType")
33
- account_type: Optional[AccountType] = Field(None, alias="accountType")
27
+ id: StrictStr = Field(..., description="System-generated unique identifier of the resource.")
28
+ address: StrictStr = Field(..., description="Blockchain address of the wallet.")
29
+ blockchain: Blockchain = Field(...)
30
+ create_date: datetime = Field(..., alias="createDate", description="Date and time the resource was created, in ISO-8601 UTC format.")
31
+ update_date: datetime = Field(..., alias="updateDate", description="Date and time the resource was last updated, in ISO-8601 UTC format.")
32
+ custody_type: CustodyType = Field(..., alias="custodyType")
34
33
  name: Optional[StrictStr] = Field(None, description="Optional name or description associated with the wallet.")
35
- ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Optional reference or description used to identify the wallet.")
36
- state: Optional[WalletState] = None
37
- update_date: Optional[datetime] = Field(None, alias="updateDate", description="Last update date of the resource. ISO-8601 UTC date/time.")
34
+ ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Reference or description used to identify the object.")
35
+ state: WalletState = Field(...)
38
36
  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
- wallet_set_id: Optional[StrictStr] = Field(None, alias="walletSetId", description="Unique system generated identifier of the wallet's parent wallet set. under.")
40
- sca_core: Optional[StrictStr] = Field(None, alias="scaCore", description="SCAs can have different versions that have different functionality. SCACore will display the version of the SCA being created. Please refer to developer docs for a list of the versions supported.")
41
- __properties = ["id", "address", "blockchain", "createDate", "custodyType", "accountType", "name", "refId", "state", "updateDate", "userId", "walletSetId", "scaCore"]
37
+ wallet_set_id: StrictStr = Field(..., alias="walletSetId", description="System-generated unique identifier of the resource.")
38
+ 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). ")
39
+ __properties = ["id", "address", "blockchain", "createDate", "updateDate", "custodyType", "name", "refId", "state", "userId", "walletSetId", "accountType"]
42
40
 
43
41
  def __init__(self, **kwargs):
44
42
  if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
@@ -49,6 +47,13 @@ class ExtWalletResponseWallet(BaseModel):
49
47
  super().__init__(**kwargs)
50
48
 
51
49
 
50
+ @validator('account_type')
51
+ def account_type_validate_enum(cls, value):
52
+ """Validates the enum"""
53
+ if value not in ('EOA'):
54
+ raise ValueError("must be one of enum values ('EOA')")
55
+ return value
56
+
52
57
  class Config:
53
58
  """Pydantic configuration"""
54
59
  allow_population_by_field_name = True
@@ -63,8 +68,8 @@ class ExtWalletResponseWallet(BaseModel):
63
68
  return json.dumps(self.to_dict())
64
69
 
65
70
  @classmethod
66
- def from_json(cls, json_str: str) -> ExtWalletResponseWallet:
67
- """Create an instance of ExtWalletResponseWallet from a JSON string"""
71
+ def from_json(cls, json_str: str) -> EOAWallet:
72
+ """Create an instance of EOAWallet from a JSON string"""
68
73
  return cls.from_dict(json.loads(json_str))
69
74
 
70
75
  def to_dict(self):
@@ -76,13 +81,13 @@ class ExtWalletResponseWallet(BaseModel):
76
81
  return _dict
77
82
 
78
83
  @classmethod
79
- def from_dict(cls, obj: dict) -> ExtWalletResponseWallet:
80
- """Create an instance of ExtWalletResponseWallet from a dict"""
84
+ def from_dict(cls, obj: dict) -> EOAWallet:
85
+ """Create an instance of EOAWallet from a dict"""
81
86
  if obj is None:
82
87
  return None
83
88
 
84
89
  if not isinstance(obj, dict):
85
- return ExtWalletResponseWallet.parse_obj(obj)
90
+ return EOAWallet.parse_obj(obj)
86
91
 
87
92
  # fill idempotency_key and ciphertext with placeholder for auto_fill
88
93
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -91,20 +96,19 @@ class ExtWalletResponseWallet(BaseModel):
91
96
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
92
97
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
93
98
 
94
- _obj = ExtWalletResponseWallet.parse_obj({
99
+ _obj = EOAWallet.parse_obj({
95
100
  "id": obj.get("id"),
96
101
  "address": obj.get("address"),
97
102
  "blockchain": obj.get("blockchain"),
98
103
  "create_date": obj.get("createDate"),
104
+ "update_date": obj.get("updateDate"),
99
105
  "custody_type": obj.get("custodyType"),
100
- "account_type": obj.get("accountType"),
101
106
  "name": obj.get("name"),
102
107
  "ref_id": obj.get("refId"),
103
108
  "state": obj.get("state"),
104
- "update_date": obj.get("updateDate"),
105
109
  "user_id": obj.get("userId"),
106
110
  "wallet_set_id": obj.get("walletSetId"),
107
- "sca_core": obj.get("scaCore")
111
+ "account_type": obj.get("accountType")
108
112
  })
109
113
  return _obj
110
114
 
@@ -17,7 +17,7 @@ import json
17
17
  from typing import List, Optional
18
18
  from pydantic import BaseModel, Field, StrictStr, conlist
19
19
  from circle.web3.developer_controlled_wallets.models.abi_parameters_inner import AbiParametersInner
20
- from circle.web3.developer_controlled_wallets.models.blockchain import Blockchain
20
+ from circle.web3.developer_controlled_wallets.models.estimate_contract_execution_transaction_fee_request_blockchain import EstimateContractExecutionTransactionFeeRequestBlockchain
21
21
 
22
22
  class EstimateContractExecutionTransactionFeeRequest(BaseModel):
23
23
  """
@@ -27,7 +27,7 @@ class EstimateContractExecutionTransactionFeeRequest(BaseModel):
27
27
  abi_parameters: Optional[conlist(AbiParametersInner)] = Field(None, alias="abiParameters", description="The contract ABI function signature parameters for executing the contract interaction. Supported parameter types include string, integer, boolean, and array. These parameters should be used exclusively with the abiFunctionSignature and cannot be used with `callData`.")
28
28
  call_data: Optional[StrictStr] = Field(None, alias="callData", description="The raw transaction data, must be an even-length hexadecimal string with the `0x` prefix, to be executed. It is important to note that the usage of `callData` is mutually exclusive with the `abiFunctionSignature` and `abiParameters`. Therefore, `callData` cannot be utilized simultaneously with either `abiFunctionSignature` or `abiParameters`.")
29
29
  amount: Optional[StrictStr] = Field(None, description="The amount of native token that will be sent to the contract abi execution. Optional field for payable api only, if not provided, no native token will be sent.")
30
- blockchain: Optional[Blockchain] = None
30
+ blockchain: Optional[EstimateContractExecutionTransactionFeeRequestBlockchain] = None
31
31
  contract_address: StrictStr = Field(..., alias="contractAddress", description="The blockchain address of the contract to be executed.")
32
32
  source_address: Optional[StrictStr] = Field(None, alias="sourceAddress", description="The source blockchain address of the transaction. Required if you don't provide `walletId`. The `sourceAddress` and `walletId` fields are mutually exclusive.")
33
33
  wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="Unique system generated identifier of the wallet. Required when source Address and blockchain is not provided. Mutually exclusive. For contract deploys this wallet ID will be used as the source.")
@@ -0,0 +1,40 @@
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
+ import json
12
+ import pprint
13
+ import re # noqa: F401
14
+ from aenum import Enum, no_arg
15
+
16
+
17
+
18
+
19
+
20
+ class EstimateContractExecutionTransactionFeeRequestBlockchain(str, Enum):
21
+ """
22
+ The blockchain network that the resource is to be created on or is currently on.
23
+ """
24
+
25
+ """
26
+ allowed enum values
27
+ """
28
+ ETH = 'ETH'
29
+ ETH_MINUS_SEPOLIA = 'ETH-SEPOLIA'
30
+ AVAX = 'AVAX'
31
+ AVAX_MINUS_FUJI = 'AVAX-FUJI'
32
+ MATIC = 'MATIC'
33
+ MATIC_MINUS_AMOY = 'MATIC-AMOY'
34
+
35
+ @classmethod
36
+ def from_json(cls, json_str: str) -> EstimateContractExecutionTransactionFeeRequestBlockchain:
37
+ """Create an instance of EstimateContractExecutionTransactionFeeRequestBlockchain from a JSON string"""
38
+ return EstimateContractExecutionTransactionFeeRequestBlockchain(json.loads(json_str))
39
+
40
+
@@ -16,6 +16,7 @@ import json
16
16
 
17
17
  from typing import List, Optional
18
18
  from pydantic import BaseModel, Field, StrictStr, conlist
19
+ from circle.web3.developer_controlled_wallets.models.token_blockchain import TokenBlockchain
19
20
 
20
21
  class EstimateTransferTransactionFeeRequest(BaseModel):
21
22
  """
@@ -27,7 +28,7 @@ class EstimateTransferTransactionFeeRequest(BaseModel):
27
28
  source_address: Optional[StrictStr] = Field(None, alias="sourceAddress", description="The source blockchain address of the transaction. Required if you don't provide `walletId`. The `sourceAddress` and `walletId` fields are mutually exclusive.")
28
29
  token_id: Optional[StrictStr] = Field(None, alias="tokenId", description="System generated identifier of the token. Excluded with `tokenAddress` and `tokenBlockchain`.")
29
30
  token_address: Optional[StrictStr] = Field(None, alias="tokenAddress", description="Blockchain address of the transferred token. Empty for native tokens. Excluded with `tokenId`.")
30
- blockchain: Optional[StrictStr] = Field(None, description="Blockchain of the transferred token. Required if tokenId is not provided. Excluded with `tokenId`.")
31
+ blockchain: Optional[TokenBlockchain] = None
31
32
  wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="Unique system generated identifier of the wallet. Required when source Address and blockchain is not provided. Mutually exclusive. For contract deploys this wallet ID will be used as the source.")
32
33
  __properties = ["amounts", "destinationAddress", "nftTokenIds", "sourceAddress", "tokenId", "tokenAddress", "blockchain", "walletId"]
33
34
 
@@ -26,7 +26,7 @@ class Nft(BaseModel):
26
26
  metadata: Optional[StrictStr] = Field(None, description="The metadata of the NFT.")
27
27
  nft_token_id: StrictStr = Field(..., alias="nftTokenId", description="The NFT token ID.")
28
28
  token: TokenResponse = Field(...)
29
- update_date: datetime = Field(..., alias="updateDate", description="Last update date of the resource. ISO-8601 UTC date/time.")
29
+ update_date: datetime = Field(..., alias="updateDate", description="Date and time the resource was last updated, in ISO-8601 UTC format.")
30
30
  __properties = ["amount", "metadata", "nftTokenId", "token", "updateDate"]
31
31
 
32
32
  def __init__(self, **kwargs):
@@ -0,0 +1,85 @@
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, StrictInt, StrictStr
19
+
20
+ class NotAuthorizedResponse(BaseModel):
21
+ """
22
+ NotAuthorizedResponse
23
+ """
24
+ code: StrictInt = Field(..., description="Code that corresponds to the error.")
25
+ message: StrictStr = Field(..., description="Message that describes the error.")
26
+ __properties = ["code", "message"]
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) -> NotAuthorizedResponse:
52
+ """Create an instance of NotAuthorizedResponse 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
+ return _dict
62
+
63
+ @classmethod
64
+ def from_dict(cls, obj: dict) -> NotAuthorizedResponse:
65
+ """Create an instance of NotAuthorizedResponse from a dict"""
66
+ if obj is None:
67
+ return None
68
+
69
+ if not isinstance(obj, dict):
70
+ return NotAuthorizedResponse.parse_obj(obj)
71
+
72
+ # fill idempotency_key and ciphertext with placeholder for auto_fill
73
+ if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
74
+ obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
75
+
76
+ if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
77
+ obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
78
+
79
+ _obj = NotAuthorizedResponse.parse_obj({
80
+ "code": obj.get("code"),
81
+ "message": obj.get("message")
82
+ })
83
+ return _obj
84
+
85
+
@@ -0,0 +1,85 @@
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, StrictInt, StrictStr
19
+
20
+ class NotFoundResponse(BaseModel):
21
+ """
22
+ NotFoundResponse
23
+ """
24
+ code: StrictInt = Field(..., description="Code that corresponds to the error.")
25
+ message: StrictStr = Field(..., description="Message that describes the error.")
26
+ __properties = ["code", "message"]
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) -> NotFoundResponse:
52
+ """Create an instance of NotFoundResponse 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
+ return _dict
62
+
63
+ @classmethod
64
+ def from_dict(cls, obj: dict) -> NotFoundResponse:
65
+ """Create an instance of NotFoundResponse from a dict"""
66
+ if obj is None:
67
+ return None
68
+
69
+ if not isinstance(obj, dict):
70
+ return NotFoundResponse.parse_obj(obj)
71
+
72
+ # fill idempotency_key and ciphertext with placeholder for auto_fill
73
+ if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
74
+ obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
75
+
76
+ if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
77
+ obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
78
+
79
+ _obj = NotFoundResponse.parse_obj({
80
+ "code": obj.get("code"),
81
+ "message": obj.get("message")
82
+ })
83
+ return _obj
84
+
85
+
@@ -0,0 +1,117 @@
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 Optional
18
+ from pydantic import BaseModel, Field, StrictStr, constr, validator
19
+ from circle.web3.developer_controlled_wallets.models.blockchain import Blockchain
20
+ from circle.web3.developer_controlled_wallets.models.custody_type import CustodyType
21
+ from circle.web3.developer_controlled_wallets.models.wallet_state import WalletState
22
+
23
+ class SCAWallet(BaseModel):
24
+ """
25
+ SCAWallet
26
+ """
27
+ id: StrictStr = Field(..., description="System-generated unique identifier of the resource.")
28
+ address: StrictStr = Field(..., description="Blockchain address of the wallet.")
29
+ blockchain: Blockchain = Field(...)
30
+ create_date: datetime = Field(..., alias="createDate", description="Date and time the resource was created, in ISO-8601 UTC format.")
31
+ update_date: datetime = Field(..., alias="updateDate", description="Date and time the resource was last updated, in ISO-8601 UTC format.")
32
+ custody_type: CustodyType = Field(..., alias="custodyType")
33
+ name: Optional[StrictStr] = Field(None, description="Optional name or description associated with the wallet.")
34
+ ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Reference or description used to identify the object.")
35
+ state: WalletState = Field(...)
36
+ user_id: Optional[constr(strict=True, max_length=50, min_length=5)] = Field(None, alias="userId", description="Unique system generated identifier for the user.")
37
+ wallet_set_id: StrictStr = Field(..., alias="walletSetId", description="System-generated unique identifier of the resource.")
38
+ 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). ")
39
+ sca_core: StrictStr = Field(..., alias="scaCore", description="SCAs can have different versions that have different functionality. SCACore will display the version of the SCA being created. Please refer to developer docs for a list of the versions supported.")
40
+ __properties = ["id", "address", "blockchain", "createDate", "updateDate", "custodyType", "name", "refId", "state", "userId", "walletSetId", "accountType", "scaCore"]
41
+
42
+ def __init__(self, **kwargs):
43
+ if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
44
+ kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
45
+
46
+ if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
47
+ kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
48
+ super().__init__(**kwargs)
49
+
50
+
51
+ @validator('account_type')
52
+ def account_type_validate_enum(cls, value):
53
+ """Validates the enum"""
54
+ if value not in ('SCA'):
55
+ raise ValueError("must be one of enum values ('SCA')")
56
+ return value
57
+
58
+ class Config:
59
+ """Pydantic configuration"""
60
+ allow_population_by_field_name = True
61
+ validate_assignment = True
62
+
63
+ def to_str(self) -> str:
64
+ """Returns the string representation of the model using alias"""
65
+ return pprint.pformat(self.dict(by_alias=True))
66
+
67
+ def to_json(self) -> str:
68
+ """Returns the JSON representation of the model using alias"""
69
+ return json.dumps(self.to_dict())
70
+
71
+ @classmethod
72
+ def from_json(cls, json_str: str) -> SCAWallet:
73
+ """Create an instance of SCAWallet from a JSON string"""
74
+ return cls.from_dict(json.loads(json_str))
75
+
76
+ def to_dict(self):
77
+ """Returns the dictionary representation of the model using alias"""
78
+ _dict = self.dict(by_alias=True,
79
+ exclude={
80
+ },
81
+ exclude_none=True)
82
+ return _dict
83
+
84
+ @classmethod
85
+ def from_dict(cls, obj: dict) -> SCAWallet:
86
+ """Create an instance of SCAWallet from a dict"""
87
+ if obj is None:
88
+ return None
89
+
90
+ if not isinstance(obj, dict):
91
+ return SCAWallet.parse_obj(obj)
92
+
93
+ # fill idempotency_key and ciphertext with placeholder for auto_fill
94
+ if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
95
+ obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
96
+
97
+ if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
98
+ obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
99
+
100
+ _obj = SCAWallet.parse_obj({
101
+ "id": obj.get("id"),
102
+ "address": obj.get("address"),
103
+ "blockchain": obj.get("blockchain"),
104
+ "create_date": obj.get("createDate"),
105
+ "update_date": obj.get("updateDate"),
106
+ "custody_type": obj.get("custodyType"),
107
+ "name": obj.get("name"),
108
+ "ref_id": obj.get("refId"),
109
+ "state": obj.get("state"),
110
+ "user_id": obj.get("userId"),
111
+ "wallet_set_id": obj.get("walletSetId"),
112
+ "account_type": obj.get("accountType"),
113
+ "sca_core": obj.get("scaCore")
114
+ })
115
+ return _obj
116
+
117
+
@@ -0,0 +1,42 @@
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
+ import json
12
+ import pprint
13
+ import re # noqa: F401
14
+ from aenum import Enum, no_arg
15
+
16
+
17
+
18
+
19
+
20
+ class TokenBlockchain(str, Enum):
21
+ """
22
+ Blockchain of the transferred token. Required if tokenId is not provided. Excluded with `tokenId`.
23
+ """
24
+
25
+ """
26
+ allowed enum values
27
+ """
28
+ ETH = 'ETH'
29
+ ETH_MINUS_SEPOLIA = 'ETH-SEPOLIA'
30
+ AVAX = 'AVAX'
31
+ AVAX_MINUS_FUJI = 'AVAX-FUJI'
32
+ MATIC = 'MATIC'
33
+ MATIC_MINUS_AMOY = 'MATIC-AMOY'
34
+ SOL = 'SOL'
35
+ SOL_MINUS_DEVNET = 'SOL-DEVNET'
36
+
37
+ @classmethod
38
+ def from_json(cls, json_str: str) -> TokenBlockchain:
39
+ """Create an instance of TokenBlockchain from a JSON string"""
40
+ return TokenBlockchain(json.loads(json_str))
41
+
42
+
@@ -23,7 +23,7 @@ class TokenResponse(BaseModel):
23
23
  """
24
24
  TokenResponse
25
25
  """
26
- id: StrictStr = Field(..., description="Unique system generated identifier of the resource.")
26
+ id: StrictStr = Field(..., description="System-generated unique identifier of the resource.")
27
27
  name: Optional[StrictStr] = Field(None, description="Blockchain name of the specified token.")
28
28
  standard: Optional[TokenStandard] = None
29
29
  blockchain: Blockchain = Field(...)
@@ -31,8 +31,8 @@ class TokenResponse(BaseModel):
31
31
  is_native: StrictBool = Field(..., alias="isNative", description="Defines if the token is a native token of the specified blockchain. If TRUE, the token is a native token.")
32
32
  symbol: Optional[StrictStr] = Field(None, description="Blockchain symbol of the specified token.")
33
33
  token_address: Optional[StrictStr] = Field(None, alias="tokenAddress", description="Blockchain address of the specified token.")
34
- update_date: datetime = Field(..., alias="updateDate", description="Last update date of the resource. ISO-8601 UTC date/time.")
35
- create_date: datetime = Field(..., alias="createDate", description="Date and time the resource was created. ISO-8601 UTC date/time.")
34
+ update_date: datetime = Field(..., alias="updateDate", description="Date and time the resource was last updated, in ISO-8601 UTC format.")
35
+ create_date: datetime = Field(..., alias="createDate", description="Date and time the resource was created, in ISO-8601 UTC format.")
36
36
  __properties = ["id", "name", "standard", "blockchain", "decimals", "isNative", "symbol", "tokenAddress", "updateDate", "createDate"]
37
37
 
38
38
  def __init__(self, **kwargs):