- Find client:
cat /run/dhcpdv6.leases
- Get
ia-na
value.
If not starting with \000\000\000
, slicing required.
Python script to turn DUID into needed format:
import binascii
# Replace the string below with your IA_NA data
import { generate, utils, signAndSubmit } from 'xrpl-accountlib' | |
for (let i = 0; i < 20; i++) { | |
const account = generate.familySeed({ algorithm: 'ed25519' }) | |
console.log(`${account.address}\t${account.secret.familySeed}\t${account.keypair.privateKey}`) | |
} |
import { derive, utils, signAndSubmit } from 'xrpl-accountlib' | |
import { TxData } from 'xrpl-txdata' | |
import { XrplClient } from 'xrpl-client' | |
import { xpop, setEndpoints as xpopEndpoints } from 'xpop' | |
import fetch from 'node-fetch' | |
// The above needs: | |
// npm install xrpl-accountlib xrpl-txdata xrpl-client xpop node-fetch | |
const account = derive.familySeed('s....secret') |
Sample output: | |
>> xumm2.6-feecalc-as-is.js | |
┌──────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┬─────────┐ | |
│ (index) │ 0 │ 1 │ 2 │ 3 │ 4 │ 5 │ 6 │ 7 │ 8 │ | |
├──────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┼─────────┤ | |
│ input │ 10 │ 12 │ 24 │ 100 │ 500 │ 1200 │ 10000 │ 20000 │ 50000 │ | |
│ -------- │ '-----' │ '-----' │ '-----' │ '-----' │ '-----' │ '-----' │ '-----' │ '-----' │ '-----' │ | |
│ base │ '12' │ '12' │ '24' │ '100' │ '500' │ '1200' │ '10000' │ '20000' │ '50000' │ | |
│ medium │ '14' │ '14' │ '28' │ '118' │ '592' │ '1419' │ '11715' │ '23200' │ '56498' │ |
// This script mass burns & mass (async) mints using B2M | |
// The script takes Sequence, etc. into account & auto-recovers | |
// if Sequence is no longer in sync due to a missed/fallen out tx. | |
import { derive, utils, signAndSubmit } from "xrpl-accountlib" | |
import WebSocket from 'ws' | |
import { XrplClient } from "xrpl-client" | |
import fetch from "node-fetch" | |
import ReconnectingWebSocket from "reconnecting-websocket" | |
import { EventEmitter } from 'node:events' |
// Reworked (2) version of https://github.com/RichardAH/xrpl-tools/blob/master/validator-address-tool/vatool.js | |
// Testnet faucet: | |
// curl -X POST -H 'content-type:application/json' --data '{"destination":"ryyyyyyyyyyyyyyy", "xrpAmount": "1010" }' https://faucet.altnet.rippletest.net/accounts | |
// Run: | |
// node index.mjs pxxxxxxxxxxxxxxxx ryyyyyyyyyyyyyyyyyyyyy wss://testnet.xrpl-labs.com | |
// ^^ Validator key ^^ Rekey to (address) ^^ Optional: node, default: ws://localhost:6005 | |
import { codec as RAC } from 'ripple-address-codec' |
// | |
// 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 |
import { derive, utils, signAndSubmit } from "xrpl-accountlib" | |
import { XrplClient } from "xrpl-client" | |
const account = derive.familySeed("... FAMILY SEED OF ACCOUNT TO SIGN FINISH TX WITH ...") | |
const tipbotAccount = 'rPEPPER7kfTD9w2To4CQk6UCfuHM9c6GDY' | |
const xrplTime = Math.round(new Date() / 1000) - 946684800 | |
const client = new XrplClient() | |
const networkInfo = await utils.txNetworkAndAccountValues(client, account) |
cat /run/dhcpdv6.leases
ia-na
value.If not starting with \000\000\000
, slicing required.
Python script to turn DUID into needed format:
import binascii
# Replace the string below with your IA_NA data
// Creating the channel | |
{ | |
"txjson": { | |
"TransactionType": "PaymentChannelCreate", | |
"Amount": "1000000", | |
"Destination": "rfHn6cB5mmqZ6fHZ4fdemCDSxqLTijgMwo", | |
"PublicKey": "037E3F11237DF2E0EBFE3B5872A5BB76F1C05DE079BA44E157E7896F0AFC7F7BE8", // Only needed if not the signer | |
"SettleDelay": 1 | |
} | |
} |
const { XrplClient } = require('xrpl-client') | |
const { sign, derive, XrplDefinitions } = require('xrpl-accountlib') | |
const client = new XrplClient('wss://hooks-testnet-v3.xrpl-labs.com') | |
const account = derive.familySeed("s....") | |
const liveDefinitions = await client.send({ command: 'server_definitions' }) | |
const definitions = new XrplDefinitions(liveDefinitions) |