1

The use-case is I would like someone to buy an asset directly on a website, by clicking GUI-buttons and preferring client-side code, rather than asking them to write code or give a server their keys.

I saw these:

The first positions itself as explicitly a metamask equivalent, but is limited to XLM transfers.

What design patterns are used to create browser-based dApps with low friction to use like this in Stellar?

3

Right now I believe SEP-7 is the best answer. It defines a link format that an app such as yours can use to create a transaction that you'd like a user's wallet to sign and submit. The flow is this:

  • User decides to buy something on your site
  • Your site generates a SEP-7 link with the appropriate payment transaction and shows it to the user
  • User clicks the link, which opens their wallet
  • User confirms in wallet that they want to sign & submit
  • wallet signs & submits transaction
  • wallet optionally calls back to your app, notifying that the transaction was submitted

Unfortunately, I don't know of any popular wallets that implement SEP-7. See this question.

https://id.stellar.expert/ is a demo wallet that implements SEP-7, so you can use it for testing while wallets are working on adding SEP-7 support, which should be coming soon.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.