Skip to content

Instantly share code, notes, and snippets.

View WietseWind's full-sized avatar
⌨️
Focusing

Wietse Wind WietseWind

⌨️
Focusing
View GitHub Profile
@WietseWind
WietseWind / index.js
Last active January 18, 2026 18:10
account_objects (type: state) to account_lines responses: get lines based on reserve claim
const { XrplClient } = require('xrpl-client')
const client = new XrplClient()
const myAccount = 'rwietsevLFg8XSmG3bEZzFein1g8RBqWDZ'
const objectFlags = {
lsfLowReserve: 0x00010000,
lsfHighReserve: 0x00020000,
lsfLowNoRipple: 0x00100000,
lsfHighNoRipple: 0x00200000
@WietseWind
WietseWind / index.js
Created July 22, 2019 11:14
Encode/Decode X-address in the browser (plain HTML+JS)
<script src="https://xrpaddress.info/js/xrpl-tagged-address-codec-browser.js"></script>
<script>
var XCodec = require('xrpl-tagged-address-codec')
console.log(XCodec.Encode({ account: 'rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY', tag: 495 }))
console.log(XCodec.Decode('XV5sbjUmgPpvXv4ixFWZ5ptAYZ6PD28Sq49uo34VyjnmK5H'))
</script>
@WietseWind
WietseWind / racadm.bash
Last active December 11, 2025 06:55
Install racadm on Ubuntu 20.04 / 18.04
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/sblim-cmpi-devel/libcmpicppimpl0_2.0.3-0ubuntu2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/multiverse/s/sblim-sfcb/sfcb_1.4.9-0ubuntu5_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/sblim-sfc-common/libsfcutil0_1.0.1-0ubuntu4_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/multiverse/c/cim-schema/cim-schema_2.48.0-0ubuntu1_all.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/openwsman_2.6.5-0ubuntu3_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/s/sblim-sfcc/libcimcclient0_2.2.8-0ubuntu2_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-server1_2.6.5-0ubuntu3_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman1_2.6.5-0ubuntu3_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-client4_2.6.5-0ubuntu3_amd64.deb
wget http://archive.ubuntu.com/ubuntu/pool/universe/o/openwsman/libwsman-curl-client-trans
@WietseWind
WietseWind / vanity.mjs
Created December 8, 2025 19:19
Sign with Regular Key on Vanity account on XRPL/Xahau
import lib from "xrpl-accountlib";
import { XrplClient } from 'xrpl-client'
const vanityAccount = "rrrrrrrr";
const signWithRegularKeySecret = "ssssss"; // or use secret numbers and change the derive fn below
const tx = {
TransactionType: "Payment",
Account: vanityAccount,
Fee: "12",
@WietseWind
WietseWind / list_one.xml
Last active December 1, 2025 10:47
Xaman World Currencies Feed (live)
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ISO_4217 Pblshd="2025-05-12">
<CcyTbl>
<CcyNtry>
<CtryNm>AFGHANISTAN</CtryNm>
<CcyNm>Afghani</CcyNm>
<Ccy>AFN</Ccy>
<CcyNbr>971</CcyNbr>
<CcyMnrUnts>2</CcyMnrUnts>
</CcyNtry>
@WietseWind
WietseWind / main.js
Last active November 20, 2025 23:10
Ugly code: Flic bridge SDK + TP Link HS100 relay
var buttonManager = require("buttons")
var buttons = buttonManager.getButtons()
const net = require('net')
var arwenTimeout
for (var i = 0; i < buttons.length; i++) {
var button = buttons[i];
console.log(JSON.stringify(button))
}
@WietseWind
WietseWind / validators.txt
Created September 22, 2025 10:48
Update rippled XRPLF UNL config
[validator_list_sites]
https://vl.ripple.com
https://unl.xrplf.org
[validator_list_keys]
# Ripple
ED2677ABFFD1B33AC6FBC3062B71F1E8397C1505E1C42C64D11AD1B28FF73F4734
# XRPLF
ED42AEC58B701EEBB77356FFFEC26F83C1F0407263530F068C7C73D392C7E06FD1
@WietseWind
WietseWind / transaction.js
Last active July 24, 2025 11:29
Send XRP transaction to Ripple XRP Ledger
/**
* Use: node transaction.js AMOUNT:FROMADDR:TOADDR:TOTAG
* eg: node transaction.js 10:rXXXXXXX:rXXXXXX:1337
* To be able to sign the transaction, the object 'wallets'
* below should contain the secret key for the used from-wallet.
*/
const RippleAPI = require('ripple-lib').RippleAPI
const api = new RippleAPI({ server: 'wss://s1.ripple.com' }) // Public rippled server
const fetch = require('node-fetch')
@WietseWind
WietseWind / dlvr.sh
Last active June 12, 2025 05:05
DLVR.CLOUD one file upload bash script
#!/bin/bash
# Install
# sudo curl https://gist.githubusercontent.com/WietseWind/5ef71f7a26d9588a233f1d034762ac84/raw/dlvr.sh > /usr/local/bin/dlvr
# sudo chmod +x /usr/local/bin/dlvr
# Use: dlvr somefilename
DLVR_INIT=$(curl -i -s https://dlvr.cloud/api.php)
DLVR_SESSION=$(echo "$DLVR_INIT"|grep session|grep addr|grep domain|jq .session|cut -d '"' -f 2)
DLVR_ADDR=$(echo "$DLVR_INIT"|grep session|grep addr|grep domain|jq .addr|cut -d '"' -f 2)
@WietseWind
WietseWind / sample.js
Last active June 4, 2025 09:28
XRPL Accountlib & XRPL Client together
//
// NOTE! THERE'S A BETTER METHOD NOW:
// https://github.com/WietseWind/xrpl-accountlib#-however-since-version-210-this-lib-bundles-xrpl-client-as-well-and-comes-with-helpers-to-prepare-transactions--submit-transactions-
//
const lib = require('xrpl-accountlib')
const { XrplClient } = require('xrpl-client')
const secret = 's...'
const account = 'r...' // Can be derived