2.0.6 • Published 5 years ago

steemradar v2.0.6

Weekly downloads
1
License
MIT
Repository
github
Last release
5 years ago

SteemRadar.js

Build Status NPM version GitHub license Downloads Powered by utopian.io

An event-driven lightweight library for streaming Steem blockchain.

Installation

Using npm:

npm install steemradar

RPC Servers

wss://anyx.io By Default

wss://appbasetest.timcliff.com

  • Note: this library currently supports web sockets only

API

Usage

Create a new instance

const { Client } = require("steemradar"),
  client = new Client({ nodeURL: "wss://anyx.io" });

Settings

The following command will set transaction by operation property:

client.blockchain.setStreamOperations(true); // default false

The following command will set custom comment options:

client.blockchain.setCommentOptions({
  authors: ["steem"]
});

The following command will set custom transfer options:

client.blockchain.setTransferOptions({
  senders: ["steem"],
  receivers: ["steem"]
});

The following command will set custom funds track options:

client.blockchain.setFundsTrackOptions({
  parentSender: "steem"
});
  • Note: All these commands you can call them more than once like using them in multiple cases for more flexibility, And all events will be reset by your latest options.

Reset all settings example:

client.blockchain.settings.clear();

Flexible events

Event: transaction

Event: transaction:<transactionType>

Event: transaction:<transactionType>:<customParent>

Event: transaction:<transactionType>:<customParent>:<customChild>

Error handling

Event: error

Custom events parent/child types

TypeCustom ParentCustom Child
accountcount
transactiontransferfundstrack
transactiontransfermemoprofane
transactioncommentparent
transactioncommentchild
transactioncommentbodymention
transactioncommentbodyprofane
transactioncommentauthorblacklisted
transactionvotepositive
transactionvotenegative
  • Note: the table above is just the built-in custom parents/child moreover you can use any operation type property

Examples

client.blockchain.on("transaction", trx => {
  console.log(trx);
});
client.blockchain.removeAllListeners("transaction");
client.blockchain.once("transaction:vote:positive", trx => {
  console.log(trx);
});
client.blockchain.once("transaction:feed_publish", trx => {
  console.log(trx);
});
client.blockchain.on("error", err => {
  console.error(err);
});

Contribute

All contributions are welcome by opening a new pull request, And for suggests or feature request please open a new issue.

Bugs

Please open a new issue for any bug.

License

MIT

2.0.6

5 years ago

2.0.5

5 years ago

2.0.4

5 years ago

2.0.3

5 years ago

2.0.2

5 years ago

2.0.1

5 years ago

2.0.0

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.1.7

5 years ago

0.1.6

5 years ago

0.1.5

5 years ago

0.1.0

5 years ago

0.0.9

6 years ago

0.0.8

6 years ago

0.0.7

6 years ago

0.0.3

6 years ago

0.0.1

6 years ago

0.0.2

6 years ago