@meshsdk/common 1.9.0-beta.37 → 1.9.0-beta.41

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 CHANGED
@@ -1097,7 +1097,7 @@ var mTxOutRef = (txHash, index) => {
1097
1097
  }
1098
1098
  return mConStr0([mConStr0([txHash]), index]);
1099
1099
  };
1100
- var mTuple = (key, value2) => [key, value2];
1100
+ var mTuple = (...args) => args;
1101
1101
  var mOption = (value2) => {
1102
1102
  if (value2) {
1103
1103
  return mSome(value2);
@@ -1274,7 +1274,9 @@ var posixTime = (int) => ({ int });
1274
1274
  var dict = (itemsMap) => ({
1275
1275
  map: itemsMap.map(([k, v]) => ({ k, v }))
1276
1276
  });
1277
- var tuple = (key, value2) => ({ list: [key, value2] });
1277
+ var tuple = (...args) => ({
1278
+ list: args
1279
+ });
1278
1280
  var option = (value2) => {
1279
1281
  if (!value2) {
1280
1282
  return none();
package/dist/index.d.cts CHANGED
@@ -583,6 +583,8 @@ type MeshTxBuilderBody = {
583
583
  network: Network | number[][];
584
584
  expectedNumberKeyWitnesses: number;
585
585
  expectedByronAddressWitnesses: string[];
586
+ totalCollateral?: Quantity;
587
+ collateralReturnAddress?: string;
586
588
  };
587
589
  declare const emptyTxBuilderBody: () => MeshTxBuilderBody;
588
590
  declare function cloneTxBuilderBody(body: MeshTxBuilderBody): MeshTxBuilderBody;
@@ -688,7 +690,7 @@ type MTxOutRef = MConStr0<[MConStr0<[string]>, number]>;
688
690
  * Aiken alias
689
691
  * The Mesh Data tuple
690
692
  */
691
- type MTuple<K, V> = [K, V];
693
+ type MTuple<T extends any> = T[];
692
694
  /**
693
695
  * Aiken alias
694
696
  * The Mesh Data Option type
@@ -727,11 +729,10 @@ declare const mOutputReference: (txHash: string, index: number) => MOutputRefere
727
729
  declare const mTxOutRef: (txHash: string, index: number) => MTxOutRef;
728
730
  /**
729
731
  * The utility function to create a Mesh Data tuple in Mesh Data type
730
- * @param key The key of the tuple
731
- * @param value The value of the tuple
732
+ * @param args The arguments of the tuple
732
733
  * @returns The Mesh Data tuple object
733
734
  */
734
- declare const mTuple: <K, V>(key: K, value: V) => MTuple<K, V>;
735
+ declare const mTuple: <T extends any[]>(...args: T) => MTuple<T>;
735
736
  /**
736
737
  * The utility function to create a Mesh Data Option type in Mesh Data type
737
738
  * @param value The value of the option
@@ -1083,8 +1084,8 @@ type Dict<V> = {
1083
1084
  * Aiken alias
1084
1085
  * The Plutus Data tuple in JSON
1085
1086
  */
1086
- type Tuple<K, V> = {
1087
- list: [K, V];
1087
+ type Tuple<T extends any[]> = {
1088
+ list: T;
1088
1089
  };
1089
1090
  /**
1090
1091
  * Aiken alias
@@ -1180,11 +1181,10 @@ declare const posixTime: (int: number) => POSIXTime;
1180
1181
  declare const dict: <V>(itemsMap: [ByteString, V][]) => Dict<V>;
1181
1182
  /**
1182
1183
  * The utility function to create a Plutus Data tuple in JSON
1183
- * @param key The key of the tuple
1184
- * @param value The value of the tuple
1184
+ * @param args The arguments of the tuple
1185
1185
  * @returns The Plutus Data tuple object
1186
1186
  */
1187
- declare const tuple: <K = PlutusData, V = PlutusData>(key: K, value: V) => Tuple<K, V>;
1187
+ declare const tuple: <T extends PlutusData[]>(...args: T) => Tuple<T>;
1188
1188
  /**
1189
1189
  * The utility function to create a Plutus Data Option in JSON
1190
1190
  * @param value The optional value of the option
@@ -1296,7 +1296,7 @@ type ForkNeighbor = ConStr0<[
1296
1296
  */
1297
1297
  declare const jsonProofToPlutusData: (proof: object) => ProofStep[];
1298
1298
 
1299
- type PlutusData = ConStr | Bool | ByteString | Integer | List | AssocMap | Pairs | MaybeStakingHash | PubKeyAddress | ScriptAddress | AssetClass | OutputReference | PubKeyHash | POSIXTime | Dict<any> | Tuple<any, any>;
1299
+ type PlutusData = ConStr | Bool | ByteString | Integer | List | AssocMap | Pairs | MaybeStakingHash | PubKeyAddress | ScriptAddress | AssetClass | OutputReference | PubKeyHash | POSIXTime | Dict<any> | Tuple<any>;
1300
1300
 
1301
1301
  /**
1302
1302
  * Converting bytes to hex string
package/dist/index.d.ts CHANGED
@@ -583,6 +583,8 @@ type MeshTxBuilderBody = {
583
583
  network: Network | number[][];
584
584
  expectedNumberKeyWitnesses: number;
585
585
  expectedByronAddressWitnesses: string[];
586
+ totalCollateral?: Quantity;
587
+ collateralReturnAddress?: string;
586
588
  };
587
589
  declare const emptyTxBuilderBody: () => MeshTxBuilderBody;
588
590
  declare function cloneTxBuilderBody(body: MeshTxBuilderBody): MeshTxBuilderBody;
@@ -688,7 +690,7 @@ type MTxOutRef = MConStr0<[MConStr0<[string]>, number]>;
688
690
  * Aiken alias
689
691
  * The Mesh Data tuple
690
692
  */
691
- type MTuple<K, V> = [K, V];
693
+ type MTuple<T extends any> = T[];
692
694
  /**
693
695
  * Aiken alias
694
696
  * The Mesh Data Option type
@@ -727,11 +729,10 @@ declare const mOutputReference: (txHash: string, index: number) => MOutputRefere
727
729
  declare const mTxOutRef: (txHash: string, index: number) => MTxOutRef;
728
730
  /**
729
731
  * The utility function to create a Mesh Data tuple in Mesh Data type
730
- * @param key The key of the tuple
731
- * @param value The value of the tuple
732
+ * @param args The arguments of the tuple
732
733
  * @returns The Mesh Data tuple object
733
734
  */
734
- declare const mTuple: <K, V>(key: K, value: V) => MTuple<K, V>;
735
+ declare const mTuple: <T extends any[]>(...args: T) => MTuple<T>;
735
736
  /**
736
737
  * The utility function to create a Mesh Data Option type in Mesh Data type
737
738
  * @param value The value of the option
@@ -1083,8 +1084,8 @@ type Dict<V> = {
1083
1084
  * Aiken alias
1084
1085
  * The Plutus Data tuple in JSON
1085
1086
  */
1086
- type Tuple<K, V> = {
1087
- list: [K, V];
1087
+ type Tuple<T extends any[]> = {
1088
+ list: T;
1088
1089
  };
1089
1090
  /**
1090
1091
  * Aiken alias
@@ -1180,11 +1181,10 @@ declare const posixTime: (int: number) => POSIXTime;
1180
1181
  declare const dict: <V>(itemsMap: [ByteString, V][]) => Dict<V>;
1181
1182
  /**
1182
1183
  * The utility function to create a Plutus Data tuple in JSON
1183
- * @param key The key of the tuple
1184
- * @param value The value of the tuple
1184
+ * @param args The arguments of the tuple
1185
1185
  * @returns The Plutus Data tuple object
1186
1186
  */
1187
- declare const tuple: <K = PlutusData, V = PlutusData>(key: K, value: V) => Tuple<K, V>;
1187
+ declare const tuple: <T extends PlutusData[]>(...args: T) => Tuple<T>;
1188
1188
  /**
1189
1189
  * The utility function to create a Plutus Data Option in JSON
1190
1190
  * @param value The optional value of the option
@@ -1296,7 +1296,7 @@ type ForkNeighbor = ConStr0<[
1296
1296
  */
1297
1297
  declare const jsonProofToPlutusData: (proof: object) => ProofStep[];
1298
1298
 
1299
- type PlutusData = ConStr | Bool | ByteString | Integer | List | AssocMap | Pairs | MaybeStakingHash | PubKeyAddress | ScriptAddress | AssetClass | OutputReference | PubKeyHash | POSIXTime | Dict<any> | Tuple<any, any>;
1299
+ type PlutusData = ConStr | Bool | ByteString | Integer | List | AssocMap | Pairs | MaybeStakingHash | PubKeyAddress | ScriptAddress | AssetClass | OutputReference | PubKeyHash | POSIXTime | Dict<any> | Tuple<any>;
1300
1300
 
1301
1301
  /**
1302
1302
  * Converting bytes to hex string
package/dist/index.js CHANGED
@@ -945,7 +945,7 @@ var mTxOutRef = (txHash, index) => {
945
945
  }
946
946
  return mConStr0([mConStr0([txHash]), index]);
947
947
  };
948
- var mTuple = (key, value2) => [key, value2];
948
+ var mTuple = (...args) => args;
949
949
  var mOption = (value2) => {
950
950
  if (value2) {
951
951
  return mSome(value2);
@@ -1122,7 +1122,9 @@ var posixTime = (int) => ({ int });
1122
1122
  var dict = (itemsMap) => ({
1123
1123
  map: itemsMap.map(([k, v]) => ({ k, v }))
1124
1124
  });
1125
- var tuple = (key, value2) => ({ list: [key, value2] });
1125
+ var tuple = (...args) => ({
1126
+ list: args
1127
+ });
1126
1128
  var option = (value2) => {
1127
1129
  if (!value2) {
1128
1130
  return none();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshsdk/common",
3
- "version": "1.9.0-beta.37",
3
+ "version": "1.9.0-beta.41",
4
4
  "description": "Contains constants, types and interfaces used across the SDK and different serialization libraries",
5
5
  "main": "./dist/index.cjs",
6
6
  "browser": "./dist/index.js",