Sign a transaction offline with VSC and Node.js and submit to the XRPL.
You need Node.js and VisualStudioCode.
Step by step guide to use the code:
-
Create an empty folder in your desktop
-
Open that folder with VSC, or when you are in VSC open that folder
-
Once in VSC create a jason file called tsconfig.json
-
Put inside that file this:
{ "compilerOptions": { "target": "ES5", "module": "CommonJS", "sourceMap": true } }
-
Open terminal and type: npm install -g typescript
-
After that, type this (creates a basic package.json): npm init --yes
-
After that type in the terminal (installs the library): npm i xrpl-accountlib
-
After that type in the terminal (installs the library): npm i xrpl-client
-
Type in the terminal (this is just in case you want to modify the code, to modify it you will always do that): tsc -w
(an don't close not use that terminal, just leave it opened)
-
Usage:
To SIGN a transaction offline disconnect internet and type in a new terminal (where brakets you have to put the concrete real data): node indexsign <secret_type> <destination_address>
-
Usage:
To SUBMIT a transaction online connect internet and type in the terminal (where brakets you have to put the concret real data): node indexsubmit <tx_blob>