circle-developer-controlled-wallets 1.1.1__py3-none-any.whl → 2.0.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.

Files changed (74) hide show
  1. circle/web3/developer_controlled_wallets/__init__.py +40 -33
  2. circle/web3/developer_controlled_wallets/api/signing_api.py +193 -38
  3. circle/web3/developer_controlled_wallets/api/token_lookup_api.py +8 -8
  4. circle/web3/developer_controlled_wallets/api/transactions_api.py +47 -47
  5. circle/web3/developer_controlled_wallets/api/wallet_sets_api.py +14 -14
  6. circle/web3/developer_controlled_wallets/api/wallets_api.py +30 -30
  7. circle/web3/developer_controlled_wallets/api_client.py +1 -1
  8. circle/web3/developer_controlled_wallets/configuration.py +1 -1
  9. circle/web3/developer_controlled_wallets/models/__init__.py +39 -32
  10. circle/web3/developer_controlled_wallets/models/{create_developer_transaction_cancel200_response.py → accelerate_transaction_for_developer.py} +11 -11
  11. circle/web3/developer_controlled_wallets/models/{accelerate_transaction_for_developer_response.py → accelerate_transaction_for_developer_data.py} +8 -8
  12. circle/web3/developer_controlled_wallets/models/balance.py +3 -3
  13. circle/web3/developer_controlled_wallets/models/{wallet_set2.py → balances.py} +11 -11
  14. circle/web3/developer_controlled_wallets/models/{get_balances_response.py → balances_data.py} +8 -8
  15. circle/web3/developer_controlled_wallets/models/base_screening_decision.py +88 -0
  16. circle/web3/developer_controlled_wallets/models/blockchain.py +2 -0
  17. circle/web3/developer_controlled_wallets/models/cancel_transaction_for_developer.py +87 -0
  18. circle/web3/developer_controlled_wallets/models/{create_developer_transaction_contract_execution200_response.py → create_contract_execution_transaction_for_developer.py} +13 -13
  19. circle/web3/developer_controlled_wallets/models/{create_contract_execution_transaction_for_developer_response.py → create_contract_execution_transaction_for_developer_data.py} +8 -8
  20. circle/web3/developer_controlled_wallets/models/create_contract_execution_transaction_for_developer_request.py +4 -4
  21. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_request.py +4 -4
  22. circle/web3/developer_controlled_wallets/models/create_transfer_transaction_for_developer_response.py +9 -8
  23. circle/web3/developer_controlled_wallets/models/{cancel_transaction_for_developer_response.py → create_transfer_transaction_for_developer_response_data.py} +8 -8
  24. circle/web3/developer_controlled_wallets/models/error.py +3 -3
  25. circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request.py +2 -2
  26. circle/web3/developer_controlled_wallets/models/estimate_contract_execution_transaction_fee_request_blockchain.py +2 -0
  27. circle/web3/developer_controlled_wallets/models/{get_transaction200_response.py → estimate_transaction_fee.py} +13 -13
  28. circle/web3/developer_controlled_wallets/models/{estimate_transaction_fee_response.py → estimate_transaction_fee_data.py} +15 -15
  29. circle/web3/developer_controlled_wallets/models/estimate_transfer_transaction_fee_request.py +1 -1
  30. circle/web3/developer_controlled_wallets/models/fee_level.py +1 -1
  31. circle/web3/developer_controlled_wallets/models/nft.py +5 -5
  32. circle/web3/developer_controlled_wallets/models/{wallet2.py → nfts.py} +11 -11
  33. circle/web3/developer_controlled_wallets/models/{get_nfts_response.py → nfts_data.py} +8 -8
  34. circle/web3/developer_controlled_wallets/models/risk_action.py +38 -0
  35. circle/web3/developer_controlled_wallets/models/risk_category.py +48 -0
  36. circle/web3/developer_controlled_wallets/models/risk_score.py +40 -0
  37. circle/web3/developer_controlled_wallets/models/risk_signal.py +101 -0
  38. circle/web3/developer_controlled_wallets/models/risk_type.py +37 -0
  39. circle/web3/developer_controlled_wallets/models/{sign_message_for_developer_request.py → sign_message_request.py} +9 -9
  40. circle/web3/developer_controlled_wallets/models/sign_transaction_request.py +89 -0
  41. circle/web3/developer_controlled_wallets/models/sign_transaction_response.py +87 -0
  42. circle/web3/developer_controlled_wallets/models/{sign_typed_data_for_developer_response.py → sign_transaction_response_data.py} +13 -11
  43. circle/web3/developer_controlled_wallets/models/{sign_typed_data_for_developer_request.py → sign_typed_data_request.py} +9 -9
  44. circle/web3/developer_controlled_wallets/models/{list_wallet_nfts200_response.py → signature_response.py} +13 -13
  45. circle/web3/developer_controlled_wallets/models/{sign_message_for_developer_response.py → signature_response_data.py} +8 -8
  46. circle/web3/developer_controlled_wallets/models/token.py +103 -0
  47. circle/web3/developer_controlled_wallets/models/token_blockchain.py +2 -0
  48. circle/web3/developer_controlled_wallets/models/token_response.py +9 -25
  49. circle/web3/developer_controlled_wallets/models/{get_token_by_id_response.py → token_response_data.py} +11 -11
  50. circle/web3/developer_controlled_wallets/models/token_standard.py +6 -0
  51. circle/web3/developer_controlled_wallets/models/transaction.py +12 -6
  52. circle/web3/developer_controlled_wallets/models/{estimated_transaction_fee.py → transaction_fee.py} +16 -14
  53. circle/web3/developer_controlled_wallets/models/{list_transactions200_response.py → transaction_response.py} +13 -13
  54. circle/web3/developer_controlled_wallets/models/{get_transaction_by_id_response.py → transaction_response_data.py} +8 -8
  55. circle/web3/developer_controlled_wallets/models/transaction_screening_decision.py +98 -0
  56. circle/web3/developer_controlled_wallets/models/{get_token_id200_response.py → transactions.py} +11 -11
  57. circle/web3/developer_controlled_wallets/models/{get_transactions_response.py → transactions_data.py} +8 -8
  58. circle/web3/developer_controlled_wallets/models/{list_wallet_ballance200_response.py → validate_address.py} +13 -13
  59. circle/web3/developer_controlled_wallets/models/{validate_address_response.py → validate_address_data.py} +8 -8
  60. circle/web3/developer_controlled_wallets/models/wallet_response.py +87 -0
  61. circle/web3/developer_controlled_wallets/models/{wallet2_data.py → wallet_response_data.py} +8 -8
  62. circle/web3/developer_controlled_wallets/models/wallet_set_response.py +87 -0
  63. circle/web3/developer_controlled_wallets/models/{wallet_set2_data.py → wallet_set_response_data.py} +8 -8
  64. {circle_developer_controlled_wallets-1.1.1.dist-info → circle_developer_controlled_wallets-2.0.0.dist-info}/METADATA +42 -25
  65. circle_developer_controlled_wallets-2.0.0.dist-info/RECORD +104 -0
  66. {circle_developer_controlled_wallets-1.1.1.dist-info → circle_developer_controlled_wallets-2.0.0.dist-info}/WHEEL +1 -1
  67. circle/web3/developer_controlled_wallets/models/create_developer_transaction_accelerate200_response.py +0 -87
  68. circle/web3/developer_controlled_wallets/models/create_developer_transaction_transfer200_response.py +0 -87
  69. circle/web3/developer_controlled_wallets/models/create_transfer_estimate_fee200_response.py +0 -87
  70. circle/web3/developer_controlled_wallets/models/create_validate_address200_response.py +0 -87
  71. circle/web3/developer_controlled_wallets/models/sign_developer_message200_response.py +0 -87
  72. circle/web3/developer_controlled_wallets/models/sign_developer_typed_data200_response.py +0 -87
  73. circle_developer_controlled_wallets-1.1.1.dist-info/RECORD +0 -97
  74. {circle_developer_controlled_wallets-1.1.1.dist-info → circle_developer_controlled_wallets-2.0.0.dist-info}/top_level.txt +0 -0
@@ -16,15 +16,15 @@ import json
16
16
 
17
17
  from typing import Optional
18
18
  from pydantic import BaseModel, Field, StrictStr
19
- from circle.web3.developer_controlled_wallets.models.estimated_transaction_fee import EstimatedTransactionFee
19
+ from circle.web3.developer_controlled_wallets.models.transaction_fee import TransactionFee
20
20
 
21
- class EstimateTransactionFeeResponse(BaseModel):
21
+ class EstimateTransactionFeeData(BaseModel):
22
22
  """
23
- EstimateTransactionFeeResponse
23
+ EstimateTransactionFeeData
24
24
  """
25
- high: Optional[EstimatedTransactionFee] = None
26
- low: Optional[EstimatedTransactionFee] = None
27
- medium: Optional[EstimatedTransactionFee] = None
25
+ high: Optional[TransactionFee] = None
26
+ low: Optional[TransactionFee] = None
27
+ medium: Optional[TransactionFee] = None
28
28
  call_gas_limit: Optional[StrictStr] = Field(None, alias="callGasLimit", description="One of ERC-4337 gas fields. The amount of gas to allocate for the main execution call. Only in smart contract account estimation response.")
29
29
  verification_gas_limit: Optional[StrictStr] = Field(None, alias="verificationGasLimit", description="One of ERC-4337 gas fields. The amount of gas to allocate for the verification step. Only in smart contract account estimation response.")
30
30
  pre_verification_gas: Optional[StrictStr] = Field(None, alias="preVerificationGas", description="One of ERC-4337 gas fields. The amount of gas to pay to compensate the bundler for pre-verification execution and call data. Only in smart contract account estimation response.")
@@ -53,8 +53,8 @@ class EstimateTransactionFeeResponse(BaseModel):
53
53
  return json.dumps(self.to_dict())
54
54
 
55
55
  @classmethod
56
- def from_json(cls, json_str: str) -> EstimateTransactionFeeResponse:
57
- """Create an instance of EstimateTransactionFeeResponse from a JSON string"""
56
+ def from_json(cls, json_str: str) -> EstimateTransactionFeeData:
57
+ """Create an instance of EstimateTransactionFeeData from a JSON string"""
58
58
  return cls.from_dict(json.loads(json_str))
59
59
 
60
60
  def to_dict(self):
@@ -75,13 +75,13 @@ class EstimateTransactionFeeResponse(BaseModel):
75
75
  return _dict
76
76
 
77
77
  @classmethod
78
- def from_dict(cls, obj: dict) -> EstimateTransactionFeeResponse:
79
- """Create an instance of EstimateTransactionFeeResponse from a dict"""
78
+ def from_dict(cls, obj: dict) -> EstimateTransactionFeeData:
79
+ """Create an instance of EstimateTransactionFeeData from a dict"""
80
80
  if obj is None:
81
81
  return None
82
82
 
83
83
  if not isinstance(obj, dict):
84
- return EstimateTransactionFeeResponse.parse_obj(obj)
84
+ return EstimateTransactionFeeData.parse_obj(obj)
85
85
 
86
86
  # fill idempotency_key and ciphertext with placeholder for auto_fill
87
87
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -90,10 +90,10 @@ class EstimateTransactionFeeResponse(BaseModel):
90
90
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
91
91
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
92
92
 
93
- _obj = EstimateTransactionFeeResponse.parse_obj({
94
- "high": EstimatedTransactionFee.from_dict(obj.get("high")) if obj.get("high") is not None else None,
95
- "low": EstimatedTransactionFee.from_dict(obj.get("low")) if obj.get("low") is not None else None,
96
- "medium": EstimatedTransactionFee.from_dict(obj.get("medium")) if obj.get("medium") is not None else None,
93
+ _obj = EstimateTransactionFeeData.parse_obj({
94
+ "high": TransactionFee.from_dict(obj.get("high")) if obj.get("high") is not None else None,
95
+ "low": TransactionFee.from_dict(obj.get("low")) if obj.get("low") is not None else None,
96
+ "medium": TransactionFee.from_dict(obj.get("medium")) if obj.get("medium") is not None else None,
97
97
  "call_gas_limit": obj.get("callGasLimit"),
98
98
  "verification_gas_limit": obj.get("verificationGasLimit"),
99
99
  "pre_verification_gas": obj.get("preVerificationGas")
@@ -25,7 +25,7 @@ class EstimateTransferTransactionFeeRequest(BaseModel):
25
25
  amounts: conlist(StrictStr, min_items=1) = Field(..., 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).")
26
26
  destination_address: StrictStr = Field(..., alias="destinationAddress", description="The destination blockchain address for the transaction.")
27
27
  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.")
28
- 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.")
28
+ source_address: Optional[StrictStr] = Field(None, alias="sourceAddress", description="The source address of the transaction.")
29
29
  token_id: Optional[StrictStr] = Field(None, alias="tokenId", description="System generated identifier of the token. Excluded with `tokenAddress` and `tokenBlockchain`.")
30
30
  token_address: Optional[StrictStr] = Field(None, alias="tokenAddress", description="Blockchain address of the transferred token. Empty for native tokens. Excluded with `tokenId`.")
31
31
  blockchain: Optional[TokenBlockchain] = None
@@ -19,7 +19,7 @@ from aenum import Enum, no_arg
19
19
 
20
20
  class FeeLevel(str, Enum):
21
21
  """
22
- A dynamic blockchain fee level setting (`LOW`, `MEDIUM`, or `HIGH`) that will be used to pay gas for the transaction. Calculated based on network traffic, supply of validators, and demand for transaction verification. Cannot be used with `gasLimit`, `gasPrice`, `priorityFee`, or `maxFee`. Estimates for each fee level can be obtained through the `POST /transactions/transfer/estimateFee` API.
22
+ A dynamic blockchain fee level setting (`LOW`, `MEDIUM`, or `HIGH`) that will be used to pay gas for the transaction. Calculated based on network traffic, supply of validators, and demand for transaction verification. Cannot be used with `gasPrice`, `priorityFee`, or `maxFee`. Estimates for each fee level can be obtained through the `POST /transactions/transfer/estimateFee` API.
23
23
  """
24
24
 
25
25
  """
@@ -16,16 +16,16 @@ import json
16
16
  from datetime import datetime
17
17
  from typing import Optional
18
18
  from pydantic import BaseModel, Field, StrictStr
19
- from circle.web3.developer_controlled_wallets.models.token_response import TokenResponse
19
+ from circle.web3.developer_controlled_wallets.models.token import Token
20
20
 
21
21
  class Nft(BaseModel):
22
22
  """
23
23
  Nft
24
24
  """
25
- amount: StrictStr = Field(..., description="Amount of NFTs on a wallet. For non-fungible token standards, like ERC721, amount will always be “1”; for semi-fungible token standards like ERC1155, amount will correspond to the number of tokens.")
25
+ amount: StrictStr = Field(..., description="Amount of NFTs on a wallet. For non-fungible token standards, like ERC721, NonFungible, NonFungibleEdition, ProgrammableNonFungible, ProgrammableNonFungibleEdition, amount will always be “1”; for semi-fungible token standards like ERC1155, amount will correspond to the number of tokens; for FungibleAsset, amount can be greater than \"1\".")
26
26
  metadata: Optional[StrictStr] = Field(None, description="The metadata of the NFT.")
27
- nft_token_id: StrictStr = Field(..., alias="nftTokenId", description="The NFT token ID.")
28
- token: TokenResponse = Field(...)
27
+ nft_token_id: Optional[StrictStr] = Field(None, alias="nftTokenId", description="The NFT token ID.")
28
+ token: Token = Field(...)
29
29
  update_date: datetime = Field(..., alias="updateDate", description="Date and time the resource was last updated, in ISO-8601 UTC format.")
30
30
  __properties = ["amount", "metadata", "nftTokenId", "token", "updateDate"]
31
31
 
@@ -87,7 +87,7 @@ class Nft(BaseModel):
87
87
  "amount": obj.get("amount"),
88
88
  "metadata": obj.get("metadata"),
89
89
  "nft_token_id": obj.get("nftTokenId"),
90
- "token": TokenResponse.from_dict(obj.get("token")) if obj.get("token") is not None else None,
90
+ "token": Token.from_dict(obj.get("token")) if obj.get("token") is not None else None,
91
91
  "update_date": obj.get("updateDate")
92
92
  })
93
93
  return _obj
@@ -16,13 +16,13 @@ import json
16
16
 
17
17
 
18
18
  from pydantic import BaseModel, Field
19
- from circle.web3.developer_controlled_wallets.models.wallet2_data import Wallet2Data
19
+ from circle.web3.developer_controlled_wallets.models.nfts_data import NftsData
20
20
 
21
- class Wallet2(BaseModel):
21
+ class Nfts(BaseModel):
22
22
  """
23
- Wallet2
23
+ Nfts
24
24
  """
25
- data: Wallet2Data = Field(...)
25
+ data: NftsData = Field(...)
26
26
  __properties = ["data"]
27
27
 
28
28
  def __init__(self, **kwargs):
@@ -48,8 +48,8 @@ class Wallet2(BaseModel):
48
48
  return json.dumps(self.to_dict())
49
49
 
50
50
  @classmethod
51
- def from_json(cls, json_str: str) -> Wallet2:
52
- """Create an instance of Wallet2 from a JSON string"""
51
+ def from_json(cls, json_str: str) -> Nfts:
52
+ """Create an instance of Nfts from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self):
@@ -64,13 +64,13 @@ class Wallet2(BaseModel):
64
64
  return _dict
65
65
 
66
66
  @classmethod
67
- def from_dict(cls, obj: dict) -> Wallet2:
68
- """Create an instance of Wallet2 from a dict"""
67
+ def from_dict(cls, obj: dict) -> Nfts:
68
+ """Create an instance of Nfts from a dict"""
69
69
  if obj is None:
70
70
  return None
71
71
 
72
72
  if not isinstance(obj, dict):
73
- return Wallet2.parse_obj(obj)
73
+ return Nfts.parse_obj(obj)
74
74
 
75
75
  # fill idempotency_key and ciphertext with placeholder for auto_fill
76
76
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -79,8 +79,8 @@ class Wallet2(BaseModel):
79
79
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
80
80
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
81
81
 
82
- _obj = Wallet2.parse_obj({
83
- "data": Wallet2Data.from_dict(obj.get("data")) if obj.get("data") is not None else None
82
+ _obj = Nfts.parse_obj({
83
+ "data": NftsData.from_dict(obj.get("data")) if obj.get("data") is not None else None
84
84
  })
85
85
  return _obj
86
86
 
@@ -18,9 +18,9 @@ from typing import List, Optional
18
18
  from pydantic import BaseModel, conlist
19
19
  from circle.web3.developer_controlled_wallets.models.nft import Nft
20
20
 
21
- class GetNftsResponse(BaseModel):
21
+ class NftsData(BaseModel):
22
22
  """
23
- GetNftsResponse
23
+ NftsData
24
24
  """
25
25
  nfts: Optional[conlist(Nft)] = None
26
26
  __properties = ["nfts"]
@@ -48,8 +48,8 @@ class GetNftsResponse(BaseModel):
48
48
  return json.dumps(self.to_dict())
49
49
 
50
50
  @classmethod
51
- def from_json(cls, json_str: str) -> GetNftsResponse:
52
- """Create an instance of GetNftsResponse from a JSON string"""
51
+ def from_json(cls, json_str: str) -> NftsData:
52
+ """Create an instance of NftsData from a JSON string"""
53
53
  return cls.from_dict(json.loads(json_str))
54
54
 
55
55
  def to_dict(self):
@@ -68,13 +68,13 @@ class GetNftsResponse(BaseModel):
68
68
  return _dict
69
69
 
70
70
  @classmethod
71
- def from_dict(cls, obj: dict) -> GetNftsResponse:
72
- """Create an instance of GetNftsResponse from a dict"""
71
+ def from_dict(cls, obj: dict) -> NftsData:
72
+ """Create an instance of NftsData from a dict"""
73
73
  if obj is None:
74
74
  return None
75
75
 
76
76
  if not isinstance(obj, dict):
77
- return GetNftsResponse.parse_obj(obj)
77
+ return NftsData.parse_obj(obj)
78
78
 
79
79
  # fill idempotency_key and ciphertext with placeholder for auto_fill
80
80
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -83,7 +83,7 @@ class GetNftsResponse(BaseModel):
83
83
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
84
84
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
85
85
 
86
- _obj = GetNftsResponse.parse_obj({
86
+ _obj = NftsData.parse_obj({
87
87
  "nfts": [Nft.from_dict(_item) for _item in obj.get("nfts")] if obj.get("nfts") is not None else None
88
88
  })
89
89
  return _obj
@@ -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 RiskAction(str, Enum):
21
+ """
22
+ An action to to take for the decision.
23
+ """
24
+
25
+ """
26
+ allowed enum values
27
+ """
28
+ APPROVE = 'APPROVE'
29
+ REVIEW = 'REVIEW'
30
+ FREEZE_WALLET = 'FREEZE_WALLET'
31
+ DENY = 'DENY'
32
+
33
+ @classmethod
34
+ def from_json(cls, json_str: str) -> RiskAction:
35
+ """Create an instance of RiskAction from a JSON string"""
36
+ return RiskAction(json.loads(json_str))
37
+
38
+
@@ -0,0 +1,48 @@
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 RiskCategory(str, Enum):
21
+ """
22
+ The category of the associated risk of the blockchain address.
23
+ """
24
+
25
+ """
26
+ allowed enum values
27
+ """
28
+ SANCTIONS = 'SANCTIONS'
29
+ CSAM = 'CSAM'
30
+ ILLICIT_BEHAVIOR = 'ILLICIT_BEHAVIOR'
31
+ GAMBLING = 'GAMBLING'
32
+ TERRORIST_FINANCING = 'TERRORIST_FINANCING'
33
+ UNSUPPORTED = 'UNSUPPORTED'
34
+ FROZEN = 'FROZEN'
35
+ OTHER = 'OTHER'
36
+ HIGH_RISK_INDUSTRY = 'HIGH_RISK_INDUSTRY'
37
+ PEP = 'PEP'
38
+ TRUSTED = 'TRUSTED'
39
+ HACKING = 'HACKING'
40
+ HUMAN_TRAFFICKING = 'HUMAN_TRAFFICKING'
41
+ SPECIAL_MEASURES = 'SPECIAL_MEASURES'
42
+
43
+ @classmethod
44
+ def from_json(cls, json_str: str) -> RiskCategory:
45
+ """Create an instance of RiskCategory from a JSON string"""
46
+ return RiskCategory(json.loads(json_str))
47
+
48
+
@@ -0,0 +1,40 @@
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 RiskScore(str, Enum):
21
+ """
22
+ Risk score of the signal.
23
+ """
24
+
25
+ """
26
+ allowed enum values
27
+ """
28
+ UNKNOWN = 'UNKNOWN'
29
+ LOW = 'LOW'
30
+ MEDIUM = 'MEDIUM'
31
+ HIGH = 'HIGH'
32
+ SEVERE = 'SEVERE'
33
+ BLOCKLIST = 'BLOCKLIST'
34
+
35
+ @classmethod
36
+ def from_json(cls, json_str: str) -> RiskScore:
37
+ """Create an instance of RiskScore from a JSON string"""
38
+ return RiskScore(json.loads(json_str))
39
+
40
+
@@ -0,0 +1,101 @@
1
+ # coding: utf-8
2
+
3
+ """
4
+ The version of the OpenAPI document: 1.0
5
+ Generated by OpenAPI Generator (https://openapi-generator.tech)
6
+
7
+ Do not edit the class manually.
8
+ """ # noqa: E501
9
+
10
+
11
+ from __future__ import annotations
12
+ import pprint
13
+ import re # noqa: F401
14
+ import json
15
+
16
+
17
+ from typing import List
18
+ from pydantic import BaseModel, Field, StrictStr, conlist, validator
19
+ from circle.web3.developer_controlled_wallets.models.risk_category import RiskCategory
20
+ from circle.web3.developer_controlled_wallets.models.risk_score import RiskScore
21
+ from circle.web3.developer_controlled_wallets.models.risk_type import RiskType
22
+
23
+ class RiskSignal(BaseModel):
24
+ """
25
+ Risk signal that includes source, value, and risk type, risk score and risk category.
26
+ """
27
+ source: StrictStr = Field(..., description="Source of the risk signal.")
28
+ source_value: StrictStr = Field(..., alias="sourceValue", description="Value of the source. For example, if source is “ADDRESS”. The source value would be an blockchain address.")
29
+ risk_score: RiskScore = Field(..., alias="riskScore")
30
+ risk_categories: conlist(RiskCategory) = Field(..., alias="riskCategories", description="List of risk categories for the signal.")
31
+ type: RiskType = Field(...)
32
+ __properties = ["source", "sourceValue", "riskScore", "riskCategories", "type"]
33
+
34
+ def __init__(self, **kwargs):
35
+ if "idempotencyKey" in self.__properties and not kwargs.get("idempotency_key"):
36
+ kwargs["idempotency_key"] = "#REFILL_PLACEHOLDER"
37
+
38
+ if "entitySecretCiphertext" in self.__properties and not kwargs.get("entity_secret_ciphertext"):
39
+ kwargs["entity_secret_ciphertext"] = "#REFILL_PLACEHOLDER"
40
+ super().__init__(**kwargs)
41
+
42
+
43
+ @validator('source')
44
+ def source_validate_enum(cls, value):
45
+ """Validates the enum"""
46
+ if value not in ('ADDRESS', 'BLOCKCHAIN', 'ASSET'):
47
+ raise ValueError("must be one of enum values ('ADDRESS', 'BLOCKCHAIN', 'ASSET')")
48
+ return value
49
+
50
+ class Config:
51
+ """Pydantic configuration"""
52
+ allow_population_by_field_name = True
53
+ validate_assignment = True
54
+
55
+ def to_str(self) -> str:
56
+ """Returns the string representation of the model using alias"""
57
+ return pprint.pformat(self.dict(by_alias=True))
58
+
59
+ def to_json(self) -> str:
60
+ """Returns the JSON representation of the model using alias"""
61
+ return json.dumps(self.to_dict())
62
+
63
+ @classmethod
64
+ def from_json(cls, json_str: str) -> RiskSignal:
65
+ """Create an instance of RiskSignal from a JSON string"""
66
+ return cls.from_dict(json.loads(json_str))
67
+
68
+ def to_dict(self):
69
+ """Returns the dictionary representation of the model using alias"""
70
+ _dict = self.dict(by_alias=True,
71
+ exclude={
72
+ },
73
+ exclude_none=True)
74
+ return _dict
75
+
76
+ @classmethod
77
+ def from_dict(cls, obj: dict) -> RiskSignal:
78
+ """Create an instance of RiskSignal from a dict"""
79
+ if obj is None:
80
+ return None
81
+
82
+ if not isinstance(obj, dict):
83
+ return RiskSignal.parse_obj(obj)
84
+
85
+ # fill idempotency_key and ciphertext with placeholder for auto_fill
86
+ if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
87
+ obj["idempotencyKey"] = "#REFILL_PLACEHOLDER"
88
+
89
+ if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
90
+ obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
91
+
92
+ _obj = RiskSignal.parse_obj({
93
+ "source": obj.get("source"),
94
+ "source_value": obj.get("sourceValue"),
95
+ "risk_score": obj.get("riskScore"),
96
+ "risk_categories": obj.get("riskCategories"),
97
+ "type": obj.get("type")
98
+ })
99
+ return _obj
100
+
101
+
@@ -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 RiskType(str, Enum):
21
+ """
22
+ Type of the signal.
23
+ """
24
+
25
+ """
26
+ allowed enum values
27
+ """
28
+ OWNERSHIP = 'OWNERSHIP'
29
+ COUNTERPARTY = 'COUNTERPARTY'
30
+ INDIRECT = 'INDIRECT'
31
+
32
+ @classmethod
33
+ def from_json(cls, json_str: str) -> RiskType:
34
+ """Create an instance of RiskType from a JSON string"""
35
+ return RiskType(json.loads(json_str))
36
+
37
+
@@ -17,11 +17,11 @@ import json
17
17
  from typing import Optional, Union
18
18
  from pydantic import BaseModel, Field, StrictBool, StrictBytes, StrictStr
19
19
 
20
- class SignMessageForDeveloperRequest(BaseModel):
20
+ class SignMessageRequest(BaseModel):
21
21
  """
22
- SignMessageForDeveloperRequest
22
+ SignMessageRequest
23
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.")
24
+ wallet_id: StrictStr = Field(..., alias="walletId", description="System-generated unique identifier of the resource.")
25
25
  encoded_by_hex: Optional[StrictBool] = Field(None, alias="encodedByHex", description="Indicator of whether the input message is encoded by hex. If TRUE, then the message should be a hex string. By default, it is False.")
26
26
  message: StrictStr = Field(..., description="The user friendly message that needs to be signed. If it is a hex string, encodedByHex needs to be TRUE. The hex string should start with “0x” and have even length.")
27
27
  memo: Optional[StrictStr] = Field(None, description="The human readable explanation for this sign action. Useful for presenting with extra information.")
@@ -51,8 +51,8 @@ class SignMessageForDeveloperRequest(BaseModel):
51
51
  return json.dumps(self.to_dict())
52
52
 
53
53
  @classmethod
54
- def from_json(cls, json_str: str) -> SignMessageForDeveloperRequest:
55
- """Create an instance of SignMessageForDeveloperRequest from a JSON string"""
54
+ def from_json(cls, json_str: str) -> SignMessageRequest:
55
+ """Create an instance of SignMessageRequest from a JSON string"""
56
56
  return cls.from_dict(json.loads(json_str))
57
57
 
58
58
  def to_dict(self):
@@ -64,13 +64,13 @@ class SignMessageForDeveloperRequest(BaseModel):
64
64
  return _dict
65
65
 
66
66
  @classmethod
67
- def from_dict(cls, obj: dict) -> SignMessageForDeveloperRequest:
68
- """Create an instance of SignMessageForDeveloperRequest from a dict"""
67
+ def from_dict(cls, obj: dict) -> SignMessageRequest:
68
+ """Create an instance of SignMessageRequest from a dict"""
69
69
  if obj is None:
70
70
  return None
71
71
 
72
72
  if not isinstance(obj, dict):
73
- return SignMessageForDeveloperRequest.parse_obj(obj)
73
+ return SignMessageRequest.parse_obj(obj)
74
74
 
75
75
  # fill idempotency_key and ciphertext with placeholder for auto_fill
76
76
  if "idempotencyKey" in cls.__properties and not obj.get("idempotencyKey"):
@@ -79,7 +79,7 @@ class SignMessageForDeveloperRequest(BaseModel):
79
79
  if "entitySecretCiphertext" in cls.__properties and not obj.get("entitySecretCiphertext"):
80
80
  obj["entitySecretCiphertext"] = "#REFILL_PLACEHOLDER"
81
81
 
82
- _obj = SignMessageForDeveloperRequest.parse_obj({
82
+ _obj = SignMessageRequest.parse_obj({
83
83
  "wallet_id": obj.get("walletId"),
84
84
  "encoded_by_hex": obj.get("encodedByHex"),
85
85
  "message": obj.get("message"),
@@ -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 SignTransactionRequest(BaseModel):
21
+ """
22
+ SignTransactionRequest
23
+ """
24
+ wallet_id: StrictStr = Field(..., alias="walletId", description="System-generated unique identifier of the resource.")
25
+ raw_transaction: StrictStr = Field(..., alias="rawTransaction", description="Raw transaction string that needs to be signed. Must be base64 encoded.")
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", "rawTransaction", "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) -> SignTransactionRequest:
54
+ """Create an instance of SignTransactionRequest 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) -> SignTransactionRequest:
67
+ """Create an instance of SignTransactionRequest from a dict"""
68
+ if obj is None:
69
+ return None
70
+
71
+ if not isinstance(obj, dict):
72
+ return SignTransactionRequest.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 = SignTransactionRequest.parse_obj({
82
+ "wallet_id": obj.get("walletId"),
83
+ "raw_transaction": obj.get("rawTransaction"),
84
+ "memo": obj.get("memo"),
85
+ "entity_secret_ciphertext": obj.get("entitySecretCiphertext")
86
+ })
87
+ return _obj
88
+
89
+