@bitgo-beta/unspents 0.13.2-beta.202 → 0.13.2-beta.2020

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