Giter VIP home page Giter VIP logo

fetch-xrpl-accounts's Introduction

Fetch XRPL Accounts

This small tool connects to a rippled server using websockets and fetches all AccountRoot records for a specific ledger index. The output will be saved into ledgerindex_accounts.json, eg. 123456_accounts.json.

Use

npm run fetch ledgerindex

Eg.

npm run fetch 39374682

Optional you can specify the websocket server to connect to:

npm run fetch 39374682 wss://s2.ripple.com

The default server is: wss://s1.ripple.com

List accounts for a ledger index

You should first fetch all AccountRoot information for the specific ledger index (see "Fetch XRPL Accounts" above this section).

When the ledger is fetched (and ledgerindex_accounts.json exists) you can list all the accounts found sorted alphabetically:

npm run list ledgerindex

Eg.

npm run list 39374682

Advanced

Check the account count

Assuming you fetched the ledger indexes used: you can count (wc -l) the output lines:

node accountlist.js 37374682 | wc -l

Create account list for ledger index

Assuming you fetched the ledger indexes used: you can cut the accountlist output and store the stdout:

node accountlist.js 37374682 | cut -d " " -f 1 > 37374682.txt

Now do this for another ledger index:

node accountlist.js 39374682 | cut -d " " -f 1 > 39374682.txt

Now use diff to check for the newly created accounts between the two ledgers:

diff -u 37374682.txt 39374682.txt | grep -E "^\+"|cut -d "+" -f 2

Sorting on ledger index of last transaction

Assuming you fetched the ledger indexes used: you can use awk to change the order of the output, and use sort -n (numeric). Sample:

node accountlist.js 37374682 | awk '{print $3,$2,$1}' | sort -n

fetch-xrpl-accounts's People

Contributors

wietsewind avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.