@metamask/snaps-rpc-methods 12.0.0 → 12.2.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 +19 -1
- package/dist/endowments/index.cjs +1 -0
- package/dist/endowments/index.cjs.map +1 -1
- package/dist/endowments/index.d.cts.map +1 -1
- package/dist/endowments/index.d.mts.map +1 -1
- package/dist/endowments/index.mjs +1 -0
- package/dist/endowments/index.mjs.map +1 -1
- package/dist/permitted/createInterface.d.cts +44 -44
- package/dist/permitted/createInterface.d.mts +44 -44
- package/dist/permitted/experimentalProviderRequest.cjs +7 -1
- package/dist/permitted/experimentalProviderRequest.cjs.map +1 -1
- package/dist/permitted/experimentalProviderRequest.d.cts +3 -3
- package/dist/permitted/experimentalProviderRequest.d.mts +3 -3
- package/dist/permitted/experimentalProviderRequest.mjs +7 -1
- package/dist/permitted/experimentalProviderRequest.mjs.map +1 -1
- package/dist/permitted/getFile.d.cts +2 -2
- package/dist/permitted/getFile.d.mts +2 -2
- package/dist/permitted/getState.cjs +7 -1
- package/dist/permitted/getState.cjs.map +1 -1
- package/dist/permitted/getState.d.cts +1 -1
- package/dist/permitted/getState.d.cts.map +1 -1
- package/dist/permitted/getState.d.mts +1 -1
- package/dist/permitted/getState.d.mts.map +1 -1
- package/dist/permitted/getState.mjs +7 -1
- package/dist/permitted/getState.mjs.map +1 -1
- package/dist/permitted/handlers.cjs +2 -0
- package/dist/permitted/handlers.cjs.map +1 -1
- package/dist/permitted/handlers.d.cts +18 -1
- package/dist/permitted/handlers.d.cts.map +1 -1
- package/dist/permitted/handlers.d.mts +18 -1
- package/dist/permitted/handlers.d.mts.map +1 -1
- package/dist/permitted/handlers.mjs +2 -0
- package/dist/permitted/handlers.mjs.map +1 -1
- package/dist/permitted/invokeKeyring.cjs +7 -1
- package/dist/permitted/invokeKeyring.cjs.map +1 -1
- package/dist/permitted/invokeKeyring.mjs +7 -1
- package/dist/permitted/invokeKeyring.mjs.map +1 -1
- package/dist/permitted/invokeSnapSugar.cjs +7 -1
- package/dist/permitted/invokeSnapSugar.cjs.map +1 -1
- package/dist/permitted/invokeSnapSugar.d.cts.map +1 -1
- package/dist/permitted/invokeSnapSugar.d.mts.map +1 -1
- package/dist/permitted/invokeSnapSugar.mjs +7 -1
- package/dist/permitted/invokeSnapSugar.mjs.map +1 -1
- package/dist/permitted/scheduleBackgroundEvent.cjs +2 -19
- package/dist/permitted/scheduleBackgroundEvent.cjs.map +1 -1
- package/dist/permitted/scheduleBackgroundEvent.d.cts +4 -4
- package/dist/permitted/scheduleBackgroundEvent.d.cts.map +1 -1
- package/dist/permitted/scheduleBackgroundEvent.d.mts +4 -4
- package/dist/permitted/scheduleBackgroundEvent.d.mts.map +1 -1
- package/dist/permitted/scheduleBackgroundEvent.mjs +4 -21
- package/dist/permitted/scheduleBackgroundEvent.mjs.map +1 -1
- package/dist/permitted/setState.d.cts +1 -1
- package/dist/permitted/setState.d.mts +1 -1
- package/dist/permitted/trackEvent.cjs +89 -0
- package/dist/permitted/trackEvent.cjs.map +1 -0
- package/dist/permitted/trackEvent.d.cts +47 -0
- package/dist/permitted/trackEvent.d.cts.map +1 -0
- package/dist/permitted/trackEvent.d.mts +47 -0
- package/dist/permitted/trackEvent.d.mts.map +1 -0
- package/dist/permitted/trackEvent.mjs +86 -0
- package/dist/permitted/trackEvent.mjs.map +1 -0
- package/dist/permitted/updateInterface.d.cts +44 -44
- package/dist/permitted/updateInterface.d.mts +44 -44
- package/dist/restricted/dialog.d.cts +91 -147
- package/dist/restricted/dialog.d.cts.map +1 -1
- package/dist/restricted/dialog.d.mts +91 -147
- package/dist/restricted/dialog.d.mts.map +1 -1
- package/dist/restricted/getBip32PublicKey.d.cts +2 -2
- package/dist/restricted/getBip32PublicKey.d.mts +2 -2
- package/dist/restricted/getEntropy.d.cts +1 -1
- package/dist/restricted/getEntropy.d.mts +1 -1
- package/dist/restricted/manageAccounts.d.cts +1 -1
- package/dist/restricted/manageAccounts.d.mts +1 -1
- package/dist/restricted/notify.d.cts +74 -74
- package/dist/restricted/notify.d.mts +74 -74
- package/package.json +8 -8
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import type { PermittedHandlerExport } from "@metamask/permission-controller";
|
|
2
|
+
import type { TrackEventParams, TrackEventResult } from "@metamask/snaps-sdk";
|
|
3
|
+
import type { InferMatching, Snap } from "@metamask/snaps-utils";
|
|
4
|
+
import type { Json } from "@metamask/utils";
|
|
5
|
+
export type TrackEventMethodHooks = {
|
|
6
|
+
/**
|
|
7
|
+
* Track an event.
|
|
8
|
+
*
|
|
9
|
+
* @param event - The event object containing event details and properties.
|
|
10
|
+
*/
|
|
11
|
+
trackEvent: (event: TrackEventObject) => void;
|
|
12
|
+
/**
|
|
13
|
+
* Get Snap metadata.
|
|
14
|
+
*
|
|
15
|
+
* @param snapId - The ID of a Snap.
|
|
16
|
+
*/
|
|
17
|
+
getSnap: (snapId: string) => Snap | undefined;
|
|
18
|
+
};
|
|
19
|
+
export type TrackEventObject = {
|
|
20
|
+
event: string;
|
|
21
|
+
properties?: Record<string, Json>;
|
|
22
|
+
sensitiveProperties?: Record<string, Json>;
|
|
23
|
+
};
|
|
24
|
+
declare const TrackEventParametersStruct: import("@metamask/superstruct").Struct<{
|
|
25
|
+
event: {
|
|
26
|
+
event: string;
|
|
27
|
+
properties?: Record<string, Json> | undefined;
|
|
28
|
+
sensitiveProperties?: Record<string, Json> | undefined;
|
|
29
|
+
};
|
|
30
|
+
}, {
|
|
31
|
+
event: import("@metamask/superstruct").Struct<{
|
|
32
|
+
event: string;
|
|
33
|
+
properties?: Record<string, Json> | undefined;
|
|
34
|
+
sensitiveProperties?: Record<string, Json> | undefined;
|
|
35
|
+
}, {
|
|
36
|
+
event: import("@metamask/superstruct").Struct<string, null>;
|
|
37
|
+
properties: import("@metamask/superstruct").Struct<Record<string, Json> | undefined, null>;
|
|
38
|
+
sensitiveProperties: import("@metamask/superstruct").Struct<Record<string, Json> | undefined, null>;
|
|
39
|
+
}>;
|
|
40
|
+
}>;
|
|
41
|
+
export type TrackEventParameters = InferMatching<typeof TrackEventParametersStruct, TrackEventParams>;
|
|
42
|
+
/**
|
|
43
|
+
* Handler for the `snap_trackEvent` method.
|
|
44
|
+
*/
|
|
45
|
+
export declare const trackEventHandler: PermittedHandlerExport<TrackEventMethodHooks, TrackEventParameters, TrackEventResult>;
|
|
46
|
+
export {};
|
|
47
|
+
//# sourceMappingURL=trackEvent.d.mts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackEvent.d.mts","sourceRoot":"","sources":["../../src/permitted/trackEvent.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,wCAAwC;AAE9E,OAAO,KAAK,EAEV,gBAAgB,EAChB,gBAAgB,EACjB,4BAA4B;AAC7B,OAAO,KAAK,EAAE,aAAa,EAAE,IAAI,EAAE,8BAA8B;AAUjE,OAAO,KAAK,EAAE,IAAI,EAA0B,wBAAwB;AA0BpE,MAAM,MAAM,qBAAqB,GAAG;IAClC;;;;OAIG;IACH,UAAU,EAAE,CAAC,KAAK,EAAE,gBAAgB,KAAK,IAAI,CAAC;IAC9C;;;;OAIG;IACH,OAAO,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,SAAS,CAAC;CAC/C,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;IAClC,mBAAmB,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;CAC5C,CAAC;AAEF,QAAA,MAAM,0BAA0B;;;;;;;;;;;;;;;;EAM9B,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,aAAa,CAC9C,OAAO,0BAA0B,EACjC,gBAAgB,CACjB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,EAAE,sBAAsB,CACpD,qBAAqB,EACrB,oBAAoB,EACpB,gBAAgB,CAKjB,CAAC"}
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
import { rpcErrors } from "@metamask/rpc-errors";
|
|
2
|
+
import { create, object, optional, record, refine, string, StructError } from "@metamask/superstruct";
|
|
3
|
+
import { JsonStruct } from "@metamask/utils";
|
|
4
|
+
const PropertiesStruct = optional(record(string(), JsonStruct));
|
|
5
|
+
const snakeCaseRegex = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/u;
|
|
6
|
+
const SnakeCasePropertiesStruct = refine(PropertiesStruct, 'snake_case_keys', (value) => {
|
|
7
|
+
if (!value) {
|
|
8
|
+
return true;
|
|
9
|
+
}
|
|
10
|
+
return Object.keys(value).every((key) => snakeCaseRegex.test(key));
|
|
11
|
+
});
|
|
12
|
+
const hookNames = {
|
|
13
|
+
trackEvent: true,
|
|
14
|
+
getSnap: true,
|
|
15
|
+
};
|
|
16
|
+
const TrackEventParametersStruct = object({
|
|
17
|
+
event: object({
|
|
18
|
+
event: string(),
|
|
19
|
+
properties: SnakeCasePropertiesStruct,
|
|
20
|
+
sensitiveProperties: SnakeCasePropertiesStruct,
|
|
21
|
+
}),
|
|
22
|
+
});
|
|
23
|
+
/**
|
|
24
|
+
* Handler for the `snap_trackEvent` method.
|
|
25
|
+
*/
|
|
26
|
+
export const trackEventHandler = {
|
|
27
|
+
methodNames: ['snap_trackEvent'],
|
|
28
|
+
implementation: getTrackEventImplementation,
|
|
29
|
+
hookNames,
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* The `snap_trackEvent` method implementation.
|
|
33
|
+
* This method allows pre-installed Snaps to submit tracking events to the client.
|
|
34
|
+
*
|
|
35
|
+
* @param req - The JSON-RPC request object.
|
|
36
|
+
* @param res - The JSON-RPC response object.
|
|
37
|
+
* @param _next - The `json-rpc-engine` "next" callback. Not used by this function.
|
|
38
|
+
* @param end - The `json-rpc-engine` "end" callback.
|
|
39
|
+
* @param hooks - The RPC method hooks.
|
|
40
|
+
* @param hooks.trackEvent - The function to track the event.
|
|
41
|
+
* @param hooks.getSnap - The function to get Snap metadata.
|
|
42
|
+
* @returns Nothing.
|
|
43
|
+
*/
|
|
44
|
+
function getTrackEventImplementation(req, res, _next, end, { trackEvent, getSnap }) {
|
|
45
|
+
const snap = getSnap(req.origin);
|
|
46
|
+
if (!snap?.preinstalled) {
|
|
47
|
+
return end(rpcErrors.methodNotFound());
|
|
48
|
+
}
|
|
49
|
+
const { params } = req;
|
|
50
|
+
try {
|
|
51
|
+
const validatedParams = getValidatedParams(params);
|
|
52
|
+
trackEvent(validatedParams.event);
|
|
53
|
+
res.result = null;
|
|
54
|
+
}
|
|
55
|
+
catch (error) {
|
|
56
|
+
return end(error);
|
|
57
|
+
}
|
|
58
|
+
return end();
|
|
59
|
+
}
|
|
60
|
+
/**
|
|
61
|
+
* Validates the parameters for the snap_trackEvent method.
|
|
62
|
+
*
|
|
63
|
+
* @param params - Parameters to validate.
|
|
64
|
+
* @returns Validated parameters.
|
|
65
|
+
* @throws Throws RPC error if validation fails.
|
|
66
|
+
*/
|
|
67
|
+
function getValidatedParams(params) {
|
|
68
|
+
try {
|
|
69
|
+
return create(params, TrackEventParametersStruct);
|
|
70
|
+
}
|
|
71
|
+
catch (error) {
|
|
72
|
+
if (error instanceof StructError) {
|
|
73
|
+
if (error.refinement === 'snake_case_keys') {
|
|
74
|
+
throw rpcErrors.invalidParams({
|
|
75
|
+
message: `Invalid params: All property keys must be in snake_case format. The following key contains invalid properties: "${error.key}".`,
|
|
76
|
+
});
|
|
77
|
+
}
|
|
78
|
+
throw rpcErrors.invalidParams({
|
|
79
|
+
message: `Invalid params: ${error.message}.`,
|
|
80
|
+
});
|
|
81
|
+
}
|
|
82
|
+
/* istanbul ignore next */
|
|
83
|
+
throw rpcErrors.internal();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
//# sourceMappingURL=trackEvent.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"trackEvent.mjs","sourceRoot":"","sources":["../../src/permitted/trackEvent.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,SAAS,EAAE,6BAA6B;AAOjD,OAAO,EACL,MAAM,EACN,MAAM,EACN,QAAQ,EACR,MAAM,EACN,MAAM,EACN,MAAM,EACN,WAAW,EACZ,8BAA8B;AAE/B,OAAO,EAAE,UAAU,EAAE,wBAAwB;AAI7C,MAAM,gBAAgB,GAAG,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,EAAE,UAAU,CAAC,CAAC,CAAC;AAEhE,MAAM,cAAc,GAAG,kCAAkC,CAAC;AAE1D,MAAM,yBAAyB,GAAG,MAAM,CACtC,gBAAgB,EAChB,iBAAiB,EACjB,CAAC,KAAK,EAAE,EAAE;IACR,IAAI,CAAC,KAAK,EAAE,CAAC;QACX,OAAO,IAAI,CAAC;IACd,CAAC;IAED,OAAO,MAAM,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC,KAAK,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,cAAc,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AACrE,CAAC,CACF,CAAC;AAEF,MAAM,SAAS,GAA6C;IAC1D,UAAU,EAAE,IAAI;IAChB,OAAO,EAAE,IAAI;CACd,CAAC;AAuBF,MAAM,0BAA0B,GAAG,MAAM,CAAC;IACxC,KAAK,EAAE,MAAM,CAAC;QACZ,KAAK,EAAE,MAAM,EAAE;QACf,UAAU,EAAE,yBAAyB;QACrC,mBAAmB,EAAE,yBAAyB;KAC/C,CAAC;CACH,CAAC,CAAC;AAOH;;GAEG;AACH,MAAM,CAAC,MAAM,iBAAiB,GAI1B;IACF,WAAW,EAAE,CAAC,iBAAiB,CAAC;IAChC,cAAc,EAAE,2BAA2B;IAC3C,SAAS;CACV,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,SAAS,2BAA2B,CAClC,GAAyC,EACzC,GAA6C,EAC7C,KAAc,EACd,GAA6B,EAC7B,EAAE,UAAU,EAAE,OAAO,EAAyB;IAE9C,MAAM,IAAI,GAAG,OAAO,CACjB,GAA6D,CAAC,MAAM,CACtE,CAAC;IAEF,IAAI,CAAC,IAAI,EAAE,YAAY,EAAE,CAAC;QACxB,OAAO,GAAG,CAAC,SAAS,CAAC,cAAc,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,MAAM,EAAE,MAAM,EAAE,GAAG,GAAG,CAAC;IAEvB,IAAI,CAAC;QACH,MAAM,eAAe,GAAG,kBAAkB,CAAC,MAAM,CAAC,CAAC;QACnD,UAAU,CAAC,eAAe,CAAC,KAAK,CAAC,CAAC;QAClC,GAAG,CAAC,MAAM,GAAG,IAAI,CAAC;IACpB,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,OAAO,GAAG,CAAC,KAAK,CAAC,CAAC;IACpB,CAAC;IAED,OAAO,GAAG,EAAE,CAAC;AACf,CAAC;AAED;;;;;;GAMG;AACH,SAAS,kBAAkB,CAAC,MAAe;IACzC,IAAI,CAAC;QACH,OAAO,MAAM,CAAC,MAAM,EAAE,0BAA0B,CAAC,CAAC;IACpD,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,IAAI,KAAK,YAAY,WAAW,EAAE,CAAC;YACjC,IAAI,KAAK,CAAC,UAAU,KAAK,iBAAiB,EAAE,CAAC;gBAC3C,MAAM,SAAS,CAAC,aAAa,CAAC;oBAC5B,OAAO,EAAE,mHAAmH,KAAK,CAAC,GAAG,IAAI;iBAC1I,CAAC,CAAC;YACL,CAAC;YAED,MAAM,SAAS,CAAC,aAAa,CAAC;gBAC5B,OAAO,EAAE,mBAAmB,KAAK,CAAC,OAAO,GAAG;aAC7C,CAAC,CAAC;QACL,CAAC;QACD,0BAA0B;QAC1B,MAAM,SAAS,CAAC,QAAQ,EAAE,CAAC;IAC7B,CAAC;AACH,CAAC","sourcesContent":["import type { JsonRpcEngineEndCallback } from '@metamask/json-rpc-engine';\nimport type { PermittedHandlerExport } from '@metamask/permission-controller';\nimport { rpcErrors } from '@metamask/rpc-errors';\nimport type {\n JsonRpcRequest,\n TrackEventParams,\n TrackEventResult,\n} from '@metamask/snaps-sdk';\nimport type { InferMatching, Snap } from '@metamask/snaps-utils';\nimport {\n create,\n object,\n optional,\n record,\n refine,\n string,\n StructError,\n} from '@metamask/superstruct';\nimport type { Json, PendingJsonRpcResponse } from '@metamask/utils';\nimport { JsonStruct } from '@metamask/utils';\n\nimport type { MethodHooksObject } from '../utils';\n\nconst PropertiesStruct = optional(record(string(), JsonStruct));\n\nconst snakeCaseRegex = /^[a-z][a-z0-9]*(?:_[a-z0-9]+)*$/u;\n\nconst SnakeCasePropertiesStruct = refine(\n PropertiesStruct,\n 'snake_case_keys',\n (value) => {\n if (!value) {\n return true;\n }\n\n return Object.keys(value).every((key) => snakeCaseRegex.test(key));\n },\n);\n\nconst hookNames: MethodHooksObject<TrackEventMethodHooks> = {\n trackEvent: true,\n getSnap: true,\n};\n\nexport type TrackEventMethodHooks = {\n /**\n * Track an event.\n *\n * @param event - The event object containing event details and properties.\n */\n trackEvent: (event: TrackEventObject) => void;\n /**\n * Get Snap metadata.\n *\n * @param snapId - The ID of a Snap.\n */\n getSnap: (snapId: string) => Snap | undefined;\n};\n\nexport type TrackEventObject = {\n event: string;\n properties?: Record<string, Json>;\n sensitiveProperties?: Record<string, Json>;\n};\n\nconst TrackEventParametersStruct = object({\n event: object({\n event: string(),\n properties: SnakeCasePropertiesStruct,\n sensitiveProperties: SnakeCasePropertiesStruct,\n }),\n});\n\nexport type TrackEventParameters = InferMatching<\n typeof TrackEventParametersStruct,\n TrackEventParams\n>;\n\n/**\n * Handler for the `snap_trackEvent` method.\n */\nexport const trackEventHandler: PermittedHandlerExport<\n TrackEventMethodHooks,\n TrackEventParameters,\n TrackEventResult\n> = {\n methodNames: ['snap_trackEvent'],\n implementation: getTrackEventImplementation,\n hookNames,\n};\n\n/**\n * The `snap_trackEvent` method implementation.\n * This method allows pre-installed Snaps to submit tracking events to the client.\n *\n * @param req - The JSON-RPC request object.\n * @param res - The JSON-RPC response object.\n * @param _next - The `json-rpc-engine` \"next\" callback. Not used by this function.\n * @param end - The `json-rpc-engine` \"end\" callback.\n * @param hooks - The RPC method hooks.\n * @param hooks.trackEvent - The function to track the event.\n * @param hooks.getSnap - The function to get Snap metadata.\n * @returns Nothing.\n */\nfunction getTrackEventImplementation(\n req: JsonRpcRequest<TrackEventParameters>,\n res: PendingJsonRpcResponse<TrackEventResult>,\n _next: unknown,\n end: JsonRpcEngineEndCallback,\n { trackEvent, getSnap }: TrackEventMethodHooks,\n): void {\n const snap = getSnap(\n (req as JsonRpcRequest<TrackEventParams> & { origin: string }).origin,\n );\n\n if (!snap?.preinstalled) {\n return end(rpcErrors.methodNotFound());\n }\n\n const { params } = req;\n\n try {\n const validatedParams = getValidatedParams(params);\n trackEvent(validatedParams.event);\n res.result = null;\n } catch (error) {\n return end(error);\n }\n\n return end();\n}\n\n/**\n * Validates the parameters for the snap_trackEvent method.\n *\n * @param params - Parameters to validate.\n * @returns Validated parameters.\n * @throws Throws RPC error if validation fails.\n */\nfunction getValidatedParams(params: unknown): TrackEventParameters {\n try {\n return create(params, TrackEventParametersStruct);\n } catch (error) {\n if (error instanceof StructError) {\n if (error.refinement === 'snake_case_keys') {\n throw rpcErrors.invalidParams({\n message: `Invalid params: All property keys must be in snake_case format. The following key contains invalid properties: \"${error.key}\".`,\n });\n }\n\n throw rpcErrors.invalidParams({\n message: `Invalid params: ${error.message}.`,\n });\n }\n /* istanbul ignore next */\n throw rpcErrors.internal();\n }\n}\n"]}
|
|
@@ -12,72 +12,72 @@ export type UpdateInterfaceMethodHooks = {
|
|
|
12
12
|
export declare const updateInterfaceHandler: PermittedHandlerExport<UpdateInterfaceMethodHooks, UpdateInterfaceParameters, UpdateInterfaceResult>;
|
|
13
13
|
declare const UpdateInterfaceParametersStruct: import("@metamask/superstruct").Struct<{
|
|
14
14
|
id: string;
|
|
15
|
-
ui: import("@metamask/snaps-sdk").Panel | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ButtonProps, "Button"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CheckboxProps, "Checkbox"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FormProps, "Form"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FieldProps, "Field"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FileInputProps, "FileInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").InputProps, "Input"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").DropdownProps, "Dropdown"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SelectorProps, "Selector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoldProps, "Bold"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ItalicProps, "Italic"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AvatarProps, "Avatar"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressProps, "Address"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoxProps, "Box"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CardProps, "Card"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ContainerProps, "Container"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CopyableProps, "Copyable"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Divider"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").LinkProps, "Link"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").RowProps, "Row"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SectionProps, "Section"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Spinner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TextProps, "Text"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TooltipProps, "Tooltip"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BannerProps, "Banner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SkeletonProps, "Skeleton"> | {
|
|
16
|
-
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
15
|
+
ui: import("@metamask/snaps-sdk").Panel | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AssetSelectorProps, "AssetSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressInputProps, "AddressInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ButtonProps, "Button"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CheckboxProps, "Checkbox"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FormProps, "Form"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FieldProps, "Field"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FileInputProps, "FileInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").InputProps, "Input"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").DropdownProps, "Dropdown"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SelectorProps, "Selector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoldProps, "Bold"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ItalicProps, "Italic"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AvatarProps, "Avatar"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressProps, "Address"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoxProps, "Box"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CardProps, "Card"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ContainerProps, "Container"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CopyableProps, "Copyable"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Divider"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").LinkProps, "Link"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").RowProps, "Row"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SectionProps, "Section"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Spinner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TextProps, "Text"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TooltipProps, "Tooltip"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BannerProps, "Banner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SkeletonProps, "Skeleton"> | {
|
|
17
16
|
value: string;
|
|
17
|
+
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
18
18
|
sensitive?: boolean | undefined;
|
|
19
19
|
} | {
|
|
20
20
|
type: import("@metamask/snaps-sdk").NodeType.Divider;
|
|
21
21
|
} | {
|
|
22
|
-
type: import("@metamask/snaps-sdk").NodeType.Heading;
|
|
23
22
|
value: string;
|
|
23
|
+
type: import("@metamask/snaps-sdk").NodeType.Heading;
|
|
24
24
|
} | {
|
|
25
|
-
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
26
25
|
value: string;
|
|
26
|
+
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
27
27
|
} | {
|
|
28
28
|
type: import("@metamask/snaps-sdk").NodeType.Spinner;
|
|
29
29
|
} | {
|
|
30
|
-
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
31
30
|
value: string;
|
|
31
|
+
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
32
32
|
markdown?: boolean | undefined;
|
|
33
33
|
} | {
|
|
34
|
-
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
35
34
|
value: `0x${string}`;
|
|
35
|
+
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
36
36
|
} | {
|
|
37
|
-
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
38
37
|
value: {
|
|
39
|
-
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
40
38
|
value: string;
|
|
39
|
+
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
41
40
|
} | {
|
|
42
|
-
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
43
41
|
value: string;
|
|
42
|
+
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
44
43
|
markdown?: boolean | undefined;
|
|
45
44
|
} | {
|
|
46
|
-
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
47
45
|
value: `0x${string}`;
|
|
46
|
+
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
48
47
|
};
|
|
48
|
+
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
49
49
|
label: string;
|
|
50
|
-
variant?: "default" | "
|
|
50
|
+
variant?: "default" | "critical" | "warning" | undefined;
|
|
51
51
|
} | {
|
|
52
|
-
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
53
52
|
name: string;
|
|
54
|
-
|
|
55
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
53
|
+
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
56
54
|
value?: string | undefined;
|
|
57
55
|
label?: string | undefined;
|
|
56
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
58
57
|
placeholder?: string | undefined;
|
|
58
|
+
error?: string | undefined;
|
|
59
59
|
} | {
|
|
60
|
-
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
61
60
|
value: string;
|
|
62
|
-
|
|
61
|
+
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
63
62
|
name?: string | undefined;
|
|
63
|
+
variant?: "primary" | "secondary" | undefined;
|
|
64
64
|
buttonType?: "button" | "submit" | undefined;
|
|
65
65
|
} | {
|
|
66
|
-
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
67
66
|
name: string;
|
|
67
|
+
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
68
68
|
children: ({
|
|
69
|
-
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
70
69
|
name: string;
|
|
71
|
-
|
|
72
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
70
|
+
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
73
71
|
value?: string | undefined;
|
|
74
72
|
label?: string | undefined;
|
|
73
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
75
74
|
placeholder?: string | undefined;
|
|
75
|
+
error?: string | undefined;
|
|
76
76
|
} | {
|
|
77
|
-
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
78
77
|
value: string;
|
|
79
|
-
|
|
78
|
+
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
80
79
|
name?: string | undefined;
|
|
80
|
+
variant?: "primary" | "secondary" | undefined;
|
|
81
81
|
buttonType?: "button" | "submit" | undefined;
|
|
82
82
|
})[];
|
|
83
83
|
} | import("@metamask/snaps-sdk/jsx").SnapElement<{
|
|
@@ -100,72 +100,72 @@ declare const UpdateInterfaceParametersStruct: import("@metamask/superstruct").S
|
|
|
100
100
|
context?: Record<string, import("@metamask/snaps-sdk").Json> | undefined;
|
|
101
101
|
}, {
|
|
102
102
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
103
|
-
ui: import("@metamask/superstruct").Struct<import("@metamask/snaps-sdk").Panel | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ButtonProps, "Button"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CheckboxProps, "Checkbox"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FormProps, "Form"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FieldProps, "Field"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FileInputProps, "FileInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").InputProps, "Input"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").DropdownProps, "Dropdown"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SelectorProps, "Selector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoldProps, "Bold"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ItalicProps, "Italic"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AvatarProps, "Avatar"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressProps, "Address"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoxProps, "Box"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CardProps, "Card"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ContainerProps, "Container"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CopyableProps, "Copyable"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Divider"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").LinkProps, "Link"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").RowProps, "Row"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SectionProps, "Section"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Spinner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TextProps, "Text"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TooltipProps, "Tooltip"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BannerProps, "Banner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SkeletonProps, "Skeleton"> | {
|
|
104
|
-
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
103
|
+
ui: import("@metamask/superstruct").Struct<import("@metamask/snaps-sdk").Panel | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AssetSelectorProps, "AssetSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressInputProps, "AddressInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ButtonProps, "Button"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CheckboxProps, "Checkbox"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FormProps, "Form"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FieldProps, "Field"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FileInputProps, "FileInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").InputProps, "Input"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").DropdownProps, "Dropdown"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SelectorProps, "Selector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoldProps, "Bold"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ItalicProps, "Italic"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AvatarProps, "Avatar"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressProps, "Address"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoxProps, "Box"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CardProps, "Card"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ContainerProps, "Container"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CopyableProps, "Copyable"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Divider"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").LinkProps, "Link"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").RowProps, "Row"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SectionProps, "Section"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Spinner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TextProps, "Text"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TooltipProps, "Tooltip"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BannerProps, "Banner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SkeletonProps, "Skeleton"> | {
|
|
105
104
|
value: string;
|
|
105
|
+
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
106
106
|
sensitive?: boolean | undefined;
|
|
107
107
|
} | {
|
|
108
108
|
type: import("@metamask/snaps-sdk").NodeType.Divider;
|
|
109
109
|
} | {
|
|
110
|
-
type: import("@metamask/snaps-sdk").NodeType.Heading;
|
|
111
110
|
value: string;
|
|
111
|
+
type: import("@metamask/snaps-sdk").NodeType.Heading;
|
|
112
112
|
} | {
|
|
113
|
-
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
114
113
|
value: string;
|
|
114
|
+
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
115
115
|
} | {
|
|
116
116
|
type: import("@metamask/snaps-sdk").NodeType.Spinner;
|
|
117
117
|
} | {
|
|
118
|
-
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
119
118
|
value: string;
|
|
119
|
+
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
120
120
|
markdown?: boolean | undefined;
|
|
121
121
|
} | {
|
|
122
|
-
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
123
122
|
value: `0x${string}`;
|
|
123
|
+
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
124
124
|
} | {
|
|
125
|
-
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
126
125
|
value: {
|
|
127
|
-
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
128
126
|
value: string;
|
|
127
|
+
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
129
128
|
} | {
|
|
130
|
-
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
131
129
|
value: string;
|
|
130
|
+
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
132
131
|
markdown?: boolean | undefined;
|
|
133
132
|
} | {
|
|
134
|
-
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
135
133
|
value: `0x${string}`;
|
|
134
|
+
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
136
135
|
};
|
|
136
|
+
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
137
137
|
label: string;
|
|
138
|
-
variant?: "default" | "
|
|
138
|
+
variant?: "default" | "critical" | "warning" | undefined;
|
|
139
139
|
} | {
|
|
140
|
-
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
141
140
|
name: string;
|
|
142
|
-
|
|
143
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
141
|
+
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
144
142
|
value?: string | undefined;
|
|
145
143
|
label?: string | undefined;
|
|
144
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
146
145
|
placeholder?: string | undefined;
|
|
146
|
+
error?: string | undefined;
|
|
147
147
|
} | {
|
|
148
|
-
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
149
148
|
value: string;
|
|
150
|
-
|
|
149
|
+
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
151
150
|
name?: string | undefined;
|
|
151
|
+
variant?: "primary" | "secondary" | undefined;
|
|
152
152
|
buttonType?: "button" | "submit" | undefined;
|
|
153
153
|
} | {
|
|
154
|
-
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
155
154
|
name: string;
|
|
155
|
+
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
156
156
|
children: ({
|
|
157
|
-
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
158
157
|
name: string;
|
|
159
|
-
|
|
160
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
158
|
+
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
161
159
|
value?: string | undefined;
|
|
162
160
|
label?: string | undefined;
|
|
161
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
163
162
|
placeholder?: string | undefined;
|
|
163
|
+
error?: string | undefined;
|
|
164
164
|
} | {
|
|
165
|
-
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
166
165
|
value: string;
|
|
167
|
-
|
|
166
|
+
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
168
167
|
name?: string | undefined;
|
|
168
|
+
variant?: "primary" | "secondary" | undefined;
|
|
169
169
|
buttonType?: "button" | "submit" | undefined;
|
|
170
170
|
})[];
|
|
171
171
|
} | import("@metamask/snaps-sdk/jsx").SnapElement<{
|
|
@@ -12,72 +12,72 @@ export type UpdateInterfaceMethodHooks = {
|
|
|
12
12
|
export declare const updateInterfaceHandler: PermittedHandlerExport<UpdateInterfaceMethodHooks, UpdateInterfaceParameters, UpdateInterfaceResult>;
|
|
13
13
|
declare const UpdateInterfaceParametersStruct: import("@metamask/superstruct").Struct<{
|
|
14
14
|
id: string;
|
|
15
|
-
ui: import("@metamask/snaps-sdk").Panel | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ButtonProps, "Button"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CheckboxProps, "Checkbox"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FormProps, "Form"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FieldProps, "Field"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FileInputProps, "FileInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").InputProps, "Input"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").DropdownProps, "Dropdown"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SelectorProps, "Selector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoldProps, "Bold"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ItalicProps, "Italic"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AvatarProps, "Avatar"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressProps, "Address"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoxProps, "Box"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CardProps, "Card"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ContainerProps, "Container"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CopyableProps, "Copyable"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Divider"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").LinkProps, "Link"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").RowProps, "Row"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SectionProps, "Section"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Spinner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TextProps, "Text"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TooltipProps, "Tooltip"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BannerProps, "Banner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SkeletonProps, "Skeleton"> | {
|
|
16
|
-
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
15
|
+
ui: import("@metamask/snaps-sdk").Panel | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AssetSelectorProps, "AssetSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressInputProps, "AddressInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ButtonProps, "Button"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CheckboxProps, "Checkbox"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FormProps, "Form"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FieldProps, "Field"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FileInputProps, "FileInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").InputProps, "Input"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").DropdownProps, "Dropdown"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SelectorProps, "Selector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoldProps, "Bold"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ItalicProps, "Italic"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AvatarProps, "Avatar"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressProps, "Address"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoxProps, "Box"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CardProps, "Card"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ContainerProps, "Container"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CopyableProps, "Copyable"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Divider"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").LinkProps, "Link"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").RowProps, "Row"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SectionProps, "Section"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Spinner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TextProps, "Text"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TooltipProps, "Tooltip"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BannerProps, "Banner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SkeletonProps, "Skeleton"> | {
|
|
17
16
|
value: string;
|
|
17
|
+
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
18
18
|
sensitive?: boolean | undefined;
|
|
19
19
|
} | {
|
|
20
20
|
type: import("@metamask/snaps-sdk").NodeType.Divider;
|
|
21
21
|
} | {
|
|
22
|
-
type: import("@metamask/snaps-sdk").NodeType.Heading;
|
|
23
22
|
value: string;
|
|
23
|
+
type: import("@metamask/snaps-sdk").NodeType.Heading;
|
|
24
24
|
} | {
|
|
25
|
-
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
26
25
|
value: string;
|
|
26
|
+
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
27
27
|
} | {
|
|
28
28
|
type: import("@metamask/snaps-sdk").NodeType.Spinner;
|
|
29
29
|
} | {
|
|
30
|
-
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
31
30
|
value: string;
|
|
31
|
+
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
32
32
|
markdown?: boolean | undefined;
|
|
33
33
|
} | {
|
|
34
|
-
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
35
34
|
value: `0x${string}`;
|
|
35
|
+
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
36
36
|
} | {
|
|
37
|
-
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
38
37
|
value: {
|
|
39
|
-
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
40
38
|
value: string;
|
|
39
|
+
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
41
40
|
} | {
|
|
42
|
-
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
43
41
|
value: string;
|
|
42
|
+
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
44
43
|
markdown?: boolean | undefined;
|
|
45
44
|
} | {
|
|
46
|
-
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
47
45
|
value: `0x${string}`;
|
|
46
|
+
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
48
47
|
};
|
|
48
|
+
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
49
49
|
label: string;
|
|
50
|
-
variant?: "default" | "
|
|
50
|
+
variant?: "default" | "critical" | "warning" | undefined;
|
|
51
51
|
} | {
|
|
52
|
-
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
53
52
|
name: string;
|
|
54
|
-
|
|
55
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
53
|
+
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
56
54
|
value?: string | undefined;
|
|
57
55
|
label?: string | undefined;
|
|
56
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
58
57
|
placeholder?: string | undefined;
|
|
58
|
+
error?: string | undefined;
|
|
59
59
|
} | {
|
|
60
|
-
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
61
60
|
value: string;
|
|
62
|
-
|
|
61
|
+
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
63
62
|
name?: string | undefined;
|
|
63
|
+
variant?: "primary" | "secondary" | undefined;
|
|
64
64
|
buttonType?: "button" | "submit" | undefined;
|
|
65
65
|
} | {
|
|
66
|
-
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
67
66
|
name: string;
|
|
67
|
+
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
68
68
|
children: ({
|
|
69
|
-
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
70
69
|
name: string;
|
|
71
|
-
|
|
72
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
70
|
+
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
73
71
|
value?: string | undefined;
|
|
74
72
|
label?: string | undefined;
|
|
73
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
75
74
|
placeholder?: string | undefined;
|
|
75
|
+
error?: string | undefined;
|
|
76
76
|
} | {
|
|
77
|
-
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
78
77
|
value: string;
|
|
79
|
-
|
|
78
|
+
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
80
79
|
name?: string | undefined;
|
|
80
|
+
variant?: "primary" | "secondary" | undefined;
|
|
81
81
|
buttonType?: "button" | "submit" | undefined;
|
|
82
82
|
})[];
|
|
83
83
|
} | import("@metamask/snaps-sdk/jsx").SnapElement<{
|
|
@@ -100,72 +100,72 @@ declare const UpdateInterfaceParametersStruct: import("@metamask/superstruct").S
|
|
|
100
100
|
context?: Record<string, import("@metamask/snaps-sdk").Json> | undefined;
|
|
101
101
|
}, {
|
|
102
102
|
id: import("@metamask/superstruct").Struct<string, null>;
|
|
103
|
-
ui: import("@metamask/superstruct").Struct<import("@metamask/snaps-sdk").Panel | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ButtonProps, "Button"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CheckboxProps, "Checkbox"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FormProps, "Form"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FieldProps, "Field"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FileInputProps, "FileInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").InputProps, "Input"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").DropdownProps, "Dropdown"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SelectorProps, "Selector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoldProps, "Bold"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ItalicProps, "Italic"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AvatarProps, "Avatar"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressProps, "Address"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoxProps, "Box"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CardProps, "Card"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ContainerProps, "Container"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CopyableProps, "Copyable"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Divider"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").LinkProps, "Link"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").RowProps, "Row"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SectionProps, "Section"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Spinner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TextProps, "Text"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TooltipProps, "Tooltip"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BannerProps, "Banner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SkeletonProps, "Skeleton"> | {
|
|
104
|
-
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
103
|
+
ui: import("@metamask/superstruct").Struct<import("@metamask/snaps-sdk").Panel | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AssetSelectorProps, "AssetSelector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressInputProps, "AddressInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ButtonProps, "Button"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CheckboxProps, "Checkbox"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FormProps, "Form"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FieldProps, "Field"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").FileInputProps, "FileInput"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").InputProps, "Input"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").DropdownProps, "Dropdown"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SelectorProps, "Selector"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoldProps, "Bold"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ItalicProps, "Italic"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AvatarProps, "Avatar"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").AddressProps, "Address"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BoxProps, "Box"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CardProps, "Card"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").ContainerProps, "Container"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").CopyableProps, "Copyable"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Divider"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").IconProps, "Icon"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").LinkProps, "Link"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").RowProps, "Row"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SectionProps, "Section"> | import("@metamask/snaps-sdk/jsx").SnapElement<Record<string, never>, "Spinner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TextProps, "Text"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").TooltipProps, "Tooltip"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").BannerProps, "Banner"> | import("@metamask/snaps-sdk/jsx").SnapElement<import("@metamask/snaps-sdk/jsx").SkeletonProps, "Skeleton"> | {
|
|
105
104
|
value: string;
|
|
105
|
+
type: import("@metamask/snaps-sdk").NodeType.Copyable;
|
|
106
106
|
sensitive?: boolean | undefined;
|
|
107
107
|
} | {
|
|
108
108
|
type: import("@metamask/snaps-sdk").NodeType.Divider;
|
|
109
109
|
} | {
|
|
110
|
-
type: import("@metamask/snaps-sdk").NodeType.Heading;
|
|
111
110
|
value: string;
|
|
111
|
+
type: import("@metamask/snaps-sdk").NodeType.Heading;
|
|
112
112
|
} | {
|
|
113
|
-
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
114
113
|
value: string;
|
|
114
|
+
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
115
115
|
} | {
|
|
116
116
|
type: import("@metamask/snaps-sdk").NodeType.Spinner;
|
|
117
117
|
} | {
|
|
118
|
-
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
119
118
|
value: string;
|
|
119
|
+
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
120
120
|
markdown?: boolean | undefined;
|
|
121
121
|
} | {
|
|
122
|
-
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
123
122
|
value: `0x${string}`;
|
|
123
|
+
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
124
124
|
} | {
|
|
125
|
-
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
126
125
|
value: {
|
|
127
|
-
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
128
126
|
value: string;
|
|
127
|
+
type: import("@metamask/snaps-sdk").NodeType.Image;
|
|
129
128
|
} | {
|
|
130
|
-
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
131
129
|
value: string;
|
|
130
|
+
type: import("@metamask/snaps-sdk").NodeType.Text;
|
|
132
131
|
markdown?: boolean | undefined;
|
|
133
132
|
} | {
|
|
134
|
-
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
135
133
|
value: `0x${string}`;
|
|
134
|
+
type: import("@metamask/snaps-sdk").NodeType.Address;
|
|
136
135
|
};
|
|
136
|
+
type: import("@metamask/snaps-sdk").NodeType.Row;
|
|
137
137
|
label: string;
|
|
138
|
-
variant?: "default" | "
|
|
138
|
+
variant?: "default" | "critical" | "warning" | undefined;
|
|
139
139
|
} | {
|
|
140
|
-
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
141
140
|
name: string;
|
|
142
|
-
|
|
143
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
141
|
+
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
144
142
|
value?: string | undefined;
|
|
145
143
|
label?: string | undefined;
|
|
144
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
146
145
|
placeholder?: string | undefined;
|
|
146
|
+
error?: string | undefined;
|
|
147
147
|
} | {
|
|
148
|
-
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
149
148
|
value: string;
|
|
150
|
-
|
|
149
|
+
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
151
150
|
name?: string | undefined;
|
|
151
|
+
variant?: "primary" | "secondary" | undefined;
|
|
152
152
|
buttonType?: "button" | "submit" | undefined;
|
|
153
153
|
} | {
|
|
154
|
-
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
155
154
|
name: string;
|
|
155
|
+
type: import("@metamask/snaps-sdk").NodeType.Form;
|
|
156
156
|
children: ({
|
|
157
|
-
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
158
157
|
name: string;
|
|
159
|
-
|
|
160
|
-
inputType?: "number" | "text" | "password" | undefined;
|
|
158
|
+
type: import("@metamask/snaps-sdk").NodeType.Input;
|
|
161
159
|
value?: string | undefined;
|
|
162
160
|
label?: string | undefined;
|
|
161
|
+
inputType?: "number" | "text" | "password" | undefined;
|
|
163
162
|
placeholder?: string | undefined;
|
|
163
|
+
error?: string | undefined;
|
|
164
164
|
} | {
|
|
165
|
-
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
166
165
|
value: string;
|
|
167
|
-
|
|
166
|
+
type: import("@metamask/snaps-sdk").NodeType.Button;
|
|
168
167
|
name?: string | undefined;
|
|
168
|
+
variant?: "primary" | "secondary" | undefined;
|
|
169
169
|
buttonType?: "button" | "submit" | undefined;
|
|
170
170
|
})[];
|
|
171
171
|
} | import("@metamask/snaps-sdk/jsx").SnapElement<{
|