[wip] ironing out bugs in tx signing procedure

this time learned
- need to have tag and version for the return data
- i think i need to sign the hash of the transaction rather than the transaction
This commit is contained in:
2023-08-14 11:57:20 -06:00
parent 85c42bf136
commit b055d7d137
4 changed files with 42 additions and 4 deletions
+6 -1
View File
@@ -270,5 +270,10 @@ signed_tx
tx : Uint8Array)
: Uint8Array
{
return vdk_rlp.encode([signatures, tx]);
// tag for signed tx
let tag_bytes = vdk_rlp.encode_uint(11);
// not sure what version number should be but guessing 1
let vsn_bytes = vdk_rlp.encode_uint(1);
// result is [tag, vsn, signatures, tx]
return vdk_rlp.encode([tag_bytes, vsn_bytes, signatures, tx]);
}