xApp
A sign request in Xumm is a prompt to approve a transaction or action on the XRP Ledger. This page will show you how you can create a Sign Request, and how you can deliver the request to the end user.
<html lang="en">
<head>
<script src="https://xumm.app/assets/cdn/xumm.min.js"></script>
</head>
<body>
<pre id="payload">...</pre>
<script>
var xumm = new Xumm('your-api-key')
xumm.on('payload', event => {
document.getElementById('payload').innerHTML = JSON.stringify(event, null, 2)
})
xumm.payload
.create({
txjson: {
TransactionType: "Payment",
Destination: "r...",
Amount: "1000000"
},
options: {
return_url: {
app: "https://sample.test/?...",
web: "https://sample.test/?id={id}"
},
force_network: "MAINNET"
},
custom_meta: {
identifier: "123123",
instruction: "Please sign this to..."
}
})
.then(payload => {
document.getElementById('payload').innerHTML = JSON.stringify(payload, null, 2)
xumm.xapp.openSignRequest(payload)
})
</script>
</body>
</html>Last updated
Was this helpful?