@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.
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "schema": "kcc20-example-compatibility/v1",
3
- "packageVersion": "0.8.0-fee.12",
3
+ "packageVersion": "0.8.0-fee.13",
4
4
  "contractsRepository": "https://github.com/KASPACOM/kaspa-covenants",
5
5
  "contractsCommit": "1a15362b35661464587cf07ffe8a42186a545897",
6
6
  "compiler": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@kaspacom/kcc20-tx-builder",
3
- "version": "0.8.0-fee.12",
3
+ "version": "0.8.0-fee.13",
4
4
  "description": "Runtime-independent KCC20 covenant transaction and PSKT construction primitives.",
5
5
  "license": "Apache-2.0",
6
6
  "author": "KaspaCom",
package/src/engine.ts CHANGED
@@ -5349,16 +5349,20 @@ export function createKcc20PsktBuilderEngine(
5349
5349
  String(utxo.state.wrapper_spk_hash).toLowerCase() !== holderPlan.wrapper.scriptHash) {
5350
5350
  throw new Error(`bid ${slot} differs from fixed market policy`);
5351
5351
  }
5352
- // The indexer adds policy summary fields for API consumers. They are not
5352
+ // The indexer adds policy summaries and an ownerScheme alias. They are not
5353
5353
  // part of the on-chain bid state and must not enter script reconstruction.
5354
5354
  const { creatorFeeBps: indexedCreatorFeeBps,
5355
- feePolicyVersion: indexedFeePolicyVersion, ...bidState } = utxo.state;
5355
+ feePolicyVersion: indexedFeePolicyVersion,
5356
+ ownerScheme: indexedOwnerScheme, ...bidState } = utxo.state;
5356
5357
  if ((indexedCreatorFeeBps !== undefined &&
5357
5358
  Number(indexedCreatorFeeBps) !== params.feePolicy.creatorFeeBps) ||
5358
5359
  (indexedFeePolicyVersion !== undefined &&
5359
5360
  Number(indexedFeePolicyVersion) !== params.feePolicy.version)) {
5360
5361
  throw new Error(`bid ${slot} indexed policy summary differs from fixed policy`);
5361
5362
  }
5363
+ if (indexedOwnerScheme !== undefined && indexedOwnerScheme !== scheme) {
5364
+ throw new Error(`bid ${slot} indexed owner scheme differs from contract state`);
5365
+ }
5362
5366
  const bidScript = buildKcc20FeeMarketRoleScript({ artifact: artifacts.bid,
5363
5367
  role: "bid", state: bidState });
5364
5368
  const buyerPlan = prepareKcc20FeeMarketWrappedHolder({ ...base,