Installation
Prerequisites
- NodeJS 14+
- Modern browsers (Chromium/Firefox/Safari, no Internet Explorer or Edge Spartan)
- Browser extensions (Chromium/Firefox)
- React-Native 0.65+ (it may still work with older versions. Use at your own risks)
How to install
npm install @sharering/shareledgerjs
# or
yarn add @sharering/shareledgerjs
caution
The package name is subject to change upon released.
That's it! Once it's done, you should be able to start developing your apps. Here's a quick snippet:
import {Secp256k1HdWallet, ShareledgerClient} from "@shareledgerjs/client";
const wallet = await Secp256k1HdWallet.generate();
const [account] = await wallet.getAccounts();
console.log(account.address); // newly generated wallet address
const client = await ShareledgerClient.connect("https://rpc-testnet.shareri.ng");
const balance = await client.bank.balance(account.address);
console.log(balance); // query account's balance
Please refer to the Usage or the full API documentation if you want to look up details for advanced use cases.