circle-developer-controlled-wallets 0.1.0b1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of circle-developer-controlled-wallets might be problematic. Click here for more details.

Files changed (95) hide show
  1. circle/__init__.py +0 -0
  2. circle/web3/__init__.py +0 -0
  3. circle/web3/developer_controlled_wallets/__init__.py +108 -0
  4. circle/web3/developer_controlled_wallets/api/__init__.py +9 -0
  5. circle/web3/developer_controlled_wallets/api/signing_api.py +356 -0
  6. circle/web3/developer_controlled_wallets/api/token_lookup_api.py +198 -0
  7. circle/web3/developer_controlled_wallets/api/transactions_api.py +1527 -0
  8. circle/web3/developer_controlled_wallets/api/wallet_sets_api.py +691 -0
  9. circle/web3/developer_controlled_wallets/api/wallets_api.py +1118 -0
  10. circle/web3/developer_controlled_wallets/api_client.py +789 -0
  11. circle/web3/developer_controlled_wallets/api_response.py +25 -0
  12. circle/web3/developer_controlled_wallets/configuration.py +455 -0
  13. circle/web3/developer_controlled_wallets/exceptions.py +162 -0
  14. circle/web3/developer_controlled_wallets/models/__init__.py +87 -0
  15. circle/web3/developer_controlled_wallets/models/abi_parameters_inner.py +168 -0
  16. circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_request.py +85 -0
  17. circle/web3/developer_controlled_wallets/models/accelerate_transaction_for_developer_response.py +83 -0
  18. circle/web3/developer_controlled_wallets/models/account_type.py +36 -0
  19. circle/web3/developer_controlled_wallets/models/balance.py +91 -0
  20. circle/web3/developer_controlled_wallets/models/blockchain.py +40 -0
  21. circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer_request.py +85 -0
  22. circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer_response.py +86 -0
  23. circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer_request.py +118 -0
  24. circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer_response.py +86 -0
  25. circle/web3/developer_controlled_wallets/models/create_developer_transaction_accelerate200_response.py +87 -0
  26. circle/web3/developer_controlled_wallets/models/create_developer_transaction_cancel200_response.py +87 -0
  27. circle/web3/developer_controlled_wallets/models/create_developer_transaction_contract_execution200_response.py +87 -0
  28. circle/web3/developer_controlled_wallets/models/create_developer_transaction_transfer200_response.py +87 -0
  29. circle/web3/developer_controlled_wallets/models/create_developer_wallet200_response.py +87 -0
  30. circle/web3/developer_controlled_wallets/models/create_developer_wallet_request.py +105 -0
  31. circle/web3/developer_controlled_wallets/models/create_developer_wallet_response.py +91 -0
  32. circle/web3/developer_controlled_wallets/models/create_developer_wallet_set_request.py +87 -0
  33. circle/web3/developer_controlled_wallets/models/create_developer_wallet_set_response.py +87 -0
  34. circle/web3/developer_controlled_wallets/models/create_transfer_estimate_fee200_response.py +87 -0
  35. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py +112 -0
  36. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response.py +86 -0
  37. circle/web3/developer_controlled_wallets/models/create_validate_address200_response.py +87 -0
  38. circle/web3/developer_controlled_wallets/models/create_wallet_set200_response.py +87 -0
  39. circle/web3/developer_controlled_wallets/models/custody_type.py +36 -0
  40. circle/web3/developer_controlled_wallets/models/error.py +85 -0
  41. circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request.py +106 -0
  42. circle/web3/developer_controlled_wallets/models/estimate_transaction_fee_response.py +103 -0
  43. circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py +97 -0
  44. circle/web3/developer_controlled_wallets/models/estimated_transaction_fee.py +91 -0
  45. circle/web3/developer_controlled_wallets/models/ext_get_all_wallets_response.py +91 -0
  46. circle/web3/developer_controlled_wallets/models/ext_get_wallet_by_id_response.py +87 -0
  47. circle/web3/developer_controlled_wallets/models/ext_update_wallet_metadata_request.py +85 -0
  48. circle/web3/developer_controlled_wallets/models/ext_wallet_response.py +87 -0
  49. circle/web3/developer_controlled_wallets/models/ext_wallet_response_wallet.py +111 -0
  50. circle/web3/developer_controlled_wallets/models/fee_level.py +37 -0
  51. circle/web3/developer_controlled_wallets/models/get_balances_response.py +91 -0
  52. circle/web3/developer_controlled_wallets/models/get_nfts_response.py +91 -0
  53. circle/web3/developer_controlled_wallets/models/get_token_by_id_response.py +87 -0
  54. circle/web3/developer_controlled_wallets/models/get_token_id200_response.py +87 -0
  55. circle/web3/developer_controlled_wallets/models/get_transaction200_response.py +87 -0
  56. circle/web3/developer_controlled_wallets/models/get_transaction_by_id_response.py +87 -0
  57. circle/web3/developer_controlled_wallets/models/get_transactions_response.py +91 -0
  58. circle/web3/developer_controlled_wallets/models/get_wallet200_response.py +87 -0
  59. circle/web3/developer_controlled_wallets/models/get_wallet_set200_response.py +87 -0
  60. circle/web3/developer_controlled_wallets/models/get_wallet_set_by_id_response.py +87 -0
  61. circle/web3/developer_controlled_wallets/models/get_wallet_sets_response.py +91 -0
  62. circle/web3/developer_controlled_wallets/models/list_transactions200_response.py +87 -0
  63. circle/web3/developer_controlled_wallets/models/list_wallet_ballance200_response.py +87 -0
  64. circle/web3/developer_controlled_wallets/models/list_wallet_nfts200_response.py +87 -0
  65. circle/web3/developer_controlled_wallets/models/list_wallet_sets200_response.py +87 -0
  66. circle/web3/developer_controlled_wallets/models/list_wallets200_response.py +87 -0
  67. circle/web3/developer_controlled_wallets/models/nft.py +95 -0
  68. circle/web3/developer_controlled_wallets/models/operation.py +37 -0
  69. circle/web3/developer_controlled_wallets/models/sign_developer_message200_response.py +87 -0
  70. circle/web3/developer_controlled_wallets/models/sign_developer_typed_data200_response.py +87 -0
  71. circle/web3/developer_controlled_wallets/models/sign_message_for_developer_request.py +91 -0
  72. circle/web3/developer_controlled_wallets/models/sign_message_for_developer_response.py +83 -0
  73. circle/web3/developer_controlled_wallets/models/sign_typed_data_for_developer_request.py +89 -0
  74. circle/web3/developer_controlled_wallets/models/sign_typed_data_for_developer_response.py +83 -0
  75. circle/web3/developer_controlled_wallets/models/token_response.py +103 -0
  76. circle/web3/developer_controlled_wallets/models/token_standard.py +37 -0
  77. circle/web3/developer_controlled_wallets/models/transaction.py +159 -0
  78. circle/web3/developer_controlled_wallets/models/transaction_state.py +43 -0
  79. circle/web3/developer_controlled_wallets/models/transaction_type.py +36 -0
  80. circle/web3/developer_controlled_wallets/models/update_wallet200_response.py +87 -0
  81. circle/web3/developer_controlled_wallets/models/update_wallet_set200_response.py +87 -0
  82. circle/web3/developer_controlled_wallets/models/update_wallet_set_metadata_request.py +83 -0
  83. circle/web3/developer_controlled_wallets/models/update_wallet_set_metadata_response.py +87 -0
  84. circle/web3/developer_controlled_wallets/models/validate_address_request.py +86 -0
  85. circle/web3/developer_controlled_wallets/models/validate_address_response.py +83 -0
  86. circle/web3/developer_controlled_wallets/models/wallet_metadata.py +85 -0
  87. circle/web3/developer_controlled_wallets/models/wallet_response.py +111 -0
  88. circle/web3/developer_controlled_wallets/models/wallet_set_response.py +94 -0
  89. circle/web3/developer_controlled_wallets/models/wallet_state.py +36 -0
  90. circle/web3/developer_controlled_wallets/py.typed +0 -0
  91. circle/web3/developer_controlled_wallets/rest.py +299 -0
  92. circle_developer_controlled_wallets-0.1.0b1.dist-info/METADATA +112 -0
  93. circle_developer_controlled_wallets-0.1.0b1.dist-info/RECORD +95 -0
  94. circle_developer_controlled_wallets-0.1.0b1.dist-info/WHEEL +5 -0
  95. circle_developer_controlled_wallets-0.1.0b1.dist-info/top_level.txt +1 -0
@@ -0,0 +1,83 @@
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, StrictStr
19
+
20
+ class SignMessageForDeveloperResponse(BaseModel):
21
+ """
22
+ SignMessageForDeveloperResponse
23
+ """
24
+ signature: StrictStr = Field(..., description="Signature is a hex encoded 65 byte array starting with 0x.")
25
+ __properties = ["signature"]
26
+
27
+ def __init__(self, **kwargs):
28
+ if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
29
+ kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
30
+
31
+ if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
32
+ kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
33
+ super().__init__(**kwargs)
34
+
35
+
36
+ class Config:
37
+ """Pydantic configuration"""
38
+ allow_population_by_field_name = True
39
+ validate_assignment = True
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.dict(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> SignMessageForDeveloperResponse:
51
+ """Create an instance of SignMessageForDeveloperResponse from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self):
55
+ """Returns the dictionary representation of the model using alias"""
56
+ _dict = self.dict(by_alias=True,
57
+ exclude={
58
+ },
59
+ exclude_none=True)
60
+ return _dict
61
+
62
+ @classmethod
63
+ def from_dict(cls, obj: dict) -> SignMessageForDeveloperResponse:
64
+ """Create an instance of SignMessageForDeveloperResponse from a dict"""
65
+ if obj is None:
66
+ return None
67
+
68
+ if not isinstance(obj, dict):
69
+ return SignMessageForDeveloperResponse.parse_obj(obj)
70
+
71
+ # fill idempotency_key and ciphertext with placeholder for auto_fill
72
+ if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
73
+ obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
74
+
75
+ if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
76
+ obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
77
+
78
+ _obj = SignMessageForDeveloperResponse.parse_obj({
79
+ "signature": obj.get("signature")
80
+ })
81
+ return _obj
82
+
83
+
@@ -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, Union
18
+ from pydantic import BaseModel, Field, StrictBytes, StrictStr
19
+
20
+ class SignTypedDataForDeveloperRequest(BaseModel):
21
+ """
22
+ SignTypedDataForDeveloperRequest
23
+ """
24
+ wallet_id: StrictStr = Field(..., alias="walletId", description="Unique system generated identifier of the wallet. Required when source Address and blockchain is not provided. Mutually exclusive. For contract deploys this wallet ID will be used as the source.")
25
+ data: StrictStr = Field(..., description="A string represents the typed structured data in EIP-712")
26
+ memo: Optional[StrictStr] = Field(None, description="The human readable explanation for this sign action. Useful for presenting with extra information.")
27
+ 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. ")
28
+ __properties = ["walletId", "data", "memo", "entitySecretCiphertext"]
29
+
30
+ def __init__(self, **kwargs):
31
+ if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
32
+ kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
33
+
34
+ if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
35
+ kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
36
+ super().__init__(**kwargs)
37
+
38
+
39
+ class Config:
40
+ """Pydantic configuration"""
41
+ allow_population_by_field_name = True
42
+ validate_assignment = True
43
+
44
+ def to_str(self) -> str:
45
+ """Returns the string representation of the model using alias"""
46
+ return pprint.pformat(self.dict(by_alias=True))
47
+
48
+ def to_json(self) -> str:
49
+ """Returns the JSON representation of the model using alias"""
50
+ return json.dumps(self.to_dict())
51
+
52
+ @classmethod
53
+ def from_json(cls, json_str: str) -> SignTypedDataForDeveloperRequest:
54
+ """Create an instance of SignTypedDataForDeveloperRequest from a JSON string"""
55
+ return cls.from_dict(json.loads(json_str))
56
+
57
+ def to_dict(self):
58
+ """Returns the dictionary representation of the model using alias"""
59
+ _dict = self.dict(by_alias=True,
60
+ exclude={
61
+ },
62
+ exclude_none=True)
63
+ return _dict
64
+
65
+ @classmethod
66
+ def from_dict(cls, obj: dict) -> SignTypedDataForDeveloperRequest:
67
+ """Create an instance of SignTypedDataForDeveloperRequest from a dict"""
68
+ if obj is None:
69
+ return None
70
+
71
+ if not isinstance(obj, dict):
72
+ return SignTypedDataForDeveloperRequest.parse_obj(obj)
73
+
74
+ # fill idempotency_key and ciphertext with placeholder for auto_fill
75
+ if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
76
+ obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
77
+
78
+ if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
79
+ obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
80
+
81
+ _obj = SignTypedDataForDeveloperRequest.parse_obj({
82
+ "wallet_id": obj.get("walletId"),
83
+ "data": obj.get("data"),
84
+ "memo": obj.get("memo"),
85
+ "entity_secret_ciphertext": obj.get("entitySecretCiphertext")
86
+ })
87
+ return _obj
88
+
89
+
@@ -0,0 +1,83 @@
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, StrictStr
19
+
20
+ class SignTypedDataForDeveloperResponse(BaseModel):
21
+ """
22
+ SignTypedDataForDeveloperResponse
23
+ """
24
+ signature: StrictStr = Field(..., description="Signature is a hex encoded 65 byte array starting with 0x.")
25
+ __properties = ["signature"]
26
+
27
+ def __init__(self, **kwargs):
28
+ if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
29
+ kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
30
+
31
+ if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
32
+ kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
33
+ super().__init__(**kwargs)
34
+
35
+
36
+ class Config:
37
+ """Pydantic configuration"""
38
+ allow_population_by_field_name = True
39
+ validate_assignment = True
40
+
41
+ def to_str(self) -> str:
42
+ """Returns the string representation of the model using alias"""
43
+ return pprint.pformat(self.dict(by_alias=True))
44
+
45
+ def to_json(self) -> str:
46
+ """Returns the JSON representation of the model using alias"""
47
+ return json.dumps(self.to_dict())
48
+
49
+ @classmethod
50
+ def from_json(cls, json_str: str) -> SignTypedDataForDeveloperResponse:
51
+ """Create an instance of SignTypedDataForDeveloperResponse from a JSON string"""
52
+ return cls.from_dict(json.loads(json_str))
53
+
54
+ def to_dict(self):
55
+ """Returns the dictionary representation of the model using alias"""
56
+ _dict = self.dict(by_alias=True,
57
+ exclude={
58
+ },
59
+ exclude_none=True)
60
+ return _dict
61
+
62
+ @classmethod
63
+ def from_dict(cls, obj: dict) -> SignTypedDataForDeveloperResponse:
64
+ """Create an instance of SignTypedDataForDeveloperResponse from a dict"""
65
+ if obj is None:
66
+ return None
67
+
68
+ if not isinstance(obj, dict):
69
+ return SignTypedDataForDeveloperResponse.parse_obj(obj)
70
+
71
+ # fill idempotency_key and ciphertext with placeholder for auto_fill
72
+ if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
73
+ obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
74
+
75
+ if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
76
+ obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
77
+
78
+ _obj = SignTypedDataForDeveloperResponse.parse_obj({
79
+ "signature": obj.get("signature")
80
+ })
81
+ return _obj
82
+
83
+
@@ -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
+ from datetime import datetime
17
+ from typing import Optional
18
+ from pydantic import BaseModel, Field, StrictBool, StrictInt, StrictStr
19
+ from circle.web3.developer_controlled_wallets.models.blockchain import Blockchain
20
+ from circle.web3.developer_controlled_wallets.models.token_standard import TokenStandard
21
+
22
+ class TokenResponse(BaseModel):
23
+ """
24
+ TokenResponse
25
+ """
26
+ id: StrictStr = Field(..., description="Unique system generated identifier of the resource.")
27
+ name: Optional[StrictStr] = Field(None, description="Blockchain name of the specified token.")
28
+ standard: Optional[TokenStandard] = None
29
+ blockchain: Blockchain = Field(...)
30
+ decimals: Optional[StrictInt] = Field(None, description="Number of decimal places shown in the token amount.")
31
+ is_native: StrictBool = Field(..., alias="isNative", description="Defines if the token is a native token of the specified blockchain. If TRUE, the token is a native token.")
32
+ symbol: Optional[StrictStr] = Field(None, description="Blockchain symbol of the specified token.")
33
+ token_address: Optional[StrictStr] = Field(None, alias="tokenAddress", description="Blockchain address of the specified token.")
34
+ update_date: datetime = Field(..., alias="updateDate", description="Last update date of the resource. ISO-8601 UTC date/time.")
35
+ create_date: datetime = Field(..., alias="createDate", description="Date and time the resource was created. ISO-8601 UTC date/time.")
36
+ __properties = ["id", "name", "standard", "blockchain", "decimals", "isNative", "symbol", "tokenAddress", "updateDate", "createDate"]
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) -> TokenResponse:
62
+ """Create an instance of TokenResponse 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) -> TokenResponse:
75
+ """Create an instance of TokenResponse from a dict"""
76
+ if obj is None:
77
+ return None
78
+
79
+ if not isinstance(obj, dict):
80
+ return TokenResponse.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 = TokenResponse.parse_obj({
90
+ "id": obj.get("id"),
91
+ "name": obj.get("name"),
92
+ "standard": obj.get("standard"),
93
+ "blockchain": obj.get("blockchain"),
94
+ "decimals": obj.get("decimals"),
95
+ "is_native": obj.get("isNative"),
96
+ "symbol": obj.get("symbol"),
97
+ "token_address": obj.get("tokenAddress"),
98
+ "update_date": obj.get("updateDate"),
99
+ "create_date": obj.get("createDate")
100
+ })
101
+ return _obj
102
+
103
+
@@ -0,0 +1,37 @@
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 TokenStandard(str, Enum):
21
+ """
22
+ TokenStandard
23
+ """
24
+
25
+ """
26
+ allowed enum values
27
+ """
28
+ ERC20 = 'ERC20'
29
+ ERC721 = 'ERC721'
30
+ ERC1155 = 'ERC1155'
31
+
32
+ @classmethod
33
+ def from_json(cls, json_str: str) -> TokenStandard:
34
+ """Create an instance of TokenStandard from a JSON string"""
35
+ return TokenStandard(json.loads(json_str))
36
+
37
+
@@ -0,0 +1,159 @@
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, StrictInt, StrictStr, conlist, constr
19
+ from circle.web3.developer_controlled_wallets.models.abi_parameters_inner import AbiParametersInner
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.estimated_transaction_fee import EstimatedTransactionFee
23
+ from circle.web3.developer_controlled_wallets.models.fee_level import FeeLevel
24
+ from circle.web3.developer_controlled_wallets.models.operation import Operation
25
+ from circle.web3.developer_controlled_wallets.models.transaction_state import TransactionState
26
+ from circle.web3.developer_controlled_wallets.models.transaction_type import TransactionType
27
+
28
+ class Transaction(BaseModel):
29
+ """
30
+ Transaction
31
+ """
32
+ id: StrictStr = Field(..., description="Unique system generated identifier of the resource.")
33
+ 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)")
34
+ 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`.")
35
+ amounts: Optional[conlist(StrictStr, min_items=1)] = Field(None, description="Transfer amounts in decimal number format, at least one element is required for transfer. For ERC721 token transfer, the amounts field is required to be [\"1\"] (array with \"1\" as the only element).")
36
+ amount_in_usd: Optional[StrictStr] = Field(None, alias="amountInUSD", description="Transaction amount in USD decimal format.")
37
+ block_hash: Optional[StrictStr] = Field(None, alias="blockHash", description="Identifier for the block that includes the transaction.")
38
+ block_height: Optional[StrictInt] = Field(None, alias="blockHeight", description="Block height of the transaction, representing the number of blockchain confirmations.")
39
+ blockchain: Blockchain = Field(...)
40
+ contract_address: Optional[StrictStr] = Field(None, alias="contractAddress", description="The blockchain address of the contract to be executed.")
41
+ create_date: datetime = Field(..., alias="createDate", description="Date and time the resource was created. ISO-8601 UTC date/time.")
42
+ custody_type: Optional[CustodyType] = Field(None, alias="custodyType")
43
+ destination_address: Optional[StrictStr] = Field(None, alias="destinationAddress", description="The destination blockchain address for the transaction.")
44
+ error_reason: Optional[StrictStr] = Field(None, alias="errorReason", description="Description of the error. Only present for transactions in `FAILED` state.")
45
+ error_details: Optional[StrictStr] = Field(None, alias="errorDetails", description="Additional detail associated with the corresponding transaction's error reason")
46
+ estimated_fee: Optional[EstimatedTransactionFee] = Field(None, alias="estimatedFee")
47
+ fee_level: Optional[FeeLevel] = Field(None, alias="feeLevel")
48
+ first_confirm_date: Optional[datetime] = Field(None, alias="firstConfirmDate", description="Date the transaction was first confirmed in a block. ISO-8601 UTC date/time.")
49
+ network_fee: Optional[StrictStr] = Field(None, alias="networkFee", description="Gas fee, in native token, paid to the network for the transaction.")
50
+ network_fee_in_usd: Optional[StrictStr] = Field(None, alias="networkFeeInUSD", description="Gas fee, in USD, paid to the network for the transaction.")
51
+ nfts: Optional[conlist(StrictStr)] = Field(None, description="List of Nfts, in JSON string format, associated with the transaction.")
52
+ operation: Optional[Operation] = None
53
+ ref_id: Optional[StrictStr] = Field(None, alias="refId", description="Optional reference or description used to identify the transaction.")
54
+ source_address: Optional[StrictStr] = Field(None, alias="sourceAddress", description="The source blockchain address of the transaction. Required if you don't provide `walletId`. The `sourceAddress` and `walletId` fields are mutually exclusive.")
55
+ state: TransactionState = Field(...)
56
+ token_id: Optional[StrictStr] = Field(None, alias="tokenId", description="System generated identifier of the token. Excluded with `tokenAddress` and `tokenBlockchain`.")
57
+ transaction_type: TransactionType = Field(..., alias="transactionType")
58
+ tx_hash: Optional[StrictStr] = Field(None, alias="txHash", description="Blockchain generated identifier of the transaction.")
59
+ update_date: datetime = Field(..., alias="updateDate", description="Last update date of the resource. ISO-8601 UTC date/time.")
60
+ user_id: Optional[constr(strict=True, max_length=50, min_length=5)] = Field(None, alias="userId", description="Unique system generated identifier for the user.")
61
+ wallet_id: Optional[StrictStr] = Field(None, alias="walletId", description="Unique system generated identifier of the wallet. Required when source Address and blockchain is not provided. Mutually exclusive. For contract deploys this wallet ID will be used as the source.")
62
+ __properties = ["id", "abiFunctionSignature", "abiParameters", "amounts", "amountInUSD", "blockHash", "blockHeight", "blockchain", "contractAddress", "createDate", "custodyType", "destinationAddress", "errorReason", "errorDetails", "estimatedFee", "feeLevel", "firstConfirmDate", "networkFee", "networkFeeInUSD", "nfts", "operation", "refId", "sourceAddress", "state", "tokenId", "transactionType", "txHash", "updateDate", "userId", "walletId"]
63
+
64
+ def __init__(self, **kwargs):
65
+ if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
66
+ kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
67
+
68
+ if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
69
+ kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
70
+ super().__init__(**kwargs)
71
+
72
+
73
+ class Config:
74
+ """Pydantic configuration"""
75
+ allow_population_by_field_name = True
76
+ validate_assignment = True
77
+
78
+ def to_str(self) -> str:
79
+ """Returns the string representation of the model using alias"""
80
+ return pprint.pformat(self.dict(by_alias=True))
81
+
82
+ def to_json(self) -> str:
83
+ """Returns the JSON representation of the model using alias"""
84
+ return json.dumps(self.to_dict())
85
+
86
+ @classmethod
87
+ def from_json(cls, json_str: str) -> Transaction:
88
+ """Create an instance of Transaction from a JSON string"""
89
+ return cls.from_dict(json.loads(json_str))
90
+
91
+ def to_dict(self):
92
+ """Returns the dictionary representation of the model using alias"""
93
+ _dict = self.dict(by_alias=True,
94
+ exclude={
95
+ },
96
+ exclude_none=True)
97
+ # override the default output from pydantic by calling `to_dict()` of each item in abi_parameters (list)
98
+ _items = []
99
+ if self.abi_parameters:
100
+ for _item in self.abi_parameters:
101
+ if _item:
102
+ _items.append(_item.to_dict())
103
+ _dict['abiParameters'] = _items
104
+ # override the default output from pydantic by calling `to_dict()` of estimated_fee
105
+ if self.estimated_fee:
106
+ _dict['estimatedFee'] = self.estimated_fee.to_dict()
107
+ return _dict
108
+
109
+ @classmethod
110
+ def from_dict(cls, obj: dict) -> Transaction:
111
+ """Create an instance of Transaction from a dict"""
112
+ if obj is None:
113
+ return None
114
+
115
+ if not isinstance(obj, dict):
116
+ return Transaction.parse_obj(obj)
117
+
118
+ # fill idempotency_key and ciphertext with placeholder for auto_fill
119
+ if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
120
+ obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
121
+
122
+ if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
123
+ obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
124
+
125
+ _obj = Transaction.parse_obj({
126
+ "id": obj.get("id"),
127
+ "abi_function_signature": obj.get("abiFunctionSignature"),
128
+ "abi_parameters": [AbiParametersInner.from_dict(_item) for _item in obj.get("abiParameters")] if obj.get("abiParameters") is not None else None,
129
+ "amounts": obj.get("amounts"),
130
+ "amount_in_usd": obj.get("amountInUSD"),
131
+ "block_hash": obj.get("blockHash"),
132
+ "block_height": obj.get("blockHeight"),
133
+ "blockchain": obj.get("blockchain"),
134
+ "contract_address": obj.get("contractAddress"),
135
+ "create_date": obj.get("createDate"),
136
+ "custody_type": obj.get("custodyType"),
137
+ "destination_address": obj.get("destinationAddress"),
138
+ "error_reason": obj.get("errorReason"),
139
+ "error_details": obj.get("errorDetails"),
140
+ "estimated_fee": EstimatedTransactionFee.from_dict(obj.get("estimatedFee")) if obj.get("estimatedFee") is not None else None,
141
+ "fee_level": obj.get("feeLevel"),
142
+ "first_confirm_date": obj.get("firstConfirmDate"),
143
+ "network_fee": obj.get("networkFee"),
144
+ "network_fee_in_usd": obj.get("networkFeeInUSD"),
145
+ "nfts": obj.get("nfts"),
146
+ "operation": obj.get("operation"),
147
+ "ref_id": obj.get("refId"),
148
+ "source_address": obj.get("sourceAddress"),
149
+ "state": obj.get("state"),
150
+ "token_id": obj.get("tokenId"),
151
+ "transaction_type": obj.get("transactionType"),
152
+ "tx_hash": obj.get("txHash"),
153
+ "update_date": obj.get("updateDate"),
154
+ "user_id": obj.get("userId"),
155
+ "wallet_id": obj.get("walletId")
156
+ })
157
+ return _obj
158
+
159
+
@@ -0,0 +1,43 @@
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 TransactionState(str, Enum):
21
+ """
22
+ Current state of the transaction.
23
+ """
24
+
25
+ """
26
+ allowed enum values
27
+ """
28
+ INITIATED = 'INITIATED'
29
+ PENDING_RISK_SCREENING = 'PENDING_RISK_SCREENING'
30
+ DENIED = 'DENIED'
31
+ QUEUED = 'QUEUED'
32
+ SENT = 'SENT'
33
+ CONFIRMED = 'CONFIRMED'
34
+ COMPLETE = 'COMPLETE'
35
+ FAILED = 'FAILED'
36
+ CANCELLED = 'CANCELLED'
37
+
38
+ @classmethod
39
+ def from_json(cls, json_str: str) -> TransactionState:
40
+ """Create an instance of TransactionState from a JSON string"""
41
+ return TransactionState(json.loads(json_str))
42
+
43
+
@@ -0,0 +1,36 @@
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 TransactionType(str, Enum):
21
+ """
22
+ TransactionType
23
+ """
24
+
25
+ """
26
+ allowed enum values
27
+ """
28
+ INBOUND = 'INBOUND'
29
+ OUTBOUND = 'OUTBOUND'
30
+
31
+ @classmethod
32
+ def from_json(cls, json_str: str) -> TransactionType:
33
+ """Create an instance of TransactionType from a JSON string"""
34
+ return TransactionType(json.loads(json_str))
35
+
36
+