circle-developer-controlled-wallets 1.0__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.
- circle/web3/developer_controlled_wallets/__init__.py +26 -24
- circle/web3/developer_controlled_wallets/api/signing_api.py +2 -2
- circle/web3/developer_controlled_wallets/api/token_lookup_api.py +1 -1
- circle/web3/developer_controlled_wallets/api/transactions_api.py +25 -23
- circle/web3/developer_controlled_wallets/api/wallet_sets_api.py +118 -80
- circle/web3/developer_controlled_wallets/api/wallets_api.py +240 -209
- circle/web3/developer_controlled_wallets/api_client.py +1 -1
- circle/web3/developer_controlled_wallets/configuration.py +3 -3
- circle/web3/developer_controlled_wallets/models/__init__.py +25 -23
- circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_response.py +1 -1
- circle/web3/developer_controlled_wallets/models/account_type.py +1 -1
- circle/web3/developer_controlled_wallets/models/bad_request_response.py +85 -0
- circle/web3/developer_controlled_wallets/models/balance.py +1 -1
- circle/web3/developer_controlled_wallets/models/blockchain.py +3 -1
- circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer_response.py +1 -1
- circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer_request.py +4 -4
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py +6 -5
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response.py +1 -1
- circle/web3/developer_controlled_wallets/models/{create_developer_wallet_request.py → create_wallet_request.py} +9 -9
- circle/web3/developer_controlled_wallets/models/{create_developer_wallet_set_request.py → create_wallet_set_request.py} +11 -11
- circle/web3/developer_controlled_wallets/models/custody_type.py +1 -1
- circle/web3/developer_controlled_wallets/models/{update_wallet_set_metadata_response.py → developer_wallet_set.py} +26 -17
- circle/web3/developer_controlled_wallets/models/{wallet_set_response.py → end_user_wallet_set.py} +24 -20
- circle/web3/developer_controlled_wallets/models/{ext_wallet_response_wallet.py → eoa_wallet.py} +29 -25
- circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request.py +2 -2
- circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request_blockchain.py +40 -0
- circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py +2 -1
- circle/web3/developer_controlled_wallets/models/nft.py +1 -1
- circle/web3/developer_controlled_wallets/models/not_authorized_response.py +85 -0
- circle/web3/developer_controlled_wallets/models/not_found_response.py +85 -0
- circle/web3/developer_controlled_wallets/models/sca_wallet.py +117 -0
- circle/web3/developer_controlled_wallets/models/token_blockchain.py +42 -0
- circle/web3/developer_controlled_wallets/models/token_response.py +3 -3
- circle/web3/developer_controlled_wallets/models/transaction.py +3 -3
- circle/web3/developer_controlled_wallets/models/{ext_update_wallet_metadata_request.py → update_wallet_request.py} +9 -9
- circle/web3/developer_controlled_wallets/models/{update_wallet_set_metadata_request.py → update_wallet_set_request.py} +8 -8
- circle/web3/developer_controlled_wallets/models/{wallet_response.py → wallet.py} +17 -22
- circle/web3/developer_controlled_wallets/models/{update_wallet200_response.py → wallet2.py} +13 -13
- circle/web3/developer_controlled_wallets/models/{ext_wallet_response.py → wallet2_data.py} +13 -13
- circle/web3/developer_controlled_wallets/models/wallet_metadata.py +1 -1
- circle/web3/developer_controlled_wallets/models/wallet_set.py +87 -0
- circle/web3/developer_controlled_wallets/models/{get_wallet200_response.py → wallet_set2.py} +13 -13
- circle/web3/developer_controlled_wallets/models/{get_wallet_set_by_id_response.py → wallet_set2_data.py} +12 -12
- circle/web3/developer_controlled_wallets/models/{list_wallets200_response.py → wallet_sets.py} +13 -13
- circle/web3/developer_controlled_wallets/models/{get_wallet_sets_response.py → wallet_sets_data.py} +12 -12
- circle/web3/developer_controlled_wallets/models/wallet_sets_data_wallet_sets_inner.py +140 -0
- circle/web3/developer_controlled_wallets/models/wallet_state.py +1 -1
- circle/web3/developer_controlled_wallets/models/{get_wallet_set200_response.py → wallets.py} +13 -13
- circle/web3/developer_controlled_wallets/models/{ext_get_all_wallets_response.py → wallets_data.py} +13 -13
- circle/web3/developer_controlled_wallets/models/wallets_data_wallets_inner.py +140 -0
- {circle_developer_controlled_wallets-1.0.dist-info → circle_developer_controlled_wallets-1.1.0.dist-info}/METADATA +4 -4
- {circle_developer_controlled_wallets-1.0.dist-info → circle_developer_controlled_wallets-1.1.0.dist-info}/RECORD +54 -52
- circle/web3/developer_controlled_wallets/models/create_developer_wallet200_response.py +0 -87
- circle/web3/developer_controlled_wallets/models/create_developer_wallet_response.py +0 -91
- circle/web3/developer_controlled_wallets/models/create_developer_wallet_set_response.py +0 -87
- circle/web3/developer_controlled_wallets/models/create_wallet_set200_response.py +0 -87
- circle/web3/developer_controlled_wallets/models/ext_get_wallet_by_id_response.py +0 -87
- circle/web3/developer_controlled_wallets/models/list_wallet_sets200_response.py +0 -87
- circle/web3/developer_controlled_wallets/models/update_wallet_set200_response.py +0 -87
- {circle_developer_controlled_wallets-1.0.dist-info → circle_developer_controlled_wallets-1.1.0.dist-info}/WHEEL +0 -0
- {circle_developer_controlled_wallets-1.0.dist-info → circle_developer_controlled_wallets-1.1.0.dist-info}/top_level.txt +0 -0
circle/web3/developer_controlled_wallets/models/{get_wallet_sets_response.py → wallet_sets_data.py}
RENAMED
|
@@ -14,15 +14,15 @@ import re # noqa: F401
|
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
from typing import List
|
|
17
|
+
from typing import List
|
|
18
18
|
from pydantic import BaseModel, Field, conlist
|
|
19
|
-
from circle.web3.developer_controlled_wallets.models.
|
|
19
|
+
from circle.web3.developer_controlled_wallets.models.wallet_sets_data_wallet_sets_inner import WalletSetsDataWalletSetsInner
|
|
20
20
|
|
|
21
|
-
class
|
|
21
|
+
class WalletSetsData(BaseModel):
|
|
22
22
|
"""
|
|
23
|
-
|
|
23
|
+
WalletSetsData
|
|
24
24
|
"""
|
|
25
|
-
wallet_sets:
|
|
25
|
+
wallet_sets: conlist(WalletSetsDataWalletSetsInner) = Field(..., alias="walletSets")
|
|
26
26
|
__properties = ["walletSets"]
|
|
27
27
|
|
|
28
28
|
def __init__(self, **kwargs):
|
|
@@ -48,8 +48,8 @@ class GetWalletSetsResponse(BaseModel):
|
|
|
48
48
|
return json.dumps(self.to_dict())
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
|
-
def from_json(cls, json_str: str) ->
|
|
52
|
-
"""Create an instance of
|
|
51
|
+
def from_json(cls, json_str: str) -> WalletSetsData:
|
|
52
|
+
"""Create an instance of WalletSetsData 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 GetWalletSetsResponse(BaseModel):
|
|
|
68
68
|
return _dict
|
|
69
69
|
|
|
70
70
|
@classmethod
|
|
71
|
-
def from_dict(cls, obj: dict) ->
|
|
72
|
-
"""Create an instance of
|
|
71
|
+
def from_dict(cls, obj: dict) -> WalletSetsData:
|
|
72
|
+
"""Create an instance of WalletSetsData from a dict"""
|
|
73
73
|
if obj is None:
|
|
74
74
|
return None
|
|
75
75
|
|
|
76
76
|
if not isinstance(obj, dict):
|
|
77
|
-
return
|
|
77
|
+
return WalletSetsData.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,8 +83,8 @@ class GetWalletSetsResponse(BaseModel):
|
|
|
83
83
|
if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
|
|
84
84
|
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
85
85
|
|
|
86
|
-
_obj =
|
|
87
|
-
"wallet_sets": [
|
|
86
|
+
_obj = WalletSetsData.parse_obj({
|
|
87
|
+
"wallet_sets": [WalletSetsDataWalletSetsInner.from_dict(_item) for _item in obj.get("walletSets")] if obj.get("walletSets") is not None else None
|
|
88
88
|
})
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
@@ -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.developer_wallet_set import DeveloperWalletSet
|
|
20
|
+
from circle.web3.developer_controlled_wallets.models.end_user_wallet_set import EndUserWalletSet
|
|
21
|
+
from typing import Union, Any, List, TYPE_CHECKING
|
|
22
|
+
from pydantic import StrictStr, Field
|
|
23
|
+
|
|
24
|
+
WALLETSETSDATAWALLETSETSINNER_ONE_OF_SCHEMAS = ["DeveloperWalletSet", "EndUserWalletSet"]
|
|
25
|
+
|
|
26
|
+
class WalletSetsDataWalletSetsInner(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
WalletSetsDataWalletSetsInner
|
|
29
|
+
"""
|
|
30
|
+
# data type: DeveloperWalletSet
|
|
31
|
+
oneof_schema_1_validator: Optional[DeveloperWalletSet] = None
|
|
32
|
+
# data type: EndUserWalletSet
|
|
33
|
+
oneof_schema_2_validator: Optional[EndUserWalletSet] = None
|
|
34
|
+
if TYPE_CHECKING:
|
|
35
|
+
actual_instance: Union[DeveloperWalletSet, EndUserWalletSet]
|
|
36
|
+
else:
|
|
37
|
+
actual_instance: Any
|
|
38
|
+
one_of_schemas: List[str] = Field(WALLETSETSDATAWALLETSETSINNER_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 = WalletSetsDataWalletSetsInner.construct()
|
|
59
|
+
error_messages = []
|
|
60
|
+
match = 0
|
|
61
|
+
# validate data type: DeveloperWalletSet
|
|
62
|
+
if not isinstance(v, DeveloperWalletSet):
|
|
63
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `DeveloperWalletSet`")
|
|
64
|
+
else:
|
|
65
|
+
match += 1
|
|
66
|
+
# validate data type: EndUserWalletSet
|
|
67
|
+
if not isinstance(v, EndUserWalletSet):
|
|
68
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `EndUserWalletSet`")
|
|
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 WalletSetsDataWalletSetsInner with oneOf schemas: DeveloperWalletSet, EndUserWalletSet. Details: " + ", ".join(error_messages))
|
|
74
|
+
elif match == 0:
|
|
75
|
+
# no match
|
|
76
|
+
raise ValueError("No match found when setting `actual_instance` in WalletSetsDataWalletSetsInner with oneOf schemas: DeveloperWalletSet, EndUserWalletSet. Details: " + ", ".join(error_messages))
|
|
77
|
+
else:
|
|
78
|
+
return v
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: dict) -> WalletSetsDataWalletSetsInner:
|
|
82
|
+
return cls.from_json(json.dumps(obj))
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_json(cls, json_str: str) -> WalletSetsDataWalletSetsInner:
|
|
86
|
+
"""Returns the object represented by the json string"""
|
|
87
|
+
instance = WalletSetsDataWalletSetsInner.construct()
|
|
88
|
+
error_messages = []
|
|
89
|
+
match = 0
|
|
90
|
+
|
|
91
|
+
# deserialize data into DeveloperWalletSet
|
|
92
|
+
try:
|
|
93
|
+
instance.actual_instance = DeveloperWalletSet.from_json(json_str)
|
|
94
|
+
match += 1
|
|
95
|
+
except (ValidationError, ValueError) as e:
|
|
96
|
+
error_messages.append(str(e))
|
|
97
|
+
# deserialize data into EndUserWalletSet
|
|
98
|
+
try:
|
|
99
|
+
instance.actual_instance = EndUserWalletSet.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 WalletSetsDataWalletSetsInner with oneOf schemas: DeveloperWalletSet, EndUserWalletSet. Details: " + ", ".join(error_messages))
|
|
107
|
+
elif match == 0:
|
|
108
|
+
# no match
|
|
109
|
+
raise ValueError("No match found when deserializing the JSON string into WalletSetsDataWalletSetsInner with oneOf schemas: DeveloperWalletSet, EndUserWalletSet. 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
|
+
|
circle/web3/developer_controlled_wallets/models/{get_wallet_set200_response.py → wallets.py}
RENAMED
|
@@ -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_wallet_set_by_id_response import GetWalletSetByIDResponse
|
|
20
17
|
|
|
21
|
-
|
|
18
|
+
from pydantic import BaseModel, Field
|
|
19
|
+
from circle.web3.developer_controlled_wallets.models.wallets_data import WalletsData
|
|
20
|
+
|
|
21
|
+
class Wallets(BaseModel):
|
|
22
22
|
"""
|
|
23
|
-
|
|
23
|
+
Wallets
|
|
24
24
|
"""
|
|
25
|
-
data:
|
|
25
|
+
data: WalletsData = Field(...)
|
|
26
26
|
__properties = ["data"]
|
|
27
27
|
|
|
28
28
|
def __init__(self, **kwargs):
|
|
@@ -48,8 +48,8 @@ class GetWalletSet200Response(BaseModel):
|
|
|
48
48
|
return json.dumps(self.to_dict())
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
|
-
def from_json(cls, json_str: str) ->
|
|
52
|
-
"""Create an instance of
|
|
51
|
+
def from_json(cls, json_str: str) -> Wallets:
|
|
52
|
+
"""Create an instance of Wallets 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 GetWalletSet200Response(BaseModel):
|
|
|
64
64
|
return _dict
|
|
65
65
|
|
|
66
66
|
@classmethod
|
|
67
|
-
def from_dict(cls, obj: dict) ->
|
|
68
|
-
"""Create an instance of
|
|
67
|
+
def from_dict(cls, obj: dict) -> Wallets:
|
|
68
|
+
"""Create an instance of Wallets from a dict"""
|
|
69
69
|
if obj is None:
|
|
70
70
|
return None
|
|
71
71
|
|
|
72
72
|
if not isinstance(obj, dict):
|
|
73
|
-
return
|
|
73
|
+
return Wallets.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 GetWalletSet200Response(BaseModel):
|
|
|
79
79
|
if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
|
|
80
80
|
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
81
81
|
|
|
82
|
-
_obj =
|
|
83
|
-
"data":
|
|
82
|
+
_obj = Wallets.parse_obj({
|
|
83
|
+
"data": WalletsData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
84
84
|
})
|
|
85
85
|
return _obj
|
|
86
86
|
|
circle/web3/developer_controlled_wallets/models/{ext_get_all_wallets_response.py → wallets_data.py}
RENAMED
|
@@ -14,15 +14,15 @@ import re # noqa: F401
|
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
from typing import List
|
|
18
|
-
from pydantic import BaseModel, conlist
|
|
19
|
-
from circle.web3.developer_controlled_wallets.models.
|
|
17
|
+
from typing import List
|
|
18
|
+
from pydantic import BaseModel, Field, conlist
|
|
19
|
+
from circle.web3.developer_controlled_wallets.models.wallets_data_wallets_inner import WalletsDataWalletsInner
|
|
20
20
|
|
|
21
|
-
class
|
|
21
|
+
class WalletsData(BaseModel):
|
|
22
22
|
"""
|
|
23
|
-
|
|
23
|
+
WalletsData
|
|
24
24
|
"""
|
|
25
|
-
wallets:
|
|
25
|
+
wallets: conlist(WalletsDataWalletsInner) = Field(...)
|
|
26
26
|
__properties = ["wallets"]
|
|
27
27
|
|
|
28
28
|
def __init__(self, **kwargs):
|
|
@@ -48,8 +48,8 @@ class ExtGetAllWalletsResponse(BaseModel):
|
|
|
48
48
|
return json.dumps(self.to_dict())
|
|
49
49
|
|
|
50
50
|
@classmethod
|
|
51
|
-
def from_json(cls, json_str: str) ->
|
|
52
|
-
"""Create an instance of
|
|
51
|
+
def from_json(cls, json_str: str) -> WalletsData:
|
|
52
|
+
"""Create an instance of WalletsData 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 ExtGetAllWalletsResponse(BaseModel):
|
|
|
68
68
|
return _dict
|
|
69
69
|
|
|
70
70
|
@classmethod
|
|
71
|
-
def from_dict(cls, obj: dict) ->
|
|
72
|
-
"""Create an instance of
|
|
71
|
+
def from_dict(cls, obj: dict) -> WalletsData:
|
|
72
|
+
"""Create an instance of WalletsData from a dict"""
|
|
73
73
|
if obj is None:
|
|
74
74
|
return None
|
|
75
75
|
|
|
76
76
|
if not isinstance(obj, dict):
|
|
77
|
-
return
|
|
77
|
+
return WalletsData.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,8 +83,8 @@ class ExtGetAllWalletsResponse(BaseModel):
|
|
|
83
83
|
if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
|
|
84
84
|
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
85
85
|
|
|
86
|
-
_obj =
|
|
87
|
-
"wallets": [
|
|
86
|
+
_obj = WalletsData.parse_obj({
|
|
87
|
+
"wallets": [WalletsDataWalletsInner.from_dict(_item) for _item in obj.get("wallets")] if obj.get("wallets") is not None else None
|
|
88
88
|
})
|
|
89
89
|
return _obj
|
|
90
90
|
|
|
@@ -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 import EOAWallet
|
|
20
|
+
from circle.web3.developer_controlled_wallets.models.sca_wallet import SCAWallet
|
|
21
|
+
from typing import Union, Any, List, TYPE_CHECKING
|
|
22
|
+
from pydantic import StrictStr, Field
|
|
23
|
+
|
|
24
|
+
WALLETSDATAWALLETSINNER_ONE_OF_SCHEMAS = ["EOAWallet", "SCAWallet"]
|
|
25
|
+
|
|
26
|
+
class WalletsDataWalletsInner(BaseModel):
|
|
27
|
+
"""
|
|
28
|
+
WalletsDataWalletsInner
|
|
29
|
+
"""
|
|
30
|
+
# data type: EOAWallet
|
|
31
|
+
oneof_schema_1_validator: Optional[EOAWallet] = None
|
|
32
|
+
# data type: SCAWallet
|
|
33
|
+
oneof_schema_2_validator: Optional[SCAWallet] = None
|
|
34
|
+
if TYPE_CHECKING:
|
|
35
|
+
actual_instance: Union[EOAWallet, SCAWallet]
|
|
36
|
+
else:
|
|
37
|
+
actual_instance: Any
|
|
38
|
+
one_of_schemas: List[str] = Field(WALLETSDATAWALLETSINNER_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 = WalletsDataWalletsInner.construct()
|
|
59
|
+
error_messages = []
|
|
60
|
+
match = 0
|
|
61
|
+
# validate data type: EOAWallet
|
|
62
|
+
if not isinstance(v, EOAWallet):
|
|
63
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `EOAWallet`")
|
|
64
|
+
else:
|
|
65
|
+
match += 1
|
|
66
|
+
# validate data type: SCAWallet
|
|
67
|
+
if not isinstance(v, SCAWallet):
|
|
68
|
+
error_messages.append(f"Error! Input type `{type(v)}` is not `SCAWallet`")
|
|
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 WalletsDataWalletsInner with oneOf schemas: EOAWallet, SCAWallet. Details: " + ", ".join(error_messages))
|
|
74
|
+
elif match == 0:
|
|
75
|
+
# no match
|
|
76
|
+
raise ValueError("No match found when setting `actual_instance` in WalletsDataWalletsInner with oneOf schemas: EOAWallet, SCAWallet. Details: " + ", ".join(error_messages))
|
|
77
|
+
else:
|
|
78
|
+
return v
|
|
79
|
+
|
|
80
|
+
@classmethod
|
|
81
|
+
def from_dict(cls, obj: dict) -> WalletsDataWalletsInner:
|
|
82
|
+
return cls.from_json(json.dumps(obj))
|
|
83
|
+
|
|
84
|
+
@classmethod
|
|
85
|
+
def from_json(cls, json_str: str) -> WalletsDataWalletsInner:
|
|
86
|
+
"""Returns the object represented by the json string"""
|
|
87
|
+
instance = WalletsDataWalletsInner.construct()
|
|
88
|
+
error_messages = []
|
|
89
|
+
match = 0
|
|
90
|
+
|
|
91
|
+
# deserialize data into EOAWallet
|
|
92
|
+
try:
|
|
93
|
+
instance.actual_instance = EOAWallet.from_json(json_str)
|
|
94
|
+
match += 1
|
|
95
|
+
except (ValidationError, ValueError) as e:
|
|
96
|
+
error_messages.append(str(e))
|
|
97
|
+
# deserialize data into SCAWallet
|
|
98
|
+
try:
|
|
99
|
+
instance.actual_instance = SCAWallet.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 WalletsDataWalletsInner with oneOf schemas: EOAWallet, SCAWallet. Details: " + ", ".join(error_messages))
|
|
107
|
+
elif match == 0:
|
|
108
|
+
# no match
|
|
109
|
+
raise ValueError("No match found when deserializing the JSON string into WalletsDataWalletsInner with oneOf schemas: EOAWallet, SCAWallet. 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
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: circle-developer-controlled-wallets
|
|
3
|
-
Version: 1.0
|
|
3
|
+
Version: 1.1.0
|
|
4
4
|
Summary: Developer-Controlled Wallets
|
|
5
5
|
Home-page:
|
|
6
6
|
Author: OpenAPI Generator community
|
|
@@ -12,14 +12,14 @@ 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 ==1.0
|
|
16
|
-
Requires-Dist: circle-web3-sdk-util ==1.0
|
|
15
|
+
Requires-Dist: circle-configurations ==1.1.0
|
|
16
|
+
Requires-Dist: circle-web3-sdk-util ==1.1.0
|
|
17
17
|
|
|
18
18
|
# circle-developer-controlled-wallets
|
|
19
19
|
Developer-Controlled Wallets API documentation.
|
|
20
20
|
|
|
21
21
|
- API version: 1.0
|
|
22
|
-
- Package version: 1.0
|
|
22
|
+
- Package version: 1.1.0
|
|
23
23
|
|
|
24
24
|
## Requirements.
|
|
25
25
|
|