Skip to content

feat(wallet-apis): add solana support#2473

Open
jakehobbs wants to merge 22 commits intov5.x.xfrom
jake/v5/sol
Open

feat(wallet-apis): add solana support#2473
jakehobbs wants to merge 22 commits intov5.x.xfrom
jake/v5/sol

Conversation

@jakehobbs
Copy link
Copy Markdown
Collaborator

@jakehobbs jakehobbs commented Apr 24, 2026

Pull Request Checklist


PR-Codex overview

This PR primarily focuses on updating various documentation files related to the wallet APIs and smart accounts, enhancing type definitions, and refining function signatures for better clarity and consistency.

Detailed summary

  • Deleted several .mdx files related to SignerClient and BaseWalletClient.
  • Updated type definitions in multiple .mdx files, including HookType, PermissionType, and SignaturePrefix.
  • Enhanced function signatures for clarity in several functions, such as signMessage, prepareSign, and getModularAccountV2AddressFromFactoryData.
  • Improved error handling documentation for classes extending BaseError.
  • Refined comments in the smartWalletActions decorator for better understanding.
  • Adjusted formatting in various type alias definitions for consistency.

The following files were skipped due to too many changes: docs/pages/reference/smart-accounts/src/variables/multiOwnerLightAccountStaticImplV2_0_0.mdx, docs/pages/reference/smart-accounts/src/type-aliases/BaseMaV1AccountImplementation.mdx, docs/pages/reference/smart-accounts/src/functions/deferralActions.mdx, docs/pages/reference/wallet-apis/src/exports/type-aliases/PrepareCallsResult.mdx, docs/pages/reference/smart-accounts/src/type-aliases/UninstallValidationParams.mdx, docs/pages/reference/smart-accounts/src/type-aliases/InstallValidationParams.mdx, docs/pages/reference/smart-accounts/src/type-aliases/LightAccount.mdx, docs/pages/reference/wallet-apis/src/exports/functions/signTypedData.mdx, docs/pages/reference/wallet-apis/src/exports/functions/signSignatureRequest.mdx, docs/pages/reference/smart-accounts/src/type-aliases/StaticSmartAccountImplementation.mdx, packages/wallet-apis/package.json, docs/pages/reference/wallet-apis/src/exports/type-aliases/SignPreparedCallsResult.mdx, packages/wallet-apis/src/utils/assertions.ts, docs/pages/reference/smart-accounts/src/classes/PermissionBuilder.mdx, docs/pages/reference/smart-accounts/src/type-aliases/LightAccountAbi.mdx, docs/pages/reference/README.mdx, docs/pages/reference/wallet-apis/src/exports/functions/prepareCalls.mdx, docs/pages/reference/common/src/functions/isAlchemyConnectionConfig.mdx, docs/pages/reference/smart-accounts/src/type-aliases/BaseModularAccountV2Implementation.mdx, docs/pages/reference/common/src/classes/BaseError.mdx, docs/pages/reference/common/src/functions/alchemyTransport.mdx, docs/pages/reference/common/src/variables/AlchemyConnectionConfigSchema.mdx, docs/pages/reference/wallet-apis/src/exports/type-aliases/CreateSolanaSmartWalletClientParams.mdx, docs/pages/reference/smart-accounts/src/type-aliases/EntryPointFromAccountRegistry.mdx, docs/pages/reference/wallet-apis/src/exports/interfaces/SolanaSigner.mdx, docs/pages/reference/smart-accounts/src/type-aliases/Permission.mdx, docs/pages/reference/wallet-apis/src/exports/type-aliases/CreateSmartWalletClientParams.mdx, docs/pages/reference/smart-accounts/src/classes/PermissionBuilderError.mdx, docs/pages/reference/wallet-apis/src/exports/type-aliases/CreateEvmSmartWalletClientParams.mdx, docs/pages/reference/wallet-apis/src/exports/functions/sendPreparedCalls.mdx, docs/pages/reference/smart-accounts/src/functions/installValidationActions.mdx, packages/wallet-apis/src/exports/solana.ts, packages/wallet-apis/src/utils/capabilities.ts, packages/wallet-apis/src/adapters/fromKeypair.ts, packages/wallet-apis/src/adapters/fromWalletAdapter.ts, packages/wallet-apis/src/actions/solana/signSignatureRequest.ts, packages/wallet-apis/src/actions/solana/signPreparedCalls.ts, packages/wallet-apis/src/actions/prepareCalls.ts, docs/docs.yml, packages/wallet-apis/src/adapters/fromKitSigner.ts, packages/wallet-apis/src/types.ts, docs/pages/reference/aa-infra/src/README.mdx, packages/wallet-apis/src/decorators/solanaSmartWalletActions.ts, packages/wallet-apis/src/actions/solana/getCallsStatus.ts, packages/wallet-apis/src/actions/solana/sendPreparedCalls.ts, packages/wallet-apis/src/actions/solana/sendCalls.ts, packages/wallet-apis/src/actions/solana/waitForCallsStatus.ts, docs/pages/reference/wallet-apis/src/exports/functions/createSmartWalletClient.mdx, packages/wallet-apis/src/actions/solana/prepareCalls.ts, packages/wallet-apis/src/adapters/signerEquivalence.test.ts, packages/wallet-apis/src/client.solana.e2e.test.ts, packages/wallet-apis/src/client.ts, docs/pages/reference/smart-accounts/src/variables/ENTITY_ID_AND_NONCE_READER_BYTECODE.mdx, docs/pages/reference/common/src/README.mdx, docs/pages/reference/wallet-apis/src/exports/README.mdx, pnpm-lock.yaml, docs/pages/reference/smart-accounts/src/README.mdx

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

jakehobbs and others added 2 commits April 24, 2026 16:49
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
Comment thread packages/wallet-apis/package.json Outdated
jakehobbs and others added 5 commits April 24, 2026 17:42
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>
@wiz-code-21c5ec5a85
Copy link
Copy Markdown

wiz-code-21c5ec5a85 Bot commented Apr 28, 2026

Wiz Scan Summary

Scanner Findings
Vulnerability Finding Vulnerabilities -
Data Finding Sensitive Data -
Secret Finding Secrets -
IaC Misconfiguration IaC Misconfigurations -
SAST Finding SAST Findings -
Software Management Finding Software Management Findings -
Total -

View scan details in Wiz

To detect these findings earlier in the dev lifecycle, try using Wiz Code VS Code Extension.

jakehobbs and others added 12 commits April 28, 2026 14:37
…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>
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>
jakehobbs and others added 3 commits April 29, 2026 10:52
…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>
…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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant