@lucid-evolution/utils 0.1.1 → 0.1.3
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 +0 -13
- package/dist/index.d.cts +1 -3
- package/dist/index.d.ts +1 -3
- package/dist/index.js +0 -12
- package/package.json +11 -9
package/dist/index.cjs
CHANGED
|
@@ -61,7 +61,6 @@ __export(src_exports, {
|
|
|
61
61
|
scriptHashToCredential: () => scriptHashToCredential,
|
|
62
62
|
slotToUnixTime: () => slotToUnixTime,
|
|
63
63
|
stakeCredentialOf: () => stakeCredentialOf,
|
|
64
|
-
toCMLTransactionHash: () => toCMLTransactionHash,
|
|
65
64
|
toLabel: () => toLabel,
|
|
66
65
|
toNativeScript: () => toNativeScript,
|
|
67
66
|
toPublicKey: () => toPublicKey,
|
|
@@ -1108,17 +1107,6 @@ function coresToTxOutputs(outputs) {
|
|
|
1108
1107
|
}
|
|
1109
1108
|
return result;
|
|
1110
1109
|
}
|
|
1111
|
-
|
|
1112
|
-
// src/tx.ts
|
|
1113
|
-
var CML10 = __toESM(require("@dcspark/cardano-multiplatform-lib-nodejs"), 1);
|
|
1114
|
-
var import_core_utils3 = require("@lucid-evolution/core-utils");
|
|
1115
|
-
var import_lucid_cardano2 = require("lucid-cardano");
|
|
1116
|
-
function toCMLTransactionHash(body) {
|
|
1117
|
-
const TransactionHash3 = import_lucid_cardano2.C.hash_transaction(
|
|
1118
|
-
import_lucid_cardano2.C.TransactionBody.from_bytes((0, import_core_utils3.fromHex)(body.to_cbor_hex()))
|
|
1119
|
-
);
|
|
1120
|
-
return CML10.TransactionHash.from_hex(TransactionHash3.to_hex());
|
|
1121
|
-
}
|
|
1122
1110
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1123
1111
|
0 && (module.exports = {
|
|
1124
1112
|
PROTOCOL_PARAMETERS_DEFAULT,
|
|
@@ -1152,7 +1140,6 @@ function toCMLTransactionHash(body) {
|
|
|
1152
1140
|
scriptHashToCredential,
|
|
1153
1141
|
slotToUnixTime,
|
|
1154
1142
|
stakeCredentialOf,
|
|
1155
|
-
toCMLTransactionHash,
|
|
1156
1143
|
toLabel,
|
|
1157
1144
|
toNativeScript,
|
|
1158
1145
|
toPublicKey,
|
package/dist/index.d.cts
CHANGED
|
@@ -75,6 +75,4 @@ declare function fromUnit(unit: Unit): {
|
|
|
75
75
|
declare function toUnit(policyId: PolicyId, name?: string | null, label?: number | null): Unit;
|
|
76
76
|
declare function addAssets(...assets: Assets[]): Assets;
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
export { PROTOCOL_PARAMETERS_DEFAULT, addAssets, addressFromHexOrBech32, assetsToValue, coreToOutRef, coreToTxOutput, coreToUtxo, coresToOutRefs, coresToTxOutputs, coresToUtxos, createCostModels, credentialToAddress, credentialToRewardAddress, datumToHash, fromLabel, fromScriptRef, fromUnit, generatePrivateKey, generateSeedPhrase, getAddressDetails, keyHashToCredential, mintingPolicyToId, nativeFromJson, nativeJSFromJson, nativeScriptFromJson, networkToId, paymentCredentialOf, scriptHashToCredential, slotToUnixTime, stakeCredentialOf, toCMLTransactionHash, toLabel, toNativeScript, toPublicKey, toScriptRef, toUnit, unixTimeToSlot, utxoToCore, utxoToTransactionInput, utxoToTransactionOutput, utxosToCores, validatorToAddress, validatorToRewardAddress, validatorToScriptHash, valueToAssets };
|
|
78
|
+
export { PROTOCOL_PARAMETERS_DEFAULT, addAssets, addressFromHexOrBech32, assetsToValue, coreToOutRef, coreToTxOutput, coreToUtxo, coresToOutRefs, coresToTxOutputs, coresToUtxos, createCostModels, credentialToAddress, credentialToRewardAddress, datumToHash, fromLabel, fromScriptRef, fromUnit, generatePrivateKey, generateSeedPhrase, getAddressDetails, keyHashToCredential, mintingPolicyToId, nativeFromJson, nativeJSFromJson, nativeScriptFromJson, networkToId, paymentCredentialOf, scriptHashToCredential, slotToUnixTime, stakeCredentialOf, toLabel, toNativeScript, toPublicKey, toScriptRef, toUnit, unixTimeToSlot, utxoToCore, utxoToTransactionInput, utxoToTransactionOutput, utxosToCores, validatorToAddress, validatorToRewardAddress, validatorToScriptHash, valueToAssets };
|
package/dist/index.d.ts
CHANGED
|
@@ -75,6 +75,4 @@ declare function fromUnit(unit: Unit): {
|
|
|
75
75
|
declare function toUnit(policyId: PolicyId, name?: string | null, label?: number | null): Unit;
|
|
76
76
|
declare function addAssets(...assets: Assets[]): Assets;
|
|
77
77
|
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
export { PROTOCOL_PARAMETERS_DEFAULT, addAssets, addressFromHexOrBech32, assetsToValue, coreToOutRef, coreToTxOutput, coreToUtxo, coresToOutRefs, coresToTxOutputs, coresToUtxos, createCostModels, credentialToAddress, credentialToRewardAddress, datumToHash, fromLabel, fromScriptRef, fromUnit, generatePrivateKey, generateSeedPhrase, getAddressDetails, keyHashToCredential, mintingPolicyToId, nativeFromJson, nativeJSFromJson, nativeScriptFromJson, networkToId, paymentCredentialOf, scriptHashToCredential, slotToUnixTime, stakeCredentialOf, toCMLTransactionHash, toLabel, toNativeScript, toPublicKey, toScriptRef, toUnit, unixTimeToSlot, utxoToCore, utxoToTransactionInput, utxoToTransactionOutput, utxosToCores, validatorToAddress, validatorToRewardAddress, validatorToScriptHash, valueToAssets };
|
|
78
|
+
export { PROTOCOL_PARAMETERS_DEFAULT, addAssets, addressFromHexOrBech32, assetsToValue, coreToOutRef, coreToTxOutput, coreToUtxo, coresToOutRefs, coresToTxOutputs, coresToUtxos, createCostModels, credentialToAddress, credentialToRewardAddress, datumToHash, fromLabel, fromScriptRef, fromUnit, generatePrivateKey, generateSeedPhrase, getAddressDetails, keyHashToCredential, mintingPolicyToId, nativeFromJson, nativeJSFromJson, nativeScriptFromJson, networkToId, paymentCredentialOf, scriptHashToCredential, slotToUnixTime, stakeCredentialOf, toLabel, toNativeScript, toPublicKey, toScriptRef, toUnit, unixTimeToSlot, utxoToCore, utxoToTransactionInput, utxoToTransactionOutput, utxosToCores, validatorToAddress, validatorToRewardAddress, validatorToScriptHash, valueToAssets };
|
package/dist/index.js
CHANGED
|
@@ -1031,17 +1031,6 @@ function coresToTxOutputs(outputs) {
|
|
|
1031
1031
|
}
|
|
1032
1032
|
return result;
|
|
1033
1033
|
}
|
|
1034
|
-
|
|
1035
|
-
// src/tx.ts
|
|
1036
|
-
import * as CML10 from "@dcspark/cardano-multiplatform-lib-nodejs";
|
|
1037
|
-
import { fromHex as fromHex2 } from "@lucid-evolution/core-utils";
|
|
1038
|
-
import { C } from "lucid-cardano";
|
|
1039
|
-
function toCMLTransactionHash(body) {
|
|
1040
|
-
const TransactionHash3 = C.hash_transaction(
|
|
1041
|
-
C.TransactionBody.from_bytes(fromHex2(body.to_cbor_hex()))
|
|
1042
|
-
);
|
|
1043
|
-
return CML10.TransactionHash.from_hex(TransactionHash3.to_hex());
|
|
1044
|
-
}
|
|
1045
1034
|
export {
|
|
1046
1035
|
PROTOCOL_PARAMETERS_DEFAULT,
|
|
1047
1036
|
addAssets,
|
|
@@ -1074,7 +1063,6 @@ export {
|
|
|
1074
1063
|
scriptHashToCredential,
|
|
1075
1064
|
slotToUnixTime,
|
|
1076
1065
|
stakeCredentialOf,
|
|
1077
|
-
toCMLTransactionHash,
|
|
1078
1066
|
toLabel,
|
|
1079
1067
|
toNativeScript,
|
|
1080
1068
|
toPublicKey,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@lucid-evolution/utils",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.3",
|
|
4
4
|
"description": "",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -21,18 +21,20 @@
|
|
|
21
21
|
"keywords": [],
|
|
22
22
|
"author": "",
|
|
23
23
|
"license": "MIT",
|
|
24
|
+
"dependencies": {
|
|
25
|
+
"@dcspark/cardano-multiplatform-lib-nodejs": "^5.2.0",
|
|
26
|
+
"lucid-cardano": "^0.10.7",
|
|
27
|
+
"@lucid-evolution/bip39": "0.2.3",
|
|
28
|
+
"@lucid-evolution/core-types": "0.1.3",
|
|
29
|
+
"@lucid-evolution/core-utils": "0.1.3",
|
|
30
|
+
"@lucid-evolution/crc8": "0.1.3",
|
|
31
|
+
"@lucid-evolution/plutus": "0.1.6"
|
|
32
|
+
},
|
|
24
33
|
"devDependencies": {
|
|
25
|
-
"@dcspark/cardano-multiplatform-lib-nodejs": "^5.1.0",
|
|
26
34
|
"@types/node": "^20.11.24",
|
|
27
35
|
"cborg": "^4.1.4",
|
|
28
|
-
"lucid-cardano": "^0.10.7",
|
|
29
36
|
"tsup": "^8.0.2",
|
|
30
|
-
"typescript": "^5.3.3"
|
|
31
|
-
"@lucid-evolution/bip39": "0.2.1",
|
|
32
|
-
"@lucid-evolution/core-types": "0.1.1",
|
|
33
|
-
"@lucid-evolution/core-utils": "0.1.1",
|
|
34
|
-
"@lucid-evolution/crc8": "0.1.1",
|
|
35
|
-
"@lucid-evolution/plutus": "0.1.4"
|
|
37
|
+
"typescript": "^5.3.3"
|
|
36
38
|
},
|
|
37
39
|
"scripts": {
|
|
38
40
|
"build": "tsup-node src/index.ts --format esm,cjs --dts --clean",
|