circle-developer-controlled-wallets 5.0.1__py3-none-any.whl → 5.2.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of circle-developer-controlled-wallets might be problematic. Click here for more details.
- circle/web3/developer_controlled_wallets/__init__.py +12 -1
- circle/web3/developer_controlled_wallets/api/signing_api.py +4 -4
- circle/web3/developer_controlled_wallets/api/token_lookup_api.py +1 -1
- circle/web3/developer_controlled_wallets/api/transactions_api.py +154 -0
- circle/web3/developer_controlled_wallets/api/wallets_api.py +428 -5
- circle/web3/developer_controlled_wallets/api_client.py +1 -1
- circle/web3/developer_controlled_wallets/configuration.py +1 -1
- circle/web3/developer_controlled_wallets/models/__init__.py +11 -0
- circle/web3/developer_controlled_wallets/models/backfill_wallet_request.py +89 -0
- circle/web3/developer_controlled_wallets/models/balance.py +1 -1
- circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer.py +87 -0
- circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer_request.py +103 -0
- circle/web3/developer_controlled_wallets/models/eoa_wallet_with_balances.py +127 -0
- circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request.py +1 -1
- circle/web3/developer_controlled_wallets/models/evm_blockchain.py +44 -0
- circle/web3/developer_controlled_wallets/models/new_sca_core.py +35 -0
- circle/web3/developer_controlled_wallets/models/sca_core.py +38 -0
- circle/web3/developer_controlled_wallets/models/sca_wallet.py +2 -1
- circle/web3/developer_controlled_wallets/models/sca_wallet_with_balances.py +130 -0
- circle/web3/developer_controlled_wallets/models/wallets_with_balances.py +87 -0
- circle/web3/developer_controlled_wallets/models/wallets_with_balances_data.py +91 -0
- circle/web3/developer_controlled_wallets/models/wallets_with_balances_data_wallets_inner.py +140 -0
- {circle_developer_controlled_wallets-5.0.1.dist-info → circle_developer_controlled_wallets-5.2.0.dist-info}/METADATA +5 -5
- {circle_developer_controlled_wallets-5.0.1.dist-info → circle_developer_controlled_wallets-5.2.0.dist-info}/RECORD +26 -15
- {circle_developer_controlled_wallets-5.0.1.dist-info → circle_developer_controlled_wallets-5.2.0.dist-info}/WHEEL +1 -1
- {circle_developer_controlled_wallets-5.0.1.dist-info → circle_developer_controlled_wallets-5.2.0.dist-info}/top_level.txt +0 -0
|
@@ -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
|
+
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, constr, validator
|
|
19
|
+
from circle.web3.developer_controlled_wallets.models.balance import Balance
|
|
20
|
+
from circle.web3.developer_controlled_wallets.models.blockchain import Blockchain
|
|
21
|
+
from circle.web3.developer_controlled_wallets.models.custody_type import CustodyType
|
|
22
|
+
from circle.web3.developer_controlled_wallets.models.sca_core import ScaCore
|
|
23
|
+
from circle.web3.developer_controlled_wallets.models.wallet_state import WalletState
|
|
24
|
+
|
|
25
|
+
class SCAWalletWithBalances(BaseModel):
|
|
26
|
+
"""
|
|
27
|
+
SCAWalletWithBalances
|
|
28
|
+
"""
|
|
29
|
+
id: StrictStr = Field(..., description="System-generated unique identifier of the resource.")
|
|
30
|
+
address: StrictStr = Field(..., description="Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects. ")
|
|
31
|
+
blockchain: Blockchain = Field(...)
|
|
32
|
+
create_date: datetime = Field(..., alias="createDate", description="Date and time the resource was created, in ISO-8601 UTC format.")
|
|
33
|
+
update_date: datetime = Field(..., alias="updateDate", description="Date and time the resource was last updated, in ISO-8601 UTC format.")
|
|
34
|
+
custody_type: CustodyType = Field(..., alias="custodyType")
|
|
35
|
+
name: Optional[StrictStr] = Field(None, description="Name or description associated with the wallet or walletSet.")
|
|
36
|
+
ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Reference or description used to identify the object.")
|
|
37
|
+
state: WalletState = Field(...)
|
|
38
|
+
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: StrictStr = Field(..., alias="walletSetId", description="System-generated unique identifier of the resource.")
|
|
40
|
+
initial_public_key: Optional[StrictStr] = Field(None, alias="initialPublicKey", description="For NEAR blockchains only, the originally assigned public key of a wallet at the time of its creation.")
|
|
41
|
+
account_type: StrictStr = Field(..., alias="accountType", description="An account can be a Smart Contract Account (SCA) or an Externally Owned Account (EOA). To learn more, see the [account types guide](https://developers.circle.com/w3s/docs/programmable-wallets-account-types). If an account type is not specified during the creation of a wallet, it defaults to `EOA` (Externally Owned Account). Note that Solana doesn't support Smart Contract Account (SCA). ")
|
|
42
|
+
sca_core: ScaCore = Field(..., alias="scaCore")
|
|
43
|
+
token_balances: conlist(Balance) = Field(..., alias="tokenBalances", description="Lists native token balances and, if specified, USDC/EURC balances for the wallets.")
|
|
44
|
+
__properties = ["id", "address", "blockchain", "createDate", "updateDate", "custodyType", "name", "refId", "state", "userId", "walletSetId", "initialPublicKey", "accountType", "scaCore", "tokenBalances"]
|
|
45
|
+
|
|
46
|
+
def __init__(self, **kwargs):
|
|
47
|
+
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
48
|
+
kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
|
|
49
|
+
|
|
50
|
+
if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
|
|
51
|
+
kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
|
|
52
|
+
super().__init__(**kwargs)
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
@validator('account_type')
|
|
56
|
+
def account_type_validate_enum(cls, value):
|
|
57
|
+
"""Validates the enum"""
|
|
58
|
+
if value not in ('SCA'):
|
|
59
|
+
raise ValueError("must be one of enum values ('SCA')")
|
|
60
|
+
return value
|
|
61
|
+
|
|
62
|
+
class Config:
|
|
63
|
+
"""Pydantic configuration"""
|
|
64
|
+
allow_population_by_field_name = True
|
|
65
|
+
validate_assignment = True
|
|
66
|
+
|
|
67
|
+
def to_str(self) -> str:
|
|
68
|
+
"""Returns the string representation of the model using alias"""
|
|
69
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
70
|
+
|
|
71
|
+
def to_json(self) -> str:
|
|
72
|
+
"""Returns the JSON representation of the model using alias"""
|
|
73
|
+
return json.dumps(self.to_dict())
|
|
74
|
+
|
|
75
|
+
@classmethod
|
|
76
|
+
def from_json(cls, json_str: str) -> SCAWalletWithBalances:
|
|
77
|
+
"""Create an instance of SCAWalletWithBalances from a JSON string"""
|
|
78
|
+
return cls.from_dict(json.loads(json_str))
|
|
79
|
+
|
|
80
|
+
def to_dict(self):
|
|
81
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
82
|
+
_dict = self.dict(by_alias=True,
|
|
83
|
+
exclude={
|
|
84
|
+
},
|
|
85
|
+
exclude_none=True)
|
|
86
|
+
# override the default output from pydantic by calling `to_dict()` of each item in token_balances (list)
|
|
87
|
+
_items = []
|
|
88
|
+
if self.token_balances:
|
|
89
|
+
for _item in self.token_balances:
|
|
90
|
+
if _item:
|
|
91
|
+
_items.append(_item.to_dict())
|
|
92
|
+
_dict['tokenBalances'] = _items
|
|
93
|
+
return _dict
|
|
94
|
+
|
|
95
|
+
@classmethod
|
|
96
|
+
def from_dict(cls, obj: dict) -> SCAWalletWithBalances:
|
|
97
|
+
"""Create an instance of SCAWalletWithBalances from a dict"""
|
|
98
|
+
if obj is None:
|
|
99
|
+
return None
|
|
100
|
+
|
|
101
|
+
if not isinstance(obj, dict):
|
|
102
|
+
return SCAWalletWithBalances.parse_obj(obj)
|
|
103
|
+
|
|
104
|
+
# fill idempotency_key and ciphertext with placeholder for auto_fill
|
|
105
|
+
if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
|
|
106
|
+
obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
|
|
107
|
+
|
|
108
|
+
if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
|
|
109
|
+
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
110
|
+
|
|
111
|
+
_obj = SCAWalletWithBalances.parse_obj({
|
|
112
|
+
"id": obj.get("id"),
|
|
113
|
+
"address": obj.get("address"),
|
|
114
|
+
"blockchain": obj.get("blockchain"),
|
|
115
|
+
"create_date": obj.get("createDate"),
|
|
116
|
+
"update_date": obj.get("updateDate"),
|
|
117
|
+
"custody_type": obj.get("custodyType"),
|
|
118
|
+
"name": obj.get("name"),
|
|
119
|
+
"ref_id": obj.get("refId"),
|
|
120
|
+
"state": obj.get("state"),
|
|
121
|
+
"user_id": obj.get("userId"),
|
|
122
|
+
"wallet_set_id": obj.get("walletSetId"),
|
|
123
|
+
"initial_public_key": obj.get("initialPublicKey"),
|
|
124
|
+
"account_type": obj.get("accountType"),
|
|
125
|
+
"sca_core": obj.get("scaCore"),
|
|
126
|
+
"token_balances": [Balance.from_dict(_item) for _item in obj.get("tokenBalances")] if obj.get("tokenBalances") is not None else None
|
|
127
|
+
})
|
|
128
|
+
return _obj
|
|
129
|
+
|
|
130
|
+
|
|
@@ -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.wallets_with_balances_data import WalletsWithBalancesData
|
|
20
|
+
|
|
21
|
+
class WalletsWithBalances(BaseModel):
|
|
22
|
+
"""
|
|
23
|
+
WalletsWithBalances
|
|
24
|
+
"""
|
|
25
|
+
data: WalletsWithBalancesData = 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) -> WalletsWithBalances:
|
|
52
|
+
"""Create an instance of WalletsWithBalances 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) -> WalletsWithBalances:
|
|
68
|
+
"""Create an instance of WalletsWithBalances from a dict"""
|
|
69
|
+
if obj is None:
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
if not isinstance(obj, dict):
|
|
73
|
+
return WalletsWithBalances.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 = WalletsWithBalances.parse_obj({
|
|
83
|
+
"data": WalletsWithBalancesData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,91 @@
|
|
|
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
|
+
from typing import List
|
|
18
|
+
from pydantic import BaseModel, Field, conlist
|
|
19
|
+
from circle.web3.developer_controlled_wallets.models.wallets_with_balances_data_wallets_inner import WalletsWithBalancesDataWalletsInner
|
|
20
|
+
|
|
21
|
+
class WalletsWithBalancesData(BaseModel):
|
|
22
|
+
"""
|
|
23
|
+
WalletsWithBalancesData
|
|
24
|
+
"""
|
|
25
|
+
wallets: conlist(WalletsWithBalancesDataWalletsInner) = Field(...)
|
|
26
|
+
__properties = ["wallets"]
|
|
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) -> WalletsWithBalancesData:
|
|
52
|
+
"""Create an instance of WalletsWithBalancesData 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 each item in wallets (list)
|
|
62
|
+
_items = []
|
|
63
|
+
if self.wallets:
|
|
64
|
+
for _item in self.wallets:
|
|
65
|
+
if _item:
|
|
66
|
+
_items.append(_item.to_dict())
|
|
67
|
+
_dict['wallets'] = _items
|
|
68
|
+
return _dict
|
|
69
|
+
|
|
70
|
+
@classmethod
|
|
71
|
+
def from_dict(cls, obj: dict) -> WalletsWithBalancesData:
|
|
72
|
+
"""Create an instance of WalletsWithBalancesData from a dict"""
|
|
73
|
+
if obj is None:
|
|
74
|
+
return None
|
|
75
|
+
|
|
76
|
+
if not isinstance(obj, dict):
|
|
77
|
+
return WalletsWithBalancesData.parse_obj(obj)
|
|
78
|
+
|
|
79
|
+
# fill idempotency_key and ciphertext with placeholder for auto_fill
|
|
80
|
+
if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
|
|
81
|
+
obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
|
|
82
|
+
|
|
83
|
+
if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
|
|
84
|
+
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
85
|
+
|
|
86
|
+
_obj = WalletsWithBalancesData.parse_obj({
|
|
87
|
+
"wallets": [WalletsWithBalancesDataWalletsInner.from_dict(_item) for _item in obj.get("wallets")] if obj.get("wallets") is not None else None
|
|
88
|
+
})
|
|
89
|
+
return _obj
|
|
90
|
+
|
|
91
|
+
|
|
@@ -0,0 +1,140 @@
|
|
|
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 Any, List, Optional
|
|
18
|
+
from pydantic import BaseModel, Field, StrictStr, ValidationError, validator
|
|
19
|
+
from circle.web3.developer_controlled_wallets.models.eoa_wallet_with_balances import EOAWalletWithBalances
|
|
20
|
+
from circle.web3.developer_controlled_wallets.models.sca_wallet_with_balances import SCAWalletWithBalances
|
|
21
|
+
from typing import Union, Any, List, TYPE_CHECKING
|
|
22
|
+
from pydantic import StrictStr, Field
|
|
23
|
+
|
|
24
|
+
WALLETSWITHBALANCESDATAWALLETSINNER_ONE_OF_SCHEMAS = ["EOAWalletWithBalances", "SCAWalletWithBalances"]
|
|
25
|
+
|
|
26
|
+
class WalletsWithBalancesDataWalletsInner(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
WalletsWithBalancesDataWalletsInner
|
|
29
|
+
"""
|
|
30
|
+
# data type: EOAWalletWithBalances
|
|
31
|
+
oneof_schema_1_validator: Optional[EOAWalletWithBalances] = None
|
|
32
|
+
# data type: SCAWalletWithBalances
|
|
33
|
+
oneof_schema_2_validator: Optional[SCAWalletWithBalances] = None
|
|
34
|
+
if TYPE_CHECKING:
|
|
35
|
+
actual_instance: Union[EOAWalletWithBalances, SCAWalletWithBalances]
|
|
36
|
+
else:
|
|
37
|
+
actual_instance: Any
|
|
38
|
+
one_of_schemas: List[str] = Field(WALLETSWITHBALANCESDATAWALLETSINNER_ONE_OF_SCHEMAS, const=True)
|
|
39
|
+
|
|
40
|
+
class Config:
|
|
41
|
+
validate_assignment = True
|
|
42
|
+
|
|
43
|
+
discriminator_value_class_map = {
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
def __init__(self, *args, **kwargs):
|
|
47
|
+
if args:
|
|
48
|
+
if len(args) > 1:
|
|
49
|
+
raise ValueError("If a position argument is used, only 1 is allowed to set `actual_instance`")
|
|
50
|
+
if kwargs:
|
|
51
|
+
raise ValueError("If a position argument is used, keyword arguments cannot be used.")
|
|
52
|
+
super().__init__(actual_instance=args[0])
|
|
53
|
+
else:
|
|
54
|
+
super().__init__(**kwargs)
|
|
55
|
+
|
|
56
|
+
@validator('actual_instance')
|
|
57
|
+
def actual_instance_must_validate_oneof(cls, v):
|
|
58
|
+
instance = WalletsWithBalancesDataWalletsInner.construct()
|
|
59
|
+
error_messages = []
|
|
60
|
+
match = 0
|
|
61
|
+
# validate data type: EOAWalletWithBalances
|
|
62
|
+
if not isinstance(v, EOAWalletWithBalances):
|
|
63
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `EOAWalletWithBalances`")
|
|
64
|
+
else:
|
|
65
|
+
match += 1
|
|
66
|
+
# validate data type: SCAWalletWithBalances
|
|
67
|
+
if not isinstance(v, SCAWalletWithBalances):
|
|
68
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `SCAWalletWithBalances`")
|
|
69
|
+
else:
|
|
70
|
+
match += 1
|
|
71
|
+
if match > 1:
|
|
72
|
+
# more than 1 match
|
|
73
|
+
raise ValueError("Multiple matches found when setting `actual_instance` in WalletsWithBalancesDataWalletsInner with oneOf schemas: EOAWalletWithBalances, SCAWalletWithBalances. Details: " + ", ".join(error_messages))
|
|
74
|
+
elif match == 0:
|
|
75
|
+
# no match
|
|
76
|
+
raise ValueError("No match found when setting `actual_instance` in WalletsWithBalancesDataWalletsInner with oneOf schemas: EOAWalletWithBalances, SCAWalletWithBalances. Details: " + ", ".join(error_messages))
|
|
77
|
+
else:
|
|
78
|
+
return v
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: dict) -> WalletsWithBalancesDataWalletsInner:
|
|
82
|
+
return cls.from_json(json.dumps(obj))
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_json(cls, json_str: str) -> WalletsWithBalancesDataWalletsInner:
|
|
86
|
+
"""Returns the object represented by the json string"""
|
|
87
|
+
instance = WalletsWithBalancesDataWalletsInner.construct()
|
|
88
|
+
error_messages = []
|
|
89
|
+
match = 0
|
|
90
|
+
|
|
91
|
+
# deserialize data into EOAWalletWithBalances
|
|
92
|
+
try:
|
|
93
|
+
instance.actual_instance = EOAWalletWithBalances.from_json(json_str)
|
|
94
|
+
match += 1
|
|
95
|
+
except (ValidationError, ValueError) as e:
|
|
96
|
+
error_messages.append(str(e))
|
|
97
|
+
# deserialize data into SCAWalletWithBalances
|
|
98
|
+
try:
|
|
99
|
+
instance.actual_instance = SCAWalletWithBalances.from_json(json_str)
|
|
100
|
+
match += 1
|
|
101
|
+
except (ValidationError, ValueError) as e:
|
|
102
|
+
error_messages.append(str(e))
|
|
103
|
+
|
|
104
|
+
if match > 1:
|
|
105
|
+
# more than 1 match
|
|
106
|
+
raise ValueError("Multiple matches found when deserializing the JSON string into WalletsWithBalancesDataWalletsInner with oneOf schemas: EOAWalletWithBalances, SCAWalletWithBalances. Details: " + ", ".join(error_messages))
|
|
107
|
+
elif match == 0:
|
|
108
|
+
# no match
|
|
109
|
+
raise ValueError("No match found when deserializing the JSON string into WalletsWithBalancesDataWalletsInner with oneOf schemas: EOAWalletWithBalances, SCAWalletWithBalances. Details: " + ", ".join(error_messages))
|
|
110
|
+
else:
|
|
111
|
+
return instance
|
|
112
|
+
|
|
113
|
+
def to_json(self) -> str:
|
|
114
|
+
"""Returns the JSON representation of the actual instance"""
|
|
115
|
+
if self.actual_instance is None:
|
|
116
|
+
return "null"
|
|
117
|
+
|
|
118
|
+
to_json = getattr(self.actual_instance, "to_json", None)
|
|
119
|
+
if callable(to_json):
|
|
120
|
+
return self.actual_instance.to_json()
|
|
121
|
+
else:
|
|
122
|
+
return json.dumps(self.actual_instance)
|
|
123
|
+
|
|
124
|
+
def to_dict(self) -> dict:
|
|
125
|
+
"""Returns the dict representation of the actual instance"""
|
|
126
|
+
if self.actual_instance is None:
|
|
127
|
+
return None
|
|
128
|
+
|
|
129
|
+
to_dict = getattr(self.actual_instance, "to_dict", None)
|
|
130
|
+
if callable(to_dict):
|
|
131
|
+
return self.actual_instance.to_dict()
|
|
132
|
+
else:
|
|
133
|
+
# primitive type
|
|
134
|
+
return self.actual_instance
|
|
135
|
+
|
|
136
|
+
def to_str(self) -> str:
|
|
137
|
+
"""Returns the string representation of the actual instance"""
|
|
138
|
+
return pprint.pformat(self.dict())
|
|
139
|
+
|
|
140
|
+
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
Metadata-Version: 2.
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
2
|
Name: circle-developer-controlled-wallets
|
|
3
|
-
Version: 5.0
|
|
3
|
+
Version: 5.2.0
|
|
4
4
|
Summary: Developer-Controlled Wallets
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: OpenAPI Generator community
|
|
@@ -12,8 +12,8 @@ Requires-Dist: python-dateutil
|
|
|
12
12
|
Requires-Dist: pydantic<2,>=1.10.5
|
|
13
13
|
Requires-Dist: aenum
|
|
14
14
|
Requires-Dist: pycryptodome>=3.20.0
|
|
15
|
-
Requires-Dist: circle-configurations==5.0
|
|
16
|
-
Requires-Dist: circle-web3-sdk-util==5.0
|
|
15
|
+
Requires-Dist: circle-configurations==5.2.0
|
|
16
|
+
Requires-Dist: circle-web3-sdk-util==5.2.0
|
|
17
17
|
Dynamic: author
|
|
18
18
|
Dynamic: author-email
|
|
19
19
|
Dynamic: description
|
|
@@ -25,7 +25,7 @@ Dynamic: summary
|
|
|
25
25
|
# circle-developer-controlled-wallets
|
|
26
26
|
This SDK provides convenient access to Circle's Developer Controlled Wallets APIs for applications written in Python. For the API reference, see the [Circle Web3 API docs](https://developers.circle.com/api-reference/w3s/common/ping).
|
|
27
27
|
|
|
28
|
-
- Package version: 5.0
|
|
28
|
+
- Package version: 5.2.0
|
|
29
29
|
|
|
30
30
|
## Requirements.
|
|
31
31
|
|
|
@@ -1,26 +1,27 @@
|
|
|
1
1
|
circle/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
2
|
circle/web3/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
3
|
-
circle/web3/developer_controlled_wallets/__init__.py,sha256=
|
|
4
|
-
circle/web3/developer_controlled_wallets/api_client.py,sha256=
|
|
3
|
+
circle/web3/developer_controlled_wallets/__init__.py,sha256=n_X82TDe3TixeWcmQWpfunwbmP93RdjScf0uvhfpLLU,11477
|
|
4
|
+
circle/web3/developer_controlled_wallets/api_client.py,sha256=8gZkdd4MaMaQd3KGGOXHVm34az0WywjYHwubCniKAoI,31612
|
|
5
5
|
circle/web3/developer_controlled_wallets/api_response.py,sha256=PVUEilYSo_CCiR5NaxyzzyJAlKL1xkNoWvtkfk7r528,844
|
|
6
|
-
circle/web3/developer_controlled_wallets/configuration.py,sha256=
|
|
6
|
+
circle/web3/developer_controlled_wallets/configuration.py,sha256=RvN1wUrjj_4zTg9DO6wiTtDKAvTRTtFYgJoZZB6BCoY,15101
|
|
7
7
|
circle/web3/developer_controlled_wallets/exceptions.py,sha256=_2uyalsxooiwXa05bg46v7jt1aSrhzOD9etoqSyZEac,5218
|
|
8
8
|
circle/web3/developer_controlled_wallets/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
9
9
|
circle/web3/developer_controlled_wallets/rest.py,sha256=L2w4OU_OfcJNZ3nwckgwq21B3gIOXkpFjsOP4QliIeY,12814
|
|
10
10
|
circle/web3/developer_controlled_wallets/api/__init__.py,sha256=OdeJef0RSUikrtSOaxsOkocXjHQYocnuXjq7TnT6W_Y,474
|
|
11
|
-
circle/web3/developer_controlled_wallets/api/signing_api.py,sha256=
|
|
12
|
-
circle/web3/developer_controlled_wallets/api/token_lookup_api.py,sha256=
|
|
13
|
-
circle/web3/developer_controlled_wallets/api/transactions_api.py,sha256=
|
|
11
|
+
circle/web3/developer_controlled_wallets/api/signing_api.py,sha256=sVXNn0XbpTr4FV6Zxiptc9Kt05gEzMRkjsvetF3yRNo,32368
|
|
12
|
+
circle/web3/developer_controlled_wallets/api/token_lookup_api.py,sha256=IdCqsWeHOsj9YEiY_ImxULGV_9ifzlvEn5b5XNO3S-k,8089
|
|
13
|
+
circle/web3/developer_controlled_wallets/api/transactions_api.py,sha256=e5G2jyJ8bG0GG4iSaUsPdXu7Z_9uPPyrYoaLXHllAOM,91894
|
|
14
14
|
circle/web3/developer_controlled_wallets/api/wallet_sets_api.py,sha256=0VHhXuMAYlfOjZN3K2UNCfGc7f-eN1WaT7N0sTlAZvI,39351
|
|
15
|
-
circle/web3/developer_controlled_wallets/api/wallets_api.py,sha256=
|
|
16
|
-
circle/web3/developer_controlled_wallets/models/__init__.py,sha256=
|
|
15
|
+
circle/web3/developer_controlled_wallets/api/wallets_api.py,sha256=EpVdQvuEKWWvOB9jJmz3amRc-zkQAVkiiUM1p2-cYfg,100560
|
|
16
|
+
circle/web3/developer_controlled_wallets/models/__init__.py,sha256=Pe8zbUKwb6I-8rYPa6pjeJ9KYOKFO0o3uVUyDj0dwy0,10273
|
|
17
17
|
circle/web3/developer_controlled_wallets/models/abi_parameters_inner.py,sha256=YX5BNB39myCXozO8yBzN-PnPC_81HovQEL8_i_irhpU,6093
|
|
18
18
|
circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer.py,sha256=p_gW451uzynxR2KX_-s7dfby13hpkk5tdOD0i7BO7tI,3108
|
|
19
19
|
circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_data.py,sha256=45oeo8Y5X00kEl7cwUB0y0ccTezJpGsTWhs5LtEUDvg,2813
|
|
20
20
|
circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_request.py,sha256=KN0KmXqM6BaiIfX5XDtfk_mIwkBqD7UykN2l2rnKLq4,3606
|
|
21
21
|
circle/web3/developer_controlled_wallets/models/account_type.py,sha256=u4F1PwPi6kNoXOcYtDHSXeNyoEDaCEm-glihpTwuhWE,981
|
|
22
|
+
circle/web3/developer_controlled_wallets/models/backfill_wallet_request.py,sha256=ZgpYvUjNjSQabvTVlYy-UcPSHF8oVvW-akW6-iIfxd4,3073
|
|
22
23
|
circle/web3/developer_controlled_wallets/models/bad_request_response.py,sha256=ZaL7FhSV-tA8AFmXPXfcMblCzl8HT8LK5vzPhhM4KIs,2765
|
|
23
|
-
circle/web3/developer_controlled_wallets/models/balance.py,sha256=
|
|
24
|
+
circle/web3/developer_controlled_wallets/models/balance.py,sha256=1gnyDnXkYkQBlhkXIhSiWz_bFQOAqp7FxCOh2nW-uoc,3145
|
|
24
25
|
circle/web3/developer_controlled_wallets/models/balances.py,sha256=9mBDyfJXXSq5Bx94dhGDO4_47k7RT-gL5AW0Vp_AK8Y,2781
|
|
25
26
|
circle/web3/developer_controlled_wallets/models/balances_data.py,sha256=q7Pc-1uiN2_vS9Ze3koSyy96U7NqdY7cHcfWJq3F7jM,3195
|
|
26
27
|
circle/web3/developer_controlled_wallets/models/base_screening_decision.py,sha256=2GXzmMm2Tcsm_mURpcQqYEeyg7DUnC8g_k3EfIYHuX4,3297
|
|
@@ -35,16 +36,21 @@ circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_
|
|
|
35
36
|
circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response_data.py,sha256=dLj_Y4YMpmf1hTSsYSECBjd5mNWXVCsq492mPLH5CvE,3055
|
|
36
37
|
circle/web3/developer_controlled_wallets/models/create_wallet_request.py,sha256=nEGgLhxmeygJDlXDgRoj4RySzzkt8uMA93iqCQFkHOA,5142
|
|
37
38
|
circle/web3/developer_controlled_wallets/models/create_wallet_set_request.py,sha256=ZkkkKopXBtf8WCpUMtVu27GOqUN0yy1Du5d7jWWL2uA,3637
|
|
39
|
+
circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer.py,sha256=NJAZv5-awBVwyarE_DPvS70fULbVkZmPia3aOQmiYYk,3206
|
|
40
|
+
circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer_request.py,sha256=DNndRMDcDjpluXcOhPi1j6GIvuwMbk5UpsOWuDFeiAw,6647
|
|
38
41
|
circle/web3/developer_controlled_wallets/models/custody_type.py,sha256=-jwmNI1fRdu99uU6d8ewv6zXp7Of769WhIL0Qy1i_KI,704
|
|
39
42
|
circle/web3/developer_controlled_wallets/models/developer_wallet_set.py,sha256=P1ON_uNz_fTfSNtEZ9hxKu6J7uTFINoyTmrASDDjMe0,3447
|
|
40
43
|
circle/web3/developer_controlled_wallets/models/end_user_wallet_set.py,sha256=_-vg7A8IQUWm0OeAASrpwXaeN6F6FaqcgNC7kq_GJK4,3642
|
|
41
44
|
circle/web3/developer_controlled_wallets/models/eoa_wallet.py,sha256=nRwrBMt98gU6Pcow_udEWx6Z4ds-OkcYF89cqJuOGxs,5643
|
|
45
|
+
circle/web3/developer_controlled_wallets/models/eoa_wallet_with_balances.py,sha256=gF9h19GpD5RfWwZfCK_TL7CYWPGxceKf4VB1OZJRSJs,6496
|
|
42
46
|
circle/web3/developer_controlled_wallets/models/error.py,sha256=D43thFidD6O6DYDPGu7VThkOegMATdG3anTTx2UzeNQ,2661
|
|
43
|
-
circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request.py,sha256=
|
|
47
|
+
circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request.py,sha256=NrInYJIUkU99emlfrqf2jRw6tQY9ReT6OoUFNTY9Xb8,6086
|
|
44
48
|
circle/web3/developer_controlled_wallets/models/estimate_transaction_fee.py,sha256=843p1adcNxjo1kXxJm9NYLnqRvOzo7QDHCyLqVS-S2g,2951
|
|
45
49
|
circle/web3/developer_controlled_wallets/models/estimate_transaction_fee_data.py,sha256=orTybZ1SmCiivc4LNnu3EdzVOSdNUyxv7TFLsGTSyq4,4607
|
|
46
50
|
circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py,sha256=ARQ9xUsJjFE1MhLbBSDVb2hFslqUOP8bLpPtYmEnkTQ,5054
|
|
51
|
+
circle/web3/developer_controlled_wallets/models/evm_blockchain.py,sha256=eK8UNu0WLJe4q0HQ-Op_TuR6S94rXoFZdHk4EaW0kdE,917
|
|
47
52
|
circle/web3/developer_controlled_wallets/models/fee_level.py,sha256=udtM-56G8JXf7r680EmD404rH6J4IffcfhYIo2pYORE,985
|
|
53
|
+
circle/web3/developer_controlled_wallets/models/new_sca_core.py,sha256=DElcdgBxIB7oaT-uV0YJ6t4CrCyKTbtT_3MkzTE4PLs,756
|
|
48
54
|
circle/web3/developer_controlled_wallets/models/nft.py,sha256=HRrXxplK1UeCOQf27JoOxvM5HqEmuMPPNqD8Pd5xnDY,3756
|
|
49
55
|
circle/web3/developer_controlled_wallets/models/nfts.py,sha256=9CxeG7e5cO0X9rTMFnJslQYKysdEkRupvqsTsfdqNqc,2733
|
|
50
56
|
circle/web3/developer_controlled_wallets/models/nfts_data.py,sha256=HBYIYpzjvjI4ZSdLUGxmFUdEdd--paZSZnMiU8WWiKY,2953
|
|
@@ -56,7 +62,9 @@ circle/web3/developer_controlled_wallets/models/risk_category.py,sha256=33grvah3
|
|
|
56
62
|
circle/web3/developer_controlled_wallets/models/risk_score.py,sha256=6fYv3L2IFz4c3YgYqAx16A8BZ_e9wc_H_WPxCligN3U,706
|
|
57
63
|
circle/web3/developer_controlled_wallets/models/risk_signal.py,sha256=xjcdgecIlFpGX0UihoijlWm8aLNeArAcOr7bHAXCTic,3853
|
|
58
64
|
circle/web3/developer_controlled_wallets/models/risk_type.py,sha256=QWM4vdDO6z-9GH3lbROk-FCuaX-cMBnhf5WtVGufbUs,654
|
|
59
|
-
circle/web3/developer_controlled_wallets/models/
|
|
65
|
+
circle/web3/developer_controlled_wallets/models/sca_core.py,sha256=5cGTH-3MjMPIOniaZJqnTwvktU6wIOsdqUSBOPtXUrQ,957
|
|
66
|
+
circle/web3/developer_controlled_wallets/models/sca_wallet.py,sha256=ssgI_hZaDh05fBNvVqaqPC5zkoGwbLru3ki98CU1ASM,5827
|
|
67
|
+
circle/web3/developer_controlled_wallets/models/sca_wallet_with_balances.py,sha256=u6oxyNs9G_10xneqGnmTZok5GmSQJtXZ-bRG1IC4-i0,6680
|
|
60
68
|
circle/web3/developer_controlled_wallets/models/sign_delegate_action_request.py,sha256=ExlKj_6BQgbRqaUE6O4oFE-P4wpfzIyvNUElNAKqUy8,3470
|
|
61
69
|
circle/web3/developer_controlled_wallets/models/sign_delegate_action_response.py,sha256=G9AKrgLcf411k8-zV349geMrdo6j7t_MxiCIrOyHazE,3000
|
|
62
70
|
circle/web3/developer_controlled_wallets/models/sign_delegate_action_response_data.py,sha256=yMP_0T0BBLule9m5z_RCCKyUMZn_jFOkTAQ7jHWphs4,3104
|
|
@@ -100,7 +108,10 @@ circle/web3/developer_controlled_wallets/models/wallet_state.py,sha256=sM_nM5aSI
|
|
|
100
108
|
circle/web3/developer_controlled_wallets/models/wallets.py,sha256=FtATAK5iH8ZBPEiG-kphwFrxu_zqca16ptkXJPpYFBk,2769
|
|
101
109
|
circle/web3/developer_controlled_wallets/models/wallets_data.py,sha256=WBtomlq7WnzoNQ6ujPCqR_JbNh1sDkYzfdEp7afOdwk,3080
|
|
102
110
|
circle/web3/developer_controlled_wallets/models/wallets_data_wallets_inner.py,sha256=Qob2-DdcoyAx3pzDq8YJvB7u9RGqWJ5FP9M6M6c_Fzg,5163
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
circle_developer_controlled_wallets-5.0.
|
|
111
|
+
circle/web3/developer_controlled_wallets/models/wallets_with_balances.py,sha256=FsVV9EFdzXYoYrLN0iEjWQSi5MrfCS-2OjdVPGDtHlY,2915
|
|
112
|
+
circle/web3/developer_controlled_wallets/models/wallets_with_balances_data.py,sha256=refo6iYAoQOKU3X3t9mQ5Yf-vWV-6UzkuaexgNwhSjE,3226
|
|
113
|
+
circle/web3/developer_controlled_wallets/models/wallets_with_balances_data_wallets_inner.py,sha256=Bss1dqGl6TLi17jLgQtdb8l5MKbOBUPruyY982SCU5U,5671
|
|
114
|
+
circle_developer_controlled_wallets-5.2.0.dist-info/METADATA,sha256=0BPERi8N1E-fCBxyjsCT5sepWAqKAty6XlDyGXMoDM4,5992
|
|
115
|
+
circle_developer_controlled_wallets-5.2.0.dist-info/WHEEL,sha256=CmyFI0kx5cdEMTLiONQRbGQwjIoR1aIYB7eCAQ4KPJ0,91
|
|
116
|
+
circle_developer_controlled_wallets-5.2.0.dist-info/top_level.txt,sha256=yrA-kPXovTlZknK2uc3iesulUvyL15VSSoCtXIEdqm4,7
|
|
117
|
+
circle_developer_controlled_wallets-5.2.0.dist-info/RECORD,,
|