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,89 @@
|
|
|
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 Optional
|
|
18
|
+
from pydantic import BaseModel, Field, StrictStr
|
|
19
|
+
from circle.web3.developer_controlled_wallets.models.wallet_metadata import WalletMetadata
|
|
20
|
+
|
|
21
|
+
class BackfillWalletRequest(BaseModel):
|
|
22
|
+
"""
|
|
23
|
+
BackfillWalletRequest
|
|
24
|
+
"""
|
|
25
|
+
blockchain: StrictStr = Field(...)
|
|
26
|
+
metadata: Optional[WalletMetadata] = None
|
|
27
|
+
__properties = ["blockchain", "metadata"]
|
|
28
|
+
|
|
29
|
+
def __init__(self, **kwargs):
|
|
30
|
+
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
31
|
+
kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
|
|
32
|
+
|
|
33
|
+
if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
|
|
34
|
+
kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
|
|
35
|
+
super().__init__(**kwargs)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
class Config:
|
|
39
|
+
"""Pydantic configuration"""
|
|
40
|
+
allow_population_by_field_name = True
|
|
41
|
+
validate_assignment = True
|
|
42
|
+
|
|
43
|
+
def to_str(self) -> str:
|
|
44
|
+
"""Returns the string representation of the model using alias"""
|
|
45
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
46
|
+
|
|
47
|
+
def to_json(self) -> str:
|
|
48
|
+
"""Returns the JSON representation of the model using alias"""
|
|
49
|
+
return json.dumps(self.to_dict())
|
|
50
|
+
|
|
51
|
+
@classmethod
|
|
52
|
+
def from_json(cls, json_str: str) -> BackfillWalletRequest:
|
|
53
|
+
"""Create an instance of BackfillWalletRequest from a JSON string"""
|
|
54
|
+
return cls.from_dict(json.loads(json_str))
|
|
55
|
+
|
|
56
|
+
def to_dict(self):
|
|
57
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
58
|
+
_dict = self.dict(by_alias=True,
|
|
59
|
+
exclude={
|
|
60
|
+
},
|
|
61
|
+
exclude_none=True)
|
|
62
|
+
# override the default output from pydantic by calling `to_dict()` of metadata
|
|
63
|
+
if self.metadata:
|
|
64
|
+
_dict['metadata'] = self.metadata.to_dict()
|
|
65
|
+
return _dict
|
|
66
|
+
|
|
67
|
+
@classmethod
|
|
68
|
+
def from_dict(cls, obj: dict) -> BackfillWalletRequest:
|
|
69
|
+
"""Create an instance of BackfillWalletRequest from a dict"""
|
|
70
|
+
if obj is None:
|
|
71
|
+
return None
|
|
72
|
+
|
|
73
|
+
if not isinstance(obj, dict):
|
|
74
|
+
return BackfillWalletRequest.parse_obj(obj)
|
|
75
|
+
|
|
76
|
+
# fill idempotency_key and ciphertext with placeholder for auto_fill
|
|
77
|
+
if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
|
|
78
|
+
obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
|
|
79
|
+
|
|
80
|
+
if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
|
|
81
|
+
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
82
|
+
|
|
83
|
+
_obj = BackfillWalletRequest.parse_obj({
|
|
84
|
+
"blockchain": obj.get("blockchain"),
|
|
85
|
+
"metadata": WalletMetadata.from_dict(obj.get("metadata")) if obj.get("metadata") is not None else None
|
|
86
|
+
})
|
|
87
|
+
return _obj
|
|
88
|
+
|
|
89
|
+
|
|
@@ -22,7 +22,7 @@ class Balance(BaseModel):
|
|
|
22
22
|
"""
|
|
23
23
|
Balance
|
|
24
24
|
"""
|
|
25
|
-
amount: StrictStr = Field(..., description="
|
|
25
|
+
amount: StrictStr = Field(..., description="Token balance for each token in the wallet.")
|
|
26
26
|
token: Token = Field(...)
|
|
27
27
|
update_date: datetime = Field(..., alias="updateDate", description="Date and time the resource was last updated, in ISO-8601 UTC format.")
|
|
28
28
|
__properties = ["amount", "token", "updateDate"]
|
circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer.py
ADDED
|
@@ -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.create_transfer_transaction_for_developer_response_data import CreateTransferTransactionForDeveloperResponseData
|
|
20
|
+
|
|
21
|
+
class CreateWalletUpgradeTransactionForDeveloper(BaseModel):
|
|
22
|
+
"""
|
|
23
|
+
CreateWalletUpgradeTransactionForDeveloper
|
|
24
|
+
"""
|
|
25
|
+
data: CreateTransferTransactionForDeveloperResponseData = 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) -> CreateWalletUpgradeTransactionForDeveloper:
|
|
52
|
+
"""Create an instance of CreateWalletUpgradeTransactionForDeveloper 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) -> CreateWalletUpgradeTransactionForDeveloper:
|
|
68
|
+
"""Create an instance of CreateWalletUpgradeTransactionForDeveloper from a dict"""
|
|
69
|
+
if obj is None:
|
|
70
|
+
return None
|
|
71
|
+
|
|
72
|
+
if not isinstance(obj, dict):
|
|
73
|
+
return CreateWalletUpgradeTransactionForDeveloper.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 = CreateWalletUpgradeTransactionForDeveloper.parse_obj({
|
|
83
|
+
"data": CreateTransferTransactionForDeveloperResponseData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
84
|
+
})
|
|
85
|
+
return _obj
|
|
86
|
+
|
|
87
|
+
|
|
@@ -0,0 +1,103 @@
|
|
|
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 Optional, Union
|
|
18
|
+
from pydantic import BaseModel, Field, StrictBytes, StrictStr
|
|
19
|
+
from circle.web3.developer_controlled_wallets.models.fee_level import FeeLevel
|
|
20
|
+
from circle.web3.developer_controlled_wallets.models.new_sca_core import NewScaCore
|
|
21
|
+
|
|
22
|
+
class CreateWalletUpgradeTransactionForDeveloperRequest(BaseModel):
|
|
23
|
+
"""
|
|
24
|
+
CreateWalletUpgradeTransactionForDeveloperRequest
|
|
25
|
+
"""
|
|
26
|
+
idempotency_key: StrictStr = Field(..., alias="idempotencyKey", description="Universally unique identifier (UUID v4) idempotency key. This key is utilized to ensure exactly-once execution of mutating requests. To create a UUIDv4 go to [uuidgenerator.net](https://www.uuidgenerator.net). If the same key is reused, it will be treated as the same request and the original response will be returned.")
|
|
27
|
+
new_sca_core: NewScaCore = Field(..., alias="newScaCore")
|
|
28
|
+
entity_secret_ciphertext: Union[StrictBytes, StrictStr] = Field(..., alias="entitySecretCiphertext", description="A base64 string expression of the entity secret ciphertext. The entity secret should be encrypted by the entity public key. Circle mandates that the entity secret ciphertext is unique for each API request. ")
|
|
29
|
+
fee_level: Optional[FeeLevel] = Field(None, alias="feeLevel")
|
|
30
|
+
gas_limit: Optional[StrictStr] = Field(None, alias="gasLimit", description="The maximum units of gas to use for the transaction. Required if `feeLevel` is not provided. Estimates for this limit can be obtained through the `POST /transactions/transfer/estimateFee` API. GasLimit override (only supported for EOA wallets): Using `gasLimit` together with `feeLevel`, the provided `gasLimit` is required to be greater or equal to `feeLevel` estimation and will override the estimation's gasLimit. ")
|
|
31
|
+
gas_price: Optional[StrictStr] = Field(None, alias="gasPrice", description="For blockchains without EIP-1559 support, the maximum price of gas, in gwei, to use per each unit of gas (see `gasLimit`). Requires `gasLimit`. Cannot be used with `feeLevel`, `priorityFee`, or `maxFee`. Estimates for this fee can be obtained through the `POST /transactions/transfer/estimateFee` API. ")
|
|
32
|
+
max_fee: Optional[StrictStr] = Field(None, alias="maxFee", description="For blockchains with EIP-1559 support, the maximum price per unit of gas (see `gasLimit`), in gwei. Requires `priorityFee`, and `gasLimit` to be present. Cannot be used with `feeLevel` or `gasPrice`. Estimates for this fee can be obtained through the `POST /transactions/transfer/estimateFee` API. ")
|
|
33
|
+
priority_fee: Optional[StrictStr] = Field(None, alias="priorityFee", description="For blockchains with EIP-1559 support, the “tip”, in gwei, to add to the base fee as an incentive for validators. Please note that the `maxFee` and `gasLimit` parameters are required alongside the `priorityFee`. The `feeLevel` and `gasPrice` parameters cannot be used with the `priorityFee`. Estimations for this fee can be obtained through the `POST /transactions/transfer/estimateFee` API. ")
|
|
34
|
+
ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Optional reference or description used to identify the transaction.")
|
|
35
|
+
wallet_id: StrictStr = Field(..., alias="walletId", description="Unique system generated identifier of the wallet. Required when `sourceAddress` and `blockchain` are not provided. Mutually exclusive with `sourceAddress` and `blockchain`. For contract deploys this wallet ID will be used as the source. ")
|
|
36
|
+
__properties = ["idempotencyKey", "newScaCore", "entitySecretCiphertext", "feeLevel", "gasLimit", "gasPrice", "maxFee", "priorityFee", "refId", "walletId"]
|
|
37
|
+
|
|
38
|
+
def __init__(self, **kwargs):
|
|
39
|
+
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
40
|
+
kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
|
|
41
|
+
|
|
42
|
+
if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
|
|
43
|
+
kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
|
|
44
|
+
super().__init__(**kwargs)
|
|
45
|
+
|
|
46
|
+
|
|
47
|
+
class Config:
|
|
48
|
+
"""Pydantic configuration"""
|
|
49
|
+
allow_population_by_field_name = True
|
|
50
|
+
validate_assignment = True
|
|
51
|
+
|
|
52
|
+
def to_str(self) -> str:
|
|
53
|
+
"""Returns the string representation of the model using alias"""
|
|
54
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
55
|
+
|
|
56
|
+
def to_json(self) -> str:
|
|
57
|
+
"""Returns the JSON representation of the model using alias"""
|
|
58
|
+
return json.dumps(self.to_dict())
|
|
59
|
+
|
|
60
|
+
@classmethod
|
|
61
|
+
def from_json(cls, json_str: str) -> CreateWalletUpgradeTransactionForDeveloperRequest:
|
|
62
|
+
"""Create an instance of CreateWalletUpgradeTransactionForDeveloperRequest from a JSON string"""
|
|
63
|
+
return cls.from_dict(json.loads(json_str))
|
|
64
|
+
|
|
65
|
+
def to_dict(self):
|
|
66
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
67
|
+
_dict = self.dict(by_alias=True,
|
|
68
|
+
exclude={
|
|
69
|
+
},
|
|
70
|
+
exclude_none=True)
|
|
71
|
+
return _dict
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_dict(cls, obj: dict) -> CreateWalletUpgradeTransactionForDeveloperRequest:
|
|
75
|
+
"""Create an instance of CreateWalletUpgradeTransactionForDeveloperRequest from a dict"""
|
|
76
|
+
if obj is None:
|
|
77
|
+
return None
|
|
78
|
+
|
|
79
|
+
if not isinstance(obj, dict):
|
|
80
|
+
return CreateWalletUpgradeTransactionForDeveloperRequest.parse_obj(obj)
|
|
81
|
+
|
|
82
|
+
# fill idempotency_key and ciphertext with placeholder for auto_fill
|
|
83
|
+
if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
|
|
84
|
+
obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
|
|
85
|
+
|
|
86
|
+
if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
|
|
87
|
+
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
88
|
+
|
|
89
|
+
_obj = CreateWalletUpgradeTransactionForDeveloperRequest.parse_obj({
|
|
90
|
+
"idempotency_key": obj.get("idempotencyKey"),
|
|
91
|
+
"new_sca_core": obj.get("newScaCore"),
|
|
92
|
+
"entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
|
|
93
|
+
"fee_level": obj.get("feeLevel"),
|
|
94
|
+
"gas_limit": obj.get("gasLimit"),
|
|
95
|
+
"gas_price": obj.get("gasPrice"),
|
|
96
|
+
"max_fee": obj.get("maxFee"),
|
|
97
|
+
"priority_fee": obj.get("priorityFee"),
|
|
98
|
+
"ref_id": obj.get("refId"),
|
|
99
|
+
"wallet_id": obj.get("walletId")
|
|
100
|
+
})
|
|
101
|
+
return _obj
|
|
102
|
+
|
|
103
|
+
|
|
@@ -0,0 +1,127 @@
|
|
|
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.wallet_state import WalletState
|
|
23
|
+
|
|
24
|
+
class EOAWalletWithBalances(BaseModel):
|
|
25
|
+
"""
|
|
26
|
+
EOAWalletWithBalances
|
|
27
|
+
"""
|
|
28
|
+
id: StrictStr = Field(..., description="System-generated unique identifier of the resource.")
|
|
29
|
+
address: StrictStr = Field(..., description="Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects. ")
|
|
30
|
+
blockchain: Blockchain = Field(...)
|
|
31
|
+
create_date: datetime = Field(..., alias="createDate", description="Date and time the resource was created, in ISO-8601 UTC format.")
|
|
32
|
+
update_date: datetime = Field(..., alias="updateDate", description="Date and time the resource was last updated, in ISO-8601 UTC format.")
|
|
33
|
+
custody_type: CustodyType = Field(..., alias="custodyType")
|
|
34
|
+
name: Optional[StrictStr] = Field(None, description="Name or description associated with the wallet or walletSet.")
|
|
35
|
+
ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Reference or description used to identify the object.")
|
|
36
|
+
state: WalletState = Field(...)
|
|
37
|
+
user_id: Optional[constr(strict=True, max_length=50, min_length=5)] = Field(None, alias="userId", description="Unique system generated identifier for the user.")
|
|
38
|
+
wallet_set_id: StrictStr = Field(..., alias="walletSetId", description="System-generated unique identifier of the resource.")
|
|
39
|
+
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.")
|
|
40
|
+
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). ")
|
|
41
|
+
token_balances: conlist(Balance) = Field(..., alias="tokenBalances", description="Lists native token balances and, if specified, USDC/EURC balances for the wallets.")
|
|
42
|
+
__properties = ["id", "address", "blockchain", "createDate", "updateDate", "custodyType", "name", "refId", "state", "userId", "walletSetId", "initialPublicKey", "accountType", "tokenBalances"]
|
|
43
|
+
|
|
44
|
+
def __init__(self, **kwargs):
|
|
45
|
+
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
46
|
+
kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
|
|
47
|
+
|
|
48
|
+
if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
|
|
49
|
+
kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
|
|
50
|
+
super().__init__(**kwargs)
|
|
51
|
+
|
|
52
|
+
|
|
53
|
+
@validator('account_type')
|
|
54
|
+
def account_type_validate_enum(cls, value):
|
|
55
|
+
"""Validates the enum"""
|
|
56
|
+
if value not in ('EOA'):
|
|
57
|
+
raise ValueError("must be one of enum values ('EOA')")
|
|
58
|
+
return value
|
|
59
|
+
|
|
60
|
+
class Config:
|
|
61
|
+
"""Pydantic configuration"""
|
|
62
|
+
allow_population_by_field_name = True
|
|
63
|
+
validate_assignment = True
|
|
64
|
+
|
|
65
|
+
def to_str(self) -> str:
|
|
66
|
+
"""Returns the string representation of the model using alias"""
|
|
67
|
+
return pprint.pformat(self.dict(by_alias=True))
|
|
68
|
+
|
|
69
|
+
def to_json(self) -> str:
|
|
70
|
+
"""Returns the JSON representation of the model using alias"""
|
|
71
|
+
return json.dumps(self.to_dict())
|
|
72
|
+
|
|
73
|
+
@classmethod
|
|
74
|
+
def from_json(cls, json_str: str) -> EOAWalletWithBalances:
|
|
75
|
+
"""Create an instance of EOAWalletWithBalances from a JSON string"""
|
|
76
|
+
return cls.from_dict(json.loads(json_str))
|
|
77
|
+
|
|
78
|
+
def to_dict(self):
|
|
79
|
+
"""Returns the dictionary representation of the model using alias"""
|
|
80
|
+
_dict = self.dict(by_alias=True,
|
|
81
|
+
exclude={
|
|
82
|
+
},
|
|
83
|
+
exclude_none=True)
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of each item in token_balances (list)
|
|
85
|
+
_items = []
|
|
86
|
+
if self.token_balances:
|
|
87
|
+
for _item in self.token_balances:
|
|
88
|
+
if _item:
|
|
89
|
+
_items.append(_item.to_dict())
|
|
90
|
+
_dict['tokenBalances'] = _items
|
|
91
|
+
return _dict
|
|
92
|
+
|
|
93
|
+
@classmethod
|
|
94
|
+
def from_dict(cls, obj: dict) -> EOAWalletWithBalances:
|
|
95
|
+
"""Create an instance of EOAWalletWithBalances from a dict"""
|
|
96
|
+
if obj is None:
|
|
97
|
+
return None
|
|
98
|
+
|
|
99
|
+
if not isinstance(obj, dict):
|
|
100
|
+
return EOAWalletWithBalances.parse_obj(obj)
|
|
101
|
+
|
|
102
|
+
# fill idempotency_key and ciphertext with placeholder for auto_fill
|
|
103
|
+
if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
|
|
104
|
+
obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
|
|
105
|
+
|
|
106
|
+
if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
|
|
107
|
+
obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
|
|
108
|
+
|
|
109
|
+
_obj = EOAWalletWithBalances.parse_obj({
|
|
110
|
+
"id": obj.get("id"),
|
|
111
|
+
"address": obj.get("address"),
|
|
112
|
+
"blockchain": obj.get("blockchain"),
|
|
113
|
+
"create_date": obj.get("createDate"),
|
|
114
|
+
"update_date": obj.get("updateDate"),
|
|
115
|
+
"custody_type": obj.get("custodyType"),
|
|
116
|
+
"name": obj.get("name"),
|
|
117
|
+
"ref_id": obj.get("refId"),
|
|
118
|
+
"state": obj.get("state"),
|
|
119
|
+
"user_id": obj.get("userId"),
|
|
120
|
+
"wallet_set_id": obj.get("walletSetId"),
|
|
121
|
+
"initial_public_key": obj.get("initialPublicKey"),
|
|
122
|
+
"account_type": obj.get("accountType"),
|
|
123
|
+
"token_balances": [Balance.from_dict(_item) for _item in obj.get("tokenBalances")] if obj.get("tokenBalances") is not None else None
|
|
124
|
+
})
|
|
125
|
+
return _obj
|
|
126
|
+
|
|
127
|
+
|
|
@@ -23,7 +23,7 @@ class EstimateContractExecutionTransactionFeeRequest(BaseModel):
|
|
|
23
23
|
"""
|
|
24
24
|
EstimateContractExecutionTransactionFeeRequest
|
|
25
25
|
"""
|
|
26
|
-
abi_function_signature: StrictStr = Field(
|
|
26
|
+
abi_function_signature: Optional[StrictStr] = Field(None, alias="abiFunctionSignature", description="The contract ABI function signature or `callData` field is required for interacting with the smart contract. The ABI function signature cannot be used simultaneously with `callData`. e.g. burn(uint256)")
|
|
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.")
|
|
@@ -0,0 +1,44 @@
|
|
|
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 EvmBlockchain(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
|
+
ARB = 'ARB'
|
|
35
|
+
ARB_MINUS_SEPOLIA = 'ARB-SEPOLIA'
|
|
36
|
+
UNI = 'UNI'
|
|
37
|
+
UNI_MINUS_SEPOLIA = 'UNI-SEPOLIA'
|
|
38
|
+
|
|
39
|
+
@classmethod
|
|
40
|
+
def from_json(cls, json_str: str) -> EvmBlockchain:
|
|
41
|
+
"""Create an instance of EvmBlockchain from a JSON string"""
|
|
42
|
+
return EvmBlockchain(json.loads(json_str))
|
|
43
|
+
|
|
44
|
+
|
|
@@ -0,0 +1,35 @@
|
|
|
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 NewScaCore(str, Enum):
|
|
21
|
+
"""
|
|
22
|
+
`newScaCore` displays the version of the SCA available for upgrade. For a list of supported versions, refer to the developer documentation.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
"""
|
|
26
|
+
allowed enum values
|
|
27
|
+
"""
|
|
28
|
+
CIRCLE_6900_SINGLEOWNER_V2 = 'circle_6900_singleowner_v2'
|
|
29
|
+
|
|
30
|
+
@classmethod
|
|
31
|
+
def from_json(cls, json_str: str) -> NewScaCore:
|
|
32
|
+
"""Create an instance of NewScaCore from a JSON string"""
|
|
33
|
+
return NewScaCore(json.loads(json_str))
|
|
34
|
+
|
|
35
|
+
|
|
@@ -0,0 +1,38 @@
|
|
|
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 ScaCore(str, Enum):
|
|
21
|
+
"""
|
|
22
|
+
SCAs have different versions, each with unique functionality. `SCACore` displays the version of the SCA being created. For a list of supported versions, refer to the developer documentation.
|
|
23
|
+
"""
|
|
24
|
+
|
|
25
|
+
"""
|
|
26
|
+
allowed enum values
|
|
27
|
+
"""
|
|
28
|
+
CIRCLE_4337_V1 = 'circle_4337_v1'
|
|
29
|
+
CIRCLE_6900_SINGLEOWNER_V1 = 'circle_6900_singleowner_v1'
|
|
30
|
+
CIRCLE_6900_SINGLEOWNER_V2 = 'circle_6900_singleowner_v2'
|
|
31
|
+
CIRCLE_6900_SINGLEOWNER_V3 = 'circle_6900_singleowner_v3'
|
|
32
|
+
|
|
33
|
+
@classmethod
|
|
34
|
+
def from_json(cls, json_str: str) -> ScaCore:
|
|
35
|
+
"""Create an instance of ScaCore from a JSON string"""
|
|
36
|
+
return ScaCore(json.loads(json_str))
|
|
37
|
+
|
|
38
|
+
|
|
@@ -18,6 +18,7 @@ from typing import Optional
|
|
|
18
18
|
from pydantic import BaseModel, Field, StrictStr, constr, validator
|
|
19
19
|
from circle.web3.developer_controlled_wallets.models.blockchain import Blockchain
|
|
20
20
|
from circle.web3.developer_controlled_wallets.models.custody_type import CustodyType
|
|
21
|
+
from circle.web3.developer_controlled_wallets.models.sca_core import ScaCore
|
|
21
22
|
from circle.web3.developer_controlled_wallets.models.wallet_state import WalletState
|
|
22
23
|
|
|
23
24
|
class SCAWallet(BaseModel):
|
|
@@ -37,7 +38,7 @@ class SCAWallet(BaseModel):
|
|
|
37
38
|
wallet_set_id: StrictStr = Field(..., alias="walletSetId", description="System-generated unique identifier of the resource.")
|
|
38
39
|
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.")
|
|
39
40
|
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). ")
|
|
40
|
-
sca_core:
|
|
41
|
+
sca_core: ScaCore = Field(..., alias="scaCore")
|
|
41
42
|
__properties = ["id", "address", "blockchain", "createDate", "updateDate", "custodyType", "name", "refId", "state", "userId", "walletSetId", "initialPublicKey", "accountType", "scaCore"]
|
|
42
43
|
|
|
43
44
|
def __init__(self, **kwargs):
|