Skip to content

Instantly share code, notes, and snippets.

@sharafian
Created September 29, 2017 22:17
Show Gist options
  • Save sharafian/bb3955eaf3a97aa1bc43dc8a9e76256a to your computer and use it in GitHub Desktop.
Save sharafian/bb3955eaf3a97aa1bc43dc8a9e76256a to your computer and use it in GitHub Desktop.
Script for ILP Credentials on XRP Testnet

ILP Credentials

Just save ilp_creds.sh to your machine, and run source ./ilp_creds.sh in bash. It will fetch you XRP testnet credentials from the faucet, and export them into your shell in the variables ILP_CREDENTIALS and ILP_PLUGIN.

In this shell, you can now use ILP tools such as ilp-curl, which will use your new testnet credentials.

To save your testnet credentials into your .bashrc, run:

echo "export ILP_CREDENTIALS=$ILP_CREDENTIALS" >> ~/.bashrc
echo "export ILP_PLUGIN=$ILP_PLUGIN" >> ~/.bashrc
#!/bin/bash
TESTNET_ACCOUNT="`curl -X POST 'https://faucet.altnet.rippletest.net/accounts' 2>/dev/null`"
TESTNET_ADDRESS="`echo "$TESTNET_ACCOUNT" | jq '.account.address'`"
TESTNET_SECRET="`echo "$TESTNET_ACCOUNT" | jq '.account.secret'`"
echo "Address: $TESTNET_ADDRESS"
echo "Secret: $TESTNET_SECRET"
export ILP_CREDENTIALS="{\"address\":$TESTNET_ADDRESS,\"secret\":$TESTNET_SECRET,\"server\":\"wss://s.altnet.rippletest.net:51233\"}"
export ILP_PLUGIN="ilp-plugin-xrp-escrow"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment