Socket
Book a DemoInstallSign in
Socket

eos-rpc

Package Overview
Dependencies
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

eos-rpc

An rpc api for the EOS blockchain

latest
Source
npmnpm
Version
0.0.4
Version published
Weekly downloads
0
-100%
Maintainers
1
Weekly downloads
 
Created
Source

tested with jest

EOS RPC API for Node

Feature complete EOS RPC API for node.

To test

The tests are under the assumption you have followed the initial install from EOS Add a config.js file with your private keys

module.exports = { PRIVATE_KEY_1: 'xx' , PRIVATE_KEY_INITA: 'xx', DEFAULT_WALLET_PRIVATE_KEY: 'xx', }

$ npm test

Useage

See the EOS RPC API docs.

let { chain, wallet } = require('eos-rpc')
chain = chain('host', 'chain_port')
wallet = wallet('host', 'wallet_port')

or for local development

let { chain, wallet } = require('eos-rpc')
// Host defaults to 127.0.0.1, chain_port: 8888, wallet_port: 8888
chain = chain()
wallet = wallet()

API

All calls are Promisified.

Chain

chain.get_info()

chain.get_block(block_num_or_id)

chain.get_account(account_name)

chain.get_code(account_name)

chain.get_table_rows(scope, code, table, json)

chain.abi_json_to_bin(code, action, args)

chain.get_required_keys(available_keys, transaction)

chain.push_transaction(expiration, messages, read_scope = [], ref_block_num, ref_block_prefix, scope, signatures)

chain.push_transactions(xActions)

Wallet

wallet.create(name)

wallet.open(name)

wallet.lock(name)

wallet.lock_all(name)

wallet.unlock(name, privateKey)

wallet.import_key(name, privateKey)

wallet.list()

wallet.list_keys()

wallet.get_public_keys()

wallet.set_timeout(timeout)

wallet.wallet_sign_trx(timeout)

Keywords

EOS

FAQs

Package last updated on 06 Jan 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts