payment-getway-library
v0.0.29
Published
Payment Gateway is a Javascript library that provides an easy-to-use interface for interacting with a Polkadot node using the `@polkadot/api` library.
Downloads
38
Maintainers
Readme
Payment Gateway
Payment Gateway is a Javascript library that provides an easy-to-use interface for interacting with a Polkadot node using the @polkadot/api
library.
Installation
npm i payment-getway-library
Usage
const paymentGateway = require("payment-getway-library");
async function main() {
const wrapper = new paymentGateway('ws://server-ip-address:9944');
await wrapper.connect();
const latestBlock = await wrapper.getLatestBlock();
console.log('Latest block:', latestBlock);
const newAccount = wrapper.createAccount();
console.log('New account:', newAccount);
}
main().catch(console.error);