Skip to content

Xyra Adapter ​

Xyra opens a hosted wallet popup for connection and transaction approval. No browser extension or WalletConnect project ID is required.

IntegrationValue
Package@xrpl-wallet-kit/adapter-xyra
Adapter IDxyra
Wallet typeHosted web / popup
Client registrationOpt-in on XRPL; included by default on Xahau

Installation ​

sh
npm install @xrpl-wallet-kit/core @xrpl-wallet-kit/adapter-xyra xrpl@^4

For the Client tab below, install @xrpl-wallet-kit/client instead.

Connect ​

ts
import { createWalletKit } from "@xrpl-wallet-kit/client";

const kit = createWalletKit({ network: "mainnet", wallets: ["xyra"] });
const { manager } = kit;
const { account } = await kit.connect("xyra");
ts
import { WalletManager } from "@xrpl-wallet-kit/core";
import { createXyraAdapter } from "@xrpl-wallet-kit/adapter-xyra";

const manager = new WalletManager({
  network: "mainnet",
  adapters: [createXyraAdapter()],
});
const { account } = await manager.connect("xyra");

Call connect and each signing request from a user action. The selective client also accepts an explicitly configured adapter through adapters.

Networks ​

Supports standard XRPL Mainnet/Testnet and Xahau Mainnet/Testnet. The default XRPL adapter does not accept Devnet or custom RPC definitions. For Xahau, the full client accepts network: "xahau-mainnet" or "xahau-testnet" with a positive preflight.maxFeeDrops; core/selective integrations must register the protocol and adapter chain filter. See Xahau Configuration.

Capabilities ​

This table describes manager-level operations. Payment/NFT requests use generic signing rather than dedicated payments/nftOffers capability flags.

OperationSupport
ConnectYes
DisconnectYes; local session/popup cleanup
Session restoreNo; reconnect from a user action
signTransaction()Yes
signAndSubmit()Yes
signMessage()Not exposed
signIn()Not exposed
switchNetwork()Not exposed
Payment / NFT transactionsThrough generic txJson signing
QR / deep linkNo

Options ​

These options apply to createXyraAdapter(). Pass a configured adapter through the client's adapters option when custom options are needed.

OptionTypeDefaultDescription
timeoutMsnumber60000Connection and signing timeout in milliseconds
maxFeeDropsstring"1000000"XRPL transaction fee ceiling
supportedChainsWalletChainFilterXRPL Mainnet/TestnetRestrict chains in a protocol-aware integration

Transactions ​

These XRPL examples use manager and account from either Connect tab. Run each request separately from a user action. Replace recipient addresses and 64-character NFT/offer IDs before signing. Amounts are in drops: "1000000" is 1 XRP. Include DestinationTag when the recipient requires it.

maxFeeDrops is an application-selected ceiling, not the expected fee. Adjust the example limit for your application.

A returned hash or submitted status is not validated ledger confirmation. Check the transaction result before treating a payment or NFT transfer as complete. See WalletManager Events.

Payment ​

ts
const result = await manager.signAndSubmit({
  txJson: {
    TransactionType: "Payment",
    Account: account.address,
    Destination: "<recipient_address>",
    Amount: "1000000",
  },
  maxFeeDrops: "50000",
});
console.log(result.hash);
ts
const result = await manager.signTransaction({
  txJson: {
    TransactionType: "Payment",
    Account: account.address,
    Destination: "<recipient_address>",
    Amount: "1000000",
  },
  maxFeeDrops: "50000",
});
console.log(result.txBlob); // Signed, not broadcast

The adapter verifies the signed result before returning it or submitting it. A configured/request fee ceiling can reject a signed transaction with excessive fees.

NFT Transactions ​

Each tab signs and submits one transaction. Wallet display and supported transaction types depend on the wallet/provider; generic signing is not a promise of support for every amendment.

ts
await manager.signAndSubmit({
  txJson: {
    TransactionType: "NFTokenMint",
    Account: account.address,
    NFTokenTaxon: 0,
    Flags: 8, // tfTransferable
  },
  maxFeeDrops: "50000",
});
ts
await manager.signAndSubmit({
  txJson: {
    TransactionType: "NFTokenCreateOffer",
    Account: account.address,
    NFTokenID: "<nft_id>",
    Amount: "1000000",
    Flags: 1, // tfSellNFToken
  },
  maxFeeDrops: "50000",
});
ts
await manager.signAndSubmit({
  txJson: {
    TransactionType: "NFTokenAcceptOffer",
    Account: account.address, // Buyer's account
    NFTokenSellOffer: "<sell_offer_id>",
  },
  maxFeeDrops: "50000",
});
ts
await manager.signAndSubmit({
  txJson: {
    TransactionType: "NFTokenCancelOffer",
    Account: account.address, // Offer creator's account
    NFTokenOffers: ["<offer_id>"],
  },
  maxFeeDrops: "50000",
});
ts
await manager.signAndSubmit({
  txJson: {
    TransactionType: "NFTokenBurn",
    Account: account.address,
    NFTokenID: "<nft_id>",
  },
  maxFeeDrops: "50000",
});

Burning permanently destroys the NFT. For buy offers, brokered acceptance and additional fields, see NFT Marketplace. Xahau uses different transaction examples; see the Xahau guide.

For sign-only NFT requests, pass the same txJson to manager.signTransaction(). Do not infer Batch support from generic transaction signing.

Authentication ​

Neither arbitrary signMessage() nor wallet-native signIn() is exposed. Connection approval is not a backend login proof; choose an authentication-capable adapter when your application needs one.

Sessions and Disconnect ​

Xyra does not expose passive session restore. After reload, reconnect from a user action. manager.disconnect() clears local state and pending popup work, not wallet credentials.

Integration Notes ​

  • Use HTTPS or localhost and allow popups for connection and signing.
  • Preserve the requesting origin with Referrer-Policy: strict-origin-when-cross-origin or origin; avoid no-referrer, noopener and noreferrer for the wallet popup.
  • If setting COOP, use Cross-Origin-Opener-Policy: same-origin-allow-popups. Allow data: in CSP img-src for the embedded icon.
  • Transaction JSON is sent in the popup URL. Do not put secrets in transaction metadata.
  • Check a transaction's hash before retrying a submission with an unknown outcome.

Troubleshooting ​

SymptomAction
Xyra is missing on XRPLAdd "xyra" explicitly to wallets
Popup is blockedStart the request from a user action and allow popups
Wallet cannot identify the dApp originCheck referrer and opener policies
Fee limit is rejected on XahauConfigure a positive global/request fee ceiling as shown in the Xahau guide

Released under the MIT License.