@kaspacom/kcc20-tx-builder 0.8.0-fee.6 → 0.8.0-fee.8
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/RELEASING.md +9 -0
- package/dist/cjs/engine.js +14 -4
- package/dist/cjs/engine.js.map +1 -1
- package/dist/cjs/snapshot-signerless-transactions.js +13 -2
- package/dist/cjs/snapshot-signerless-transactions.js.map +1 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +14 -4
- package/dist/engine.js.map +1 -1
- package/dist/snapshot-signerless-transactions.js +13 -2
- package/dist/snapshot-signerless-transactions.js.map +1 -1
- package/docs/COMPATIBILITY.json +1 -1
- package/package.json +1 -1
- package/src/engine.ts +15 -4
- package/src/snapshot-signerless-transactions.ts +14 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.0-fee.8
|
|
4
|
+
|
|
5
|
+
- Preserve fixed snapshot supplies up to the existing unsigned two-limb limit in the final deployment payload.
|
|
6
|
+
- Select the V2 holder extension commitment for wide supplies while keeping every controller reserve signed-64-bit.
|
|
7
|
+
- Cover Nacho's exact five-controller allocation totals through payload and funded snapshot-start transaction tests.
|
|
8
|
+
|
|
9
|
+
## 0.8.0-fee.7
|
|
10
|
+
|
|
11
|
+
- Accept the indexer's verified policy summary fields when reconstructing live bid scripts for seller sweeps.
|
|
12
|
+
- Enable two-ask grouped buy submission after the pinned follower budget passed signed consensus proof and a funded TN10 transaction.
|
|
13
|
+
- Keep fee policy, contract artifacts, legacy operations and snapshot operations unchanged.
|
|
14
|
+
|
|
3
15
|
## 0.8.0-fee.6
|
|
4
16
|
|
|
5
17
|
- Expose the existing fee-market holder merge and seller sweep PSKT handlers through the public builder key registry.
|
package/RELEASING.md
CHANGED
|
@@ -95,6 +95,15 @@ 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
|
+
|
|
98
107
|
Version `0.8.0-fee.6` registers the previously implemented fee-market holder
|
|
99
108
|
merge and seller-sweep keys for browser consumers. It changes no contract
|
|
100
109
|
artifacts or signed transaction logic. Backend consumers must update their
|
package/dist/cjs/engine.js
CHANGED
|
@@ -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
|
-
//
|
|
4008
|
-
|
|
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:
|
|
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: { ...
|
|
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) });
|