@bitgo-beta/unspents 0.13.2-beta.154 → 0.13.2-beta.1541

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.
Files changed (41) hide show
  1. package/README.md +0 -9
  2. package/dist/bin/generate_tables.js +25 -12
  3. package/dist/src/codes.d.ts +10 -10
  4. package/dist/src/codes.d.ts.map +1 -1
  5. package/dist/src/codes.js +27 -13
  6. package/dist/src/dimensions.d.ts +16 -17
  7. package/dist/src/dimensions.d.ts.map +1 -1
  8. package/dist/src/dimensions.js +38 -21
  9. package/dist/src/index.d.ts +1 -0
  10. package/dist/src/index.d.ts.map +1 -1
  11. package/dist/src/index.js +26 -10
  12. package/dist/src/inputWeights.d.ts +3 -3
  13. package/dist/src/inputWeights.d.ts.map +1 -1
  14. package/dist/src/inputWeights.js +6 -6
  15. package/dist/src/scriptSizes.js +3 -4
  16. package/dist/src/types.js +23 -9
  17. package/dist/src/virtualSizes.d.ts +12 -12
  18. package/dist/src/virtualSizes.js +2 -2
  19. package/dist/src/zcash.js +4 -6
  20. package/dist/test/dimensions.js +39 -15
  21. package/dist/test/signedTx/inputWeights.js +27 -13
  22. package/dist/test/signedTx/txCombinations.d.ts +1 -1
  23. package/dist/test/signedTx/txCombinations.d.ts.map +1 -1
  24. package/dist/test/signedTx/txCombinations.js +29 -15
  25. package/dist/test/signedTx/txGen.d.ts +2 -3
  26. package/dist/test/signedTx/txGen.d.ts.map +1 -1
  27. package/dist/test/signedTx/txGen.js +26 -12
  28. package/dist/test/testutils.d.ts +2 -2
  29. package/dist/test/testutils.d.ts.map +1 -1
  30. package/dist/test/testutils.js +28 -14
  31. package/dist/test/zcash.js +8 -8
  32. package/dist/tsconfig.build.tsbuildinfo +1 -1
  33. package/dist/tsconfig.tsbuildinfo +1 -1
  34. package/package.json +7 -4
  35. package/.eslintignore +0 -1
  36. package/.eslintrc.js +0 -3
  37. package/.mocharc.js +0 -6
  38. package/.prettierrc.yml +0 -3
  39. package/CHANGELOG.md +0 -347
  40. package/bin/generate_tables.ts +0 -94
  41. package/docs/input-costs.md +0 -13
package/CHANGELOG.md DELETED
@@ -1,347 +0,0 @@
1
- # Change Log
2
-
3
- All notable changes to this project will be documented in this file.
4
- See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
-
6
- # [0.28.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.28.0) (2023-10-20)
7
-
8
- ### Bug Fixes
9
-
10
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
11
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
12
-
13
- ### Features
14
-
15
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
16
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
17
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
18
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
19
-
20
- # [0.27.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.27.0) (2023-10-18)
21
-
22
- ### Bug Fixes
23
-
24
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
25
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
26
-
27
- ### Features
28
-
29
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
30
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
31
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
32
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
33
-
34
- # [0.26.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.26.0) (2023-09-25)
35
-
36
- ### Bug Fixes
37
-
38
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
39
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
40
-
41
- ### Features
42
-
43
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
44
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
45
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
46
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
47
-
48
- # [0.25.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.25.0) (2023-09-09)
49
-
50
- ### Bug Fixes
51
-
52
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
53
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
54
-
55
- ### Features
56
-
57
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
58
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
59
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
60
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
61
-
62
- # [0.24.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.24.0) (2023-09-09)
63
-
64
- ### Bug Fixes
65
-
66
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
67
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
68
-
69
- ### Features
70
-
71
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
72
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
73
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
74
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
75
-
76
- # [0.23.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.23.0) (2023-09-07)
77
-
78
- ### Bug Fixes
79
-
80
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
81
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
82
-
83
- ### Features
84
-
85
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
86
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
87
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
88
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
89
-
90
- # [0.22.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.22.0) (2023-09-05)
91
-
92
- ### Bug Fixes
93
-
94
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
95
-
96
- ### Features
97
-
98
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
99
-
100
- # [0.21.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.21.0) (2023-09-01)
101
-
102
- ### Bug Fixes
103
-
104
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
105
-
106
- ### Features
107
-
108
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
109
-
110
- # [0.20.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.20.0) (2023-08-29)
111
-
112
- ### Features
113
-
114
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
115
-
116
- # [0.19.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.19.0) (2023-08-25)
117
-
118
- ### Features
119
-
120
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
121
-
122
- # [0.18.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.18.0) (2023-08-24)
123
-
124
- ### Features
125
-
126
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
127
-
128
- ## [0.17.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.17.2) (2023-08-16)
129
-
130
- **Note:** Version bump only for package @bitgo/unspents
131
-
132
- ## [0.17.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.17.1) (2023-08-16)
133
-
134
- **Note:** Version bump only for package @bitgo/unspents
135
-
136
- # [0.17.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.4...@bitgo/unspents@0.17.0) (2023-08-04)
137
-
138
- ### Features
139
-
140
- - **unspents:** add docs/input-costs.md, generation tool ([aa843da](https://github.com/BitGo/BitGoJS/commit/aa843da4ac4c538073c0244334500511998c0423))
141
- - **unspents:** fix unspents module setup ([687f4c3](https://github.com/BitGo/BitGoJS/commit/687f4c3c29885b1e5b5bf9d79782d265937d6f1d)), closes [#3651](https://github.com/BitGo/BitGoJS/issues/3651)
142
-
143
- # [0.16.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.4...@bitgo/unspents@0.16.0) (2023-07-28)
144
-
145
- ### Features
146
-
147
- - **unspents:** add docs/input-costs.md, generation tool ([aa843da](https://github.com/BitGo/BitGoJS/commit/aa843da4ac4c538073c0244334500511998c0423))
148
- - **unspents:** fix unspents module setup ([687f4c3](https://github.com/BitGo/BitGoJS/commit/687f4c3c29885b1e5b5bf9d79782d265937d6f1d)), closes [#3651](https://github.com/BitGo/BitGoJS/issues/3651)
149
-
150
- ## [0.15.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.3...@bitgo/unspents@0.15.4) (2023-07-18)
151
-
152
- **Note:** Version bump only for package @bitgo/unspents
153
-
154
- ## [0.15.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.2...@bitgo/unspents@0.15.3) (2023-06-21)
155
-
156
- **Note:** Version bump only for package @bitgo/unspents
157
-
158
- ## [0.15.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.1...@bitgo/unspents@0.15.2) (2023-06-13)
159
-
160
- **Note:** Version bump only for package @bitgo/unspents
161
-
162
- ## [0.15.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.0...@bitgo/unspents@0.15.1) (2023-06-07)
163
-
164
- **Note:** Version bump only for package @bitgo/unspents
165
-
166
- # [0.15.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.14.2...@bitgo/unspents@0.15.0) (2023-06-05)
167
-
168
- ### Bug Fixes
169
-
170
- - **utxo-lib:** use PsbtInput instead of UtxoPsbt ([1f73539](https://github.com/BitGo/BitGoJS/commit/1f73539409cf69fc55ab8aedb9d8873bb82bc375))
171
-
172
- ### BREAKING CHANGES
173
-
174
- - **utxo-lib:** functions signature is changed
175
-
176
- ## [0.14.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.14.1...@bitgo/unspents@0.14.2) (2023-05-25)
177
-
178
- **Note:** Version bump only for package @bitgo/unspents
179
-
180
- ## [0.14.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.14.0...@bitgo/unspents@0.14.1) (2023-05-17)
181
-
182
- ### Bug Fixes
183
-
184
- - **bitgo:** drone is no longer used in this repo so can safely be removed ([badc0de](https://github.com/BitGo/BitGoJS/commit/badc0ded6870f56a0dc3925eba639b0fdb313c2b)), closes [#3554](https://github.com/BitGo/BitGoJS/issues/3554) [#3554](https://github.com/BitGo/BitGoJS/issues/3554)
185
-
186
- # [0.14.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.13.2...@bitgo/unspents@0.14.0) (2023-05-10)
187
-
188
- ### Features
189
-
190
- - **utxo-lib:** add musig2 nonce at input index ([9991d3f](https://github.com/BitGo/BitGoJS/commit/9991d3ff4fbecc326c8fc67e523a5108843a0f9d))
191
-
192
- ## [0.13.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.13.1...@bitgo/unspents@0.13.2) (2023-05-03)
193
-
194
- **Note:** Version bump only for package @bitgo/unspents
195
-
196
- ## [0.13.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.13.0...@bitgo/unspents@0.13.1) (2023-04-25)
197
-
198
- **Note:** Version bump only for package @bitgo/unspents
199
-
200
- # [0.13.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.12.0...@bitgo/unspents@0.13.0) (2023-04-20)
201
-
202
- ### Features
203
-
204
- - **unspents:** unsigned psbt dimensions can be calculated ([427cc36](https://github.com/BitGo/BitGoJS/commit/427cc36f33842cb4372292dc69fe2f23fde78876))
205
-
206
- # [0.12.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.12...@bitgo/unspents@0.12.0) (2023-04-13)
207
-
208
- ### Features
209
-
210
- - **unspents:** add dimensions for psbt ([b125034](https://github.com/BitGo/BitGoJS/commit/b125034d83d1e613e9a7036f9b4d805d6f57c3f7))
211
- - **unspents:** add p2trMusig2 to dimensions ([de460ad](https://github.com/BitGo/BitGoJS/commit/de460ad5c43f936458b7af6524cefad3d5f94914))
212
- - **utxo-lib:** create p2tr address using musig2 ([699e829](https://github.com/BitGo/BitGoJS/commit/699e8291f4a205ba0b2071c6369f2c8843b8a945))
213
- - **utxo-lib:** create p2trMusig2 nonce using derived key ([a0cd1f1](https://github.com/BitGo/BitGoJS/commit/a0cd1f1b67b4e013a53362d3e01aa8818a1a9b33))
214
- - **utxo-lib:** introduce ParsedScriptType ([3c28bbc](https://github.com/BitGo/BitGoJS/commit/3c28bbc4baada5b614ef5893301059b51b324ce2))
215
- - **utxo-lib:** parse p2trMusig2 key path witness ([ecb4c31](https://github.com/BitGo/BitGoJS/commit/ecb4c3127343b613cc6ae02bc1cd971d2e032954))
216
-
217
- ## [0.11.12](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.9...@bitgo/unspents@0.11.12) (2023-02-16)
218
-
219
- **Note:** Version bump only for package @bitgo/unspents
220
-
221
- ## [0.11.11](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.9...@bitgo/unspents@0.11.11) (2023-02-08)
222
-
223
- **Note:** Version bump only for package @bitgo/unspents
224
-
225
- ## [0.11.10](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.9...@bitgo/unspents@0.11.10) (2023-01-30)
226
-
227
- **Note:** Version bump only for package @bitgo/unspents
228
-
229
- ## [0.11.9](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.8...@bitgo/unspents@0.11.9) (2023-01-25)
230
-
231
- **Note:** Version bump only for package @bitgo/unspents
232
-
233
- ## [0.11.8](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.7...@bitgo/unspents@0.11.8) (2022-12-23)
234
-
235
- **Note:** Version bump only for package @bitgo/unspents
236
-
237
- ## [0.11.7](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.6...@bitgo/unspents@0.11.7) (2022-12-20)
238
-
239
- **Note:** Version bump only for package @bitgo/unspents
240
-
241
- ## [0.11.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.5...@bitgo/unspents@0.11.6) (2022-12-06)
242
-
243
- **Note:** Version bump only for package @bitgo/unspents
244
-
245
- ## [0.11.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.5) (2022-11-29)
246
-
247
- **Note:** Version bump only for package @bitgo/unspents
248
-
249
- ## [0.11.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.4) (2022-11-04)
250
-
251
- **Note:** Version bump only for package @bitgo/unspents
252
-
253
- ## [0.11.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.2) (2022-10-27)
254
-
255
- **Note:** Version bump only for package @bitgo/unspents
256
-
257
- ## [0.11.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.1) (2022-10-25)
258
-
259
- **Note:** Version bump only for package @bitgo/unspents
260
-
261
- # [0.11.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.15...@bitgo/unspents@0.11.0) (2022-10-18)
262
-
263
- ### Bug Fixes
264
-
265
- - **core:** fix bip32/ecpair, API vs Interface ([bec9c1e](https://github.com/BitGo/BitGoJS/commit/bec9c1e6ff0c23108dc27e171abdd3e4d2cfdfb1))
266
- - **root:** align versions of bitcoinjs-lib ([b7eb929](https://github.com/BitGo/BitGoJS/commit/b7eb92998836a5945627ef1c80d74414b11f4867))
267
- - **unspents:** remove bitcoinjs-lib.d.ts ([e4447d4](https://github.com/BitGo/BitGoJS/commit/e4447d4c815050fc405bf766d93f2246b90835c8))
268
- - **unspents:** use new bip32/BIP32Interface in tests ([9de0c78](https://github.com/BitGo/BitGoJS/commit/9de0c7855111e995a2f75709d16901c1760a7511))
269
-
270
- ### Features
271
-
272
- - update to work with bitcoinjs-lib@6 ([1950934](https://github.com/BitGo/BitGoJS/commit/1950934d9426385ee12b204cc7456327e4480618))
273
- - **utxo-lib:** export BIP32/ECPair interfaces ([8628507](https://github.com/BitGo/BitGoJS/commit/862850781b2e8b36c71608c5ae71424b9ebe9dee))
274
-
275
- ## [0.8.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.15...@bitgo/unspents@0.8.3) (2022-07-19)
276
-
277
- **Note:** Version bump only for package @bitgo/unspents
278
-
279
- # [0.8.0-rc.15](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.14...@bitgo/unspents@0.8.0-rc.15) (2022-07-11)
280
-
281
- **Note:** Version bump only for package @bitgo/unspents
282
-
283
- # [0.8.0-rc.14](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.13...@bitgo/unspents@0.8.0-rc.14) (2022-06-23)
284
-
285
- **Note:** Version bump only for package @bitgo/unspents
286
-
287
- # [0.8.0-rc.13](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.12...@bitgo/unspents@0.8.0-rc.13) (2022-06-22)
288
-
289
- ### Bug Fixes
290
-
291
- - add dependency check to fix current and future dependency resolutions ([3074335](https://github.com/BitGo/BitGoJS/commit/30743356cff4ebb6d9e185f1a493b187614a1ea9))
292
-
293
- # [0.8.0-rc.12](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.11...@bitgo/unspents@0.8.0-rc.12) (2022-06-16)
294
-
295
- **Note:** Version bump only for package @bitgo/unspents
296
-
297
- # [0.8.0-rc.11](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.10...@bitgo/unspents@0.8.0-rc.11) (2022-06-13)
298
-
299
- **Note:** Version bump only for package @bitgo/unspents
300
-
301
- # [0.8.0-rc.10](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.9...@bitgo/unspents@0.8.0-rc.10) (2022-06-07)
302
-
303
- **Note:** Version bump only for package @bitgo/unspents
304
-
305
- # [0.8.0-rc.9](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.8...@bitgo/unspents@0.8.0-rc.9) (2022-06-01)
306
-
307
- **Note:** Version bump only for package @bitgo/unspents
308
-
309
- # [0.8.0-rc.8](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.7...@bitgo/unspents@0.8.0-rc.8) (2022-05-17)
310
-
311
- **Note:** Version bump only for package @bitgo/unspents
312
-
313
- # [0.8.0-rc.7](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.6...@bitgo/unspents@0.8.0-rc.7) (2022-05-16)
314
-
315
- **Note:** Version bump only for package @bitgo/unspents
316
-
317
- # [0.8.0-rc.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.5...@bitgo/unspents@0.8.0-rc.6) (2022-05-12)
318
-
319
- **Note:** Version bump only for package @bitgo/unspents
320
-
321
- # [0.8.0-rc.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.2...@bitgo/unspents@0.8.0-rc.3) (2022-04-19)
322
-
323
- **Note:** Version bump only for package @bitgo/unspents
324
-
325
- ## [0.7.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.2...@bitgo/unspents@0.7.4) (2022-04-06)
326
-
327
- **Note:** Version bump only for package @bitgo/unspents
328
-
329
- ## [0.7.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.2...@bitgo/unspents@0.7.3) (2022-04-05)
330
-
331
- **Note:** Version bump only for package @bitgo/unspents
332
-
333
- # [0.8.0-rc.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.2...@bitgo/unspents@0.8.0-rc.2) (2022-04-05)
334
-
335
- **Note:** Version bump only for package @bitgo/unspents
336
-
337
- # [0.8.0-rc.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.2...@bitgo/unspents@0.8.0-rc.3) (2022-04-05)
338
-
339
- **Note:** Version bump only for package @bitgo/unspents
340
-
341
- # [0.8.0-rc.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.2...@bitgo/unspents@0.8.0-rc.2) (2022-04-05)
342
-
343
- **Note:** Version bump only for package @bitgo/unspents
344
-
345
- # [0.8.0-rc.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.2...@bitgo/unspents@0.8.0-rc.2) (2022-04-05)
346
-
347
- **Note:** Version bump only for package @bitgo/unspents
@@ -1,94 +0,0 @@
1
- import * as fs from 'fs/promises';
2
- import * as utxolib from '@bitgo-beta/utxo-lib';
3
-
4
- import { Dimensions } from '../src';
5
-
6
- const headers = [
7
- 'Script Type',
8
- 'Chain Codes',
9
- 'Spend Type',
10
- 'Input Size (Virtual Bytes)',
11
- 'Relative Size (p2trMusig2 = 1.00)',
12
- ];
13
-
14
- const relativeCostRef = Dimensions.fromScriptType('taprootKeyPathSpend').getInputsVSize();
15
-
16
- type Row = [string, string, string, string, string];
17
-
18
- function formatMarkdownTable(headers: string[], rows: string[][]): string {
19
- return [headers, headers.map(() => '---'), ...rows].map((row) => `| ${row.join(' | ')} |`).join('\n');
20
- }
21
-
22
- function generateRowsForScriptType(
23
- headers: string[],
24
- t: utxolib.bitgo.outputScripts.ScriptType2Of3,
25
- params?: {
26
- spendTypeName: string;
27
- scriptTypeParams: { scriptPathLevel?: number };
28
- }
29
- ): Row[] {
30
- const chainCode = utxolib.bitgo.toChainPair(t);
31
-
32
- if (!params) {
33
- if (t === 'p2tr') {
34
- return [
35
- ...generateRowsForScriptType(headers, t, {
36
- spendTypeName: 'Script Path, Level 2 (Backup/User, Backup/BitGo)',
37
- scriptTypeParams: { scriptPathLevel: 2 },
38
- }),
39
- ...generateRowsForScriptType(headers, t, {
40
- spendTypeName: 'Script Path, Level 1 (User/BitGo)',
41
- scriptTypeParams: { scriptPathLevel: 1 },
42
- }),
43
- ];
44
- }
45
-
46
- if (t === 'p2trMusig2') {
47
- return [
48
- ...generateRowsForScriptType(headers, t, {
49
- spendTypeName: 'Script Path (Backup/User, Backup/BitGo)',
50
- scriptTypeParams: { scriptPathLevel: 1 },
51
- }),
52
- ...generateRowsForScriptType(headers, t, {
53
- spendTypeName: 'Key Path (User/BitGo)',
54
- scriptTypeParams: { scriptPathLevel: undefined },
55
- }),
56
- ];
57
- }
58
- }
59
-
60
- const inputVSize = Dimensions.fromScriptType(t, params?.scriptTypeParams).getInputsVSize();
61
- const row: Row = [
62
- t,
63
- chainCode.join(`/`),
64
- params?.spendTypeName ?? 'all',
65
- inputVSize.toString(),
66
- (inputVSize / relativeCostRef).toFixed(2),
67
- ];
68
- return [row];
69
- }
70
-
71
- function generateTables() {
72
- const scriptTypes = [...utxolib.bitgo.outputScripts.scriptTypes2Of3];
73
- return formatMarkdownTable(
74
- headers,
75
- scriptTypes.flatMap((s) => generateRowsForScriptType(headers, s))
76
- );
77
- }
78
-
79
- function generateDocument() {
80
- return [
81
- '# Input Costs',
82
- 'This document contains the worst-case input costs for various script types and spend types.',
83
- 'The input costs are calculated using the `Dimensions` class from `@bitgo-beta/unspents`.',
84
- '',
85
- generateTables(),
86
- ].join('\n');
87
- }
88
-
89
- if (require.main === module) {
90
- const outfile = 'docs/input-costs.md';
91
- fs.writeFile(outfile, generateDocument())
92
- .then(() => console.log('wrote to', outfile))
93
- .catch((e) => console.error(e));
94
- }
@@ -1,13 +0,0 @@
1
- # Input Costs
2
- This document contains the worst-case input costs for various script types and spend types.
3
- The input costs are calculated using the `Dimensions` class from `@bitgo/unspents`.
4
-
5
- | Script Type | Chain Codes | Spend Type | Input Size (Virtual Bytes) | Relative Size (p2trMusig2 = 1.00) |
6
- | --- | --- | --- | --- | --- |
7
- | p2sh | 0/1 | all | 298 | 5.14 |
8
- | p2shP2wsh | 10/11 | all | 140 | 2.41 |
9
- | p2wsh | 20/21 | all | 105 | 1.81 |
10
- | p2tr | 30/31 | Script Path, Level 2 (Backup/User, Backup/BitGo) | 116 | 2.00 |
11
- | p2tr | 30/31 | Script Path, Level 1 (User/BitGo) | 108 | 1.86 |
12
- | p2trMusig2 | 40/41 | Script Path (Backup/User, Backup/BitGo) | 108 | 1.86 |
13
- | p2trMusig2 | 40/41 | Key Path (User/BitGo) | 58 | 1.00 |