@metamask/snaps-rpc-methods 7.0.2 → 8.1.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/CHANGELOG.md +12 -1
- package/dist/{chunk-JQ456NCC.mjs → chunk-3W4SMZFD.mjs} +3 -3
- package/dist/{chunk-WLDEPJGG.mjs → chunk-634BK2VP.mjs} +3 -3
- package/dist/chunk-634BK2VP.mjs.map +1 -0
- package/dist/{chunk-GP5KW5FU.js → chunk-D5WQBUZB.js} +2 -2
- package/dist/chunk-D5WQBUZB.js.map +1 -0
- package/dist/{chunk-6UY23OOZ.js → chunk-GP6TDVNT.js} +3 -3
- package/dist/{chunk-YS6TYXCP.mjs → chunk-GVJLWGSI.mjs} +3 -3
- package/dist/chunk-GVJLWGSI.mjs.map +1 -0
- package/dist/{chunk-GYZV5UBD.js → chunk-I7DR6BFO.js} +4 -4
- package/dist/chunk-I7DR6BFO.js.map +1 -0
- package/dist/{chunk-D6MUXDVI.js → chunk-INB4AX37.js} +5 -5
- package/dist/{chunk-AKRFLGOS.mjs → chunk-L675SYPP.mjs} +2 -2
- package/dist/{chunk-7NBRKDKJ.mjs → chunk-NESDQ4PF.mjs} +9 -54
- package/dist/chunk-NESDQ4PF.mjs.map +1 -0
- package/dist/{chunk-3S7DJI4I.mjs → chunk-PG32JMWC.mjs} +3 -3
- package/dist/chunk-PG32JMWC.mjs.map +1 -0
- package/dist/{chunk-KO4MKRYZ.js → chunk-R2M4YLJ7.js} +7 -52
- package/dist/chunk-R2M4YLJ7.js.map +1 -0
- package/dist/{chunk-LVTN25J2.js → chunk-RIALLTR7.js} +5 -5
- package/dist/{chunk-LVTN25J2.js.map → chunk-RIALLTR7.js.map} +1 -1
- package/dist/{chunk-FBOZCV3C.js → chunk-RX7WZZ32.js} +3 -3
- package/dist/{chunk-3LPBU737.js → chunk-UDB4MUXI.js} +2 -2
- package/dist/chunk-UDB4MUXI.js.map +1 -0
- package/dist/{chunk-7OMVZR5X.mjs → chunk-VNH2GKLV.mjs} +2 -2
- package/dist/{chunk-4SQWLI2S.mjs → chunk-X247BMMW.mjs} +6 -6
- package/dist/chunk-X247BMMW.mjs.map +1 -0
- package/dist/index.js +9 -9
- package/dist/index.mjs +10 -10
- package/dist/permissions.js +5 -5
- package/dist/permissions.mjs +4 -4
- package/dist/permitted/createInterface.js +2 -2
- package/dist/permitted/createInterface.mjs +1 -1
- package/dist/permitted/handlers.js +4 -4
- package/dist/permitted/handlers.mjs +3 -3
- package/dist/permitted/index.js +5 -5
- package/dist/permitted/index.mjs +4 -4
- package/dist/permitted/middleware.js +5 -5
- package/dist/permitted/middleware.mjs +4 -4
- package/dist/permitted/updateInterface.js +2 -2
- package/dist/permitted/updateInterface.mjs +1 -1
- package/dist/restricted/dialog.js +2 -2
- package/dist/restricted/dialog.mjs +1 -1
- package/dist/restricted/index.js +4 -4
- package/dist/restricted/index.mjs +5 -5
- package/dist/restricted/manageState.js +2 -2
- package/dist/restricted/manageState.mjs +3 -3
- package/dist/tsconfig.build.tsbuildinfo +1 -1
- package/dist/types/permitted/createInterface.d.ts +8 -8
- package/dist/types/permitted/updateInterface.d.ts +8 -8
- package/dist/types/restricted/dialog.d.ts +207 -39
- package/dist/types/restricted/index.d.ts +1 -1
- package/dist/types/restricted/manageAccounts.d.ts +1 -1
- package/dist/types/restricted/manageState.d.ts +5 -31
- package/package.json +3 -4
- package/dist/chunk-3LPBU737.js.map +0 -1
- package/dist/chunk-3S7DJI4I.mjs.map +0 -1
- package/dist/chunk-4SQWLI2S.mjs.map +0 -1
- package/dist/chunk-7NBRKDKJ.mjs.map +0 -1
- package/dist/chunk-GP5KW5FU.js.map +0 -1
- package/dist/chunk-GYZV5UBD.js.map +0 -1
- package/dist/chunk-KO4MKRYZ.js.map +0 -1
- package/dist/chunk-WLDEPJGG.mjs.map +0 -1
- package/dist/chunk-YS6TYXCP.mjs.map +0 -1
- /package/dist/{chunk-JQ456NCC.mjs.map → chunk-3W4SMZFD.mjs.map} +0 -0
- /package/dist/{chunk-6UY23OOZ.js.map → chunk-GP6TDVNT.js.map} +0 -0
- /package/dist/{chunk-D6MUXDVI.js.map → chunk-INB4AX37.js.map} +0 -0
- /package/dist/{chunk-AKRFLGOS.mjs.map → chunk-L675SYPP.mjs.map} +0 -0
- /package/dist/{chunk-FBOZCV3C.js.map → chunk-RX7WZZ32.js.map} +0 -0
- /package/dist/{chunk-7OMVZR5X.mjs.map → chunk-VNH2GKLV.mjs.map} +0 -0
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import type { PermittedHandlerExport } from '@metamask/permission-controller';
|
|
2
|
-
import type {
|
|
2
|
+
import type { CreateInterfaceParams, CreateInterfaceResult, ComponentOrElement } from '@metamask/snaps-sdk';
|
|
3
3
|
import { type InferMatching } from '@metamask/snaps-utils';
|
|
4
4
|
export declare type CreateInterfaceMethodHooks = {
|
|
5
5
|
/**
|
|
6
6
|
* @param ui - The UI components.
|
|
7
7
|
* @returns The unique identifier of the interface.
|
|
8
8
|
*/
|
|
9
|
-
createInterface: (ui:
|
|
9
|
+
createInterface: (ui: ComponentOrElement) => Promise<string>;
|
|
10
10
|
};
|
|
11
11
|
export declare const createInterfaceHandler: PermittedHandlerExport<CreateInterfaceMethodHooks, CreateInterfaceParameters, CreateInterfaceResult>;
|
|
12
12
|
declare const CreateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
13
|
-
ui: import("@metamask/snaps-sdk").Panel | {
|
|
13
|
+
ui: import("@metamask/snaps-sdk/jsx-runtime").JSXElement | import("@metamask/snaps-sdk").Panel | {
|
|
14
14
|
value: string;
|
|
15
15
|
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
16
16
|
sensitive?: boolean | undefined;
|
|
@@ -51,9 +51,9 @@ declare const CreateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
|
51
51
|
name: string;
|
|
52
52
|
value?: string | undefined;
|
|
53
53
|
error?: string | undefined;
|
|
54
|
+
placeholder?: string | undefined;
|
|
54
55
|
label?: string | undefined;
|
|
55
56
|
inputType?: "number" | "text" | "password" | undefined;
|
|
56
|
-
placeholder?: string | undefined;
|
|
57
57
|
} | {
|
|
58
58
|
value: string;
|
|
59
59
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
@@ -68,9 +68,9 @@ declare const CreateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
|
68
68
|
name: string;
|
|
69
69
|
value?: string | undefined;
|
|
70
70
|
error?: string | undefined;
|
|
71
|
+
placeholder?: string | undefined;
|
|
71
72
|
label?: string | undefined;
|
|
72
73
|
inputType?: "number" | "text" | "password" | undefined;
|
|
73
|
-
placeholder?: string | undefined;
|
|
74
74
|
} | {
|
|
75
75
|
value: string;
|
|
76
76
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
@@ -80,7 +80,7 @@ declare const CreateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
|
80
80
|
})[];
|
|
81
81
|
};
|
|
82
82
|
}, {
|
|
83
|
-
ui: import("superstruct").Struct<import("@metamask/snaps-sdk").Panel | {
|
|
83
|
+
ui: import("superstruct").Struct<import("@metamask/snaps-sdk/jsx-runtime").JSXElement | import("@metamask/snaps-sdk").Panel | {
|
|
84
84
|
value: string;
|
|
85
85
|
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
86
86
|
sensitive?: boolean | undefined;
|
|
@@ -121,9 +121,9 @@ declare const CreateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
|
121
121
|
name: string;
|
|
122
122
|
value?: string | undefined;
|
|
123
123
|
error?: string | undefined;
|
|
124
|
+
placeholder?: string | undefined;
|
|
124
125
|
label?: string | undefined;
|
|
125
126
|
inputType?: "number" | "text" | "password" | undefined;
|
|
126
|
-
placeholder?: string | undefined;
|
|
127
127
|
} | {
|
|
128
128
|
value: string;
|
|
129
129
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
@@ -138,9 +138,9 @@ declare const CreateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
|
138
138
|
name: string;
|
|
139
139
|
value?: string | undefined;
|
|
140
140
|
error?: string | undefined;
|
|
141
|
+
placeholder?: string | undefined;
|
|
141
142
|
label?: string | undefined;
|
|
142
143
|
inputType?: "number" | "text" | "password" | undefined;
|
|
143
|
-
placeholder?: string | undefined;
|
|
144
144
|
} | {
|
|
145
145
|
value: string;
|
|
146
146
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import type { PermittedHandlerExport } from '@metamask/permission-controller';
|
|
2
|
-
import type {
|
|
2
|
+
import type { UpdateInterfaceParams, UpdateInterfaceResult, ComponentOrElement } from '@metamask/snaps-sdk';
|
|
3
3
|
import { type InferMatching } from '@metamask/snaps-utils';
|
|
4
4
|
export declare type UpdateInterfaceMethodHooks = {
|
|
5
5
|
/**
|
|
6
6
|
* @param id - The interface ID.
|
|
7
7
|
* @param ui - The UI components.
|
|
8
8
|
*/
|
|
9
|
-
updateInterface: (id: string, ui:
|
|
9
|
+
updateInterface: (id: string, ui: ComponentOrElement) => Promise<void>;
|
|
10
10
|
};
|
|
11
11
|
export declare const updateInterfaceHandler: PermittedHandlerExport<UpdateInterfaceMethodHooks, UpdateInterfaceParameters, UpdateInterfaceResult>;
|
|
12
12
|
declare const UpdateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
13
13
|
id: string;
|
|
14
|
-
ui: import("@metamask/snaps-sdk").Panel | {
|
|
14
|
+
ui: import("@metamask/snaps-sdk/jsx-runtime").JSXElement | import("@metamask/snaps-sdk").Panel | {
|
|
15
15
|
value: string;
|
|
16
16
|
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
17
17
|
sensitive?: boolean | undefined;
|
|
@@ -52,9 +52,9 @@ declare const UpdateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
|
52
52
|
name: string;
|
|
53
53
|
value?: string | undefined;
|
|
54
54
|
error?: string | undefined;
|
|
55
|
+
placeholder?: string | undefined;
|
|
55
56
|
label?: string | undefined;
|
|
56
57
|
inputType?: "number" | "text" | "password" | undefined;
|
|
57
|
-
placeholder?: string | undefined;
|
|
58
58
|
} | {
|
|
59
59
|
value: string;
|
|
60
60
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
@@ -69,9 +69,9 @@ declare const UpdateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
|
69
69
|
name: string;
|
|
70
70
|
value?: string | undefined;
|
|
71
71
|
error?: string | undefined;
|
|
72
|
+
placeholder?: string | undefined;
|
|
72
73
|
label?: string | undefined;
|
|
73
74
|
inputType?: "number" | "text" | "password" | undefined;
|
|
74
|
-
placeholder?: string | undefined;
|
|
75
75
|
} | {
|
|
76
76
|
value: string;
|
|
77
77
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
@@ -82,7 +82,7 @@ declare const UpdateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
|
82
82
|
};
|
|
83
83
|
}, {
|
|
84
84
|
id: import("superstruct").Struct<string, null>;
|
|
85
|
-
ui: import("superstruct").Struct<import("@metamask/snaps-sdk").Panel | {
|
|
85
|
+
ui: import("superstruct").Struct<import("@metamask/snaps-sdk/jsx-runtime").JSXElement | import("@metamask/snaps-sdk").Panel | {
|
|
86
86
|
value: string;
|
|
87
87
|
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
88
88
|
sensitive?: boolean | undefined;
|
|
@@ -123,9 +123,9 @@ declare const UpdateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
|
123
123
|
name: string;
|
|
124
124
|
value?: string | undefined;
|
|
125
125
|
error?: string | undefined;
|
|
126
|
+
placeholder?: string | undefined;
|
|
126
127
|
label?: string | undefined;
|
|
127
128
|
inputType?: "number" | "text" | "password" | undefined;
|
|
128
|
-
placeholder?: string | undefined;
|
|
129
129
|
} | {
|
|
130
130
|
value: string;
|
|
131
131
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
@@ -140,9 +140,9 @@ declare const UpdateInterfaceParametersStruct: import("superstruct").Struct<{
|
|
|
140
140
|
name: string;
|
|
141
141
|
value?: string | undefined;
|
|
142
142
|
error?: string | undefined;
|
|
143
|
+
placeholder?: string | undefined;
|
|
143
144
|
label?: string | undefined;
|
|
144
145
|
inputType?: "number" | "text" | "password" | undefined;
|
|
145
|
-
placeholder?: string | undefined;
|
|
146
146
|
} | {
|
|
147
147
|
value: string;
|
|
148
148
|
type: import("@metamask/snaps-sdk").NodeType.Button;
|