Skip to content

Conversation

@abhijit0943
Copy link
Contributor

Add the IrysCommitmentTransactionBuilder for building STAKE and PLEDGE commitment transactions. These are custom non-EVM transactions using 7-field RLP encoding with keccak256 prehash for HSM signing.

Includes:

  • Module scaffolding (package.json, tsconfig, mocharc)
  • Shared interface contract (iface.ts)
  • Base58 and hex address utility functions (utils.ts)
  • Commitment transaction builder with RLP encoding, anchor fetching, prehash computation, and broadcast payload creation

Ticket: SC-5392

Add the IrysCommitmentTransactionBuilder for building STAKE and PLEDGE
commitment transactions. These are custom non-EVM transactions using
7-field RLP encoding with keccak256 prehash for HSM signing.

Includes:
- Module scaffolding (package.json, tsconfig, mocharc)
- Shared interface contract (iface.ts)
- Base58 and hex address utility functions (utils.ts)
- Commitment transaction builder with RLP encoding, anchor
  fetching, prehash computation, and broadcast payload creation

Ticket: SC-5392
private _fee?: bigint;
private _value?: bigint;
private _signer?: Uint8Array; // 20 bytes
private _anchor?: Uint8Array; // 32 bytes (set during build, or manually for testing)
Copy link
Contributor

Choose a reason for hiding this comment

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

Shall we call this as nonce for simplicity and then send this field as anchor while building?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't prefer we do that since this is not a sequential counter like nonce and it would be better to keep it as per chain semantics

Copy link
Contributor

@raksha-r7 raksha-r7 left a comment

Choose a reason for hiding this comment

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

lgtm

@raksha-r7 raksha-r7 marked this pull request as ready for review February 12, 2026 08:54
@raksha-r7 raksha-r7 requested review from a team as code owners February 12, 2026 08:54
@raksha-r7 raksha-r7 merged commit a561e47 into SC-5391 Feb 12, 2026
2 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.

2 participants