-
Notifications
You must be signed in to change notification settings - Fork 10
/
ub.js
55 lines (46 loc) · 3.83 KB
/
ub.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
//tx 318a870fbe7525b50755069cacb58fcfb12b19c53fbe632cc38afb73484a6e33
//https://www.ub.com/explorer/tx?txid=318a870fbe7525b50755069cacb58fcfb12b19c53fbe632cc38afb73484a6e33
//f9beb4d974780000000000000000000074010000336e4a48020000000255b42533a9a81665b8b3b71c2fc0ff5900fedcc67f1c1108098ee53b95749b1a010000006a47304402206fcd6b6cb99048735b70ce6488c466c06e46863db18c068481c0c0edfa09a16302205193b4ca9fa5673fe431e8c1eba3a9270547afde3c9df29d383f4e58a0a75024092102f37f67cf69c2729738cb221917d2b00d729b7a8b191a1c6f410327bf321f9e9efeffffff6d4853d53ebbe6447a35e2ea7f9b9c31fdba0f013421564b459da6886bc16284000000006a473044022023e4f256c2e1c0a9601f422ab56a14e72e97cf70af5a7061d204e4c922f4c59a0220229f9e7929c58f4fb74c55298094f0ec466b8895774693a0774b0687b83a4e18092103f4cc6c488bfeb4592d74ede03823a4a1a8c3730464767e3ee9c3a63e09a6b8c4feffffff0206681d00000000001976a914838cb63eea0f2530051398fa3fb0d26393e3585188ac808d5b00000000001976a91494eea26c35f1c586ea9d07b80718da35bc41c93688ac62af0700
//body
//020000000255b42533a9a81665b8b3b71c2fc0ff5900fedcc67f1c1108098ee53b95749b1a010000006a47304402206fcd6b6cb99048735b70ce6488c466c06e46863db18c068481c0c0edfa09a16302205193b4ca9fa5673fe431e8c1eba3a9270547afde3c9df29d383f4e58a0a75024092102f37f67cf69c2729738cb221917d2b00d729b7a8b191a1c6f410327bf321f9e9efeffffff6d4853d53ebbe6447a35e2ea7f9b9c31fdba0f013421564b459da6886bc16284000000006a473044022023e4f256c2e1c0a9601f422ab56a14e72e97cf70af5a7061d204e4c922f4c59a0220229f9e7929c58f4fb74c55298094f0ec466b8895774693a0774b0687b83a4e18092103f4cc6c488bfeb4592d74ede03823a4a1a8c3730464767e3ee9c3a63e09a6b8c4feffffff0206681d00000000001976a914838cb63eea0f2530051398fa3fb0d26393e3585188ac808d5b00000000001976a91494eea26c35f1c586ea9d07b80718da35bc41c93688ac62af0700
/*
Version UB
decode
{ input:
[ { hash: '1a9b74953be58e0908111c7fc6dcfe0059ffc02f1cb7b3b86516a8a93325b455',
n: 1,
scriptSigLen: 106,
scriptSig: [Object],
script: [Object],
nSequence: <Buffer ff ff ff fe> },
{ hash: '8462c16b88a69d454b562134010fbafd319c9b7feae2357a44e6bb3ed553486d',
n: 0,
scriptSigLen: 106,
scriptSig: [Object],
script: [Object],
nSequence: <Buffer ff ff ff fe> } ],
output:
[ { nValue: 1927174,
scriptPubkeyLen: <Buffer 19>,
scriptPubkey: <Buffer 76 a9 14 83 8c b6 3e ea 0f 25 30 05 13 98 fa 3f b0 d2 63 93 e3 58 51 88 ac>,
address: '1Cza5xuJKP4vQgMJRSxotKcZHR5C8Mcx3i',
type: 'p2pkh' },
{ nValue: 6000000,
scriptPubkeyLen: <Buffer 19>,
scriptPubkey: <Buffer 76 a9 14 94 ee a2 6c 35 f1 c5 86 ea 9d 07 b8 07 18 da 35 bc 41 c9 36 88 ac>,
address: '1EaUt1Eqvb8EBBkfJEVE8R8bd9vEDdDb5s',
type: 'p2pkh' } ],
s: 0,
nVersion: <Buffer 02 00 00 00>,
nbinput: 2,
nboutput: 2,
nLockTime: <Buffer 62 af 07 00> }
*/
node index.js UB verify 020000000255b42533a9a81665b8b3b71c2fc0ff5900fedcc67f1c1108098ee53b95749b1a010000006a47304402206fcd6b6cb99048735b70ce6488c466c06e46863db18c068481c0c0edfa09a16302205193b4ca9fa5673fe431e8c1eba3a9270547afde3c9df29d383f4e58a0a75024092102f37f67cf69c2729738cb221917d2b00d729b7a8b191a1c6f410327bf321f9e9efeffffff6d4853d53ebbe6447a35e2ea7f9b9c31fdba0f013421564b459da6886bc16284000000006a473044022023e4f256c2e1c0a9601f422ab56a14e72e97cf70af5a7061d204e4c922f4c59a0220229f9e7929c58f4fb74c55298094f0ec466b8895774693a0774b0687b83a4e18092103f4cc6c488bfeb4592d74ede03823a4a1a8c3730464767e3ee9c3a63e09a6b8c4feffffff0206681d00000000001976a914838cb63eea0f2530051398fa3fb0d26393e3585188ac808d5b00000000001976a91494eea26c35f1c586ea9d07b80718da35bc41c93688ac62af0700 76a91478ef0a9093ef27037d628397f4511e8fd906fffb88ac 0.01927989 76a91452c4e145ce5f92b25176e5d141dc92f19b27390888ac 0.06
/*
Version UB
verify
----- Transaction hash: 318a870fbe7525b50755069cacb58fcfb12b19c53fbe632cc38afb73484a6e33
----- Transaction verified
----- Transaction hash: 318a870fbe7525b50755069cacb58fcfb12b19c53fbe632cc38afb73484a6e33
*/