AvianNetwork / avian-rpc

A client library to connect to Avian Core RPC in JavaScript.

Home Page:https://ravenites.github.io/ravencoin-rpc/index.html

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Avian RPC Banner

Avian Network - Avian RPC

Documentation Website

A client library to connect to Avian Core RPC in JavaScript.

NPM Package

An Avian module for avian.

Getting Started

# Using npm
npm install @aviannetwork/avian-rpc

# Using yarn
yarn add @aviannetwork/avian-rpc

Usage

You can either write manually requests to your RPC connection via the request method, or you can use the built-in methods provided by the client class.

Manually

import { Client } from '@aviannetwork/avian-rpc';

const client = new Client({
  url: 'http://127.0.0.1:7896',
  username: 'username',
  password: 'password',
});

client.request('getchaintips').then(response => {
  console.log('response', response);
});

Built-in Methods

import { Client } from '@aviannetwork/avian-rpc';

const client = new Client({
  url: 'http://127.0.0.1:7896',
  username: 'username',
  password: 'password',
});

client.methods.listAssets().then(assets => {
  console.log('assets', assets);
});

Examples and Documentation

See documentation for developer guides.

License

Code released under the MIT license.

Development

Some RPC commands within Avian have known bugs. You may experience them as a result. If you find that the issue comes from this library, please create an Issue so that it can be resolved quickly.

About

A client library to connect to Avian Core RPC in JavaScript.

https://ravenites.github.io/ravencoin-rpc/index.html

License:MIT License


Languages

Language:TypeScript 100.0%