Skip to content

feat: add createEndUserEvmSwap policy rule to TS and Python SDKs#643

Open
sammccord wants to merge 1 commit intomainfrom
sammccord/cdpsdk-2478-cdp-sdk-add-createenduserevmswap-rule-to-typescript-and
Open

feat: add createEndUserEvmSwap policy rule to TS and Python SDKs#643
sammccord wants to merge 1 commit intomainfrom
sammccord/cdpsdk-2478-cdp-sdk-add-createenduserevmswap-rule-to-typescript-and

Conversation

@sammccord
Copy link
Copy Markdown
Contributor

Description

Add support for the new createEndUserEvmSwap policy rule in both TypeScript and Python SDKs, enabling policy controls for end user EVM swap operations.

Closes CDPSDK-2478.

TypeScript:

  • CreateEndUserEvmSwapCriteriaSchema and CreateEndUserEvmSwapRuleSchema added to evmSchema.ts
  • CreateEndUserEvmSwapRuleSchema added to RuleSchema discriminated union in types.ts
  • Test cases for createEndUserEvmSwap rule CRUD in policies.test.ts

Python:

  • CreateEndUserEvmSwapRule class added to types.py with all 5 criterion types
  • openapi_criterion_mapping and openapi_rule_mapping updated in request_transformer.py
  • response_criterion_mapping and response_rule_mapping updated in response_transformer.py
  • Test case for createEndUserEvmSwap transformation round-trip
  • Example updated in create_end_user_policy.py
  • OpenAPI client regenerated to include CreateEndUserEvmSwapRule model

Both SDKs support all existing EVM criteria: ethValue, evmAddress, evmNetwork, evmData, netUSDChange.

Tests

All existing tests pass:

  • TypeScript: 548 passed (41 test files)
  • Python: 721 passed

New test cases added for createEndUserEvmSwap rule in both SDKs.

Checklist

  • Updated the typescript README if relevant
  • Updated the python README if relevant
  • Added a changelog entry
  • Added e2e tests if introducing new functionality

🤖 Generated with Claude Code

Add support for the new createEndUserEvmSwap policy rule enabling policy
controls for end user EVM swap operations. Both SDKs support all existing
EVM criteria: ethValue, evmAddress, evmNetwork, evmData, netUSDChange.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@linear
Copy link
Copy Markdown

linear bot commented Apr 6, 2026

@cb-heimdall
Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 0
Sum 1

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 6, 2026

⚠️ Generated Client Files Have Been Modified

This pull request contains manual changes to generated client files. These files are automatically generated from the OpenAPI specification and should not be edited directly.

Please check the workflow logs for details on which files were modified.

To fix this issue:

  1. Revert any manual changes to files in:
    • typescript/src/openapi-client/generated/
    • python/cdp/openapi_client/
    • go/openapi/
    • java/src/main/java/com/coinbase/cdp/openapi/
  2. If you need to change the generated code, update the OpenAPI spec (openapi.yaml) instead
  3. Run the generation commands locally to update the generated files

This comment will be automatically removed once the issue is resolved.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants