@hiveio/beekeeper
v1.27.6-rc4
Published
Hive Beekeeper functionality exposed to TypeScript/JavaScript environments
Downloads
55
Readme
beekeeper
Hive Beekeeper functionality exposed to TypeScript/JavaScript environments
Install
This is a Node.js module available through the npm registry.
Before installing, download and install Node.js. Node.js 12 or higher is required.
Installation is done using the
npm install
command:
npm install @hiveio/beekeeper
Usage
import beekeeperFactory from '@hiveio/beekeeper';
const beekeeper = await beekeeperFactory();
const session = await beekeeper.createSession("my.salt");
const { wallet } = await session.createWallet('w0', 'mypassword');
await wallet.importKey('5JkFnXrLM2ap9t3AmAxBJvQHF7xSKtnTrCTginQCkhzU5S7ecPT');
await wallet.importKey('5KGKYWMXReJewfj5M29APNMqGEu173DzvHv5TeJAg9SkjUeQV78');
await wallet.removeKey('mypassword', '6oR6ckA4TejTWTjatUdbcS98AKETc3rcnQ9dWxmeNiKDzfhBZa');
console.log(await wallet.getPublicKeys());
API
See API documentation at project WIKI
Support and tests
Tested on the latest Chromium (v117)
Automated CI test runs are available.
To run the tests on your own, clone the Hive repo and install the dependencies following this documentation:
and then compile the project:
./scripts/build_wasm_beekeeper.sh
cd ./programs/beekeeper/beekeeper_wasm
sudo npm install -g pnpm
pnpm install --frozen-lockfile
Compile source:
npm run build
Then run tests:
npm run test
License
See license in the LICENSE.md file