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

ilp-plugin-xrp-escrow

v1.0.5

Published

> ILP ledger plugin using the escrow features of ripple

Downloads

3

Readme

ILP Plugin XRP Escrow

ILP ledger plugin using the escrow features of ripple

NOTE: This plugin is under development, and should not yet be used with funds of over ~ 0.01 USD in value.

Step 1: create a hot wallet.

This can easily be done with:

npm install
node ./scripts/genKeyPair.js

Store your hot wallet secret (seed) in a text file. Use your hot wallet account (address) in the next step.

For security reasons, and because we're mainly looking at micropayments here anyway, make sure your hot wallet balance never exceeds ~ 0.01 USD. See Issuing and Operational Addresses for more information on how to use hot/warm/cold wallets.

Step 2: fund your hot wallet with some XRP drops.

npm install -g wscat
wscat -c wss://s1.ripple.com
connected (press CTRL+C to quit)
> {"command":"account_info","account":"raymJpdRBoqLjJ7vhLnjo7GFLYrG8j3yey"}
< {"account":"raymJpdRBoqLjJ7vhLnjo7GFLYrG8j3yey","error":"actNotFound","error_code":18,"error_message":"Account not found.","ledger_current_index":29171107,"request":{"account":"raymJpdRBoqLjJ7vhLnjo7GFLYrG8j3yey","command":"account_info"},"status":"error","type":"response","validated":false}

Someone will have to send you some XRP drops to play around with. Ask in https://gitter.im/interledger/Lobby. Now, when you run the account_info command again in wscat, you should see something more like this:

> {"command":"account_info","account":"raymJpdRBoqLjJ7vhLnjo7GFLYrG8j3yey"}
< {"result":{"account_data":{"Account":"raymJpdRBoqLjJ7vhLnjo7GFLYrG8j3yey","Balance":"50000000","Flags":0,"LedgerEntryType":"AccountRoot","OwnerCount":0,"PreviousTxnID":"0000000000000000000000000000000000000000000000000000000000000000","PreviousTxnLgrSeq":0,"Sequence":1,"index":"9B8BF54B62E8A0C9D1BB46CB11A8417479EEA90FFAF9D128E9C66E709A430A60"},"ledger_current_index":29171125,"validated":false},"status":"success","type":"response"}

Step 3: instantiate the plugin.

Now that you have a Ripple wallet, you can use it in combination with other ILP-related npm modules (e.g. ilp-connector), as follows:

const PluginXrpEscrow = require('ilp-plugin-xrp-escrow')

const plugin = new PluginXrpEscrow({
  secret: '<your hot wallet secret>',
  server: 'wss://s1.ripple.com',
  prefix: 'g.crypto.ripple.escrow.' // optional
})

Requires node 7 or higher, to support async/await.