Skip to content

feat(sdk-coin-vet): add transaction builder logic for vechain #6258

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jun 9, 2025

Conversation

at31416
Copy link
Contributor

@at31416 at31416 commented Jun 8, 2025

This pull request introduces significant updates to the VeChain (VET) SDK module, including dependency additions, interface enhancements, and substantial refactoring of the transaction handling logic. These changes aim to improve the SDK's functionality, maintainability, and support for VeChain-specific features.

Dependency Updates:

  • Added @vechain/sdk-core and @vechain/sdk-network as new dependencies in package.json to support VeChain-specific transaction and network capabilities.

Interface and Type Enhancements:

  • Introduced VetTransactionExplanation interface in iface.ts to extend the base transaction explanation with VeChain-specific fields like sender and transaction type.
  • Added ExplainTransactionOptions and VetParseTransactionOptions in types.ts to define options for transaction explanation and parsing.

Refactoring of Transaction Handling:

  • Reorganized transaction-related files into subdirectories (transaction/transaction, transactionBuilder/transactionBuilder, etc.) for better structure and modularity.
  • Replaced the old Transaction and TransactionBuilder implementations with new classes that leverage @vechain/sdk-core for VeChain-specific functionality, including support for transaction clauses, sender signatures, and fee payer signatures. [1] [2] [3]
  • Added a TransferBuilder class to handle native VET transfers, ensuring validation of transaction clauses and recipient details. [1] [2]

TransactionBuilderFactory Enhancements:

  • Updated TransactionBuilderFactory to support deserialization of signed transactions and initialization of builders with VeChain-specific logic.

VeChain Coin Implementation (Vet class):

  • Implemented verifyTransaction, parseTransaction, and explainTransaction methods to validate, parse, and explain transactions, including checks for recipient and output consistency. [1] [2]
  • Added support for rebuilding transactions using the new transaction builder factory.

These changes collectively enhance the SDK's capabilities for working with VeChain transactions while improving code organization and maintainability.Ticket: COIN-4379

@at31416 at31416 force-pushed the coin-4379 branch 2 times, most recently from a5cfd1e to 4b36029 Compare June 8, 2025 15:49
@at31416 at31416 marked this pull request as ready for review June 8, 2025 16:54
@at31416 at31416 requested review from a team as code owners June 8, 2025 16:54
@at31416 at31416 merged commit 165d4f4 into master Jun 9, 2025
15 checks passed
zahin-mohammad pushed a commit that referenced this pull request Jun 9, 2025
feat(sdk-coin-vet): add transaction builder logic for vechain

TICKET: WP-0000
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