@keplr-wallet/router 0.12.119 → 0.12.120-rc.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/build/types.d.ts +2 -2
- package/package.json +2 -2
- package/src/types.ts +4 -2
package/build/types.d.ts
CHANGED
@@ -3,13 +3,13 @@ import { Message } from "./message";
|
|
3
3
|
export type MessageSender = Pick<browser.runtime.MessageSender, "id" | "url" | "tab">;
|
4
4
|
export type FnRequestInteractionOptions = {
|
5
5
|
unstableOnClose?: () => void;
|
6
|
-
|
7
|
-
channel?: string;
|
6
|
+
ignoreURIReplacement?: boolean;
|
8
7
|
};
|
9
8
|
export type FnRequestInteraction = <M extends Message<unknown>>(url: string, msg: M, options?: FnRequestInteractionOptions) => Promise<M extends Message<infer R> ? R : never>;
|
10
9
|
export interface Env {
|
11
10
|
readonly isInternalMsg: boolean;
|
12
11
|
readonly requestInteraction: FnRequestInteraction;
|
12
|
+
readonly sender: MessageSender;
|
13
13
|
}
|
14
14
|
export type EnvProducer = (sender: MessageSender, routerMeta: Record<string, any>) => Env;
|
15
15
|
export interface MessageRequester {
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@keplr-wallet/router",
|
3
|
-
"version": "0.12.
|
3
|
+
"version": "0.12.120-rc.1",
|
4
4
|
"main": "build/index.js",
|
5
5
|
"author": "chainapsis",
|
6
6
|
"license": "Apache-2.0",
|
@@ -15,5 +15,5 @@
|
|
15
15
|
"lint-test": "eslint \"src/**/*\" && prettier --check \"src/**/*\"",
|
16
16
|
"lint-fix": "eslint --fix \"src/**/*\" && prettier --write \"src/**/*\""
|
17
17
|
},
|
18
|
-
"gitHead": "
|
18
|
+
"gitHead": "5ff08fe11fc9352243f724e74a7d38421fad3205"
|
19
19
|
}
|
package/src/types.ts
CHANGED
@@ -12,8 +12,9 @@ export type FnRequestInteractionOptions = {
|
|
12
12
|
// In the case of a detached popup, it is not guaranteed that any logic will be executed when it is closed.
|
13
13
|
// To solve this problem, the callback below is used.
|
14
14
|
unstableOnClose?: () => void;
|
15
|
-
|
16
|
-
|
15
|
+
// extension에서 window가 이미 열려있다면 uri를 env 단에서 바꾸지 않는다.
|
16
|
+
// side panel 기능이 추가되면서 popup/side panel에서의 interaction system을 최대한 동일하게 가져가기 위해서 추가됨.
|
17
|
+
ignoreURIReplacement?: boolean;
|
17
18
|
};
|
18
19
|
|
19
20
|
export type FnRequestInteraction = <M extends Message<unknown>>(
|
@@ -25,6 +26,7 @@ export type FnRequestInteraction = <M extends Message<unknown>>(
|
|
25
26
|
export interface Env {
|
26
27
|
readonly isInternalMsg: boolean;
|
27
28
|
readonly requestInteraction: FnRequestInteraction;
|
29
|
+
readonly sender: MessageSender;
|
28
30
|
}
|
29
31
|
|
30
32
|
export type EnvProducer = (
|