Developer Questions

Ask a Question
ANSWERED

Once I've created a signing request on the backend, how do I redirect a user to the signing request on the frontend?

I've got an API endpoint that creates a signing request, like this: const subscription = await Xumm.payload .createAndSubscribe(request, (event) => { // .... more logic, the end result is an object with a link, etc... How do I take this information, and show the signing request on the frontend? I assume I use the jwt SDK for this, and probably need to pass the UUID? I was able to "hack" it by doing window.open([link]) to the link returned (subscription.created.next.always), but then after signing it doesn't return to the app. Thanks!
ANSWERED

Is there any other wallet like Xumm

I struggle to find a wallet like xumm or other for performing transactions + minting NFTS for the XRP web app. I'm creating a web app like sologenic but I don't want to use D'cent ledger or else
ANSWERED
ANSWERED

How can i receive wallet address in xapp.

I want to receive wallet address of xapp user while using my custom xapp. How to do this. Please help on this.
ANSWERED

If i install package xumm-xapp-sdk for next js project getting local storage error.

I'm implemeting xapp using next js application. In that i'm trying to consume xapp sdk to open browser from my xapp. If i install and use xumm-xapp-sdk i'm getting local storage not found error. If i use script url not getting any error (<script src="https://xumm.app/assets/cdn/xumm-xapp-sdk.min.js"></script>). But i wanted to use xumm-xapp-sdk by installing package. Could you please help me on this why i'm getting local storage error and how to resolve it.
ANSWERED

UI workflow while waiting for the wallet user to scan the QR code

I'm working on something like an NFT marketplace. Say a user with Xumm wallet is on an NFT buy page. They click Buy Now and my backend shoots a request to Xumm API and get the below. { uuid: '77f7cde5-54a0-405b-afa6-864f1464693b', next: { always: 'https://xumm.app/sign/77f7cde5-54a0-404693b', no_push_msg_received: 'https://xumm.app/sign/77f7cde5-5464693b/qr' }, refs: { qr_png: 'https://xumm.app/sign/77f7cde5-54a0-44693b_q.png', qr_matrix: 'https://xumm.app/sign/77f7cde5-54a0464693b_q.json', qr_uri_quality_opts: [ 'm', 'q', 'h' ], websocket_status: 'wss://xumm.app/sign/77f7cd864f1464693b' }, pushed: true } So, my site will pop-up the QR code at https://xumm.app/sign/77f7cde5-8464693b_q.png and wait for the user to sign using their wallet. But how should I listen to know when the user has signed the request? Should my frontend listen to the websocket at wss://xumm.app/sign/77f7cde5-5464693b? Or is there a better way?
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

Connecting to the SDK from Unity

Hi there Do you have any samples of authenticating and sending payloads from Unity engine?
ANSWERED

EscrowCreate payload throws `ReferenceError: require is not defined at ... require('five-bells-condition')`

Greetings and Salutations, I am trying to adapt my HTML page to XUMM's SignIn and Payment payload to `EscrowCreate`by adding the following code from [Send a Conditionally-Held Escrow](https://xrpl.org/send-a-conditionally-held-escrow.html). SignIn works and Payment works. However, following code throws `ReferenceError: require is not defined at document.getElementById.onclick (*refers to require('five-bells-condition') line*). Is it possible to use XUMM app to `EscrowCreate`? ``` document.getElementById('foobar').onclick = async () => { const { sdk } = await xumm.state() const cc = require('five-bells-condition') const crypto = require('crypto') const preimageData = crypto.randomBytes(32) const fulfillment = new cc.PreimageSha256() fulfillment.setPreimage(preimageData) const condition = fulfillment.getConditionBinary().toString('hex').toUpperCase() console.log('Condition:', condition) const fulfillment_hex = fulfillment.serializeBinary().toString('hex').toUpperCase() console.log('Fulfillment:', fulfillment_hex) const rippleOffset = 946684800 const cancelAfter = Math.floor(Date.now() / 1000) + (60) - rippleOffset // cancel after 60 sec console.log(cancelAfter) const payload = await sdk.payload.create({ TransactionType: 'EscrowCreate', Destination: 'rXRPaddress...................................', Amount: String(3_000), Condition: 'condition', CancelAfter: 'cancelAfter', }) if (payload.pushed) { alert('Payload `' + payload.uuid + '` pushed to your phone.') } else { alert('Payload not pushed, opening payload...') window.open(payload.next.always) } } ```
ANSWERED

Creating a token in testnet v2 (XLS 20)

I tried to create my own token to test with the NFT web app that we are building. But every time I go to token creator app, it throws ``` You opened the xApp with an account you don't have full access to. (Read only) Please close this xApp, navigate to the home screen and switch to the account you want to issue your token from. (Needs to have 'Full Access') Then open the xApp again. ``` But the account was seeded from "https://hooks-testnet-v2.xrpl-labs.com/" with Full Access. So I am having a hard time to add and test the custom tokens. [Xumm Image](https://postimg.cc/dLsNqns4)