@meshsdk/core-csl 1.9.0-beta.2 → 1.9.0-beta.20
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/index.cjs +7 -2
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +7 -2
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -1374,7 +1374,12 @@ var CSLSerializer = class {
|
|
|
1374
1374
|
this.protocolParams = protocolParams || import_common4.DEFAULT_PROTOCOL_PARAMETERS;
|
|
1375
1375
|
this.verbose = verbose;
|
|
1376
1376
|
}
|
|
1377
|
-
serializeTxBody(txBody, protocolParams) {
|
|
1377
|
+
serializeTxBody(txBody, protocolParams, balanced = true) {
|
|
1378
|
+
if (!balanced) {
|
|
1379
|
+
throw new Error(
|
|
1380
|
+
"Unbalanced transactions are not supported with CSL serializer"
|
|
1381
|
+
);
|
|
1382
|
+
}
|
|
1378
1383
|
const txBodyJson = import_json_bigint3.default.stringify(meshTxBuilderBodyToObj(txBody));
|
|
1379
1384
|
const params = import_json_bigint3.default.stringify(protocolParams || this.protocolParams);
|
|
1380
1385
|
if (this.verbose) {
|
|
@@ -1513,7 +1518,7 @@ var OfflineEvaluator = class {
|
|
|
1513
1518
|
}
|
|
1514
1519
|
}
|
|
1515
1520
|
const inputsToResolve = getTransactionInputs(tx).filter(
|
|
1516
|
-
(input) => foundUtxos.has(`${input.txHash}:${input.outputIndex}`)
|
|
1521
|
+
(input) => !foundUtxos.has(`${input.txHash}:${input.outputIndex}`)
|
|
1517
1522
|
);
|
|
1518
1523
|
const txHashesSet = new Set(inputsToResolve.map((input) => input.txHash));
|
|
1519
1524
|
for (const txHash of txHashesSet) {
|
package/dist/index.d.cts
CHANGED
|
@@ -67,7 +67,7 @@ declare class CSLSerializer implements IMeshTxSerializer {
|
|
|
67
67
|
protocolParams: Protocol;
|
|
68
68
|
meshTxBuilderBody: MeshTxBuilderBody;
|
|
69
69
|
constructor(protocolParams?: Protocol, verbose?: boolean);
|
|
70
|
-
serializeTxBody(txBody: MeshTxBuilderBody, protocolParams?: Protocol): string;
|
|
70
|
+
serializeTxBody(txBody: MeshTxBuilderBody, protocolParams?: Protocol, balanced?: Boolean): string;
|
|
71
71
|
addSigningKeys(txHex: string, signingKeys: string[]): string;
|
|
72
72
|
serializeData(data: BuilderData): string;
|
|
73
73
|
serializeAddress(address: Partial<DeserializedAddress>, networkId?: number): string;
|
package/dist/index.d.ts
CHANGED
|
@@ -67,7 +67,7 @@ declare class CSLSerializer implements IMeshTxSerializer {
|
|
|
67
67
|
protocolParams: Protocol;
|
|
68
68
|
meshTxBuilderBody: MeshTxBuilderBody;
|
|
69
69
|
constructor(protocolParams?: Protocol, verbose?: boolean);
|
|
70
|
-
serializeTxBody(txBody: MeshTxBuilderBody, protocolParams?: Protocol): string;
|
|
70
|
+
serializeTxBody(txBody: MeshTxBuilderBody, protocolParams?: Protocol, balanced?: Boolean): string;
|
|
71
71
|
addSigningKeys(txHex: string, signingKeys: string[]): string;
|
|
72
72
|
serializeData(data: BuilderData): string;
|
|
73
73
|
serializeAddress(address: Partial<DeserializedAddress>, networkId?: number): string;
|
package/dist/index.js
CHANGED
|
@@ -1249,7 +1249,12 @@ var CSLSerializer = class {
|
|
|
1249
1249
|
this.protocolParams = protocolParams || DEFAULT_PROTOCOL_PARAMETERS;
|
|
1250
1250
|
this.verbose = verbose;
|
|
1251
1251
|
}
|
|
1252
|
-
serializeTxBody(txBody, protocolParams) {
|
|
1252
|
+
serializeTxBody(txBody, protocolParams, balanced = true) {
|
|
1253
|
+
if (!balanced) {
|
|
1254
|
+
throw new Error(
|
|
1255
|
+
"Unbalanced transactions are not supported with CSL serializer"
|
|
1256
|
+
);
|
|
1257
|
+
}
|
|
1253
1258
|
const txBodyJson = JSONbig3.stringify(meshTxBuilderBodyToObj(txBody));
|
|
1254
1259
|
const params = JSONbig3.stringify(protocolParams || this.protocolParams);
|
|
1255
1260
|
if (this.verbose) {
|
|
@@ -1390,7 +1395,7 @@ var OfflineEvaluator = class {
|
|
|
1390
1395
|
}
|
|
1391
1396
|
}
|
|
1392
1397
|
const inputsToResolve = getTransactionInputs(tx).filter(
|
|
1393
|
-
(input) => foundUtxos.has(`${input.txHash}:${input.outputIndex}`)
|
|
1398
|
+
(input) => !foundUtxos.has(`${input.txHash}:${input.outputIndex}`)
|
|
1394
1399
|
);
|
|
1395
1400
|
const txHashesSet = new Set(inputsToResolve.map((input) => input.txHash));
|
|
1396
1401
|
for (const txHash of txHashesSet) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshsdk/core-csl",
|
|
3
|
-
"version": "1.9.0-beta.
|
|
3
|
+
"version": "1.9.0-beta.20",
|
|
4
4
|
"description": "Types and utilities functions between Mesh and cardano-serialization-lib",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"@meshsdk/configs": "*",
|
|
34
|
-
"@meshsdk/provider": "1.9.0-beta.
|
|
34
|
+
"@meshsdk/provider": "1.9.0-beta.20",
|
|
35
35
|
"@types/json-bigint": "^1.0.4",
|
|
36
36
|
"eslint": "^8.57.0",
|
|
37
37
|
"ts-jest": "^29.1.4",
|
|
@@ -39,7 +39,7 @@
|
|
|
39
39
|
"typescript": "^5.3.3"
|
|
40
40
|
},
|
|
41
41
|
"dependencies": {
|
|
42
|
-
"@meshsdk/common": "1.9.0-beta.
|
|
42
|
+
"@meshsdk/common": "1.9.0-beta.20",
|
|
43
43
|
"@sidan-lab/sidan-csl-rs-browser": "0.9.21",
|
|
44
44
|
"@sidan-lab/sidan-csl-rs-nodejs": "0.9.21",
|
|
45
45
|
"@types/base32-encoding": "^1.0.2",
|