Files
xrpl-dev-portal/content/_code-samples/tx-serialization/js
mDuo13 554a3732d4 Migrate content syntax via script
The changes in this commit were auto-generated by running

tool/migrate.sh

Following this commit, the Dactyl build no longer works but the Redocly
build (mostly) should.
2024-01-31 16:09:41 -08:00
..
2023-02-01 15:39:48 +01:00
2023-02-01 15:39:48 +01:00
2023-09-08 14:29:53 -07:00
2024-01-31 16:09:41 -08:00
2023-01-31 20:41:25 +01:00

JavaScript transaction serialisation examples

Convert transactions and other XRPL data from JSON to their canonical binary format for signing or cryptographic verification. (This reference implementation is equivalent to the ones included in most client libraries.).

For a detailed explanation, see Serialization.

On first run, you have to install the necessary node.js dependencies:

npm install

Command-line usage:

Simple example, use tx1.json default:

node index.js

Verbose output, use --verbose or -v:

node index.js -v

Raw output without formatting, use --raw or -r:

node index.js -r

Pick JSON fixture file:

node index.js -f test-cases/tx3.json

Feed JSON as CLI argument:

node index.js -j "{\"TransactionType\":\"Payment\"}"