@metamask/snaps-rpc-methods 7.0.2 → 8.0.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.
Files changed (31) hide show
  1. package/CHANGELOG.md +7 -1
  2. package/dist/{chunk-AKRFLGOS.mjs → chunk-AMBEX4N4.mjs} +2 -2
  3. package/dist/{chunk-FBOZCV3C.js → chunk-EGKFC56F.js} +3 -3
  4. package/dist/{chunk-7NBRKDKJ.mjs → chunk-NESDQ4PF.mjs} +9 -54
  5. package/dist/chunk-NESDQ4PF.mjs.map +1 -0
  6. package/dist/{chunk-KO4MKRYZ.js → chunk-R2M4YLJ7.js} +7 -52
  7. package/dist/chunk-R2M4YLJ7.js.map +1 -0
  8. package/dist/{chunk-LVTN25J2.js → chunk-RZXF4KSR.js} +3 -3
  9. package/dist/{chunk-LVTN25J2.js.map → chunk-RZXF4KSR.js.map} +1 -1
  10. package/dist/{chunk-3S7DJI4I.mjs → chunk-SU6KOIVB.mjs} +2 -2
  11. package/dist/chunk-SU6KOIVB.mjs.map +1 -0
  12. package/dist/index.js +4 -4
  13. package/dist/index.mjs +5 -5
  14. package/dist/permissions.js +4 -4
  15. package/dist/permissions.mjs +3 -3
  16. package/dist/restricted/index.js +3 -3
  17. package/dist/restricted/index.mjs +4 -4
  18. package/dist/restricted/manageState.js +2 -2
  19. package/dist/restricted/manageState.mjs +3 -3
  20. package/dist/tsconfig.build.tsbuildinfo +1 -1
  21. package/dist/types/permitted/createInterface.d.ts +38 -38
  22. package/dist/types/permitted/updateInterface.d.ts +39 -39
  23. package/dist/types/restricted/dialog.d.ts +144 -144
  24. package/dist/types/restricted/index.d.ts +1 -1
  25. package/dist/types/restricted/manageState.d.ts +5 -31
  26. package/package.json +3 -4
  27. package/dist/chunk-3S7DJI4I.mjs.map +0 -1
  28. package/dist/chunk-7NBRKDKJ.mjs.map +0 -1
  29. package/dist/chunk-KO4MKRYZ.js.map +0 -1
  30. /package/dist/{chunk-AKRFLGOS.mjs.map → chunk-AMBEX4N4.mjs.map} +0 -0
  31. /package/dist/{chunk-FBOZCV3C.js.map → chunk-EGKFC56F.js.map} +0 -0
@@ -11,6 +11,38 @@ export declare type CreateInterfaceMethodHooks = {
11
11
  export declare const createInterfaceHandler: PermittedHandlerExport<CreateInterfaceMethodHooks, CreateInterfaceParameters, CreateInterfaceResult>;
12
12
  declare const CreateInterfaceParametersStruct: import("superstruct").Struct<{
13
13
  ui: import("@metamask/snaps-sdk").Panel | {
14
+ type: import("@metamask/snaps-sdk").NodeType.Input;
15
+ name: string;
16
+ value?: string | undefined;
17
+ error?: string | undefined;
18
+ inputType?: "number" | "text" | "password" | undefined;
19
+ placeholder?: string | undefined;
20
+ label?: string | undefined;
21
+ } | {
22
+ value: string;
23
+ type: import("@metamask/snaps-sdk").NodeType.Button;
24
+ name?: string | undefined;
25
+ variant?: "primary" | "secondary" | undefined;
26
+ buttonType?: "button" | "submit" | undefined;
27
+ } | {
28
+ type: import("@metamask/snaps-sdk").NodeType.Form;
29
+ name: string;
30
+ children: ({
31
+ type: import("@metamask/snaps-sdk").NodeType.Input;
32
+ name: string;
33
+ value?: string | undefined;
34
+ error?: string | undefined;
35
+ inputType?: "number" | "text" | "password" | undefined;
36
+ placeholder?: string | undefined;
37
+ label?: string | undefined;
38
+ } | {
39
+ value: string;
40
+ type: import("@metamask/snaps-sdk").NodeType.Button;
41
+ name?: string | undefined;
42
+ variant?: "primary" | "secondary" | undefined;
43
+ buttonType?: "button" | "submit" | undefined;
44
+ })[];
45
+ } | {
14
46
  value: string;
15
47
  type: import("@metamask/snaps-sdk").NodeType.Copyable;
16
48
  sensitive?: boolean | undefined;
@@ -46,14 +78,16 @@ declare const CreateInterfaceParametersStruct: import("superstruct").Struct<{
46
78
  type: import("@metamask/snaps-sdk").NodeType.Row;
47
79
  label: string;
48
80
  variant?: "default" | "warning" | "critical" | undefined;
49
- } | {
81
+ };
82
+ }, {
83
+ ui: import("superstruct").Struct<import("@metamask/snaps-sdk").Panel | {
50
84
  type: import("@metamask/snaps-sdk").NodeType.Input;
51
85
  name: string;
52
86
  value?: string | undefined;
53
87
  error?: string | undefined;
54
- label?: string | undefined;
55
88
  inputType?: "number" | "text" | "password" | undefined;
56
89
  placeholder?: string | undefined;
90
+ label?: string | undefined;
57
91
  } | {
58
92
  value: string;
59
93
  type: import("@metamask/snaps-sdk").NodeType.Button;
@@ -68,9 +102,9 @@ declare const CreateInterfaceParametersStruct: import("superstruct").Struct<{
68
102
  name: string;
69
103
  value?: string | undefined;
70
104
  error?: string | undefined;
71
- label?: string | undefined;
72
105
  inputType?: "number" | "text" | "password" | undefined;
73
106
  placeholder?: string | undefined;
107
+ label?: string | undefined;
74
108
  } | {
75
109
  value: string;
76
110
  type: import("@metamask/snaps-sdk").NodeType.Button;
@@ -78,9 +112,7 @@ declare const CreateInterfaceParametersStruct: import("superstruct").Struct<{
78
112
  variant?: "primary" | "secondary" | undefined;
79
113
  buttonType?: "button" | "submit" | undefined;
80
114
  })[];
81
- };
82
- }, {
83
- ui: import("superstruct").Struct<import("@metamask/snaps-sdk").Panel | {
115
+ } | {
84
116
  value: string;
85
117
  type: import("@metamask/snaps-sdk").NodeType.Copyable;
86
118
  sensitive?: boolean | undefined;
@@ -116,38 +148,6 @@ declare const CreateInterfaceParametersStruct: import("superstruct").Struct<{
116
148
  type: import("@metamask/snaps-sdk").NodeType.Row;
117
149
  label: string;
118
150
  variant?: "default" | "warning" | "critical" | undefined;
119
- } | {
120
- type: import("@metamask/snaps-sdk").NodeType.Input;
121
- name: string;
122
- value?: string | undefined;
123
- error?: string | undefined;
124
- label?: string | undefined;
125
- inputType?: "number" | "text" | "password" | undefined;
126
- placeholder?: string | undefined;
127
- } | {
128
- value: string;
129
- type: import("@metamask/snaps-sdk").NodeType.Button;
130
- name?: string | undefined;
131
- variant?: "primary" | "secondary" | undefined;
132
- buttonType?: "button" | "submit" | undefined;
133
- } | {
134
- type: import("@metamask/snaps-sdk").NodeType.Form;
135
- name: string;
136
- children: ({
137
- type: import("@metamask/snaps-sdk").NodeType.Input;
138
- name: string;
139
- value?: string | undefined;
140
- error?: string | undefined;
141
- label?: string | undefined;
142
- inputType?: "number" | "text" | "password" | undefined;
143
- placeholder?: string | undefined;
144
- } | {
145
- value: string;
146
- type: import("@metamask/snaps-sdk").NodeType.Button;
147
- name?: string | undefined;
148
- variant?: "primary" | "secondary" | undefined;
149
- buttonType?: "button" | "submit" | undefined;
150
- })[];
151
151
  }, null>;
152
152
  }>;
153
153
  export declare type CreateInterfaceParameters = InferMatching<typeof CreateInterfaceParametersStruct, CreateInterfaceParams>;
@@ -12,6 +12,38 @@ export declare const updateInterfaceHandler: PermittedHandlerExport<UpdateInterf
12
12
  declare const UpdateInterfaceParametersStruct: import("superstruct").Struct<{
13
13
  id: string;
14
14
  ui: import("@metamask/snaps-sdk").Panel | {
15
+ type: import("@metamask/snaps-sdk").NodeType.Input;
16
+ name: string;
17
+ value?: string | undefined;
18
+ error?: string | undefined;
19
+ inputType?: "number" | "text" | "password" | undefined;
20
+ placeholder?: string | undefined;
21
+ label?: string | undefined;
22
+ } | {
23
+ value: string;
24
+ type: import("@metamask/snaps-sdk").NodeType.Button;
25
+ name?: string | undefined;
26
+ variant?: "primary" | "secondary" | undefined;
27
+ buttonType?: "button" | "submit" | undefined;
28
+ } | {
29
+ type: import("@metamask/snaps-sdk").NodeType.Form;
30
+ name: string;
31
+ children: ({
32
+ type: import("@metamask/snaps-sdk").NodeType.Input;
33
+ name: string;
34
+ value?: string | undefined;
35
+ error?: string | undefined;
36
+ inputType?: "number" | "text" | "password" | undefined;
37
+ placeholder?: string | undefined;
38
+ label?: string | undefined;
39
+ } | {
40
+ value: string;
41
+ type: import("@metamask/snaps-sdk").NodeType.Button;
42
+ name?: string | undefined;
43
+ variant?: "primary" | "secondary" | undefined;
44
+ buttonType?: "button" | "submit" | undefined;
45
+ })[];
46
+ } | {
15
47
  value: string;
16
48
  type: import("@metamask/snaps-sdk").NodeType.Copyable;
17
49
  sensitive?: boolean | undefined;
@@ -47,14 +79,17 @@ declare const UpdateInterfaceParametersStruct: import("superstruct").Struct<{
47
79
  type: import("@metamask/snaps-sdk").NodeType.Row;
48
80
  label: string;
49
81
  variant?: "default" | "warning" | "critical" | undefined;
50
- } | {
82
+ };
83
+ }, {
84
+ id: import("superstruct").Struct<string, null>;
85
+ ui: import("superstruct").Struct<import("@metamask/snaps-sdk").Panel | {
51
86
  type: import("@metamask/snaps-sdk").NodeType.Input;
52
87
  name: string;
53
88
  value?: string | undefined;
54
89
  error?: string | undefined;
55
- label?: string | undefined;
56
90
  inputType?: "number" | "text" | "password" | undefined;
57
91
  placeholder?: string | undefined;
92
+ label?: string | undefined;
58
93
  } | {
59
94
  value: string;
60
95
  type: import("@metamask/snaps-sdk").NodeType.Button;
@@ -69,9 +104,9 @@ declare const UpdateInterfaceParametersStruct: import("superstruct").Struct<{
69
104
  name: string;
70
105
  value?: string | undefined;
71
106
  error?: string | undefined;
72
- label?: string | undefined;
73
107
  inputType?: "number" | "text" | "password" | undefined;
74
108
  placeholder?: string | undefined;
109
+ label?: string | undefined;
75
110
  } | {
76
111
  value: string;
77
112
  type: import("@metamask/snaps-sdk").NodeType.Button;
@@ -79,10 +114,7 @@ declare const UpdateInterfaceParametersStruct: import("superstruct").Struct<{
79
114
  variant?: "primary" | "secondary" | undefined;
80
115
  buttonType?: "button" | "submit" | undefined;
81
116
  })[];
82
- };
83
- }, {
84
- id: import("superstruct").Struct<string, null>;
85
- ui: import("superstruct").Struct<import("@metamask/snaps-sdk").Panel | {
117
+ } | {
86
118
  value: string;
87
119
  type: import("@metamask/snaps-sdk").NodeType.Copyable;
88
120
  sensitive?: boolean | undefined;
@@ -118,38 +150,6 @@ declare const UpdateInterfaceParametersStruct: import("superstruct").Struct<{
118
150
  type: import("@metamask/snaps-sdk").NodeType.Row;
119
151
  label: string;
120
152
  variant?: "default" | "warning" | "critical" | undefined;
121
- } | {
122
- type: import("@metamask/snaps-sdk").NodeType.Input;
123
- name: string;
124
- value?: string | undefined;
125
- error?: string | undefined;
126
- label?: string | undefined;
127
- inputType?: "number" | "text" | "password" | undefined;
128
- placeholder?: string | undefined;
129
- } | {
130
- value: string;
131
- type: import("@metamask/snaps-sdk").NodeType.Button;
132
- name?: string | undefined;
133
- variant?: "primary" | "secondary" | undefined;
134
- buttonType?: "button" | "submit" | undefined;
135
- } | {
136
- type: import("@metamask/snaps-sdk").NodeType.Form;
137
- name: string;
138
- children: ({
139
- type: import("@metamask/snaps-sdk").NodeType.Input;
140
- name: string;
141
- value?: string | undefined;
142
- error?: string | undefined;
143
- label?: string | undefined;
144
- inputType?: "number" | "text" | "password" | undefined;
145
- placeholder?: string | undefined;
146
- } | {
147
- value: string;
148
- type: import("@metamask/snaps-sdk").NodeType.Button;
149
- name?: string | undefined;
150
- variant?: "primary" | "secondary" | undefined;
151
- buttonType?: "button" | "submit" | undefined;
152
- })[];
153
153
  }, null>;
154
154
  }>;
155
155
  export declare type UpdateInterfaceParameters = InferMatching<typeof UpdateInterfaceParametersStruct, UpdateInterfaceParams>;