@ledgerhq/zcash-utils 2.6.0 → 2.7.0
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.
- package/CHANGELOG.md +12 -0
- package/index.d.ts +43 -0
- package/index.darwin-arm64.node +0 -0
- package/index.darwin-x64.node +0 -0
- package/index.linux-arm64-gnu.node +0 -0
- package/index.linux-x64-gnu.node +0 -0
- package/index.win32-arm64-msvc.node +0 -0
- package/index.win32-x64-msvc.node +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# @ledgerhq/zcash-utils
|
|
2
2
|
|
|
3
|
+
## 2.7.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- 9f2aa1f: Move the Zcash crates to their NU7 pre-releases. A transaction whose target block is past NU7 activation is built under the ZIP 259 branch id (`0x77190AD9`), and the expiry cap now sees NU7 ahead on testnet. These releases carry no NU7 mainnet activation height yet, so mainnet transactions keep the NU6.3 branch id until a release that sets it is pinned. The PCZT encoding is unchanged.
|
|
8
|
+
- 695c4e6: `buildTransaction` and `buildIronwoodTransaction` take an optional `regtestActivationHeights` for a regtest node whose activation schedule differs from the canonical one. The builder then selects the branch id that node enforces and caps the expiry below the upgrade it has scheduled. The field is refused with mainnet or testnet.
|
|
9
|
+
- 57191c4: Apply ZIP 2009's ZIP-317 marginal fee: `buildTransaction` and `buildIronwoodTransaction` accept a fee computed at 1,000 zatoshis per logical action on mainnet from height 3,590,000 and on test networks, and keep 5,000 on mainnet below that height. A fee computed at 5,000 is still accepted past the switch.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- 38e0cfe: The error returned by `buildTransaction` and `buildIronwoodTransaction` for a fee that does not satisfy ZIP-317 reads `craft error: fee …` once, instead of repeating the `craft error:` prefix.
|
|
14
|
+
|
|
3
15
|
## 2.6.0
|
|
4
16
|
|
|
5
17
|
### Minor Changes
|
package/index.d.ts
CHANGED
|
@@ -210,6 +210,27 @@ export interface TransparentInputJs {
|
|
|
210
210
|
*/
|
|
211
211
|
addressIndex: number
|
|
212
212
|
}
|
|
213
|
+
/**
|
|
214
|
+
* Regtest activation heights a local node was started with, one optional
|
|
215
|
+
* height per network upgrade. Each height given replaces the canonical
|
|
216
|
+
* regtest value (Overwinter through Canopy at 1, NU5 through NU6.3 at 2, NU7
|
|
217
|
+
* unscheduled); each one omitted keeps it. Lets the builder pick the same
|
|
218
|
+
* branch id, and cap the expiry height at the same upcoming activation, as a
|
|
219
|
+
* node whose `activation_heights` differ from the canonical set.
|
|
220
|
+
*/
|
|
221
|
+
export interface RegtestActivationHeightsJs {
|
|
222
|
+
overwinter?: number
|
|
223
|
+
sapling?: number
|
|
224
|
+
blossom?: number
|
|
225
|
+
heartwood?: number
|
|
226
|
+
canopy?: number
|
|
227
|
+
nu5?: number
|
|
228
|
+
nu6?: number
|
|
229
|
+
nu6_1?: number
|
|
230
|
+
nu6_2?: number
|
|
231
|
+
nu6_3?: number
|
|
232
|
+
nu7?: number
|
|
233
|
+
}
|
|
213
234
|
/**
|
|
214
235
|
* Arguments for [`build_transaction`].
|
|
215
236
|
*
|
|
@@ -242,6 +263,12 @@ export interface BuildTransactionParams {
|
|
|
242
263
|
*/
|
|
243
264
|
transparentAccountPubkey?: string
|
|
244
265
|
network?: string
|
|
266
|
+
/**
|
|
267
|
+
* Only with `network: "regtest"`: activation heights of the local node,
|
|
268
|
+
* when its schedule differs from the canonical regtest set. Refused with
|
|
269
|
+
* any other network.
|
|
270
|
+
*/
|
|
271
|
+
regtestActivationHeights?: RegtestActivationHeightsJs
|
|
245
272
|
/**
|
|
246
273
|
* 64-char hex (32 bytes): ZIP-32 seed fingerprint of the wallet seed,
|
|
247
274
|
* read from the device. Stamped onto each real spend so the device can
|
|
@@ -255,6 +282,11 @@ export interface BuildTransactionParams {
|
|
|
255
282
|
* loss). Per FR-4 the fee is selected by ledger-live; this
|
|
256
283
|
* crate validates it against ZIP-317 and derives change from it rather
|
|
257
284
|
* than computing a fee itself.
|
|
285
|
+
*
|
|
286
|
+
* The ZIP-317 marginal fee depends on the target block (ZIP 2009): 1,000
|
|
287
|
+
* zatoshis per logical action on mainnet from height 3,590,000 and on test
|
|
288
|
+
* networks, 5,000 on mainnet below it. A fee computed at 5,000 is still
|
|
289
|
+
* accepted past the switch; one computed at 1,000 is refused before it.
|
|
258
290
|
*/
|
|
259
291
|
feeZat: string
|
|
260
292
|
spends: Array<OrchardSpendInputJs>
|
|
@@ -335,6 +367,12 @@ export interface BuildIronwoodTransactionParams {
|
|
|
335
367
|
grpcUrl: string
|
|
336
368
|
ufvk: string
|
|
337
369
|
network?: string
|
|
370
|
+
/**
|
|
371
|
+
* Only with `network: "regtest"`: activation heights of the local node,
|
|
372
|
+
* when its schedule differs from the canonical regtest set. Refused with
|
|
373
|
+
* any other network.
|
|
374
|
+
*/
|
|
375
|
+
regtestActivationHeights?: RegtestActivationHeightsJs
|
|
338
376
|
/**
|
|
339
377
|
* 64-char hex (32 bytes): ZIP-32 seed fingerprint of the wallet seed,
|
|
340
378
|
* read from the device. Stamped onto each real spend so the device can
|
|
@@ -348,6 +386,11 @@ export interface BuildIronwoodTransactionParams {
|
|
|
348
386
|
* loss). Per FR-4 the fee is selected by ledger-live; this
|
|
349
387
|
* crate validates it against ZIP-317 Rev 1 and derives the (always
|
|
350
388
|
* Ironwood) change from it rather than computing a fee itself.
|
|
389
|
+
*
|
|
390
|
+
* The ZIP-317 marginal fee depends on the target block (ZIP 2009): 1,000
|
|
391
|
+
* zatoshis per logical action on mainnet from height 3,590,000 and on test
|
|
392
|
+
* networks, 5,000 on mainnet below it. A fee computed at 5,000 is still
|
|
393
|
+
* accepted past the switch; one computed at 1,000 is refused before it.
|
|
351
394
|
*/
|
|
352
395
|
feeZat: string
|
|
353
396
|
spends: Array<IronwoodSpendInputJs>
|
package/index.darwin-arm64.node
CHANGED
|
Binary file
|
package/index.darwin-x64.node
CHANGED
|
Binary file
|
|
Binary file
|
package/index.linux-x64-gnu.node
CHANGED
|
Binary file
|
|
Binary file
|
|
Binary file
|