0.1.0 • Published 11 years ago
ripple-txt-client v0.1.0
Ripple.txt Client
Javascript module to fetch and parse ripple.txt files from a given domain
Installation
npm install --save ripple-txt-clientUsage
import RippleTxtClient from 'ripple-txt-client'
let client = new RippleTxtClientFetching and parsing a valid ripple.txt file
client.fetch('snapswap.us', (txt) => {
  assert.strictEqual(txt.federation_url[0], 'https://snapswap.us/api/v1/bridge')
})Attempting to fetch a non-existant ripple.txt file
client.fetch('google.com').catch(client.NotFoundError, error => {
  console.log(error)
})0.1.0
11 years ago