Skip to content

Conversation

ravibitgo
Copy link
Contributor

@ravibitgo ravibitgo commented Oct 10, 2025

Ticket: COIN-5918

@ravibitgo ravibitgo changed the base branch from COIN-5917 to master October 11, 2025 17:33
@ravibitgo ravibitgo force-pushed the COIN-5918 branch 4 times, most recently from cb41838 to 415c6fb Compare October 13, 2025 09:46
@ravibitgo ravibitgo marked this pull request as ready for review October 13, 2025 09:46
@ravibitgo ravibitgo requested review from a team as code owners October 13, 2025 09:46
Copy link

@Copilot Copilot AI left a comment

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 implements a pre-approval builder for Canton transactions, allowing 1-step pre-approval functionality. It adds support for creating one-step enablement requests that can be used to set up pre-approvals in the Canton blockchain network.

  • Added OneStepPreApproval transaction type to the SDK core enum
  • Implemented OneStepPreApprovalBuilder class with full validation and request object generation
  • Enhanced transaction and builder classes with proper validation and hash computation methods

Reviewed Changes

Copilot reviewed 11 out of 13 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
modules/sdk-core/src/account-lib/baseCoin/enum.ts Added OneStepPreApproval transaction type enum
modules/sdk-coin-canton/src/lib/oneStepPreApprovalBuilder.ts New builder class for creating one-step pre-approval requests
modules/sdk-coin-canton/src/lib/iface.ts Added interfaces for one-step enablement requests
modules/sdk-coin-canton/src/lib/transactionBuilder.ts Enhanced base builder with validation methods and removed unused code
modules/sdk-coin-canton/src/lib/transaction/transaction.ts Updated transaction class with proper getters/setters and new methods
modules/sdk-coin-canton/src/lib/transferBuilder.ts Added setTransaction method implementation
modules/sdk-coin-canton/src/lib/utils.ts Added hash computation method for prepare submission responses
modules/sdk-coin-canton/resources/hash/hash.js Added hash computation utilities for Canton transactions
modules/sdk-coin-canton/test/unit/builder/oneStepEnablement/oneStepEnablementBuilder.ts Comprehensive test suite for the new builder
modules/sdk-coin-canton/test/unit/utils.ts Added tests for new hash computation functionality
modules/sdk-coin-canton/src/lib/walletInitialization/walletInitTransaction.ts Removed unused Buffer import

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

Copy link
Contributor

@baltiyal baltiyal left a comment

Choose a reason for hiding this comment

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

lgtm

Copy link
Contributor

@at31416 at31416 left a comment

Choose a reason for hiding this comment

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

lgtm

@ravibitgo ravibitgo merged commit 49df87a into master Oct 14, 2025
15 checks passed
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