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

ripple-cli

v0.7.0

Published

command line interface to ripple money and payments

Downloads

27

Readme

Ripple CLI

command line interface to money and payments on ripple

Installation

$ npm install -g ripple-cli

Usage

To list program options and commands run --help or -h

$ ripple-cli --help

  Usage: ripple-cli [options] [command]


  Commands:

    wallet                                          generate new random ripple account and secret key
    balances                                        list balances for the specified account
    pay <destination> <amount> <currency> [issuer]  send money to another ripple account
    server_info                                     retrieve info of a running rippled server
    account_info                                    retrieve info of a ripple account
    account_set_domain <domain>                     set account `Domain` field

  Options:

    -h, --help              output usage information
    -V, --version           output the version number
    -a --account <account>  ripple account
    -k --key-path <path>    path to account secret key
    -s --server <uri>       websocket uri to rippled server

Generating a Wallet

Serialized JSON of a ripple address and secret pair will be written to stdout

$ ripple-cli wallet | json
{
    "address": "rJVjRR7LbhJdDi32J7pGvWjiVSiWaSjZj2",
    "secret": "ss5TntoUUzYGNQ3jypjThwxjZEpf6"
}

Listing Account Balances

Serialized JSON of ripple account balances and metadata are written to stdout

ripple-cli balances --account r4EwBWxrx5HxYRyisfGzMto3AT8FZiYdWk | json
{
    "account": "r4EwBWxrx5HxYRyisfGzMto3AT8FZiYdWk",
    "ledger_hash": "8F9A4486E53A6883F5402FE4F149C25635ED91903377D519A59AA7043C30CA0F",
    "ledger_index": 13784250,
    "lines": [
        {
            "account": "rMwjYedjc7qqtKYVLiAccJSmCwih4LnE2q",
            "balance": "15",
            "currency": "XAU",
            "limit": "100000",
            "limit_peer": "0",
            "no_ripple": true,
            "quality_in": 0,
            "quality_out": 0
        },
        {
            "account": "rHKueQebtVU9cEamhBbMV8AEViqKjXcBcB",
            "balance": "-8.773152697244761",
            "currency": "USD",
            "limit": "20",
            "limit_peer": "20",
            "quality_in": 0,
            "quality_out": 0
        }
    ]
}

Paying Ripple Accounts

Pass the --key-path option to a file containing the ripple account secret on a single line Transaction result is written to stdout as serialized JSON

By default ripple-cli loads the file at ~/.ripple, expecting a json file with a "secret" property containing the ripple account secret. Otherwise th --key-path option must be provided

ripple-cli pay -a r4EwBWxrx5HxYRyisfGzMto3AT8FZiYdWk rJBrmcc5VRAEEDY4AzVRMFNW192dnVQwXt 1 XRP | json
{
    "engine_result": "tesSUCCESS",
    "engine_result_code": 0,
    "engine_result_message": "The transaction was applied. Only final in a validated ledger.",
    "ledger_hash": "E4CD26CEB153682D823716A33C840C57504614D915D3B4831BCEB5757FE2B069",
    "ledger_index": 13784716,
    "metadata": {
      ...
    }
}

Retrieving Server Info

Serialized JSON of the rippled server stats are written to stdout

ripple-cli server_info --server wss://r.ripple.com:51233 | json
{
    "info": {
        "build_version": "0.28.1-rc3",
        "complete_ledgers": "13766697-13795596",
        "hostid": "VASE",
        "io_latency_ms": 1,
        "last_close": {
            "converge_time_s": 2.002,
            "proposers": 5
        },
        "load_factor": 1000,
        "peers": 85,
        "pubkey_node": "n9MT5EjnV912KGuBUqPs4tpdhzMPGcnDBrTuWkD9sWQHJ1kDcUcz",
        "server_state": "full",
        "validated_ledger": {
            "age": 2,
            "base_fee_xrp": 1e-05,
            "hash": "6AB56C04B87879EF8686FCFF6F7981F2C3E9C5A5963AA3C20A5731B08A3A8A65",
            "reserve_base_xrp": 20,
            "reserve_inc_xrp": 5,
            "seq": 13795596
        },
        "validation_quorum": 3
    }
}

Retrieving Account Info

ripple-cli account_info -a rEvNvhm4Nddm6QvnKYXxBA5q3vFozHzrnU | json
{
    "account_data": {
        "Account": "rEvNvhm4Nddm6QvnKYXxBA5q3vFozHzrnU",
        "Balance": "49988000",
        "Domain": "73746576656E7A65696C65722E636F6D",
        "Flags": 0,
        "LedgerEntryType": "AccountRoot",
        "OwnerCount": 0,
        "PreviousTxnID": "FC492B04157A1E604B831B3C90B8EF2070DD9FDEB299C0715FC5ADADAFAC0890",
        "PreviousTxnLgrSeq": 13978309,
        "Sequence": 2,
        "index": "F3678BE6AEACC56C8C040BE6FE64FEBFC93F5BE42A70E70990FFADDBD375C028"
    },
    "ledger_current_index": 13980844,
    "validated": false
}

Account Set Domain

Pass the --key-path option to a file containing the ripple account secret on a single line Transaction result is written to stdout as serialized JSON

By default ripple-cli loads the file at ~/.ripple, expecting a json file with a "secret" property containing the ripple account secret. Otherwise th --key-path option must be provided

The Domain will be set for the account associated with the provided secret

ripple-cli account_set_domain mycooldomain.com | json
{
    "engine_result": "tesSUCCESS",
    "engine_result_code": 0,
    "engine_result_message": "The transaction was applied. Only final in a validated ledger.",
    "ledger_hash": "876BC104F7EB386B929E5AD44F14EFA47FE5EB471EA00D70DDA69AE6119193B0",
    "ledger_index": 1337445,
    "metadata": {
      ...
    }
}