Skip to content

tx history: Introducing support for tx history endpoints and adding examples - #1458

Open
besler613 wants to merge 1 commit into
mainfrom
brianesler/transaction-history-sdk
Open

tx history: Introducing support for tx history endpoints and adding examples#1458
besler613 wants to merge 1 commit into
mainfrom
brianesler/transaction-history-sdk

Conversation

@besler613

@besler613 besler613 commented Jul 30, 2026

Copy link
Copy Markdown
Contributor

Summary & Motivation

Overview

The primary goal of this PR is to add support for tx history endpoints listEthTransactionHistory and listSolTransactionHistory, and also adds examples of their usage to sdk/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

  • Sync mono public API codegen across @turnkey/sdk-server, @turnkey/sdk-browser, @turnkey/core, @turnkey/sdk-types, and @turnkey/http
  • Transaction history: listEthTransactionHistory and listSolTransactionHistory query methods
    • Transaction history pagination: request/response types now use shared v1Pagination / v1PageInfo instead of v1TransactionHistoryPaginationOptions / v1TransactionHistoryPaginationCursors
  • Swap (query): getSwapQuote, getSwapStatus
  • Swap (submit): executeSwap, claimSwapFees, upsertSwapConfig
  • Swap types: v1SwapQuoteOption and related swap intent/result/request/response payloads
  • Activities: ACTIVITY_TYPE_UPDATE_WALLET_ACCOUNT_NAME with v1UpdateWalletAccountNameIntent / v1UpdateWalletAccountNameResult types
  • Activities: swap-related activity types (ACTIVITY_TYPE_EXECUTE_SWAP, ACTIVITY_TYPE_CLAIM_SWAP_FEES, ACTIVITY_TYPE_UPSERT_SWAP_CONFIG)

Examplex

  • Add examples/transaction-management/with-transaction-history demonstrating EVM and Solana transaction history with cursor pagination via pageInfo

Release

  • Add changeset (.changeset/transaction-history-apis.md) for minor version bumps on the five SDK packages above

How I Tested These Changes

  • ran examples against dev environment

Did you add a changeset?

Yes.

@codesandbox-ci

codesandbox-ci Bot commented Jul 30, 2026

Copy link
Copy Markdown

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:

Sandbox Source
@turnkey/example-react-components Configuration

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 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 (replacing v1TransactionHistoryPagination*).
  • 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-history example 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

  • stampClaimSwapFees builds the stamped body without generateAppProofs, and also includes it inside parameters via ...parameters. This produces a stamped request that doesn’t match the intended API shape.
    packages/sdk-server/src/generated/sdk-client-base.ts:4382
  • stampExecuteSwap currently omits generateAppProofs from the stamped body and also nests it under parameters via 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:6363
  • generateAppProofs should be sent as a top-level field, but this method currently includes it in parameters because 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:6383
  • stampUpsertSwapConfig currently nests generateAppProofs under parameters and 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:4363
  • generateAppProofs is a top-level field for this activity request, but ...rest currently places it under parameters, so it will be sent to the API in the wrong location.
    packages/sdk-browser/src/generated/sdk-client-base.ts:2913
  • stampClaimSwapFees currently nests generateAppProofs under parameters and 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:5535
  • generateAppProofs is a top-level field for this activity request, but it’s currently placed under parameters via ...rest. That sends the wrong request shape to the API.
    packages/sdk-browser/src/generated/sdk-client-base.ts:5560
  • stampExecuteSwap currently omits generateAppProofs at the top level and nests it under parameters. This yields a stamped request body that does not match the API schema.
    packages/sdk-browser/src/generated/sdk-client-base.ts:8013
  • generateAppProofs should be top-level, but ...rest currently pushes it into parameters. That changes the request shape for upsert_swap_config and can cause the API to ignore the flag.
    packages/sdk-browser/src/generated/sdk-client-base.ts:8039
  • stampUpsertSwapConfig currently nests generateAppProofs under parameters and 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.

Comment thread packages/sdk-server/src/__generated__/sdk-client-base.ts
Comment thread packages/sdk-browser/src/__generated__/sdk-client-base.ts
Comment thread packages/sdk-types/src/__inputs__/public_api.swagger.json Outdated
Comment thread packages/sdk-server/src/__inputs__/public_api.swagger.json Outdated
Comment thread packages/sdk-browser/src/__inputs__/public_api.swagger.json Outdated
Comment thread packages/core/src/__inputs__/public_api.swagger.json Outdated
Comment thread .changeset/transaction-history-apis.md Outdated
@besler613
besler613 force-pushed the brianesler/transaction-history-sdk branch from 6204b3f to 1adad6a Compare August 3, 2026 16:14
@besler613
besler613 requested a review from Copilot August 3, 2026 16:17
@besler613
besler613 marked this pull request as ready for review August 3, 2026 16:17

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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

  • stampExecuteSwap currently includes generateAppProofs inside parameters (via ...parameters) and omits it from the top-level request body. The stamped body should mirror the request shape: generateAppProofs top-level and parameters excluding it.
    packages/core/src/generated/sdk-client-base.ts:3446
  • stampClaimSwapFees currently includes generateAppProofs inside parameters (because it’s part of the ...parameters rest object) and omits it from the top-level request body. The stamped body should match the actual API request shape: generateAppProofs top-level and parameters excluding it.
    packages/core/src/generated/sdk-client-base.ts:6303
  • executeSwap spreads generateAppProofs into parameters via ...rest, but generateAppProofs is a top-level activity request field. This sends the flag in the wrong place (and potentially duplicates it) which can break server-side validation. Destructure generateAppProofs separately so it’s only top-level.
    packages/core/src/generated/sdk-client-base.ts:9013
  • upsertSwapConfig spreads generateAppProofs into parameters via ...rest, but generateAppProofs is a top-level activity request field. This produces an incorrect request body (and can cause duplicate/unknown fields under parameters). Destructure generateAppProofs separately so it’s only top-level.
    packages/core/src/generated/sdk-client-base.ts:9052
  • stampUpsertSwapConfig currently includes generateAppProofs inside parameters (via ...parameters) and omits it from the top-level request body. The stamped body should match the API request shape: generateAppProofs top-level and parameters excluding it.

Comment thread packages/core/src/__generated__/sdk-client-base.ts

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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.appName is now documented as a UUID identifier, but the field name is appName, which is inconsistent with other parts of the API that use appId for UUID identifiers. If this value is truly a UUID, consider aligning the field name (or introducing an appId alias/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;

@besler613
besler613 force-pushed the brianesler/transaction-history-sdk branch 3 times, most recently from 69604b7 to 0fbd341 Compare August 6, 2026 20:45
@besler613
besler613 requested a review from Copilot August 6, 2026 20:48
@besler613
besler613 force-pushed the brianesler/transaction-history-sdk branch from 0fbd341 to 2d8e740 Compare August 6, 2026 20:50
@besler613
besler613 requested a review from DeRauk August 6, 2026 20:57

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

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