hive-wallet-sdk
v0.0.20
Published
The simple way to support all the wallets of the Hive blockchain.
Downloads
6
Maintainers
Readme
hive-wallet-sdk
The simple way to support all the wallets of the Hive blockchain.
IMPORTANT: The package is still under development and things may break unexpectedly.
Installation
$ npm i hive-wallet-sdk
Basic usage
import { getWallet } from 'hive-wallet-sdk'
// Get wallet reference
const wallet = await getWallet()
// Use wallet
const json = {
message: `Sending json from ${wallet.name}`
}
// Request custom json
const res = await wallet.requestCustomJson('', 'test', 'posting', json)
Developers can set a preferred wallet between peakvault
and keychain
. If the specified wallet is not available another one will be selected.
// Prefer Peak Vault
const wallet = await getWallet('peakvault')
// Prefer Keychain
const wallet = await getWallet('keychain')