@meshsdk/common 1.9.0-beta.72 → 1.9.0-beta.74

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
@@ -1030,11 +1030,6 @@ var emptyTxBuilderBody = () => ({
1030
1030
  withdrawals: [],
1031
1031
  votes: [],
1032
1032
  signingKey: [],
1033
- selectionConfig: {
1034
- threshold: "0",
1035
- strategy: "experimental",
1036
- includeTxFees: true
1037
- },
1038
1033
  chainedTxs: [],
1039
1034
  inputsForEvaluation: {},
1040
1035
  network: "mainnet",
package/dist/index.d.cts CHANGED
@@ -260,38 +260,6 @@ type Wallet = {
260
260
  version: string;
261
261
  };
262
262
 
263
- declare const experimentalSelectUtxos: (requiredAssets: Map<Unit, Quantity>, inputs: UTxO[], threshold: Quantity) => UTxO[];
264
-
265
- declare const keepRelevant: (requiredAssets: Map<Unit, Quantity>, inputs: UTxO[], threshold?: string) => UTxO[];
266
-
267
- declare const largestFirst: (lovelace: Quantity, initialUTxOSet: UTxO[], includeTxFees?: boolean, { maxTxSize, minFeeA, minFeeB }?: Protocol) => UTxO[];
268
-
269
- declare const largestFirstMultiAsset: (requestedOutputSet: Map<Unit, Quantity>, initialUTxOSet: UTxO[], includeTxFees?: boolean, parameters?: Protocol) => UTxO[];
270
-
271
- /**
272
- * All UTxO selection algorithms follows below's interface
273
- *
274
- * Supported algorithms:
275
- * - largestFirst - CIP2 suggested algorithm
276
- * - largestFirstMultiAsset - CIP2 suggested algorithm
277
- * - keepRelevant - CIP2 suggested algorithm
278
- * - experimental - The always evolving algorithm according to the latest research
279
- *
280
- * @param requestedOutputSet
281
- * @param initialUTxOSet
282
- * @returns
283
- */
284
- declare class UtxoSelection {
285
- private threshold;
286
- private includeTxFees;
287
- constructor(threshold?: string, includeTxFees?: boolean);
288
- largestFirst(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
289
- keepRelevant(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
290
- largestFirstMultiAsset(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
291
- experimental(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
292
- }
293
- type UtxoSelectionStrategy = keyof UtxoSelection;
294
-
295
263
  type BuilderData = {
296
264
  type: "Mesh";
297
265
  content: Data;
@@ -573,11 +541,6 @@ type MeshTxBuilderBody = {
573
541
  votes: Vote[];
574
542
  signingKey: string[];
575
543
  extraInputs: UTxO[];
576
- selectionConfig: {
577
- threshold: string;
578
- strategy: UtxoSelectionStrategy;
579
- includeTxFees: boolean;
580
- };
581
544
  chainedTxs: string[];
582
545
  inputsForEvaluation: Record<string, UTxO>;
583
546
  network: Network | number[][];
@@ -1962,7 +1925,7 @@ interface IDeserializer {
1962
1925
 
1963
1926
  interface ISigner {
1964
1927
  signData(payload: string, address?: string): Promise<DataSignature>;
1965
- signTx(unsignedTx: string, partialSign?: boolean): Promise<string>;
1928
+ signTx(unsignedTx: string, partialSign?: boolean, returnFullTx?: boolean): Promise<string>;
1966
1929
  signTxs(unsignedTxs: string[], partialSign?: boolean): Promise<string[]>;
1967
1930
  }
1968
1931
 
@@ -2027,4 +1990,36 @@ declare const hashDrepAnchor: (jsonLD: object) => string;
2027
1990
 
2028
1991
  declare function getFile(url: string): string;
2029
1992
 
1993
+ declare const experimentalSelectUtxos: (requiredAssets: Map<Unit, Quantity>, inputs: UTxO[], threshold: Quantity) => UTxO[];
1994
+
1995
+ declare const keepRelevant: (requiredAssets: Map<Unit, Quantity>, inputs: UTxO[], threshold?: string) => UTxO[];
1996
+
1997
+ declare const largestFirst: (lovelace: Quantity, initialUTxOSet: UTxO[], includeTxFees?: boolean, { maxTxSize, minFeeA, minFeeB }?: Protocol) => UTxO[];
1998
+
1999
+ declare const largestFirstMultiAsset: (requestedOutputSet: Map<Unit, Quantity>, initialUTxOSet: UTxO[], includeTxFees?: boolean, parameters?: Protocol) => UTxO[];
2000
+
2001
+ /**
2002
+ * All UTxO selection algorithms follows below's interface
2003
+ *
2004
+ * Supported algorithms:
2005
+ * - largestFirst - CIP2 suggested algorithm
2006
+ * - largestFirstMultiAsset - CIP2 suggested algorithm
2007
+ * - keepRelevant - CIP2 suggested algorithm
2008
+ * - experimental - The always evolving algorithm according to the latest research
2009
+ *
2010
+ * @param requestedOutputSet
2011
+ * @param initialUTxOSet
2012
+ * @returns
2013
+ */
2014
+ declare class UtxoSelection {
2015
+ private threshold;
2016
+ private includeTxFees;
2017
+ constructor(threshold?: string, includeTxFees?: boolean);
2018
+ largestFirst(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
2019
+ keepRelevant(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
2020
+ largestFirstMultiAsset(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
2021
+ experimental(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
2022
+ }
2023
+ type UtxoSelectionStrategy = keyof UtxoSelection;
2024
+
2030
2025
  export { type AccountInfo, type Action, type Anchor, type Asset, type AssetClass, type AssetExtended, AssetFingerprint, type AssetMetadata, type AssetName, type AssocMap, type AssocMapItem, type BasicVote, BigNum, type BlockInfo, type Bool, type Budget, type BuilderData, type BuiltinByteString, type ByteString, CIP68_100, CIP68_222, type Certificate, type CertificateType, type ConStr, type ConStr0, type ConStr1, type ConStr2, type ConStr3, type Credential, type CurrencySymbol, DEFAULT_FETCHER_OPTIONS, DEFAULT_PROTOCOL_PARAMETERS, DEFAULT_REDEEMER_BUDGET, DEFAULT_V1_COST_MODEL_LIST, DEFAULT_V2_COST_MODEL_LIST, DEFAULT_V3_COST_MODEL_LIST, DREP_DEPOSIT, type DRep, type Data, type DataSignature, type DatumSource, type DeserializedAddress, type DeserializedScript, type Dict, type DictItem, type Era, type Extension, type Files, type ForkNeighbor, type FungibleAssetMetadata, type GovernanceProposalInfo, HARDENED_KEY_START, type IDeserializer, type IEvaluator, type IFetcher, type IFetcherOptions, type IInitiator, type IListener, type IMeshTxSerializer, type IMintingBlueprint, type IResolver, type ISigner, type ISpendingBlueprint, type ISubmitter, type ITxParser, type IWallet, type IWithdrawalBlueprint, type ImageAssetMetadata, type Integer, LANGUAGE_VERSIONS, type LanguageVersion, type List, type MAssetClass, type MBool, type MConStr, type MConStr0, type MConStr1, type MConStr2, type MConStr3, type MCredential, type MMaybeStakingHash, type MNone, type MOption, type MOutputReference, type MPubKeyAddress, type MScript, type MScriptAddress, type MSome, type MTuple, type MTxOutRef, type MValue, type MVerificationKey, type MaybeStakingHash, type MeshTxBuilderBody, MeshValue, type Message, type Metadata, type Metadatum, type MetadatumMap, type Mint, type MintItem, type MintParam, type NativeScript, type Network, type NonFungibleAssetMetadata, type None, type Option, type Output, type OutputReference, POLICY_ID_LENGTH, type POSIXTime, type Pair, type Pairs, type PlutusData, type PlutusDataType, type PlutusScript, type PolicyId, type PoolMetadata, type PoolParams, type ProofStep, type ProofStepBranch, type ProofStepFork, type ProofStepLeaf, type Protocol, type PubKeyAddress, type PubKeyHash, type PubKeyTxIn, type PubKeyWithdrawal, type Quantity, type Recipient, type Redeemer, type RedeemerTagType, type RefTxIn, type Relay, type RequiredWith, type RoyaltiesStandard, SLOT_CONFIG_NETWORK, SUPPORTED_CLOCKS, SUPPORTED_HANDLES, SUPPORTED_LANGUAGE_VIEWS, SUPPORTED_OGMIOS_LINKS, SUPPORTED_TOKENS, SUPPORTED_WALLETS, type Script, type ScriptAddress, type ScriptHash, type ScriptSource, type ScriptTxIn, type ScriptTxInParameter, type ScriptVote, type ScriptWithdrawal, type SimpleScriptSourceInfo, type SimpleScriptTxIn, type SimpleScriptTxInParameter, type SimpleScriptVote, type SimpleScriptWithdrawal, type SlotConfig, type Some, type Token, type TokenName, type TransactionInfo, type Tuple, type TxIn, type TxInParameter, type TxInput, type TxMetadata, type TxOutRef, type TxOutput, TxTester, type UTxO, type Unit, UtxoSelection, type UtxoSelectionStrategy, type ValidityRange, type Value, type VerificationKey, type Vote, type VoteKind, type VoteType, type Voter, type VotingProcedure, type Wallet, type Withdrawal, assetClass, assetName, assocMap, bool, builtinByteString, byteString, bytesToHex, castProtocol, cloneTxBuilderBody, conStr, conStr0, conStr1, conStr2, conStr3, credential, currencySymbol, dict, emptyTxBuilderBody, experimentalSelectUtxos, fromUTF8, fungibleAssetKeys, getFile, hashByteString, hashDrepAnchor, hexToBytes, hexToString, integer, isHexString, isNetwork, jsonProofToPlutusData, keepRelevant, keySignedLogic, largestFirst, largestFirstMultiAsset, list, mAssetClass, mBool, mConStr, mConStr0, mConStr1, mConStr2, mConStr3, mCredential, mMaybeStakingHash, mNone, mOption, mOutputReference, mPlutusBSArrayToString, mPubKeyAddress, mScript, mScriptAddress, mSome, mStringToPlutusBSArray, mTuple, mTxOutRef, mValue, mVerificationKey, maybeStakingHash, mergeAssets, metadataStandardKeys, metadataToCip68, none, option, outputReference, pairs, parseAssetUnit, plutusBSArrayToString, policyId, posixTime, pubKeyAddress, pubKeyHash, resolveEpochNo, resolveFingerprint, resolveLanguageView, resolveSlotNo, resolveTxFees, royaltiesStandardKeys, script, scriptAddress, scriptHash, slotToBeginUnixTime, some, stringToBSArray, stringToHex, toBytes, toUTF8, tokenMintedLogic, tokenName, tuple, txInToUtxo, txOutRef, unixTimeToEnclosingSlot, validityRangeFromObj, validityRangeToObj, value, verificationKey };
package/dist/index.d.ts CHANGED
@@ -260,38 +260,6 @@ type Wallet = {
260
260
  version: string;
261
261
  };
262
262
 
263
- declare const experimentalSelectUtxos: (requiredAssets: Map<Unit, Quantity>, inputs: UTxO[], threshold: Quantity) => UTxO[];
264
-
265
- declare const keepRelevant: (requiredAssets: Map<Unit, Quantity>, inputs: UTxO[], threshold?: string) => UTxO[];
266
-
267
- declare const largestFirst: (lovelace: Quantity, initialUTxOSet: UTxO[], includeTxFees?: boolean, { maxTxSize, minFeeA, minFeeB }?: Protocol) => UTxO[];
268
-
269
- declare const largestFirstMultiAsset: (requestedOutputSet: Map<Unit, Quantity>, initialUTxOSet: UTxO[], includeTxFees?: boolean, parameters?: Protocol) => UTxO[];
270
-
271
- /**
272
- * All UTxO selection algorithms follows below's interface
273
- *
274
- * Supported algorithms:
275
- * - largestFirst - CIP2 suggested algorithm
276
- * - largestFirstMultiAsset - CIP2 suggested algorithm
277
- * - keepRelevant - CIP2 suggested algorithm
278
- * - experimental - The always evolving algorithm according to the latest research
279
- *
280
- * @param requestedOutputSet
281
- * @param initialUTxOSet
282
- * @returns
283
- */
284
- declare class UtxoSelection {
285
- private threshold;
286
- private includeTxFees;
287
- constructor(threshold?: string, includeTxFees?: boolean);
288
- largestFirst(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
289
- keepRelevant(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
290
- largestFirstMultiAsset(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
291
- experimental(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
292
- }
293
- type UtxoSelectionStrategy = keyof UtxoSelection;
294
-
295
263
  type BuilderData = {
296
264
  type: "Mesh";
297
265
  content: Data;
@@ -573,11 +541,6 @@ type MeshTxBuilderBody = {
573
541
  votes: Vote[];
574
542
  signingKey: string[];
575
543
  extraInputs: UTxO[];
576
- selectionConfig: {
577
- threshold: string;
578
- strategy: UtxoSelectionStrategy;
579
- includeTxFees: boolean;
580
- };
581
544
  chainedTxs: string[];
582
545
  inputsForEvaluation: Record<string, UTxO>;
583
546
  network: Network | number[][];
@@ -1962,7 +1925,7 @@ interface IDeserializer {
1962
1925
 
1963
1926
  interface ISigner {
1964
1927
  signData(payload: string, address?: string): Promise<DataSignature>;
1965
- signTx(unsignedTx: string, partialSign?: boolean): Promise<string>;
1928
+ signTx(unsignedTx: string, partialSign?: boolean, returnFullTx?: boolean): Promise<string>;
1966
1929
  signTxs(unsignedTxs: string[], partialSign?: boolean): Promise<string[]>;
1967
1930
  }
1968
1931
 
@@ -2027,4 +1990,36 @@ declare const hashDrepAnchor: (jsonLD: object) => string;
2027
1990
 
2028
1991
  declare function getFile(url: string): string;
2029
1992
 
1993
+ declare const experimentalSelectUtxos: (requiredAssets: Map<Unit, Quantity>, inputs: UTxO[], threshold: Quantity) => UTxO[];
1994
+
1995
+ declare const keepRelevant: (requiredAssets: Map<Unit, Quantity>, inputs: UTxO[], threshold?: string) => UTxO[];
1996
+
1997
+ declare const largestFirst: (lovelace: Quantity, initialUTxOSet: UTxO[], includeTxFees?: boolean, { maxTxSize, minFeeA, minFeeB }?: Protocol) => UTxO[];
1998
+
1999
+ declare const largestFirstMultiAsset: (requestedOutputSet: Map<Unit, Quantity>, initialUTxOSet: UTxO[], includeTxFees?: boolean, parameters?: Protocol) => UTxO[];
2000
+
2001
+ /**
2002
+ * All UTxO selection algorithms follows below's interface
2003
+ *
2004
+ * Supported algorithms:
2005
+ * - largestFirst - CIP2 suggested algorithm
2006
+ * - largestFirstMultiAsset - CIP2 suggested algorithm
2007
+ * - keepRelevant - CIP2 suggested algorithm
2008
+ * - experimental - The always evolving algorithm according to the latest research
2009
+ *
2010
+ * @param requestedOutputSet
2011
+ * @param initialUTxOSet
2012
+ * @returns
2013
+ */
2014
+ declare class UtxoSelection {
2015
+ private threshold;
2016
+ private includeTxFees;
2017
+ constructor(threshold?: string, includeTxFees?: boolean);
2018
+ largestFirst(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
2019
+ keepRelevant(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
2020
+ largestFirstMultiAsset(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
2021
+ experimental(requiredAssets: Map<Unit, Quantity>, inputs: UTxO[]): UTxO[];
2022
+ }
2023
+ type UtxoSelectionStrategy = keyof UtxoSelection;
2024
+
2030
2025
  export { type AccountInfo, type Action, type Anchor, type Asset, type AssetClass, type AssetExtended, AssetFingerprint, type AssetMetadata, type AssetName, type AssocMap, type AssocMapItem, type BasicVote, BigNum, type BlockInfo, type Bool, type Budget, type BuilderData, type BuiltinByteString, type ByteString, CIP68_100, CIP68_222, type Certificate, type CertificateType, type ConStr, type ConStr0, type ConStr1, type ConStr2, type ConStr3, type Credential, type CurrencySymbol, DEFAULT_FETCHER_OPTIONS, DEFAULT_PROTOCOL_PARAMETERS, DEFAULT_REDEEMER_BUDGET, DEFAULT_V1_COST_MODEL_LIST, DEFAULT_V2_COST_MODEL_LIST, DEFAULT_V3_COST_MODEL_LIST, DREP_DEPOSIT, type DRep, type Data, type DataSignature, type DatumSource, type DeserializedAddress, type DeserializedScript, type Dict, type DictItem, type Era, type Extension, type Files, type ForkNeighbor, type FungibleAssetMetadata, type GovernanceProposalInfo, HARDENED_KEY_START, type IDeserializer, type IEvaluator, type IFetcher, type IFetcherOptions, type IInitiator, type IListener, type IMeshTxSerializer, type IMintingBlueprint, type IResolver, type ISigner, type ISpendingBlueprint, type ISubmitter, type ITxParser, type IWallet, type IWithdrawalBlueprint, type ImageAssetMetadata, type Integer, LANGUAGE_VERSIONS, type LanguageVersion, type List, type MAssetClass, type MBool, type MConStr, type MConStr0, type MConStr1, type MConStr2, type MConStr3, type MCredential, type MMaybeStakingHash, type MNone, type MOption, type MOutputReference, type MPubKeyAddress, type MScript, type MScriptAddress, type MSome, type MTuple, type MTxOutRef, type MValue, type MVerificationKey, type MaybeStakingHash, type MeshTxBuilderBody, MeshValue, type Message, type Metadata, type Metadatum, type MetadatumMap, type Mint, type MintItem, type MintParam, type NativeScript, type Network, type NonFungibleAssetMetadata, type None, type Option, type Output, type OutputReference, POLICY_ID_LENGTH, type POSIXTime, type Pair, type Pairs, type PlutusData, type PlutusDataType, type PlutusScript, type PolicyId, type PoolMetadata, type PoolParams, type ProofStep, type ProofStepBranch, type ProofStepFork, type ProofStepLeaf, type Protocol, type PubKeyAddress, type PubKeyHash, type PubKeyTxIn, type PubKeyWithdrawal, type Quantity, type Recipient, type Redeemer, type RedeemerTagType, type RefTxIn, type Relay, type RequiredWith, type RoyaltiesStandard, SLOT_CONFIG_NETWORK, SUPPORTED_CLOCKS, SUPPORTED_HANDLES, SUPPORTED_LANGUAGE_VIEWS, SUPPORTED_OGMIOS_LINKS, SUPPORTED_TOKENS, SUPPORTED_WALLETS, type Script, type ScriptAddress, type ScriptHash, type ScriptSource, type ScriptTxIn, type ScriptTxInParameter, type ScriptVote, type ScriptWithdrawal, type SimpleScriptSourceInfo, type SimpleScriptTxIn, type SimpleScriptTxInParameter, type SimpleScriptVote, type SimpleScriptWithdrawal, type SlotConfig, type Some, type Token, type TokenName, type TransactionInfo, type Tuple, type TxIn, type TxInParameter, type TxInput, type TxMetadata, type TxOutRef, type TxOutput, TxTester, type UTxO, type Unit, UtxoSelection, type UtxoSelectionStrategy, type ValidityRange, type Value, type VerificationKey, type Vote, type VoteKind, type VoteType, type Voter, type VotingProcedure, type Wallet, type Withdrawal, assetClass, assetName, assocMap, bool, builtinByteString, byteString, bytesToHex, castProtocol, cloneTxBuilderBody, conStr, conStr0, conStr1, conStr2, conStr3, credential, currencySymbol, dict, emptyTxBuilderBody, experimentalSelectUtxos, fromUTF8, fungibleAssetKeys, getFile, hashByteString, hashDrepAnchor, hexToBytes, hexToString, integer, isHexString, isNetwork, jsonProofToPlutusData, keepRelevant, keySignedLogic, largestFirst, largestFirstMultiAsset, list, mAssetClass, mBool, mConStr, mConStr0, mConStr1, mConStr2, mConStr3, mCredential, mMaybeStakingHash, mNone, mOption, mOutputReference, mPlutusBSArrayToString, mPubKeyAddress, mScript, mScriptAddress, mSome, mStringToPlutusBSArray, mTuple, mTxOutRef, mValue, mVerificationKey, maybeStakingHash, mergeAssets, metadataStandardKeys, metadataToCip68, none, option, outputReference, pairs, parseAssetUnit, plutusBSArrayToString, policyId, posixTime, pubKeyAddress, pubKeyHash, resolveEpochNo, resolveFingerprint, resolveLanguageView, resolveSlotNo, resolveTxFees, royaltiesStandardKeys, script, scriptAddress, scriptHash, slotToBeginUnixTime, some, stringToBSArray, stringToHex, toBytes, toUTF8, tokenMintedLogic, tokenName, tuple, txInToUtxo, txOutRef, unixTimeToEnclosingSlot, validityRangeFromObj, validityRangeToObj, value, verificationKey };
package/dist/index.js CHANGED
@@ -873,11 +873,6 @@ var emptyTxBuilderBody = () => ({
873
873
  withdrawals: [],
874
874
  votes: [],
875
875
  signingKey: [],
876
- selectionConfig: {
877
- threshold: "0",
878
- strategy: "experimental",
879
- includeTxFees: true
880
- },
881
876
  chainedTxs: [],
882
877
  inputsForEvaluation: {},
883
878
  network: "mainnet",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshsdk/common",
3
- "version": "1.9.0-beta.72",
3
+ "version": "1.9.0-beta.74",
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",