DropFi Adapter
DropFi connects through its browser extension or the injected provider inside the DropFi mobile app's browser. Both use the same adapter.
| Integration | Value |
|---|---|
| Package | @xrpl-wallet-kit/adapter-dropfi |
| Adapter ID | dropfi |
| Wallet type | Browser extension / mobile in-app browser |
| Client registration | Included in default XRPL wallet lists |
Installation
npm install @xrpl-wallet-kit/core @xrpl-wallet-kit/adapter-dropfi xrpl@^4For the Client tab below, install @xrpl-wallet-kit/client instead. Mobile users must open the dApp inside DropFi's built-in browser.
Connect
import { createWalletKit } from "@xrpl-wallet-kit/client";
const kit = createWalletKit({ network: "mainnet", wallets: ["dropfi"] });
const { manager } = kit;
const { account } = await kit.connect("dropfi");import { WalletManager } from "@xrpl-wallet-kit/core";
import { createDropFiAdapter } from "@xrpl-wallet-kit/adapter-dropfi";
const manager = new WalletManager({
network: "mainnet",
adapters: [createDropFiAdapter()],
});
const { account } = await manager.connect("dropfi");Start connect from a user action. The adapter initializes the provider and opens DropFi's approval UI: an extension popup on desktop or an approval sheet in the mobile app.
Networks
Supports the standard XRPL mainnet, testnet and devnet networks, including manager.switchNetwork() when connected. Xahau is not supported by this adapter.
Capabilities
The extension and mobile in-app provider use the same manager operations.
| Operation | Support |
|---|---|
| Connect | Yes |
| Disconnect | Yes; provider disconnect when available, otherwise local cleanup |
| Session restore | Yes, with a matching passive account |
signTransaction() | Not exposed |
signAndSubmit() | Yes |
signMessage() | Yes; signature proof |
signIn() | Not exposed |
switchNetwork() | Yes, for supported XRPL networks |
| Payment / NFT transactions | Yes, through txJson |
| QR / deep link | Not exposed; mobile uses the in-app browser |
Options
These options apply to createDropFiAdapter(). Pass a configured adapter through the client's adapters option when needed.
| Option | Type | Default | Description |
|---|---|---|---|
provider | DropFiProvider | Detected provider | Supply a specific DropFi provider |
icon | string | Embedded DropFi icon | Custom icon URL or data URI |
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);DropFi uses sendTransaction(). This adapter does not expose sign-only; do not call 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);DropFi returns a compact signature and public key. Missing proof fields are rejected; do not fall through to another signing prompt after approval. Use server-side challenge verification as described in Message Authentication. Native signIn() is not exposed.
Sessions and Disconnect
manager.autoReconnect() initializes passive provider state and restores only a matching current address, without a fresh approval prompt. This applies to the extension and mobile in-app browser.
manager.disconnect() clears Kit state and calls the provider's disconnect method when available.
Integration Notes
Provider Detection
Provider lookup uses options.provider, then window.__xwk_dropfi, window.dropfi and the official window.xrpl injection point. The fallback must pass the DropFi feature guard so xrpl.js or another wallet is not mistaken for DropFi. Preserve the provider through an alias or pass it explicitly if another script overwrites window.xrpl.
Network Switching
if (manager.can("switchNetwork", "dropfi")) {
await manager.switchNetwork("testnet");
}The manager checks network support and updates the active session after switching. Mobile users browsing in external Safari/Chrome will not have the DropFi injected provider.
Troubleshooting
| Symptom | Action |
|---|---|
| Mobile wallet is not detected | Open the dApp inside DropFi's in-app browser |
Another wallet takes over window.xrpl | Pass the DropFi provider explicitly or preserve its alias |
| Restore fails after reload | Check that the provider has hydrated and still reports the same address |
| Sign-only is unavailable | Use sign-and-submit; sign-only is not exposed by this adapter |