tx history: Introducing support for tx history endpoints and adding examples - #1458
tx history: Introducing support for tx history endpoints and adding examples#1458besler613 wants to merge 1 commit into
Conversation
|
This pull request is automatically built and testable in CodeSandbox. To see build info of the built libraries, click here or the icon next to each commit SHA. Latest deployment of this branch, based on commit 2d8e740:
|
There was a problem hiding this comment.
Pull request overview
This PR updates the SDK’s generated public API surface to support the new transaction-history query endpoints (EVM + Solana) and adds a runnable example demonstrating cursor pagination. The regenerated API spec/types also include additional non–tx-history endpoints (notably swap quote/status + swap activity submission endpoints) and related schema changes.
Changes:
- Add tx-history query request/response typings and update pagination shape to use
v1Pagination+v1PageInfo(replacingv1TransactionHistoryPagination*). - Regenerate SDK clients/types to include new public endpoints (tx history plus swap quote/status + swap submission endpoints).
- Add a new
examples/transaction-management/with-transaction-historyexample with a reusable pagination helper.
Reviewed changes
Copilot reviewed 16 out of 26 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/sdk-types/src/inputs/public_api.types.ts | Regenerated type definitions (tx history pagination changes + new schemas). |
| packages/sdk-types/src/inputs/public_api.swagger.json | Regenerated Swagger spec (adds swap endpoints + tx history pagination changes). |
| packages/sdk-types/src/generated/types.ts | Regenerated exported TypeScript types used by SDK consumers. |
| packages/sdk-server/src/inputs/public_api.types.ts | Regenerated server SDK type definitions mirroring the public spec. |
| packages/sdk-server/src/inputs/public_api.swagger.json | Regenerated server SDK Swagger input spec. |
| packages/sdk-server/src/generated/sdk-client-base.ts | Adds generated client methods for swap endpoints and tx-history updates. |
| packages/sdk-browser/src/inputs/public_api.types.ts | Regenerated browser SDK type definitions mirroring the public spec. |
| packages/sdk-browser/src/inputs/public_api.swagger.json | Regenerated browser SDK Swagger input spec. |
| packages/sdk-browser/src/generated/sdk-client-base.ts | Adds generated browser client methods for swap endpoints and tx-history updates. |
| packages/sdk-browser/src/generated/sdk_api_types.ts | Adds generated browser SDK API operation type aliases for swap endpoints. |
| packages/http/src/generated/services/coordinator/public/v1/public_api.types.ts | Regenerated coordinator HTTP types (tx history pagination changes + new schemas). |
| packages/http/src/generated/services/coordinator/public/v1/public_api.swagger.json | Regenerated coordinator Swagger spec (tx history pagination changes + new schemas). |
| packages/http/src/generated/services/coordinator/public/v1/public_api.fetcher.ts | Regenerated fetcher helpers/signers reflecting updated spec (incl. swap endpoints). |
| packages/core/src/inputs/public_api.swagger.json | Regenerated core Swagger input spec (adds swap endpoints + tx history pagination changes). |
| packages/core/src/generated/sdk-client-base.ts | Adds generated core client methods for swap endpoints and tx-history updates. |
| examples/transaction-management/with-transaction-history/tsconfig.json | Adds TS config for the new tx-history example. |
| examples/transaction-management/with-transaction-history/src/turnkey.ts | Helper to instantiate an SDK server client from env vars. |
| examples/transaction-management/with-transaction-history/src/pagination.ts | Shared pagination helper for walking cursor-based tx history. |
| examples/transaction-management/with-transaction-history/src/list-sol-transaction-history.ts | CLI example: prompt + list Solana tx history with pagination. |
| examples/transaction-management/with-transaction-history/src/list-eth-transaction-history.ts | CLI example: prompt + list EVM tx history with pagination. |
| examples/transaction-management/with-transaction-history/README.md | Documentation for running the new tx-history example. |
| examples/transaction-management/with-transaction-history/package.json | Example scripts/dependencies for running the tx-history CLIs. |
| examples/transaction-management/with-transaction-history/.env.local.example | Example environment variables for the tx-history example. |
| .changeset/transaction-history-apis.md | Changeset describing the release impact of adding tx-history query methods. |
Files not reviewed (8)
- packages/core/src/generated/sdk-client-base.ts: Generated file
- packages/http/src/generated/services/coordinator/public/v1/public_api.fetcher.ts: Generated file
- packages/http/src/generated/services/coordinator/public/v1/public_api.swagger.json: Generated file
- packages/http/src/generated/services/coordinator/public/v1/public_api.types.ts: Generated file
- packages/sdk-browser/src/generated/sdk-client-base.ts: Generated file
- packages/sdk-browser/src/generated/sdk_api_types.ts: Generated file
- packages/sdk-server/src/generated/sdk-client-base.ts: Generated file
- packages/sdk-types/src/generated/types.ts: Generated file
Comments suppressed due to low confidence (10)
packages/sdk-server/src/generated/sdk-client-base.ts:2244
stampClaimSwapFeesbuilds the stamped body withoutgenerateAppProofs, and also includes it insideparametersvia...parameters. This produces a stamped request that doesn’t match the intended API shape.
packages/sdk-server/src/generated/sdk-client-base.ts:4382stampExecuteSwapcurrently omitsgenerateAppProofsfrom the stamped body and also nests it underparametersvia the rest spread. This can cause the stamped payload to differ from the intended API request shape.
packages/sdk-server/src/generated/sdk-client-base.ts:6363generateAppProofsshould be sent as a top-level field, but this method currently includes it inparametersbecause it’s part of...rest. That changes the request shape and prevents the flag from being applied.
packages/sdk-server/src/generated/sdk-client-base.ts:6383stampUpsertSwapConfigcurrently nestsgenerateAppProofsunderparametersand doesn’t include it at the top level of the stamped body. The resulting stamped request won’t match the API schema.
packages/sdk-server/src/generated/sdk-client-base.ts:4363generateAppProofsis a top-level field for this activity request, but...restcurrently places it underparameters, so it will be sent to the API in the wrong location.
packages/sdk-browser/src/generated/sdk-client-base.ts:2913stampClaimSwapFeescurrently nestsgenerateAppProofsunderparametersand omits it from the top-level stamped body. This makes the stamped payload diverge from the API schema.
packages/sdk-browser/src/generated/sdk-client-base.ts:5535generateAppProofsis a top-level field for this activity request, but it’s currently placed underparametersvia...rest. That sends the wrong request shape to the API.
packages/sdk-browser/src/generated/sdk-client-base.ts:5560stampExecuteSwapcurrently omitsgenerateAppProofsat the top level and nests it underparameters. This yields a stamped request body that does not match the API schema.
packages/sdk-browser/src/generated/sdk-client-base.ts:8013generateAppProofsshould be top-level, but...restcurrently pushes it intoparameters. That changes the request shape forupsert_swap_configand can cause the API to ignore the flag.
packages/sdk-browser/src/generated/sdk-client-base.ts:8039stampUpsertSwapConfigcurrently nestsgenerateAppProofsunderparametersand does not include it at the top level of the stamped body. This does not match the API’s expected request structure.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
6204b3f to
1adad6a
Compare
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 16 out of 26 changed files in this pull request and generated 1 comment.
Files not reviewed (8)
- packages/core/src/generated/sdk-client-base.ts: Generated file
- packages/http/src/generated/services/coordinator/public/v1/public_api.fetcher.ts: Generated file
- packages/http/src/generated/services/coordinator/public/v1/public_api.swagger.json: Generated file
- packages/http/src/generated/services/coordinator/public/v1/public_api.types.ts: Generated file
- packages/sdk-browser/src/generated/sdk-client-base.ts: Generated file
- packages/sdk-browser/src/generated/sdk_api_types.ts: Generated file
- packages/sdk-server/src/generated/sdk-client-base.ts: Generated file
- packages/sdk-types/src/generated/types.ts: Generated file
Suppressed comments (5)
packages/core/src/generated/sdk-client-base.ts:6341
stampExecuteSwapcurrently includesgenerateAppProofsinsideparameters(via...parameters) and omits it from the top-level request body. The stamped body should mirror the request shape:generateAppProofstop-level andparametersexcluding it.
packages/core/src/generated/sdk-client-base.ts:3446stampClaimSwapFeescurrently includesgenerateAppProofsinsideparameters(because it’s part of the...parametersrest object) and omits it from the top-level request body. The stamped body should match the actual API request shape:generateAppProofstop-level andparametersexcluding it.
packages/core/src/generated/sdk-client-base.ts:6303executeSwapspreadsgenerateAppProofsintoparametersvia...rest, butgenerateAppProofsis a top-level activity request field. This sends the flag in the wrong place (and potentially duplicates it) which can break server-side validation. DestructuregenerateAppProofsseparately so it’s only top-level.
packages/core/src/generated/sdk-client-base.ts:9013upsertSwapConfigspreadsgenerateAppProofsintoparametersvia...rest, butgenerateAppProofsis a top-level activity request field. This produces an incorrect request body (and can cause duplicate/unknown fields underparameters). DestructuregenerateAppProofsseparately so it’s only top-level.
packages/core/src/generated/sdk-client-base.ts:9052stampUpsertSwapConfigcurrently includesgenerateAppProofsinsideparameters(via...parameters) and omits it from the top-level request body. The stamped body should match the API request shape:generateAppProofstop-level andparametersexcluding it.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 19 out of 29 changed files in this pull request and generated no new comments.
Files not reviewed (4)
- packages/http/src/generated/services/coordinator/public/v1/public_api.fetcher.ts: Generated file
- packages/http/src/generated/services/coordinator/public/v1/public_api.swagger.json: Generated file
- packages/http/src/generated/services/coordinator/public/v1/public_api.types.ts: Generated file
- packages/sdk-types/src/generated/types.ts: Generated file
Suppressed comments (1)
packages/sdk-types/src/inputs/public_api.types.ts:3710
v1GetLatestBootProofRequest.appNameis now documented as a UUID identifier, but the field name isappName, which is inconsistent with other parts of the API that useappIdfor UUID identifiers. If this value is truly a UUID, consider aligning the field name (or introducing anappIdalias/deprecation path); otherwise the description should remain as an app name to avoid misleading SDK consumers.
v1GetLatestBootProofRequest: {
/** @description Unique identifier for a given Organization. */
organizationId: string;
/** @description Unique identifier (UUID) of the enclave app. */
appName: string;
69604b7 to
0fbd341
Compare
0fbd341 to
2d8e740
Compare
Summary & Motivation
Overview
The primary goal of this PR is to add support for tx history endpoints
listEthTransactionHistoryandlistSolTransactionHistory, and also adds examples of their usage tosdk/examples/transaction-management/with-transaction-history. However, due to the automated nature of our codegen process, this PR also picked up a number of secondary changes, which I have broken down below.Codegen / API surface
Examplex
examples/transaction-management/with-transaction-historydemonstrating EVM and Solana transaction history with cursor pagination via pageInfoRelease
How I Tested These Changes
Did you add a changeset?
Yes.