npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

skycoin

v0.0.2

Published

Skycoin API for node https://github.com/jaggedsoft/node-skycoin-api

Downloads

4

Readme

GitHub last commit npm downloads

NPM

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 = require('skycoin');
    console.log(await api.version());
})();

Setting optional parameters

api.options({
    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 1e6
console.log(await api.balance('2CfGyhRyvT8Y4uF9CqoKBgYZuRrgKfCP2nj'));
{ confirmed: { coins: 265000000, hours: 108286 },
  predicted: { coins: 265000000, hours: 108286 } }

Get node version info

console.log(await api.version());
{ version: '0.21.1', commit: '' }

Get unconfirmed transactions

console.log(await api.pendingTxs());

Get transaction info by id

console.log(await api.transaction(txid));

Get transactions that are addresses related

// Addresses can be a single address or an array
// Confirmed can be true or false, defaults to all
console.log(await api.transaction(addresses, confirmed));

Get raw transaction by id

console.log(await api.rawtx(txid));

Inject raw transaction

console.log(await api.injectTransaction(txid));

Resend unconfirmed transactions

console.log(await api.resendUnconfirmedTxns());

Get blockchain metadata

console.log(await api.metadata());

Get blockchain progress

console.log(await api.progress());

Get block by hash or seq

console.log(await api.block({seq: 2760}));
console.log(await api.block({hash: '6eafd13ab6823223b714246b32c984b56e0043412950faf17defdbb2cbf3fe30'}));

Get blocks in specific range

console.log(await api.blocks(start, end));

Get last N blocks

console.log(await api.blocks(num));

Get address affected transactions

console.log(await api.explorer('2CfGyhRyvT8Y4uF9CqoKBgYZuRrgKfCP2nj'));

Get uxout

console.log(await api.uxout(uxid));

Get address affected uxouts

console.log(await api.address_uxouts('2CfGyhRyvT8Y4uF9CqoKBgYZuRrgKfCP2nj'));

Get a list of all default connections

console.log(await api.defaultConnections());

Get a list of all connections

console.log(await api.connections());

Get a list of all trusted connections

console.log(await api.trust());

Get a list of all connections discovered through peer exchange

console.log(await api.exchange());

Get information for a specific connection

console.log(await api.connection(addr));

Coin supply

console.log(await api.coinSupply());

Count unique addresses

console.log(await api.addresscount());

Richlist show top N addresses by uxouts

// amount defaults to 20. -1 returns all accounts
// distributions will include distribution address or not, defaults to false
console.log(await api.richlist(amount, distributions));

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

Skycoin Website

Skycoin Reddit

Skycoin Telegram

Views