npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@xrpl-wallet-kit/adapter-dropfi

v0.1.5

Published

DropFi adapter for XRPL Wallet Kit.

Readme

@xrpl-wallet-kit/adapter-dropfi

DropFi adapter for XRPL Wallet Kit.

DropFi is an injected XRPL wallet provider. This adapter detects the provider, normalizes connection state, and maps message signing plus transaction submission into the XRPL Wallet Kit adapter contract.

Capabilities

  • connect
  • disconnect
  • signMessage
  • signAndSubmit
  • payments
  • nftOffers

Install

npm install @xrpl-wallet-kit/adapter-dropfi

Usage

import { createWalletKit } from "@xrpl-wallet-kit/client";
import { createDropFiAdapter } from "@xrpl-wallet-kit/adapter-dropfi";

const kit = createWalletKit({
  adapters: [createDropFiAdapter()]
});

When using @xrpl-wallet-kit/client defaults, DropFi is already included.

Runtime Notes

  • The adapter looks for DropFi in this order: an explicit provider option, window.__xwk_dropfi, window.dropfi, then the legacy window.xrpl namespace.
  • The legacy window.xrpl fallback is accepted only when it exposes DropFi-like wallet fields. This avoids treating the standard xrpl.js browser global as a wallet provider.
  • DropFi's official web injection script exposes window.xrpl with connect, disconnect, signMessage, sendTransaction, switchNetwork, changeAccount, initialize, and isConnected.
  • DropFi's official provider state includes selectedAddress, connectedAccounts, selectedNetwork, network, and endpoint.
  • DropFi emits provider events such as xrpl_selectedAddress, xrpl_connectedAccounts, xrpl_selectedNetwork, and xrpl_disconnect.
  • connect() supports provider initialization, passive account reads, and provider-driven connect flows.
  • restoreSession() is intentionally passive: it reads current provider state and restores only when the passive address matches the stored session address.
  • isConnected() === false is not treated as final during reload hydration when a matching passive address is already available.
  • disconnect() is best-effort and bounded by a timeout so stale provider cleanup does not block the app.
  • Transaction responses are normalized with normalizeTxResult().

Message Signing

DropFi signMessage(message) signs the exact UTF-8 message string and returns a compact signature result:

const result = await window.xrpl.signMessage(message);
// { signature: string, publicKey: string }

The adapter maps this to:

{
  signatureKind: "signature",
  proof: result.signature,
  signature: result.signature,
  publicKey: result.publicKey,
  raw: result
}

publicKey is required. Server-side verification needs the original message string, the returned signature, and the returned publicKey. The server should convert the UTF-8 message to hex before calling ripple-keypairs.verify(messageHex, signature, publicKey).

Do not treat DropFi like GemWallet's { result: { signedMessage } } shape. If DropFi returns no signature or no public key, the adapter raises SIGN_REJECTED so apps do not fall through to another signing method after the user has already seen a wallet prompt.

Auto Reconnect

DropFi can expose account state through multiple passive surfaces, including selectedAddress, connected account arrays, and address getters. The adapter uses those passive address signals to verify a stored session after reload.

Some injected providers report isConnected() === false briefly while the extension is hydrating, even though the selected address is already available. For that reason, a matching passive address is the restore authority. A missing or mismatched address still returns null.

restoreSession() does not call connect(), open wallet UI, or request user approval.

Testing

Pass a mock provider for isolated tests:

import { assertWalletAdapter } from "@xrpl-wallet-kit/core";
import { createDropFiAdapter } from "@xrpl-wallet-kit/adapter-dropfi";

assertWalletAdapter(createDropFiAdapter({ provider: mockDropFi }));

Links

  • DropFi web injection script: https://www.dropfi.app/docs/dropfi-web-injection-script
  • DropFi authentication with message hashing: https://www.dropfi.app/docs/authentication-with-message-hashing
  • XRPL Wallet Kit: https://github.com/XRPDomains/xrpl-wallet-kit