@polkadot/extension-dapp 0.44.9 → 0.45.1
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 +184 -213
- package/bundle.js +146 -197
- package/cjs/bundle.js +161 -256
- package/cjs/detectOther.js +3 -10
- package/cjs/detectPackage.js +6 -11
- package/cjs/index.js +3 -15
- package/cjs/packageInfo.js +2 -16
- package/cjs/util.js +12 -16
- package/cjs/wrapBytes.js +8 -20
- package/detectOther.js +0 -3
- package/detectPackage.js +2 -7
- package/index.js +1 -7
- package/package.json +9 -6
- package/packageInfo.js +1 -11
- package/util.js +8 -10
- package/wrapBytes.js +0 -3
package/index.js
CHANGED
package/package.json
CHANGED
|
@@ -17,7 +17,7 @@
|
|
|
17
17
|
"./cjs/detectPackage.js"
|
|
18
18
|
],
|
|
19
19
|
"type": "module",
|
|
20
|
-
"version": "0.
|
|
20
|
+
"version": "0.45.1",
|
|
21
21
|
"main": "./cjs/index.js",
|
|
22
22
|
"module": "./index.js",
|
|
23
23
|
"types": "./index.d.ts",
|
|
@@ -44,7 +44,10 @@
|
|
|
44
44
|
"require": "./cjs/detectPackage.js",
|
|
45
45
|
"default": "./detectPackage.js"
|
|
46
46
|
},
|
|
47
|
-
"./package.json":
|
|
47
|
+
"./package.json": {
|
|
48
|
+
"require": "./cjs/package.json",
|
|
49
|
+
"default": "./package.json"
|
|
50
|
+
},
|
|
48
51
|
"./packageInfo.js": {
|
|
49
52
|
"types": "./packageInfo.d.ts",
|
|
50
53
|
"require": "./cjs/packageInfo.js",
|
|
@@ -67,10 +70,10 @@
|
|
|
67
70
|
}
|
|
68
71
|
},
|
|
69
72
|
"dependencies": {
|
|
70
|
-
"@
|
|
71
|
-
"@polkadot/
|
|
72
|
-
"@polkadot/util": "^
|
|
73
|
-
"
|
|
73
|
+
"@polkadot/extension-inject": "^0.45.1",
|
|
74
|
+
"@polkadot/util": "^11.0.1",
|
|
75
|
+
"@polkadot/util-crypto": "^11.0.1",
|
|
76
|
+
"tslib": "^2.5.0"
|
|
74
77
|
},
|
|
75
78
|
"peerDependencies": {
|
|
76
79
|
"@polkadot/api": "*",
|
package/packageInfo.js
CHANGED
|
@@ -1,11 +1 @@
|
|
|
1
|
-
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
|
-
// Do not edit, auto-generated by @polkadot/dev
|
|
5
|
-
|
|
6
|
-
export const packageInfo = {
|
|
7
|
-
name: '@polkadot/extension-dapp',
|
|
8
|
-
path: (import.meta && import.meta.url) ? new URL(import.meta.url).pathname.substring(0, new URL(import.meta.url).pathname.lastIndexOf('/') + 1) : 'auto',
|
|
9
|
-
type: 'esm',
|
|
10
|
-
version: '0.44.9'
|
|
11
|
-
};
|
|
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' };
|
package/util.js
CHANGED
|
@@ -1,12 +1,10 @@
|
|
|
1
|
-
// Copyright 2019-2023 @polkadot/extension-dapp authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
1
|
export function documentReadyPromise(creator) {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
2
|
+
return new Promise((resolve) => {
|
|
3
|
+
if (document.readyState === 'complete') {
|
|
4
|
+
resolve(creator());
|
|
5
|
+
}
|
|
6
|
+
else {
|
|
7
|
+
window.addEventListener('load', () => resolve(creator()));
|
|
8
|
+
}
|
|
9
|
+
});
|
|
12
10
|
}
|
package/wrapBytes.js
CHANGED
|
@@ -1,6 +1,3 @@
|
|
|
1
|
-
// Copyright 2019-2023 @polkadot/extension authors & contributors
|
|
2
|
-
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
-
|
|
4
1
|
import { U8A_WRAP_ETHEREUM, U8A_WRAP_POSTFIX, U8A_WRAP_PREFIX, u8aIsWrapped, u8aUnwrapBytes, u8aWrapBytes } from '@polkadot/util';
|
|
5
2
|
export const ETHEREUM = U8A_WRAP_ETHEREUM;
|
|
6
3
|
export const POSTFIX = U8A_WRAP_POSTFIX;
|