fixes issues with v - #613
Conversation
commit: |
| req.hashType === Constants.SIGNING.HASHES.KECCAK256 | ||
| ) { | ||
| const vBn = getV(req.origPayloadBuf, parsed); | ||
| parsed.sig.v = BigInt(vBn.toString()); |
There was a problem hiding this comment.
I see the viem/Signature implementation and also the legacy eth transactions have the type of v as bigint ✅
Should we make it optional and update other places to bigint like
gridplus-sdk/docs/docs/signing.md
Line 203 in 6790828
And also where do we have the following definition, that the Kalo mentioned in his issue?
sig?: {
v: Buffer;
r: Buffer;
s: Buffer;
};
...
}
|
@netbonus please see Kalo's test result below: lib sign method fails (throws): Error: Could not recover V. Bad transaction data. My req is: { |
|
@netbonus additional details: I'm on the latest firmware. Also when I trigger |
- Add comprehensive transaction schema validation using Zod - Fix v parameter calculation for different transaction types - Consolidate signature recovery logic into unified functions - Add transaction parsing utilities for better error handling - Improve test coverage for signature utils and validators - Fix data field encoding in test builders - Update encoder test snapshots to reflect corrected behavior This addresses issues with v parameter calculation across different transaction types (legacy, EIP-155, EIP-1559, EIP-2930, EIP-7702) and improves the overall robustness of transaction handling.
No description provided.