Skip to content

Commit ee15d71

Browse files
authored
Merge pull request #21 from Safeheron/dev
v2.1.26
2 parents cd262ae + 89a3bd1 commit ee15d71

File tree

3 files changed

+30
-9
lines changed

3 files changed

+30
-9
lines changed

requirements.txt

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
aiohttp==3.8.4
1+
aiohttp==3.9.2
22
aiosignal==1.3.1
33
allure-pytest==2.13.1
44
allure-python-commons==2.13.1
@@ -14,7 +14,7 @@ cffi==1.15.0
1414
charset-normalizer==3.3.2
1515
click==8.1.7
1616
ConfigArgParse==1.5.3
17-
cryptography==36.0.2
17+
cryptography==39.0.1
1818
cycler==0.11.0
1919
cytoolz==0.12.2
2020
docutils==0.21.2
@@ -29,9 +29,9 @@ eth-utils==2.2.0
2929
exceptiongroup==1.1.1
3030
Flask-BasicAuth==0.2.0
3131
Flask-Caching==2.3.0
32-
Flask-Cors==3.0.10
32+
Flask-Cors==4.0.2
3333
frozenlist==1.3.3
34-
gevent==22.10.2
34+
gevent==23.9.0
3535
geventhttpclient==1.5.3
3636
greenlet==2.0.2
3737
hexbytes==0.3.1
@@ -60,15 +60,15 @@ packaging==23.0
6060
parsimonious==0.9.0
6161
pkginfo==1.9.6
6262
pluggy==1.0.0
63-
protobuf==4.22.1
63+
protobuf==6.31.1
6464
psutil==5.9.0
6565
py==1.11.0
6666
pycparser==2.21
67-
pycryptodome==3.18.0
68-
pycryptodomex==3.9.8
67+
pycryptodome==3.19.1
68+
pycryptodomex==3.19.1
6969
pygame==2.5.2
7070
Pygments==2.18.0
71-
PyMySQL==1.0.2
71+
PyMySQL==1.1.1
7272
pyparsing==3.0.7
7373
PySocks==1.7.1
7474
pytest==7.2.2
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
from safeheron_api_sdk_python.client import *
2+
class GasTransactionsGetByTxKeyRequest:
3+
def __init__(self):
4+
# Transaction key, obtained from transactions created via the Create a Transaction V3 API, App, or Web Console.
5+
self.txKey = None
6+
7+
8+
class GasApi:
9+
10+
def __init__(self, config):
11+
self.api_client = Client(config)
12+
13+
# Retrieve Gas Balance
14+
# Retrieve your Gas balance for the TRON energy rental service.
15+
def gas_status(self):
16+
return self.api_client.send_request(None, '/v1/gas/status')
17+
18+
# Retrieve Automatic Gas Records for Transactions
19+
# When the TRON energy rental service is enabled, Safeheron automatically tops up the required Gas fees for TRON network transactions. This API allows you to query the energy rental records used by a transaction. A single transaction may have multiple records. The actual Gas fee consumed by the transaction is the sum of all records with SUCCESS and FAILURE_GAS_CONSUMED statuses.
20+
def gas_transactions_ge_b_tx_key(self, request: GasTransactionsGetByTxKeyRequest):
21+
return self.api_client.send_request(request, '/v1/gas/transactions/getByTxKey')

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
with open("README.rst", "r") as f:
44
long_description = f.read()
55
setup(name='safeheron_api_sdk_python',
6-
version='1.1.16',
6+
version='1.1.17',
77
description='Python for Safeheron API',
88
long_description=long_description,
99
author='safeheron',

0 commit comments

Comments
 (0)