|
|
před 3 roky | |
|---|---|---|
| src | před 3 roky | |
| test | před 3 roky | |
| .drone.yml | před 3 roky | |
| .gitignore | před 4 roky | |
| LICENSE.md | před 3 roky | |
| README.md | před 3 roky | |
| package-lock.json | před 3 roky | |
| package.json | před 3 roky | |
| tsconfig.json | před 4 roky |
xrpio is a library that allows you to write and read arbitrary data in the ripple blockchain.
npm i xrpio
import {treeRead, treeWrite} from 'xrpio'
const api = new RippleAPI({ server: "..." })
await api.connect()
const dataRootHash = await treeWrite(
api,
"Arbitrary string data 123",
{
address: "Sender address",
secret: "Sender private key"
},
"Receiver address"
)
const data = await treeRead(api, [dataRootHash])
console.log(data) //"Arbitrary string data 123"