@meshsdk/wallet 1.7.25 → 1.7.26

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
@@ -1266,6 +1266,14 @@ var MeshWallet = class {
1266
1266
  return (0, import_core_cst4.fromTxUnspentOutput)(utxo);
1267
1267
  });
1268
1268
  }
1269
+ /**
1270
+ * Return a list of supported CIPs of the wallet.
1271
+ *
1272
+ * @returns a list of CIPs
1273
+ */
1274
+ async getExtensions() {
1275
+ return [];
1276
+ }
1269
1277
  /**
1270
1278
  * Get a list of UTXOs to be used as collateral inputs for transactions with plutus script inputs.
1271
1279
  *
@@ -1289,12 +1297,22 @@ var MeshWallet = class {
1289
1297
  }
1290
1298
  return [];
1291
1299
  }
1300
+ /**
1301
+ * The connected wallet account provides the account's public DRep Key, derivation as described in CIP-0105.
1302
+ * These are used by the client to identify the user's on-chain CIP-1694 interactions, i.e. if a user has registered to be a DRep.
1303
+ *
1304
+ * @returns wallet account's public DRep Key
1305
+ */
1306
+ async getDRep() {
1307
+ console.warn("Not implemented yet");
1308
+ return void 0;
1309
+ }
1292
1310
  /**
1293
1311
  * Returns the network ID of the currently connected account. 0 is testnet and 1 is mainnet but other networks can possibly be returned by wallets. Those other network ID values are not governed by CIP-30. This result will stay the same unless the connected account has changed.
1294
1312
  *
1295
1313
  * @returns network ID
1296
1314
  */
1297
- getNetworkId() {
1315
+ async getNetworkId() {
1298
1316
  return this._networkId;
1299
1317
  }
1300
1318
  /**
@@ -1302,7 +1320,7 @@ var MeshWallet = class {
1302
1320
  *
1303
1321
  * @returns a list of reward addresses
1304
1322
  */
1305
- getRewardAddresses() {
1323
+ async getRewardAddresses() {
1306
1324
  return [this.addresses.rewardAddressBech32];
1307
1325
  }
1308
1326
  /**
@@ -1310,7 +1328,7 @@ var MeshWallet = class {
1310
1328
  *
1311
1329
  * @returns a list of unused addresses
1312
1330
  */
1313
- getUnusedAddresses() {
1331
+ async getUnusedAddresses() {
1314
1332
  return [this.getChangeAddress()];
1315
1333
  }
1316
1334
  /**
@@ -1318,7 +1336,7 @@ var MeshWallet = class {
1318
1336
  *
1319
1337
  * @returns a list of used addresses
1320
1338
  */
1321
- getUsedAddresses() {
1339
+ async getUsedAddresses() {
1322
1340
  return [this.getChangeAddress()];
1323
1341
  }
1324
1342
  /**
@@ -1512,6 +1530,14 @@ var MeshWallet = class {
1512
1530
  new Set(balance.map((v) => v.unit.slice(0, import_common3.POLICY_ID_LENGTH)))
1513
1531
  ).filter((p) => p !== "lovelace");
1514
1532
  }
1533
+ async getRegisteredPubStakeKeys() {
1534
+ console.warn("Not implemented yet");
1535
+ return void 0;
1536
+ }
1537
+ async getUnregisteredPubStakeKeys() {
1538
+ console.warn("Not implemented yet");
1539
+ return void 0;
1540
+ }
1515
1541
  /**
1516
1542
  * A helper function to create a collateral input for a transaction.
1517
1543
  *
package/dist/index.d.cts CHANGED
@@ -1,4 +1,4 @@
1
- import { DataSignature, IFetcher, ISubmitter, ISigner, IInitiator, Wallet, Asset, UTxO, AssetExtended } from '@meshsdk/common';
1
+ import { DataSignature, IFetcher, ISubmitter, ISigner, IWallet, Wallet, Asset, UTxO, AssetExtended } from '@meshsdk/common';
2
2
  import { Ed25519PublicKeyHex, TransactionUnspentOutput, Address, StricaPrivateKey, DRepID, Ed25519KeyHashHex, VkeyWitness } from '@meshsdk/core-cst';
3
3
 
4
4
  type Cardano = {
@@ -113,7 +113,7 @@ declare global {
113
113
  * const wallet = await BrowserWallet.enable('eternl');
114
114
  * ```
115
115
  */
116
- declare class BrowserWallet implements IInitiator, ISigner, ISubmitter {
116
+ declare class BrowserWallet implements IWallet {
117
117
  readonly _walletInstance: WalletInstance;
118
118
  readonly _walletName: string;
119
119
  walletInstance: WalletInstance;
@@ -432,7 +432,7 @@ type CreateMeshWalletOptions = {
432
432
  * });
433
433
  * ```
434
434
  */
435
- declare class MeshWallet implements IInitiator, ISigner, ISubmitter {
435
+ declare class MeshWallet implements IWallet {
436
436
  private readonly _wallet;
437
437
  private readonly _accountIndex;
438
438
  private readonly _keyIndex;
@@ -474,6 +474,12 @@ declare class MeshWallet implements IInitiator, ISigner, ISubmitter {
474
474
  * @returns a list of UTXOs
475
475
  */
476
476
  getCollateral(addressType?: GetAddressType): Promise<UTxO[]>;
477
+ /**
478
+ * Return a list of supported CIPs of the wallet.
479
+ *
480
+ * @returns a list of CIPs
481
+ */
482
+ getExtensions(): Promise<number[]>;
477
483
  /**
478
484
  * Get a list of UTXOs to be used as collateral inputs for transactions with plutus script inputs.
479
485
  *
@@ -483,30 +489,41 @@ declare class MeshWallet implements IInitiator, ISigner, ISubmitter {
483
489
  * @returns a list of UTXOs
484
490
  */
485
491
  getCollateralUnspentOutput(addressType?: GetAddressType): Promise<TransactionUnspentOutput[]>;
492
+ /**
493
+ * The connected wallet account provides the account's public DRep Key, derivation as described in CIP-0105.
494
+ * These are used by the client to identify the user's on-chain CIP-1694 interactions, i.e. if a user has registered to be a DRep.
495
+ *
496
+ * @returns wallet account's public DRep Key
497
+ */
498
+ getDRep(): Promise<{
499
+ publicKey: string;
500
+ publicKeyHash: string;
501
+ dRepIDCip105: string;
502
+ } | undefined>;
486
503
  /**
487
504
  * Returns the network ID of the currently connected account. 0 is testnet and 1 is mainnet but other networks can possibly be returned by wallets. Those other network ID values are not governed by CIP-30. This result will stay the same unless the connected account has changed.
488
505
  *
489
506
  * @returns network ID
490
507
  */
491
- getNetworkId(): number;
508
+ getNetworkId(): Promise<number>;
492
509
  /**
493
510
  * Returns a list of reward addresses owned by the wallet. A reward address is a stake address that is used to receive rewards from staking, generally starts from `stake` prefix.
494
511
  *
495
512
  * @returns a list of reward addresses
496
513
  */
497
- getRewardAddresses(): string[];
514
+ getRewardAddresses(): Promise<string[]>;
498
515
  /**
499
516
  * Returns a list of unused addresses controlled by the wallet.
500
517
  *
501
518
  * @returns a list of unused addresses
502
519
  */
503
- getUnusedAddresses(): string[];
520
+ getUnusedAddresses(): Promise<string[]>;
504
521
  /**
505
522
  * Returns a list of used addresses controlled by the wallet.
506
523
  *
507
524
  * @returns a list of used addresses
508
525
  */
509
- getUsedAddresses(): string[];
526
+ getUsedAddresses(): Promise<string[]>;
510
527
  /**
511
528
  * Get a list of UTXOs to be used for transaction building.
512
529
  *
@@ -599,6 +616,14 @@ declare class MeshWallet implements IInitiator, ISigner, ISubmitter {
599
616
  * @returns a list of policy IDs
600
617
  */
601
618
  getPolicyIds(): Promise<string[]>;
619
+ getRegisteredPubStakeKeys(): Promise<{
620
+ pubStakeKeys: string[];
621
+ pubStakeKeyHashes: string[];
622
+ } | undefined>;
623
+ getUnregisteredPubStakeKeys(): Promise<{
624
+ pubStakeKeys: string[];
625
+ pubStakeKeyHashes: string[];
626
+ } | undefined>;
602
627
  /**
603
628
  * A helper function to create a collateral input for a transaction.
604
629
  *
package/dist/index.d.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { DataSignature, IFetcher, ISubmitter, ISigner, IInitiator, Wallet, Asset, UTxO, AssetExtended } from '@meshsdk/common';
1
+ import { DataSignature, IFetcher, ISubmitter, ISigner, IWallet, Wallet, Asset, UTxO, AssetExtended } from '@meshsdk/common';
2
2
  import { Ed25519PublicKeyHex, TransactionUnspentOutput, Address, StricaPrivateKey, DRepID, Ed25519KeyHashHex, VkeyWitness } from '@meshsdk/core-cst';
3
3
 
4
4
  type Cardano = {
@@ -113,7 +113,7 @@ declare global {
113
113
  * const wallet = await BrowserWallet.enable('eternl');
114
114
  * ```
115
115
  */
116
- declare class BrowserWallet implements IInitiator, ISigner, ISubmitter {
116
+ declare class BrowserWallet implements IWallet {
117
117
  readonly _walletInstance: WalletInstance;
118
118
  readonly _walletName: string;
119
119
  walletInstance: WalletInstance;
@@ -432,7 +432,7 @@ type CreateMeshWalletOptions = {
432
432
  * });
433
433
  * ```
434
434
  */
435
- declare class MeshWallet implements IInitiator, ISigner, ISubmitter {
435
+ declare class MeshWallet implements IWallet {
436
436
  private readonly _wallet;
437
437
  private readonly _accountIndex;
438
438
  private readonly _keyIndex;
@@ -474,6 +474,12 @@ declare class MeshWallet implements IInitiator, ISigner, ISubmitter {
474
474
  * @returns a list of UTXOs
475
475
  */
476
476
  getCollateral(addressType?: GetAddressType): Promise<UTxO[]>;
477
+ /**
478
+ * Return a list of supported CIPs of the wallet.
479
+ *
480
+ * @returns a list of CIPs
481
+ */
482
+ getExtensions(): Promise<number[]>;
477
483
  /**
478
484
  * Get a list of UTXOs to be used as collateral inputs for transactions with plutus script inputs.
479
485
  *
@@ -483,30 +489,41 @@ declare class MeshWallet implements IInitiator, ISigner, ISubmitter {
483
489
  * @returns a list of UTXOs
484
490
  */
485
491
  getCollateralUnspentOutput(addressType?: GetAddressType): Promise<TransactionUnspentOutput[]>;
492
+ /**
493
+ * The connected wallet account provides the account's public DRep Key, derivation as described in CIP-0105.
494
+ * These are used by the client to identify the user's on-chain CIP-1694 interactions, i.e. if a user has registered to be a DRep.
495
+ *
496
+ * @returns wallet account's public DRep Key
497
+ */
498
+ getDRep(): Promise<{
499
+ publicKey: string;
500
+ publicKeyHash: string;
501
+ dRepIDCip105: string;
502
+ } | undefined>;
486
503
  /**
487
504
  * Returns the network ID of the currently connected account. 0 is testnet and 1 is mainnet but other networks can possibly be returned by wallets. Those other network ID values are not governed by CIP-30. This result will stay the same unless the connected account has changed.
488
505
  *
489
506
  * @returns network ID
490
507
  */
491
- getNetworkId(): number;
508
+ getNetworkId(): Promise<number>;
492
509
  /**
493
510
  * Returns a list of reward addresses owned by the wallet. A reward address is a stake address that is used to receive rewards from staking, generally starts from `stake` prefix.
494
511
  *
495
512
  * @returns a list of reward addresses
496
513
  */
497
- getRewardAddresses(): string[];
514
+ getRewardAddresses(): Promise<string[]>;
498
515
  /**
499
516
  * Returns a list of unused addresses controlled by the wallet.
500
517
  *
501
518
  * @returns a list of unused addresses
502
519
  */
503
- getUnusedAddresses(): string[];
520
+ getUnusedAddresses(): Promise<string[]>;
504
521
  /**
505
522
  * Returns a list of used addresses controlled by the wallet.
506
523
  *
507
524
  * @returns a list of used addresses
508
525
  */
509
- getUsedAddresses(): string[];
526
+ getUsedAddresses(): Promise<string[]>;
510
527
  /**
511
528
  * Get a list of UTXOs to be used for transaction building.
512
529
  *
@@ -599,6 +616,14 @@ declare class MeshWallet implements IInitiator, ISigner, ISubmitter {
599
616
  * @returns a list of policy IDs
600
617
  */
601
618
  getPolicyIds(): Promise<string[]>;
619
+ getRegisteredPubStakeKeys(): Promise<{
620
+ pubStakeKeys: string[];
621
+ pubStakeKeyHashes: string[];
622
+ } | undefined>;
623
+ getUnregisteredPubStakeKeys(): Promise<{
624
+ pubStakeKeys: string[];
625
+ pubStakeKeyHashes: string[];
626
+ } | undefined>;
602
627
  /**
603
628
  * A helper function to create a collateral input for a transaction.
604
629
  *
package/dist/index.js CHANGED
@@ -1290,6 +1290,14 @@ var MeshWallet = class {
1290
1290
  return fromTxUnspentOutput2(utxo);
1291
1291
  });
1292
1292
  }
1293
+ /**
1294
+ * Return a list of supported CIPs of the wallet.
1295
+ *
1296
+ * @returns a list of CIPs
1297
+ */
1298
+ async getExtensions() {
1299
+ return [];
1300
+ }
1293
1301
  /**
1294
1302
  * Get a list of UTXOs to be used as collateral inputs for transactions with plutus script inputs.
1295
1303
  *
@@ -1313,12 +1321,22 @@ var MeshWallet = class {
1313
1321
  }
1314
1322
  return [];
1315
1323
  }
1324
+ /**
1325
+ * The connected wallet account provides the account's public DRep Key, derivation as described in CIP-0105.
1326
+ * These are used by the client to identify the user's on-chain CIP-1694 interactions, i.e. if a user has registered to be a DRep.
1327
+ *
1328
+ * @returns wallet account's public DRep Key
1329
+ */
1330
+ async getDRep() {
1331
+ console.warn("Not implemented yet");
1332
+ return void 0;
1333
+ }
1316
1334
  /**
1317
1335
  * Returns the network ID of the currently connected account. 0 is testnet and 1 is mainnet but other networks can possibly be returned by wallets. Those other network ID values are not governed by CIP-30. This result will stay the same unless the connected account has changed.
1318
1336
  *
1319
1337
  * @returns network ID
1320
1338
  */
1321
- getNetworkId() {
1339
+ async getNetworkId() {
1322
1340
  return this._networkId;
1323
1341
  }
1324
1342
  /**
@@ -1326,7 +1344,7 @@ var MeshWallet = class {
1326
1344
  *
1327
1345
  * @returns a list of reward addresses
1328
1346
  */
1329
- getRewardAddresses() {
1347
+ async getRewardAddresses() {
1330
1348
  return [this.addresses.rewardAddressBech32];
1331
1349
  }
1332
1350
  /**
@@ -1334,7 +1352,7 @@ var MeshWallet = class {
1334
1352
  *
1335
1353
  * @returns a list of unused addresses
1336
1354
  */
1337
- getUnusedAddresses() {
1355
+ async getUnusedAddresses() {
1338
1356
  return [this.getChangeAddress()];
1339
1357
  }
1340
1358
  /**
@@ -1342,7 +1360,7 @@ var MeshWallet = class {
1342
1360
  *
1343
1361
  * @returns a list of used addresses
1344
1362
  */
1345
- getUsedAddresses() {
1363
+ async getUsedAddresses() {
1346
1364
  return [this.getChangeAddress()];
1347
1365
  }
1348
1366
  /**
@@ -1536,6 +1554,14 @@ var MeshWallet = class {
1536
1554
  new Set(balance.map((v) => v.unit.slice(0, POLICY_ID_LENGTH2)))
1537
1555
  ).filter((p) => p !== "lovelace");
1538
1556
  }
1557
+ async getRegisteredPubStakeKeys() {
1558
+ console.warn("Not implemented yet");
1559
+ return void 0;
1560
+ }
1561
+ async getUnregisteredPubStakeKeys() {
1562
+ console.warn("Not implemented yet");
1563
+ return void 0;
1564
+ }
1539
1565
  /**
1540
1566
  * A helper function to create a collateral input for a transaction.
1541
1567
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshsdk/wallet",
3
- "version": "1.7.25",
3
+ "version": "1.7.26",
4
4
  "description": "Wallets - https://meshjs.dev/apis/wallets",
5
5
  "main": "./dist/index.cjs",
6
6
  "browser": "./dist/index.js",
@@ -35,10 +35,10 @@
35
35
  "typescript": "^5.3.3"
36
36
  },
37
37
  "dependencies": {
38
- "@meshsdk/common": "1.7.25",
39
- "@meshsdk/core-csl": "1.7.25",
40
- "@meshsdk/core-cst": "1.7.25",
41
- "@meshsdk/transaction": "1.7.25",
38
+ "@meshsdk/common": "1.7.26",
39
+ "@meshsdk/core-csl": "1.7.26",
40
+ "@meshsdk/core-cst": "1.7.26",
41
+ "@meshsdk/transaction": "1.7.26",
42
42
  "@nufi/dapp-client-cardano": "0.3.5",
43
43
  "@nufi/dapp-client-core": "0.3.5"
44
44
  },