@gnolang/tm2-js-client 1.2.3 → 1.2.4

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.
@@ -20,6 +20,12 @@ export declare class Wallet {
20
20
  * @param {AccountWalletOption} options the account options
21
21
  */
22
22
  static createRandom: (options?: AccountWalletOption) => Promise<Wallet>;
23
+ /**
24
+ * Generates a custom signer-based wallet
25
+ * @param {Signer} signer the custom signer implementing the Signer interface
26
+ * @param {CreateWalletOptions} options the wallet generation options
27
+ */
28
+ static fromSigner: (signer: Signer) => Promise<Wallet>;
23
29
  /**
24
30
  * Generates a bip39 mnemonic-based wallet
25
31
  * @param {string} mnemonic the bip39 mnemonic
@@ -289,6 +289,19 @@ var Wallet = /** @class */ (function () {
289
289
  }
290
290
  });
291
291
  }); };
292
+ /**
293
+ * Generates a custom signer-based wallet
294
+ * @param {Signer} signer the custom signer implementing the Signer interface
295
+ * @param {CreateWalletOptions} options the wallet generation options
296
+ */
297
+ Wallet.fromSigner = function (signer) { return __awaiter(void 0, void 0, void 0, function () {
298
+ var wallet;
299
+ return __generator(_a, function (_b) {
300
+ wallet = new _a();
301
+ wallet.signer = signer;
302
+ return [2 /*return*/, wallet];
303
+ });
304
+ }); };
292
305
  /**
293
306
  * Generates a bip39 mnemonic-based wallet
294
307
  * @param {string} mnemonic the bip39 mnemonic
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@gnolang/tm2-js-client",
3
- "version": "1.2.3",
3
+ "version": "1.2.4",
4
4
  "description": "Tendermint2 JS / TS Client",
5
5
  "main": "./bin/index.js",
6
6
  "repository": {