@kaspacom/kcc20-tx-builder 0.8.0-fee.1 → 0.8.0-fee.10

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 (82) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/RELEASING.md +44 -7
  3. package/artifacts/KCC20FeePolicyV1.manifest.json +4 -4
  4. package/artifacts/KCC20WrapperFeeArgentV1.placeholder.json +1816 -360
  5. package/artifacts/KCC20WrapperFeeV1.placeholder.json +1818 -362
  6. package/dist/artifacts.d.ts +5 -5
  7. package/dist/artifacts.js +5 -5
  8. package/dist/cjs/artifacts.d.ts +5 -5
  9. package/dist/cjs/artifacts.js +5 -5
  10. package/dist/cjs/engine.js +3454 -176
  11. package/dist/cjs/engine.js.map +1 -1
  12. package/dist/cjs/escrow-account-setup.d.ts +53 -0
  13. package/dist/cjs/escrow-account-setup.js +103 -0
  14. package/dist/cjs/escrow-account-setup.js.map +1 -0
  15. package/dist/cjs/escrow-claim-plan.d.ts +74 -0
  16. package/dist/cjs/escrow-claim-plan.js +98 -0
  17. package/dist/cjs/escrow-claim-plan.js.map +1 -0
  18. package/dist/cjs/escrow-market-artifacts.d.ts +90 -0
  19. package/dist/cjs/escrow-market-artifacts.js +128 -0
  20. package/dist/cjs/escrow-market-artifacts.js.map +1 -0
  21. package/dist/cjs/escrow-market-setup.d.ts +429 -0
  22. package/dist/cjs/escrow-market-setup.js +140 -0
  23. package/dist/cjs/escrow-market-setup.js.map +1 -0
  24. package/dist/cjs/escrow-receipt.d.ts +103 -0
  25. package/dist/cjs/escrow-receipt.js +293 -0
  26. package/dist/cjs/escrow-receipt.js.map +1 -0
  27. package/dist/cjs/index.d.ts +5 -0
  28. package/dist/cjs/index.js +5 -0
  29. package/dist/cjs/index.js.map +1 -1
  30. package/dist/cjs/operations.d.ts +1 -1
  31. package/dist/cjs/operations.js +16 -0
  32. package/dist/cjs/operations.js.map +1 -1
  33. package/dist/cjs/sale-common.d.ts +1 -1
  34. package/dist/cjs/snapshot-signerless-transactions.js +13 -2
  35. package/dist/cjs/snapshot-signerless-transactions.js.map +1 -1
  36. package/dist/engine.d.ts.map +1 -1
  37. package/dist/engine.js +3454 -176
  38. package/dist/engine.js.map +1 -1
  39. package/dist/escrow-account-setup.d.ts +54 -0
  40. package/dist/escrow-account-setup.d.ts.map +1 -0
  41. package/dist/escrow-account-setup.js +99 -0
  42. package/dist/escrow-account-setup.js.map +1 -0
  43. package/dist/escrow-claim-plan.d.ts +75 -0
  44. package/dist/escrow-claim-plan.d.ts.map +1 -0
  45. package/dist/escrow-claim-plan.js +95 -0
  46. package/dist/escrow-claim-plan.js.map +1 -0
  47. package/dist/escrow-market-artifacts.d.ts +91 -0
  48. package/dist/escrow-market-artifacts.d.ts.map +1 -0
  49. package/dist/escrow-market-artifacts.js +124 -0
  50. package/dist/escrow-market-artifacts.js.map +1 -0
  51. package/dist/escrow-market-setup.d.ts +430 -0
  52. package/dist/escrow-market-setup.d.ts.map +1 -0
  53. package/dist/escrow-market-setup.js +133 -0
  54. package/dist/escrow-market-setup.js.map +1 -0
  55. package/dist/escrow-receipt.d.ts +104 -0
  56. package/dist/escrow-receipt.d.ts.map +1 -0
  57. package/dist/escrow-receipt.js +287 -0
  58. package/dist/escrow-receipt.js.map +1 -0
  59. package/dist/index.d.ts +5 -0
  60. package/dist/index.d.ts.map +1 -1
  61. package/dist/index.js +5 -0
  62. package/dist/index.js.map +1 -1
  63. package/dist/operations.d.ts +1 -1
  64. package/dist/operations.d.ts.map +1 -1
  65. package/dist/operations.js +16 -0
  66. package/dist/operations.js.map +1 -1
  67. package/dist/sale-common.d.ts +1 -1
  68. package/dist/snapshot-signerless-transactions.js +13 -2
  69. package/dist/snapshot-signerless-transactions.js.map +1 -1
  70. package/docs/COMPATIBILITY.json +1 -1
  71. package/docs/escrow-fees.md +49 -3
  72. package/package.json +3 -3
  73. package/src/artifacts.ts +5 -5
  74. package/src/engine.ts +3607 -77
  75. package/src/escrow-account-setup.ts +124 -0
  76. package/src/escrow-claim-plan.ts +130 -0
  77. package/src/escrow-market-artifacts.ts +129 -0
  78. package/src/escrow-market-setup.ts +182 -0
  79. package/src/escrow-receipt.ts +333 -0
  80. package/src/index.ts +5 -0
  81. package/src/operations.ts +16 -0
  82. package/src/snapshot-signerless-transactions.ts +14 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,57 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0-fee.10 (unreleased)
4
+
5
+ - Add fee-market crossed settlement to the backend-only matcher, with exact payouts, preserved order deposits and one receipt.
6
+ - Require a positive total matcher spending limit and reject mismatched or stale sources before submission.
7
+ - Allow a hash-controlled fee account to rotate back to its underlying key and reject unchanged key/hash authorities.
8
+
9
+ ## 0.8.0-fee.9
10
+
11
+ - Allow the funded two-ask FeeTicket and creator-fee shape through its operation-specific compute check. Keep transient, storage and consolidation limits unchanged.
12
+ - Add the signed creator-fee regression missing from the original ticket-group test.
13
+
14
+ ## 0.8.0-fee.8
15
+
16
+ - Preserve fixed snapshot supplies up to the existing unsigned two-limb limit in the final deployment payload.
17
+ - Select the V2 holder extension commitment for wide supplies while keeping every controller reserve signed-64-bit.
18
+ - Cover Nacho's exact five-controller allocation totals through payload and funded snapshot-start transaction tests.
19
+
20
+ ## 0.8.0-fee.7
21
+
22
+ - Accept the indexer's verified policy summary fields when reconstructing live bid scripts for seller sweeps.
23
+ - Enable two-ask grouped buy submission after the pinned follower budget passed signed consensus proof and a funded TN10 transaction.
24
+ - Keep fee policy, contract artifacts, legacy operations and snapshot operations unchanged.
25
+
26
+ ## 0.8.0-fee.6
27
+
28
+ - Expose the existing fee-market holder merge and seller sweep PSKT handlers through the public builder key registry.
29
+ - Keep transaction construction, contract artifacts, legacy operations and snapshot operations unchanged.
30
+
31
+ ## 0.8.0-fee.5
32
+
33
+ - Add signed fee-market setup, wrap, unwrap, orders, fills, two-ask buyer groups, seller sweeps, holder consolidation, claims and account rotation.
34
+ - Check live covenant inputs and fixed market policy before signing. Carry reusable creator consent and the authenticated token holder extension in creator-fee wraps.
35
+ - Keep legacy and snapshot builders available. New fee-market creation remains disabled in the application.
36
+
37
+ ## 0.8.0-fee.4
38
+
39
+ - Require the fee-account owner key to match the connected Schnorr funding wallet for creation and binding.
40
+ - Exclude the account source outpoint from binding funding and reject duplicate inputs.
41
+
42
+ ## 0.8.0-fee.3
43
+
44
+ - Build wallet-signable fee-account genesis and one-time market binding PSKTs from the pinned escrow artifact.
45
+ - Keep the account's full KAS principal and lineage during binding; check current node UTXOs, signed fees and mass.
46
+ - Return a creation hint for the first bind, since the account state is not visible from an unspent P2SH genesis output.
47
+ - Keep fee-market trading, claims, rotation and new-market creation disabled in this prerelease.
48
+
49
+ ## 0.8.0-fee.2
50
+
51
+ - Verify fee receipts and fee accounts against the pinned escrow artifact and fresh node UTXOs before claim construction.
52
+ - Plan independent protocol or creator claims while preserving the other share and matching the signed consensus commitment.
53
+ - Keep signing, complete transaction mass checks, and market creation disabled in this prerelease.
54
+
3
55
  ## 0.8.0-fee.1
4
56
 
5
57
  - Package the pinned fee v1 contract artifacts and fixed policy manifest for integration work.
package/RELEASING.md CHANGED
@@ -15,7 +15,8 @@ Prerelease versions use the `next` tag in both registries; stable versions use
15
15
  ## Publishing setup
16
16
 
17
17
  After a successful `main` CI run, `.github/workflows/publish.yml` compares the
18
- package version with the first parent of the merged commit. A changed version
18
+ package version with the first parent of the merged commit and checks whether
19
+ the current version is visible on npmjs. A changed or unpublished version
19
20
  triggers one job that packs the package once, publishes that tarball to npmjs
20
21
  and GitHub Packages, verifies both registries, then creates the matching tag
21
22
  and GitHub Release. A manual workflow dispatch retries a partial upload only
@@ -94,9 +95,45 @@ consumer deployment. Record any unverified operation families explicitly.
94
95
 
95
96
  ## Fee integration prerelease
96
97
 
97
- Version `0.8.0-fee.1` adds pinned fee artifacts to the accounting and policy helpers for DEV integration
98
- tests. It does not construct fee-market transactions. Run the existing snapshot
99
- and example tests against the pinned WASM before publishing it under `next`.
100
- Funded fee-market journeys and signed settlement construction remain required
101
- before enabling markets or promoting a stable fee release. Confirm trusted npm
102
- publishing in the first workflow run.
98
+ Version `0.8.0-fee.9` permits up to 500,000 compute mass for the bounded
99
+ fee-market two-ask builder, while retaining its 900,000 transient and 450,000
100
+ storage checks. Consolidation and other operation limits are unchanged. A
101
+ regression with a burned ticket and two creator-fee obligations reproduces the
102
+ 465,140 compute shape previously rejected before signing. The candidate also
103
+ passed funded TN10 execution with two distinct sellers and a third wallet as
104
+ buyer, retaining per-fill creator fees and returning exact ticket collateral.
105
+ This does not enable market creation or waive application and parity gates.
106
+ It retains the wide snapshot supply correction from fee.8.
107
+
108
+ Version `0.8.0-fee.7` fixes seller sweeps built from enriched indexer bid
109
+ state and marks the two-ask buyer group submit-ready. Funded DEV TN10
110
+ transactions passed for 3- and 10-bid seller sweeps, a two-ask buy, partial
111
+ ask and bid fills, and claims of three and five receipts. These are local
112
+ builder proofs until the package is published and consumer smoke tests use
113
+ the registry tarball. Grouped FeeTicket waiver, crossed matches, authority
114
+ rotation, recipient approval, and historical parity remain market-enablement
115
+ gates.
116
+
117
+ Version `0.8.0-fee.6` registers the previously implemented fee-market holder
118
+ merge and seller-sweep keys for browser consumers. It changes no contract
119
+ artifacts or signed transaction logic. Backend consumers must update their
120
+ browser-only key allowlist in the same dependency upgrade. Funded grouped
121
+ trades and the remaining market-enablement gates below are still open.
122
+
123
+ Version `0.8.0-fee.5` adds signed fee-market setup, trade, claim, rotation,
124
+ wrap and unwrap builders. A funded DEV TN10 0% market completed setup,
125
+ wrap, trade, protocol claim, cancel and unwrap. A funded 1% market completed
126
+ setup, creator-consent wrap, trade and protocol-first independent claims.
127
+ The conservative 450,000 transient-mass target is exceeded by some signed
128
+ order and fill shapes even though the pinned TN10 node accepted them.
129
+ Grouped ticket trades, creator-first claims, recipient-covenant approval,
130
+ historical parity and frontend wallet journeys remain release gates for
131
+ market enablement.
132
+
133
+ Version `0.8.0-fee.4` adds fee-account creation and binding PSKTs for DEV
134
+ integration. Run the existing snapshot and example tests against the pinned
135
+ WASM before publishing it under `next`. This version fixes fee.3's owner and
136
+ funding-source checks. This prerelease does not build
137
+ fee-market trades, claims or authority rotation. Funded fee-market journeys and
138
+ signed settlement construction remain required before enabling markets or
139
+ promoting a stable fee release.
@@ -70,17 +70,17 @@
70
70
  },
71
71
  "wrapper": {
72
72
  "source": "contracts/kcc20-wrapper-fee-v1.sil",
73
- "sourceSha256": "881e79b28fbff61136b6f424c14043789d75cda7633fa0a96b45880e0b69c0ed",
73
+ "sourceSha256": "19baef1fc0c3bbf13252afe1113e0227c1d7c123a1e0a82a919e24ae4f0ed10d",
74
74
  "walletArtifact": "vendor/kcc20-wrapper-fee-v1/KCC20WrapperFeeV1.placeholder.json",
75
75
  "decoderFixture": "crates/tn12-indexer-decoder/fixtures/kcc20-wrapper-fee-v1/KCC20WrapperFeeV1.placeholder.json",
76
- "artifactSha256": "ef8c1518209577f2c106a65ce267e95b129d62ec2220c72e49427ad92d84ad25"
76
+ "artifactSha256": "345cbefc8f870b2daa408e2608c4fcf50d27d9f5ebb505439ee22092715f0007"
77
77
  },
78
78
  "argentWrapper": {
79
79
  "source": "contracts/kcc20-wrapper-fee-argent-v1.sil",
80
- "sourceSha256": "06a43609b4a80d1d380346f0d96c5c26326398ce3ba4fa312faf97d90f97ca37",
80
+ "sourceSha256": "28ca40eb53296025f2b07231bd74ff693999cb10386f967aef534066553d5c54",
81
81
  "walletArtifact": "vendor/kcc20-wrapper-fee-argent-v1/KCC20WrapperFeeArgentV1.placeholder.json",
82
82
  "decoderFixture": "crates/tn12-indexer-decoder/fixtures/kcc20-wrapper-fee-argent-v1/KCC20WrapperFeeArgentV1.placeholder.json",
83
- "artifactSha256": "2a03ffa43c9951ac4d17b9ad6698c4c3528d292e2841db195f8a7385855ea578"
83
+ "artifactSha256": "d14cdd05f9522b393e9b5e674a4645cf6b51f8831a5bb370882eb0e9a2f8d4b0"
84
84
  }
85
85
  }
86
86
  }