-
Notifications
You must be signed in to change notification settings - Fork 7
Sol Tx Signing Ability E2E tests #424
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR refactors the Vincent e2e test infrastructure to implement a hierarchical PKP ownership model (EOA → Platform User PKP → Agent PKP per app) and migrates Solana transaction signer e2e tests to the ability package directory. Key changes include bug fixes for evmContractConditions serialization in wrapped keys APIs and comprehensive e2e test coverage for SOL transaction signing.
Key Changes
- Refactored e2e test utils to support Platform User PKP as intermediary between EOA and Agent PKPs
- Migrated SOL e2e tests from
abilities-e2etoability-sol-transaction-signer/test/e2e/ - Fixed evmContractConditions handling: now properly stringified for Wrapped Keys API calls
Reviewed changes
Copilot reviewed 45 out of 52 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/libs/e2e-test-utils/src/lib/ | Major refactor supporting new PKP hierarchy with Platform User PKP concept |
| packages/libs/wrapped-keys/src/lib/api/ | Fixed evmContractConditions serialization bugs (stringify before API calls) |
| packages/libs/wrapped-keys/src/lib/service-client/client.ts | Fixed missing delegatorAddress param in batch store operation |
| packages/apps/ability-sol-transaction-signer/test/e2e/ | New comprehensive e2e tests for wrapped keys and transaction signing |
| packages/apps/ability-sol-transaction-signer/src/lib/schemas.ts | Changed evmContractConditions type from any to string |
| packages/apps/abilities-e2e/ | Removed SOL tests (migrated to ability package) |
| pnpm-lock.yaml | Updated dependencies for new e2e test structure |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/libs/wrapped-keys/src/lib/api/batch-generate-private-keys.ts
Outdated
Show resolved
Hide resolved
packages/apps/ability-sol-transaction-signer/test/e2e/generate-key.spec.ts
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 45 out of 52 changed files in this pull request and generated no new comments.
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Description
.cursorignore: Add pacakgenode_modulesanddistdirs as I believe it was slowing down Intellisense (not sure if I'm the only dev with the issue, but ignoring these dirs seems to stop Intellisense infinitely loading)packages/apps/abilities-e2e/: Migrated SOL e2e tests and helpers to the SOL Ability package dirpackages/apps/ability-sol-transaction-signer/src/lib/schemas.ts: ConvertevmContractConditionsfromanytostringso that it matches what's returned by the Wrapped Keys get metadata API endpointpackages/apps/ability-sol-transaction-signer/test/e2e/ability.spec.ts: Init E2E test which validates:listEncryptedKeyMetadatausing the Platform User PKP JWTgetEncryptedKeyusing the Platform User and Delegatee PKP JWTsexportPrivateKeyusing the Platform User PKP JWTprecheckandexecutemethods to validate and sign both legacy and versioned SOL txs that self transfer SOL and validate the transaction was included in a blockpackages/apps/ability-sol-transaction-signer/test/e2e/generate-key.spec.ts: Init E2E test which uses the Platform User PKP JWT to generate a new SOL wrapped keypackages/apps/ability-sol-transaction-signer/test/e2e/batch-store-encrypted-key.spec.ts: Init E2E test which generates a SOL keypair usingweb3.js, encrypts it with Lit, stores in using WK service, exports it from WK service, and signs and submits a SOL transfer using the Abilitypackages/apps/ability-sol-transaction-signer/test/e2e/batch-generate-keys.spec.ts: Init E2E test which generates several keypairs usingweb3.js, the stores all of them using WK service, and tests retrieving them from WK servicepackages/libs/e2e-test-utils/packages/libs/wrapped-keys/src/lib/api/generate-private-key.ts: Bug fix forevmContractConditionsbeing passed as an array of objects instead of a string as expected by Wrapped Keys Lambdaspackages/libs/wrapped-keys/src/lib/api/batch-generate-private-keys.tsremoves unsupported signing functionality, also fixes bug with using non-stringified evmContractConditionspackages/libs/wrapped-keys/src/lib/service-client/client.tsbug fix, wasn't passing required param:delegatorAddressType of change
How Has This Been Tested?
E2E tests in
packages/apps/ability-sol-transaction-signer/test/e2e/utilize the new changes made to thee2e-test-utilsand validate the Vincent Wrapped Keys service allows for creating, retrieving, and signing SOL txs using the Vincent AbilityRunning the E2E tests:
git checkout -b chore/sol-wk-e2e-test origin/chore/sol-wk-e2e-testpnpm i && pnpm buildcp packages/apps/ability-sol-transaction-signer/.env.example packages/apps/ability-sol-transaction-signer/.envpnpx nx run ability-sol-transaction-signer:test-e2e packages/apps/ability-sol-transaction-signer/test/e2e/generate-key.spec.tsto generate a Wrapped Key for your dev Agent PKPpnpx nx run ability-sol-transaction-signer:test-e2e packages/apps/ability-sol-transaction-signer/test/e2e/ability.spec.tsto run all the tests for retrieving Wrapped Key metadata, exporting the private key, and using the encryption metadata to execute the SOL tx signing Abilitypnpx nx run ability-sol-transaction-signer:test-e2e packages/apps/ability-sol-transaction-signer/test/e2e/store-encrypted-key.spec.tsto run key generation, storing, exporting, and signingpnpx nx run ability-sol-transaction-signer:test-e2e packages/apps/ability-sol-transaction-signer/test/e2e/batch-store-encrypted-key.spec.tsto run multiple key generation, storing, and retrievingChecklist:
nx release plan) describing my changes and the version bump