@lucid-evolution/utils 0.1.15 → 0.1.16
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 +9 -0
- package/dist/index.d.cts +3 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +8 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -65,6 +65,7 @@ __export(src_exports, {
|
|
|
65
65
|
slotToUnixTime: () => slotToUnixTime,
|
|
66
66
|
sortUTxOs: () => sortUTxOs,
|
|
67
67
|
stakeCredentialOf: () => stakeCredentialOf,
|
|
68
|
+
stringify: () => stringify,
|
|
68
69
|
toLabel: () => toLabel,
|
|
69
70
|
toNativeScript: () => toNativeScript,
|
|
70
71
|
toPublicKey: () => toPublicKey,
|
|
@@ -1126,6 +1127,13 @@ var sortUTxOs = (utxos, order = "descending") => {
|
|
|
1126
1127
|
});
|
|
1127
1128
|
};
|
|
1128
1129
|
var isEqualUTxO = (self, that) => self.txHash === that.txHash && self.outputIndex === that.outputIndex;
|
|
1130
|
+
|
|
1131
|
+
// src/objects.ts
|
|
1132
|
+
var stringify = (data) => JSON.stringify(
|
|
1133
|
+
data,
|
|
1134
|
+
(key, value) => typeof value === "bigint" ? value.toString() + "n" : value,
|
|
1135
|
+
2
|
|
1136
|
+
);
|
|
1129
1137
|
// Annotate the CommonJS export names for ESM import in node:
|
|
1130
1138
|
0 && (module.exports = {
|
|
1131
1139
|
PROTOCOL_PARAMETERS_DEFAULT,
|
|
@@ -1163,6 +1171,7 @@ var isEqualUTxO = (self, that) => self.txHash === that.txHash && self.outputInde
|
|
|
1163
1171
|
slotToUnixTime,
|
|
1164
1172
|
sortUTxOs,
|
|
1165
1173
|
stakeCredentialOf,
|
|
1174
|
+
stringify,
|
|
1166
1175
|
toLabel,
|
|
1167
1176
|
toNativeScript,
|
|
1168
1177
|
toPublicKey,
|
package/dist/index.d.cts
CHANGED
|
@@ -90,4 +90,6 @@ declare function fromUnit(unit: Unit): {
|
|
|
90
90
|
declare function toUnit(policyId: PolicyId, name?: string | null, label?: number | null): Unit;
|
|
91
91
|
declare function addAssets(...assets: Assets[]): Assets;
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
declare const stringify: (data: any) => string;
|
|
94
|
+
|
|
95
|
+
export { PROTOCOL_PARAMETERS_DEFAULT, addAssets, addressFromHexOrBech32, applyDoubleCborEncoding, applyParamsToScript, assetsToValue, coreToOutRef, coreToTxOutput, coreToUtxo, coresToOutRefs, coresToTxOutputs, coresToUtxos, createCostModels, credentialToAddress, credentialToRewardAddress, datumToHash, fromLabel, fromScriptRef, fromUnit, generatePrivateKey, generateSeedPhrase, getAddressDetails, isEqualUTxO, keyHashToCredential, mintingPolicyToId, nativeFromJson, nativeJSFromJson, nativeScriptFromJson, networkToId, paymentCredentialOf, scriptHashToCredential, selectUTxOs, slotToUnixTime, sortUTxOs, stakeCredentialOf, stringify, toLabel, toNativeScript, toPublicKey, toScriptRef, toUnit, unixTimeToSlot, utxoToCore, utxoToTransactionInput, utxoToTransactionOutput, utxosToCores, validatorToAddress, validatorToRewardAddress, validatorToScriptHash, valueToAssets };
|
package/dist/index.d.ts
CHANGED
|
@@ -90,4 +90,6 @@ declare function fromUnit(unit: Unit): {
|
|
|
90
90
|
declare function toUnit(policyId: PolicyId, name?: string | null, label?: number | null): Unit;
|
|
91
91
|
declare function addAssets(...assets: Assets[]): Assets;
|
|
92
92
|
|
|
93
|
-
|
|
93
|
+
declare const stringify: (data: any) => string;
|
|
94
|
+
|
|
95
|
+
export { PROTOCOL_PARAMETERS_DEFAULT, addAssets, addressFromHexOrBech32, applyDoubleCborEncoding, applyParamsToScript, assetsToValue, coreToOutRef, coreToTxOutput, coreToUtxo, coresToOutRefs, coresToTxOutputs, coresToUtxos, createCostModels, credentialToAddress, credentialToRewardAddress, datumToHash, fromLabel, fromScriptRef, fromUnit, generatePrivateKey, generateSeedPhrase, getAddressDetails, isEqualUTxO, keyHashToCredential, mintingPolicyToId, nativeFromJson, nativeJSFromJson, nativeScriptFromJson, networkToId, paymentCredentialOf, scriptHashToCredential, selectUTxOs, slotToUnixTime, sortUTxOs, stakeCredentialOf, stringify, toLabel, toNativeScript, toPublicKey, toScriptRef, toUnit, unixTimeToSlot, utxoToCore, utxoToTransactionInput, utxoToTransactionOutput, utxosToCores, validatorToAddress, validatorToRewardAddress, validatorToScriptHash, valueToAssets };
|
package/dist/index.js
CHANGED
|
@@ -1046,6 +1046,13 @@ var sortUTxOs = (utxos, order = "descending") => {
|
|
|
1046
1046
|
});
|
|
1047
1047
|
};
|
|
1048
1048
|
var isEqualUTxO = (self, that) => self.txHash === that.txHash && self.outputIndex === that.outputIndex;
|
|
1049
|
+
|
|
1050
|
+
// src/objects.ts
|
|
1051
|
+
var stringify = (data) => JSON.stringify(
|
|
1052
|
+
data,
|
|
1053
|
+
(key, value) => typeof value === "bigint" ? value.toString() + "n" : value,
|
|
1054
|
+
2
|
|
1055
|
+
);
|
|
1049
1056
|
export {
|
|
1050
1057
|
PROTOCOL_PARAMETERS_DEFAULT,
|
|
1051
1058
|
addAssets,
|
|
@@ -1082,6 +1089,7 @@ export {
|
|
|
1082
1089
|
slotToUnixTime,
|
|
1083
1090
|
sortUTxOs,
|
|
1084
1091
|
stakeCredentialOf,
|
|
1092
|
+
stringify,
|
|
1085
1093
|
toLabel,
|
|
1086
1094
|
toNativeScript,
|
|
1087
1095
|
toPublicKey,
|