0.4.0 • Published 14 days ago

js-moi-providers v0.4.0

Weekly downloads
-
License
Apache-2.0 OR MIT
Repository
github
Last release
14 days ago

image

docs npm version license

latest tag issue count pulls count test status

js-moi-providers

This is a sub-package of js-moi-sdk.

The js-moi-providers package enables you to connect to MOI nodes and retrieve blockchain data, such as account balances and interaction history. It provides an interface for interacting with the MOI protocol and fetching information from the network.

Installation

Install the latest release using the following command.

npm install js-moi-providers

Usage

    import { JsonRpcProvider } from "js-moi-providers";

    (async() => {
        const provider = new JsonRpcProvider("http://localhost:1600");
        const address = "0xf350520ebca8c09efa19f2ed13012ceb70b2e710241748f4ac11bd4a9b43949b";
        const contextInfo = await provider.getContextInfo(address);
        console.log(contextInfo);
    })()

    // Output
    /*
        {
            "behaviour_nodes": [
                "3Wywv4WykAqs6mH1YAWNHKYFw77tuF4iFkcQPxyFgzT9XEPPEkaK.16Uiu2HAkzhT4eoJoQWz9P7S65j6F6dSHEVGN925AXg5kqhisgSai",
                "3Wy3MY7saXna1ypZMYVooUPD9k3hU7vWXQvTRFdpabmSC7pr8om9.16Uiu2HAm3hy8wAw9hjuxXqGGmnpQQrU7ouZWwJuDAQJbesvg49hX"
            ],
            "random_nodes": [],
            "storage_nodes": []
        }
    */

Contributing

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as below, without any additional terms or conditions.

License

© 2023 Sarva Labs Inc. & MOI Protocol Developers.

This project is licensed under either of

at your option.

The SPDX license identifier for this project is MIT OR Apache-2.0.

0.4.0

14 days ago

0.3.0-rc4

28 days ago

0.3.0-rc3

3 months ago

0.2.1

3 months ago

0.3.0-rc2

3 months ago

0.3.0-rc1

3 months ago

0.2.1-rc2

3 months ago

0.2.0

3 months ago

0.2.1-rc1

3 months ago

0.2.0-alpha3

4 months ago

0.2.0-alpha2

4 months ago

0.2.0-alpha1

4 months ago

0.1.2

9 months ago

0.1.1

9 months ago

0.1.0

10 months ago