@meshsdk/wallet 1.9.0-beta.16 → 1.9.0-beta.18

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
@@ -1695,8 +1695,11 @@ var MeshWallet = class {
1695
1695
  *
1696
1696
  * @returns an address
1697
1697
  */
1698
- async getChangeAddress() {
1699
- return this.addresses.baseAddressBech32 ? this.addresses.baseAddressBech32 : this.addresses.enterpriseAddressBech32;
1698
+ async getChangeAddress(addressType = "payment") {
1699
+ if (this.addresses.baseAddressBech32 && addressType === "payment") {
1700
+ return this.addresses.baseAddressBech32;
1701
+ }
1702
+ return this.addresses.enterpriseAddressBech32;
1700
1703
  }
1701
1704
  /**
1702
1705
  * This function shall return a list of one or more UTXOs (unspent transaction outputs) controlled by the wallet that are required to reach AT LEAST the combined ADA value target specified in amount AND the best suitable to be used as collateral inputs for transactions with plutus script inputs (pure ADA-only UTXOs).
package/dist/index.d.cts CHANGED
@@ -501,12 +501,12 @@ type CreateMeshWalletOptions = {
501
501
  * ```javascript
502
502
  * import { MeshWallet, BlockfrostProvider } from '@meshsdk/core';
503
503
  *
504
- * const blockchainProvider = new BlockfrostProvider('<BLOCKFROST_API_KEY>');
504
+ * const provider = new BlockfrostProvider('<BLOCKFROST_API_KEY>');
505
505
  *
506
506
  * const wallet = new MeshWallet({
507
507
  * networkId: 0,
508
- * fetcher: blockchainProvider,
509
- * submitter: blockchainProvider,
508
+ * fetcher: provider,
509
+ * submitter: provider,
510
510
  * key: {
511
511
  * type: 'mnemonic',
512
512
  * words: ["solution","solution","solution","solution","solution",","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution"],
@@ -569,7 +569,7 @@ declare class MeshWallet implements IWallet {
569
569
  *
570
570
  * @returns an address
571
571
  */
572
- getChangeAddress(): Promise<string>;
572
+ getChangeAddress(addressType?: GetAddressType): Promise<string>;
573
573
  /**
574
574
  * This function shall return a list of one or more UTXOs (unspent transaction outputs) controlled by the wallet that are required to reach AT LEAST the combined ADA value target specified in amount AND the best suitable to be used as collateral inputs for transactions with plutus script inputs (pure ADA-only UTXOs).
575
575
  *
package/dist/index.d.ts CHANGED
@@ -501,12 +501,12 @@ type CreateMeshWalletOptions = {
501
501
  * ```javascript
502
502
  * import { MeshWallet, BlockfrostProvider } from '@meshsdk/core';
503
503
  *
504
- * const blockchainProvider = new BlockfrostProvider('<BLOCKFROST_API_KEY>');
504
+ * const provider = new BlockfrostProvider('<BLOCKFROST_API_KEY>');
505
505
  *
506
506
  * const wallet = new MeshWallet({
507
507
  * networkId: 0,
508
- * fetcher: blockchainProvider,
509
- * submitter: blockchainProvider,
508
+ * fetcher: provider,
509
+ * submitter: provider,
510
510
  * key: {
511
511
  * type: 'mnemonic',
512
512
  * words: ["solution","solution","solution","solution","solution",","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution","solution"],
@@ -569,7 +569,7 @@ declare class MeshWallet implements IWallet {
569
569
  *
570
570
  * @returns an address
571
571
  */
572
- getChangeAddress(): Promise<string>;
572
+ getChangeAddress(addressType?: GetAddressType): Promise<string>;
573
573
  /**
574
574
  * This function shall return a list of one or more UTXOs (unspent transaction outputs) controlled by the wallet that are required to reach AT LEAST the combined ADA value target specified in amount AND the best suitable to be used as collateral inputs for transactions with plutus script inputs (pure ADA-only UTXOs).
575
575
  *
package/dist/index.js CHANGED
@@ -1742,8 +1742,11 @@ var MeshWallet = class {
1742
1742
  *
1743
1743
  * @returns an address
1744
1744
  */
1745
- async getChangeAddress() {
1746
- return this.addresses.baseAddressBech32 ? this.addresses.baseAddressBech32 : this.addresses.enterpriseAddressBech32;
1745
+ async getChangeAddress(addressType = "payment") {
1746
+ if (this.addresses.baseAddressBech32 && addressType === "payment") {
1747
+ return this.addresses.baseAddressBech32;
1748
+ }
1749
+ return this.addresses.enterpriseAddressBech32;
1747
1750
  }
1748
1751
  /**
1749
1752
  * This function shall return a list of one or more UTXOs (unspent transaction outputs) controlled by the wallet that are required to reach AT LEAST the combined ADA value target specified in amount AND the best suitable to be used as collateral inputs for transactions with plutus script inputs (pure ADA-only UTXOs).
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshsdk/wallet",
3
- "version": "1.9.0-beta.16",
3
+ "version": "1.9.0-beta.18",
4
4
  "description": "Wallets - https://meshjs.dev/apis/wallets",
5
5
  "main": "./dist/index.cjs",
6
6
  "browser": "./dist/index.js",
@@ -35,9 +35,9 @@
35
35
  "typescript": "^5.3.3"
36
36
  },
37
37
  "dependencies": {
38
- "@meshsdk/common": "1.9.0-beta.16",
39
- "@meshsdk/core-cst": "1.9.0-beta.16",
40
- "@meshsdk/transaction": "1.9.0-beta.16",
38
+ "@meshsdk/common": "1.9.0-beta.18",
39
+ "@meshsdk/core-cst": "1.9.0-beta.18",
40
+ "@meshsdk/transaction": "1.9.0-beta.18",
41
41
  "@simplewebauthn/browser": "^13.0.0"
42
42
  },
43
43
  "prettier": "@meshsdk/configs/prettier",