Crossmark Adapter
Crossmark connects through its browser extension SDK for account approval, message signing and transaction submission.
| Integration | Value |
|---|---|
| Package | @xrpl-wallet-kit/adapter-crossmark |
| Adapter ID | crossmark |
| Wallet type | Browser extension |
| Client registration | Included in default XRPL wallet lists |
Installation
npm install @xrpl-wallet-kit/core @xrpl-wallet-kit/adapter-crossmark xrpl@^4For the Client tab below, install @xrpl-wallet-kit/client instead. Enable the Crossmark extension for the dApp.
Connect
import { createWalletKit } from "@xrpl-wallet-kit/client";
const kit = createWalletKit({ network: "mainnet", wallets: ["crossmark"] });
const { manager } = kit;
const { account } = await kit.connect("crossmark");import { WalletManager } from "@xrpl-wallet-kit/core";
import { createCrossmarkAdapter } from "@xrpl-wallet-kit/adapter-crossmark";
const manager = new WalletManager({
network: "mainnet",
adapters: [createCrossmarkAdapter()],
});
const { account } = await manager.connect("crossmark");Call connect from a user action. Crossmark prompts for approval using a fresh random connection challenge; this is not your application's login challenge.
Networks
This adapter targets XRPL. Select the network expected by the dApp in Crossmark. Xahau is not supported by this adapter.
Capabilities
This table describes manager-level operations, not every method the wallet may expose outside Kit.
| Operation | Support |
|---|---|
| Connect | Yes |
| Disconnect | Local Kit cleanup; no provider-level disconnect |
| Session restore | Yes, with a matching passive account |
signTransaction() | Not exposed |
signAndSubmit() | Yes |
signMessage() | Yes; signature proof |
signIn() | Not exposed |
switchNetwork() | Not exposed |
| Payment / NFT transactions | Yes, through txJson |
| QR / deep link | No |
Options
These options apply to createCrossmarkAdapter(). Pass a configured adapter through the client's adapters option when needed.
| Option | Type | Default | Description |
|---|---|---|---|
provider | CrossmarkProvider | Bundled SDK | Supply a compatible Crossmark SDK/provider |
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);Crossmark uses signAndSubmitAndWait(). This adapter does not expose a sign-only operation; do not use manager.signTransaction() for this wallet.
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.
Authentication
const proof = await manager.signMessage({ message: "Verify wallet ownership" });
console.log(proof.signatureKind); // "signature"
console.log(proof.signature, proof.publicKey);The adapter sends the UTF-8 message as hex to Crossmark and returns the compact proof. Verify it on your backend; see Message Authentication. Crossmark's provider method named signInAndWait does not mean Kit exposes native manager.signIn().
Sessions and Disconnect
manager.autoReconnect() restores only when the passive SDK address matches the stored address. It does not open a signing popup.
manager.disconnect() clears the Kit session; extension site permissions remain managed by Crossmark.
Integration Notes
- Connection and message signing both require Crossmark approval; keep connection and backend authentication as separate application steps.
- Signature response shapes vary by SDK version; consume Kit's normalized proof fields rather than raw provider paths.
- Generic transaction signing does not imply Batch support.
Troubleshooting
| Symptom | Action |
|---|---|
| Extension is not detected | Enable Crossmark for the current domain and allow extension injection |
signInAndWait is unavailable | Update the extension/SDK or inspect your injected provider |
| No message proof after approval | Check SDK compatibility; redact sensitive data before reporting a provider response |
| Sign-only fails | Use sign-and-submit; sign-only is not exposed by this adapter |