@kaspacom/kcc20-tx-builder 0.8.0-fee.12 → 0.8.0-fee.13
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 +4 -0
- package/dist/cjs/engine.js +5 -2
- package/dist/cjs/engine.js.map +1 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +5 -2
- package/dist/engine.js.map +1 -1
- package/docs/COMPATIBILITY.json +1 -1
- package/package.json +1 -1
- package/src/engine.ts +6 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.8.0-fee.13
|
|
4
|
+
|
|
5
|
+
- Accept the indexer ownerScheme alias in seller-sweep bid inputs after checking it agrees with owner_scheme; preserve strict runtime state and script checks.
|
|
6
|
+
|
|
3
7
|
## 0.8.0-fee.12 (unreleased)
|
|
4
8
|
|
|
5
9
|
- Build imported Argent fee-market wrap/unwrap and profile-aware trades with the corrected V2 wrapper.
|
package/dist/cjs/engine.js
CHANGED
|
@@ -4175,15 +4175,18 @@ function createKcc20PsktBuilderEngine(options) {
|
|
|
4175
4175
|
String(utxo.state.wrapper_spk_hash).toLowerCase() !== holderPlan.wrapper.scriptHash) {
|
|
4176
4176
|
throw new Error(`bid ${slot} differs from fixed market policy`);
|
|
4177
4177
|
}
|
|
4178
|
-
// The indexer adds policy
|
|
4178
|
+
// The indexer adds policy summaries and an ownerScheme alias. They are not
|
|
4179
4179
|
// part of the on-chain bid state and must not enter script reconstruction.
|
|
4180
|
-
const { creatorFeeBps: indexedCreatorFeeBps, feePolicyVersion: indexedFeePolicyVersion, ...bidState } = utxo.state;
|
|
4180
|
+
const { creatorFeeBps: indexedCreatorFeeBps, feePolicyVersion: indexedFeePolicyVersion, ownerScheme: indexedOwnerScheme, ...bidState } = utxo.state;
|
|
4181
4181
|
if ((indexedCreatorFeeBps !== undefined &&
|
|
4182
4182
|
Number(indexedCreatorFeeBps) !== params.feePolicy.creatorFeeBps) ||
|
|
4183
4183
|
(indexedFeePolicyVersion !== undefined &&
|
|
4184
4184
|
Number(indexedFeePolicyVersion) !== params.feePolicy.version)) {
|
|
4185
4185
|
throw new Error(`bid ${slot} indexed policy summary differs from fixed policy`);
|
|
4186
4186
|
}
|
|
4187
|
+
if (indexedOwnerScheme !== undefined && indexedOwnerScheme !== scheme) {
|
|
4188
|
+
throw new Error(`bid ${slot} indexed owner scheme differs from contract state`);
|
|
4189
|
+
}
|
|
4187
4190
|
const bidScript = (0, escrow_market_artifacts_js_1.buildKcc20FeeMarketRoleScript)({ artifact: artifacts.bid,
|
|
4188
4191
|
role: "bid", state: bidState });
|
|
4189
4192
|
const buyerPlan = (0, escrow_market_setup_js_1.prepareKcc20FeeMarketWrappedHolder)({ ...base,
|