@xrpl-wallet-kit/browser
v0.1.18
Published
Browser-ready XRPL Wallet Kit bundle for vanilla JavaScript and legacy HTML sites.
Maintainers
Readme
@xrpl-wallet-kit/browser
Browser-ready XRPL Wallet Kit bundle for vanilla JavaScript and legacy HTML sites.
Install
npm install @xrpl-wallet-kit/browserThe package publishes:
dist/xrpl-wallet-kit.iife.jsdist/xrpl-wallet-kit.iife.min.jsdist/xrpl-wallet-kit-legacy-bridge.jsoptional compatibility helper
Basic HTML
<div id="connect-wallet"></div>
<script src="./xrpl-wallet-kit.iife.min.js"></script>
<script>
const kit = window.XRPLWalletKit.createWalletKit({
metadata: {
name: "My XRPL App",
description: "Wallet connection for My XRPL App",
url: window.location.origin,
icons: [window.location.origin + "/icon.png"]
},
network: "mainnet",
autoReconnect: true,
walletConnectProjectId: "YOUR_WALLETCONNECT_PROJECT_ID",
ui: {
layout: "list",
themeMode: "light",
walletConnect: { mode: "default" },
showWeb3Name: true,
showBalance: true
}
});
kit.button.mount("#connect-wallet");
</script>Legacy Bridge
Most HTML integrations only need xrpl-wallet-kit.iife.min.js. Use xrpl-wallet-kit-legacy-bridge.js only when an older page needs compatibility helpers around the browser bundle. The bridge is intended for Legacy HTML apps that want to mount beside an existing connect button, map older adapter ids, sync session state into legacy callbacks, or patch an existing wallet facade without migrating the whole app at once.
Notes
- Always inject
walletConnectProjectIdfrom the host app. - Do not put private keys, seeds, or secrets in browser code.
- Use HTTPS in production for wallet browser APIs and mobile deep links.
