UNPKG

apla-blockchain-tools

Version:

Module contains a number of tools to work with Apla Blockchain

62 lines (49 loc) 2.52 kB
# Apla blockchain tools This module contains number of tools to work with [Apla Blockchain Platform](https://github.com/AplaProject/go-apla) Available tools: - [Session](https://github.com/AnZuev/apla-blockchain-tools/blob/master/docs/Session.md) - work with Apla API - [TransactionFilter](https://github.com/AnZuev/apla-blockchain-tools/blob/master/docs/TransactionFilter.md) - search transactions by some parameters ## Installation Execute the following code in terminal for installation ``` npm install apla-blockchain-tools ``` ## Testing ### On Apla Testnet (https://testapla0.apla.io) using predefined credentials ``` npm test ``` ### On your network 1) Deploy a network using [quick-start](https://github.com/AplaProject/quick-start) 2) Create an ecosystem. Refer to this [guide](https://www.youtube.com/watch?v=9KqKLt8zME0) 3) Go to that ecosystem and import [test application](test/testAppForAplaNetwork.json) 4) Add variables to the environment | Name | Value | Description | Default | | --- | --- | --- | --- | | API_URL | http://127.0.0.1:17301/api/v2 | URL of one of the nodes | https://testapla0.apla.io:7079/api/v2 | | NETWORK_ID | 1 | Id of the network | 1 | | TEST_ECOSYSTEM_NUMBER | * | Number of the ecosystem created during step 2 | 41 | | PRIVATE_KEY | * | private key of the user | 4e304ae2492d633217eb2f161d94ba023d7f07a10b73370dd669a225bc08ba80 5) Run tests ``` npm test ``` ### Test results ![Test result](test/testResult.png?raw=true) ## License MIT License Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.