@bitgo-beta/unspents 0.13.2-beta.207 → 0.13.2-beta.2071

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