@polkadot/extension-dapp 0.53.1 → 0.55.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 +1 -1
- package/cjs/bundle.d.ts +61 -0
- package/cjs/index.d.ts +1 -0
- package/cjs/packageDetect.d.ts +1 -0
- package/cjs/packageInfo.d.ts +6 -0
- package/cjs/packageInfo.js +1 -1
- package/cjs/util.d.ts +1 -0
- package/cjs/wrapBytes.d.ts +7 -0
- package/package.json +88 -32
- package/packageInfo.js +1 -1
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
});
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
-
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 : (_documentCurrentScript && _documentCurrentScript.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 : (_documentCurrentScript && _documentCurrentScript.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 : (_documentCurrentScript && _documentCurrentScript.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 : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-extension-dapp.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.
|
|
21
|
+
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 : (_documentCurrentScript && _documentCurrentScript.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 : (_documentCurrentScript && _documentCurrentScript.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 : (_documentCurrentScript && _documentCurrentScript.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 : (_documentCurrentScript && _documentCurrentScript.src || new URL('bundle-polkadot-extension-dapp.js', document.baseURI).href))).pathname.lastIndexOf('/') + 1) : 'auto', type: 'esm', version: '0.55.1' };
|
|
22
22
|
|
|
23
23
|
const unwrapBytes = util.u8aUnwrapBytes;
|
|
24
24
|
const wrapBytes = util.u8aWrapBytes;
|
package/cjs/bundle.d.ts
ADDED
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
import type { InjectedAccountWithMeta, InjectedExtension, InjectedProviderWithMeta, ProviderList, Unsubcall, Web3AccountsOptions } from '@polkadot/extension-inject/types';
|
|
2
|
+
export { packageInfo } from './packageInfo.js';
|
|
3
|
+
export { unwrapBytes, wrapBytes } from './wrapBytes.js';
|
|
4
|
+
declare let isWeb3Injected: boolean;
|
|
5
|
+
declare let web3EnablePromise: Promise<InjectedExtension[]> | null;
|
|
6
|
+
export { isWeb3Injected, web3EnablePromise };
|
|
7
|
+
/**
|
|
8
|
+
* @summary Enables all the providers found on the injected window interface
|
|
9
|
+
* @description
|
|
10
|
+
* Enables all injected extensions that has been found on the page. This
|
|
11
|
+
* should be called before making use of any other web3* functions.
|
|
12
|
+
*/
|
|
13
|
+
export declare function web3Enable(originName: string, compatInits?: (() => Promise<boolean>)[]): Promise<InjectedExtension[]>;
|
|
14
|
+
/**
|
|
15
|
+
* @summary Retrieves all the accounts across all providers
|
|
16
|
+
* @description
|
|
17
|
+
* This returns the full list of account available (across all extensions) to
|
|
18
|
+
* the page. Filtering options are available of a per-extension, per type and
|
|
19
|
+
* per-genesisHash basis. Optionally the accounts can be encoded with the provided
|
|
20
|
+
* ss58Format
|
|
21
|
+
*/
|
|
22
|
+
export declare function web3Accounts({ accountType, extensions, genesisHash, ss58Format }?: Web3AccountsOptions): Promise<InjectedAccountWithMeta[]>;
|
|
23
|
+
/**
|
|
24
|
+
* @summary Subscribes to all the accounts across all providers
|
|
25
|
+
* @description
|
|
26
|
+
* This is the subscription version of the web3Accounts interface with
|
|
27
|
+
* updates as to when new accounts do become available. The list of filtering
|
|
28
|
+
* options are the same as for the web3Accounts interface.
|
|
29
|
+
*/
|
|
30
|
+
export declare function web3AccountsSubscribe(cb: (accounts: InjectedAccountWithMeta[]) => void | Promise<void>, { accountType, extensions, genesisHash, ss58Format }?: Web3AccountsOptions): Promise<Unsubcall>;
|
|
31
|
+
/**
|
|
32
|
+
* @summary Finds a specific provider based on the name
|
|
33
|
+
* @description
|
|
34
|
+
* This retrieves a specific source (extension) based on the name. In most
|
|
35
|
+
* cases it should not be needed to call it directly (e.g. it is used internally
|
|
36
|
+
* by calls such as web3FromAddress) but would allow operation on a specific
|
|
37
|
+
* known extension.
|
|
38
|
+
*/
|
|
39
|
+
export declare function web3FromSource(source: string): Promise<InjectedExtension>;
|
|
40
|
+
/**
|
|
41
|
+
* @summary Find a specific provider that provides a specific address
|
|
42
|
+
* @description
|
|
43
|
+
* Based on an address, return the provider that has makes this address
|
|
44
|
+
* available to the page.
|
|
45
|
+
*/
|
|
46
|
+
export declare function web3FromAddress(address: string): Promise<InjectedExtension>;
|
|
47
|
+
/**
|
|
48
|
+
* @summary List all providers exposed by one source
|
|
49
|
+
* @description
|
|
50
|
+
* For extensions that supply RPC providers, this call would return the list
|
|
51
|
+
* of RPC providers that any extension may supply.
|
|
52
|
+
*/
|
|
53
|
+
export declare function web3ListRpcProviders(source: string): Promise<ProviderList | null>;
|
|
54
|
+
/**
|
|
55
|
+
* @summary Start an RPC provider provider by a specific source
|
|
56
|
+
* @description
|
|
57
|
+
* For extensions that supply RPC providers, this call would return an
|
|
58
|
+
* enabled provider (initialized with the specific key) from the
|
|
59
|
+
* specified extension source.
|
|
60
|
+
*/
|
|
61
|
+
export declare function web3UseRpcProvider(source: string, key: string): Promise<InjectedProviderWithMeta>;
|
package/cjs/index.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export * from './bundle.js';
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
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.
|
|
4
|
+
exports.packageInfo = { name: '@polkadot/extension-dapp', path: typeof __dirname === 'string' ? __dirname : 'auto', type: 'cjs', version: '0.55.1' };
|
package/cjs/util.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function documentReadyPromise<T>(creator: () => Promise<T>): Promise<T>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { u8aIsWrapped, u8aUnwrapBytes, u8aWrapBytes } from '@polkadot/util';
|
|
2
|
+
export declare const ETHEREUM: Uint8Array;
|
|
3
|
+
export declare const POSTFIX: Uint8Array;
|
|
4
|
+
export declare const PREFIX: Uint8Array;
|
|
5
|
+
export declare const isWrapped: typeof u8aIsWrapped;
|
|
6
|
+
export declare const unwrapBytes: typeof u8aUnwrapBytes;
|
|
7
|
+
export declare const wrapBytes: typeof u8aWrapBytes;
|
package/package.json
CHANGED
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"./cjs/packageDetect.js"
|
|
19
19
|
],
|
|
20
20
|
"type": "module",
|
|
21
|
-
"version": "0.
|
|
21
|
+
"version": "0.55.1",
|
|
22
22
|
"main": "./cjs/index.js",
|
|
23
23
|
"module": "./index.js",
|
|
24
24
|
"types": "./index.d.ts",
|
|
@@ -26,56 +26,112 @@
|
|
|
26
26
|
"./cjs/package.json": "./cjs/package.json",
|
|
27
27
|
"./cjs/*": "./cjs/*.js",
|
|
28
28
|
".": {
|
|
29
|
-
"
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
29
|
+
"module": {
|
|
30
|
+
"types": "./index.d.ts",
|
|
31
|
+
"default": "./index.js"
|
|
32
|
+
},
|
|
33
|
+
"require": {
|
|
34
|
+
"types": "./cjs/index.d.ts",
|
|
35
|
+
"default": "./cjs/index.js"
|
|
36
|
+
},
|
|
37
|
+
"default": {
|
|
38
|
+
"types": "./index.d.ts",
|
|
39
|
+
"default": "./index.js"
|
|
40
|
+
}
|
|
33
41
|
},
|
|
34
42
|
"./bundle": {
|
|
35
|
-
"
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
43
|
+
"module": {
|
|
44
|
+
"types": "./bundle.d.ts",
|
|
45
|
+
"default": "./bundle.js"
|
|
46
|
+
},
|
|
47
|
+
"require": {
|
|
48
|
+
"types": "./cjs/bundle.d.ts",
|
|
49
|
+
"default": "./cjs/bundle.js"
|
|
50
|
+
},
|
|
51
|
+
"default": {
|
|
52
|
+
"types": "./bundle.d.ts",
|
|
53
|
+
"default": "./bundle.js"
|
|
54
|
+
}
|
|
39
55
|
},
|
|
40
56
|
"./package.json": {
|
|
41
57
|
"require": "./cjs/package.json",
|
|
42
58
|
"default": "./package.json"
|
|
43
59
|
},
|
|
44
60
|
"./packageDetect": {
|
|
45
|
-
"
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
61
|
+
"module": {
|
|
62
|
+
"types": "./packageDetect.d.ts",
|
|
63
|
+
"default": "./packageDetect.js"
|
|
64
|
+
},
|
|
65
|
+
"require": {
|
|
66
|
+
"types": "./cjs/packageDetect.d.ts",
|
|
67
|
+
"default": "./cjs/packageDetect.js"
|
|
68
|
+
},
|
|
69
|
+
"default": {
|
|
70
|
+
"types": "./packageDetect.d.ts",
|
|
71
|
+
"default": "./packageDetect.js"
|
|
72
|
+
}
|
|
49
73
|
},
|
|
50
74
|
"./packageInfo.js": {
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
75
|
+
"module": {
|
|
76
|
+
"types": "./packageInfo.d.ts",
|
|
77
|
+
"default": "./packageInfo.js"
|
|
78
|
+
},
|
|
79
|
+
"require": {
|
|
80
|
+
"types": "./cjs/packageInfo.d.ts",
|
|
81
|
+
"default": "./cjs/packageInfo.js"
|
|
82
|
+
},
|
|
83
|
+
"default": {
|
|
84
|
+
"types": "./packageInfo.d.ts",
|
|
85
|
+
"default": "./packageInfo.js"
|
|
86
|
+
}
|
|
55
87
|
},
|
|
56
88
|
"./packageInfo": {
|
|
57
|
-
"
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
89
|
+
"module": {
|
|
90
|
+
"types": "./packageInfo.d.ts",
|
|
91
|
+
"default": "./packageInfo.js"
|
|
92
|
+
},
|
|
93
|
+
"require": {
|
|
94
|
+
"types": "./cjs/packageInfo.d.ts",
|
|
95
|
+
"default": "./cjs/packageInfo.js"
|
|
96
|
+
},
|
|
97
|
+
"default": {
|
|
98
|
+
"types": "./packageInfo.d.ts",
|
|
99
|
+
"default": "./packageInfo.js"
|
|
100
|
+
}
|
|
61
101
|
},
|
|
62
102
|
"./util": {
|
|
63
|
-
"
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
103
|
+
"module": {
|
|
104
|
+
"types": "./util.d.ts",
|
|
105
|
+
"default": "./util.js"
|
|
106
|
+
},
|
|
107
|
+
"require": {
|
|
108
|
+
"types": "./cjs/util.d.ts",
|
|
109
|
+
"default": "./cjs/util.js"
|
|
110
|
+
},
|
|
111
|
+
"default": {
|
|
112
|
+
"types": "./util.d.ts",
|
|
113
|
+
"default": "./util.js"
|
|
114
|
+
}
|
|
67
115
|
},
|
|
68
116
|
"./wrapBytes": {
|
|
69
|
-
"
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
117
|
+
"module": {
|
|
118
|
+
"types": "./wrapBytes.d.ts",
|
|
119
|
+
"default": "./wrapBytes.js"
|
|
120
|
+
},
|
|
121
|
+
"require": {
|
|
122
|
+
"types": "./cjs/wrapBytes.d.ts",
|
|
123
|
+
"default": "./cjs/wrapBytes.js"
|
|
124
|
+
},
|
|
125
|
+
"default": {
|
|
126
|
+
"types": "./wrapBytes.d.ts",
|
|
127
|
+
"default": "./wrapBytes.js"
|
|
128
|
+
}
|
|
73
129
|
}
|
|
74
130
|
},
|
|
75
131
|
"dependencies": {
|
|
76
|
-
"@polkadot/extension-inject": "0.
|
|
77
|
-
"@polkadot/util": "^13.
|
|
78
|
-
"@polkadot/util-crypto": "^13.
|
|
132
|
+
"@polkadot/extension-inject": "0.55.1",
|
|
133
|
+
"@polkadot/util": "^13.2.1",
|
|
134
|
+
"@polkadot/util-crypto": "^13.2.1",
|
|
79
135
|
"tslib": "^2.6.2"
|
|
80
136
|
},
|
|
81
137
|
"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.
|
|
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.55.1' };
|