@bitgo-beta/unspents 0.13.2-beta.209 → 0.13.2-beta.2091

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 +13 -15
  7. package/dist/src/dimensions.d.ts.map +1 -1
  8. package/dist/src/dimensions.js +30 -16
  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 +26 -12
  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 +9 -6
  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 -494
  40. package/bin/generate_tables.ts +0 -94
  41. package/docs/input-costs.md +0 -13
package/CHANGELOG.md DELETED
@@ -1,494 +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.38.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.38.0) (2023-12-18)
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:** default unspents dimensions to recovery path ([361eb62](https://github.com/BitGo/BitGoJS/commit/361eb62641aac19c876576a65da7f6777dc532a0))
19
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
20
-
21
- # [0.37.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.37.0) (2023-12-12)
22
-
23
- ### Bug Fixes
24
-
25
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
26
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
27
-
28
- ### Features
29
-
30
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
31
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
32
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
33
- - **unspents:** default unspents dimensions to recovery path ([361eb62](https://github.com/BitGo/BitGoJS/commit/361eb62641aac19c876576a65da7f6777dc532a0))
34
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
35
-
36
- # [0.36.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.36.0) (2023-12-09)
37
-
38
- ### Bug Fixes
39
-
40
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
41
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
42
-
43
- ### Features
44
-
45
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
46
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
47
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
48
- - **unspents:** default unspents dimensions to recovery path ([361eb62](https://github.com/BitGo/BitGoJS/commit/361eb62641aac19c876576a65da7f6777dc532a0))
49
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
50
-
51
- # [0.35.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.35.0) (2023-12-05)
52
-
53
- ### Bug Fixes
54
-
55
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
56
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
57
-
58
- ### Features
59
-
60
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
61
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
62
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
63
- - **unspents:** default unspents dimensions to recovery path ([361eb62](https://github.com/BitGo/BitGoJS/commit/361eb62641aac19c876576a65da7f6777dc532a0))
64
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
65
-
66
- # [0.34.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.34.0) (2023-11-28)
67
-
68
- ### Bug Fixes
69
-
70
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
71
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
72
-
73
- ### Features
74
-
75
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
76
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
77
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
78
- - **unspents:** default unspents dimensions to recovery path ([361eb62](https://github.com/BitGo/BitGoJS/commit/361eb62641aac19c876576a65da7f6777dc532a0))
79
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
80
-
81
- # [0.33.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.33.0) (2023-11-24)
82
-
83
- ### Bug Fixes
84
-
85
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
86
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
87
-
88
- ### Features
89
-
90
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
91
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
92
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
93
- - **unspents:** default unspents dimensions to recovery path ([361eb62](https://github.com/BitGo/BitGoJS/commit/361eb62641aac19c876576a65da7f6777dc532a0))
94
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
95
-
96
- # [0.32.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.32.0) (2023-11-17)
97
-
98
- ### Bug Fixes
99
-
100
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
101
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
102
-
103
- ### Features
104
-
105
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
106
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
107
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
108
- - **unspents:** default unspents dimensions to recovery path ([361eb62](https://github.com/BitGo/BitGoJS/commit/361eb62641aac19c876576a65da7f6777dc532a0))
109
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
110
-
111
- # [0.31.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.31.0) (2023-11-13)
112
-
113
- ### Bug Fixes
114
-
115
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
116
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
117
-
118
- ### Features
119
-
120
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
121
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
122
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
123
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
124
-
125
- # [0.30.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.30.0) (2023-11-13)
126
-
127
- ### Bug Fixes
128
-
129
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
130
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
131
-
132
- ### Features
133
-
134
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
135
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
136
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
137
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
138
-
139
- # [0.29.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.29.0) (2023-11-13)
140
-
141
- ### Bug Fixes
142
-
143
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
144
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
145
-
146
- ### Features
147
-
148
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
149
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
150
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
151
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
152
-
153
- # [0.28.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.28.0) (2023-10-20)
154
-
155
- ### Bug Fixes
156
-
157
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
158
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
159
-
160
- ### Features
161
-
162
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
163
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
164
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
165
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
166
-
167
- # [0.27.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.27.0) (2023-10-18)
168
-
169
- ### Bug Fixes
170
-
171
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
172
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
173
-
174
- ### Features
175
-
176
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
177
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
178
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
179
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
180
-
181
- # [0.26.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.26.0) (2023-09-25)
182
-
183
- ### Bug Fixes
184
-
185
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
186
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
187
-
188
- ### Features
189
-
190
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
191
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
192
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
193
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
194
-
195
- # [0.25.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.25.0) (2023-09-09)
196
-
197
- ### Bug Fixes
198
-
199
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
200
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
201
-
202
- ### Features
203
-
204
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
205
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
206
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
207
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
208
-
209
- # [0.24.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.24.0) (2023-09-09)
210
-
211
- ### Bug Fixes
212
-
213
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
214
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
215
-
216
- ### Features
217
-
218
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
219
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
220
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
221
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
222
-
223
- # [0.23.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.23.0) (2023-09-07)
224
-
225
- ### Bug Fixes
226
-
227
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
228
- - **unspents:** move `--recursive` flag to mocha ([275b8fb](https://github.com/BitGo/BitGoJS/commit/275b8fba5e3e806dd0e92f6659c92d18c097c45f))
229
-
230
- ### Features
231
-
232
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
233
- - **unspents:** add test for finding feePerKB ([f6397d7](https://github.com/BitGo/BitGoJS/commit/f6397d73e1726fb9e58ba6344bb7aab1a3297126))
234
- - **unspents:** add ZCash ZIP-0317 fee calculation ([8c86f8f](https://github.com/BitGo/BitGoJS/commit/8c86f8f754409c46fb3af82ee55ad031ca16129b))
235
- - **unspents:** extend tests ([aec14ec](https://github.com/BitGo/BitGoJS/commit/aec14ecedd67016e732b518a5e7a0ae036817fb6))
236
-
237
- # [0.22.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.22.0) (2023-09-05)
238
-
239
- ### Bug Fixes
240
-
241
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
242
-
243
- ### Features
244
-
245
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
246
-
247
- # [0.21.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.21.0) (2023-09-01)
248
-
249
- ### Bug Fixes
250
-
251
- - **root:** update @types/node ([cedc1a0](https://github.com/BitGo/BitGoJS/commit/cedc1a0035e79bb42fda57bf6ac29d606242f50b))
252
-
253
- ### Features
254
-
255
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
256
-
257
- # [0.20.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.20.0) (2023-08-29)
258
-
259
- ### Features
260
-
261
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
262
-
263
- # [0.19.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.19.0) (2023-08-25)
264
-
265
- ### Features
266
-
267
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
268
-
269
- # [0.18.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.18.0) (2023-08-24)
270
-
271
- ### Features
272
-
273
- - **sdk-api:** add size correction factor for transactions created ([5f0131c](https://github.com/BitGo/BitGoJS/commit/5f0131cd7016ad7dc4cf4b0be177e0c7ab7f4d25))
274
-
275
- ## [0.17.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.17.2) (2023-08-16)
276
-
277
- **Note:** Version bump only for package @bitgo/unspents
278
-
279
- ## [0.17.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.17.0...@bitgo/unspents@0.17.1) (2023-08-16)
280
-
281
- **Note:** Version bump only for package @bitgo/unspents
282
-
283
- # [0.17.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.4...@bitgo/unspents@0.17.0) (2023-08-04)
284
-
285
- ### Features
286
-
287
- - **unspents:** add docs/input-costs.md, generation tool ([aa843da](https://github.com/BitGo/BitGoJS/commit/aa843da4ac4c538073c0244334500511998c0423))
288
- - **unspents:** fix unspents module setup ([687f4c3](https://github.com/BitGo/BitGoJS/commit/687f4c3c29885b1e5b5bf9d79782d265937d6f1d)), closes [#3651](https://github.com/BitGo/BitGoJS/issues/3651)
289
-
290
- # [0.16.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.4...@bitgo/unspents@0.16.0) (2023-07-28)
291
-
292
- ### Features
293
-
294
- - **unspents:** add docs/input-costs.md, generation tool ([aa843da](https://github.com/BitGo/BitGoJS/commit/aa843da4ac4c538073c0244334500511998c0423))
295
- - **unspents:** fix unspents module setup ([687f4c3](https://github.com/BitGo/BitGoJS/commit/687f4c3c29885b1e5b5bf9d79782d265937d6f1d)), closes [#3651](https://github.com/BitGo/BitGoJS/issues/3651)
296
-
297
- ## [0.15.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.3...@bitgo/unspents@0.15.4) (2023-07-18)
298
-
299
- **Note:** Version bump only for package @bitgo/unspents
300
-
301
- ## [0.15.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.2...@bitgo/unspents@0.15.3) (2023-06-21)
302
-
303
- **Note:** Version bump only for package @bitgo/unspents
304
-
305
- ## [0.15.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.1...@bitgo/unspents@0.15.2) (2023-06-13)
306
-
307
- **Note:** Version bump only for package @bitgo/unspents
308
-
309
- ## [0.15.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.15.0...@bitgo/unspents@0.15.1) (2023-06-07)
310
-
311
- **Note:** Version bump only for package @bitgo/unspents
312
-
313
- # [0.15.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.14.2...@bitgo/unspents@0.15.0) (2023-06-05)
314
-
315
- ### Bug Fixes
316
-
317
- - **utxo-lib:** use PsbtInput instead of UtxoPsbt ([1f73539](https://github.com/BitGo/BitGoJS/commit/1f73539409cf69fc55ab8aedb9d8873bb82bc375))
318
-
319
- ### BREAKING CHANGES
320
-
321
- - **utxo-lib:** functions signature is changed
322
-
323
- ## [0.14.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.14.1...@bitgo/unspents@0.14.2) (2023-05-25)
324
-
325
- **Note:** Version bump only for package @bitgo/unspents
326
-
327
- ## [0.14.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.14.0...@bitgo/unspents@0.14.1) (2023-05-17)
328
-
329
- ### Bug Fixes
330
-
331
- - **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)
332
-
333
- # [0.14.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.13.2...@bitgo/unspents@0.14.0) (2023-05-10)
334
-
335
- ### Features
336
-
337
- - **utxo-lib:** add musig2 nonce at input index ([9991d3f](https://github.com/BitGo/BitGoJS/commit/9991d3ff4fbecc326c8fc67e523a5108843a0f9d))
338
-
339
- ## [0.13.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.13.1...@bitgo/unspents@0.13.2) (2023-05-03)
340
-
341
- **Note:** Version bump only for package @bitgo/unspents
342
-
343
- ## [0.13.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.13.0...@bitgo/unspents@0.13.1) (2023-04-25)
344
-
345
- **Note:** Version bump only for package @bitgo/unspents
346
-
347
- # [0.13.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.12.0...@bitgo/unspents@0.13.0) (2023-04-20)
348
-
349
- ### Features
350
-
351
- - **unspents:** unsigned psbt dimensions can be calculated ([427cc36](https://github.com/BitGo/BitGoJS/commit/427cc36f33842cb4372292dc69fe2f23fde78876))
352
-
353
- # [0.12.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.12...@bitgo/unspents@0.12.0) (2023-04-13)
354
-
355
- ### Features
356
-
357
- - **unspents:** add dimensions for psbt ([b125034](https://github.com/BitGo/BitGoJS/commit/b125034d83d1e613e9a7036f9b4d805d6f57c3f7))
358
- - **unspents:** add p2trMusig2 to dimensions ([de460ad](https://github.com/BitGo/BitGoJS/commit/de460ad5c43f936458b7af6524cefad3d5f94914))
359
- - **utxo-lib:** create p2tr address using musig2 ([699e829](https://github.com/BitGo/BitGoJS/commit/699e8291f4a205ba0b2071c6369f2c8843b8a945))
360
- - **utxo-lib:** create p2trMusig2 nonce using derived key ([a0cd1f1](https://github.com/BitGo/BitGoJS/commit/a0cd1f1b67b4e013a53362d3e01aa8818a1a9b33))
361
- - **utxo-lib:** introduce ParsedScriptType ([3c28bbc](https://github.com/BitGo/BitGoJS/commit/3c28bbc4baada5b614ef5893301059b51b324ce2))
362
- - **utxo-lib:** parse p2trMusig2 key path witness ([ecb4c31](https://github.com/BitGo/BitGoJS/commit/ecb4c3127343b613cc6ae02bc1cd971d2e032954))
363
-
364
- ## [0.11.12](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.9...@bitgo/unspents@0.11.12) (2023-02-16)
365
-
366
- **Note:** Version bump only for package @bitgo/unspents
367
-
368
- ## [0.11.11](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.9...@bitgo/unspents@0.11.11) (2023-02-08)
369
-
370
- **Note:** Version bump only for package @bitgo/unspents
371
-
372
- ## [0.11.10](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.9...@bitgo/unspents@0.11.10) (2023-01-30)
373
-
374
- **Note:** Version bump only for package @bitgo/unspents
375
-
376
- ## [0.11.9](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.8...@bitgo/unspents@0.11.9) (2023-01-25)
377
-
378
- **Note:** Version bump only for package @bitgo/unspents
379
-
380
- ## [0.11.8](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.7...@bitgo/unspents@0.11.8) (2022-12-23)
381
-
382
- **Note:** Version bump only for package @bitgo/unspents
383
-
384
- ## [0.11.7](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.6...@bitgo/unspents@0.11.7) (2022-12-20)
385
-
386
- **Note:** Version bump only for package @bitgo/unspents
387
-
388
- ## [0.11.6](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.5...@bitgo/unspents@0.11.6) (2022-12-06)
389
-
390
- **Note:** Version bump only for package @bitgo/unspents
391
-
392
- ## [0.11.5](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.5) (2022-11-29)
393
-
394
- **Note:** Version bump only for package @bitgo/unspents
395
-
396
- ## [0.11.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.4) (2022-11-04)
397
-
398
- **Note:** Version bump only for package @bitgo/unspents
399
-
400
- ## [0.11.2](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.2) (2022-10-27)
401
-
402
- **Note:** Version bump only for package @bitgo/unspents
403
-
404
- ## [0.11.1](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.11.0...@bitgo/unspents@0.11.1) (2022-10-25)
405
-
406
- **Note:** Version bump only for package @bitgo/unspents
407
-
408
- # [0.11.0](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.15...@bitgo/unspents@0.11.0) (2022-10-18)
409
-
410
- ### Bug Fixes
411
-
412
- - **core:** fix bip32/ecpair, API vs Interface ([bec9c1e](https://github.com/BitGo/BitGoJS/commit/bec9c1e6ff0c23108dc27e171abdd3e4d2cfdfb1))
413
- - **root:** align versions of bitcoinjs-lib ([b7eb929](https://github.com/BitGo/BitGoJS/commit/b7eb92998836a5945627ef1c80d74414b11f4867))
414
- - **unspents:** remove bitcoinjs-lib.d.ts ([e4447d4](https://github.com/BitGo/BitGoJS/commit/e4447d4c815050fc405bf766d93f2246b90835c8))
415
- - **unspents:** use new bip32/BIP32Interface in tests ([9de0c78](https://github.com/BitGo/BitGoJS/commit/9de0c7855111e995a2f75709d16901c1760a7511))
416
-
417
- ### Features
418
-
419
- - update to work with bitcoinjs-lib@6 ([1950934](https://github.com/BitGo/BitGoJS/commit/1950934d9426385ee12b204cc7456327e4480618))
420
- - **utxo-lib:** export BIP32/ECPair interfaces ([8628507](https://github.com/BitGo/BitGoJS/commit/862850781b2e8b36c71608c5ae71424b9ebe9dee))
421
-
422
- ## [0.8.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.15...@bitgo/unspents@0.8.3) (2022-07-19)
423
-
424
- **Note:** Version bump only for package @bitgo/unspents
425
-
426
- # [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)
427
-
428
- **Note:** Version bump only for package @bitgo/unspents
429
-
430
- # [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)
431
-
432
- **Note:** Version bump only for package @bitgo/unspents
433
-
434
- # [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)
435
-
436
- ### Bug Fixes
437
-
438
- - add dependency check to fix current and future dependency resolutions ([3074335](https://github.com/BitGo/BitGoJS/commit/30743356cff4ebb6d9e185f1a493b187614a1ea9))
439
-
440
- # [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)
441
-
442
- **Note:** Version bump only for package @bitgo/unspents
443
-
444
- # [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)
445
-
446
- **Note:** Version bump only for package @bitgo/unspents
447
-
448
- # [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)
449
-
450
- **Note:** Version bump only for package @bitgo/unspents
451
-
452
- # [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)
453
-
454
- **Note:** Version bump only for package @bitgo/unspents
455
-
456
- # [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)
457
-
458
- **Note:** Version bump only for package @bitgo/unspents
459
-
460
- # [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)
461
-
462
- **Note:** Version bump only for package @bitgo/unspents
463
-
464
- # [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)
465
-
466
- **Note:** Version bump only for package @bitgo/unspents
467
-
468
- # [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)
469
-
470
- **Note:** Version bump only for package @bitgo/unspents
471
-
472
- ## [0.7.4](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.2...@bitgo/unspents@0.7.4) (2022-04-06)
473
-
474
- **Note:** Version bump only for package @bitgo/unspents
475
-
476
- ## [0.7.3](https://github.com/BitGo/BitGoJS/compare/@bitgo/unspents@0.8.0-rc.2...@bitgo/unspents@0.7.3) (2022-04-05)
477
-
478
- **Note:** Version bump only for package @bitgo/unspents
479
-
480
- # [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)
481
-
482
- **Note:** Version bump only for package @bitgo/unspents
483
-
484
- # [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)
485
-
486
- **Note:** Version bump only for package @bitgo/unspents
487
-
488
- # [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)
489
-
490
- **Note:** Version bump only for package @bitgo/unspents
491
-
492
- # [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)
493
-
494
- **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 |