@meshsdk/core-csl 1.6.6 → 1.6.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/dist/index.cjs +14 -3
- package/dist/index.js +14 -3
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -496,15 +496,26 @@ var keyHashToRewardAddress = (keyHashHex, network = 1) => {
|
|
|
496
496
|
return rewardAddress;
|
|
497
497
|
};
|
|
498
498
|
|
|
499
|
+
// src/wasm.ts
|
|
500
|
+
var parseWasmResult = (result) => {
|
|
501
|
+
if (result.get_status() !== "success") {
|
|
502
|
+
throw new Error(result.get_data());
|
|
503
|
+
}
|
|
504
|
+
return result.get_data();
|
|
505
|
+
};
|
|
506
|
+
|
|
499
507
|
// src/utils/transaction.ts
|
|
500
|
-
var calculateTxHash = (txHex) =>
|
|
508
|
+
var calculateTxHash = (txHex) => {
|
|
509
|
+
const result = csl.js_calculate_tx_hash(txHex);
|
|
510
|
+
return parseWasmResult(result);
|
|
511
|
+
};
|
|
501
512
|
var signTransaction = (txHex, signingKeys) => {
|
|
502
513
|
const cslSigningKeys = csl.JsVecString.new();
|
|
503
514
|
signingKeys.forEach((key) => {
|
|
504
515
|
cslSigningKeys.add(key);
|
|
505
516
|
});
|
|
506
|
-
const
|
|
507
|
-
return
|
|
517
|
+
const result = csl.js_sign_transaction(txHex, cslSigningKeys);
|
|
518
|
+
return parseWasmResult(result);
|
|
508
519
|
};
|
|
509
520
|
|
|
510
521
|
// src/utils/aiken.ts
|
package/dist/index.js
CHANGED
|
@@ -375,15 +375,26 @@ var keyHashToRewardAddress = (keyHashHex, network = 1) => {
|
|
|
375
375
|
return rewardAddress;
|
|
376
376
|
};
|
|
377
377
|
|
|
378
|
+
// src/wasm.ts
|
|
379
|
+
var parseWasmResult = (result) => {
|
|
380
|
+
if (result.get_status() !== "success") {
|
|
381
|
+
throw new Error(result.get_data());
|
|
382
|
+
}
|
|
383
|
+
return result.get_data();
|
|
384
|
+
};
|
|
385
|
+
|
|
378
386
|
// src/utils/transaction.ts
|
|
379
|
-
var calculateTxHash = (txHex) =>
|
|
387
|
+
var calculateTxHash = (txHex) => {
|
|
388
|
+
const result = csl.js_calculate_tx_hash(txHex);
|
|
389
|
+
return parseWasmResult(result);
|
|
390
|
+
};
|
|
380
391
|
var signTransaction = (txHex, signingKeys) => {
|
|
381
392
|
const cslSigningKeys = csl.JsVecString.new();
|
|
382
393
|
signingKeys.forEach((key) => {
|
|
383
394
|
cslSigningKeys.add(key);
|
|
384
395
|
});
|
|
385
|
-
const
|
|
386
|
-
return
|
|
396
|
+
const result = csl.js_sign_transaction(txHex, cslSigningKeys);
|
|
397
|
+
return parseWasmResult(result);
|
|
387
398
|
};
|
|
388
399
|
|
|
389
400
|
// src/utils/aiken.ts
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@meshsdk/core-csl",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.8",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.cjs",
|
|
6
6
|
"module": "./dist/index.js",
|
|
@@ -39,8 +39,8 @@
|
|
|
39
39
|
},
|
|
40
40
|
"dependencies": {
|
|
41
41
|
"@meshsdk/common": "*",
|
|
42
|
-
"@sidan-lab/sidan-csl-rs-browser": "0.
|
|
43
|
-
"@sidan-lab/sidan-csl-rs-nodejs": "0.
|
|
42
|
+
"@sidan-lab/sidan-csl-rs-browser": "0.7.1",
|
|
43
|
+
"@sidan-lab/sidan-csl-rs-nodejs": "0.7.1",
|
|
44
44
|
"json-bigint": "^1.0.0"
|
|
45
45
|
},
|
|
46
46
|
"prettier": "@meshsdk/configs/prettier",
|