@caravan/psbt 1.0.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/.eslintrc.cjs ADDED
@@ -0,0 +1,6 @@
1
+ module.exports = {
2
+ extends: ["@caravan/eslint-config/library.js"],
3
+ rules: {
4
+ "@typescript-eslint/no-duplicate-enum-values": "warn",
5
+ },
6
+ };
package/.prettierrc ADDED
@@ -0,0 +1,4 @@
1
+ {
2
+ "tabWidth": 2,
3
+ "useTabs": false
4
+ }
@@ -0,0 +1,20 @@
1
+
2
+ 
3
+ > @caravan/psbt@0.0.0 build
4
+ > tsup src/index.ts --format cjs,esm --dts
5
+
6
+ CLI Building entry: src/index.ts
7
+ CLI Using tsconfig: tsconfig.json
8
+ CLI tsup v7.2.0
9
+ CLI Using tsup config: /Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/tsup.config.ts
10
+ CLI Target: esnext
11
+ CJS Build start
12
+ ESM Build start
13
+ CJS dist/index.js 30.56 KB
14
+ CJS ⚡️ Build success in 44ms
15
+ ESM dist/index.mjs 28.77 KB
16
+ ESM ⚡️ Build success in 45ms
17
+ DTS Build start
18
+ DTS ⚡️ Build success in 962ms
19
+ DTS dist/index.d.ts 6.07 KB
20
+ DTS dist/index.d.mts 6.07 KB
@@ -0,0 +1,258 @@
1
+
2
+ 
3
+ > @caravan/psbt@0.0.0 ci
4
+ > npm run lint && npm run test
5
+
6
+
7
+ > @caravan/psbt@0.0.0 lint
8
+ > eslint src
9
+
10
+ 
11
+ /Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbt.ts
12
+  43:54 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
13
+  113:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
14
+  268:7 warning 'localPSBT' is never reassigned. Use 'const' instead prefer-const
15
+  376:7 warning 'psbt' is never reassigned. Use 'const' instead prefer-const
16
+  415:7 warning 'psbt' is never reassigned. Use 'const' instead prefer-const
17
+  430:13 warning 'signature' is never reassigned. Use 'const' instead prefer-const
18
+ 
19
+ /Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbtv2.test.ts
20
+  1025:42 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
21
+  1025:53 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
22
+  1082:45 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
23
+  1082:56 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
24
+ 
25
+ /Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbtv2.ts
26
+  47:3 warning Duplicate enum member value 01 @typescript-eslint/no-duplicate-enum-values
27
+  48:3 warning Duplicate enum member value 02 @typescript-eslint/no-duplicate-enum-values
28
+  49:3 warning Duplicate enum member value 03 @typescript-eslint/no-duplicate-enum-values
29
+  50:3 warning Duplicate enum member value 04 @typescript-eslint/no-duplicate-enum-values
30
+  51:3 warning Duplicate enum member value 05 @typescript-eslint/no-duplicate-enum-values
31
+  52:3 warning Duplicate enum member value 06 @typescript-eslint/no-duplicate-enum-values
32
+  71:3 warning Duplicate enum member value fc @typescript-eslint/no-duplicate-enum-values
33
+  73:3 warning Duplicate enum member value 00 @typescript-eslint/no-duplicate-enum-values
34
+  74:3 warning Duplicate enum member value 01 @typescript-eslint/no-duplicate-enum-values
35
+  75:3 warning Duplicate enum member value 02 @typescript-eslint/no-duplicate-enum-values
36
+  76:3 warning Duplicate enum member value 03 @typescript-eslint/no-duplicate-enum-values
37
+  77:3 warning Duplicate enum member value 04 @typescript-eslint/no-duplicate-enum-values
38
+  78:3 warning Duplicate enum member value 05 @typescript-eslint/no-duplicate-enum-values
39
+  79:3 warning Duplicate enum member value 06 @typescript-eslint/no-duplicate-enum-values
40
+  80:3 warning Duplicate enum member value 07 @typescript-eslint/no-duplicate-enum-values
41
+  81:3 warning Duplicate enum member value fc @typescript-eslint/no-duplicate-enum-values
42
+  296:9 warning 'bw' is never reassigned. Use 'const' instead prefer-const
43
+  438:9 warning 'modifiable' is never reassigned. Use 'const' instead prefer-const
44
+  781:9 warning 'heights' is never reassigned. Use 'const' instead prefer-const
45
+  782:9 warning 'times' is never reassigned. Use 'const' instead prefer-const
46
+  1225:9 warning 'txInputs' is never reassigned. Use 'const' instead prefer-const
47
+  1225:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
48
+  1247:9 warning 'txOutputs' is never reassigned. Use 'const' instead prefer-const
49
+  1247:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
50
+ 
51
+ ✖ 34 problems (0 errors, 34 warnings)
52
+  0 errors and 10 warnings potentially fixable with the `--fix` option.
53
+ 
54
+
55
+ > @caravan/psbt@0.0.0 test
56
+ > jest src
57
+
58
+ Determining test suites to run...
59
+
60
+ Test Suites: 0 of 2 total
61
+ Tests: 0 total
62
+ Snapshots: 0 total
63
+ Time: 0 s, estimated 6 s
64
+ ████████████████████████████████████████
65
+  RUNS  src/psbtv2.test.ts
66
+  RUNS  src/psbt.test.ts
67
+
68
+ Test Suites: 0 of 2 total
69
+ Tests: 0 total
70
+ Snapshots: 0 total
71
+ Time: 0 s, estimated 6 s
72
+ ████████████████████████████████████████
73
+  RUNS  src/psbtv2.test.ts
74
+  RUNS  src/psbt.test.ts
75
+
76
+ Test Suites: 0 of 2 total
77
+ Tests: 0 total
78
+ Snapshots: 0 total
79
+ Time: 1 s, estimated 6 s
80
+ ████████████████████████████████████████
81
+  RUNS  src/psbtv2.test.ts
82
+  RUNS  src/psbt.test.ts
83
+
84
+ Test Suites: 0 of 2 total
85
+ Tests: 0 total
86
+ Snapshots: 0 total
87
+ Time: 2 s, estimated 6 s
88
+ ████████████████████████████████████████
89
+  RUNS  src/psbtv2.test.ts
90
+  RUNS  src/psbt.test.ts
91
+
92
+ Test Suites: 0 of 2 total
93
+ Tests: 0 total
94
+ Snapshots: 0 total
95
+ Time: 3 s, estimated 6 s
96
+ ████████████████████████████████████████
97
+  RUNS  src/psbtv2.test.ts
98
+  RUNS  src/psbt.test.ts
99
+
100
+ Test Suites: 0 of 2 total
101
+ Tests: 0 total
102
+ Snapshots: 0 total
103
+ Time: 4 s, estimated 6 s
104
+ ████████████████████████████████████████
105
+  RUNS  src/psbtv2.test.ts
106
+  RUNS  src/psbt.test.ts
107
+
108
+ Test Suites: 0 of 2 total
109
+ Tests: 0 total
110
+ Snapshots: 0 total
111
+ Time: 5 s, estimated 6 s
112
+ ████████████████████████████████████████
113
+  RUNS  src/psbtv2.test.ts
114
+  RUNS  src/psbt.test.ts
115
+
116
+ Test Suites: 0 of 2 total
117
+ Tests: 14 passed, 14 total
118
+ Snapshots: 0 total
119
+ Time: 5 s, estimated 6 s
120
+ ████████████████████████████████████████
121
+
122
+  RUNS  src/psbtv2.test.ts
123
+  RUNS  src/psbt.test.ts
124
+
125
+ Test Suites: 0 of 2 total
126
+ Tests: 14 passed, 14 total
127
+ Snapshots: 0 total
128
+ Time: 5 s, estimated 6 s
129
+ ████████████████████████████████████████
130
+  RUNS  src/psbtv2.test.ts
131
+  RUNS  src/psbt.test.ts
132
+
133
+ Test Suites: 0 of 2 total
134
+ Tests: 14 passed, 14 total
135
+ Snapshots: 0 total
136
+ Time: 5 s, estimated 6 s
137
+ ████████████████████████████████████████
138
+  RUNS  src/psbtv2.test.ts
139
+
140
+ Test Suites: 1 passed, 1 of 2 total
141
+ Tests: 24 passed, 24 total
142
+ Snapshots: 0 total
143
+ Time: 5 s, estimated 6 s
144
+ ████████████████████████████████████████
145
+  RUNS  src/psbtv2.test.ts
146
+
147
+ Test Suites: 1 passed, 1 of 2 total
148
+ Tests: 101 passed, 101 total
149
+ Snapshots: 0 total
150
+ Time: 5 s, estimated 6 s
151
+ ████████████████████████████████████████
152
+
153
+  RUNS  src/psbtv2.test.ts
154
+
155
+ Test Suites: 1 passed, 1 of 2 total
156
+ Tests: 101 passed, 101 total
157
+ Snapshots: 0 total
158
+ Time: 5 s, estimated 6 s
159
+ ████████████████████████████████████████
160
+
161
+ console.warn
162
+  Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!
163
+ 
164
+    892 | // lifecycle defined for PsbtV2.
165
+    893 | public dangerouslySetGlobalTxVersion1() {
166
+  > 894 | console.warn("Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!");
167
+    | ^
168
+    895 | const bw = new BufferWriter();
169
+    896 | bw.writeI32(1);
170
+    897 | this.globalMap.set(KeyType.PSBT_GLOBAL_TX_VERSION, bw.render());
171
+ 
172
+  at PsbtV2.dangerouslySetGlobalTxVersion1 (src/psbtv2.ts:894:13)
173
+  at Function.FromV0 (src/psbtv2.ts:1208:14)
174
+  at t (src/psbtv2.test.ts:947:34)
175
+  at Object.<anonymous> (../../node_modules/expect/build/toThrowMatchers.js:74:11)
176
+  at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)
177
+  at src/psbtv2.test.ts:948:25
178
+
179
+ console.warn
180
+  Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!
181
+ 
182
+    892 | // lifecycle defined for PsbtV2.
183
+    893 | public dangerouslySetGlobalTxVersion1() {
184
+  > 894 | console.warn("Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!");
185
+    | ^
186
+    895 | const bw = new BufferWriter();
187
+    896 | bw.writeI32(1);
188
+    897 | this.globalMap.set(KeyType.PSBT_GLOBAL_TX_VERSION, bw.render());
189
+ 
190
+  at PsbtV2.dangerouslySetGlobalTxVersion1 (src/psbtv2.ts:894:13)
191
+  at Function.FromV0 (src/psbtv2.ts:1208:14)
192
+  at t (src/psbtv2.test.ts:947:34)
193
+  at Object.<anonymous> (../../node_modules/expect/build/toThrowMatchers.js:74:11)
194
+  at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)
195
+  at src/psbtv2.test.ts:948:25
196
+
197
+ console.warn
198
+  Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!
199
+ 
200
+    892 | // lifecycle defined for PsbtV2.
201
+    893 | public dangerouslySetGlobalTxVersion1() {
202
+  > 894 | console.warn("Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!");
203
+    | ^
204
+    895 | const bw = new BufferWriter();
205
+    896 | bw.writeI32(1);
206
+    897 | this.globalMap.set(KeyType.PSBT_GLOBAL_TX_VERSION, bw.render());
207
+ 
208
+  at PsbtV2.dangerouslySetGlobalTxVersion1 (src/psbtv2.ts:894:13)
209
+  at Function.FromV0 (src/psbtv2.ts:1208:14)
210
+  at src/psbtv2.test.ts:959:25
211
+
212
+ console.error
213
+  Error: 
214
+  at PsbtV2.<anonymous> (/Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbtv2.test.ts:1044:13)
215
+  at /Users/atreides/repos/caravan-monorepo/node_modules/jest-mock/build/index.js:397:39
216
+  at PsbtV2.<anonymous> (/Users/atreides/repos/caravan-monorepo/node_modules/jest-mock/build/index.js:404:13)
217
+  at PsbtV2.mockConstructor [as handleSighashType] (/Users/atreides/repos/caravan-monorepo/node_modules/jest-mock/build/index.js:148:19)
218
+  at PsbtV2.addPartialSig (/Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbtv2.ts:1120:12)
219
+  at Object.<anonymous> (/Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbtv2.test.ts:1049:10)
220
+  at Promise.then.completed (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/utils.js:298:28)
221
+  at new Promise (<anonymous>)
222
+  at callAsyncCircusFn (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/utils.js:231:10)
223
+  at _callCircusTest (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/run.js:316:40)
224
+  at processTicksAndRejections (node:internal/process/task_queues:95:5)
225
+  at _runTest (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/run.js:252:3)
226
+  at _runTestsForDescribeBlock (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/run.js:126:9)
227
+  at _runTestsForDescribeBlock (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/run.js:121:9)
228
+  at run (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/run.js:71:3)
229
+  at runAndTransformResultsToJestFormat (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
230
+  at jestAdapter (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
231
+  at runTestInternal (/Users/atreides/repos/caravan-monorepo/node_modules/jest-runner/build/runTest.js:367:16)
232
+  at runTest (/Users/atreides/repos/caravan-monorepo/node_modules/jest-runner/build/runTest.js:444:34)
233
+  at Object.worker (/Users/atreides/repos/caravan-monorepo/node_modules/jest-runner/build/testWorker.js:106:12)
234
+ 
235
+    1120 | this.handleSighashType(sig);
236
+    1121 | } catch (err) {
237
+  > 1122 | console.error(err);
238
+    | ^
239
+    1123 | // To remain atomic, attempt to reset everything to the way it was.
240
+    1124 | this.inputMaps[inputIndex].delete(key);
241
+    1125 | this.PSBT_GLOBAL_TX_MODIFIABLE = modBackup;
242
+ 
243
+  at PsbtV2.addPartialSig (src/psbtv2.ts:1122:15)
244
+  at Object.<anonymous> (src/psbtv2.test.ts:1049:10)
245
+
246
+
247
+  RUNS  src/psbtv2.test.ts
248
+
249
+ Test Suites: 1 passed, 1 of 2 total
250
+ Tests: 101 passed, 101 total
251
+ Snapshots: 0 total
252
+ Time: 5 s, estimated 6 s
253
+ ████████████████████████████████████████
254
+ Test Suites: 2 passed, 2 total
255
+ Tests: 177 passed, 177 total
256
+ Snapshots: 0 total
257
+ Time: 5.726 s, estimated 6 s
258
+ Ran all test suites matching /src/i.
@@ -0,0 +1,49 @@
1
+
2
+ 
3
+ > @caravan/psbt@0.0.0 lint
4
+ > eslint src
5
+
6
+ 
7
+ /Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbt.ts
8
+  43:54 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
9
+  113:23 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
10
+  268:7 warning 'localPSBT' is never reassigned. Use 'const' instead prefer-const
11
+  376:7 warning 'psbt' is never reassigned. Use 'const' instead prefer-const
12
+  415:7 warning 'psbt' is never reassigned. Use 'const' instead prefer-const
13
+  430:13 warning 'signature' is never reassigned. Use 'const' instead prefer-const
14
+ 
15
+ /Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbtv2.test.ts
16
+  1025:42 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
17
+  1025:53 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
18
+  1082:45 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
19
+  1082:56 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
20
+ 
21
+ /Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbtv2.ts
22
+  47:3 warning Duplicate enum member value 01 @typescript-eslint/no-duplicate-enum-values
23
+  48:3 warning Duplicate enum member value 02 @typescript-eslint/no-duplicate-enum-values
24
+  49:3 warning Duplicate enum member value 03 @typescript-eslint/no-duplicate-enum-values
25
+  50:3 warning Duplicate enum member value 04 @typescript-eslint/no-duplicate-enum-values
26
+  51:3 warning Duplicate enum member value 05 @typescript-eslint/no-duplicate-enum-values
27
+  52:3 warning Duplicate enum member value 06 @typescript-eslint/no-duplicate-enum-values
28
+  71:3 warning Duplicate enum member value fc @typescript-eslint/no-duplicate-enum-values
29
+  73:3 warning Duplicate enum member value 00 @typescript-eslint/no-duplicate-enum-values
30
+  74:3 warning Duplicate enum member value 01 @typescript-eslint/no-duplicate-enum-values
31
+  75:3 warning Duplicate enum member value 02 @typescript-eslint/no-duplicate-enum-values
32
+  76:3 warning Duplicate enum member value 03 @typescript-eslint/no-duplicate-enum-values
33
+  77:3 warning Duplicate enum member value 04 @typescript-eslint/no-duplicate-enum-values
34
+  78:3 warning Duplicate enum member value 05 @typescript-eslint/no-duplicate-enum-values
35
+  79:3 warning Duplicate enum member value 06 @typescript-eslint/no-duplicate-enum-values
36
+  80:3 warning Duplicate enum member value 07 @typescript-eslint/no-duplicate-enum-values
37
+  81:3 warning Duplicate enum member value fc @typescript-eslint/no-duplicate-enum-values
38
+  296:9 warning 'bw' is never reassigned. Use 'const' instead prefer-const
39
+  438:9 warning 'modifiable' is never reassigned. Use 'const' instead prefer-const
40
+  781:9 warning 'heights' is never reassigned. Use 'const' instead prefer-const
41
+  782:9 warning 'times' is never reassigned. Use 'const' instead prefer-const
42
+  1225:9 warning 'txInputs' is never reassigned. Use 'const' instead prefer-const
43
+  1225:19 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
44
+  1247:9 warning 'txOutputs' is never reassigned. Use 'const' instead prefer-const
45
+  1247:20 warning Unexpected any. Specify a different type @typescript-eslint/no-explicit-any
46
+ 
47
+ ✖ 34 problems (0 errors, 34 warnings)
48
+  0 errors and 10 warnings potentially fixable with the `--fix` option.
49
+ 
@@ -0,0 +1,223 @@
1
+
2
+ 
3
+ > @caravan/psbt@0.0.0 test:watch
4
+ > jest --watch src
5
+
6
+ Determining test suites to run...
7
+
8
+ Test Suites: 0 of 2 total
9
+ Tests: 0 total
10
+ Snapshots: 0 total
11
+ Time: 0 s, estimated 6 s
12
+ ████████████████████████████████████████
13
+  RUNS  src/psbtv2.test.ts
14
+  RUNS  src/psbt.test.ts
15
+
16
+ Test Suites: 0 of 2 total
17
+ Tests: 0 total
18
+ Snapshots: 0 total
19
+ Time: 0 s, estimated 6 s
20
+ ████████████████████████████████████████
21
+  RUNS  src/psbtv2.test.ts
22
+  RUNS  src/psbt.test.ts
23
+
24
+ Test Suites: 0 of 2 total
25
+ Tests: 0 total
26
+ Snapshots: 0 total
27
+ Time: 1 s, estimated 6 s
28
+ ████████████████████████████████████████
29
+  RUNS  src/psbtv2.test.ts
30
+  RUNS  src/psbt.test.ts
31
+
32
+ Test Suites: 0 of 2 total
33
+ Tests: 0 total
34
+ Snapshots: 0 total
35
+ Time: 2 s, estimated 6 s
36
+ ████████████████████████████████████████
37
+  RUNS  src/psbtv2.test.ts
38
+  RUNS  src/psbt.test.ts
39
+
40
+ Test Suites: 0 of 2 total
41
+ Tests: 0 total
42
+ Snapshots: 0 total
43
+ Time: 3 s, estimated 6 s
44
+ ████████████████████████████████████████
45
+  RUNS  src/psbtv2.test.ts
46
+  RUNS  src/psbt.test.ts
47
+
48
+ Test Suites: 0 of 2 total
49
+ Tests: 0 total
50
+ Snapshots: 0 total
51
+ Time: 4 s, estimated 6 s
52
+ ████████████████████████████████████████
53
+  RUNS  src/psbtv2.test.ts
54
+  RUNS  src/psbt.test.ts
55
+
56
+ Test Suites: 0 of 2 total
57
+ Tests: 0 total
58
+ Snapshots: 0 total
59
+ Time: 5 s, estimated 6 s
60
+ ████████████████████████████████████████
61
+  RUNS  src/psbtv2.test.ts
62
+  RUNS  src/psbt.test.ts
63
+
64
+ Test Suites: 0 of 2 total
65
+ Tests: 0 total
66
+ Snapshots: 0 total
67
+ Time: 6 s
68
+  RUNS  src/psbtv2.test.ts
69
+  RUNS  src/psbt.test.ts
70
+
71
+ Test Suites: 0 of 2 total
72
+ Tests: 18 passed, 18 total
73
+ Snapshots: 0 total
74
+ Time: 6 s
75
+
76
+  RUNS  src/psbtv2.test.ts
77
+  RUNS  src/psbt.test.ts
78
+
79
+ Test Suites: 0 of 2 total
80
+ Tests: 18 passed, 18 total
81
+ Snapshots: 0 total
82
+ Time: 6 s
83
+  RUNS  src/psbtv2.test.ts
84
+  RUNS  src/psbt.test.ts
85
+
86
+ Test Suites: 0 of 2 total
87
+ Tests: 18 passed, 18 total
88
+ Snapshots: 0 total
89
+ Time: 6 s
90
+  RUNS  src/psbtv2.test.ts
91
+
92
+ Test Suites: 1 passed, 1 of 2 total
93
+ Tests: 125 passed, 125 total
94
+ Snapshots: 0 total
95
+ Time: 6 s
96
+  RUNS  src/psbtv2.test.ts
97
+
98
+ Test Suites: 1 passed, 1 of 2 total
99
+ Tests: 144 passed, 144 total
100
+ Snapshots: 0 total
101
+ Time: 6 s
102
+
103
+  RUNS  src/psbtv2.test.ts
104
+
105
+ Test Suites: 1 passed, 1 of 2 total
106
+ Tests: 144 passed, 144 total
107
+ Snapshots: 0 total
108
+ Time: 6 s
109
+
110
+ console.warn
111
+  Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!
112
+ 
113
+    892 | // lifecycle defined for PsbtV2.
114
+    893 | public dangerouslySetGlobalTxVersion1() {
115
+  > 894 | console.warn("Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!");
116
+    | ^
117
+    895 | const bw = new BufferWriter();
118
+    896 | bw.writeI32(1);
119
+    897 | this.globalMap.set(KeyType.PSBT_GLOBAL_TX_VERSION, bw.render());
120
+ 
121
+  at PsbtV2.dangerouslySetGlobalTxVersion1 (src/psbtv2.ts:894:13)
122
+  at Function.FromV0 (src/psbtv2.ts:1208:14)
123
+  at t (src/psbtv2.test.ts:947:34)
124
+  at Object.<anonymous> (../../node_modules/expect/build/toThrowMatchers.js:74:11)
125
+  at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)
126
+  at src/psbtv2.test.ts:948:25
127
+
128
+ console.warn
129
+  Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!
130
+ 
131
+    892 | // lifecycle defined for PsbtV2.
132
+    893 | public dangerouslySetGlobalTxVersion1() {
133
+  > 894 | console.warn("Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!");
134
+    | ^
135
+    895 | const bw = new BufferWriter();
136
+    896 | bw.writeI32(1);
137
+    897 | this.globalMap.set(KeyType.PSBT_GLOBAL_TX_VERSION, bw.render());
138
+ 
139
+  at PsbtV2.dangerouslySetGlobalTxVersion1 (src/psbtv2.ts:894:13)
140
+  at Function.FromV0 (src/psbtv2.ts:1208:14)
141
+  at t (src/psbtv2.test.ts:947:34)
142
+  at Object.<anonymous> (../../node_modules/expect/build/toThrowMatchers.js:74:11)
143
+  at Object.throwingMatcher [as toThrow] (../../node_modules/expect/build/index.js:320:21)
144
+  at src/psbtv2.test.ts:948:25
145
+
146
+ console.warn
147
+  Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!
148
+ 
149
+    892 | // lifecycle defined for PsbtV2.
150
+    893 | public dangerouslySetGlobalTxVersion1() {
151
+  > 894 | console.warn("Dangerously setting PsbtV2.PSBT_GLOBAL_TX_VERSION to 1!");
152
+    | ^
153
+    895 | const bw = new BufferWriter();
154
+    896 | bw.writeI32(1);
155
+    897 | this.globalMap.set(KeyType.PSBT_GLOBAL_TX_VERSION, bw.render());
156
+ 
157
+  at PsbtV2.dangerouslySetGlobalTxVersion1 (src/psbtv2.ts:894:13)
158
+  at Function.FromV0 (src/psbtv2.ts:1208:14)
159
+  at src/psbtv2.test.ts:959:25
160
+
161
+ console.error
162
+  Error: 
163
+  at PsbtV2.<anonymous> (/Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbtv2.test.ts:1044:13)
164
+  at /Users/atreides/repos/caravan-monorepo/node_modules/jest-mock/build/index.js:397:39
165
+  at PsbtV2.<anonymous> (/Users/atreides/repos/caravan-monorepo/node_modules/jest-mock/build/index.js:404:13)
166
+  at PsbtV2.mockConstructor [as handleSighashType] (/Users/atreides/repos/caravan-monorepo/node_modules/jest-mock/build/index.js:148:19)
167
+  at PsbtV2.addPartialSig (/Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbtv2.ts:1120:12)
168
+  at Object.<anonymous> (/Users/atreides/repos/caravan-monorepo/packages/caravan-psbt/src/psbtv2.test.ts:1049:10)
169
+  at Promise.then.completed (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/utils.js:298:28)
170
+  at new Promise (<anonymous>)
171
+  at callAsyncCircusFn (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/utils.js:231:10)
172
+  at _callCircusTest (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/run.js:316:40)
173
+  at processTicksAndRejections (node:internal/process/task_queues:95:5)
174
+  at _runTest (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/run.js:252:3)
175
+  at _runTestsForDescribeBlock (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/run.js:126:9)
176
+  at _runTestsForDescribeBlock (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/run.js:121:9)
177
+  at run (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/run.js:71:3)
178
+  at runAndTransformResultsToJestFormat (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapterInit.js:122:21)
179
+  at jestAdapter (/Users/atreides/repos/caravan-monorepo/node_modules/jest-circus/build/legacy-code-todo-rewrite/jestAdapter.js:79:19)
180
+  at runTestInternal (/Users/atreides/repos/caravan-monorepo/node_modules/jest-runner/build/runTest.js:367:16)
181
+  at runTest (/Users/atreides/repos/caravan-monorepo/node_modules/jest-runner/build/runTest.js:444:34)
182
+  at Object.worker (/Users/atreides/repos/caravan-monorepo/node_modules/jest-runner/build/testWorker.js:106:12)
183
+ 
184
+    1120 | this.handleSighashType(sig);
185
+    1121 | } catch (err) {
186
+  > 1122 | console.error(err);
187
+    | ^
188
+    1123 | // To remain atomic, attempt to reset everything to the way it was.
189
+    1124 | this.inputMaps[inputIndex].delete(key);
190
+    1125 | this.PSBT_GLOBAL_TX_MODIFIABLE = modBackup;
191
+ 
192
+  at PsbtV2.addPartialSig (src/psbtv2.ts:1122:15)
193
+  at Object.<anonymous> (src/psbtv2.test.ts:1049:10)
194
+
195
+
196
+  RUNS  src/psbtv2.test.ts
197
+
198
+ Test Suites: 1 passed, 1 of 2 total
199
+ Tests: 144 passed, 144 total
200
+ Snapshots: 0 total
201
+ Time: 6 s
202
+
203
+ Test Suites: 2 passed, 2 total
204
+ Tests: 177 passed, 177 total
205
+ Snapshots: 0 total
206
+ Time: 6 s
207
+ Test Suites: 2 passed, 2 total
208
+ Tests: 177 passed, 177 total
209
+ Snapshots: 0 total
210
+ Time: 6.826 s
211
+ Ran all test suites matching /src/i.
212
+
213
+ Active Filters: filename /src/
214
+  › Press c to clear filters.
215
+
216
+ Watch Usage
217
+  › Press a to run all tests.
218
+  › Press f to run only failed tests.
219
+  › Press o to only run tests related to changed files.
220
+  › Press p to filter by a filename regex pattern.
221
+  › Press t to filter by a test name regex pattern.
222
+  › Press q to quit watch mode.
223
+  › Press Enter to trigger a test run.