Skip to content

Commit

Permalink
draft: pwpkh signature
Browse files Browse the repository at this point in the history
  • Loading branch information
Nesopie committed Mar 28, 2024
1 parent 2a0c941 commit 3e32cb3
Show file tree
Hide file tree
Showing 14 changed files with 703 additions and 488 deletions.
Original file line number Diff line number Diff line change
@@ -1,41 +1,41 @@
{
"version": 1,
"locktime": 0,
"vin": [
{
"txid": "f3898029a8699bd8b71dc6f20e7ec2762a945a30d6a9f18034ce92a9d6cdd26c",
"vout": 1,
"prevout": {
"scriptpubkey": "00144639af50cc9b5fcc4fc09644c0140078b2d2356c",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 4639af50cc9b5fcc4fc09644c0140078b2d2356c",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qgcu675xvnd0ucn7qjezvq9qq0zedydtv07pqxg",
"value": 338586
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"30450221008f05cd9bc6679ad3b1e5316370a71779d587d9ff9ceaebb9dfa97288e6abf7fb02203951f6ea925965c7719039984929bac73e7934c86237dc40d72459a694f378ec01",
"02bb0543170d1752bfb0d173724effdc58a708c53d5154e56364e6cb19fd993a73"
],
"is_coinbase": false,
"sequence": 4294967293
}
],
"vout": [
{
"scriptpubkey": "5120b09182bc1fc70f752d4d885ec8e68156325b75881de16bb1b5d3e3bf53ff01fd",
"scriptpubkey_asm": "OP_PUSHNUM_1 OP_PUSHBYTES_32 b09182bc1fc70f752d4d885ec8e68156325b75881de16bb1b5d3e3bf53ff01fd",
"scriptpubkey_type": "v1_p2tr",
"scriptpubkey_address": "bc1pkzgc90qlcu8h2t2d3p0v3e5p2ce9kavgrhskhvd4603m75llq87s2eyxqn",
"value": 2576
},
{
"scriptpubkey": "00144639af50cc9b5fcc4fc09644c0140078b2d2356c",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 4639af50cc9b5fcc4fc09644c0140078b2d2356c",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qgcu675xvnd0ucn7qjezvq9qq0zedydtv07pqxg",
"value": 333840
}
]
}
"version": 1,
"locktime": 0,
"vin": [
{
"txid": "f3898029a8699bd8b71dc6f20e7ec2762a945a30d6a9f18034ce92a9d6cdd26c",
"vout": 1,
"prevout": {
"scriptpubkey": "00144639af50cc9b5fcc4fc09644c0140078b2d2356c",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 4639af50cc9b5fcc4fc09644c0140078b2d2356c",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qgcu675xvnd0ucn7qjezvq9qq0zedydtv07pqxg",
"value": 338586
},
"scriptsig": "",
"scriptsig_asm": "",
"witness": [
"30450221008f05cd9bc6679ad3b1e5316370a71779d587d9ff9ceaebb9dfa97288e6abf7fb02203951f6ea925965c7719039984929bac73e7934c86237dc40d72459a694f378ec01",
"02bb0543170d1752bfb0d173724effdc58a708c53d5154e56364e6cb19fd993a73"
],
"is_coinbase": false,
"sequence": 4294967293
}
],
"vout": [
{
"scriptpubkey": "5120b09182bc1fc70f752d4d885ec8e68156325b75881de16bb1b5d3e3bf53ff01fd",
"scriptpubkey_asm": "OP_PUSHNUM_1 OP_PUSHBYTES_32 b09182bc1fc70f752d4d885ec8e68156325b75881de16bb1b5d3e3bf53ff01fd",
"scriptpubkey_type": "v1_p2tr",
"scriptpubkey_address": "bc1pkzgc90qlcu8h2t2d3p0v3e5p2ce9kavgrhskhvd4603m75llq87s2eyxqn",
"value": 2576
},
{
"scriptpubkey": "00144639af50cc9b5fcc4fc09644c0140078b2d2356c",
"scriptpubkey_asm": "OP_0 OP_PUSHBYTES_20 4639af50cc9b5fcc4fc09644c0140078b2d2356c",
"scriptpubkey_type": "v0_p2wpkh",
"scriptpubkey_address": "bc1qgcu675xvnd0ucn7qjezvq9qq0zedydtv07pqxg",
"value": 333840
}
]
}
6 changes: 6 additions & 0 deletions src/features/encoding/errors.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
export const Errors = {
INVALID_WITNESS: "INVALID WITNESS",
INVALID_VOUT: "INVALID VOUT",
PUBKEY_NOT_FOUND: "PUBKEY NOT FOUND",
INVALID_PREVOUT: "INVALID PREVOUT",
};
Loading

0 comments on commit 3e32cb3

Please sign in to comment.