SteemRadar.js - Readable Streams And New Features Update 0.1.6

in #utopian-io6 years ago (edited)

Repository

https://github.com/gigatoride/steemradar.js

SteemRadar

logo.png
Logo design by @gigatoride only licensed for contributions related to this project

New Features

Readable Streams

In previous version, regular callbacks had been used.

Now each method is a readable stream for more reliable usage and better error handling with the support for pausing and resuming for each method.
it also includes destroy function.

Tracking Funds

A new feature now available for tracking funds from an account to another or you can begin with your transaction ID.

Single-Track

single_tracking.png

line1.png

Single-track is finished and ready to use it will inform you each time the funds moves throws the blockchain transaction flow and it will be an object like the following

{ trxId: '7392f86a9307a6cbdb8155642e6a3d23be9d0505',
  username: 'deepcrypto8',
  amount: '92.600 STEEM',
  timestamp: '2019-03-01T13:18:21',
  percentage: 100 }

Steem deposit accounts for exchanges include the following:

  • blocktrades
  • deepcrypto8
  • huobi-pro
  • bittrex
  • bithumb.live
  • openledger-dex
  • changelly
  • onepagex
  • poloniex
  • shapeshiftio
  • hitbtc-exchange
  • upbituserwallet

The above exchanges will be an endpoint for the fundsTracker stream.
Also, anyone can open a pull request to add more exchanges.

Account Security

Steem account security is important as any change in private keys or unauthorized activity on account funds can be very dangerous.

With this method, you will be able to stream and detect sensitive changes on any Steem account

  • transfer_from_savings
    In case your saving funds have been withdrawn.

  • change_recovery_account
    In case your recovery account has been changed,

  • account_update
    Any account update on your profile or your private keys.

  • More than 50% of your account funds have been transferred.

line1.png

Implementation

if you already have the older version you can update this package by the following command

$ npm update

or you can install the package by the following command

$ npm install steemradar

Create new instance

const steemradar = require('steemradar');

const scan = new steemradar.Scan();

Tracking funds:

First parameter is Steem account username and the second is transaction ID (optional).

scan.blockchain.fundsTracker('gigatoride', '7392f86a9307a6cbdb8155642e6a3d23be9d0505')
.on('data', (d)=>{
console.log(d);
scan.blockchain.fundsTracker.pause();
})
.on('error', console.log)

Security method each time an update on your account related to the funds or profile updates or keys etc..
It will be written in the stream with full transaction details it also includes

account_update
change_recovery_account
transfer_from_savings

or if more than 50% of your account funds has been transferred you will be informed.

scan.blockchain.security('gigatoride')
.on('data', (d)=>{
console.log(d);
scan.blockchain.security.pause();
})
.on('error', console.log)

Pause all blockchain methods

scan.blockchain.pause();

Pause scan instance

scan.pause();

Resume all blockchain methods

scan.blockchain.pause();

Resume scan instance

scan.resume();

Also you can close all blockchain methods:

scan.blockchain.close();

Utopian-io is also extended from blockchain class

scan.utopian.close();

line1.png

Testing

You can easily test the main methods by following command:

npm test

test.jpg

line1.png

What's next?

  • Multiple stream modes types.
  • Multi-track for fundsTracker method.
  • More monitoring!

line1.png

Commits

Commits on Mar 3, 2019
https://github.com/gigatoride/steemradar.js/commits/master

line1.png

Github Account

https://github.com/gigatoride

Sort:  

Welcome back @gigatoride, it's been a while! It's great to see you are still developing this library. The new feature for tracking funds from an account to another sounds pretty interesting - are you using it yourself?

As for the code (I used this link to compare the changes):

  • Overall it's very readable and high quality code, but there are some small improvements that could be made imo. For example, stuff t[1].op[0] doesn't really say much, so maybe there is a way to make it more descriptive (I am being nitpicky, I know).
  • Nice comments that make the code more readable - great stuff!
  • Not really anything to do with the code, but profane is an adjective, and I think profanity is a better word to use.

I don't really have much else to say, as you have done an amazing job. I'm already looking forward to seeing the other features you mentioned in your post!


Your contribution has been evaluated according to Utopian policies and guidelines, as well as a predefined set of questions pertaining to the category.

To view those questions and the relevant answers related to your post, click here.


Need help? Chat with us on Discord.

[utopian-moderator]

Thank you, Amos. It's good to see you guys again :)
The whole library is being prepared for other projects and that includes the funds tracking feature.
Your tips have been applied.

Thank you for your review, @amosbastian! Keep up the good work!

This post has been included in the latest edition of SoS Daily News - a digest of all the latest news on the Steem blockchain.

Congratulations @gigatoride! You have completed the following achievement on the Steem blockchain and have been rewarded with new badge(s) :

You made more than 900 upvotes. Your next target is to reach 1000 upvotes.

Click here to view your Board
If you no longer want to receive notifications, reply to this comment with the word STOP

To support your work, I also upvoted your post!

Do not miss the last post from @steemitboard:

Carnival Challenge - Collect badge and win 5 STEEM
Vote for @Steemitboard as a witness and get one more award and increased upvotes!

Hi @gigatoride!

Your post was upvoted by @steem-ua, new Steem dApp, using UserAuthority for algorithmic post curation!
Your post is eligible for our upvote, thanks to our collaboration with @utopian-io!
Feel free to join our @steem-ua Discord server

Hey, @gigatoride!

Thanks for contributing on Utopian.
We’re already looking forward to your next contribution!

Get higher incentives and support Utopian.io!
Simply set @utopian.pay as a 5% (or higher) payout beneficiary on your contribution post (via SteemPlus or Steeditor).

Want to chat? Join us on Discord https://discord.gg/h52nFrV.

Vote for Utopian Witness!

Coin Marketplace

STEEM 0.21
TRX 0.20
JST 0.034
BTC 91022.78
ETH 3148.10
USDT 1.00
SBD 2.96