Xyra Developer Docs
Integrate via standard browser APIs — no SDK required
Stable URL
/developers

Connect flow

Your app opens Xyra’s approval popup at wallet.xyra.now/connect. Xyra derives the requesting origin from document.referrer, prompts the user, and then sends a CONNECT_RESPONSE back via postMessage.

JavaScript example — Connect
const popup = window.open(
  'https://wallet.xyra.now/connect?network=xrpl-testnet',
  'xyra_connect',
  'width=420,height=720'
);

window.addEventListener('message', (event) => {
  if (event.origin !== 'https://wallet.xyra.now') return;

  if (event.data?.type === 'CONNECT_RESPONSE') {
    console.log('Session ID:', event.data.sessionId);
    console.log('Address:', event.data.address);
  }
});
Reminder
Always validate event.origin and ignore messages that are not from the Xyra approval origin.