Xyra Adapter
Xyra opens a hosted wallet popup for connection and transaction approval. No browser extension or WalletConnect project ID is required.
| Integration | Value |
|---|---|
| Package | @xrpl-wallet-kit/adapter-xyra |
| Adapter ID | xyra |
| Wallet type | Hosted web / popup |
| Client registration | Opt-in on XRPL; included by default on Xahau |
Installation
npm install @xrpl-wallet-kit/core @xrpl-wallet-kit/adapter-xyra xrpl@^4For the Client tab below, install @xrpl-wallet-kit/client instead.
Connect
import { createWalletKit } from "@xrpl-wallet-kit/client";
const kit = createWalletKit({ network: "mainnet", wallets: ["xyra"] });
const { manager } = kit;
const { account } = await kit.connect("xyra");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.
| Operation | Support |
|---|---|
| Connect | Yes |
| Disconnect | Yes; local session/popup cleanup |
| Session restore | No; reconnect from a user action |
signTransaction() | Yes |
signAndSubmit() | Yes |
signMessage() | Not exposed |
signIn() | Not exposed |
switchNetwork() | Not exposed |
| Payment / NFT transactions | Through generic txJson signing |
| QR / deep link | No |
Options
These options apply to createXyraAdapter(). Pass a configured adapter through the client's adapters option when custom options are needed.
| Option | Type | Default | Description |
|---|---|---|---|
timeoutMs | number | 60000 | Connection and signing timeout in milliseconds |
maxFeeDrops | string | "1000000" | XRPL transaction fee ceiling |
supportedChains | WalletChainFilter | XRPL Mainnet/Testnet | Restrict 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
const result = await manager.signAndSubmit({
txJson: {
TransactionType: "Payment",
Account: account.address,
Destination: "<recipient_address>",
Amount: "1000000",
},
maxFeeDrops: "50000",
});
console.log(result.hash);const result = await manager.signTransaction({
txJson: {
TransactionType: "Payment",
Account: account.address,
Destination: "<recipient_address>",
Amount: "1000000",
},
maxFeeDrops: "50000",
});
console.log(result.txBlob); // Signed, not broadcastThe 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.
await manager.signAndSubmit({
txJson: {
TransactionType: "NFTokenMint",
Account: account.address,
NFTokenTaxon: 0,
Flags: 8, // tfTransferable
},
maxFeeDrops: "50000",
});await manager.signAndSubmit({
txJson: {
TransactionType: "NFTokenCreateOffer",
Account: account.address,
NFTokenID: "<nft_id>",
Amount: "1000000",
Flags: 1, // tfSellNFToken
},
maxFeeDrops: "50000",
});await manager.signAndSubmit({
txJson: {
TransactionType: "NFTokenAcceptOffer",
Account: account.address, // Buyer's account
NFTokenSellOffer: "<sell_offer_id>",
},
maxFeeDrops: "50000",
});await manager.signAndSubmit({
txJson: {
TransactionType: "NFTokenCancelOffer",
Account: account.address, // Offer creator's account
NFTokenOffers: ["<offer_id>"],
},
maxFeeDrops: "50000",
});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-originororigin; avoidno-referrer,noopenerandnoreferrerfor the wallet popup. - If setting COOP, use
Cross-Origin-Opener-Policy: same-origin-allow-popups. Allowdata:in CSPimg-srcfor 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
| Symptom | Action |
|---|---|
| Xyra is missing on XRPL | Add "xyra" explicitly to wallets |
| Popup is blocked | Start the request from a user action and allow popups |
| Wallet cannot identify the dApp origin | Check referrer and opener policies |
| Fee limit is rejected on Xahau | Configure a positive global/request fee ceiling as shown in the Xahau guide |