@polkadot/extension-inject 0.45.1 → 0.45.3

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.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- import type { Injected, InjectOptions } from './types';
2
- export { packageInfo } from './packageInfo';
1
+ import type { Injected, InjectOptions } from './types.js';
2
+ export { packageInfo } from './packageInfo.js';
3
3
  export declare function injectExtension(enable: (origin: string) => Promise<Injected>, { name, version }: InjectOptions): void;
package/bundle.js CHANGED
@@ -22,4 +22,4 @@ export function injectExtension(enable, { name, version }) {
22
22
  version
23
23
  };
24
24
  }
25
- }
25
+ }
package/chrome.js CHANGED
@@ -1,2 +1,2 @@
1
1
  import { extractGlobal, xglobal } from '@polkadot/x-global';
2
- export const chrome = extractGlobal('chrome', xglobal.browser);
2
+ export const chrome = extractGlobal('chrome', xglobal.browser);
package/cjs/bundle.js CHANGED
@@ -1,9 +1,9 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.injectExtension = exports.packageInfo = void 0;
4
- const cyrb53_1 = require("./cyrb53");
5
- var packageInfo_1 = require("./packageInfo");
6
- Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_1.packageInfo; } });
4
+ const cyrb53_js_1 = require("./cyrb53.js");
5
+ var packageInfo_js_1 = require("./packageInfo.js");
6
+ Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
7
7
  const IS_CONNECT_CAPABLE = false;
8
8
  function injectExtension(enable, { name, version }) {
9
9
  // small helper with the typescript types, just cast window
@@ -12,7 +12,7 @@ function injectExtension(enable, { name, version }) {
12
12
  windowInject.injectedWeb3 = windowInject.injectedWeb3 || {};
13
13
  if (IS_CONNECT_CAPABLE) {
14
14
  // expose our extension on the window object, new-style with connect(origin)
15
- windowInject.injectedWeb3[(0, cyrb53_1.cyrb53)(`${name}/${version}`)] = {
15
+ windowInject.injectedWeb3[(0, cyrb53_js_1.cyrb53)(`${name}/${version}`)] = {
16
16
  connect: (origin) => enable(origin).then(({ accounts, metadata, provider, signer }) => ({
17
17
  accounts, metadata, name, provider, signer, version
18
18
  })),
@@ -27,4 +27,4 @@ function injectExtension(enable, { name, version }) {
27
27
  };
28
28
  }
29
29
  }
30
- exports.injectExtension = injectExtension;
30
+ exports.injectExtension = injectExtension;
package/cjs/chrome.js CHANGED
@@ -2,4 +2,4 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.chrome = void 0;
4
4
  const x_global_1 = require("@polkadot/x-global");
5
- exports.chrome = (0, x_global_1.extractGlobal)('chrome', x_global_1.xglobal.browser);
5
+ exports.chrome = (0, x_global_1.extractGlobal)('chrome', x_global_1.xglobal.browser);
package/cjs/crossenv.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const x_global_1 = require("@polkadot/x-global");
4
- (0, x_global_1.exposeGlobal)('chrome', x_global_1.xglobal.browser);
4
+ (0, x_global_1.exposeGlobal)('chrome', x_global_1.xglobal.browser);
package/cjs/cyrb53.js CHANGED
@@ -14,4 +14,4 @@ function cyrb53(input, seed = Date.now()) {
14
14
  // https://stackoverflow.com/a/52171480
15
15
  return (h2 >>> 0).toString(16).padStart(8, '0') + (h1 >>> 0).toString(16).padStart(8, '0');
16
16
  }
17
- exports.cyrb53 = cyrb53;
17
+ exports.cyrb53 = cyrb53;
@@ -1,3 +1,3 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.default = [];
3
+ exports.default = [];
@@ -2,6 +2,6 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
4
  const util_1 = require("@polkadot/util");
5
- const detectOther_1 = tslib_1.__importDefault(require("./detectOther"));
6
- const packageInfo_1 = require("./packageInfo");
7
- (0, util_1.detectPackage)(packageInfo_1.packageInfo, null, detectOther_1.default);
5
+ const detectOther_js_1 = tslib_1.__importDefault(require("./detectOther.js"));
6
+ const packageInfo_js_1 = require("./packageInfo.js");
7
+ (0, util_1.detectPackage)(packageInfo_js_1.packageInfo, null, detectOther_js_1.default);
package/cjs/index.js CHANGED
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const tslib_1 = require("tslib");
4
- tslib_1.__exportStar(require("./bundle"), exports);
4
+ tslib_1.__exportStar(require("./bundle.js"), exports);
@@ -1,4 +1,4 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.packageInfo = void 0;
4
- exports.packageInfo = { name: '@polkadot/extension-inject', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.45.1' };
4
+ exports.packageInfo = { name: '@polkadot/extension-inject', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.45.3' };
package/cjs/types.js CHANGED
@@ -1,2 +1,2 @@
1
1
  "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
2
+ Object.defineProperty(exports, "__esModule", { value: true });
package/crossenv.js CHANGED
@@ -1,2 +1,2 @@
1
1
  import { exposeGlobal, xglobal } from '@polkadot/x-global';
2
- exposeGlobal('chrome', xglobal.browser);
2
+ exposeGlobal('chrome', xglobal.browser);
package/cyrb53.js CHANGED
@@ -10,4 +10,4 @@ export function cyrb53(input, seed = Date.now()) {
10
10
  h2 = Math.imul(h2 ^ (h2 >>> 16), 2246822507) ^ Math.imul(h1 ^ (h1 >>> 13), 3266489909);
11
11
  // https://stackoverflow.com/a/52171480
12
12
  return (h2 >>> 0).toString(16).padStart(8, '0') + (h1 >>> 0).toString(16).padStart(8, '0');
13
- }
13
+ }
package/detectOther.js CHANGED
@@ -1 +1 @@
1
- export default [];
1
+ export default [];
package/detectPackage.js CHANGED
@@ -1,4 +1,4 @@
1
1
  import { detectPackage } from '@polkadot/util';
2
2
  import others from './detectOther.js';
3
3
  import { packageInfo } from './packageInfo.js';
4
- detectPackage(packageInfo, null, others);
4
+ detectPackage(packageInfo, null, others);
package/index.d.ts CHANGED
@@ -1 +1 @@
1
- export * from './bundle';
1
+ export * from './bundle.js';
package/index.js CHANGED
@@ -1 +1 @@
1
- export * from './bundle.js';
1
+ export * from './bundle.js';
package/package.json CHANGED
@@ -1,11 +1,12 @@
1
1
  {
2
2
  "author": "Jaco Greeff <jacogr@gmail.com>",
3
3
  "bugs": "https://github.com/polkadot-js/extension/issues",
4
- "contributors": [],
5
4
  "description": "A generic injector (usable to any extension), that populates the base exposed interfaces to be used by dapps.",
5
+ "engines": {
6
+ "node": ">=14"
7
+ },
6
8
  "homepage": "https://github.com/polkadot-js/extension/tree/master/packages/extension-inject#readme",
7
9
  "license": "Apache-2.0",
8
- "maintainers": [],
9
10
  "name": "@polkadot/extension-inject",
10
11
  "repository": {
11
12
  "directory": "packages/extension-inject",
@@ -14,7 +15,7 @@
14
15
  },
15
16
  "sideEffects": true,
16
17
  "type": "module",
17
- "version": "0.45.1",
18
+ "version": "0.45.3",
18
19
  "main": "./cjs/index.js",
19
20
  "module": "./index.js",
20
21
  "types": "./index.d.ts",
@@ -77,11 +78,11 @@
77
78
  }
78
79
  },
79
80
  "dependencies": {
80
- "@polkadot/rpc-provider": "^10.0.1",
81
- "@polkadot/types": "^10.0.1",
82
- "@polkadot/util": "^11.0.1",
83
- "@polkadot/util-crypto": "^11.0.1",
84
- "@polkadot/x-global": "^11.0.1",
81
+ "@polkadot/rpc-provider": "^10.1.4",
82
+ "@polkadot/types": "^10.1.4",
83
+ "@polkadot/util": "^11.1.1",
84
+ "@polkadot/util-crypto": "^11.1.1",
85
+ "@polkadot/x-global": "^11.1.1",
85
86
  "tslib": "^2.5.0"
86
87
  },
87
88
  "peerDependencies": {
package/packageInfo.js CHANGED
@@ -1 +1 @@
1
- export const packageInfo = { name: '@polkadot/extension-inject', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.45.1' };
1
+ export const packageInfo = { name: '@polkadot/extension-inject', path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.45.3' };
package/types.js CHANGED
@@ -1 +1 @@
1
- export {};
1
+ export {};