Node Skycoin API
This project is designed to help you make your own projects that interact with the Skycoin API. You can query the rich list, total coin supply, download block information, view metadata, get account balances and more. This project seeks to have complete API coverage including wallet functionality and sending transactions.
(Currently an experimental release. Wallet functionality will be added later)
Installation
npm install skycoin
Getting started
When using async/await, your entire program must be wrapped in an async block:
async { const api = ; console;};
Setting optional parameters
apioptions node: 'http://127.0.0.1:6420/' // Change to alternative node (or your own) proxy: host: '127.0.0.1' port: 3128 ;
Get wallet balance
// Accepts single address, or array of addresses. divide balance by 1e6console;
View Response
confirmed: coins: 265000000 hours: 108286 predicted: coins: 265000000 hours: 108286
Get node version info
console;
View Response
version: '0.21.1' commit: ''
Get unconfirmed transactions
console;
Get transaction info by id
console;
Get transactions that are addresses related
// Addresses can be a single address or an array// Confirmed can be true or false, defaults to allconsole;
Get raw transaction by id
console;
Inject raw transaction
console;
Resend unconfirmed transactions
console;
Get blockchain metadata
console;
Get blockchain progress
console;
Get block by hash or seq
console;console;
Get blocks in specific range
console;
Get last N blocks
console;
Get address affected transactions
console;
Get uxout
console;
Get address affected uxouts
console;
Get a list of all default connections
console;
Get a list of all connections
console;
Get a list of all trusted connections
console;
Get a list of all connections discovered through peer exchange
console;
Get information for a specific connection
console;
Coin supply
console;
Count unique addresses
console;
Richlist show top N addresses by uxouts
// amount defaults to 20. -1 returns all accounts// distributions will include distribution address or not, defaults to falseconsole;
Coming soon:
Spend coins from wallet
Update wallet label
Generate new address in wallet
Create a wallet from seed
Generate wallet seed
Get wallet folder name
Get wallets
Get wallet transactions
Get wallet