@subwallet/extension-inject 1.2.4-0 → 1.2.5-0
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/bundle.js +1 -1
- package/cjs/bundle.js +1 -1
- package/cjs/packageInfo.js +1 -1
- package/package.json +1 -1
- package/packageInfo.js +1 -1
- package/types.d.ts +5 -1
package/bundle.d.ts
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type { Injected, InjectOptions } from './types';
|
|
1
|
+
import type { AuthRequestOption, Injected, InjectOptions } from './types';
|
|
2
2
|
import { EIP6963ProviderInfo, EvmProvider } from './types';
|
|
3
3
|
export { packageInfo } from './packageInfo';
|
|
4
|
-
export declare function injectExtension(enable: (origin: string) => Promise<Injected>, { name, version }: InjectOptions): void;
|
|
4
|
+
export declare function injectExtension(enable: (origin: string, opt?: AuthRequestOption) => Promise<Injected>, { name, version }: InjectOptions): void;
|
|
5
5
|
export declare function injectEvmExtension(evmProvider: EvmProvider): void;
|
|
6
6
|
export declare const eip6963ProviderInfo: EIP6963ProviderInfo;
|
|
7
7
|
export declare const inject6963EIP: (provider: EvmProvider) => void;
|
package/bundle.js
CHANGED
package/cjs/bundle.js
CHANGED
package/cjs/packageInfo.js
CHANGED
package/package.json
CHANGED
package/packageInfo.js
CHANGED
|
@@ -7,5 +7,5 @@ export const packageInfo = {
|
|
|
7
7
|
name: '@subwallet/extension-inject',
|
|
8
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
9
|
type: 'esm',
|
|
10
|
-
version: '1.2.
|
|
10
|
+
version: '1.2.5-0'
|
|
11
11
|
};
|
package/types.d.ts
CHANGED
|
@@ -23,6 +23,10 @@ export interface InjectedAccounts {
|
|
|
23
23
|
get: (anyType?: boolean) => Promise<InjectedAccount[]>;
|
|
24
24
|
subscribe: (cb: (accounts: InjectedAccount[]) => void | Promise<void>) => Unsubcall;
|
|
25
25
|
}
|
|
26
|
+
export declare type AuthAccountSubstrateType = 'substrate' | 'both';
|
|
27
|
+
export interface AuthRequestOption {
|
|
28
|
+
accountAuthType: AuthAccountSubstrateType;
|
|
29
|
+
}
|
|
26
30
|
export interface InjectedExtensionInfo {
|
|
27
31
|
name: string;
|
|
28
32
|
version: string;
|
|
@@ -80,7 +84,7 @@ export interface EvmProvider {
|
|
|
80
84
|
isConnected(): boolean;
|
|
81
85
|
}
|
|
82
86
|
export interface InjectedWindowProvider {
|
|
83
|
-
enable: (origin: string) => Promise<Injected>;
|
|
87
|
+
enable: (origin: string, opt?: AuthRequestOption) => Promise<Injected>;
|
|
84
88
|
version: string;
|
|
85
89
|
}
|
|
86
90
|
export interface InjectedWindow extends This {
|