Skip to content

feat(exchange): add new API method agentSetAbstraction#118

Merged
nktkas merged 1 commit intomainfrom
117-feature-add-new-api-methods
Feb 5, 2026
Merged

feat(exchange): add new API method agentSetAbstraction#118
nktkas merged 1 commit intomainfrom
117-feature-add-new-api-methods

Conversation

@nktkas
Copy link
Owner

@nktkas nktkas commented Feb 5, 2026

No description provided.

@nktkas nktkas linked an issue Feb 5, 2026 that may be closed by this pull request
Copilot AI review requested due to automatic review settings February 5, 2026 19:57
Copy link

Copilot AI left a 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 adds a new Exchange API method agentSetAbstraction that allows agent wallets to set user abstraction modes. This is a more flexible replacement for the existing agentEnableDexAbstraction method, which only enabled DEX abstraction. The new method supports three abstraction modes: disabled ("i"), unified account ("u"), and portfolio margin ("p").

Changes:

  • Added new agentSetAbstraction method with full implementation, documentation, and tests
  • Deprecated the older agentEnableDexAbstraction method with appropriate references to the new method
  • Updated CLI to include the new command with parameter support

Reviewed changes

Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.

Show a summary per file
File Description
src/api/exchange/_methods/agentSetAbstraction.ts New method implementation with schemas, types, and execution logic following established patterns
src/api/exchange/client.ts Added method to ExchangeClient class, added deprecation notice to old method, exported new types
src/api/exchange/mod.ts Exported new method in alphabetical order
src/api/exchange/_methods/agentEnableDexAbstraction.ts Added deprecation notice
bin/cli.ts Added CLI command entry with parameter specification
tests/api/exchange/agentSetAbstraction.test.ts Added test coverage for both code and CLI usage

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@nktkas nktkas merged commit 82ae61e into main Feb 5, 2026
7 checks passed
@nktkas nktkas deleted the 117-feature-add-new-api-methods branch February 5, 2026 20:10
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.

Feature: Add new API methods

1 participant