circle-developer-controlled-wallets 6.0.0__py3-none-any.whl → 8.1.1__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.
- circle/web3/developer_controlled_wallets/__init__.py +6 -1
- circle/web3/developer_controlled_wallets/api/signing_api.py +65 -31
- circle/web3/developer_controlled_wallets/api/transactions_api.py +299 -58
- circle/web3/developer_controlled_wallets/api/wallet_sets_api.py +16 -8
- circle/web3/developer_controlled_wallets/api/wallets_api.py +62 -30
- circle/web3/developer_controlled_wallets/api_client.py +1 -1
- circle/web3/developer_controlled_wallets/configuration.py +9 -2
- circle/web3/developer_controlled_wallets/models/__init__.py +5 -0
- circle/web3/developer_controlled_wallets/models/abi_parameters_inner.py +5 -5
- circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer.py +10 -2
- circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_request.py +11 -3
- circle/web3/developer_controlled_wallets/models/account_type.py +1 -1
- circle/web3/developer_controlled_wallets/models/bad_request_response.py +11 -3
- circle/web3/developer_controlled_wallets/models/balance.py +12 -4
- circle/web3/developer_controlled_wallets/models/balances.py +10 -2
- circle/web3/developer_controlled_wallets/models/balances_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/base_screening_decision.py +12 -4
- circle/web3/developer_controlled_wallets/models/blockchain.py +3 -0
- circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer.py +10 -2
- circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer_request.py +11 -3
- circle/web3/developer_controlled_wallets/models/contract_execution_blockchain.py +2 -1
- circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer.py +10 -2
- circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer_request.py +34 -21
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py +37 -24
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request_blockchain.py +130 -0
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response_data.py +11 -3
- circle/web3/developer_controlled_wallets/models/create_wallet_request.py +16 -8
- circle/web3/developer_controlled_wallets/models/create_wallet_set_request.py +12 -4
- circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer.py +10 -2
- circle/web3/developer_controlled_wallets/models/create_wallet_upgrade_transaction_for_developer_request.py +24 -16
- circle/web3/developer_controlled_wallets/models/derive_wallet_request.py +10 -2
- circle/web3/developer_controlled_wallets/models/developer_wallet_set.py +13 -5
- circle/web3/developer_controlled_wallets/models/end_user_wallet_set.py +14 -6
- circle/web3/developer_controlled_wallets/models/eoa_wallet.py +23 -15
- circle/web3/developer_controlled_wallets/models/eoa_wallet_with_balances.py +24 -16
- circle/web3/developer_controlled_wallets/models/error.py +11 -3
- circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request.py +18 -10
- circle/web3/developer_controlled_wallets/models/estimate_transaction_fee.py +10 -2
- circle/web3/developer_controlled_wallets/models/estimate_transaction_fee_data.py +15 -7
- circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py +18 -10
- circle/web3/developer_controlled_wallets/models/evm_blockchain.py +2 -0
- circle/web3/developer_controlled_wallets/models/fee_level.py +1 -1
- circle/web3/developer_controlled_wallets/models/get_lowest_nonce_transaction_response.py +95 -0
- circle/web3/developer_controlled_wallets/models/get_lowest_nonce_transaction_response_data.py +101 -0
- circle/web3/developer_controlled_wallets/models/lowest_nonce_transaction_fee_info.py +97 -0
- circle/web3/developer_controlled_wallets/models/nft.py +14 -6
- circle/web3/developer_controlled_wallets/models/nfts.py +10 -2
- circle/web3/developer_controlled_wallets/models/nfts_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/not_authorized_response.py +11 -3
- circle/web3/developer_controlled_wallets/models/not_found_response.py +11 -3
- circle/web3/developer_controlled_wallets/models/risk_signal.py +14 -6
- circle/web3/developer_controlled_wallets/models/sca_wallet.py +24 -16
- circle/web3/developer_controlled_wallets/models/sca_wallet_with_balances.py +25 -17
- circle/web3/developer_controlled_wallets/models/sign_delegate_action_request.py +12 -4
- circle/web3/developer_controlled_wallets/models/sign_delegate_action_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/sign_delegate_action_response_data.py +11 -3
- circle/web3/developer_controlled_wallets/models/sign_message_request.py +21 -8
- circle/web3/developer_controlled_wallets/models/sign_transaction_request.py +21 -8
- circle/web3/developer_controlled_wallets/models/sign_transaction_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/sign_transaction_response_data.py +12 -4
- circle/web3/developer_controlled_wallets/models/sign_typed_data_request.py +20 -7
- circle/web3/developer_controlled_wallets/models/signature_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/signature_response_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/token.py +19 -11
- circle/web3/developer_controlled_wallets/models/token_blockchain.py +3 -0
- circle/web3/developer_controlled_wallets/models/token_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/token_response_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/transaction.py +41 -33
- circle/web3/developer_controlled_wallets/models/transaction_fee.py +24 -12
- circle/web3/developer_controlled_wallets/models/transaction_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/transaction_response_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/transaction_screening_decision.py +13 -5
- circle/web3/developer_controlled_wallets/models/transaction_state.py +2 -1
- circle/web3/developer_controlled_wallets/models/transactions.py +10 -2
- circle/web3/developer_controlled_wallets/models/transactions_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/transfer_blockchain.py +53 -0
- circle/web3/developer_controlled_wallets/models/update_wallet_request.py +11 -3
- circle/web3/developer_controlled_wallets/models/update_wallet_set_request.py +10 -2
- circle/web3/developer_controlled_wallets/models/validate_address.py +10 -2
- circle/web3/developer_controlled_wallets/models/validate_address_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/validate_address_request.py +11 -3
- circle/web3/developer_controlled_wallets/models/wallet.py +21 -13
- circle/web3/developer_controlled_wallets/models/wallet_metadata.py +11 -3
- circle/web3/developer_controlled_wallets/models/wallet_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallet_response_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallet_set.py +12 -4
- circle/web3/developer_controlled_wallets/models/wallet_set_response.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallet_set_response_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallet_sets.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallet_sets_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallets.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallets_data.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallets_with_balances.py +10 -2
- circle/web3/developer_controlled_wallets/models/wallets_with_balances_data.py +10 -2
- {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/METADATA +4 -4
- {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/RECORD +100 -95
- {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/WHEEL +1 -1
- {circle_developer_controlled_wallets-6.0.0.dist-info → circle_developer_controlled_wallets-8.1.1.dist-info}/top_level.txt +0 -0
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
from typing import Optional
|
|
18
23
|
from pydantic import BaseModel
|
|
@@ -44,8 +49,10 @@ class AccelerateTransactionForDeveloper(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> AccelerateTransactionForDeveloper:
|
|
@@ -81,6 +88,7 @@ class AccelerateTransactionForDeveloper(BaseModel):
|
|
|
81
88
|
|
|
82
89
|
_obj = AccelerateTransactionForDeveloper.parse_obj({
|
|
83
90
|
"data": AccelerateTransactionForDeveloperData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
91
|
+
|
|
84
92
|
})
|
|
85
93
|
return _obj
|
|
86
94
|
|
circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_data.py
CHANGED
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
from typing import Optional
|
|
18
23
|
from pydantic import BaseModel, Field, StrictStr
|
|
@@ -43,8 +48,10 @@ class AccelerateTransactionForDeveloperData(BaseModel):
|
|
|
43
48
|
return pprint.pformat(self.dict(by_alias=True))
|
|
44
49
|
|
|
45
50
|
def to_json(self) -> str:
|
|
46
|
-
"""
|
|
47
|
-
|
|
51
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
52
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
53
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
54
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
48
55
|
|
|
49
56
|
@classmethod
|
|
50
57
|
def from_json(cls, json_str: str) -> AccelerateTransactionForDeveloperData:
|
|
@@ -77,6 +84,7 @@ class AccelerateTransactionForDeveloperData(BaseModel):
|
|
|
77
84
|
|
|
78
85
|
_obj = AccelerateTransactionForDeveloperData.parse_obj({
|
|
79
86
|
"id": obj.get("id")
|
|
87
|
+
|
|
80
88
|
})
|
|
81
89
|
return _obj
|
|
82
90
|
|
circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_request.py
CHANGED
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
from typing import Union
|
|
18
23
|
from pydantic import BaseModel, Field, StrictBytes, StrictStr
|
|
@@ -44,8 +49,10 @@ class AccelerateTransactionForDeveloperRequest(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> AccelerateTransactionForDeveloperRequest:
|
|
@@ -78,7 +85,8 @@ class AccelerateTransactionForDeveloperRequest(BaseModel):
|
|
|
78
85
|
|
|
79
86
|
_obj = AccelerateTransactionForDeveloperRequest.parse_obj({
|
|
80
87
|
"idempotency_key": obj.get("idempotencyKey"),
|
|
81
|
-
|
|
88
|
+
"entity_secret_ciphertext": obj.get("entitySecretCiphertext")
|
|
89
|
+
|
|
82
90
|
})
|
|
83
91
|
return _obj
|
|
84
92
|
|
|
@@ -19,7 +19,7 @@ from aenum import Enum, no_arg
|
|
|
19
19
|
|
|
20
20
|
class AccountType(str, Enum):
|
|
21
21
|
"""
|
|
22
|
-
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
|
|
22
|
+
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 and Aptos don't support Smart Contract Account (SCA).
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
25
|
"""
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
from pydantic import BaseModel, Field, StrictInt, StrictStr
|
|
@@ -44,8 +49,10 @@ class BadRequestResponse(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> BadRequestResponse:
|
|
@@ -78,7 +85,8 @@ class BadRequestResponse(BaseModel):
|
|
|
78
85
|
|
|
79
86
|
_obj = BadRequestResponse.parse_obj({
|
|
80
87
|
"code": obj.get("code"),
|
|
81
|
-
|
|
88
|
+
"message": obj.get("message")
|
|
89
|
+
|
|
82
90
|
})
|
|
83
91
|
return _obj
|
|
84
92
|
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
from datetime import datetime
|
|
17
22
|
|
|
18
23
|
from pydantic import BaseModel, Field, StrictStr
|
|
@@ -46,8 +51,10 @@ class Balance(BaseModel):
|
|
|
46
51
|
return pprint.pformat(self.dict(by_alias=True))
|
|
47
52
|
|
|
48
53
|
def to_json(self) -> str:
|
|
49
|
-
"""
|
|
50
|
-
|
|
54
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
55
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
56
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
57
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
51
58
|
|
|
52
59
|
@classmethod
|
|
53
60
|
def from_json(cls, json_str: str) -> Balance:
|
|
@@ -83,8 +90,9 @@ class Balance(BaseModel):
|
|
|
83
90
|
|
|
84
91
|
_obj = Balance.parse_obj({
|
|
85
92
|
"amount": obj.get("amount"),
|
|
86
|
-
|
|
87
|
-
|
|
93
|
+
"token": Token.from_dict(obj.get("token")) if obj.get("token") is not None else None,
|
|
94
|
+
"update_date": obj.get("updateDate")
|
|
95
|
+
|
|
88
96
|
})
|
|
89
97
|
return _obj
|
|
90
98
|
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
from pydantic import BaseModel, Field
|
|
@@ -44,8 +49,10 @@ class Balances(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> Balances:
|
|
@@ -81,6 +88,7 @@ class Balances(BaseModel):
|
|
|
81
88
|
|
|
82
89
|
_obj = Balances.parse_obj({
|
|
83
90
|
"data": BalancesData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
91
|
+
|
|
84
92
|
})
|
|
85
93
|
return _obj
|
|
86
94
|
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
from typing import List, Optional
|
|
18
23
|
from pydantic import BaseModel, Field, conlist
|
|
@@ -44,8 +49,10 @@ class BalancesData(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> BalancesData:
|
|
@@ -85,6 +92,7 @@ class BalancesData(BaseModel):
|
|
|
85
92
|
|
|
86
93
|
_obj = BalancesData.parse_obj({
|
|
87
94
|
"token_balances": [Balance.from_dict(_item) for _item in obj.get("tokenBalances")] if obj.get("tokenBalances") is not None else None
|
|
95
|
+
|
|
88
96
|
})
|
|
89
97
|
return _obj
|
|
90
98
|
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
from datetime import datetime
|
|
17
22
|
from typing import List, Optional
|
|
18
23
|
from pydantic import BaseModel, Field, StrictStr, conlist
|
|
@@ -46,8 +51,10 @@ class BaseScreeningDecision(BaseModel):
|
|
|
46
51
|
return pprint.pformat(self.dict(by_alias=True))
|
|
47
52
|
|
|
48
53
|
def to_json(self) -> str:
|
|
49
|
-
"""
|
|
50
|
-
|
|
54
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
55
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
56
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
57
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
51
58
|
|
|
52
59
|
@classmethod
|
|
53
60
|
def from_json(cls, json_str: str) -> BaseScreeningDecision:
|
|
@@ -80,8 +87,9 @@ class BaseScreeningDecision(BaseModel):
|
|
|
80
87
|
|
|
81
88
|
_obj = BaseScreeningDecision.parse_obj({
|
|
82
89
|
"rule_name": obj.get("ruleName"),
|
|
83
|
-
|
|
84
|
-
|
|
90
|
+
"actions": obj.get("actions"),
|
|
91
|
+
"screening_date": obj.get("screeningDate")
|
|
92
|
+
|
|
85
93
|
})
|
|
86
94
|
return _obj
|
|
87
95
|
|
|
@@ -45,6 +45,9 @@ class Blockchain(str, Enum):
|
|
|
45
45
|
BASE_MINUS_SEPOLIA = 'BASE-SEPOLIA'
|
|
46
46
|
OP = 'OP'
|
|
47
47
|
OP_MINUS_SEPOLIA = 'OP-SEPOLIA'
|
|
48
|
+
APTOS = 'APTOS'
|
|
49
|
+
APTOS_MINUS_TESTNET = 'APTOS-TESTNET'
|
|
50
|
+
ARC_MINUS_TESTNET = 'ARC-TESTNET'
|
|
48
51
|
|
|
49
52
|
@classmethod
|
|
50
53
|
def from_json(cls, json_str: str) -> Blockchain:
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
from pydantic import BaseModel, Field
|
|
@@ -44,8 +49,10 @@ class CancelTransactionForDeveloper(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> CancelTransactionForDeveloper:
|
|
@@ -81,6 +88,7 @@ class CancelTransactionForDeveloper(BaseModel):
|
|
|
81
88
|
|
|
82
89
|
_obj = CancelTransactionForDeveloper.parse_obj({
|
|
83
90
|
"data": CreateTransferTransactionForDeveloperResponseData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
91
|
+
|
|
84
92
|
})
|
|
85
93
|
return _obj
|
|
86
94
|
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
from typing import Union
|
|
18
23
|
from pydantic import BaseModel, Field, StrictBytes, StrictStr
|
|
@@ -44,8 +49,10 @@ class CancelTransactionForDeveloperRequest(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> CancelTransactionForDeveloperRequest:
|
|
@@ -78,7 +85,8 @@ class CancelTransactionForDeveloperRequest(BaseModel):
|
|
|
78
85
|
|
|
79
86
|
_obj = CancelTransactionForDeveloperRequest.parse_obj({
|
|
80
87
|
"idempotency_key": obj.get("idempotencyKey"),
|
|
81
|
-
|
|
88
|
+
"entity_secret_ciphertext": obj.get("entitySecretCiphertext")
|
|
89
|
+
|
|
82
90
|
})
|
|
83
91
|
return _obj
|
|
84
92
|
|
|
@@ -19,7 +19,7 @@ from aenum import Enum, no_arg
|
|
|
19
19
|
|
|
20
20
|
class ContractExecutionBlockchain(str, Enum):
|
|
21
21
|
"""
|
|
22
|
-
Blockchain associated with the transaction. Required
|
|
22
|
+
Blockchain associated with the contract execution transaction. Required when either of `walletAddress` or `sourceAddress` is provided. The `blockchain` and `walletId` fields are mutually exclusive.
|
|
23
23
|
"""
|
|
24
24
|
|
|
25
25
|
"""
|
|
@@ -39,6 +39,7 @@ class ContractExecutionBlockchain(str, Enum):
|
|
|
39
39
|
BASE_MINUS_SEPOLIA = 'BASE-SEPOLIA'
|
|
40
40
|
OP = 'OP'
|
|
41
41
|
OP_MINUS_SEPOLIA = 'OP-SEPOLIA'
|
|
42
|
+
ARC_MINUS_TESTNET = 'ARC-TESTNET'
|
|
42
43
|
|
|
43
44
|
@classmethod
|
|
44
45
|
def from_json(cls, json_str: str) -> ContractExecutionBlockchain:
|
|
@@ -13,6 +13,11 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
|
|
18
23
|
from pydantic import BaseModel, Field
|
|
@@ -44,8 +49,10 @@ class CreateContractExecutionTransactionForDeveloper(BaseModel):
|
|
|
44
49
|
return pprint.pformat(self.dict(by_alias=True))
|
|
45
50
|
|
|
46
51
|
def to_json(self) -> str:
|
|
47
|
-
"""
|
|
48
|
-
|
|
52
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
53
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
54
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
55
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
49
56
|
|
|
50
57
|
@classmethod
|
|
51
58
|
def from_json(cls, json_str: str) -> CreateContractExecutionTransactionForDeveloper:
|
|
@@ -81,6 +88,7 @@ class CreateContractExecutionTransactionForDeveloper(BaseModel):
|
|
|
81
88
|
|
|
82
89
|
_obj = CreateContractExecutionTransactionForDeveloper.parse_obj({
|
|
83
90
|
"data": CreateTransferTransactionForDeveloperResponseData.from_dict(obj.get("data")) if obj.get("data") is not None else None
|
|
91
|
+
|
|
84
92
|
})
|
|
85
93
|
return _obj
|
|
86
94
|
|
|
@@ -13,10 +13,16 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
from typing import List, Optional, Union
|
|
18
23
|
from pydantic import BaseModel, Field, StrictBytes, StrictStr, conlist
|
|
19
24
|
from circle.web3.developer_controlled_wallets.models.abi_parameters_inner import AbiParametersInner
|
|
25
|
+
from circle.web3.developer_controlled_wallets.models.contract_execution_blockchain import ContractExecutionBlockchain
|
|
20
26
|
from circle.web3.developer_controlled_wallets.models.fee_level import FeeLevel
|
|
21
27
|
|
|
22
28
|
class CreateContractExecutionTransactionForDeveloperRequest(BaseModel):
|
|
@@ -31,13 +37,15 @@ class CreateContractExecutionTransactionForDeveloperRequest(BaseModel):
|
|
|
31
37
|
contract_address: StrictStr = Field(..., alias="contractAddress", description="The blockchain address of the contract to be executed.")
|
|
32
38
|
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. ")
|
|
33
39
|
fee_level: Optional[FeeLevel] = Field(None, alias="feeLevel")
|
|
34
|
-
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. ")
|
|
35
|
-
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. ")
|
|
36
|
-
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. ")
|
|
37
|
-
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. ")
|
|
40
|
+
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-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) 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. ")
|
|
41
|
+
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-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) API. ")
|
|
42
|
+
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-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) API. ")
|
|
43
|
+
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-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) API. ")
|
|
38
44
|
ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Optional reference or description used to identify the transaction.")
|
|
39
|
-
wallet_id: StrictStr = Field(
|
|
40
|
-
|
|
45
|
+
wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="Unique system generated identifier of the wallet. For contract deploys this wallet ID will be used as the source. ")
|
|
46
|
+
blockchain: Optional[ContractExecutionBlockchain] = None
|
|
47
|
+
wallet_address: Optional[StrictStr] = Field(None, alias="walletAddress", description="Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects. ")
|
|
48
|
+
__properties = ["idempotencyKey", "abiFunctionSignature", "abiParameters", "callData", "amount", "contractAddress", "entitySecretCiphertext", "feeLevel", "gasLimit", "gasPrice", "maxFee", "priorityFee", "refId", "walletId", "blockchain", "walletAddress"]
|
|
41
49
|
|
|
42
50
|
def __init__(self, **kwargs):
|
|
43
51
|
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
@@ -58,8 +66,10 @@ class CreateContractExecutionTransactionForDeveloperRequest(BaseModel):
|
|
|
58
66
|
return pprint.pformat(self.dict(by_alias=True))
|
|
59
67
|
|
|
60
68
|
def to_json(self) -> str:
|
|
61
|
-
"""
|
|
62
|
-
|
|
69
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
70
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
71
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
72
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
63
73
|
|
|
64
74
|
@classmethod
|
|
65
75
|
def from_json(cls, json_str: str) -> CreateContractExecutionTransactionForDeveloperRequest:
|
|
@@ -99,19 +109,22 @@ class CreateContractExecutionTransactionForDeveloperRequest(BaseModel):
|
|
|
99
109
|
|
|
100
110
|
_obj = CreateContractExecutionTransactionForDeveloperRequest.parse_obj({
|
|
101
111
|
"idempotency_key": obj.get("idempotencyKey"),
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
112
|
+
"abi_function_signature": obj.get("abiFunctionSignature"),
|
|
113
|
+
"abi_parameters": [AbiParametersInner.from_dict(_item) for _item in obj.get("abiParameters")] if obj.get("abiParameters") is not None else None,
|
|
114
|
+
"call_data": obj.get("callData"),
|
|
115
|
+
"amount": obj.get("amount"),
|
|
116
|
+
"contract_address": obj.get("contractAddress"),
|
|
117
|
+
"entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
|
|
118
|
+
"fee_level": obj.get("feeLevel"),
|
|
119
|
+
"gas_limit": obj.get("gasLimit"),
|
|
120
|
+
"gas_price": obj.get("gasPrice"),
|
|
121
|
+
"max_fee": obj.get("maxFee"),
|
|
122
|
+
"priority_fee": obj.get("priorityFee"),
|
|
123
|
+
"ref_id": obj.get("refId"),
|
|
124
|
+
"wallet_id": obj.get("walletId"),
|
|
125
|
+
"blockchain": obj.get("blockchain"),
|
|
126
|
+
"wallet_address": obj.get("walletAddress")
|
|
127
|
+
|
|
115
128
|
})
|
|
116
129
|
return _obj
|
|
117
130
|
|
circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py
CHANGED
|
@@ -13,11 +13,16 @@ import pprint
|
|
|
13
13
|
import re # noqa: F401
|
|
14
14
|
import json
|
|
15
15
|
|
|
16
|
+
# CUSTOMIZED: Added pydantic_encoder import (not in default OpenAPI Generator template)
|
|
17
|
+
# pydantic_encoder is needed to address serialization issues with datetime and other non-primitive fields,
|
|
18
|
+
# which are not handled by the default JSON encoder.
|
|
19
|
+
from pydantic.json import pydantic_encoder
|
|
20
|
+
|
|
16
21
|
|
|
17
22
|
from typing import List, Optional, Union
|
|
18
23
|
from pydantic import BaseModel, Field, StrictBytes, StrictStr, conlist
|
|
24
|
+
from circle.web3.developer_controlled_wallets.models.create_transfer_transaction_for_developer_request_blockchain import CreateTransferTransactionForDeveloperRequestBlockchain
|
|
19
25
|
from circle.web3.developer_controlled_wallets.models.fee_level import FeeLevel
|
|
20
|
-
from circle.web3.developer_controlled_wallets.models.token_blockchain import TokenBlockchain
|
|
21
26
|
|
|
22
27
|
class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
23
28
|
"""
|
|
@@ -28,17 +33,18 @@ class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
|
28
33
|
destination_address: StrictStr = Field(..., alias="destinationAddress", description="Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects. ")
|
|
29
34
|
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. ")
|
|
30
35
|
fee_level: Optional[FeeLevel] = Field(None, alias="feeLevel")
|
|
31
|
-
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. ")
|
|
32
|
-
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. ")
|
|
33
|
-
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. ")
|
|
34
|
-
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. ")
|
|
36
|
+
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-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) 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. ")
|
|
37
|
+
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-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) API. ")
|
|
38
|
+
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-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) API. ")
|
|
39
|
+
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-reference/w3s/developer-controlled-wallets/create-transfer-estimate-fee) API. ")
|
|
35
40
|
nft_token_ids: Optional[conlist(StrictStr)] = Field(None, alias="nftTokenIds", description="List of NFT token IDs corresponding with the NFTs to transfer. Batch transfers are supported only for ERC-1155 tokens. The length of NFT token IDs must match the length of amounts.")
|
|
36
41
|
ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Optional reference or description used to identify the transaction.")
|
|
37
42
|
token_id: Optional[StrictStr] = Field(None, alias="tokenId", description="System generated identifier of the token. Excluded with `tokenAddress` and `tokenBlockchain`.")
|
|
38
43
|
token_address: Optional[StrictStr] = Field(None, alias="tokenAddress", description="Blockchain address of the transferred token. Empty for native tokens. Excluded with `tokenId`.")
|
|
39
|
-
blockchain: Optional[
|
|
40
|
-
wallet_id: StrictStr = Field(
|
|
41
|
-
|
|
44
|
+
blockchain: Optional[CreateTransferTransactionForDeveloperRequestBlockchain] = None
|
|
45
|
+
wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="Unique system generated identifier of the wallet. For contract deploys this wallet ID will be used as the source. ")
|
|
46
|
+
wallet_address: Optional[StrictStr] = Field(None, alias="walletAddress", description="Blockchain generated unique identifier, associated with wallet (account), smart contract or other blockchain objects. ")
|
|
47
|
+
__properties = ["idempotencyKey", "amounts", "destinationAddress", "entitySecretCiphertext", "feeLevel", "gasLimit", "gasPrice", "maxFee", "priorityFee", "nftTokenIds", "refId", "tokenId", "tokenAddress", "blockchain", "walletId", "walletAddress"]
|
|
42
48
|
|
|
43
49
|
def __init__(self, **kwargs):
|
|
44
50
|
if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
|
|
@@ -59,8 +65,10 @@ class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
|
59
65
|
return pprint.pformat(self.dict(by_alias=True))
|
|
60
66
|
|
|
61
67
|
def to_json(self) -> str:
|
|
62
|
-
"""
|
|
63
|
-
|
|
68
|
+
"""Return JSON string of the model (handles datetime/UUID/Decimal/Enum, etc.)"""
|
|
69
|
+
# CUSTOMIZED: Added default=pydantic_encoder to handle complex types (datetime, UUID, Enum, etc.)
|
|
70
|
+
# This differs from the default OpenAPI Generator template which doesn't handle these types properly
|
|
71
|
+
return json.dumps(self.to_dict(), default=pydantic_encoder)
|
|
64
72
|
|
|
65
73
|
@classmethod
|
|
66
74
|
def from_json(cls, json_str: str) -> CreateTransferTransactionForDeveloperRequest:
|
|
@@ -73,6 +81,9 @@ class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
|
73
81
|
exclude={
|
|
74
82
|
},
|
|
75
83
|
exclude_none=True)
|
|
84
|
+
# override the default output from pydantic by calling `to_dict()` of blockchain
|
|
85
|
+
if self.blockchain:
|
|
86
|
+
_dict['blockchain'] = self.blockchain.to_dict()
|
|
76
87
|
return _dict
|
|
77
88
|
|
|
78
89
|
@classmethod
|
|
@@ -93,20 +104,22 @@ class CreateTransferTransactionForDeveloperRequest(BaseModel):
|
|
|
93
104
|
|
|
94
105
|
_obj = CreateTransferTransactionForDeveloperRequest.parse_obj({
|
|
95
106
|
"idempotency_key": obj.get("idempotencyKey"),
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
107
|
+
"amounts": obj.get("amounts"),
|
|
108
|
+
"destination_address": obj.get("destinationAddress"),
|
|
109
|
+
"entity_secret_ciphertext": obj.get("entitySecretCiphertext"),
|
|
110
|
+
"fee_level": obj.get("feeLevel"),
|
|
111
|
+
"gas_limit": obj.get("gasLimit"),
|
|
112
|
+
"gas_price": obj.get("gasPrice"),
|
|
113
|
+
"max_fee": obj.get("maxFee"),
|
|
114
|
+
"priority_fee": obj.get("priorityFee"),
|
|
115
|
+
"nft_token_ids": obj.get("nftTokenIds"),
|
|
116
|
+
"ref_id": obj.get("refId"),
|
|
117
|
+
"token_id": obj.get("tokenId"),
|
|
118
|
+
"token_address": obj.get("tokenAddress"),
|
|
119
|
+
"blockchain": CreateTransferTransactionForDeveloperRequestBlockchain.from_dict(obj.get("blockchain")) if obj.get("blockchain") is not None else None,
|
|
120
|
+
"wallet_id": obj.get("walletId"),
|
|
121
|
+
"wallet_address": obj.get("walletAddress")
|
|
122
|
+
|
|
110
123
|
})
|
|
111
124
|
return _obj
|
|
112
125
|
|