@pollar/stellar-wallets-kit-adapter 0.12.0 → 0.12.1-rc.5

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 +16 -24
  2. package/package.json +3 -3
package/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # @pollar/stellar-wallets-kit-adapter
2
2
 
3
- Plug [Stellar Wallets Kit](https://stellarwalletskit.dev) into [`@pollar/core`](../core) as a set of wallet adapters, without `@pollar/core` having to depend on the kit. One install gives Pollar access to **every wallet module the kit supports** — Freighter, Albedo, xBull, Lobstr, Rabet, Hana, Bitget, OneKey, Klever, Fordefi, CactusLink, HotWallet, plus Ledger / Trezor / WalletConnect via opt-in.
3
+ Plug [Stellar Wallets Kit](https://stellarwalletskit.dev) into [`@pollar/core`](https://github.com/pollar-xyz/pollar/tree/main/packages/core) as a set of wallet adapters, without `@pollar/core` having to depend on the kit. One install gives Pollar access to **every wallet module the kit supports** - Freighter, Albedo, xBull, Lobstr, Rabet, Hana, Bitget, OneKey, Klever, Fordefi, CactusLink, HotWallet, plus Ledger / Trezor / WalletConnect via opt-in.
4
4
 
5
5
  The adapters are registered through the `walletAdapters` slot on `PollarClientConfig`. `stellarWalletsKitAdapters()` returns a `WalletAdapter[]` (one adapter per kit module) that you spread into that array alongside any other adapters you register.
6
6
 
@@ -10,7 +10,7 @@ The adapters are registered through the `walletAdapters` slot on `PollarClientCo
10
10
  npm install @pollar/stellar-wallets-kit-adapter @pollar/core @creit.tech/stellar-wallets-kit
11
11
  ```
12
12
 
13
- `@pollar/core` and `@creit.tech/stellar-wallets-kit` are peer dependencies — install whichever versions match the rest of your app. Requires Node 20+ when running in toolchains.
13
+ `@pollar/core` and `@creit.tech/stellar-wallets-kit` are peer dependencies - install whichever versions match the rest of your app. Requires Node 20+ when running in toolchains.
14
14
 
15
15
  ## Quick start
16
16
 
@@ -55,23 +55,11 @@ time (via `ensureInit()`), building one `StellarWalletsKitAdapter` per module up
55
55
  front. It is not lazy - a later `login({ provider })` just routes to the
56
56
  matching adapter that was already built.
57
57
 
58
- > **0.12.0** accepts `@pollar/core@^0.11.2 || ^0.12.0`; no adapter changes.
59
- >
60
- > **0.11.2** requires `@pollar/core@^0.11.2` / `@pollar/react@^0.11.2`. The
61
- > adapter now implements `signStellarMessage` (via `kit.signMessage`), so every
62
- > kit wallet that supports message signing can back a SEP-53 ownership proof
63
- > through `client.stellar.sep53`.
64
- >
65
- > **0.10.0** - switched to the `walletAdapters[]` array model: the factory is now
66
- > `stellarWalletsKitAdapters()` (was `stellarWalletsKit()`) and returns a
67
- > `WalletAdapter[]` for the plural `walletAdapters` config slot instead of a
68
- > single resolver for `walletAdapter`. SSR-safe: returns `[]` when there is no
69
- > `window`.
70
- >
71
- > `connect()` resolves to `{ address }` only, and `network` is **required** (no
72
- > `Networks.TESTNET` default) — the kit is a global singleton, so silently
73
- > picking testnet risks signing real-looking transactions on the wrong chain.
74
- > Pass `Networks.TESTNET` or `Networks.PUBLIC` explicitly.
58
+ > **Compatibility:** `@pollar/core@^0.11.2 || ^0.12.0` (and the matching
59
+ > `@pollar/react`). `network` is **required** (there is no `Networks.TESTNET`
60
+ > default): the kit is a global singleton, so silently picking testnet risks
61
+ > signing real-looking transactions on the wrong chain. Pass `Networks.TESTNET`
62
+ > or `Networks.PUBLIC` explicitly.
75
63
 
76
64
  ## Default wallets
77
65
 
@@ -127,14 +115,14 @@ const client = new PollarClient({
127
115
  });
128
116
  ```
129
117
 
130
- Trimming the default list (e.g. only Freighter + Albedo for a SEP-43 dapp) works the same way — `modules` fully replaces the default when supplied.
118
+ Trimming the default list (e.g. only Freighter + Albedo for a SEP-43 dapp) works the same way - `modules` fully replaces the default when supplied.
131
119
 
132
120
  ## Configuration
133
121
 
134
122
  ```ts
135
123
  interface StellarWalletsKitAdapterOptions {
136
124
  /**
137
- * Stellar network used for signing. **Required** — the kit is a
125
+ * Stellar network used for signing. **Required** - the kit is a
138
126
  * global singleton, so the network must be chosen explicitly to avoid
139
127
  * cross-chain signing accidents.
140
128
  */
@@ -143,7 +131,7 @@ interface StellarWalletsKitAdapterOptions {
143
131
  /**
144
132
  * Wallet modules the kit can drive. Defaults to every module that works
145
133
  * with no extra setup (see "Default wallets"). Passing this option fully
146
- * replaces the default — include modules you want explicitly.
134
+ * replaces the default - include modules you want explicitly.
147
135
  */
148
136
  modules?: ModuleInterface[];
149
137
 
@@ -205,6 +193,10 @@ The adapter implements `WalletAdapter` from `@pollar/core`:
205
193
  | `getPublicKey()` | `StellarWalletsKit.getAddress()` |
206
194
  | `signTransaction(xdr, opts)` | `setWallet(id)` > `signTransaction(xdr, opts)` |
207
195
  | `signAuthEntry(xdr, opts)` | `setWallet(id)` > `signAuthEntry(xdr, opts)` |
196
+ | `signStellarMessage(msg)` | `setWallet(id)` > `signMessage(msg, opts)` |
197
+
198
+ `signStellarMessage` lets every kit wallet that supports message signing back a
199
+ SEP-53 ownership proof through `client.stellar.sep53.signMessage(...)`.
208
200
 
209
201
  `setWallet` is called before every signing/connect operation so a single
210
202
  `StellarWalletsKit.init({ modules })` covers many wallets. `stellarWalletsKitAdapters()`
@@ -215,7 +207,7 @@ module under the hood.
215
207
  ## Login UI
216
208
 
217
209
  The wallets you register via `stellarWalletsKitAdapters({ network })` render
218
- automatically inside Pollar's `LoginModal` — one button per wallet, collapsed
210
+ automatically inside Pollar's `LoginModal` - one button per wallet, collapsed
219
211
  behind a single "Wallet" gateway button (their shared `meta.group`). Pass
220
212
  `picker.groupLabel` to give them a distinct gateway, or `picker.labels` to
221
213
  override individual button labels.
@@ -275,7 +267,7 @@ new PollarClient({
275
267
 
276
268
  ## Fallback behaviour
277
269
 
278
- If `walletAdapters` is omitted from `PollarClientConfig`, `@pollar/core` falls back to its built-in `FreighterAdapter` / `AlbedoAdapter`. Installing this package is opt-in - existing apps keep working without changes until they add adapters to the slot.
270
+ If `walletAdapters` is omitted from `PollarClientConfig`, `@pollar/core` falls back to its built-in `FreighterAdapter` / `AlbedoAdapter`. Installing this package is opt-in: an app that does not fill the slot keeps the built-in wallets.
279
271
 
280
272
  ## License
281
273
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pollar/stellar-wallets-kit-adapter",
3
- "version": "0.12.0",
3
+ "version": "0.12.1-rc.5",
4
4
  "license": "Apache-2.0",
5
5
  "repository": {
6
6
  "type": "git",
@@ -39,12 +39,12 @@
39
39
  },
40
40
  "peerDependencies": {
41
41
  "@creit.tech/stellar-wallets-kit": "^2.0.0",
42
- "@pollar/core": "^0.11.2 || ^0.12.0"
42
+ "@pollar/core": "^0.11.2 || ^0.12.0 || ^0.12.1-rc.5"
43
43
  },
44
44
  "devDependencies": {
45
45
  "@creit.tech/stellar-wallets-kit": "^2.3.0",
46
46
  "@eslint/js": "^10.0.1",
47
- "@pollar/core": "^0.12.0",
47
+ "@pollar/core": "^0.12.1-rc.5",
48
48
  "eslint": "^10.5.0",
49
49
  "tsup": "^8.5.1",
50
50
  "typescript": "^6.0.3",