@lydianpay/lydianconnect-catalog 1.2.0 → 1.2.1

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.
Files changed (2) hide show
  1. package/README.md +39 -47
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -1,55 +1,13 @@
1
1
  # @lydianpay/lydianconnect-catalog
2
2
 
3
- The canonical list of wallets supported by Lydian Connect `id`, display
4
- `name`, and `iconUrl`. A tiny, **zero-dependency** package so any app can render
5
- a wallet picker without pulling in wallet-connection dependencies.
6
-
7
- ## Install
8
-
9
- ```bash
10
- npm install @lydianpay/lydianconnect-catalog
11
- ```
12
-
13
- ## Usage
14
-
15
- ```ts
16
- import { WALLET_CATALOG, getWalletCatalog, walletName } from '@lydianpay/lydianconnect-catalog';
17
- import type { WalletCatalogEntry } from '@lydianpay/lydianconnect-catalog';
18
-
19
- WALLET_CATALOG.map((w) => ({ id: w.id, label: w.name, icon: w.iconUrl }));
20
- // [{ id: 'okx', label: 'OKX', icon: 'https://wallet-assets.lydian.com/wallets/okx.png' }, ...]
21
-
22
- walletName('cryptocom'); // 'Crypto.com'
23
- ```
24
-
25
- ## API
26
-
27
- | Export | Description |
28
- |--------|-------------|
29
- | `WALLET_CATALOG` | `readonly WalletCatalogEntry[]` — the full list. |
30
- | `getWalletCatalog()` | A fresh, mutable copy of the list. |
31
- | `walletName(id)` | Display name for a wallet id, or `undefined`. |
32
- | `WalletCatalogEntry` | `{ id: string; name: string; iconUrl: string; namespaces: WalletNamespace[] }`. |
33
-
34
- `id` matches the value passed to `LydianConnect.connect({ walletId })` in
35
- `@lydianpay/lydianconnect`. `iconUrl` is derived from the id:
36
- `https://wallet-assets.lydian.com/wallets/{id}.png`.
37
-
38
- ## Adding a wallet
39
-
40
- 1. Add an entry (`id` + `name`) to the `WALLETS` array in `src/index.ts`; the
41
- `iconUrl` is derived automatically.
42
- 2. Keep the id set in sync with the wallets `@lydianpay/lydianconnect` can
43
- connect to — a wallet offered here must be connectable there.
44
- 3. Make sure the wallet's icon is available at its derived `iconUrl`.
45
- 4. Run `UPDATE_README=1 npx vitest run readme-table` to refresh the table below
46
- (a test fails if it drifts from the catalog).
3
+ The canonical list of wallets supported by Lydian Connect. A tiny, **zero-dependency**
4
+ package so any app can render a wallet picker without pulling in wallet-connection
5
+ dependencies.
47
6
 
48
7
  ## Supported wallets
49
8
 
50
- The canonical list, rendered from `WALLET_CATALOG`. **`id`** is the value you pass
51
- to `LydianConnect.connect({ walletId })`; **Connects on** is the CAIP-2 namespace
52
- families the wallet can connect on.
9
+ **`id`** is the value you pass to `LydianConnect.connect({ walletId })`; **Connects on**
10
+ is the CAIP-2 namespace families the wallet can connect on.
53
11
 
54
12
  <!-- BEGIN WALLET TABLE -->
55
13
 
@@ -111,3 +69,37 @@ families the wallet can connect on.
111
69
 
112
70
  <!-- END WALLET TABLE -->
113
71
 
72
+ ## Install
73
+
74
+ ```bash
75
+ npm install @lydianpay/lydianconnect-catalog
76
+ ```
77
+
78
+ ## Usage
79
+
80
+ ```ts
81
+ import { WALLET_CATALOG, getWalletCatalog, walletName } from '@lydianpay/lydianconnect-catalog';
82
+ import type { WalletCatalogEntry } from '@lydianpay/lydianconnect-catalog';
83
+
84
+ WALLET_CATALOG.map((w) => ({ id: w.id, label: w.name, icon: w.iconUrl }));
85
+ // [{ id: 'okx', label: 'OKX', icon: 'https://wallet-assets.lydian.com/wallets/okx.png' }, ...]
86
+
87
+ walletName('cryptocom'); // 'Crypto.com'
88
+ ```
89
+
90
+ ## API
91
+
92
+ | Export | Description |
93
+ |--------|-------------|
94
+ | `WALLET_CATALOG` | `readonly WalletCatalogEntry[]` — the full list. |
95
+ | `getWalletCatalog()` | A fresh, mutable copy of the list. |
96
+ | `walletName(id)` | Display name for a wallet id, or `undefined`. |
97
+ | `WalletCatalogEntry` | `{ id: string; name: string; iconUrl: string; namespaces: WalletNamespace[] }`. |
98
+
99
+ `id` matches the value passed to `LydianConnect.connect({ walletId })` in
100
+ `@lydianpay/lydianconnect`. `iconUrl` is derived from the id:
101
+ `https://wallet-assets.lydian.com/wallets/{id}.png`.
102
+
103
+ ## Adding a wallet
104
+
105
+ Please email the Lydian team at engineering@lydian.com to have your wallet included.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@lydianpay/lydianconnect-catalog",
3
- "version": "1.2.0",
3
+ "version": "1.2.1",
4
4
  "description": "Canonical list of wallets the Lydian checkout supports — id + display name, zero dependencies.",
5
5
  "type": "module",
6
6
  "license": "MIT",