Skip to content

Instantly share code, notes, and snippets.

@WietseWind
Created September 15, 2020 21:54
Show Gist options
  • Save WietseWind/ecdfd58bece14e5d15e41138fa4b0f4a to your computer and use it in GitHub Desktop.
Save WietseWind/ecdfd58bece14e5d15e41138fa4b0f4a to your computer and use it in GitHub Desktop.
More complex (sample) XUMM payload JSON
{
custom_meta: {
instruction: 'Hey! Please sign for:\n\nThis\nand\nthat 🍻',
blob: {
myOwnProp: 'Whatever',
clientCountry: 'Netherlands',
clientAge: 32
},
identifier: 'MY_OWN_UNIQUE_INTERNAL_ID_123'
},
options: {
submit: true,
multisign: false,
expire: 500
return_url: {
app: 'https://wietse.com/xrpl?payload={id}',
web: 'https://wietse.com/xrpl?payload={id}'
}
},
user_token: '7ccc19cf-970a-4185-8bd3-49d507bf24ae',
// txblob: '1200002400000003614000000002FAF0806840000000000000C8732' +
// '...' +
// '5727D0B4057696574736557696E64E1F1',
txjson: {
TransactionType : 'Payment',
Destination : 'rwiETSee2wMz3SBnAG8hkMsCgvGy9LWbZ1',
Amount: '1000000',
LastLedgerSequence: 20,
Fee: '1337',
Memos: [
{
Memo: {
MemoData: Buffer.from('Sample XUMM payload', 'utf-8').toString('hex').toUpperCase(),
MemoFormat: Buffer.from('some/memo', 'utf-8').toString('hex').toUpperCase()
}
}
]
}
})
@WietseWind
Copy link
Author

Referenced from the XUMM SDK Readme: https://github.com/XRPL-Labs/XUMM-SDK/blob/master/README.md

A reference for payload options & custom meta can be found in the API Docs.

Instead of providing a txjson transaction, a transaction formatted as HEX blob (string) can be provided in a txblob property.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment