Skip to content

Add Ethereum L1 external accounts and payment instructions#286

Merged
jklein24 merged 3 commits intomainfrom
03-20-add_ethereum_l1_external_accounts_and_payment_instructions
Mar 21, 2026
Merged

Add Ethereum L1 external accounts and payment instructions#286
jklein24 merged 3 commits intomainfrom
03-20-add_ethereum_l1_external_accounts_and_payment_instructions

Conversation

@jklein24
Copy link
Contributor

No description provided.

@jklein24 jklein24 requested a review from shreyav March 20, 2026 22:40
@vercel
Copy link

vercel bot commented Mar 20, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
grid-flow-builder Ready Ready Preview, Comment Mar 20, 2026 11:16pm

Request Review

Copy link
Contributor Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@github-actions
Copy link
Contributor

github-actions bot commented Mar 20, 2026

✱ Stainless preview builds

This PR will update the grid SDKs with the following commit messages.

kotlin

feat(api): add ethereum wallet to external accounts and payment instructions

openapi

feat(api): add Ethereum wallet types, remove Lightning account mapping

python

feat(api): add Ethereum wallet type to customers and payment instructions

typescript

feat(api): add Ethereum wallet type to external-accounts and quotes
grid-openapi studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅

⚠️ grid-python studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅lint ❗test ✅

pip install https://pkg.stainless.com/s/grid-python/c7991492473e7d8c232007fcbc1629f33937c5ae/grid-0.0.1-py3-none-any.whl
grid-kotlin studio · code

Your SDK build had at least one "note" diagnostic.
generate ✅build ✅lint ✅test ✅

⚠️ grid-typescript studio · code

Your SDK build had a failure in the lint CI job, which is a regression from the base state.
generate ✅build ✅lint ❗test ✅

npm install https://pkg.stainless.com/s/grid-typescript/edbd0fcdedbcd982320b3f6a7c9653475c7accc6/dist.tar.gz

This comment is auto-generated by GitHub Actions and is automatically kept up to date as you push.
If you push custom code to the preview branch, re-run this workflow to update the comment.
Last updated: 2026-03-21 00:25:41 UTC

@greptile-apps
Copy link
Contributor

greptile-apps bot commented Mar 20, 2026

Greptile Summary

This PR adds Ethereum L1 mainnet as a new payment rail, introducing ETHEREUM_WALLET as a valid value in both PaymentAccountType and ExternalAccountType. It also incidentally removes an erroneous LIGHTNING_ACCOUNT discriminator mapping key (the correct enum value has always been LIGHTNING, which is preserved).

Key changes:

  • New EthereumWalletInfo base schema (openapi/components/schemas/common/EthereumWalletInfo.yaml) reused by both payment instructions and external accounts — avoids duplication, consistent with how BaseWalletInfo is shared.
  • New PaymentEthereumWalletInfo schema composing BasePaymentAccountInfo + EthereumWalletInfo with an optional USDC assetType field — mirrors the structure of PaymentBaseWalletInfo and PaymentPolygonWalletInfo.
  • New EthereumWalletExternalAccountInfo schema composing BaseExternalAccountInfo + EthereumWalletInfo — mirrors BaseWalletExternalAccountInfo.
  • Both PaymentInstructions and ExternalAccountInfoOneOf discriminators updated with the new ETHEREUM_WALLET mapping.
  • Bundled files (openapi.yaml and mintlify/openapi.yaml) are in sync with the source changes.
  • All issues flagged in the previous review round (wrong title, missing trailing newline, bundled file out of sync) have been addressed.

Confidence Score: 5/5

  • This PR is safe to merge — all changes are additive OpenAPI schema additions following well-established patterns in the repo.
  • All new schemas are structurally consistent with their analogues (BaseWalletInfo, PaymentBaseWalletInfo, BaseWalletExternalAccountInfo). The discriminator mappings are correctly updated in both source and bundled files. Previous review issues (title, trailing newline, stale bundle) have all been resolved. The removal of the LIGHTNING_ACCOUNT stale mapping entry is a correct cleanup.
  • No files require special attention.

Important Files Changed

Filename Overview
openapi/components/schemas/common/EthereumWalletInfo.yaml New base schema for Ethereum L1 wallet address, following the same structure as BaseWalletInfo.yaml. Required fields (address, accountType) are correctly declared. Trailing newline is present.
openapi/components/schemas/common/PaymentEthereumWalletInfo.yaml New payment instruction schema composing BasePaymentAccountInfo and EthereumWalletInfo, with an optional assetType field limited to USDC. Title is correctly set to Ethereum Wallet, consistent with other Payment*WalletInfo schemas.
openapi/components/schemas/external_accounts/EthereumWalletExternalAccountInfo.yaml New external account schema composing BaseExternalAccountInfo and EthereumWalletInfo. Follows the same pattern as BaseWalletExternalAccountInfo.yaml. Trailing newline is present.
openapi/components/schemas/external_accounts/ExternalAccountInfoOneOf.yaml Adds EthereumWalletExternalAccountInfo to the oneOf list and discriminator mapping. Also removes the erroneous LIGHTNING_ACCOUNT discriminator key (the correct enum value is LIGHTNING, which remains intact at line 64).
openapi/components/schemas/common/PaymentInstructions.yaml Correctly adds PaymentEthereumWalletInfo to both the oneOf list and discriminator mapping. No ordering or structural issues.
openapi.yaml Bundled file correctly reflects all source changes: new EthereumWalletInfo and PaymentEthereumWalletInfo schemas with correct titles, updated PaymentInstructions and ExternalAccountInfoOneOf discriminator mappings, and removal of the erroneous LIGHTNING_ACCOUNT mapping key.

Flowchart

%%{init: {'theme': 'neutral'}}%%
flowchart TD
    A[API Client] -->|accountType: ETHEREUM_WALLET| B{Discriminator}

    B -->|PaymentInstructions| C[PaymentEthereumWalletInfo]
    B -->|ExternalAccount| D[EthereumWalletExternalAccountInfo]

    C --> E[BasePaymentAccountInfo\ncurrency, amount, etc.]
    C --> F[EthereumWalletInfo\naddress, accountType]
    C --> G[assetType: USDC]

    D --> H[BaseExternalAccountInfo\nid, accountType, etc.]
    D --> F

    style F fill:#f0f4ff,stroke:#4a6fa5
    style C fill:#e8f5e9,stroke:#2e7d32
    style D fill:#fff3e0,stroke:#e65100
Loading

Last reviewed commit: "Re-build"

Copy link
Contributor Author

@jklein24 jklein24 left a comment

Choose a reason for hiding this comment

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

@greptile please re-review and re-score

@jklein24 jklein24 requested a review from kphurley7 March 20, 2026 23:24
@jklein24 jklein24 merged commit 9400e77 into main Mar 21, 2026
9 checks passed
Copy link
Contributor Author

Merge activity

@jklein24 jklein24 deleted the 03-20-add_ethereum_l1_external_accounts_and_payment_instructions branch March 21, 2026 00:19
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.

3 participants