Add ConnectorKit internal adapter, export WalletSession signer utilities#152
Add ConnectorKit internal adapter, export WalletSession signer utilities#152
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Addresses #151 - exports the WalletSession to TransactionSigner adapter so users can use Codama-generated instructions with wallet sessions.
|
Thanks a lot for the quick response and for addressing this so fast — really appreciate the help and the clean solution 🙏 |
Most likely today on npm (Friday Jan 16th 2026), if not Monday at the latest |
…or IDs Stable ConnectorKit entrypoint: added packages/client/src/connectorkit/index.ts, wired build + d.ts emit, and added @solana/client/connectorkit subpath export in packages/client/package.json. Optional peer dep: moved @solana/connector to peerDependencies (optional via peerDependenciesMeta) while keeping it in devDependencies. SSR safety + readiness semantics: connectorKit() no longer constructs a ConnectorClient when window is missing (returns [] + noop destroy()); isSupported() now respects ConnectorKit ready. Connector-id aliasing + canonical persistence: createWalletRegistry().get() now falls back from "phantom" → wallet-standard:phantom → mwa:phantom, and connectWallet() now stores the canonical connector.id in client state. Docs: updated canonical ID guidance + @solana/client/connectorkit usage in packages/client/README.md and apps/docs/content/docs/client.mdx (plus hook JSDoc in packages/react-hooks/src/hooks.ts). Tests: added coverage for aliasing, SSR safety, readiness gating, canonical connectorId persistence, and createClient().destroy() cleanup.
There was a problem hiding this comment.
Look good, made the entry point available, and added a working example.
I think theres some more i can do on the connector kit side to ingest your patterns better, but thats a problem for another day -- this is a great start to get folks who want certain features that are available in connector to be able to use those with framework kit.
I'd wait for @amilz input if he has anything specific before merging.
|
Confirmed with @amilz that we are good to merge. |
Summary
@solana/client(not yet exposed publicly)react/react-domin the Vite example to avoid invalid hook calls with workspace aliasescreateWalletTransactionSignerand related utilities (fixes Docs request: WalletSession -> TransactionSigner adapter for Codama / @solana/kit #151)New Public Exports
This allows users to adapt a
WalletSessionto aTransactionSignerfor use with Codama-generated instructions.Testing
pnpm testpnpm size(bundle size check passes)