multichain-api
TypeScript icon, indicating that this package has built-in type declarations

1.0.0-alpha.13 • Public • Published

MultiChain API

MIT License NPM Version Build Status Code Coverage

MultiChain API is an unofficial MultiChain client for Node.js written in TypeScript.

💡 The alpha status only denotes that the unit tests are incomplete, but the client should be fully functional.

Features

  • Promise-based functional API
  • Optimized for serverless architecture

Installation

npm install --save multichain-api

Examples

TypeScript example:

import { GetBlock } from 'multichain-api/Commands/GetBlock'
import { RpcClient } from 'multichain-api/RpcClient'
 
const client = RpcClient({
  protocol: 'http',
  host: '127.0.0.1',
  port: 8570,
  username: 'multichainrpc'
  password'...'
})
 
client(GetBlock(42))
  .then(response => console.log(response))
  .catch(error => console.log(error))

JavaScript example:

const { GetBlock } = require('multichain-api/Commands/GetBlock')
const { RpcClient } = require('multichain-api/RpcClient')
 
const client = RpcClient({
  protocol: 'http',
  host: '127.0.0.1',
  port: 8570,
  username: 'multichainrpc'
  password: '...'
})
 
client(GetBlock(42))
  .then(response => console.log(response))
  .catch(error => console.log(error))

Resources

License

MIT

Versions

Current Tags

VersionDownloads (Last 7 Days)Tag
1.0.0-alpha.13257latest

Version History

VersionDownloads (Last 7 Days)Published
1.0.0-alpha.13257
1.0.0-alpha.110
1.0.0-alpha.100
1.0.0-alpha.91
1.0.0-alpha.80
1.0.0-alpha.70
1.0.0-alpha.60
1.0.0-alpha.50
1.0.0-alpha.40
1.0.0-alpha.30
1.0.0-alpha.20
1.0.0-alpha.10

Package Sidebar

Install

npm i multichain-api

Weekly Downloads

203

Version

1.0.0-alpha.13

License

MIT

Unpacked Size

154 kB

Total Files

231

Last publish

Collaborators

  • sgaide
  • tomc974