@massalabs/wallet-provider 0.0.2-dev.20230704134522 → 0.0.2-dev.20230710163418

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/bundle.js CHANGED
@@ -27,7 +27,7 @@ class Account {
27
27
  */
28
28
  constructor({ address, name }, providerName) {
29
29
  this._address = address;
30
- this._name = name;
30
+ this._name = name ?? '';
31
31
  this._providerName = providerName;
32
32
  }
33
33
  /**
@@ -346,6 +346,12 @@ exports.connector = new Connector();
346
346
  "use strict";
347
347
  Object.defineProperty(exports, "__esModule", { value: true });
348
348
  exports.MassaStationAccount = exports.Provider = exports.EAccountImportResponse = exports.EAccountDeletionResponse = exports.Account = exports.providers = exports.AvailableCommands = void 0;
349
+ /** Polyfills */
350
+ const buffer_1 = require("buffer");
351
+ // Check if we are on browser
352
+ if (typeof window !== 'undefined') {
353
+ window.Buffer = buffer_1.Buffer;
354
+ }
349
355
  const Connector_1 = require("./connector/Connector");
350
356
  const Provider_1 = require("./provider/Provider");
351
357
  const MassaStationProvider_1 = require("./massaStation/MassaStationProvider");
@@ -387,7 +393,7 @@ Object.defineProperty(exports, "Provider", { enumerable: true, get: function ()
387
393
  var MassaStationAccount_1 = require("./massaStation/MassaStationAccount");
388
394
  Object.defineProperty(exports, "MassaStationAccount", { enumerable: true, get: function () { return MassaStationAccount_1.MassaStationAccount; } });
389
395
 
390
- },{"./account":2,"./connector/Connector":3,"./massaStation/MassaStationAccount":5,"./massaStation/MassaStationProvider":7,"./provider":12,"./provider/Provider":11}],5:[function(require,module,exports){
396
+ },{"./account":2,"./connector/Connector":3,"./massaStation/MassaStationAccount":5,"./massaStation/MassaStationProvider":7,"./provider":12,"./provider/Provider":11,"buffer":46}],5:[function(require,module,exports){
391
397
  "use strict";
392
398
  Object.defineProperty(exports, "__esModule", { value: true });
393
399
  exports.MassaStationAccount = void 0;
@@ -26,7 +26,7 @@ class Account {
26
26
  */
27
27
  constructor({ address, name }, providerName) {
28
28
  this._address = address;
29
- this._name = name;
29
+ this._name = name ?? '';
30
30
  this._providerName = providerName;
31
31
  }
32
32
  /**
package/dist/index.d.ts CHANGED
@@ -1,3 +1,11 @@
1
+ /// <reference types="node" />
2
+ /** Polyfills */
3
+ import { Buffer } from 'buffer';
4
+ declare global {
5
+ interface Window {
6
+ Buffer: typeof Buffer;
7
+ }
8
+ }
1
9
  import { IProvider } from './provider/IProvider';
2
10
  export declare enum AvailableCommands {
3
11
  ProviderListAccounts = "LIST_ACCOUNTS",
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,SAAS,EAAE,MAAM,sBAAsB,CAAC;AAOjD,oBAAY,iBAAiB;IAC3B,oBAAoB,kBAAkB;IACtC,qBAAqB,mBAAmB;IACxC,qBAAqB,mBAAmB;IACxC,oBAAoB,mBAAmB;IACvC,cAAc,oBAAoB;IAClC,WAAW,iBAAiB;IAC5B,0BAA0B,yBAAyB;IACnD,gBAAgB,uBAAuB;IACvC,eAAe,sBAAsB;IACrC,sBAAsB,6BAA6B;IACnD,aAAa,oBAAoB;CAClC;AAED,MAAM,WAAW,mBAAmB;IAClC,WAAW,EAAE,MAAM,CAAC;CACrB;AAED,wBAAgB,SAAS,IAAI,SAAS,EAAE,CAYvC;AAED,OAAO,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAC;AAEhE,OAAO,EACL,eAAe,EACf,sBAAsB,EACtB,uBAAuB,EACvB,mBAAmB,EACnB,oBAAoB,EACpB,QAAQ,EACR,OAAO,EACP,oBAAoB,EACpB,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,wBAAwB,EACxB,sBAAsB,EACtB,uBAAuB,EACvB,wBAAwB,EACxB,qBAAqB,EACrB,sBAAsB,EACtB,SAAS,EACT,QAAQ,GACT,MAAM,YAAY,CAAC;AAEpB,OAAO,EAAE,mBAA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ist/index.js CHANGED
@@ -1,6 +1,12 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.MassaStationAccount = exports.Provider = exports.EAccountImportResponse = exports.EAccountDeletionResponse = exports.Account = exports.providers = exports.AvailableCommands = void 0;
4
+ /** Polyfills */
5
+ const buffer_1 = require("buffer");
6
+ // Check if we are on browser
7
+ if (typeof window !== 'undefined') {
8
+ window.Buffer = buffer_1.Buffer;
9
+ }
4
10
  const Connector_1 = require("./connector/Connector");
5
11
  const Provider_1 = require("./provider/Provider");
6
12
  const MassaStationProvider_1 = require("./massaStation/MassaStationProvider");
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@massalabs/wallet-provider",
3
- "version": "0.0.2-dev.20230704134522",
3
+ "version": "0.0.2-dev.20230710163418",
4
4
  "description": "massa's wallet provider",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",