chore: KEEP-230 remove Para SDK and supporting code#1148
Conversation
…ng code Para signing was retired in PR #983; this follow-up removes the now-dead surface area so Turnkey is the only wallet path. - Drop @getpara/ethers-v6-integration and @getpara/server-sdk from package.json + pnpm-lock; delete lib/para/, lib/encryption.ts (Para MPC user-share helpers), and Para spec docs. - Replace the Para-backed viem LocalAccount used by sponsored-client.ts with a Turnkey-backed adapter (lib/web3/turnkey-viem-account.ts) that signs through the Turnkey API client. Move org-scoped wallet helpers out of lib/para/ to lib/web3/wallet-helpers.ts and drop the deprecated user-id-keyed lookups. - Delete Para-only API routes (refresh-share, share) and strip the provider="turnkey" filter from export-key/verify since provider is going away. - Drop the Para columns (provider, para_wallet_id, user_share) and rename para_wallets -> organization_wallets via migration 0069. Update Drizzle schema, relations, and the prometheus / db-metrics collectors to drop the Para gauge and provider split. - Remove Para test infrastructure: delete the eip7702-spike integration test, the Para portal cleanup logic in the Playwright e2e helpers, and the seed-test-wallet / fund-test-wallet scripts. Update transaction-flow + write-contract-workflow tests to skip on missing Turnkey env (instead of missing PARA_*). - Strip PARA_* env vars from staging / prod / pr-environment helm values, the e2e GitHub workflow, and the setup-e2e-db action.
9bd986e to
6f4a796
Compare
Renumbers KEEP-230 migration from 0069 to 0071 to land after staging's 0069_add_feedback_table and 0070_workflow_executions_billable. Restores the Turnkey-rewritten seed-test-wallet script that staging maintains for E2E (retargeted onto organization_wallets and stripped of the dropped provider column) along with its db:seed-test-wallet npm script. Cleans up remaining para_wallets references in agentic-wallet-workflow-binding test mock, playwright cleanup util, and schema-extensions header.
Renumbers KEEP-230 migration from 0071 to 0072 to land after the new 0071_keep_470_workflow_tx_hash_array migration on staging.
Renumbers KEEP-230 migration from 0072 to 0077 to land after staging's 0072-0076 (workflows seeded_at, executions error classification, soft delete, db indexes, wallet integration name backfill). Fixes stale @/lib/para/wallet-helpers imports in plugins/web3/steps/sign-typed-data-core.ts and two test mocks that were added on staging after this branch deleted that path; retargets them to @/lib/web3/wallet-helpers. Keeps both halves of the package.json scripts conflict so staging's db:seed-workflows + db:seed-all coexist with the restored db:seed-test-wallet entry that db:seed-all depends on. Restores staging's SYSTEM_ACTIONS/TEMPLATE_SYNTAX/TRIGGERS imports in app/api/mcp/schemas/route.ts.
PR Environment Deployment FailedThe PR environment deployment encountered an error. Please check the workflow logs for details. Common issues:
|
🧹 PR Environment Cleaned UpThe PR environment has been successfully deleted. Deleted Resources:
All resources have been cleaned up and will no longer incur costs. |
Para has been fully removed; the comment claiming the Safe owner could be a Turnkey or Para row was leftover from the dual-provider era.
PR Environment Deployment FailedThe PR environment deployment encountered an error. Please check the workflow logs for details. Common issues:
|
PR Environment Deployment FailedThe PR environment deployment encountered an error. Please check the workflow logs for details. Common issues:
|
paraWallets schema mock and the provider field on the wallet fixture are no longer read by anything; the schema export is gone and the column is dropped by migration 0082.
🧹 PR Environment Cleaned UpThe PR environment has been successfully deleted. Deleted Resources:
All resources have been cleaned up and will no longer incur costs. |
Postgres auto-rewires the FK target on RENAME TABLE but keeps the constraint name. Renaming the constraint here avoids a future drizzle-kit generate emitting a one-line rename migration of its own. Idempotent via pg_constraint lookup so reruns are safe.
PR Environment Deployment FailedThe PR environment deployment encountered an error. Please check the workflow logs for details. Common issues:
|
PR Environment DeployedYour PR environment has been deployed! Environment Details:
Components:
The environment will be automatically cleaned up when this PR is closed or merged. |
Also drop WALLET_ENCRYPTION_KEY everywhere it was forwarded: the only consumer was the deleted lib/encryption.ts (Para MPC user-share helpers), so the executor config field, the k8s-job env propagation, the GitHub Actions composite (start-app/wallet_encryption_key input, e2e-tests-ephemeral.yml forwarding) and the helm values for staging / prod / pr-environment / executor / local-dev are all dead config now. Resolve conflicts: - app/api/user/wallet/export-key/request/route.ts -> accept staging's deletion (the endpoint was retired with the dual-factor MFA flow). - app/api/user/wallet/export-key/verify/route.ts -> keep staging's TOTP-only verify flow; the email-OTP code that this branch was cleaning up is now gone entirely. - app/api/user/wallet/withdraw/route.ts -> take staging's new requireOwnerWithMfa + helper imports, but point them at the new lib/web3/wallet-helpers path instead of the deleted lib/para path. - keeperhub-executor/startup-checks.ts -> keep staging's ephemeral-env downgrade + query timeout, but drop the provider="turnkey" filter since the provider column is being removed by migration 0092. - drizzle/meta/_journal.json -> renumber the Para decom migration from 0082 to 0092 to land after all of staging's interleaved migrations, and rename drizzle/0082_keep_230_decom_para.sql accordingly. - pnpm-lock.yaml -> take staging's lockfile and regenerate so the @getpara/* entries stay out and staging's additions are picked up. Drop specs/integration-based-wallet-creation.md (entirely Para-flow documentation, replaced by the Turnkey path) and update tests/README.md to point at the Turnkey provisioning env vars instead of the Para user-share / WALLET_ENCRYPTION_KEY pair.
PR Environment Deployment FailedThe PR environment deployment encountered an error. Please check the workflow logs for details. Common issues:
|
PR Environment Deployment FailedThe PR environment deployment encountered an error. Please check the workflow logs for details. Common issues:
|
|
PR Environment Deployment FailedThe PR environment deployment encountered an error. Please check the workflow logs for details. Common issues:
|
PR Environment DeployedYour PR environment has been deployed! Environment Details:
Components:
The environment will be automatically cleaned up when this PR is closed or merged. |
Hard-grep sweep across the repo after the staging merge for any Para-flavoured strings the previous commits missed. - Spec docs: delete the historical Para handover / migration docs (organizations_migration_handover, wallet-migration-todo, organization-wallet-execution) that documented the Para-era flow end-to-end; rewrite the surviving organization / wallet-overlay specs and the logging-and-metrics example to use Turnkey naming and /lib/web3/wallet-helpers paths. - Executor helm charts (prod + staging + pr-environment): drop the PARA_API_KEY parameterStore entry and the PARA_ENVIRONMENT kv entry alongside the WALLET_ENCRYPTION_KEY removal. - Local dev: strip the PARA_API_KEY / PARA_ENVIRONMENT / NEXT_PUBLIC_PARA_* kv stanzas from values-keeperhub.template.yaml and the matching sed substitutions + help text from deploy.sh. - PR seed verifier: query organization_wallets instead of para_wallets. - Tests: drop the paraWallets mock from safe-roles-orchestrator and the stray "ParaWallet" comment in lib/auth.ts permissions config.
PR Environment DeployedYour PR environment has been deployed! Environment Details:
Components:
The environment will be automatically cleaned up when this PR is closed or merged. |
…aming The org-scoped wallet model documented here is still load-bearing architecture; only the signer backend changed Para -> Turnkey. The previous sweep deleted the file along with the genuinely obsolete handover / migration docs, which removed useful design context. Bring it back and rename the Para references inline: - initializeParaSigner -> initializeWalletSigner - Para signer -> Turnkey signer - ParaWallet / Para wallet -> Wallet - para_wallets -> organization_wallets - keeperhub/lib/para/wallet-helpers.ts -> lib/web3/wallet-helpers.ts
PR Environment DeployedYour PR environment has been deployed! Environment Details:
Components:
The environment will be automatically cleaned up when this PR is closed or merged. |
🧹 PR Environment Cleaned UpThe PR environment has been successfully deleted. Deleted Resources:
All resources have been cleaned up and will no longer incur costs. |
Summary
Follow-up to PR #983 (Para signing decom). Removes the remaining Para surface area now that Turnkey is the sole wallet provider.
@getpara/ethers-v6-integrationand@getpara/server-sdk; deleteslib/para/,lib/encryption.ts(Para MPC user-share helpers), and thespecs/web3/PARA_*docs.LocalAccountused by the sponsored ERC-4337 client with a Turnkey-backed adapter (lib/web3/turnkey-viem-account.ts). Moves wallet helpers out oflib/para/tolib/web3/wallet-helpers.tsand drops the deprecated user-id-keyed lookups./api/user/wallet/refresh-share,/api/user/wallet/share) and removes theprovider = 'turnkey'filter fromexport-key/verifysince the column is going away.0069_keep_230_decom_para: deletes any non-Turnkey rows, dropsprovider,para_wallet_id,user_share, and renamespara_walletstoorganization_wallets(with FK + index renames).tests/integration/eip7702-spike.{test.ts,d.ts}, the Para Portal API cleanup branch intests/e2e/playwright/utils/cleanup.ts, and theseed-test-wallet/fund-test-walletscripts. Switchestransaction-flow+write-contract-workflowskip-conditions fromPARA_*toTURNKEY_*env vars.PARA_*env vars from helm values (staging, prod, pr-environment), the e2e GitHub workflow, and thesetup-e2e-dbaction.Test plan
pnpm type-checkpassespnpm checkintroduces no new lint errors vs staging baselinepnpm test:unitpasses (in particulartests/unit/sponsored-client.test.tsafter the Turnkey adapter swap)pnpm test:integrationpasses (no Para-touching integration tests remain)transfer-fundsworkflow, verify on-chainorganization_walletstable and surviving columnsNEXT_PUBLIC_GAS_SPONSORSHIP_ENABLED=true