@bitgo-beta/unspents 0.13.2-beta.170 → 0.13.2-beta.1701

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 +8 -5
  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 -389
  40. package/bin/generate_tables.ts +0 -94
  41. package/docs/input-costs.md +0 -13
package/CHANGELOG.md DELETED
@@ -1,389 +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.31.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.31.0) (2023-11-13)
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.30.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.30.0) (2023-11-13)
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.29.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.29.0) (2023-11-13)
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.28.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.28.0) (2023-10-20)
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.27.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.27.0) (2023-10-18)
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.26.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.26.0) (2023-09-25)
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.25.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.25.0) (2023-09-09)
91
-
92
- ### Bug Fixes
93
-
94
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
95
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
96
-
97
- ### Features
98
-
99
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
100
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
101
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
102
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
103
-
104
- # [0.24.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.24.0) (2023-09-09)
105
-
106
- ### Bug Fixes
107
-
108
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
109
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
110
-
111
- ### Features
112
-
113
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
114
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
115
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
116
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
117
-
118
- # [0.23.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.23.0) (2023-09-07)
119
-
120
- ### Bug Fixes
121
-
122
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
123
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
124
-
125
- ### Features
126
-
127
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
128
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
129
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
130
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
131
-
132
- # [0.22.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.22.0) (2023-09-05)
133
-
134
- ### Bug Fixes
135
-
136
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
137
-
138
- ### Features
139
-
140
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
141
-
142
- # [0.21.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.21.0) (2023-09-01)
143
-
144
- ### Bug Fixes
145
-
146
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
147
-
148
- ### Features
149
-
150
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
151
-
152
- # [0.20.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.20.0) (2023-08-29)
153
-
154
- ### Features
155
-
156
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
157
-
158
- # [0.19.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.19.0) (2023-08-25)
159
-
160
- ### Features
161
-
162
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
163
-
164
- # [0.18.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.18.0) (2023-08-24)
165
-
166
- ### Features
167
-
168
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
169
-
170
- ## [0.17.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.17.2) (2023-08-16)
171
-
172
- **Note:** Version bump only for package @bitgo/unspents
173
-
174
- ## [0.17.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.17.1) (2023-08-16)
175
-
176
- **Note:** Version bump only for package @bitgo/unspents
177
-
178
- # [0.17.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.4...@bitgo/unspents@0.17.0) (2023-08-04)
179
-
180
- ### Features
181
-
182
- - **unspents:** add docs/input-costs.md, generation tool ([aa843da](https://github.com/BitGo/BitGoJS/commit/aa843da4ac4c538073c0244334500511998c0423))
183
- - **unspents:** fix unspents module setup ([687f4c3](https://github.com/BitGo/BitGoJS/commit/687f4c3c29885b1e5b5bf9d79782d265937d6f1d)), closes [#3651](https://github.com/BitGo/BitGoJS/issues/3651)
184
-
185
- # [0.16.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.4...@bitgo/unspents@0.16.0) (2023-07-28)
186
-
187
- ### Features
188
-
189
- - **unspents:** add docs/input-costs.md, generation tool ([aa843da](https://github.com/BitGo/BitGoJS/commit/aa843da4ac4c538073c0244334500511998c0423))
190
- - **unspents:** fix unspents module setup ([687f4c3](https://github.com/BitGo/BitGoJS/commit/687f4c3c29885b1e5b5bf9d79782d265937d6f1d)), closes [#3651](https://github.com/BitGo/BitGoJS/issues/3651)
191
-
192
- ## [0.15.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.3...@bitgo/unspents@0.15.4) (2023-07-18)
193
-
194
- **Note:** Version bump only for package @bitgo/unspents
195
-
196
- ## [0.15.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.2...@bitgo/unspents@0.15.3) (2023-06-21)
197
-
198
- **Note:** Version bump only for package @bitgo/unspents
199
-
200
- ## [0.15.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.1...@bitgo/unspents@0.15.2) (2023-06-13)
201
-
202
- **Note:** Version bump only for package @bitgo/unspents
203
-
204
- ## [0.15.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.0...@bitgo/unspents@0.15.1) (2023-06-07)
205
-
206
- **Note:** Version bump only for package @bitgo/unspents
207
-
208
- # [0.15.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.14.2...@bitgo/unspents@0.15.0) (2023-06-05)
209
-
210
- ### Bug Fixes
211
-
212
- - **utxo-lib:** use PsbtInput instead of UtxoPsbt ([1f73539](https://github.com/BitGo/BitGoJS/commit/1f73539409cf69fc55ab8aedb9d8873bb82bc375))
213
-
214
- ### BREAKING CHANGES
215
-
216
- - **utxo-lib:** functions signature is changed
217
-
218
- ## [0.14.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.14.1...@bitgo/unspents@0.14.2) (2023-05-25)
219
-
220
- **Note:** Version bump only for package @bitgo/unspents
221
-
222
- ## [0.14.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.14.0...@bitgo/unspents@0.14.1) (2023-05-17)
223
-
224
- ### Bug Fixes
225
-
226
- - **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)
227
-
228
- # [0.14.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.13.2...@bitgo/unspents@0.14.0) (2023-05-10)
229
-
230
- ### Features
231
-
232
- - **utxo-lib:** add musig2 nonce at input index ([9991d3f](https://github.com/BitGo/BitGoJS/commit/9991d3ff4fbecc326c8fc67e523a5108843a0f9d))
233
-
234
- ## [0.13.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.13.1...@bitgo/unspents@0.13.2) (2023-05-03)
235
-
236
- **Note:** Version bump only for package @bitgo/unspents
237
-
238
- ## [0.13.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.13.0...@bitgo/unspents@0.13.1) (2023-04-25)
239
-
240
- **Note:** Version bump only for package @bitgo/unspents
241
-
242
- # [0.13.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.12.0...@bitgo/unspents@0.13.0) (2023-04-20)
243
-
244
- ### Features
245
-
246
- - **unspents:** unsigned psbt dimensions can be calculated ([427cc36](https://github.com/BitGo/BitGoJS/commit/427cc36f33842cb4372292dc69fe2f23fde78876))
247
-
248
- # [0.12.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.12...@bitgo/unspents@0.12.0) (2023-04-13)
249
-
250
- ### Features
251
-
252
- - **unspents:** add dimensions for psbt ([b125034](https://github.com/BitGo/BitGoJS/commit/b125034d83d1e613e9a7036f9b4d805d6f57c3f7))
253
- - **unspents:** add p2trMusig2 to dimensions ([de460ad](https://github.com/BitGo/BitGoJS/commit/de460ad5c43f936458b7af6524cefad3d5f94914))
254
- - **utxo-lib:** create p2tr address using musig2 ([699e829](https://github.com/BitGo/BitGoJS/commit/699e8291f4a205ba0b2071c6369f2c8843b8a945))
255
- - **utxo-lib:** create p2trMusig2 nonce using derived key ([a0cd1f1](https://github.com/BitGo/BitGoJS/commit/a0cd1f1b67b4e013a53362d3e01aa8818a1a9b33))
256
- - **utxo-lib:** introduce ParsedScriptType ([3c28bbc](https://github.com/BitGo/BitGoJS/commit/3c28bbc4baada5b614ef5893301059b51b324ce2))
257
- - **utxo-lib:** parse p2trMusig2 key path witness ([ecb4c31](https://github.com/BitGo/BitGoJS/commit/ecb4c3127343b613cc6ae02bc1cd971d2e032954))
258
-
259
- ## [0.11.12](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.9...@bitgo/unspents@0.11.12) (2023-02-16)
260
-
261
- **Note:** Version bump only for package @bitgo/unspents
262
-
263
- ## [0.11.11](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.9...@bitgo/unspents@0.11.11) (2023-02-08)
264
-
265
- **Note:** Version bump only for package @bitgo/unspents
266
-
267
- ## [0.11.10](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.9...@bitgo/unspents@0.11.10) (2023-01-30)
268
-
269
- **Note:** Version bump only for package @bitgo/unspents
270
-
271
- ## [0.11.9](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.8...@bitgo/unspents@0.11.9) (2023-01-25)
272
-
273
- **Note:** Version bump only for package @bitgo/unspents
274
-
275
- ## [0.11.8](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.7...@bitgo/unspents@0.11.8) (2022-12-23)
276
-
277
- **Note:** Version bump only for package @bitgo/unspents
278
-
279
- ## [0.11.7](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.6...@bitgo/unspents@0.11.7) (2022-12-20)
280
-
281
- **Note:** Version bump only for package @bitgo/unspents
282
-
283
- ## [0.11.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.5...@bitgo/unspents@0.11.6) (2022-12-06)
284
-
285
- **Note:** Version bump only for package @bitgo/unspents
286
-
287
- ## [0.11.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.5) (2022-11-29)
288
-
289
- **Note:** Version bump only for package @bitgo/unspents
290
-
291
- ## [0.11.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.4) (2022-11-04)
292
-
293
- **Note:** Version bump only for package @bitgo/unspents
294
-
295
- ## [0.11.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.2) (2022-10-27)
296
-
297
- **Note:** Version bump only for package @bitgo/unspents
298
-
299
- ## [0.11.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.1) (2022-10-25)
300
-
301
- **Note:** Version bump only for package @bitgo/unspents
302
-
303
- # [0.11.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.15...@bitgo/unspents@0.11.0) (2022-10-18)
304
-
305
- ### Bug Fixes
306
-
307
- - **core:** fix bip32/ecpair, API vs Interface ([bec9c1e](https://github.com/BitGo/BitGoJS/commit/bec9c1e6ff0c23108dc27e171abdd3e4d2cfdfb1))
308
- - **root:** align versions of bitcoinjs-lib ([b7eb929](https://github.com/BitGo/BitGoJS/commit/b7eb92998836a5945627ef1c80d74414b11f4867))
309
- - **unspents:** remove bitcoinjs-lib.d.ts ([e4447d4](https://github.com/BitGo/BitGoJS/commit/e4447d4c815050fc405bf766d93f2246b90835c8))
310
- - **unspents:** use new bip32/BIP32Interface in tests ([9de0c78](https://github.com/BitGo/BitGoJS/commit/9de0c7855111e995a2f75709d16901c1760a7511))
311
-
312
- ### Features
313
-
314
- - update to work with bitcoinjs-lib@6 ([1950934](https://github.com/BitGo/BitGoJS/commit/1950934d9426385ee12b204cc7456327e4480618))
315
- - **utxo-lib:** export BIP32/ECPair interfaces ([8628507](https://github.com/BitGo/BitGoJS/commit/862850781b2e8b36c71608c5ae71424b9ebe9dee))
316
-
317
- ## [0.8.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.15...@bitgo/unspents@0.8.3) (2022-07-19)
318
-
319
- **Note:** Version bump only for package @bitgo/unspents
320
-
321
- # [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)
322
-
323
- **Note:** Version bump only for package @bitgo/unspents
324
-
325
- # [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)
326
-
327
- **Note:** Version bump only for package @bitgo/unspents
328
-
329
- # [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)
330
-
331
- ### Bug Fixes
332
-
333
- - add dependency check to fix current and future dependency resolutions ([3074335](https://github.com/BitGo/BitGoJS/commit/30743356cff4ebb6d9e185f1a493b187614a1ea9))
334
-
335
- # [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)
336
-
337
- **Note:** Version bump only for package @bitgo/unspents
338
-
339
- # [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)
340
-
341
- **Note:** Version bump only for package @bitgo/unspents
342
-
343
- # [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)
344
-
345
- **Note:** Version bump only for package @bitgo/unspents
346
-
347
- # [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)
348
-
349
- **Note:** Version bump only for package @bitgo/unspents
350
-
351
- # [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)
352
-
353
- **Note:** Version bump only for package @bitgo/unspents
354
-
355
- # [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)
356
-
357
- **Note:** Version bump only for package @bitgo/unspents
358
-
359
- # [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)
360
-
361
- **Note:** Version bump only for package @bitgo/unspents
362
-
363
- # [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)
364
-
365
- **Note:** Version bump only for package @bitgo/unspents
366
-
367
- ## [0.7.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.2...@bitgo/unspents@0.7.4) (2022-04-06)
368
-
369
- **Note:** Version bump only for package @bitgo/unspents
370
-
371
- ## [0.7.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.2...@bitgo/unspents@0.7.3) (2022-04-05)
372
-
373
- **Note:** Version bump only for package @bitgo/unspents
374
-
375
- # [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)
376
-
377
- **Note:** Version bump only for package @bitgo/unspents
378
-
379
- # [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)
380
-
381
- **Note:** Version bump only for package @bitgo/unspents
382
-
383
- # [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)
384
-
385
- **Note:** Version bump only for package @bitgo/unspents
386
-
387
- # [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)
388
-
389
- **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 |