@xrpl-wallet-kit/browser 0.1.3 → 0.1.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +49 -49
- package/dist/index.js +1 -1
- package/dist/xrpl-wallet-kit-legacy-bridge.js +1 -1
- package/dist/xrpl-wallet-kit.iife.js +299 -14
- package/dist/xrpl-wallet-kit.iife.min.js +47 -47
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -1,49 +1,49 @@
|
|
|
1
|
-
# @xrpl-wallet-kit/browser
|
|
2
|
-
|
|
3
|
-
Browser-ready XRPL Wallet Kit bundle for vanilla JavaScript and legacy HTML sites.
|
|
4
|
-
|
|
5
|
-
## Install
|
|
6
|
-
|
|
7
|
-
```bash
|
|
8
|
-
npm install @xrpl-wallet-kit/browser
|
|
9
|
-
```
|
|
10
|
-
|
|
11
|
-
The package publishes:
|
|
12
|
-
|
|
13
|
-
- `dist/xrpl-wallet-kit.iife.js`
|
|
14
|
-
- `dist/xrpl-wallet-kit.iife.min.js`
|
|
15
|
-
- `dist/xrpl-wallet-kit-legacy-bridge.js`
|
|
16
|
-
|
|
17
|
-
## Basic HTML
|
|
18
|
-
|
|
19
|
-
```html
|
|
20
|
-
<div id="connect-wallet"></div>
|
|
21
|
-
<script src="./xrpl-wallet-kit.iife.min.js"></script>
|
|
22
|
-
<script>
|
|
23
|
-
const kit = window.XRPLWalletKit.createWalletKit({
|
|
24
|
-
appName: "My XRPL App",
|
|
25
|
-
network: "mainnet",
|
|
26
|
-
|
|
27
|
-
walletConnectProjectId: "YOUR_WALLETCONNECT_PROJECT_ID",
|
|
28
|
-
ui: {
|
|
29
|
-
layout: "list",
|
|
30
|
-
themeMode: "light",
|
|
31
|
-
walletConnect: { mode: "default" },
|
|
32
|
-
showWeb3Name: true,
|
|
33
|
-
showBalance: true
|
|
34
|
-
}
|
|
35
|
-
});
|
|
36
|
-
|
|
37
|
-
kit.button.mount("#connect-wallet");
|
|
38
|
-
</script>
|
|
39
|
-
```
|
|
40
|
-
|
|
41
|
-
## Legacy Bridge
|
|
42
|
-
|
|
43
|
-
Use `xrpl-wallet-kit-legacy-bridge.js` when a legacy page needs a smaller integration surface around the browser bundle. The bridge is intended for HTML
|
|
44
|
-
|
|
45
|
-
## Notes
|
|
46
|
-
|
|
47
|
-
- Always inject `walletConnectProjectId` from the host app.
|
|
48
|
-
- Do not put private keys, seeds, or secrets in browser code.
|
|
49
|
-
- Use HTTPS in production for wallet browser APIs and mobile deep links.
|
|
1
|
+
# @xrpl-wallet-kit/browser
|
|
2
|
+
|
|
3
|
+
Browser-ready XRPL Wallet Kit bundle for vanilla JavaScript and legacy HTML sites.
|
|
4
|
+
|
|
5
|
+
## Install
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
npm install @xrpl-wallet-kit/browser
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
The package publishes:
|
|
12
|
+
|
|
13
|
+
- `dist/xrpl-wallet-kit.iife.js`
|
|
14
|
+
- `dist/xrpl-wallet-kit.iife.min.js`
|
|
15
|
+
- `dist/xrpl-wallet-kit-legacy-bridge.js`
|
|
16
|
+
|
|
17
|
+
## Basic HTML
|
|
18
|
+
|
|
19
|
+
```html
|
|
20
|
+
<div id="connect-wallet"></div>
|
|
21
|
+
<script src="./xrpl-wallet-kit.iife.min.js"></script>
|
|
22
|
+
<script>
|
|
23
|
+
const kit = window.XRPLWalletKit.createWalletKit({
|
|
24
|
+
appName: "My XRPL App",
|
|
25
|
+
network: "mainnet",
|
|
26
|
+
autoReconnect: true,
|
|
27
|
+
walletConnectProjectId: "YOUR_WALLETCONNECT_PROJECT_ID",
|
|
28
|
+
ui: {
|
|
29
|
+
layout: "list",
|
|
30
|
+
themeMode: "light",
|
|
31
|
+
walletConnect: { mode: "default" },
|
|
32
|
+
showWeb3Name: true,
|
|
33
|
+
showBalance: true
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
kit.button.mount("#connect-wallet");
|
|
38
|
+
</script>
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
## Legacy Bridge
|
|
42
|
+
|
|
43
|
+
Use `xrpl-wallet-kit-legacy-bridge.js` when a legacy page needs a smaller integration surface around the browser bundle. The bridge is intended for Legacy HTML apps that want to mount the connect button and read wallet state without migrating the whole app at once.
|
|
44
|
+
|
|
45
|
+
## Notes
|
|
46
|
+
|
|
47
|
+
- Always inject `walletConnectProjectId` from the host app.
|
|
48
|
+
- Do not put private keys, seeds, or secrets in browser code.
|
|
49
|
+
- Use HTTPS in production for wallet browser APIs and mobile deep links.
|
package/dist/index.js
CHANGED
|
@@ -217,7 +217,7 @@
|
|
|
217
217
|
walletList: Object.assign({
|
|
218
218
|
layout: 'list',
|
|
219
219
|
wallets: 'all',
|
|
220
|
-
showGroup:
|
|
220
|
+
showGroup: false,
|
|
221
221
|
showInstalledBadge: true
|
|
222
222
|
}, options.walletList || {}),
|
|
223
223
|
walletConnect: Object.assign({ mode: 'default', cta: 'both', qr: { style: 'dots', showLogo: false } }, options.walletConnect || {}),
|