0.0.1 • Published 6 years ago

ethers-pulsar v0.0.1

Weekly downloads
-
License
MIT
Repository
-
Last release
6 years ago

ethers-pulsar

pulsar blockchain sdk

docs

https://docs.ethers.io/ethers.js/html/

Usage

import { PulsarProvider, PulsarWallet, utils } from 'ethers-pulsar';

const provider = new PulsarProvider('http://127.0.0.1:8545/');

const wallet = new PulsarWallet(mnemonic, provider);

wallet.getBalance().then(balance => {
  console.log('balance', utils.formatEther(balance));
});

// 获取所有代理矿工
wallet.getDelegateMiners();

// 委托挖矿
wallet.entrustMining(transaction);

// 撤销委托挖矿
wallet.recallMining(transaction);

// 获取委托挖矿
wallet.getEntrustMining();

LICENSE

MIT