[DO NOT MERGE] sol sdk examples#2476
Draft
jakehobbs wants to merge 37 commits into
Draft
Conversation
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
… utils - Replace hand-rolled hexToBytes/bytesToBase58 with viem hexToBytes and ox Base58.fromBytes - Add type guards (isSolanaChain, isSolanaResponse, isEvmResponse) instead of casts - Prefix all Solana action logs with solana: namespace - Add mergeSolanaClientCapabilities for client-level policyId merging - Fix solanaSmartWalletActions decorator to use InnerSolanaWalletApiClient Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…plify signer interface - Add Solana-specific getCallsStatus/waitForCallsStatus (viem's versions fail on non-hex chainId) - Simplify SolanaSigner to signTransaction/signMessage (SDK extracts message bytes from serialized tx) - Use TypeBox decode with Solana-specific schemas instead of decoding full union - Add e2e test script for Solana devnet flow - Update wallet-api-types to 0.1.0-local.1 (adds SolanaGetCallsStatusResponse schema) Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…for Solana + add Privy example SolanaSigner is now a union of three signer types — wallet standard (Privy, Phantom), @solana/kit TransactionPartialSigner, and raw Ed25519 message signers. The SDK auto-detects via type guards and handles signature extraction internally. Privy's ConnectedStandardSolanaWallet plugs in directly with no adapter. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…all 3 signer paths - Dynamically import @solana/kit to decode raw tx bytes into Transaction objects for the TransactionPartialSigner path (keeps @solana/kit optional) - Update e2e test to exercise both TransactionPartialSigner (@solana/kit KeyPairSigner) and MessageSigner (raw Ed25519) paths - Wallet standard path tested via Privy example app Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…ainId → chain Align with updated wallet-api-types@local.2 which uses solana:devnet / solana:mainnet instead of solana-devnet / solana-mainnet. Rename client factory param from chainId to chain to match EVM client convention. Add raw RPC e2e test. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Single factory with overloads that discriminates on chain type — pass a Chain object for EVM or a SolanaChainId string for Solana and get the correct return type. Adds address validation (hex for EVM, base58 for Solana), fixes the solanaAccount override bug where factory-level account was ignored in Solana actions, and removes the hex type lie by making BaseWalletClient generic over the account type (Solana clients now have account: undefined + solanaAccount: string). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
- Add SOLANA_DOGFOODING.md with setup instructions for all 3 test paths (SDK client e2e, raw JSON-RPC e2e, Privy + Next.js example) - Include full JSON-RPC request/response examples for each wallet method - Add verbose req/res console.log to solana-raw-rpc-e2e.ts - Update privy example to use published @alchemy/wallet-apis@0.1.0-alpha.28 Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Moved to jake/v5/sol-examples branch for dogfooding. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…on functions Reduce exported types to only what consumers need (drop BaseWalletClient, SignerClient, SolanaSigner), export Solana action functions with solana* prefix for parity with EVM, and reorder types.ts for clarity. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…en-narrow Solana actions were using a separate decodeSolanaResponse that bypassed the union schema. Now they use the same decode + type guard pattern as EVM, and decodeSolanaResponse is removed. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Prove all 3 signer adapters (fromKeypair, fromKitSigner, raw SolanaStandardSigner) produce identical signatures, then use the simplest (fromKeypair) for e2e tests covering sendCalls, prepare/sign/send flow, and status polling. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…pters Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…mple Resolve delete-vs-modify conflicts by keeping test scripts and example app. Update solana-e2e.ts to use fromKeypair/fromKitSigner adapters instead of removed SolanaMessageSigner/SolanaTransactionPartialSigner types. Update privy example to use workspace dependency. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Wiz Scan Summary
To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension. |
…olana e2e tests Replace hardcoded private key with a randomly generated keypair and use the idiomatic @solana/kit signer path instead of manual crypto.subtle.sign. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
…dd fromWalletAdapter adapter The "Standard" in the name falsely implied it was the wallet-standard interface when it's actually a simplified signer contract. Also adds fromWalletAdapter for @solana/wallet-adapter-react and injected providers (Phantom, etc.), with equivalence test coverage for all four adapter paths. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lana subpath Solana actions, adapters, and decorator now live under /solana instead of being prefixed (solanaPrepareCalls → prepareCalls) in the main entrypoint. Removes solana-adapters subpath (folded into /solana). Adds JSDoc to the shared createSmartWalletClient factory. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
# Conflicts: # pnpm-lock.yaml
…s, and fromWalletAdapter usage Move the full API shape (types, request/response schemas, real devnet payloads) to the top of the doc, followed by the signer interface and adapter table, then the five runnable examples. Also pick up fromWalletAdapter refactor in phantom-raw and SolanaSigner rename in wallet-standard page. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…, and zero-dep signing example Restructure for Notion readability: use ? for optionals, strip wide comments, add real wallet_prepareCalls example, inline signer adapter snippets showing where each signer comes from, and a zero-dependency Ed25519 signing section for non-JS consumers. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Adds wallet-standard support, lazy-loads peer deps (@solana/kit, @solana/web3.js), validates signature length, uses @solana/kit's isAddress for Solana address validation, and fixes chainId-based response narrowing in getCallsStatus. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…generate docs Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…inline signer construction Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Pull Request Checklist
yarn test)sitefolder, and guidelines for updating/adding docs can be found in the contribution guide)feat!: breaking change)yarn lint:check) and fix any issues? (yarn lint:write)PR-Codex overview
This PR primarily focuses on enhancing the documentation and type definitions across various modules, improving clarity and consistency in function signatures, type aliases, and error classes.
Detailed summary
BaseError.examples/solana-privy.