Nevar pievienot vairāk kā 25 tēmas Tēmai ir jāsākas ar burtu vai ciparu, tā var saturēt domu zīmes ('-') un var būt līdz 35 simboliem gara.
nitowa d345e87bf0 Hopefully fix browser websocket issue, npm 0.3.2 1 mēnesi atpakaļ
src Hopefully fix browser websocket issue, npm 0.3.2 1 mēnesi atpakaļ
test Hopefully fix browser websocket issue, npm 0.3.2 1 mēnesi atpakaļ
.drone.yml remove test step from done 2 gadus atpakaļ
.gitignore fix doc generation 2 gadus atpakaļ
.npmignore remove picture and blacklist ripple-lib bindings from npm 2 gadus atpakaļ
LICENSE.md rebase to npm-packages, add README and LICENSE 2 gadus atpakaļ
README.md update README 2 gadus atpakaļ
package-lock.json Hopefully fix browser websocket issue, npm 0.3.2 1 mēnesi atpakaļ
package.json Hopefully fix browser websocket issue, npm 0.3.2 1 mēnesi atpakaļ
tsconfig.json update testnet node address because it moved 3 gadus atpakaļ

README.md

Overview

Build Status Current Version Weekly Downloads License Type

xrpio is a library that allows you to write and read arbitrary data in the ripple blockchain.

How to install

npm i xrpio

How it works

Transactions on the ripple blockchain are allowed to carry up to 1kB of arbitrary data via the memo field. We can use this to store data of any size by building a tree of references between these transactions that can then be reassembled by reading them back from the blockchain. In order to generate these transactions xrpio sends payments with the minimum denomination between two wallets controlled by the user.

xrpio automatically takes care of the logistics behind this technique as well as compression of the data.

Highly simplified, you can visualize the process like this:

xrpio treewrite

In practice each node does of course store significantly more data.

Caution

This library is in an early stage of development and breaking changes may occur spontaneously and without regard of semantic versioning until the v1.0.0 release.

Operation on the main-net is untested and should not be used in production! If you want to deploy this library with the main-net please download the sources and modify them to your needs.


Quickstart

import { xrpIO } from "xrpio"

const api = new xrpIO("wss://some_ripple_node.net:51233")
await api.connect()

txHash = await api.treeWrite("arbitrary text 123", receiveWallet.address, sendWallet.secret)
data = await api.treeRead([txHash])

console.log(data) //"arbitrary text 123"

Known Bugs

  • When using large data (>300kB) and public nodes, the writing process may fail due to rate limits. xrpio will attempt to mitigate this, but success is inconsistent.

Full documentation