This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
threexrp:gateway:connector Pairs { | |
'Kucoin-USDC': 'XRP/USDC', | |
'Kucoin-USDT': 'XRP/USDT', | |
'Kucoin-BTC': 'XRP/BTC', | |
'Kucoin-ETH': 'XRP/ETH', | |
'btcturk-TRY': 'XRP/TRY', | |
'valr-ZAR': 'XRP/ZAR', | |
'valr-USDC': 'XRP/USDC', | |
'valr-USDT': 'XRP/USDT', | |
'valr-BTC': 'XRP/BTC', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { XrplClient } = require('xrpl-client') | |
const xrpl = new XrplClient(['wss://s.devnet.rippletest.net:51233']) | |
// change this code to a different currency code one of others published, EUR/ZAR/MXN/JPY/BTC/USDT...... | |
let code = 'USD' | |
if (code.length > 3) { | |
const characters = Buffer.from(code, 'utf8').toString('hex') | |
let s = '0' | |
for (let index = 1; index < 40 - characters.length; index++) { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { XrplClient } = require('xrpl-client') | |
const payment = { | |
"TransactionType" : "Payment", | |
"Account" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn", | |
"Destination" : "ra5nK24KXen9AHvsdFTKHSANinZseWnPcX", | |
"Amount" : { | |
"currency" : "USD", | |
"value" : "1", | |
"issuer" : "rf1BiGeXwwQoi8Z2ueFYTEXSwuJYfV2Jpn" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
tidex: [ 'USDT', 'BSDT', 'USDC', 'BTC', 'ETH' ], | |
localtrade: [ 'USDT', 'BTC' ], | |
'ripio-trade': [ 'BRL' ], | |
coinbase: [ 'USD', 'EUR', 'GBP', 'USDT' ], | |
ndax: [ 'CAD', 'USD'], | |
trubit: [ 'USDT', 'USDC', 'BTC', 'MMXN' ], | |
pionex: [ 'USDT', 'BTC' ], | |
changelly: [ 'USDT', 'USDC', 'DAI', 'BTC', 'ETH' ], | |
bitget: [ 'BTC', 'ETH', 'USDT', 'USDC' ], |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include "hookapi.h" | |
#define MIN_XRP_AMOUNT 100000000 // 100 XRP in drops | |
#define ISSUER_ACCOUNT "rL4usRexjgCPTG8RoZvVHXmUjuYdWbRx2T" | |
#define MY_ACCOUNT "rL4usRexjgCPTG8RoZvVHXmUjuYdWbRx2T" | |
int64_t hook(uint32_t reserved) { | |
TRACESTR("HookOnURITokenCreateSellOffer: Start."); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const WebSocketServer = require('ws').Server | |
// dissable the perMessageDeflate this causes memory fragmentation!!!!! | |
const wss = new WebSocketServer({ port: process.env.APP_PORT, perMessageDeflate: false }) | |
wss.on('connection', (ws, req) => { | |
ws.on('message', (data) => { | |
// do something | |
}) | |
ws.on('close', () => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict' | |
/** | |
* Keep a transaction window. | |
*/ | |
module.exports = class TransactionWindow { | |
// First in First out | |
constructor(name, time = null) { | |
this.name = name |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const { XrplClient } = require('xrpl-client') | |
const client = new XrplClient() | |
const account = 'rJeBz69krYh8sXb8uKsEE22ADzbi1Z4yF2' | |
const account_tx = { | |
'id': 2, | |
'command': 'account_tx', | |
'account': account, | |
'ledger_index_min': -1, | |
'ledger_index_max': -1, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { XrplClient } from "xrpl-client" | |
const client = new XrplClient("wss://xrplcluster.com") // add node ws here you want to connect to | |
const res = await client.send({ | |
"id": 2, | |
"command": "account_info", | |
"account": "rG1QQv2nh2gr7RCZ1P8YYcBUKCCN633jCn", | |
"strict": true, | |
"ledger_index": "current", | |
"queue": true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// to start off call pathFind() that will get all paths to what you define in the command aka what currency you want ouy. | |
// then you will need to render a button for each paths result (commented below) I use vue so can get boiler plate as well for that but wietses example where i took it from | |
// so when user selects pair it then calls into makepathingPayment(path) with the path they are paying with. | |
rand(size) { | |
return [...Array(size)] | |
.map(() => Math.floor(Math.random() * 16).toString(16)) | |
.join(''); | |
}, |
NewerOlder