https://github.com/ossystem/blockstarter-ripple
This library helps to integrate blockstarter with Ripple
https://github.com/ossystem/blockstarter-ripple
blockchain blockstarter nodejs ripple
Last synced: over 1 year ago
JSON representation
This library helps to integrate blockstarter with Ripple
- Host: GitHub
- URL: https://github.com/ossystem/blockstarter-ripple
- Owner: ossystem
- Created: 2018-06-07T08:32:21.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-06-07T08:33:01.000Z (about 8 years ago)
- Last Synced: 2025-01-15T23:25:40.273Z (over 1 year ago)
- Topics: blockchain, blockstarter, nodejs, ripple
- Language: LiveScript
- Homepage:
- Size: 3.91 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Blockstarter Ripple
This is library helps to integrate blockstarter with Ripple
## Install
```
npm i blockstarter-ripple
```
## Available functions
* generateUniqueRippleAddress
* getTransactions
* createTransactionsSendAllFundTo
* getCurrentRippleToUSDRate
* pushTransaction
## Usage
### Ripple Address
Creating a unique Ripple Address
```Javascript
var br = require('blockstarter-ripple');
var newAddress = br.generateUniqueRippleAddress('your seed');
console.log(newAddress);
```
### List transactions
A list of all incoming transactions for the address
```Javascript
var br = require('blockstarter-ripple');
var newAddress = br.getTransactions('ripple address', function(err, transactions){
if (err != null) {
throw err;
}
console.log(transactions);
});
```
### Сreate a transaction
Сreate a transaction to transfer funds from one address to another
```Javascript
var br = require('blockstarter-ripple');
var newAddress = br.createTransactionsSendAllFundTo('your secret', 'address from', 'address to', 'amount', function(err, res){
if (err != null) {
throw err;
}
console.log(res);
});
```
### Exchange rate
The course is considered for the 3 exchanges EXMO, POLONIEX, KRAKEN
```Javascript
var br = require('blockstarter-ripple');
var newAddress = br.getCurrentRippleToUSDRate(function(err, rates){
if (err != null) {
throw err;
}
console.log(rates);
});
```
Example retrun value
```
{ exmo:
{ buy_price: '0.56500283',
sell_price: '0.56500565',
last_trade: '0.565',
high: '0.61411',
low: '0.56491737',
avg: '0.59404117',
vol: '1318654.76139709',
vol_curr: '745039.94018936',
updated: 1522309401 },
poloniex:
{ id: 127,
last: '0.54000001',
lowestAsk: '0.54314082',
highestBid: '0.54000003',
percentChange: '-0.06347552',
baseVolume: '1353601.41228686',
quoteVolume: '2394419.26895776',
isFrozen: '0',
high24hr: '0.58799997',
low24hr: '0.54000010' },
kraken:
{ a: [ '0.54118000', '33', '33.000' ],
b: [ '0.54032000', '2664', '2664.000' ],
c: [ '0.54120000', '15.19519520' ],
v: [ '3783555.63449743', '6447316.87099599' ],
p: [ '0.55409794', '0.56209874' ],
t: [ 1657, 3473 ],
l: [ '0.53920000', '0.53920000' ],
h: [ '0.57400000', '0.58788000' ],
o: '0.57239000' } }
```
### Send transaction
Sending a transaction for execution
```Javascript
var br = require('blockstarter-ripple');
var newAddress = br.pushTransaction('tx_blob', function(err, res){
if (err != null) {
throw err;
}
console.log(res);
});
```