UNPKG

apla-blockchain-tools

Version:

Module contains a number of tools to work with Apla Blockchain

46 lines (36 loc) 1.23 kB
# TransactionsFilter This package allows developers to search for specific transactions by value of the parameters and name of the contract. It works fine with the latest version of Apla Node, so it can be used for: - [Quick-start](https://github.com/AplaProject/quick-start/releases) from 0.7.0 version - [TestNet](https://testapla0.apla.io) - [MainNet](https://main-node0.apla.io) # Getting started ```javascript /* * Put here address of the node you want to connect to * MainNet - http://main-node0.apla.io * Testnet - https://testapla[0-3].apla.io:7079/api/v2 * Quickstart - http://127.0.0.1:17301/api/v2 */ let apiUrl = "http://127.0.0.1:17301/api/v2"; let {TransactionsFilter} = require("apla-blockchain-tools"); let run = async () => { let transactionFilter = new TransactionsFilter(apiUrl, { numberOfBlocksToFetch: 100 }); let filters = [ { contractName: "@1ProfileEdit", params: { member_name: "nodeowner1" } }, { contractName: "@1NewEcosystem", params: {} } ]; let result = await transactionFilter.getTransactionsBy(filters); console.log(result); }; ```