phantasma-sdk-py 1.0.10__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.
- phantasma_sdk_py-1.0.10/LICENSE +21 -0
- phantasma_sdk_py-1.0.10/PKG-INFO +281 -0
- phantasma_sdk_py-1.0.10/README.md +256 -0
- phantasma_sdk_py-1.0.10/pyproject.toml +21 -0
- phantasma_sdk_py-1.0.10/setup.cfg +4 -0
- phantasma_sdk_py-1.0.10/setup.py +48 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/__init__.py +21 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/account_api.py +393 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/auction_api.py +324 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/block_api.py +757 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/chain_api.py +118 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/connection_api.py +563 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/contract_api.py +308 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/leaderboard_api.py +122 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/nexus_api.py +122 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/organization_api.py +300 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/platform_api.py +296 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/rpc_api.py +126 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/sale_api.py +207 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/storage_api.py +122 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/token_api.py +599 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/transaction_api.py +591 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/API/validator_api.py +211 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/__init__.py +90 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/api_client.py +632 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/configuration.py +244 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/__init__.py +69 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/abi_event_result.py +188 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/abi_method_result.py +162 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/abi_parameter_result.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/account_result.py +344 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/address.py +318 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/address_kind.py +92 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/archive_result.py +292 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/auction_result.py +474 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/balance_result.py +214 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/block_result.py +370 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/chain_result.py +266 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/contract_result.py +214 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/crowdsale_result.py +422 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/event_result.py +188 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/governance_result.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/interop_result.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/leaderboard_result.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/leaderboard_row_result.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/net_info_peer.py +188 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/net_info_peer_connection_status.py +188 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/net_info_peer_connection_status_channel.py +214 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/net_info_peer_connection_status_monitor.py +422 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/nexus_result.py +266 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/node_info.py +292 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/node_info_other.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/node_info_protocol_version.py +162 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/oracle_result.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/organization_result.py +162 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/paginated_result.py +214 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/platform_result.py +214 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/pub_key.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/response_query.py +318 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/result_abci_query.py +110 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/result_health.py +84 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/result_net_info.py +188 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/result_status.py +162 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/result_status_sync_info.py +214 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/result_status_validator_info.py +162 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/rpc_request.py +188 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/rpc_response.py +162 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/script_result.py +214 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/signature_result.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/stake_result.py +162 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/storage_result.py +188 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/token_data_result.py +370 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/token_external_result.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/token_price_result.py +214 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/token_property_result.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/token_result.py +422 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/token_series_result.py +266 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/transaction_result.py +552 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/validator_result.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/models/validator_settings.py +214 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/API/rest.py +317 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Interfaces/IContract.py +33 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Interfaces/IKeyPair.py +23 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Interfaces/ISerializable.py +20 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Interfaces/ISignature.py +4 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Interfaces/IStack.py +27 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Interfaces/IToken.py +38 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Interfaces/Signature.py +37 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Interfaces/SignatureKind.py +10 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Interfaces/__init__.py +7 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/RPC/PhantasmaAPI.py +31 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/RPC/PhantasmaRPC.py +343 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/RPC/__init__.py +3 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Tx/Transaction.py +189 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Tx/__init__.py +1 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Address.py +186 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/DomainSettings.py +58 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Ed25519Signature.py +44 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Enums/AccountTrigger.py +12 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Enums/AddressKind.py +7 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Enums/OrganizationTrigger.py +7 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Enums/TokenTrigger.py +14 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Enums/TriggerResult.py +7 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Enums/__init__.py +5 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Extensions/Base16.py +26 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Extensions/PBinaryReader.py +134 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Extensions/PBinaryWriter.py +157 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Extensions/__init__.py +4 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/PhantasmaKeys.py +82 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Serialization.py +64 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Stack.py +33 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/Timestamp.py +86 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Types/__init__.py +11 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Utils/__init__.py +1 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/Utils/utils.py +77 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/VM/Contracts.py +17 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/VM/Decoder.py +88 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/VM/EventData.py +62 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/VM/EventDecoder.py +136 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/VM/EventKind.py +56 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/VM/Opcode.py +67 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/VM/ScriptBuilder.py +633 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/VM/TypeAuction.py +7 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/VM/VMObject.py +990 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/VM/VMType.py +12 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/VM/__init__.py +11 -0
- phantasma_sdk_py-1.0.10/src/phantasma_py/__init__.py +15 -0
- phantasma_sdk_py-1.0.10/src/phantasma_sdk_py.egg-info/PKG-INFO +281 -0
- phantasma_sdk_py-1.0.10/src/phantasma_sdk_py.egg-info/SOURCES.txt +130 -0
- phantasma_sdk_py-1.0.10/src/phantasma_sdk_py.egg-info/dependency_links.txt +1 -0
- phantasma_sdk_py-1.0.10/src/phantasma_sdk_py.egg-info/requires.txt +10 -0
- phantasma_sdk_py-1.0.10/src/phantasma_sdk_py.egg-info/top_level.txt +1 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2021-2025 Phantasma
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
|
@@ -0,0 +1,281 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: phantasma-sdk-py
|
|
3
|
+
Version: 1.0.10
|
|
4
|
+
Summary: Phantasma SDK for Python
|
|
5
|
+
Home-page: https://phantasma.info/
|
|
6
|
+
Author-email: info@phantasma.info
|
|
7
|
+
Project-URL: Homepage, https://github.com/phantasma-io/Phantasma-Py
|
|
8
|
+
Requires-Python: >=3.6
|
|
9
|
+
Description-Content-Type: text/markdown
|
|
10
|
+
License-File: LICENSE
|
|
11
|
+
Requires-Dist: certifi>=14.05.14
|
|
12
|
+
Requires-Dist: six>=1.10
|
|
13
|
+
Requires-Dist: python_dateutil>=2.5.3
|
|
14
|
+
Requires-Dist: setuptools>=21.0.0
|
|
15
|
+
Requires-Dist: urllib3>=1.15.1
|
|
16
|
+
Requires-Dist: requests>=2.18.4
|
|
17
|
+
Requires-Dist: base58>=2.1.1
|
|
18
|
+
Requires-Dist: cryptography>=41.0.7
|
|
19
|
+
Requires-Dist: numpy>=1.26.2
|
|
20
|
+
Requires-Dist: ecpy>=1.2.5
|
|
21
|
+
Dynamic: author-email
|
|
22
|
+
Dynamic: home-page
|
|
23
|
+
Dynamic: license-file
|
|
24
|
+
Dynamic: requires-python
|
|
25
|
+
|
|
26
|
+
# Phantasma Py
|
|
27
|
+
|
|
28
|
+
## Python SimpleWallet Sample app
|
|
29
|
+
|
|
30
|
+
This is a simple wallet sample that needs to be connected to a RPC node. By default it uses the localhost:7077/rpc endpoint, but you can switch to your own URL.
|
|
31
|
+
|
|
32
|
+
To run the sample app, follow these steps:
|
|
33
|
+
|
|
34
|
+
1. Install "requests" module (Run "pip install requests" on command line inside app folder)
|
|
35
|
+
|
|
36
|
+
2. Run the sample app!
|
|
37
|
+
|
|
38
|
+
## Python VM Samples
|
|
39
|
+
|
|
40
|
+
The VM Module implements the following classes EventDecoder, ScriptBuilder and Transaction in order to provide support to:
|
|
41
|
+
|
|
42
|
+
- Decode TX events data.
|
|
43
|
+
Examples:
|
|
44
|
+
/Python/Samples/VMSamples/parsetxevents.py
|
|
45
|
+
|
|
46
|
+
- Create Scripts, Transactions and Sign them using HEX Private Key.
|
|
47
|
+
Examples:
|
|
48
|
+
/Python/Samples/VMSamples/transferFungible.py
|
|
49
|
+
/Python/Samples/VMSamples/transferNonFungible.py
|
|
50
|
+
|
|
51
|
+
# swagger-client
|
|
52
|
+
|
|
53
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
54
|
+
|
|
55
|
+
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
|
56
|
+
|
|
57
|
+
- API version: v1
|
|
58
|
+
- Package version: 1.0.0
|
|
59
|
+
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
|
|
60
|
+
For more information, please visit [https://phantasma.info](https://phantasma.info)
|
|
61
|
+
|
|
62
|
+
## Requirements.
|
|
63
|
+
|
|
64
|
+
Python 2.7 and 3.4+
|
|
65
|
+
|
|
66
|
+
## Installation & Usage
|
|
67
|
+
|
|
68
|
+
### pip install
|
|
69
|
+
|
|
70
|
+
If the python package is hosted on Github, you can install directly from Github
|
|
71
|
+
|
|
72
|
+
```sh
|
|
73
|
+
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
|
|
77
|
+
|
|
78
|
+
Then import the package:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
import swagger_client
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
### Setuptools
|
|
85
|
+
|
|
86
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
87
|
+
|
|
88
|
+
```sh
|
|
89
|
+
python setup.py install --user
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
(or `sudo python setup.py install` to install the package for all users)
|
|
93
|
+
|
|
94
|
+
Then import the package:
|
|
95
|
+
|
|
96
|
+
```python
|
|
97
|
+
import swagger_client
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Getting Started
|
|
101
|
+
|
|
102
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
from __future__ import print_function
|
|
106
|
+
import time
|
|
107
|
+
import swagger_client
|
|
108
|
+
from swagger_client.rest import ApiException
|
|
109
|
+
from pprint import pprint
|
|
110
|
+
|
|
111
|
+
# create an instance of the API class
|
|
112
|
+
api_instance = swagger_client.AccountApi(swagger_client.ApiClient(configuration))
|
|
113
|
+
account = 'account_example' # str | (optional)
|
|
114
|
+
|
|
115
|
+
try:
|
|
116
|
+
api_response = api_instance.api_v1_get_account_get(account=account)
|
|
117
|
+
pprint(api_response)
|
|
118
|
+
except ApiException as e:
|
|
119
|
+
print("Exception when calling AccountApi->api_v1_get_account_get: %s\n" % e)
|
|
120
|
+
|
|
121
|
+
# create an instance of the API class
|
|
122
|
+
api_instance = swagger_client.AccountApi(swagger_client.ApiClient(configuration))
|
|
123
|
+
account_text = 'account_text_example' # str | (optional)
|
|
124
|
+
|
|
125
|
+
try:
|
|
126
|
+
api_response = api_instance.api_v1_get_accounts_get(account_text=account_text)
|
|
127
|
+
pprint(api_response)
|
|
128
|
+
except ApiException as e:
|
|
129
|
+
print("Exception when calling AccountApi->api_v1_get_accounts_get: %s\n" % e)
|
|
130
|
+
|
|
131
|
+
# create an instance of the API class
|
|
132
|
+
api_instance = swagger_client.AccountApi(swagger_client.ApiClient(configuration))
|
|
133
|
+
symbol = 'symbol_example' # str | (optional)
|
|
134
|
+
extended = false # bool | (optional) (default to false)
|
|
135
|
+
|
|
136
|
+
try:
|
|
137
|
+
api_response = api_instance.api_v1_get_addresses_by_symbol_get(symbol=symbol, extended=extended)
|
|
138
|
+
pprint(api_response)
|
|
139
|
+
except ApiException as e:
|
|
140
|
+
print("Exception when calling AccountApi->api_v1_get_addresses_by_symbol_get: %s\n" % e)
|
|
141
|
+
|
|
142
|
+
# create an instance of the API class
|
|
143
|
+
api_instance = swagger_client.AccountApi(swagger_client.ApiClient(configuration))
|
|
144
|
+
name = 'name_example' # str | (optional)
|
|
145
|
+
|
|
146
|
+
try:
|
|
147
|
+
api_response = api_instance.api_v1_look_up_name_get(name=name)
|
|
148
|
+
pprint(api_response)
|
|
149
|
+
except ApiException as e:
|
|
150
|
+
print("Exception when calling AccountApi->api_v1_look_up_name_get: %s\n" % e)
|
|
151
|
+
```
|
|
152
|
+
|
|
153
|
+
## Documentation for API Endpoints
|
|
154
|
+
|
|
155
|
+
All URIs are relative to _/_
|
|
156
|
+
|
|
157
|
+
| Class | Method | HTTP request | Description |
|
|
158
|
+
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | ----------- |
|
|
159
|
+
| _AccountApi_ | [**api_v1_get_account_get**](docs/AccountApi.md#api_v1_get_account_get) | **GET** /api/v1/GetAccount |
|
|
160
|
+
| _AccountApi_ | [**api_v1_get_accounts_get**](docs/AccountApi.md#api_v1_get_accounts_get) | **GET** /api/v1/GetAccounts |
|
|
161
|
+
| _AccountApi_ | [**api_v1_get_addresses_by_symbol_get**](docs/AccountApi.md#api_v1_get_addresses_by_symbol_get) | **GET** /api/v1/GetAddressesBySymbol |
|
|
162
|
+
| _AccountApi_ | [**api_v1_look_up_name_get**](docs/AccountApi.md#api_v1_look_up_name_get) | **GET** /api/v1/LookUpName |
|
|
163
|
+
| _AuctionApi_ | [**api_v1_get_auction_get**](docs/AuctionApi.md#api_v1_get_auction_get) | **GET** /api/v1/GetAuction |
|
|
164
|
+
| _AuctionApi_ | [**api_v1_get_auctions_count_get**](docs/AuctionApi.md#api_v1_get_auctions_count_get) | **GET** /api/v1/GetAuctionsCount |
|
|
165
|
+
| _AuctionApi_ | [**api_v1_get_auctions_get**](docs/AuctionApi.md#api_v1_get_auctions_get) | **GET** /api/v1/GetAuctions |
|
|
166
|
+
| _BlockApi_ | [**api_v1_get_block_by_hash_get**](docs/BlockApi.md#api_v1_get_block_by_hash_get) | **GET** /api/v1/GetBlockByHash |
|
|
167
|
+
| _BlockApi_ | [**api_v1_get_block_by_height_get**](docs/BlockApi.md#api_v1_get_block_by_height_get) | **GET** /api/v1/GetBlockByHeight |
|
|
168
|
+
| _BlockApi_ | [**api_v1_get_block_height_get**](docs/BlockApi.md#api_v1_get_block_height_get) | **GET** /api/v1/GetBlockHeight |
|
|
169
|
+
| _BlockApi_ | [**api_v1_get_block_transaction_count_by_hash_get**](docs/BlockApi.md#api_v1_get_block_transaction_count_by_hash_get) | **GET** /api/v1/GetBlockTransactionCountByHash |
|
|
170
|
+
| _BlockApi_ | [**api_v1_get_latest_block_get**](docs/BlockApi.md#api_v1_get_latest_block_get) | **GET** /api/v1/GetLatestBlock |
|
|
171
|
+
| _BlockApi_ | [**api_v1_get_raw_block_by_hash_get**](docs/BlockApi.md#api_v1_get_raw_block_by_hash_get) | **GET** /api/v1/GetRawBlockByHash |
|
|
172
|
+
| _BlockApi_ | [**api_v1_get_raw_block_by_height_get**](docs/BlockApi.md#api_v1_get_raw_block_by_height_get) | **GET** /api/v1/GetRawBlockByHeight |
|
|
173
|
+
| _BlockApi_ | [**api_v1_get_raw_latest_block_get**](docs/BlockApi.md#api_v1_get_raw_latest_block_get) | **GET** /api/v1/GetRawLatestBlock |
|
|
174
|
+
| _ChainApi_ | [**api_v1_get_chains_get**](docs/ChainApi.md#api_v1_get_chains_get) | **GET** /api/v1/GetChains |
|
|
175
|
+
| _ConnectionApi_ | [**api_v1_abci_query_get**](docs/ConnectionApi.md#api_v1_abci_query_get) | **GET** /api/v1/abci_query |
|
|
176
|
+
| _ConnectionApi_ | [**api_v1_get_validators_settings_get**](docs/ConnectionApi.md#api_v1_get_validators_settings_get) | **GET** /api/v1/GetValidatorsSettings |
|
|
177
|
+
| _ConnectionApi_ | [**api_v1_health_get**](docs/ConnectionApi.md#api_v1_health_get) | **GET** /api/v1/health |
|
|
178
|
+
| _ConnectionApi_ | [**api_v1_net_info_get**](docs/ConnectionApi.md#api_v1_net_info_get) | **GET** /api/v1/net_info |
|
|
179
|
+
| _ConnectionApi_ | [**api_v1_request_block_get**](docs/ConnectionApi.md#api_v1_request_block_get) | **GET** /api/v1/request_block |
|
|
180
|
+
| _ConnectionApi_ | [**api_v1_status_get**](docs/ConnectionApi.md#api_v1_status_get) | **GET** /api/v1/status |
|
|
181
|
+
| _ContractApi_ | [**api_v1_get_contract_by_address_get**](docs/ContractApi.md#api_v1_get_contract_by_address_get) | **GET** /api/v1/GetContractByAddress |
|
|
182
|
+
| _ContractApi_ | [**api_v1_get_contract_get**](docs/ContractApi.md#api_v1_get_contract_get) | **GET** /api/v1/GetContract |
|
|
183
|
+
| _LeaderboardApi_ | [**api_v1_get_leaderboard_get**](docs/LeaderboardApi.md#api_v1_get_leaderboard_get) | **GET** /api/v1/GetLeaderboard |
|
|
184
|
+
| _NexusApi_ | [**api_v1_get_nexus_get**](docs/NexusApi.md#api_v1_get_nexus_get) | **GET** /api/v1/GetNexus |
|
|
185
|
+
| _OrganizationApi_ | [**api_v1_get_organization_by_name_get**](docs/OrganizationApi.md#api_v1_get_organization_by_name_get) | **GET** /api/v1/GetOrganizationByName |
|
|
186
|
+
| _OrganizationApi_ | [**api_v1_get_organization_get**](docs/OrganizationApi.md#api_v1_get_organization_get) | **GET** /api/v1/GetOrganization |
|
|
187
|
+
| _OrganizationApi_ | [**api_v1_get_organizations_get**](docs/OrganizationApi.md#api_v1_get_organizations_get) | **GET** /api/v1/GetOrganizations |
|
|
188
|
+
| _PlatformApi_ | [**api_v1_get_interop_get**](docs/PlatformApi.md#api_v1_get_interop_get) | **GET** /api/v1/GetInterop |
|
|
189
|
+
| _PlatformApi_ | [**api_v1_get_platform_get**](docs/PlatformApi.md#api_v1_get_platform_get) | **GET** /api/v1/GetPlatform |
|
|
190
|
+
| _PlatformApi_ | [**api_v1_get_platforms_get**](docs/PlatformApi.md#api_v1_get_platforms_get) | **GET** /api/v1/GetPlatforms |
|
|
191
|
+
| _RpcApi_ | [**rpc_post**](docs/RpcApi.md#rpc_post) | **POST** /rpc |
|
|
192
|
+
| _SaleApi_ | [**api_v1_get_latest_sale_hash_get**](docs/SaleApi.md#api_v1_get_latest_sale_hash_get) | **GET** /api/v1/GetLatestSaleHash |
|
|
193
|
+
| _SaleApi_ | [**api_v1_get_sale_get**](docs/SaleApi.md#api_v1_get_sale_get) | **GET** /api/v1/GetSale |
|
|
194
|
+
| _TokenApi_ | [**api_v1_get_nft_get**](docs/TokenApi.md#api_v1_get_nft_get) | **GET** /api/v1/GetNFT |
|
|
195
|
+
| _TokenApi_ | [**api_v1_get_nfts_get**](docs/TokenApi.md#api_v1_get_nfts_get) | **GET** /api/v1/GetNFTs |
|
|
196
|
+
| _TokenApi_ | [**api_v1_get_token_balance_get**](docs/TokenApi.md#api_v1_get_token_balance_get) | **GET** /api/v1/GetTokenBalance |
|
|
197
|
+
| _TokenApi_ | [**api_v1_get_token_data_get**](docs/TokenApi.md#api_v1_get_token_data_get) | **GET** /api/v1/GetTokenData |
|
|
198
|
+
| _TokenApi_ | [**api_v1_get_token_get**](docs/TokenApi.md#api_v1_get_token_get) | **GET** /api/v1/GetToken |
|
|
199
|
+
| _TokenApi_ | [**api_v1_get_tokens_get**](docs/TokenApi.md#api_v1_get_tokens_get) | **GET** /api/v1/GetTokens |
|
|
200
|
+
| _TransactionApi_ | [**api_v1_get_address_transaction_count_get**](docs/TransactionApi.md#api_v1_get_address_transaction_count_get) | **GET** /api/v1/GetAddressTransactionCount |
|
|
201
|
+
| _TransactionApi_ | [**api_v1_get_address_transactions_get**](docs/TransactionApi.md#api_v1_get_address_transactions_get) | **GET** /api/v1/GetAddressTransactions |
|
|
202
|
+
| _TransactionApi_ | [**api_v1_get_transaction_by_block_hash_and_index_get**](docs/TransactionApi.md#api_v1_get_transaction_by_block_hash_and_index_get) | **GET** /api/v1/GetTransactionByBlockHashAndIndex |
|
|
203
|
+
| _TransactionApi_ | [**api_v1_get_transaction_get**](docs/TransactionApi.md#api_v1_get_transaction_get) | **GET** /api/v1/GetTransaction |
|
|
204
|
+
| _TransactionApi_ | [**api_v1_invoke_raw_script_get**](docs/TransactionApi.md#api_v1_invoke_raw_script_get) | **GET** /api/v1/InvokeRawScript |
|
|
205
|
+
| _TransactionApi_ | [**api_v1_send_raw_transaction_get**](docs/TransactionApi.md#api_v1_send_raw_transaction_get) | **GET** /api/v1/SendRawTransaction |
|
|
206
|
+
| _ValidatorApi_ | [**api_v1_get_validators_get**](docs/ValidatorApi.md#api_v1_get_validators_get) | **GET** /api/v1/GetValidators |
|
|
207
|
+
| _ValidatorApi_ | [**api_v1_get_validators_type_get**](docs/ValidatorApi.md#api_v1_get_validators_type_get) | **GET** /api/v1/GetValidators/{type} |
|
|
208
|
+
|
|
209
|
+
## Documentation For Models
|
|
210
|
+
|
|
211
|
+
- [ABIEventResult](docs/ABIEventResult.md)
|
|
212
|
+
- [ABIMethodResult](docs/ABIMethodResult.md)
|
|
213
|
+
- [ABIParameterResult](docs/ABIParameterResult.md)
|
|
214
|
+
- [AccountResult](docs/AccountResult.md)
|
|
215
|
+
- [Address](docs/Address.md)
|
|
216
|
+
- [AddressKind](docs/AddressKind.md)
|
|
217
|
+
- [ArchiveResult](docs/ArchiveResult.md)
|
|
218
|
+
- [AuctionResult](docs/AuctionResult.md)
|
|
219
|
+
- [BalanceResult](docs/BalanceResult.md)
|
|
220
|
+
- [BlockResult](docs/BlockResult.md)
|
|
221
|
+
- [ChainResult](docs/ChainResult.md)
|
|
222
|
+
- [ContractResult](docs/ContractResult.md)
|
|
223
|
+
- [CrowdsaleResult](docs/CrowdsaleResult.md)
|
|
224
|
+
- [EventResult](docs/EventResult.md)
|
|
225
|
+
- [GovernanceResult](docs/GovernanceResult.md)
|
|
226
|
+
- [InteropResult](docs/InteropResult.md)
|
|
227
|
+
- [LeaderboardResult](docs/LeaderboardResult.md)
|
|
228
|
+
- [LeaderboardRowResult](docs/LeaderboardRowResult.md)
|
|
229
|
+
- [NetInfoPeer](docs/NetInfoPeer.md)
|
|
230
|
+
- [NetInfoPeerConnectionStatus](docs/NetInfoPeerConnectionStatus.md)
|
|
231
|
+
- [NetInfoPeerConnectionStatusChannel](docs/NetInfoPeerConnectionStatusChannel.md)
|
|
232
|
+
- [NetInfoPeerConnectionStatusMonitor](docs/NetInfoPeerConnectionStatusMonitor.md)
|
|
233
|
+
- [NexusResult](docs/NexusResult.md)
|
|
234
|
+
- [NodeInfo](docs/NodeInfo.md)
|
|
235
|
+
- [NodeInfoOther](docs/NodeInfoOther.md)
|
|
236
|
+
- [NodeInfoProtocolVersion](docs/NodeInfoProtocolVersion.md)
|
|
237
|
+
- [OracleResult](docs/OracleResult.md)
|
|
238
|
+
- [OrganizationResult](docs/OrganizationResult.md)
|
|
239
|
+
- [PaginatedResult](docs/PaginatedResult.md)
|
|
240
|
+
- [PlatformResult](docs/PlatformResult.md)
|
|
241
|
+
- [PubKey](docs/PubKey.md)
|
|
242
|
+
- [ResponseQuery](docs/ResponseQuery.md)
|
|
243
|
+
- [ResultAbciQuery](docs/ResultAbciQuery.md)
|
|
244
|
+
- [ResultHealth](docs/ResultHealth.md)
|
|
245
|
+
- [ResultNetInfo](docs/ResultNetInfo.md)
|
|
246
|
+
- [ResultStatus](docs/ResultStatus.md)
|
|
247
|
+
- [ResultStatusSyncInfo](docs/ResultStatusSyncInfo.md)
|
|
248
|
+
- [ResultStatusValidatorInfo](docs/ResultStatusValidatorInfo.md)
|
|
249
|
+
- [RpcRequest](docs/RpcRequest.md)
|
|
250
|
+
- [RpcResponse](docs/RpcResponse.md)
|
|
251
|
+
- [ScriptResult](docs/ScriptResult.md)
|
|
252
|
+
- [SignatureResult](docs/SignatureResult.md)
|
|
253
|
+
- [StakeResult](docs/StakeResult.md)
|
|
254
|
+
- [StorageResult](docs/StorageResult.md)
|
|
255
|
+
- [TokenDataResult](docs/TokenDataResult.md)
|
|
256
|
+
- [TokenExternalResult](docs/TokenExternalResult.md)
|
|
257
|
+
- [TokenPriceResult](docs/TokenPriceResult.md)
|
|
258
|
+
- [TokenPropertyResult](docs/TokenPropertyResult.md)
|
|
259
|
+
- [TokenResult](docs/TokenResult.md)
|
|
260
|
+
- [TokenSeriesResult](docs/TokenSeriesResult.md)
|
|
261
|
+
- [TransactionResult](docs/TransactionResult.md)
|
|
262
|
+
- [ValidatorResult](docs/ValidatorResult.md)
|
|
263
|
+
- [ValidatorSettings](docs/ValidatorSettings.md)
|
|
264
|
+
|
|
265
|
+
## Documentation For Authorization
|
|
266
|
+
|
|
267
|
+
All endpoints do not require authorization.
|
|
268
|
+
|
|
269
|
+
## Author
|
|
270
|
+
|
|
271
|
+
## Tests
|
|
272
|
+
|
|
273
|
+
Running the Test:
|
|
274
|
+
|
|
275
|
+
Run the test file directly in your terminal or command line.
|
|
276
|
+
You can also use a Python IDE that supports running unittest test cases.
|
|
277
|
+
If your project contains multiple test files, you can run all of them using a test discovery feature:
|
|
278
|
+
|
|
279
|
+
```bash
|
|
280
|
+
pytest
|
|
281
|
+
```
|
|
@@ -0,0 +1,256 @@
|
|
|
1
|
+
# Phantasma Py
|
|
2
|
+
|
|
3
|
+
## Python SimpleWallet Sample app
|
|
4
|
+
|
|
5
|
+
This is a simple wallet sample that needs to be connected to a RPC node. By default it uses the localhost:7077/rpc endpoint, but you can switch to your own URL.
|
|
6
|
+
|
|
7
|
+
To run the sample app, follow these steps:
|
|
8
|
+
|
|
9
|
+
1. Install "requests" module (Run "pip install requests" on command line inside app folder)
|
|
10
|
+
|
|
11
|
+
2. Run the sample app!
|
|
12
|
+
|
|
13
|
+
## Python VM Samples
|
|
14
|
+
|
|
15
|
+
The VM Module implements the following classes EventDecoder, ScriptBuilder and Transaction in order to provide support to:
|
|
16
|
+
|
|
17
|
+
- Decode TX events data.
|
|
18
|
+
Examples:
|
|
19
|
+
/Python/Samples/VMSamples/parsetxevents.py
|
|
20
|
+
|
|
21
|
+
- Create Scripts, Transactions and Sign them using HEX Private Key.
|
|
22
|
+
Examples:
|
|
23
|
+
/Python/Samples/VMSamples/transferFungible.py
|
|
24
|
+
/Python/Samples/VMSamples/transferNonFungible.py
|
|
25
|
+
|
|
26
|
+
# swagger-client
|
|
27
|
+
|
|
28
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
|
|
29
|
+
|
|
30
|
+
This Python package is automatically generated by the [Swagger Codegen](https://github.com/swagger-api/swagger-codegen) project:
|
|
31
|
+
|
|
32
|
+
- API version: v1
|
|
33
|
+
- Package version: 1.0.0
|
|
34
|
+
- Build package: io.swagger.codegen.v3.generators.python.PythonClientCodegen
|
|
35
|
+
For more information, please visit [https://phantasma.info](https://phantasma.info)
|
|
36
|
+
|
|
37
|
+
## Requirements.
|
|
38
|
+
|
|
39
|
+
Python 2.7 and 3.4+
|
|
40
|
+
|
|
41
|
+
## Installation & Usage
|
|
42
|
+
|
|
43
|
+
### pip install
|
|
44
|
+
|
|
45
|
+
If the python package is hosted on Github, you can install directly from Github
|
|
46
|
+
|
|
47
|
+
```sh
|
|
48
|
+
pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
|
|
49
|
+
```
|
|
50
|
+
|
|
51
|
+
(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
|
|
52
|
+
|
|
53
|
+
Then import the package:
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
import swagger_client
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
### Setuptools
|
|
60
|
+
|
|
61
|
+
Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
|
|
62
|
+
|
|
63
|
+
```sh
|
|
64
|
+
python setup.py install --user
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
(or `sudo python setup.py install` to install the package for all users)
|
|
68
|
+
|
|
69
|
+
Then import the package:
|
|
70
|
+
|
|
71
|
+
```python
|
|
72
|
+
import swagger_client
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
## Getting Started
|
|
76
|
+
|
|
77
|
+
Please follow the [installation procedure](#installation--usage) and then run the following:
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from __future__ import print_function
|
|
81
|
+
import time
|
|
82
|
+
import swagger_client
|
|
83
|
+
from swagger_client.rest import ApiException
|
|
84
|
+
from pprint import pprint
|
|
85
|
+
|
|
86
|
+
# create an instance of the API class
|
|
87
|
+
api_instance = swagger_client.AccountApi(swagger_client.ApiClient(configuration))
|
|
88
|
+
account = 'account_example' # str | (optional)
|
|
89
|
+
|
|
90
|
+
try:
|
|
91
|
+
api_response = api_instance.api_v1_get_account_get(account=account)
|
|
92
|
+
pprint(api_response)
|
|
93
|
+
except ApiException as e:
|
|
94
|
+
print("Exception when calling AccountApi->api_v1_get_account_get: %s\n" % e)
|
|
95
|
+
|
|
96
|
+
# create an instance of the API class
|
|
97
|
+
api_instance = swagger_client.AccountApi(swagger_client.ApiClient(configuration))
|
|
98
|
+
account_text = 'account_text_example' # str | (optional)
|
|
99
|
+
|
|
100
|
+
try:
|
|
101
|
+
api_response = api_instance.api_v1_get_accounts_get(account_text=account_text)
|
|
102
|
+
pprint(api_response)
|
|
103
|
+
except ApiException as e:
|
|
104
|
+
print("Exception when calling AccountApi->api_v1_get_accounts_get: %s\n" % e)
|
|
105
|
+
|
|
106
|
+
# create an instance of the API class
|
|
107
|
+
api_instance = swagger_client.AccountApi(swagger_client.ApiClient(configuration))
|
|
108
|
+
symbol = 'symbol_example' # str | (optional)
|
|
109
|
+
extended = false # bool | (optional) (default to false)
|
|
110
|
+
|
|
111
|
+
try:
|
|
112
|
+
api_response = api_instance.api_v1_get_addresses_by_symbol_get(symbol=symbol, extended=extended)
|
|
113
|
+
pprint(api_response)
|
|
114
|
+
except ApiException as e:
|
|
115
|
+
print("Exception when calling AccountApi->api_v1_get_addresses_by_symbol_get: %s\n" % e)
|
|
116
|
+
|
|
117
|
+
# create an instance of the API class
|
|
118
|
+
api_instance = swagger_client.AccountApi(swagger_client.ApiClient(configuration))
|
|
119
|
+
name = 'name_example' # str | (optional)
|
|
120
|
+
|
|
121
|
+
try:
|
|
122
|
+
api_response = api_instance.api_v1_look_up_name_get(name=name)
|
|
123
|
+
pprint(api_response)
|
|
124
|
+
except ApiException as e:
|
|
125
|
+
print("Exception when calling AccountApi->api_v1_look_up_name_get: %s\n" % e)
|
|
126
|
+
```
|
|
127
|
+
|
|
128
|
+
## Documentation for API Endpoints
|
|
129
|
+
|
|
130
|
+
All URIs are relative to _/_
|
|
131
|
+
|
|
132
|
+
| Class | Method | HTTP request | Description |
|
|
133
|
+
| ----------------- | ----------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------- | ----------- |
|
|
134
|
+
| _AccountApi_ | [**api_v1_get_account_get**](docs/AccountApi.md#api_v1_get_account_get) | **GET** /api/v1/GetAccount |
|
|
135
|
+
| _AccountApi_ | [**api_v1_get_accounts_get**](docs/AccountApi.md#api_v1_get_accounts_get) | **GET** /api/v1/GetAccounts |
|
|
136
|
+
| _AccountApi_ | [**api_v1_get_addresses_by_symbol_get**](docs/AccountApi.md#api_v1_get_addresses_by_symbol_get) | **GET** /api/v1/GetAddressesBySymbol |
|
|
137
|
+
| _AccountApi_ | [**api_v1_look_up_name_get**](docs/AccountApi.md#api_v1_look_up_name_get) | **GET** /api/v1/LookUpName |
|
|
138
|
+
| _AuctionApi_ | [**api_v1_get_auction_get**](docs/AuctionApi.md#api_v1_get_auction_get) | **GET** /api/v1/GetAuction |
|
|
139
|
+
| _AuctionApi_ | [**api_v1_get_auctions_count_get**](docs/AuctionApi.md#api_v1_get_auctions_count_get) | **GET** /api/v1/GetAuctionsCount |
|
|
140
|
+
| _AuctionApi_ | [**api_v1_get_auctions_get**](docs/AuctionApi.md#api_v1_get_auctions_get) | **GET** /api/v1/GetAuctions |
|
|
141
|
+
| _BlockApi_ | [**api_v1_get_block_by_hash_get**](docs/BlockApi.md#api_v1_get_block_by_hash_get) | **GET** /api/v1/GetBlockByHash |
|
|
142
|
+
| _BlockApi_ | [**api_v1_get_block_by_height_get**](docs/BlockApi.md#api_v1_get_block_by_height_get) | **GET** /api/v1/GetBlockByHeight |
|
|
143
|
+
| _BlockApi_ | [**api_v1_get_block_height_get**](docs/BlockApi.md#api_v1_get_block_height_get) | **GET** /api/v1/GetBlockHeight |
|
|
144
|
+
| _BlockApi_ | [**api_v1_get_block_transaction_count_by_hash_get**](docs/BlockApi.md#api_v1_get_block_transaction_count_by_hash_get) | **GET** /api/v1/GetBlockTransactionCountByHash |
|
|
145
|
+
| _BlockApi_ | [**api_v1_get_latest_block_get**](docs/BlockApi.md#api_v1_get_latest_block_get) | **GET** /api/v1/GetLatestBlock |
|
|
146
|
+
| _BlockApi_ | [**api_v1_get_raw_block_by_hash_get**](docs/BlockApi.md#api_v1_get_raw_block_by_hash_get) | **GET** /api/v1/GetRawBlockByHash |
|
|
147
|
+
| _BlockApi_ | [**api_v1_get_raw_block_by_height_get**](docs/BlockApi.md#api_v1_get_raw_block_by_height_get) | **GET** /api/v1/GetRawBlockByHeight |
|
|
148
|
+
| _BlockApi_ | [**api_v1_get_raw_latest_block_get**](docs/BlockApi.md#api_v1_get_raw_latest_block_get) | **GET** /api/v1/GetRawLatestBlock |
|
|
149
|
+
| _ChainApi_ | [**api_v1_get_chains_get**](docs/ChainApi.md#api_v1_get_chains_get) | **GET** /api/v1/GetChains |
|
|
150
|
+
| _ConnectionApi_ | [**api_v1_abci_query_get**](docs/ConnectionApi.md#api_v1_abci_query_get) | **GET** /api/v1/abci_query |
|
|
151
|
+
| _ConnectionApi_ | [**api_v1_get_validators_settings_get**](docs/ConnectionApi.md#api_v1_get_validators_settings_get) | **GET** /api/v1/GetValidatorsSettings |
|
|
152
|
+
| _ConnectionApi_ | [**api_v1_health_get**](docs/ConnectionApi.md#api_v1_health_get) | **GET** /api/v1/health |
|
|
153
|
+
| _ConnectionApi_ | [**api_v1_net_info_get**](docs/ConnectionApi.md#api_v1_net_info_get) | **GET** /api/v1/net_info |
|
|
154
|
+
| _ConnectionApi_ | [**api_v1_request_block_get**](docs/ConnectionApi.md#api_v1_request_block_get) | **GET** /api/v1/request_block |
|
|
155
|
+
| _ConnectionApi_ | [**api_v1_status_get**](docs/ConnectionApi.md#api_v1_status_get) | **GET** /api/v1/status |
|
|
156
|
+
| _ContractApi_ | [**api_v1_get_contract_by_address_get**](docs/ContractApi.md#api_v1_get_contract_by_address_get) | **GET** /api/v1/GetContractByAddress |
|
|
157
|
+
| _ContractApi_ | [**api_v1_get_contract_get**](docs/ContractApi.md#api_v1_get_contract_get) | **GET** /api/v1/GetContract |
|
|
158
|
+
| _LeaderboardApi_ | [**api_v1_get_leaderboard_get**](docs/LeaderboardApi.md#api_v1_get_leaderboard_get) | **GET** /api/v1/GetLeaderboard |
|
|
159
|
+
| _NexusApi_ | [**api_v1_get_nexus_get**](docs/NexusApi.md#api_v1_get_nexus_get) | **GET** /api/v1/GetNexus |
|
|
160
|
+
| _OrganizationApi_ | [**api_v1_get_organization_by_name_get**](docs/OrganizationApi.md#api_v1_get_organization_by_name_get) | **GET** /api/v1/GetOrganizationByName |
|
|
161
|
+
| _OrganizationApi_ | [**api_v1_get_organization_get**](docs/OrganizationApi.md#api_v1_get_organization_get) | **GET** /api/v1/GetOrganization |
|
|
162
|
+
| _OrganizationApi_ | [**api_v1_get_organizations_get**](docs/OrganizationApi.md#api_v1_get_organizations_get) | **GET** /api/v1/GetOrganizations |
|
|
163
|
+
| _PlatformApi_ | [**api_v1_get_interop_get**](docs/PlatformApi.md#api_v1_get_interop_get) | **GET** /api/v1/GetInterop |
|
|
164
|
+
| _PlatformApi_ | [**api_v1_get_platform_get**](docs/PlatformApi.md#api_v1_get_platform_get) | **GET** /api/v1/GetPlatform |
|
|
165
|
+
| _PlatformApi_ | [**api_v1_get_platforms_get**](docs/PlatformApi.md#api_v1_get_platforms_get) | **GET** /api/v1/GetPlatforms |
|
|
166
|
+
| _RpcApi_ | [**rpc_post**](docs/RpcApi.md#rpc_post) | **POST** /rpc |
|
|
167
|
+
| _SaleApi_ | [**api_v1_get_latest_sale_hash_get**](docs/SaleApi.md#api_v1_get_latest_sale_hash_get) | **GET** /api/v1/GetLatestSaleHash |
|
|
168
|
+
| _SaleApi_ | [**api_v1_get_sale_get**](docs/SaleApi.md#api_v1_get_sale_get) | **GET** /api/v1/GetSale |
|
|
169
|
+
| _TokenApi_ | [**api_v1_get_nft_get**](docs/TokenApi.md#api_v1_get_nft_get) | **GET** /api/v1/GetNFT |
|
|
170
|
+
| _TokenApi_ | [**api_v1_get_nfts_get**](docs/TokenApi.md#api_v1_get_nfts_get) | **GET** /api/v1/GetNFTs |
|
|
171
|
+
| _TokenApi_ | [**api_v1_get_token_balance_get**](docs/TokenApi.md#api_v1_get_token_balance_get) | **GET** /api/v1/GetTokenBalance |
|
|
172
|
+
| _TokenApi_ | [**api_v1_get_token_data_get**](docs/TokenApi.md#api_v1_get_token_data_get) | **GET** /api/v1/GetTokenData |
|
|
173
|
+
| _TokenApi_ | [**api_v1_get_token_get**](docs/TokenApi.md#api_v1_get_token_get) | **GET** /api/v1/GetToken |
|
|
174
|
+
| _TokenApi_ | [**api_v1_get_tokens_get**](docs/TokenApi.md#api_v1_get_tokens_get) | **GET** /api/v1/GetTokens |
|
|
175
|
+
| _TransactionApi_ | [**api_v1_get_address_transaction_count_get**](docs/TransactionApi.md#api_v1_get_address_transaction_count_get) | **GET** /api/v1/GetAddressTransactionCount |
|
|
176
|
+
| _TransactionApi_ | [**api_v1_get_address_transactions_get**](docs/TransactionApi.md#api_v1_get_address_transactions_get) | **GET** /api/v1/GetAddressTransactions |
|
|
177
|
+
| _TransactionApi_ | [**api_v1_get_transaction_by_block_hash_and_index_get**](docs/TransactionApi.md#api_v1_get_transaction_by_block_hash_and_index_get) | **GET** /api/v1/GetTransactionByBlockHashAndIndex |
|
|
178
|
+
| _TransactionApi_ | [**api_v1_get_transaction_get**](docs/TransactionApi.md#api_v1_get_transaction_get) | **GET** /api/v1/GetTransaction |
|
|
179
|
+
| _TransactionApi_ | [**api_v1_invoke_raw_script_get**](docs/TransactionApi.md#api_v1_invoke_raw_script_get) | **GET** /api/v1/InvokeRawScript |
|
|
180
|
+
| _TransactionApi_ | [**api_v1_send_raw_transaction_get**](docs/TransactionApi.md#api_v1_send_raw_transaction_get) | **GET** /api/v1/SendRawTransaction |
|
|
181
|
+
| _ValidatorApi_ | [**api_v1_get_validators_get**](docs/ValidatorApi.md#api_v1_get_validators_get) | **GET** /api/v1/GetValidators |
|
|
182
|
+
| _ValidatorApi_ | [**api_v1_get_validators_type_get**](docs/ValidatorApi.md#api_v1_get_validators_type_get) | **GET** /api/v1/GetValidators/{type} |
|
|
183
|
+
|
|
184
|
+
## Documentation For Models
|
|
185
|
+
|
|
186
|
+
- [ABIEventResult](docs/ABIEventResult.md)
|
|
187
|
+
- [ABIMethodResult](docs/ABIMethodResult.md)
|
|
188
|
+
- [ABIParameterResult](docs/ABIParameterResult.md)
|
|
189
|
+
- [AccountResult](docs/AccountResult.md)
|
|
190
|
+
- [Address](docs/Address.md)
|
|
191
|
+
- [AddressKind](docs/AddressKind.md)
|
|
192
|
+
- [ArchiveResult](docs/ArchiveResult.md)
|
|
193
|
+
- [AuctionResult](docs/AuctionResult.md)
|
|
194
|
+
- [BalanceResult](docs/BalanceResult.md)
|
|
195
|
+
- [BlockResult](docs/BlockResult.md)
|
|
196
|
+
- [ChainResult](docs/ChainResult.md)
|
|
197
|
+
- [ContractResult](docs/ContractResult.md)
|
|
198
|
+
- [CrowdsaleResult](docs/CrowdsaleResult.md)
|
|
199
|
+
- [EventResult](docs/EventResult.md)
|
|
200
|
+
- [GovernanceResult](docs/GovernanceResult.md)
|
|
201
|
+
- [InteropResult](docs/InteropResult.md)
|
|
202
|
+
- [LeaderboardResult](docs/LeaderboardResult.md)
|
|
203
|
+
- [LeaderboardRowResult](docs/LeaderboardRowResult.md)
|
|
204
|
+
- [NetInfoPeer](docs/NetInfoPeer.md)
|
|
205
|
+
- [NetInfoPeerConnectionStatus](docs/NetInfoPeerConnectionStatus.md)
|
|
206
|
+
- [NetInfoPeerConnectionStatusChannel](docs/NetInfoPeerConnectionStatusChannel.md)
|
|
207
|
+
- [NetInfoPeerConnectionStatusMonitor](docs/NetInfoPeerConnectionStatusMonitor.md)
|
|
208
|
+
- [NexusResult](docs/NexusResult.md)
|
|
209
|
+
- [NodeInfo](docs/NodeInfo.md)
|
|
210
|
+
- [NodeInfoOther](docs/NodeInfoOther.md)
|
|
211
|
+
- [NodeInfoProtocolVersion](docs/NodeInfoProtocolVersion.md)
|
|
212
|
+
- [OracleResult](docs/OracleResult.md)
|
|
213
|
+
- [OrganizationResult](docs/OrganizationResult.md)
|
|
214
|
+
- [PaginatedResult](docs/PaginatedResult.md)
|
|
215
|
+
- [PlatformResult](docs/PlatformResult.md)
|
|
216
|
+
- [PubKey](docs/PubKey.md)
|
|
217
|
+
- [ResponseQuery](docs/ResponseQuery.md)
|
|
218
|
+
- [ResultAbciQuery](docs/ResultAbciQuery.md)
|
|
219
|
+
- [ResultHealth](docs/ResultHealth.md)
|
|
220
|
+
- [ResultNetInfo](docs/ResultNetInfo.md)
|
|
221
|
+
- [ResultStatus](docs/ResultStatus.md)
|
|
222
|
+
- [ResultStatusSyncInfo](docs/ResultStatusSyncInfo.md)
|
|
223
|
+
- [ResultStatusValidatorInfo](docs/ResultStatusValidatorInfo.md)
|
|
224
|
+
- [RpcRequest](docs/RpcRequest.md)
|
|
225
|
+
- [RpcResponse](docs/RpcResponse.md)
|
|
226
|
+
- [ScriptResult](docs/ScriptResult.md)
|
|
227
|
+
- [SignatureResult](docs/SignatureResult.md)
|
|
228
|
+
- [StakeResult](docs/StakeResult.md)
|
|
229
|
+
- [StorageResult](docs/StorageResult.md)
|
|
230
|
+
- [TokenDataResult](docs/TokenDataResult.md)
|
|
231
|
+
- [TokenExternalResult](docs/TokenExternalResult.md)
|
|
232
|
+
- [TokenPriceResult](docs/TokenPriceResult.md)
|
|
233
|
+
- [TokenPropertyResult](docs/TokenPropertyResult.md)
|
|
234
|
+
- [TokenResult](docs/TokenResult.md)
|
|
235
|
+
- [TokenSeriesResult](docs/TokenSeriesResult.md)
|
|
236
|
+
- [TransactionResult](docs/TransactionResult.md)
|
|
237
|
+
- [ValidatorResult](docs/ValidatorResult.md)
|
|
238
|
+
- [ValidatorSettings](docs/ValidatorSettings.md)
|
|
239
|
+
|
|
240
|
+
## Documentation For Authorization
|
|
241
|
+
|
|
242
|
+
All endpoints do not require authorization.
|
|
243
|
+
|
|
244
|
+
## Author
|
|
245
|
+
|
|
246
|
+
## Tests
|
|
247
|
+
|
|
248
|
+
Running the Test:
|
|
249
|
+
|
|
250
|
+
Run the test file directly in your terminal or command line.
|
|
251
|
+
You can also use a Python IDE that supports running unittest test cases.
|
|
252
|
+
If your project contains multiple test files, you can run all of them using a test discovery feature:
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
pytest
|
|
256
|
+
```
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
[project]
|
|
2
|
+
name = "phantasma-sdk-py"
|
|
3
|
+
version = "1.0.10"
|
|
4
|
+
description = "Phantasma SDK for Python"
|
|
5
|
+
readme = "README.md"
|
|
6
|
+
requires-python = ">=3.13"
|
|
7
|
+
dependencies = [
|
|
8
|
+
"certifi>=14.05.14",
|
|
9
|
+
"six>=1.10",
|
|
10
|
+
"python_dateutil>=2.5.3",
|
|
11
|
+
"setuptools>=21.0.0",
|
|
12
|
+
"urllib3>=1.15.1",
|
|
13
|
+
"requests>=2.18.4",
|
|
14
|
+
"base58>=2.1.1",
|
|
15
|
+
"cryptography>=41.0.7",
|
|
16
|
+
"numpy>=1.26.2",
|
|
17
|
+
"ecpy>=1.2.5"
|
|
18
|
+
]
|
|
19
|
+
|
|
20
|
+
[project.urls]
|
|
21
|
+
"Homepage" = "https://github.com/phantasma-io/Phantasma-Py"
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
# coding: utf-8
|
|
2
|
+
|
|
3
|
+
"""
|
|
4
|
+
Phantasma API
|
|
5
|
+
|
|
6
|
+
No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen) # noqa: E501
|
|
7
|
+
|
|
8
|
+
OpenAPI spec version: v1
|
|
9
|
+
|
|
10
|
+
Generated by: https://github.com/swagger-api/swagger-codegen.git
|
|
11
|
+
"""
|
|
12
|
+
|
|
13
|
+
from setuptools import setup, find_packages # noqa: H301
|
|
14
|
+
|
|
15
|
+
NAME = "phantasma-sdk-py"
|
|
16
|
+
VERSION = "1.0.10"
|
|
17
|
+
# To install the library, run the following
|
|
18
|
+
#
|
|
19
|
+
# python setup.py install
|
|
20
|
+
# prerequisite: setuptools
|
|
21
|
+
# http://pypi.python.org/pypi/setuptools
|
|
22
|
+
|
|
23
|
+
REQUIRES = ["urllib3 >= 1.15", "six >= 1.10", "certifi", "python-dateutil", "requests", "base58", "cryptography", "numpy", "ecpy"]
|
|
24
|
+
|
|
25
|
+
with open("README.md", "r", encoding="utf-8") as fh:
|
|
26
|
+
long_description = fh.read()
|
|
27
|
+
|
|
28
|
+
setup(
|
|
29
|
+
name=NAME,
|
|
30
|
+
version=VERSION,
|
|
31
|
+
description="Phantasma SDK for Python",
|
|
32
|
+
author_email="info@phantasma.info",
|
|
33
|
+
url="https://phantasma.info/",
|
|
34
|
+
keywords=["Swagger", "Phantasma API"],
|
|
35
|
+
install_requires=REQUIRES,
|
|
36
|
+
#packages=find_packages(),
|
|
37
|
+
packages=find_packages(where="src"),
|
|
38
|
+
package_dir={"": "src"},
|
|
39
|
+
include_package_data=True,
|
|
40
|
+
long_description=long_description,
|
|
41
|
+
long_description_content_type="text/markdown",
|
|
42
|
+
classifiers=[
|
|
43
|
+
"Programming Language :: Python :: 3",
|
|
44
|
+
"License :: OSI Approved :: MIT License",
|
|
45
|
+
"Operating System :: OS Independent",
|
|
46
|
+
],
|
|
47
|
+
python_requires='>=3.6',
|
|
48
|
+
)
|