Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
36 commits
Select commit Hold shift + click to select a range
f4407da
Implement kit-plugin-wallet store, types, and tests
mcintyre94 Apr 7, 2026
23eb8bc
Add changeset, document in list of plugins
mcintyre94 Apr 13, 2026
4a2206d
Address review feedback for wallet plugin
mcintyre94 Apr 14, 2026
5f26980
Address second round of review feedback
mcintyre94 Apr 14, 2026
bd93e0b
Refactor to use ClientWithPayer and ClientWithIdentity
mcintyre94 Apr 15, 2026
67906d9
Cast chain to SolanaChain when creating wallet signer
mcintyre94 Apr 17, 2026
7452f21
Address review comments
mcintyre94 Apr 20, 2026
47c1cfe
Add abort signal to async wallet actions
mcintyre94 Apr 23, 2026
42e7887
Fix lint
mcintyre94 Jun 9, 2026
c2d9aac
Refine selectAccount, persistence, and concurrency edge cases
mcintyre94 Jun 9, 2026
2ef7dde
Update package.json scripts to match other plugins
mcintyre94 Jun 10, 2026
d509997
Bump to Kit 6.9.0, use new SolanaError codes
mcintyre94 Jun 10, 2026
05cf269
Rename deprecated imports from wallet-standard/ui-registry
mcintyre94 Jun 10, 2026
ce19a0b
Remove now unneeded cast from createSignerFromWalletAccount call
mcintyre94 Jun 10, 2026
2289e15
fixup! Rename deprecated imports from wallet-standard/ui-registry
mcintyre94 Jun 10, 2026
f5db399
Handle missing signIn feature + no-op wallet change events
mcintyre94 Jun 10, 2026
c96d700
fix disconnect during auto-reconnect
mcintyre94 Jun 10, 2026
3897f70
Handle error from reading localStorage global
mcintyre94 Jun 10, 2026
3b8cfca
Improve handling of wallet unregistering
mcintyre94 Jun 10, 2026
8968e65
Better handle reverting to previous connection when a connect fails
mcintyre94 Jun 10, 2026
2796903
Resolve signMessage against the account, not the wallet
mcintyre94 Jun 10, 2026
d2f705f
Avoid re-rendering if the filtered wallet list is unchanged after un/…
mcintyre94 Jun 10, 2026
d6e3094
Throw if connect/signIn becomes unavailable/does not succeed
mcintyre94 Jun 10, 2026
3682d1a
Improve test coverage
mcintyre94 Jun 10, 2026
b2ebcdd
Avoid auto-connect after store is disposed
mcintyre94 Jun 10, 2026
74e9298
Fix disconnect not superseding an inflight connect/signIn
mcintyre94 Jun 10, 2026
272fc0e
Reconcile wallet list inn change events
mcintyre94 Jun 10, 2026
4446a5d
Move @wallet-standard/errors to dev dependency
mcintyre94 Jun 12, 2026
1a3865a
Make SSR no-op use rejected promises
mcintyre94 Jun 12, 2026
9986851
nit updates
mcintyre94 Jun 12, 2026
375496f
Protect against reconnecting to a disconnecting wallet
mcintyre94 Jun 12, 2026
13a5140
Bump connect generation in selectAccount
mcintyre94 Jun 12, 2026
3d04a58
Resolve connect feature at the start of connect
mcintyre94 Jun 12, 2026
079bd44
Persist in attemptSilentReconnect if address has changed
mcintyre94 Jun 12, 2026
a6e8c3b
Docblock nits
mcintyre94 Jun 12, 2026
0a1f210
Fix race conditions in selectAccount
mcintyre94 Jun 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/busy-clowns-stick.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@solana/kit-plugin-wallet': minor
---

Add `walletSigner`, `walletIdentity`, `walletPayer`, and `walletWithoutSigner` plugins for framework-agnostic wallet management using wallet-standard. Provides wallet discovery, connection lifecycle, signer creation, auto-connect persistence, subscribable state for UI frameworks, and dynamic payer/identity integration.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note to self: make this changeset more of a new plugin announcement, with code examples

1 change: 1 addition & 0 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This is a monorepo managed with [pnpm](https://pnpm.io/) and [Turborepo](https:/
| [`@solana/kit-plugin-signer`](./packages/kit-plugin-signer) | Signer, payer, and identity plugins. |
| [`@solana/kit-plugin-litesvm`](./packages/kit-plugin-litesvm) | LiteSVM support plugin. |
| [`@solana/kit-plugin-instruction-plan`](./packages/kit-plugin-instruction-plan) | Transaction planning and execution plugins. |
| [`@solana/kit-plugin-wallet`](./packages/kit-plugin-wallet) | Browser wallet support plugins. |

The repo also contains a deprecated umbrella package (`@solana/kit-plugins`) and several deprecated single-purpose packages (`@solana/kit-plugin-payer`, `@solana/kit-plugin-airdrop`, `@solana/kit-client-rpc`, `@solana/kit-client-litesvm`). They re-export from the active packages via `export *` for backward compatibility, but new code should import from the individual `kit-plugin-*` packages above directly.

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,7 @@ This repo provides the following individual plugin packages. You can learn more
| [`@solana/kit-plugin-signer`](./packages/kit-plugin-signer) | [![npm](https://img.shields.io/npm/v/@solana/kit-plugin-signer.svg?style=flat)](https://www.npmjs.com/package/@solana/kit-plugin-signer) | Signer, payer, and identity plugins | `signer`, `payer`, `identity`, `signerFromFile`, `payerFromFile`, `identityFromFile`, `generatedSigner`, `generatedPayer`, `generatedIdentity`, `generatedSignerWithSol`, `generatedPayerWithSol`, `generatedIdentityWithSol`, `airdropSigner`, `airdropPayer`, `airdropIdentity` |
| [`@solana/kit-plugin-litesvm`](./packages/kit-plugin-litesvm) | [![npm](https://img.shields.io/npm/v/@solana/kit-plugin-litesvm.svg?style=flat)](https://www.npmjs.com/package/@solana/kit-plugin-litesvm) | LiteSVM support | `litesvm`, `litesvmConnection`, `litesvmAirdrop`, `litesvmGetMinimumBalance`, `litesvmTransactionPlanner`, `litesvmTransactionPlanExecutor` |
| [`@solana/kit-plugin-instruction-plan`](./packages/kit-plugin-instruction-plan) | [![npm](https://img.shields.io/npm/v/@solana/kit-plugin-instruction-plan.svg?style=flat)](https://www.npmjs.com/package/@solana/kit-plugin-instruction-plan) | Transaction planning and execution | `transactionPlanner`, `transactionPlanExecutor`, `planAndSendTransactions` |
| [`@solana/kit-plugin-wallet`](./packages/kit-plugin-wallet) | [![npm](https://img.shields.io/npm/v/@solana/kit-plugin-wallet.svg?style=flat)](https://www.npmjs.com/package/@solana/kit-plugin-wallet) | Browser wallet support | `walletSigner`, `walletIdentity`, `walletPayer`, `walletWithoutSigner` |

## Community Plugins

Expand Down
14 changes: 14 additions & 0 deletions packages/kit-plugin-wallet/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,18 @@ All wallet state is accessed via `client.wallet.getState()`, which returns a ref
const accounts = await client.wallet.connect(selectedWallet);
```

A successful call resolves only once the wallet is connected; any failure rejects. Connecting to a different wallet keeps the current one connected until the new connection succeeds — so if the attempt fails (the user declines the prompt, the wallet authorizes no accounts, or it becomes unavailable), the previous connection is left untouched rather than torn down. The same holds for `signIn`, which rejects rather than resolving with its sign-in output when the connection can't be established. While the attempt is in flight, `status` is `'connecting'` but `getState().connected` still describes the existing connection.

If another `connect` or `signIn` starts before this one resolves (e.g. an accidental double-click), the newer request wins and owns the connection — the superseded call rejects with a `DOMException` whose `name` is `'AbortError'`. Ignore it the way you'd ignore any aborted operation:

```ts
try {
await client.wallet.connect(selectedWallet);
} catch (e) {
if ((e as Error).name !== 'AbortError') throw e; // a real failure
}
```

- **`disconnect()`** — Disconnect the active wallet.

- **`selectAccount(account)`** — Switch to a different account within an already-authorized wallet without reconnecting.
Expand Down Expand Up @@ -234,6 +246,8 @@ By default the plugin uses `localStorage` to remember the last connected wallet

All four wallet plugins are safe to include in a shared client that runs on both server and browser. On the server, `status` stays `'pending'` permanently, all actions throw, and no registry listeners or storage reads are made. In the browser the plugin initializes normally.

React Native is treated the same way as the server: wallet-standard browser discovery is not available, so the plugin returns the same inert stub (`status` stays `'pending'`, actions throw). Native wallet integration would need a different discovery mechanism and is out of scope for this plugin.

```ts
const client = createClient()
.use(solanaRpc({ rpcUrl: 'https://api.mainnet-beta.solana.com' }))
Expand Down
13 changes: 7 additions & 6 deletions packages/kit-plugin-wallet/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,26 +49,27 @@
"scripts": {
"build": "rimraf dist && tsup && tsc -p ./tsconfig.declarations.json",
"dev": "vitest --project node",
"lint": "eslint . && prettier --check .",
"lint:fix": "eslint --fix . && prettier --write .",
"test": "pnpm test:types && pnpm test:treeshakability",
"test": "pnpm test:types && pnpm test:treeshakability && pnpm test:unit",
"test:treeshakability": "for file in dist/index.*.mjs; do agadoo $file; done",
"test:types": "tsc --noEmit"
"test:types": "tsc --noEmit",
"test:unit": "vitest run"
},
"dependencies": {
"@solana/wallet-account-signer": "^6.9.0",
"@solana/wallet-standard-chains": "^1.1.1",
"@solana/wallet-standard-features": "^1.3.0",
"@wallet-standard/app": "^1.1.1",
"@wallet-standard/base": "^1.1.1",
"@wallet-standard/errors": "^0.1.2",
"@wallet-standard/features": "^1.1.1",
"@wallet-standard/ui": "^1.0.3",
"@wallet-standard/ui-features": "^1.0.3",
"@wallet-standard/ui-registry": "^1.1.1"
},
"devDependencies": {
"@wallet-standard/errors": "^0.1.2"
},
"peerDependencies": {
"@solana/kit": "^6.6.0"
"@solana/kit": "^6.9.0"
},
"browserslist": [
"supports bigint and not dead",
Expand Down
Loading
Loading