riddlePARTNERS

Widgets

Buy buttons & custom UI

Keep your own layout. Drop in a Riddle pay button, or a custom swap panel that quotes through Partners and confirms in Riddle Wallet. The wallet origin is never iframed.

Pay / buy button

One click opens a Payment in Riddle Wallet. Use this for merchandise, tips, or gated access.

<script src="https://partners.riddlewallet.com/riddlepartners.js"></script>
<button
  data-riddle-buy
  data-partner="acme"
  data-chain="xrpl"
  data-to="rEwUuTNY3TaXAJL6T4y1tjkAnY7JPdX3dB"
  data-amount="1"
  data-label="Buy now">
  Buy now
</button>
const riddle = RiddlePartners.createClient({ partner: 'acme' })
riddle.pay({ to: 'r…', amount: '1', chain: 'xrpl', instruction: 'SKU-104' })
riddle.mount('#buy', { product: 'buy', to: 'r…', amount: '1', chain: 'xrpl', label: 'Buy' })

Your own swap UI

Embed a thin quote + confirm panel you can theme, or call quote/prepare from your server and only use the wallet popup for the last step.

riddle.mount('#myswap', { product: 'custom', chain: 'solana' })

// or fully yours:
const quote = await riddle.api.swapQuote({ chain: 'solana', amount: '10000000', inputMint, outputMint })
riddle.pay({ to: treasury, amount: feeHuman, chain: 'solana' })

Live: /embed/custom?partner=riddle-demo

Programmable functions

  • connectWallet() / createWallet() — identity
  • pay() — one-shot Payment (buy button)
  • api.swapQuote / swapPrepare — your swap screen
  • api.createSignSession — arbitrary XRPL / chain payload, then product: 'sign'