@rosen-bridge/bitcoin-scanner 0.1.0 → 0.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/lib/types.ts DELETED
@@ -1,155 +0,0 @@
1
- export interface EsploraBlock {
2
- id: string;
3
- height: number;
4
- version: number;
5
- timestamp: number;
6
- tx_count: number;
7
- size: number;
8
- weight: number;
9
- merkle_root: string;
10
- previousblockhash: string;
11
- mediantime: number;
12
- nonce: number;
13
- bits: number;
14
- difficulty: number;
15
- }
16
-
17
- export interface EsploraTxInput {
18
- txid: string;
19
- vout: number;
20
- prevout: {
21
- scriptpubkey: string;
22
- scriptpubkey_asm: string;
23
- scriptpubkey_type: string;
24
- scriptpubkey_address: string;
25
- value: number;
26
- };
27
- scriptsig: string;
28
- scriptsig_asm: string;
29
- is_coinbase: false;
30
- sequence: number;
31
- }
32
-
33
- export interface EsploraTxOutput {
34
- scriptpubkey: string;
35
- scriptpubkey_asm: string;
36
- scriptpubkey_type: string;
37
- scriptpubkey_address: string;
38
- value: number;
39
- }
40
-
41
- export interface BitcoinEsploraTransaction {
42
- txid: string;
43
- version: number;
44
- locktime: number;
45
- vin: Array<EsploraTxInput>;
46
- vout: Array<EsploraTxOutput>;
47
- size: number;
48
- weight: number;
49
- fee: number;
50
- status: {
51
- confirmed: true;
52
- block_height: number;
53
- block_hash: string;
54
- block_time: number;
55
- };
56
- }
57
-
58
- export type JsonRpcResult = {
59
- id: string;
60
- result: unknown;
61
- };
62
-
63
- export type JsonRpcError = {
64
- id: string;
65
- error: {
66
- code: number;
67
- message?: string;
68
- data?: unknown;
69
- };
70
- };
71
-
72
- export interface BlockHeader {
73
- hash: string;
74
- height: number;
75
- time: number;
76
- nTx: number;
77
- previousblockhash: string;
78
- }
79
-
80
- export interface BlockChainInfo {
81
- blocks: number;
82
- bestblockhash: string;
83
- }
84
-
85
- export interface BitcoinRpcTxInput {
86
- txid: string;
87
- vout: number;
88
- scriptSig: {
89
- asm: string;
90
- hex: string;
91
- };
92
- txinwitness: Array<string>;
93
- sequence: number;
94
- }
95
-
96
- export interface BitcoinRpcTxOutput {
97
- value: number;
98
- n: number;
99
- scriptPubKey: {
100
- asm: string;
101
- hex: string;
102
- };
103
- }
104
-
105
- export interface BitcoinRpcTransaction {
106
- txid: string;
107
- hash: string;
108
- version: number;
109
- size: number;
110
- vsize: number;
111
- weight: number;
112
- locktime: number;
113
- vin: Array<BitcoinRpcTxInput>;
114
- vout: Array<BitcoinRpcTxOutput>;
115
- hex: string;
116
- }
117
-
118
- export interface DogeBlockSummary {
119
- hash: string;
120
- height: number;
121
- time: number;
122
- previousblockhash: string;
123
- tx: Array<string>;
124
- }
125
-
126
- export interface DogeRpcTxInput {
127
- txid: string;
128
- vout: number;
129
- scriptSig: {
130
- asm: string;
131
- hex: string;
132
- };
133
- sequence: number;
134
- }
135
-
136
- export interface DogeRpcTxOutput {
137
- value: number;
138
- n: number;
139
- scriptPubKey: {
140
- asm: string;
141
- hex: string;
142
- type: string;
143
- };
144
- }
145
-
146
- export interface DogeRpcTransaction {
147
- txid: string;
148
- hash: string;
149
- version: number;
150
- size: number;
151
- vsize: number;
152
- locktime: number;
153
- vin: Array<DogeRpcTxInput>;
154
- vout: Array<DogeRpcTxOutput>;
155
- }