0.0.6 • Published 4 years ago

o3-dapi-ontclient v0.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
4 years ago

o3-dapi-ontclient

Client plugin for o3-dapi-ont, which will move the logic for all read methods to the client side.

Requires o3-dapi-core & o3-dapi-ont to operate.

Usage

In a browser - cdn npm.io

<script src="https://cdn.jsdelivr.net/npm/o3-dapi-ontclient/lib/o3-dapi-ontclient.min.js"></script>
window.o3dapiOntClient

Install via npm npm version

npm i --save o3-dapi-ontclient

or

yarn add o3-dapi-ontclient
var o3dapiOntClient = require('o3-dapi-ont');

import o3dapiOntClient from 'o3-dapi-ontclient';

Example

import o3dapi from 'o3-dapi-core';
import o3dapiOnt from 'o3-dapi-ont';
import o3dapiOntClient from 'o3-dapi-ontclient';

o3dapi.initPlugins([o3dapiOnt]);

o3dapi.ONT.setClientPlugin(o3dapiOntClient)

// o3 app does not need to be open, and site can be accessed from any browser to operate on same methods
o3dapi.ONT.getBalance({
  address: 'AScKxyXmNtEnTLTvbVhNQyTJmgytxhwSnM',
  network: 'MainNet',
})
.then(balances => console.log(balances));
0.0.5

4 years ago

0.0.6

4 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago