@kaspacom/kcc20-tx-builder 0.6.0 → 0.6.1
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/dist/cjs/engine.js +5 -0
- package/dist/cjs/engine.js.map +1 -1
- package/dist/engine.d.ts.map +1 -1
- package/dist/engine.js +5 -0
- package/dist/engine.js.map +1 -1
- package/package.json +2 -2
- package/src/engine.ts +7 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kaspacom/kcc20-tx-builder",
|
|
3
|
-
"version": "0.6.
|
|
3
|
+
"version": "0.6.1",
|
|
4
4
|
"description": "Runtime-independent KCC20 covenant transaction and PSKT construction primitives.",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": "KaspaCom",
|
|
@@ -86,7 +86,7 @@
|
|
|
86
86
|
"scripts": {
|
|
87
87
|
"build": "tsc -p tsconfig.json && tsc -p tsconfig.cjs.json && node scripts/write-cjs-package.mjs",
|
|
88
88
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
89
|
-
"test": "npm run typecheck && npm run build && node test/smoke.mjs && node test/cjs-smoke.cjs && node test/snapshot-plan.mjs && node test/token-profiles.mjs && node test/profile-transfer.mjs",
|
|
89
|
+
"test": "npm run typecheck && npm run build && node test/smoke.mjs && node test/cjs-smoke.cjs && node test/snapshot-plan.mjs && node test/token-profiles.mjs && node test/profile-transfer.mjs && node --test test/mint-availability-limit.mjs",
|
|
90
90
|
"prepack": "npm test",
|
|
91
91
|
"test:examples": "npm run verify:compatibility && node scripts/test-examples.mjs --browser",
|
|
92
92
|
"verify:compatibility": "node scripts/verify-compatibility.mjs",
|
package/src/engine.ts
CHANGED
|
@@ -9048,6 +9048,13 @@ export function createKcc20PsktBuilderEngine(
|
|
|
9048
9048
|
if (requestedMinterUtxos.length === 0) {
|
|
9049
9049
|
throw new Error("active KCC20 mint-authority UTXO is required");
|
|
9050
9050
|
}
|
|
9051
|
+
// The caller submits larger updates as sequential batches. Never truncate
|
|
9052
|
+
// this array: every supplied authority must be represented in the result.
|
|
9053
|
+
if (requestedMinterUtxos.length > 5) {
|
|
9054
|
+
throw new Error(
|
|
9055
|
+
"Public mint availability updates support at most 5 authorities per transaction",
|
|
9056
|
+
);
|
|
9057
|
+
}
|
|
9051
9058
|
if (typeof params.active !== "boolean") {
|
|
9052
9059
|
throw new Error("active must be a boolean");
|
|
9053
9060
|
}
|