safeheron-api-sdk-python 1.1.9__tar.gz → 1.1.11__tar.gz
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.
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/PKG-INFO +1 -1
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/api/transaction_api.py +16 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/api/web3_api.py +16 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/api/whitelist_api.py +41 -3
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python.egg-info/PKG-INFO +1 -1
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/setup.py +1 -1
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/LICENSE +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/README.rst +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/api/account_api.py +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/api/coin_api.py +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/api/mpc_sign_api.py +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/api/webhook_api.py +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/client.py +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/cosigner/co_signer_converter.py +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/tools.py +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/webhook/webhook_converter.py +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python.egg-info/SOURCES.txt +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python.egg-info/dependency_links.txt +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python.egg-info/requires.txt +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python.egg-info/top_level.txt +0 -0
- {safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/setup.cfg +0 -0
|
@@ -41,6 +41,12 @@ class ListTransactionsV1Request:
|
|
|
41
41
|
self.realDestinationAccountType = None
|
|
42
42
|
# Filter out custom transaction amounts, excluding transaction records below a certain amount specified in USD from the query results
|
|
43
43
|
self.hideSmallAmountUsd = None
|
|
44
|
+
# Filter transaction history by transaction direction:
|
|
45
|
+
# Default: Retrieve all types of transactions
|
|
46
|
+
# INFLOW: Retrieve inflows
|
|
47
|
+
# OUTFLOW: Retrieve outflows
|
|
48
|
+
# INTERNAL_TRANSFER: Retrieve internal transfers
|
|
49
|
+
self.transactionDirection = None
|
|
44
50
|
|
|
45
51
|
|
|
46
52
|
class ListTransactionsV2Request:
|
|
@@ -85,6 +91,12 @@ class ListTransactionsV2Request:
|
|
|
85
91
|
self.realDestinationAccountType = None
|
|
86
92
|
# Filter out custom transaction amounts, excluding transaction records below a certain amount specified in USD from the query results
|
|
87
93
|
self.hideSmallAmountUsd = None
|
|
94
|
+
# Filter transaction history by transaction direction:
|
|
95
|
+
# Default: Retrieve all types of transactions
|
|
96
|
+
# INFLOW: Retrieve inflows
|
|
97
|
+
# OUTFLOW: Retrieve outflows
|
|
98
|
+
# INTERNAL_TRANSFER: Retrieve internal transfers
|
|
99
|
+
self.transactionDirection = None
|
|
88
100
|
|
|
89
101
|
|
|
90
102
|
class CreateTransactionRequest:
|
|
@@ -125,6 +137,10 @@ class CreateTransactionRequest:
|
|
|
125
137
|
self.destinationAccountType = None
|
|
126
138
|
# If the destinationAccountType is ONE_TIME_ADDRESS, then this field should have a value
|
|
127
139
|
self.destinationAddress = None
|
|
140
|
+
# The memo (up to 100 characters) for the destination address, also known as a comment or tag. This parameter is valid for transactions on the following networks:
|
|
141
|
+
# TON: TON mainnet
|
|
142
|
+
# TON_TESTNET: TON testnet
|
|
143
|
+
self.memo = None
|
|
128
144
|
# Destination Tag
|
|
129
145
|
self.destinationTag = None
|
|
130
146
|
# Bitcoin enabled for RBF (Replace-by-fee is a protocol in the Bitcoin mempool that allows for the replacement of an unconfirmed transaction with another one)
|
|
@@ -49,6 +49,10 @@ class CreateWeb3EthSignRequest:
|
|
|
49
49
|
self.customerExt1 = None
|
|
50
50
|
# Merchant extended field (defined by merchant) shown to merchant (255 characters max)
|
|
51
51
|
self.customerExt2 = None
|
|
52
|
+
# Use custom network
|
|
53
|
+
# False: Use the network supported by Safeheron by default
|
|
54
|
+
# True: Use a custom network added through the Safeheron Browser Extension
|
|
55
|
+
self.useCustomNetwork = None
|
|
52
56
|
# Message Hash
|
|
53
57
|
self.messageHash = self.MessageHash()
|
|
54
58
|
|
|
@@ -77,6 +81,10 @@ class CreateWeb3PersonalSignRequest:
|
|
|
77
81
|
self.customerExt1 = None
|
|
78
82
|
# Merchant extended field (defined by merchant) shown to merchant (255 characters max)
|
|
79
83
|
self.customerExt2 = None
|
|
84
|
+
# Use custom network
|
|
85
|
+
# False: Use the network supported by Safeheron by default
|
|
86
|
+
# True: Use a custom network added through the Safeheron Browser Extension
|
|
87
|
+
self.useCustomNetwork = None
|
|
80
88
|
# Message Hash
|
|
81
89
|
self.message = self.Message()
|
|
82
90
|
|
|
@@ -105,6 +113,10 @@ class CreateWeb3EthSignTypedDataRequest:
|
|
|
105
113
|
self.customerExt1 = None
|
|
106
114
|
# Merchant extended field (defined by merchant) shown to merchant (255 characters max)
|
|
107
115
|
self.customerExt2 = None
|
|
116
|
+
# Use custom network
|
|
117
|
+
# False: Use the network supported by Safeheron by default
|
|
118
|
+
# True: Use a custom network added through the Safeheron Browser Extension
|
|
119
|
+
self.useCustomNetwork = None
|
|
108
120
|
# Message Hash
|
|
109
121
|
self.message = self.Message()
|
|
110
122
|
|
|
@@ -135,6 +147,10 @@ class CreateWeb3EthSignTransactionRequest:
|
|
|
135
147
|
self.customerExt1 = None
|
|
136
148
|
# Merchant extended field (defined by merchant) shown to merchant (255 characters max)
|
|
137
149
|
self.customerExt2 = None
|
|
150
|
+
# Use custom network
|
|
151
|
+
# False: Use the network supported by Safeheron by default
|
|
152
|
+
# True: Use a custom network added through the Safeheron Browser Extension
|
|
153
|
+
self.useCustomNetwork = None
|
|
138
154
|
# Transaction
|
|
139
155
|
self.transaction = self.Transaction()
|
|
140
156
|
|
|
@@ -41,7 +41,6 @@ class OneWhitelistRequest:
|
|
|
41
41
|
self.address = None
|
|
42
42
|
|
|
43
43
|
|
|
44
|
-
|
|
45
44
|
class CreateWhitelistRequest:
|
|
46
45
|
def __init__(self):
|
|
47
46
|
# Whitelist unique name, 20 characters max
|
|
@@ -61,6 +60,33 @@ class CreateWhitelistRequest:
|
|
|
61
60
|
self.chainType = None
|
|
62
61
|
# Public blockchain address and the address format needs to meet the requirements of the chain
|
|
63
62
|
self.address = None
|
|
63
|
+
# The memo (up to 20 characters) for the destination address, also known as a comment or tag. For the following networks, if a destination address memo was set initially, a memo matching the one in the transaction record must be provided
|
|
64
|
+
# TON: TON mainnet
|
|
65
|
+
# TON_TESTNET: TON testnet
|
|
66
|
+
self.memo = None
|
|
67
|
+
# Visibility status in Safeheron App and Web Console
|
|
68
|
+
# False: Visible by default
|
|
69
|
+
# True: Invisible; the invisible whitelist can only be managed and used through the API, such as querying, modifying, and using the whitelist as the destination address when initiating transactions
|
|
70
|
+
self.hiddenOnUI = None
|
|
71
|
+
|
|
72
|
+
|
|
73
|
+
class CreateFromTransactionWhitelistRequest:
|
|
74
|
+
def __init__(self):
|
|
75
|
+
# Whitelist unique name, 20 characters max
|
|
76
|
+
self.whitelistName = None
|
|
77
|
+
# Transaction key
|
|
78
|
+
self.txKey = None
|
|
79
|
+
# The destination address in the transaction record; case-sensitive
|
|
80
|
+
self.destinationAddress = None
|
|
81
|
+
# The memo (up to 20 characters) for the destination address, also known as a comment or tag. For the following networks, if a destination address memo was set initially, a memo matching the one in the transaction record must be provided
|
|
82
|
+
# TON: TON mainnet
|
|
83
|
+
# TON_TESTNET: TON testnet
|
|
84
|
+
self.memo = None
|
|
85
|
+
# Visibility status in Safeheron App and Web Console
|
|
86
|
+
# False: Visible by default
|
|
87
|
+
# True: Invisible; the invisible whitelist can only be managed and used through the API, such as querying, modifying, and using the whitelist as the destination address when initiating transactions
|
|
88
|
+
self.hiddenOnUI = None
|
|
89
|
+
|
|
64
90
|
|
|
65
91
|
class EditWhitelistRequest:
|
|
66
92
|
def __init__(self):
|
|
@@ -70,9 +96,14 @@ class EditWhitelistRequest:
|
|
|
70
96
|
self.whitelistName = None
|
|
71
97
|
# Public blockchain address and the address format needs to meet the requirements of the chain
|
|
72
98
|
self.address = None
|
|
99
|
+
# The memo (up to 20 characters) for the destination address, also known as a comment or tag. For the following networks, if a destination address memo was set initially, a memo matching the one in the transaction record must be provided
|
|
100
|
+
# TON: TON mainnet
|
|
101
|
+
# TON_TESTNET: TON testnet
|
|
102
|
+
self.memo = None
|
|
73
103
|
# When the whitelist is involved in a transaction approval policy, modifications will result in the new whitelist being directly applied to the approval policy. False by default, meaning that when involved in a transaction approval policy, it will not be modified.
|
|
74
104
|
self.force = None
|
|
75
105
|
|
|
106
|
+
|
|
76
107
|
class DeleteWhitelistRequest:
|
|
77
108
|
def __init__(self):
|
|
78
109
|
# Whitelist unique identifier
|
|
@@ -101,6 +132,15 @@ class WhitelistApi:
|
|
|
101
132
|
def create_whitelist(self, request: CreateWhitelistRequest):
|
|
102
133
|
return self.api_client.send_request(request, '/v1/whitelist/create')
|
|
103
134
|
|
|
135
|
+
# Create a Whitelist Based on a Transaction
|
|
136
|
+
# Whitelist the transaction's destination address when the transaction meets the following conditions:
|
|
137
|
+
#
|
|
138
|
+
# A transfer transaction from an asset wallet; Web3 wallet transactions or MPC Sign transactions are not supported.
|
|
139
|
+
# The transaction is in a completed state as COMPLETED.
|
|
140
|
+
# The transaction's destination address is a one-time address.
|
|
141
|
+
def create_from_transaction_whitelist(self, request: CreateFromTransactionWhitelistRequest):
|
|
142
|
+
return self.api_client.send_request(request, '/v1/whitelist/createFromTransaction')
|
|
143
|
+
|
|
104
144
|
# Modify a Whitelist
|
|
105
145
|
# Modify a whitelist based on its unique identifier. The whitelist only supports modifying its name and address; whitelists pending for approval cannot be modified. After modifying the whitelist, it needs to be reviewed and approved in the Safeheron App before it becomes effective. The approval details are as follows:
|
|
106
146
|
# Admin approval: If a custom whitelist approval process is not set, it will become effective after being approved by the team admins according to the team's decision-making process.
|
|
@@ -112,5 +152,3 @@ class WhitelistApi:
|
|
|
112
152
|
# To delete a whitelisted address, note that no approval is required for deletion. If a whitelisted address that is under approval is deleted, the approval task will also be automatically cancelled.
|
|
113
153
|
def delete_whitelist(self, request: DeleteWhitelistRequest):
|
|
114
154
|
return self.api_client.send_request(request, '/v1/whitelist/delete')
|
|
115
|
-
|
|
116
|
-
|
|
@@ -3,7 +3,7 @@ from setuptools import find_packages
|
|
|
3
3
|
with open("README.rst", "r") as f:
|
|
4
4
|
long_description = f.read()
|
|
5
5
|
setup(name='safeheron_api_sdk_python',
|
|
6
|
-
version='1.1.
|
|
6
|
+
version='1.1.11',
|
|
7
7
|
description='Python for Safeheron API',
|
|
8
8
|
long_description=long_description,
|
|
9
9
|
author='safeheron',
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{safeheron_api_sdk_python-1.1.9 → safeheron_api_sdk_python-1.1.11}/safeheron_api_sdk_python/tools.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|