Created
December 8, 2025 19:19
-
-
Save WietseWind/c6b757d540ea5ab794df9ee68f86eaf0 to your computer and use it in GitHub Desktop.
Sign with Regular Key on Vanity account on XRPL/Xahau
This file contains hidden or 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 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", | |
| // More tx details here | |
| }; | |
| const wss = "wss://xrplcluster.com"; | |
| const client = new XrplClient(wss) | |
| const account = lib.derive.familySeed(signWithRegularKeySecret); // or secret numbers here | |
| const networkInfo = await lib.utils.txNetworkAndAccountValues(client, { | |
| ...account, | |
| address: vanityAccount, | |
| }) | |
| console.log(networkInfo) | |
| console.log("Sign and Submit"); | |
| const signed = await lib.signAndSubmit({ | |
| ...networkInfo.txValues, | |
| ...tx | |
| }, client, account); | |
| console.log(signed); | |
| client.close(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment