@polkadot/extension-dapp 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-polkadot-extension-dapp.js +1 -1
- package/bundle.d.ts +2 -2
- package/cjs/bundle.js +7 -7
- 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 +4 -4
- package/packageInfo.js +1 -1
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
});
|
|
18
18
|
}
|
|
19
19
|
|
|
20
|
-
const packageInfo = { name: '@polkadot/extension-dapp', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('bundle-polkadot-extension-dapp.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('bundle-polkadot-extension-dapp.js', document.baseURI).href))) ? new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('bundle-polkadot-extension-dapp.js', document.baseURI).href))).pathname.substring(0, new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('bundle-polkadot-extension-dapp.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.45.
|
|
20
|
+
const packageInfo = { name: '@polkadot/extension-dapp', path: (({ url: (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('bundle-polkadot-extension-dapp.js', document.baseURI).href)) }) && (typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('bundle-polkadot-extension-dapp.js', document.baseURI).href))) ? new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('bundle-polkadot-extension-dapp.js', document.baseURI).href))).pathname.substring(0, new URL((typeof document === 'undefined' && typeof location === 'undefined' ? require('u' + 'rl').pathToFileURL(__filename).href : typeof document === 'undefined' ? location.href : (document.currentScript && document.currentScript.src || new URL('bundle-polkadot-extension-dapp.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.45.2' };
|
|
21
21
|
|
|
22
22
|
const unwrapBytes = util.u8aUnwrapBytes;
|
|
23
23
|
const wrapBytes = util.u8aWrapBytes;
|
package/bundle.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type { InjectedAccountWithMeta, InjectedExtension, InjectedProviderWithMeta, ProviderList, Unsubcall, Web3AccountsOptions } from '@polkadot/extension-inject/types';
|
|
2
|
-
export { packageInfo } from './packageInfo';
|
|
3
|
-
export { unwrapBytes, wrapBytes } from './wrapBytes';
|
|
2
|
+
export { packageInfo } from './packageInfo.js';
|
|
3
|
+
export { unwrapBytes, wrapBytes } from './wrapBytes.js';
|
|
4
4
|
declare let isWeb3Injected: boolean;
|
|
5
5
|
declare let web3EnablePromise: Promise<InjectedExtension[]> | null;
|
|
6
6
|
export { isWeb3Injected, web3EnablePromise };
|
package/cjs/bundle.js
CHANGED
|
@@ -3,12 +3,12 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.web3UseRpcProvider = exports.web3ListRpcProviders = exports.web3FromAddress = exports.web3FromSource = exports.web3AccountsSubscribe = exports.web3Accounts = exports.web3Enable = exports.web3EnablePromise = exports.isWeb3Injected = exports.wrapBytes = exports.unwrapBytes = exports.packageInfo = void 0;
|
|
4
4
|
const util_1 = require("@polkadot/util");
|
|
5
5
|
const util_crypto_1 = require("@polkadot/util-crypto");
|
|
6
|
-
const
|
|
7
|
-
var
|
|
8
|
-
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return
|
|
9
|
-
var
|
|
10
|
-
Object.defineProperty(exports, "unwrapBytes", { enumerable: true, get: function () { return
|
|
11
|
-
Object.defineProperty(exports, "wrapBytes", { enumerable: true, get: function () { return
|
|
6
|
+
const util_js_1 = require("./util.js");
|
|
7
|
+
var packageInfo_js_1 = require("./packageInfo.js");
|
|
8
|
+
Object.defineProperty(exports, "packageInfo", { enumerable: true, get: function () { return packageInfo_js_1.packageInfo; } });
|
|
9
|
+
var wrapBytes_js_1 = require("./wrapBytes.js");
|
|
10
|
+
Object.defineProperty(exports, "unwrapBytes", { enumerable: true, get: function () { return wrapBytes_js_1.unwrapBytes; } });
|
|
11
|
+
Object.defineProperty(exports, "wrapBytes", { enumerable: true, get: function () { return wrapBytes_js_1.wrapBytes; } });
|
|
12
12
|
const win = window;
|
|
13
13
|
win.injectedWeb3 = win.injectedWeb3 || {};
|
|
14
14
|
let isWeb3Injected = web3IsInjected();
|
|
@@ -82,7 +82,7 @@ function web3Enable(originName, compatInits = []) {
|
|
|
82
82
|
const initCompat = compatInits.length
|
|
83
83
|
? Promise.all(compatInits.map((c) => c().catch(() => false)))
|
|
84
84
|
: Promise.resolve([true]);
|
|
85
|
-
exports.web3EnablePromise = web3EnablePromise = (0,
|
|
85
|
+
exports.web3EnablePromise = web3EnablePromise = (0, util_js_1.documentReadyPromise)(() => initCompat.then(() => getWindowExtensions(originName)
|
|
86
86
|
.then((values) => values.map((e) => {
|
|
87
87
|
// if we don't have an accounts subscriber, add a single-shot version
|
|
88
88
|
if (!e.accounts.subscribe) {
|
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-dapp', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.45.
|
|
4
|
+
exports.packageInfo = { name: '@polkadot/extension-dapp', 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
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"./cjs/detectPackage.js"
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
|
-
"version": "0.45.
|
|
20
|
+
"version": "0.45.2",
|
|
21
21
|
"main": "./cjs/index.js",
|
|
22
22
|
"module": "./index.js",
|
|
23
23
|
"types": "./index.d.ts",
|
|
@@ -70,9 +70,9 @@
|
|
|
70
70
|
}
|
|
71
71
|
},
|
|
72
72
|
"dependencies": {
|
|
73
|
-
"@polkadot/extension-inject": "^0.45.
|
|
74
|
-
"@polkadot/util": "^11.0.
|
|
75
|
-
"@polkadot/util-crypto": "^11.0.
|
|
73
|
+
"@polkadot/extension-inject": "^0.45.2",
|
|
74
|
+
"@polkadot/util": "^11.0.2",
|
|
75
|
+
"@polkadot/util-crypto": "^11.0.2",
|
|
76
76
|
"tslib": "^2.5.0"
|
|
77
77
|
},
|
|
78
78
|
"peerDependencies": {
|
package/packageInfo.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export const packageInfo = { name: '@polkadot/extension-dapp', 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-dapp', 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' };
|