Skip to content

Add gRPC proto JSON transaction results#1145

Merged
hayes-mysten merged 2 commits into
mainfrom
mh/grpc-client-proto-json
Jul 16, 2026
Merged

Add gRPC proto JSON transaction results#1145
hayes-mysten merged 2 commits into
mainfrom
mh/grpc-client-proto-json

Conversation

@hayes-mysten

@hayes-mysten hayes-mysten commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Description

  • Add top-level SuiGrpcClient transaction include/result types for include: { protoJson: true }.
  • Serialize executed transaction and simulation protobuf responses with generated protobuf JSON.
  • Keep GrpcCoreClient's public type surface on the shared core transaction result types while supporting the extra include at runtime.
  • Align the transaction read-mask helper shape with PR Add core query APIs (listTransactions/listEvents/listCheckpoints) backed by new gRPC List RPCs #1137's transactionReadMaskPaths(include, prefix?).

Test plan

  • pnpm --filter @mysten/sui vitest run test/unit/grpc/parse-transaction-response.test.ts
  • pnpm --filter @mysten/sui test:typecheck
  • pnpm --filter @mysten/sui build

AI Assistance Notice

Please disclose the usage of AI. This is primarily to help inform reviewers of how careful they need to review PRs, and to keep track of AI usage across our team. Please fill this out accurately, and do not modify the content or heading for this section!

  • This PR was primarily written by AI.
  • I used AI for docs / tests, but manually wrote the source code.
  • I used AI to understand the problem space / repository.
  • I did not use AI for this PR.

@hayes-mysten
hayes-mysten requested a review from a team as a code owner July 16, 2026 17:46
@hayes-mysten
hayes-mysten temporarily deployed to sui-typescript-aws-kms-test-env July 16, 2026 17:46 — with GitHub Actions Inactive
@vercel

vercel Bot commented Jul 16, 2026

Copy link
Copy Markdown

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

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
sui-typescript-docs Ignored Ignored Preview Jul 16, 2026 9:25pm

Request Review

@hayes-mysten

Copy link
Copy Markdown
Contributor Author

@clud-bot review

@clud-bot

clud-bot Bot commented Jul 16, 2026

Copy link
Copy Markdown
Contributor

Review sub-agent spawned. I'll wait for its verdict and then post to GitHub.

@clud-bot clud-bot Bot 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.

Review: Approve ✅

Clean, low-risk refactor plus an additive feature. The read-mask helper extraction is byte-for-byte equivalent to the three inline blocks it replaces, withProtoJson correctly adds the opt-in protoJson field only when requested, the conditional ProtoJson typing and as Promise<...> casts hold, and cross-client consistency is preserved (protoJson is a gRPC-only additive include, defaults off).

Verified locally:

  • vitest run test/unit/grpc/parse-transaction-response.test.ts — ✅ 3/3
  • pnpm --filter @mysten/sui build — ✅
  • pnpm --filter @mysten/sui test:typecheck — ✅

One minor note inline: the changeset bump level looks like it should be minor rather than patch since new public API is exported.

Comment thread .changeset/grpc-client-proto-json.md Outdated
Co-authored-by: clud-bot[bot] <258312010+clud-bot[bot]@users.noreply.github.com>
@hayes-mysten
hayes-mysten temporarily deployed to sui-typescript-aws-kms-test-env July 16, 2026 21:25 — with GitHub Actions Inactive
@hayes-mysten
hayes-mysten merged commit 899d9e3 into main Jul 16, 2026
9 checks passed
@hayes-mysten
hayes-mysten deleted the mh/grpc-client-proto-json branch July 16, 2026 21:31
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.

1 participant