docs: update keychain TypeScript signers#1576
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
5 Skipped Deployments
|
# Conflicts: # apps/docs/content/docs/en/tools/keychain/getting-started/typescript.mdx
Greptile SummaryThis PR updates the Keychain TypeScript docs by migrating all backend examples from deprecated class-based constructors (
Confidence Score: 4/5Safe to merge after fixing one copy-paste error in a code snippet. The third code block in the new Kit client section calls createClient() without importing it, which would produce an immediate compile or runtime error for any developer copying that snippet. Everything else — factory function migrations, Fireblocks async init removal, install instructions — looks correct and consistent with the rest of the file. apps/docs/content/docs/en/tools/keychain/getting-started/typescript.mdx — specifically the 'Already have a SolanaSigner?' code block around line 152. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[Developer wants a signer] --> B{Kit client needed?}
B -- No --> C[createKeychainSigner / create*Signer]
B -- Yes --> D{New signer or existing?}
D -- New --> E["keychainSigner / keychainPayer / keychainIdentity\n(@solana/keychain-kit-plugin)"]
D -- Existing --> F["signer(mySigner)\n(@solana/kit-plugin-signer)"]
C --> G[SolanaSigner]
E --> H["createClient().use(plugin)"]
F --> H
G --> I[signTransactionMessageWithSigners]
H --> J[client.payer / client.identity]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[Developer wants a signer] --> B{Kit client needed?}
B -- No --> C[createKeychainSigner / create*Signer]
B -- Yes --> D{New signer or existing?}
D -- New --> E["keychainSigner / keychainPayer / keychainIdentity\n(@solana/keychain-kit-plugin)"]
D -- Existing --> F["signer(mySigner)\n(@solana/kit-plugin-signer)"]
C --> G[SolanaSigner]
E --> H["createClient().use(plugin)"]
F --> H
G --> I[signTransactionMessageWithSigners]
H --> J[client.payer / client.identity]
Reviews (2): Last reviewed commit: "docs: add @solana/kit-plugin-signer inst..." | Re-trigger Greptile |
Problem
The keychain TypeScript docs used the deprecated class-based signer constructors and lacked a first-class example for the Kit client plugin.
Changes
create*Signerfactory functions (createVaultSigner,createAwsKmsSigner,createPrivySigner,createTurnkeySigner,createFireblocksSigner).createFireblocksSigneris async and inits internally, so the manual.init()call is removed.keychainSigner/keychainPayer/keychainIdentityfrom@solana/keychain-kit-plugin, plus the@solana/kit-plugin-signerpath for an existing signer.@solana/keychain-utilaand@solana/keychain-kit-pluginto the install list.Scope is
/en/only; other locales regenerate on merge.Closes TOO-540