Skip to content

steem-monsters/dhive-sl

Repository files navigation

dhive-sl

Client library for the Hive blockchain & Hive Engine layer2.


Installation

npm install dhive-sl

Usage

import { Client } from 'dhive-sl';

const main = async () => {
    // Client
    const client = new Client()
    // (Optional) const client = new Client({ nodes: ['api.hive.blog', 'api.deathwing.me', 'anyx.io'] })

    // Getting data from Hive
    const account = await client.database.getAccount('splinterlands')

    // Encoding & decoding memos
    const encoded = await client.memo.encode('test', 'pub-key-B', 'private-key-A')
    const decoded = await client.memo.decode(encoded, 'private-key-B')

    // Getting data from Hive Engine (layer2 of Hive)
    const block = await client.engine.blockchain.getLatestBlock()
};

main();

Note

This version is a fork of dhive, which was originally created by Johan Nordberg in 2017 and maintained since 2021 by the Hive community.

dhive-sl was forked to improve dhive as well as merge the functionality of & improve upon hive-js, sscjs and hive-interface.

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors