@kaspacom/kcc20-tx-builder 0.8.0-fee.5 → 0.8.0-fee.7

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 CHANGED
@@ -1,5 +1,16 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.8.0-fee.7
4
+
5
+ - Accept the indexer's verified policy summary fields when reconstructing live bid scripts for seller sweeps.
6
+ - Enable two-ask grouped buy submission after the pinned follower budget passed signed consensus proof and a funded TN10 transaction.
7
+ - Keep fee policy, contract artifacts, legacy operations and snapshot operations unchanged.
8
+
9
+ ## 0.8.0-fee.6
10
+
11
+ - Expose the existing fee-market holder merge and seller sweep PSKT handlers through the public builder key registry.
12
+ - Keep transaction construction, contract artifacts, legacy operations and snapshot operations unchanged.
13
+
3
14
  ## 0.8.0-fee.5
4
15
 
5
16
  - Add signed fee-market setup, wrap, unwrap, orders, fills, two-ask buyer groups, seller sweeps, holder consolidation, claims and account rotation.
package/RELEASING.md CHANGED
@@ -95,6 +95,21 @@ consumer deployment. Record any unverified operation families explicitly.
95
95
 
96
96
  ## Fee integration prerelease
97
97
 
98
+ Version `0.8.0-fee.7` fixes seller sweeps built from enriched indexer bid
99
+ state and marks the two-ask buyer group submit-ready. Funded DEV TN10
100
+ transactions passed for 3- and 10-bid seller sweeps, a two-ask buy, partial
101
+ ask and bid fills, and claims of three and five receipts. These are local
102
+ builder proofs until the package is published and consumer smoke tests use
103
+ the registry tarball. Grouped FeeTicket waiver, crossed matches, authority
104
+ rotation, recipient approval, and historical parity remain market-enablement
105
+ gates.
106
+
107
+ Version `0.8.0-fee.6` registers the previously implemented fee-market holder
108
+ merge and seller-sweep keys for browser consumers. It changes no contract
109
+ artifacts or signed transaction logic. Backend consumers must update their
110
+ browser-only key allowlist in the same dependency upgrade. Funded grouped
111
+ trades and the remaining market-enablement gates below are still open.
112
+
98
113
  Version `0.8.0-fee.5` adds signed fee-market setup, trade, claim, rotation,
99
114
  wrap and unwrap builders. A funded DEV TN10 0% market completed setup,
100
115
  wrap, trade, protocol claim, cancel and unwrap. A funded 1% market completed
@@ -4004,8 +4004,9 @@ function createKcc20PsktBuilderEngine(options) {
4004
4004
  return { schema: OUTPUT_SCHEMA,
4005
4005
  psktTransactionJson: feeResult.transaction.serializeToSafeJSON(),
4006
4006
  signInputs: [{ index: fundingInputIndex, sighashType: 1 }], scripts,
4007
- // Follower input 1 has a 600-unit budget without constrained consensus proof.
4008
- submitTransactionSupported: false,
4007
+ // The pinned two-ask follower and optional ticket budgets passed the
4008
+ // signed consensus proof in kaspa-covenants PR #718.
4009
+ submitTransactionSupported: true,
4009
4010
  metadata: { builderKey: "kcc20fee.buy-two-asks",
4010
4011
  operation: "fee-market-buy-two-asks", network, walletAddress,
4011
4012
  tokenId, marketId, policyId, fillCount: 2,
@@ -4131,14 +4132,23 @@ function createKcc20PsktBuilderEngine(options) {
4131
4132
  String(utxo.state.wrapper_spk_hash).toLowerCase() !== holderPlan.wrapper.scriptHash) {
4132
4133
  throw new Error(`bid ${slot} differs from fixed market policy`);
4133
4134
  }
4135
+ // The indexer adds policy summary fields for API consumers. They are not
4136
+ // part of the on-chain bid state and must not enter script reconstruction.
4137
+ const { creatorFeeBps: indexedCreatorFeeBps, feePolicyVersion: indexedFeePolicyVersion, ...bidState } = utxo.state;
4138
+ if ((indexedCreatorFeeBps !== undefined &&
4139
+ Number(indexedCreatorFeeBps) !== params.feePolicy.creatorFeeBps) ||
4140
+ (indexedFeePolicyVersion !== undefined &&
4141
+ Number(indexedFeePolicyVersion) !== params.feePolicy.version)) {
4142
+ throw new Error(`bid ${slot} indexed policy summary differs from fixed policy`);
4143
+ }
4134
4144
  const bidScript = (0, escrow_market_artifacts_js_1.buildKcc20FeeMarketRoleScript)({ artifact: artifacts.bid,
4135
- role: "bid", state: utxo.state });
4145
+ role: "bid", state: bidState });
4136
4146
  const buyerPlan = (0, escrow_market_setup_js_1.prepareKcc20FeeMarketWrappedHolder)({ ...base,
4137
4147
  recipientOwner: buyer, recipientOwnerScheme: scheme,
4138
4148
  recipientPayoutScriptHash: payoutHash, tokenAmount: fill });
4139
4149
  const continuation = remaining > 0n
4140
4150
  ? (0, escrow_market_artifacts_js_1.buildKcc20FeeMarketRoleScript)({ artifact: artifacts.bid,
4141
- role: "bid", state: { ...utxo.state, amount: remaining.toString() } })
4151
+ role: "bid", state: { ...bidState, amount: remaining.toString() } })
4142
4152
  : null;
4143
4153
  const fee = (0, escrow_fee_js_1.calculateKcc20EscrowFees)({ grossSompi: gross,
4144
4154
  creatorFeeBps: params.feePolicy.creatorFeeBps, protocolWaived: Boolean(ticket) });