Skip to content

feat(v5): sponsored account undelegation#2435

Open
jakehobbs wants to merge 5 commits intov5.x.xfrom
jake/undelegate-account
Open

feat(v5): sponsored account undelegation#2435
jakehobbs wants to merge 5 commits intov5.x.xfrom
jake/undelegate-account

Conversation

@jakehobbs
Copy link
Copy Markdown
Collaborator

@jakehobbs jakehobbs commented Mar 27, 2026

Pull Request Checklist


PR-Codex overview

This PR primarily introduces the undelegateAccount functionality into the wallet-apis package, allowing users to remove delegation from an account. It also updates dependencies and adds tests for the new feature.

Detailed summary

  • Updated @alchemy/wallet-api-types dependency to a local link.
  • Added undelegateAccount type and function in undelegateAccount.ts.
  • Exported undelegateAccount in index.ts.
  • Implemented undelegateAccount in SmartWalletActions.
  • Created tests for undelegateAccount in client.e2e.test.ts.
  • Enhanced signPreparedCalls.ts to handle authorization for undelegation.

The following files were skipped due to too many changes: pnpm-lock.yaml

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

jakehobbs and others added 2 commits March 27, 2026 13:47
Co-Authored-By: Claude <noreply@anthropic.com>
Co-Authored-By: Claude <noreply@anthropic.com>
@jakehobbs jakehobbs changed the title Jake/undelegate account feat(v5): sponsored account undelegation Mar 27, 2026
"dependencies": {
"@alchemy/common": "workspace:*",
"@alchemy/wallet-api-types": "0.1.0-alpha.26",
"@alchemy/wallet-api-types": "link:/Users/jacob.hobbs/dev/alchemyplatform/wallet-server/types",
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

need to update this once a new `@alchemy/wallet-api-types`` pkg is published.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also pls check that all the type errors are gone after that

import { createSmartWalletClient } from "./src/client.js";
import { alchemyWalletTransport } from "./src/transport.js";

// TODO(jh): remove this after done testing manually.
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove this before merging

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look into why such large diff... i think we might be accidentally running prettier on this somewhere

Co-Authored-By: Claude <noreply@anthropic.com>
* @example
* ```ts
* const result = await client.undelegateAccount();
* const status = await client.waitForCallsStatus({ id: result.id });
Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we consider just waiting in undelegateAccount?

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.

2 participants