Skip to content

Crossmark Adapter ​

Crossmark connects through its browser extension SDK for account approval, message signing and transaction submission.

IntegrationValue
Package@xrpl-wallet-kit/adapter-crossmark
Adapter IDcrossmark
Wallet typeBrowser extension
Client registrationIncluded in default XRPL wallet lists

Installation ​

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

For the Client tab below, install @xrpl-wallet-kit/client instead. Enable the Crossmark extension for the dApp.

Connect ​

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

const kit = createWalletKit({ network: "mainnet", wallets: ["crossmark"] });
const { manager } = kit;
const { account } = await kit.connect("crossmark");
ts
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.

OperationSupport
ConnectYes
DisconnectLocal Kit cleanup; no provider-level disconnect
Session restoreYes, with a matching passive account
signTransaction()Not exposed
signAndSubmit()Yes
signMessage()Yes; signature proof
signIn()Not exposed
switchNetwork()Not exposed
Payment / NFT transactionsYes, through txJson
QR / deep linkNo

Options ​

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

OptionTypeDefaultDescription
providerCrossmarkProviderBundled SDKSupply 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 ​

ts
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.

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.

Authentication ​

ts
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 ​

SymptomAction
Extension is not detectedEnable Crossmark for the current domain and allow extension injection
signInAndWait is unavailableUpdate the extension/SDK or inspect your injected provider
No message proof after approvalCheck SDK compatibility; redact sensitive data before reporting a provider response
Sign-only failsUse sign-and-submit; sign-only is not exposed by this adapter

Released under the MIT License.