Skip to content

Conversation

@nksazonov
Copy link
Contributor

@nksazonov nksazonov commented Dec 5, 2025

Summary by CodeRabbit

Release Notes v0.5.2

  • New Features

    • Added support for Escrow transaction types (Lock and Unlock)
    • Network information now includes network name field
  • Refactor

    • Simplified request APIs by removing signing requirements for query operations
    • Updated app definition response structure

✏️ Tip: You can customize this high-level summary in your review settings.

philanton and others added 2 commits December 5, 2025 17:54
The PR removes the signer parameter from multiple read-only query message creation functions across the SDK and integration tests. These functions now return unsigned JSON request strings instead of signed payloads, while mutation operations retain signing capability.
* fix(sdk): v0.5.1 types

* feat(sdk): bump version to 0.5.2
@nksazonov nksazonov requested a review from a team as a code owner December 5, 2025 16:14
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 5, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

Multiple RPC message creation functions transition from signed to unsigned request payloads by removing the signer parameter and returning JSON-stringified unsigned requests. Concurrently, type definitions evolve: protocol fields change from enum to string, application fields are removed from app definition responses, and network name fields are added. Request parameter structures are simplified by removing redundant filters.

Changes

Cohort / File(s) Summary
RPC Message Creation API
sdk/src/rpc/api.ts
Multiple message creators updated to remove signer parameter and return unsigned JSON payloads instead of signed messages. Affected functions: createPingMessage, createGetConfigMessage, createGetLedgerBalancesMessage, createGetLedgerEntriesMessage, createGetLedgerTransactionsMessage, createGetAppDefinitionMessage, createGetAppSessionsMessage, createGetAssetsMessage, createGetChannelsMessage. JSDoc blocks updated to reflect unsigned behavior.
RPC Type Definitions
sdk/src/rpc/types/common.ts, sdk/src/rpc/types/request.ts, sdk/src/rpc/types/response.ts
RPCTxType extended with EscrowLock and EscrowUnlock values. RPCNetworkInfo gains new name: string field. GetLedgerBalancesRequest.params removes participant filter field, keeping only account_id. GetAppDefinitionResponse.params changes from RPCAppDefinition & { nonce } to inline object with protocol: string (replacing enum), participants, weights, quorum, challenge, nonce.
RPC Schema & Parsing
sdk/src/rpc/parse/app.ts, sdk/src/rpc/parse/misc.ts
GetAppDefinitionParamsSchema removes application field and changes protocol from enum to z.string(). NetworkInfoObjectSchema adds new name field with propagation through transformer.
RPC Test Updates
sdk/test/unit/rpc/api.test.ts, sdk/test/unit/rpc/utils.test.ts
Message creator test calls remove signer arguments and update signature expectations from sig: ['0xsig'] to sig: []. Test payloads adjusted for parameter changes (e.g., account_id instead of participant). App session definitions now include application field. Network tests expect name field in parsed results.
Integration Tests & Setup
integration/common/testSetup.ts, integration/tests/ledger_transactions.test.ts
fetchAndParseAppSessions removes messageSKSigner from createGetAppSessionsMessage call. createGetLedgerTransactionsMessage call sites updated to remove signer parameter and adapt to new signature.
Package Version
sdk/package.json
Version bumped from 0.5.1 to 0.5.2.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

  • Verify all call sites: Ensure every invocation of signer-removed message creators has been updated across integration tests, unit tests, and main SDK code.
  • Type compatibility chain: Confirm type changes propagate correctly from common.tsparse/app.ts → test assertions, especially protocol field changes and application field removal.
  • Unsigned message validation: Review that JSON-stringified unsigned messages are correctly constructed (no signing step skipped incorrectly, NitroliteRPC.signRequestMessage properly omitted where intended).
  • Parameter removal safety: Verify removal of participant from GetLedgerBalancesRequest.params and application from GetAppDefinitionResponse doesn't break downstream consumers.

Possibly related PRs

Suggested labels

ready

Suggested reviewers

  • philanton
  • dimast-x
  • alessio

Poem

🐰 Signatures fade, requests now bare,
Protocol strings float through the air,
Fields refined with every hop,
Messages lean, no signer to drop!

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/v0.5.2

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 12250a5 and fda825e.

📒 Files selected for processing (11)
  • integration/common/testSetup.ts (0 hunks)
  • integration/tests/ledger_transactions.test.ts (8 hunks)
  • sdk/package.json (1 hunks)
  • sdk/src/rpc/api.ts (13 hunks)
  • sdk/src/rpc/parse/app.ts (1 hunks)
  • sdk/src/rpc/parse/misc.ts (1 hunks)
  • sdk/src/rpc/types/common.ts (2 hunks)
  • sdk/src/rpc/types/request.ts (1 hunks)
  • sdk/src/rpc/types/response.ts (1 hunks)
  • sdk/test/unit/rpc/api.test.ts (8 hunks)
  • sdk/test/unit/rpc/utils.test.ts (2 hunks)

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @nksazonov, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

This pull request introduces version 0.5.2 of the SDK, focusing on refining the RPC message creation API. Key changes include simplifying several message creation functions by removing the explicit signer parameter, enhancing the GetLedgerBalances request to use an optional accountId, and expanding network information with a new name field. Additionally, new escrow-related transaction types have been introduced, and the GetAppDefinition response structure has been clarified. These updates aim to improve the SDK's usability and extend its functional scope.

Highlights

  • RPC Message API Simplification: The signer parameter has been removed from numerous create...Message functions across the SDK, streamlining the API for message creation by making them unsigned by default.
  • Ledger Balances API Update: The createGetLedgerBalancesMessage function now accepts an optional accountId instead of a mandatory participant address, improving flexibility in querying ledger balances.
  • Network Information Enhancement: The RPCNetworkInfo interface and related parsing now include a name field, providing more descriptive details about the blockchain network.
  • New Transaction Types: Two new transaction types, EscrowLock and EscrowUnlock, have been added to the RPCTxType enum, expanding the range of supported ledger operations.
  • SDK Version Bump: The SDK version has been updated from 0.5.1 to 0.5.2 to reflect these changes and improvements.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@nksazonov nksazonov merged commit 2ba0a80 into main Dec 5, 2025
12 of 13 checks passed
@nksazonov nksazonov deleted the feat/v0.5.2 branch December 5, 2025 16:15
Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a minor version bump (0.5.1 to 0.5.2) for the SDK, primarily refactoring RPC message creation functions. Several create*Message functions (ping, get_config, get_ledger_entries, get_ledger_transactions, get_app_definition, get_app_sessions, get_channels, get_assets) in sdk/src/rpc/api.ts no longer require a signer parameter and do not perform internal message signing, which is reflected in updated JSDoc comments and corresponding integration and unit tests. The createGetLedgerBalancesMessage function was updated to accept an optional accountId instead of a required participant address. Additionally, the GetAppDefinition RPC response structure was made more explicit, removing an application field from its schema and adding protocol, participants, weights, quorum, and challenge fields. Network information (RPCNetworkInfo) now includes a name field, and two new transaction types, EscrowLock and EscrowUnlock, were added to RPCTxType.

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