feat(sdk-coin-vet): add transaction builder logic for vechain #6258
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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:
@vechain/sdk-core
and@vechain/sdk-network
as new dependencies inpackage.json
to support VeChain-specific transaction and network capabilities.Interface and Type Enhancements:
VetTransactionExplanation
interface iniface.ts
to extend the base transaction explanation with VeChain-specific fields likesender
and transactiontype
.ExplainTransactionOptions
andVetParseTransactionOptions
intypes.ts
to define options for transaction explanation and parsing.Refactoring of Transaction Handling:
transaction/transaction
,transactionBuilder/transactionBuilder
, etc.) for better structure and modularity.Transaction
andTransactionBuilder
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]TransferBuilder
class to handle native VET transfers, ensuring validation of transaction clauses and recipient details. [1] [2]TransactionBuilderFactory Enhancements:
TransactionBuilderFactory
to support deserialization of signed transactions and initialization of builders with VeChain-specific logic.VeChain Coin Implementation (
Vet
class):verifyTransaction
,parseTransaction
, andexplainTransaction
methods to validate, parse, and explain transactions, including checks for recipient and output consistency. [1] [2]These changes collectively enhance the SDK's capabilities for working with VeChain transactions while improving code organization and maintainability.Ticket: COIN-4379