Developer Questions

Ask a Question

WebSocket event for ignored/closed sign requests

Hi, My client side code listens to events/transaction status updates using the WebSocket approach. I noticed that when the user chooses the "Close" button instead of Accept/Decline in the transaction sign request, it doesn't emit/send any event to the websocket connection. Is there a way to know when the user closes or ignores the sign request? Or will a feature for this be added in future versions? Thanks

Hi im from XRPDomains - xrpdomains.xyz

Hello friends I'm from xrpdomains.xyz, I used the view NFTs function on Xumm wallet and found that currently URIs don't support non-ascii characters and emoji, it won't read it and says no name found. Hope you can help update it. xrp.cafe can display it very well. xrp.cafe: https://xrp.cafe/nft/00080000413DEC6E282BBCEA55B71140D0CB35F01673BBE051E86273000000D8 URI: https://mainnet.xrpdomains.xyz/api/nftdomains/metadata/we%E2%9D%A4%EF%B8%8Fxrp.xrp Thanks so much

Is it possible to send webhooks also when the payload becomes expired?

Seems like webhooks are only sent when the payload is rejected or signed but it would be extremely useful if an expiration notification would also be delivered. Any plans to enable this in the near future? Thanks.

How to close connection or is it how it meant to work

this is my code i'm using to send a signIn payload. everything works fine. only problem i'm wondering is is it normal to keep it logging "New payload event: { expires_in_seconds: xxxxx}" in console every seconds. i understand the events logs when its in process of signing in but the problem i have is it keep logging even after everything is done. resolved. i think it sorta build up and logs more and more each time. i create a payload eg. a user tried to generate a qrcode. so my question is how to close connection after its been resolved or reject. const request= { TransactionType: "SignIn", }; const subscription = await Sdk.payload.createAndSubscribe( request, (event) => { console.log("New payload event:", event.data); if (event.data.signed === true) { return event.data; } if (event.data.signed === false) { return false; } } ); const resolveData: any = await subscription.resolved; console.log("resolved") if (resolveData.signed === false) { console.log("The sign request was rejected :("); } if (resolveData.signed === true) { console.log("Woohoo! The sign request was signed :)");
ANSWERED

createAndSubscribe payload resolving before being signed

I am following the https://xumm.readme.io/recipes/xumm-sdk-with-jwt in a XAPP, and I want to run a function after the payload is signed. The payload logs 'resolved' before the transaction is actually signed. Is this intended? Do I need to poll the backend to see if it has been signed manually?
ANSWERED

trying to mint NFT using NFTokenMint

this is my payload const request: any = { txjson: { TransactionType: "NFTokenMint", Account: publicAddress, URI: "697066733A2F2F6261666B72656965696979727A613670706179687635716675366E6B636477646D377233366775666F366A796B64357A6C6D7A7735617467716479", Flags: 8, TransferFee: 10, NFTokenTaxon: 0, }, user_token: issued_user_token, }; const subscription = await Sdk.payload.createAndSubscribe( request, (event) => { console.log("New payload event:", event.data); if (event.data.signed === true) { return event.data; } if (event.data.signed === false) { return false; } } ); const resolveData: any = await subscription.resolved; if (resolveData.signed === false) { console.log("The sign request was rejected :("); } if (resolveData.signed === true) { console.log("Woohoo! The sign request was signed :)"); } the error im getting Error: Payload encoding error: checksum_invalid
ANSWERED

Browserified frontend JWT getOTT not working

Hi, I'm trying to make a simple frontend page to make a payment using XUMM. I don't want any backend. I've found in the docs that there is a frontend only way to accomplish this, using JWT endpoints. See here: https://xumm.readme.io/reference/xapps-jwt-endpoints In Option #1: Use the XUMM SDK in your xApp frontend I've created an api key/secret at https://apps.xumm.dev/ I created a page with the code to get OTT (I replaced the api key with my key): const {XummSdkJwt} = require('xumm-sdk') const Sdk = new XummSdkJwt('8525e32b-1bd0-4839-af2f-f794874a80b0') Sdk.getOttData().then(c => { console.log('OTT Data', c) Sdk.ping().then(c => { console.log('Pong', c) }) }) I load the page, but there is no console log with "OTT Data", nor "Pong". So basically the code provided is wrong, or the SDK is buggy (or has changed and the example is not working anymore). Also the jsfiddle provided (I also updated the jsfiddle with my api key) in the page doesn't work. It tells to check the browser logs, but no logs appear. Help please.
ANSWERED

XUMM HELP

I cant access my primary xumm I got all the seed phrase n my XUMM WALLET except all the numbers in ROW "E" >ANY IDEA HOW MANY ATTEMPTS TO INPUT SEED PHRASE BEFORE IT FREEZES THE ACCOUNT? >And any app that can decode or make combinations to crack it? HELLP :(
ANSWERED

How to request `EscrowCreate` Sequence number for `EscrowFinish` payload?

ChatGPT would like to apologize for the confusion, so how to request Sequence number for EscrowFinish, wherein the following code successfully connects and signs an`EscrowCreate`, after which the suggested `sdk.getTransaction(txid)` line throws `undefined`: ```<script type="module"> import 'https://xumm.app/assets/cdn/xumm-oauth2-pkce.min.js?v=2.7.1' const xumm = new XummPkce(‘……………..xumm public key……………….’, { implicit: true, // Implicit: allows to e.g. move from social browser to stock browser redirectUrl: document.location.href + '?custom_state=test' }) const { sdk } = await xumm.state() const payload = await sdk.payload.create({ TransactionType: 'EscrowCreate', Destination: borrowerXRPaddressField, Amount: String(1_000_000), CancelAfter: cancelAfter, Condition: condition, }) if (payload.pushed) { alert('Payload `' + payload.uuid + '` pushed to your phone.') } else { // You can also render `payload.refs.qr_png` in your UI alert('Payload not pushed, opening payload...') window.open(payload.next.always) } // START ADD REQUEST SEQUENCE CODE FOR EscrowFinish async function getEscrowSequence(txid) { const { sdk } = await xumm.state(); const transaction = await sdk.getTransaction(txid); // (foobar.html:446:30) return transaction.sequence; } const sequence = await getEscrowSequence(payload.txid); console.log('Sequence:', sequence); // END ADD REQUEST SEQUENCE CODE } </script>``` throws: ```TypeError: Cannot read properties of undefined (reading 'trim') at r.Meta.<anonymous> (xumm-oauth2-pkce.min.js?v=2.7.1:1:43121) at Generator.next (<anonymous>) at xumm-oauth2-pkce.min.js?v=2.7.1:1:38446 at new Promise (<anonymous>) at n (xumm-oauth2-pkce.min.js?v=2.7.1:1:38191) at r.Meta.getTransaction (xumm-oauth2-pkce.min.js?v=2.7.1:1:43051) at r.XummSdkJwt.getTransaction (xumm-oauth2-pkce.min.js?v=2.7.1:1:48931) at getEscrowSequence (foobar.html:443:47) at async document.getElementById.onclick (foobar.html:446:30)```
ANSWERED

Error: access_denied

Hey, I've read the docs and all I can find on this error. I am currently using your test code to make sure there was no other issues and I still get the the error. I am currently running on localhost:5173. I have whitelisted `https://localhost:5173`. It's a single page react app copy and paste of your tester code with my api key. I see in https://xumm.readme.io/discuss/633aea416f5766002e10ad5d the full path was mentioned. It has no / path. Is `https://localhost:5173` the full path? I don't understand what I'm getting wrong here I've had it working from backend using SDK with key and secret, but I am trying to implement from a front end application.