@polkadot/extension-inject 0.45.1 → 0.45.2
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 +2 -2
- package/cjs/bundle.js +4 -4
- package/cjs/detectPackage.js +3 -3
- package/cjs/index.js +1 -1
- package/cjs/packageInfo.js +1 -1
- package/index.d.ts +1 -1
- package/package.json +6 -6
- package/packageInfo.js +1 -1
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/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
|
|
5
|
-
var
|
|
6
|
-
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return
|
|
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,
|
|
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
|
})),
|
package/cjs/detectPackage.js
CHANGED
|
@@ -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
|
|
6
|
-
const
|
|
7
|
-
(0, util_1.detectPackage)(
|
|
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
package/cjs/packageInfo.js
CHANGED
|
@@ -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.
|
|
4
|
+
exports.packageInfo = { name: '@polkadot/extension-inject', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.45.2' };
|
package/index.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export * from './bundle';
|
|
1
|
+
export * from './bundle.js';
|
package/package.json
CHANGED
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
},
|
|
15
15
|
"sideEffects": true,
|
|
16
16
|
"type": "module",
|
|
17
|
-
"version": "0.45.
|
|
17
|
+
"version": "0.45.2",
|
|
18
18
|
"main": "./cjs/index.js",
|
|
19
19
|
"module": "./index.js",
|
|
20
20
|
"types": "./index.d.ts",
|
|
@@ -77,11 +77,11 @@
|
|
|
77
77
|
}
|
|
78
78
|
},
|
|
79
79
|
"dependencies": {
|
|
80
|
-
"@polkadot/rpc-provider": "^10.
|
|
81
|
-
"@polkadot/types": "^10.
|
|
82
|
-
"@polkadot/util": "^11.0.
|
|
83
|
-
"@polkadot/util-crypto": "^11.0.
|
|
84
|
-
"@polkadot/x-global": "^11.0.
|
|
80
|
+
"@polkadot/rpc-provider": "^10.1.1",
|
|
81
|
+
"@polkadot/types": "^10.1.1",
|
|
82
|
+
"@polkadot/util": "^11.0.2",
|
|
83
|
+
"@polkadot/util-crypto": "^11.0.2",
|
|
84
|
+
"@polkadot/x-global": "^11.0.2",
|
|
85
85
|
"tslib": "^2.5.0"
|
|
86
86
|
},
|
|
87
87
|
"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
|
+
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.2' };
|