@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,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkRIALLTR7js = require('./chunk-RIALLTR7.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
var _chunkAYJK7MSHjs = require('./chunk-AYJK7MSH.js');
|
|
@@ -38,7 +38,7 @@ var buildSnapEndowmentSpecifications = (excludedEndowments) => Object.values(_ch
|
|
|
38
38
|
}
|
|
39
39
|
return allSpecifications;
|
|
40
40
|
}, {});
|
|
41
|
-
var buildSnapRestrictedMethodSpecifications = (excludedPermissions, hooks) => Object.values(
|
|
41
|
+
var buildSnapRestrictedMethodSpecifications = (excludedPermissions, hooks) => Object.values(_chunkRIALLTR7js.restrictedMethodPermissionBuilders).reduce((specifications, { targetName, specificationBuilder, methodHooks }) => {
|
|
42
42
|
if (!excludedPermissions.includes(targetName)) {
|
|
43
43
|
specifications[targetName] = specificationBuilder({
|
|
44
44
|
// @ts-expect-error The selectHooks type is wonky
|
|
@@ -56,4 +56,4 @@ var buildSnapRestrictedMethodSpecifications = (excludedPermissions, hooks) => Ob
|
|
|
56
56
|
|
|
57
57
|
|
|
58
58
|
exports.processSnapPermissions = processSnapPermissions; exports.buildSnapEndowmentSpecifications = buildSnapEndowmentSpecifications; exports.buildSnapRestrictedMethodSpecifications = buildSnapRestrictedMethodSpecifications;
|
|
59
|
-
//# sourceMappingURL=chunk-
|
|
59
|
+
//# sourceMappingURL=chunk-RX7WZZ32.js.map
|
|
@@ -11,7 +11,7 @@ var createInterfaceHandler = {
|
|
|
11
11
|
hookNames
|
|
12
12
|
};
|
|
13
13
|
var CreateInterfaceParametersStruct = _superstruct.object.call(void 0, {
|
|
14
|
-
ui: _snapssdk.
|
|
14
|
+
ui: _snapssdk.ComponentOrElementStruct
|
|
15
15
|
});
|
|
16
16
|
async function getCreateInterfaceImplementation(req, res, _next, end, { createInterface }) {
|
|
17
17
|
const { params } = req;
|
|
@@ -40,4 +40,4 @@ function getValidatedParams(params) {
|
|
|
40
40
|
|
|
41
41
|
|
|
42
42
|
exports.createInterfaceHandler = createInterfaceHandler;
|
|
43
|
-
//# sourceMappingURL=chunk-
|
|
43
|
+
//# sourceMappingURL=chunk-UDB4MUXI.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/permitted/createInterface.ts"],"names":[],"mappings":";AAEA,SAAS,iBAAiB;AAO1B,SAAS,gCAAgC;AAGzC,SAAS,aAAa,QAAQ,cAAc;AAI5C,IAAM,YAA2D;AAAA,EAC/D,iBAAiB;AACnB;AAUO,IAAM,yBAIT;AAAA,EACF,aAAa,CAAC,sBAAsB;AAAA,EACpC,gBAAgB;AAAA,EAChB;AACF;AAEA,IAAM,kCAAkC,OAAO;AAAA,EAC7C,IAAI;AACN,CAAC;AAmBD,eAAe,iCACb,KACA,KACA,OACA,KACA,EAAE,gBAAgB,GACH;AACf,QAAM,EAAE,OAAO,IAAI;AAEnB,MAAI;AACF,UAAM,kBAAkB,mBAAmB,MAAM;AAEjD,UAAM,EAAE,GAAG,IAAI;AAEf,QAAI,SAAS,MAAM,gBAAgB,EAAE;AAAA,EACvC,SAAS,OAAO;AACd,WAAO,IAAI,KAAK;AAAA,EAClB;AAEA,SAAO,IAAI;AACb;AASA,SAAS,mBAAmB,QAA4C;AACtE,MAAI;AACF,WAAO,OAAO,QAAQ,+BAA+B;AAAA,EACvD,SAAS,OAAO;AACd,QAAI,iBAAiB,aAAa;AAChC,YAAM,UAAU,cAAc;AAAA,QAC5B,SAAS,mBAAmB,MAAM,OAAO;AAAA,MAC3C,CAAC;AAAA,IACH;AAEA,UAAM,UAAU,SAAS;AAAA,EAC3B;AACF","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 CreateInterfaceParams,\n CreateInterfaceResult,\n JsonRpcRequest,\n ComponentOrElement,\n} from '@metamask/snaps-sdk';\nimport { ComponentOrElementStruct } from '@metamask/snaps-sdk';\nimport { type InferMatching } from '@metamask/snaps-utils';\nimport type { PendingJsonRpcResponse } from '@metamask/utils';\nimport { StructError, create, object } from 'superstruct';\n\nimport type { MethodHooksObject } from '../utils';\n\nconst hookNames: MethodHooksObject<CreateInterfaceMethodHooks> = {\n createInterface: true,\n};\n\nexport type CreateInterfaceMethodHooks = {\n /**\n * @param ui - The UI components.\n * @returns The unique identifier of the interface.\n */\n createInterface: (ui: ComponentOrElement) => Promise<string>;\n};\n\nexport const createInterfaceHandler: PermittedHandlerExport<\n CreateInterfaceMethodHooks,\n CreateInterfaceParameters,\n CreateInterfaceResult\n> = {\n methodNames: ['snap_createInterface'],\n implementation: getCreateInterfaceImplementation,\n hookNames,\n};\n\nconst CreateInterfaceParametersStruct = object({\n ui: ComponentOrElementStruct,\n});\n\nexport type CreateInterfaceParameters = InferMatching<\n typeof CreateInterfaceParametersStruct,\n CreateInterfaceParams\n>;\n\n/**\n * The `snap_createInterface` method implementation.\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\n * function.\n * @param end - The `json-rpc-engine` \"end\" callback.\n * @param hooks - The RPC method hooks.\n * @param hooks.createInterface - The function to create the interface.\n * @returns Nothing.\n */\nasync function getCreateInterfaceImplementation(\n req: JsonRpcRequest<CreateInterfaceParameters>,\n res: PendingJsonRpcResponse<CreateInterfaceResult>,\n _next: unknown,\n end: JsonRpcEngineEndCallback,\n { createInterface }: CreateInterfaceMethodHooks,\n): Promise<void> {\n const { params } = req;\n\n try {\n const validatedParams = getValidatedParams(params);\n\n const { ui } = validatedParams;\n\n res.result = await createInterface(ui);\n } catch (error) {\n return end(error);\n }\n\n return end();\n}\n\n/**\n * Validate the createInterface method `params` and returns them cast to the correct\n * type. Throws if validation fails.\n *\n * @param params - The unvalidated params object from the method request.\n * @returns The validated createInterface method parameter object.\n */\nfunction getValidatedParams(params: unknown): CreateInterfaceParameters {\n try {\n return create(params, CreateInterfaceParametersStruct);\n } catch (error) {\n if (error instanceof StructError) {\n throw rpcErrors.invalidParams({\n message: `Invalid params: ${error.message}.`,\n });\n }\n /* istanbul ignore next */\n throw rpcErrors.internal();\n }\n}\n"]}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
methodHandlers
|
|
3
|
-
} from "./chunk-
|
|
3
|
+
} from "./chunk-3W4SMZFD.mjs";
|
|
4
4
|
import {
|
|
5
5
|
selectHooks
|
|
6
6
|
} from "./chunk-SGQXD5K7.mjs";
|
|
@@ -36,4 +36,4 @@ function createSnapsMethodMiddleware(isSnap, hooks) {
|
|
|
36
36
|
export {
|
|
37
37
|
createSnapsMethodMiddleware
|
|
38
38
|
};
|
|
39
|
-
//# sourceMappingURL=chunk-
|
|
39
|
+
//# sourceMappingURL=chunk-VNH2GKLV.mjs.map
|
|
@@ -3,9 +3,9 @@ import { PermissionType, SubjectType } from "@metamask/permission-controller";
|
|
|
3
3
|
import { rpcErrors } from "@metamask/rpc-errors";
|
|
4
4
|
import {
|
|
5
5
|
DialogType,
|
|
6
|
-
ComponentStruct,
|
|
7
6
|
enumValue,
|
|
8
|
-
union
|
|
7
|
+
union,
|
|
8
|
+
ComponentOrElementStruct
|
|
9
9
|
} from "@metamask/snaps-sdk";
|
|
10
10
|
import { createUnion } from "@metamask/snaps-utils";
|
|
11
11
|
import { hasProperty } from "@metamask/utils";
|
|
@@ -47,7 +47,7 @@ var BaseParamsStruct = type({
|
|
|
47
47
|
});
|
|
48
48
|
var AlertParametersWithContentStruct = object({
|
|
49
49
|
type: enumValue(DialogType.Alert),
|
|
50
|
-
content:
|
|
50
|
+
content: ComponentOrElementStruct
|
|
51
51
|
});
|
|
52
52
|
var AlertParametersWithIdStruct = object({
|
|
53
53
|
type: enumValue(DialogType.Alert),
|
|
@@ -59,7 +59,7 @@ var AlertParametersStruct = union([
|
|
|
59
59
|
]);
|
|
60
60
|
var ConfirmationParametersWithContentStruct = object({
|
|
61
61
|
type: enumValue(DialogType.Confirmation),
|
|
62
|
-
content:
|
|
62
|
+
content: ComponentOrElementStruct
|
|
63
63
|
});
|
|
64
64
|
var ConfirmationParametersWithIdStruct = object({
|
|
65
65
|
type: enumValue(DialogType.Confirmation),
|
|
@@ -71,7 +71,7 @@ var ConfirmationParametersStruct = union([
|
|
|
71
71
|
]);
|
|
72
72
|
var PromptParametersWithContentStruct = object({
|
|
73
73
|
type: enumValue(DialogType.Prompt),
|
|
74
|
-
content:
|
|
74
|
+
content: ComponentOrElementStruct,
|
|
75
75
|
placeholder: PlaceholderStruct
|
|
76
76
|
});
|
|
77
77
|
var PromptParametersWithIdStruct = object({
|
|
@@ -148,4 +148,4 @@ export {
|
|
|
148
148
|
dialogBuilder,
|
|
149
149
|
getDialogImplementation
|
|
150
150
|
};
|
|
151
|
-
//# sourceMappingURL=chunk-
|
|
151
|
+
//# sourceMappingURL=chunk-X247BMMW.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/restricted/dialog.ts"],"sourcesContent":["import type {\n PermissionSpecificationBuilder,\n RestrictedMethodOptions,\n ValidPermissionSpecification,\n} from '@metamask/permission-controller';\nimport { PermissionType, SubjectType } from '@metamask/permission-controller';\nimport { rpcErrors } from '@metamask/rpc-errors';\nimport {\n DialogType,\n enumValue,\n union,\n ComponentOrElementStruct,\n} from '@metamask/snaps-sdk';\nimport type {\n DialogParams,\n EnumToUnion,\n Component,\n InterfaceState,\n SnapId,\n ComponentOrElement,\n} from '@metamask/snaps-sdk';\nimport { createUnion } from '@metamask/snaps-utils';\nimport type { InferMatching } from '@metamask/snaps-utils';\nimport { hasProperty, type NonEmptyArray } from '@metamask/utils';\nimport type { Infer, Struct } from 'superstruct';\nimport {\n create,\n enums,\n object,\n optional,\n size,\n string,\n type,\n} from 'superstruct';\n\nimport { type MethodHooksObject } from '../utils';\n\nconst methodName = 'snap_dialog';\n\nconst PlaceholderStruct = optional(size(string(), 1, 40));\n\nexport type Placeholder = Infer<typeof PlaceholderStruct>;\n\ntype ShowDialog = (\n snapId: string,\n type: EnumToUnion<DialogType>,\n id: string,\n placeholder?: Placeholder,\n) => Promise<null | boolean | string>;\n\ntype CreateInterface = (\n snapId: string,\n content: ComponentOrElement,\n) => Promise<string>;\n\ntype GetInterface = (\n snapId: string,\n id: string,\n) => { content: ComponentOrElement; snapId: SnapId; state: InterfaceState };\n\nexport type DialogMethodHooks = {\n /**\n * @param snapId - The ID of the Snap that created the alert.\n * @param type - The dialog type.\n * @param id - The interface ID.\n * @param placeholder - The placeholder for the Prompt dialog input.\n */\n showDialog: ShowDialog;\n\n /**\n * @param snapId - The Snap ID creating the interface.\n * @param content - The content of the interface.\n */\n createInterface: CreateInterface;\n /**\n * @param snapId - The SnapId requesting the interface.\n * @param id - The interface ID.\n */\n getInterface: GetInterface;\n};\n\ntype DialogSpecificationBuilderOptions = {\n allowedCaveats?: Readonly<NonEmptyArray<string>> | null;\n methodHooks: DialogMethodHooks;\n};\n\ntype DialogSpecification = ValidPermissionSpecification<{\n permissionType: PermissionType.RestrictedMethod;\n targetName: typeof methodName;\n methodImplementation: ReturnType<typeof getDialogImplementation>;\n allowedCaveats: Readonly<NonEmptyArray<string>> | null;\n}>;\n\n/**\n * The specification builder for the `snap_dialog` permission. `snap_dialog`\n * lets the Snap display one of the following dialogs to the user:\n * - An alert, for displaying information.\n * - A confirmation, for accepting or rejecting some action.\n * - A prompt, for inputting some information.\n *\n * @param options - The specification builder options.\n * @param options.allowedCaveats - The optional allowed caveats for the\n * permission.\n * @param options.methodHooks - The RPC method hooks needed by the method\n * implementation.\n * @returns The specification for the `snap_dialog` permission.\n */\nconst specificationBuilder: PermissionSpecificationBuilder<\n PermissionType.RestrictedMethod,\n DialogSpecificationBuilderOptions,\n DialogSpecification\n> = ({\n allowedCaveats = null,\n methodHooks,\n}: DialogSpecificationBuilderOptions) => {\n return {\n permissionType: PermissionType.RestrictedMethod,\n targetName: methodName,\n allowedCaveats,\n methodImplementation: getDialogImplementation(methodHooks),\n subjectTypes: [SubjectType.Snap],\n };\n};\n\nconst methodHooks: MethodHooksObject<DialogMethodHooks> = {\n showDialog: true,\n createInterface: true,\n getInterface: true,\n};\n\nexport const dialogBuilder = Object.freeze({\n targetName: methodName,\n specificationBuilder,\n methodHooks,\n} as const);\n\n// Note: We use `type` here instead of `object` because `type` does not validate\n// the keys of the object, which is what we want.\nconst BaseParamsStruct = type({\n type: enums([DialogType.Alert, DialogType.Confirmation, DialogType.Prompt]),\n});\n\nconst AlertParametersWithContentStruct = object({\n type: enumValue(DialogType.Alert),\n content: ComponentOrElementStruct,\n});\nconst AlertParametersWithIdStruct = object({\n type: enumValue(DialogType.Alert),\n id: string(),\n});\n\nconst AlertParametersStruct = union([\n AlertParametersWithContentStruct,\n AlertParametersWithIdStruct,\n]);\n\nconst ConfirmationParametersWithContentStruct = object({\n type: enumValue(DialogType.Confirmation),\n content: ComponentOrElementStruct,\n});\n\nconst ConfirmationParametersWithIdStruct = object({\n type: enumValue(DialogType.Confirmation),\n id: string(),\n});\n\nconst ConfirmationParametersStruct = union([\n ConfirmationParametersWithContentStruct,\n ConfirmationParametersWithIdStruct,\n]);\n\nconst PromptParametersWithContentStruct = object({\n type: enumValue(DialogType.Prompt),\n content: ComponentOrElementStruct,\n placeholder: PlaceholderStruct,\n});\n\nconst PromptParametersWithIdStruct = object({\n type: enumValue(DialogType.Prompt),\n id: string(),\n placeholder: PlaceholderStruct,\n});\n\nconst PromptParametersStruct = union([\n PromptParametersWithContentStruct,\n PromptParametersWithIdStruct,\n]);\n\nconst DialogParametersStruct = union([\n AlertParametersStruct,\n ConfirmationParametersStruct,\n PromptParametersStruct,\n]);\n\nexport type DialogParameters = InferMatching<\n typeof DialogParametersStruct,\n DialogParams\n>;\n\nconst structs = {\n [DialogType.Alert]: AlertParametersStruct,\n [DialogType.Confirmation]: ConfirmationParametersStruct,\n [DialogType.Prompt]: PromptParametersStruct,\n};\n\n/**\n * Builds the method implementation for `snap_dialog`.\n *\n * @param hooks - The RPC method hooks.\n * @param hooks.showDialog - A function that shows the specified dialog in the\n * MetaMask UI and returns the appropriate value for the dialog type.\n * @param hooks.createInterface - A function that creates the interface in SnapInterfaceController.\n * @param hooks.getInterface - A function that gets an interface from SnapInterfaceController.\n * @returns The method implementation which return value depends on the dialog\n * type, valid return types are: string, boolean, null.\n */\nexport function getDialogImplementation({\n showDialog,\n createInterface,\n getInterface,\n}: DialogMethodHooks) {\n return async function dialogImplementation(\n args: RestrictedMethodOptions<DialogParameters>,\n ): Promise<boolean | null | string> {\n const {\n params,\n context: { origin },\n } = args;\n\n const validatedType = getValidatedType(params);\n const validatedParams = getValidatedParams(params, structs[validatedType]);\n\n const placeholder =\n validatedParams.type === DialogType.Prompt\n ? validatedParams.placeholder\n : undefined;\n\n if (hasProperty(validatedParams, 'content')) {\n const id = await createInterface(\n origin,\n validatedParams.content as Component,\n );\n return showDialog(origin, validatedType, id, placeholder);\n }\n\n // Verify that the passed interface ID is valid.\n // This will throw if the interface ID is invalid (not created by the snap or doesn't exist)\n try {\n getInterface(origin, validatedParams.id);\n } catch (error) {\n throw rpcErrors.invalidParams({\n message: `Invalid params: ${error.message}`,\n });\n }\n\n return showDialog(origin, validatedType, validatedParams.id, placeholder);\n };\n}\n\n/**\n * Get the validated type of the dialog parameters. Throws an error if the type\n * is invalid.\n *\n * @param params - The parameters to validate.\n * @returns The validated type of the dialog parameters.\n */\nfunction getValidatedType(params: unknown): DialogType {\n try {\n return create(params, BaseParamsStruct).type;\n } catch (error) {\n throw rpcErrors.invalidParams({\n message: `The \"type\" property must be one of: ${Object.values(\n DialogType,\n ).join(', ')}.`,\n });\n }\n}\n\n/**\n * Validates the confirm method `params` and returns them cast to the correct\n * type. Throws if validation fails.\n *\n * @param params - The unvalidated params object from the method request.\n * @param struct - The struct to validate the params against.\n * @returns The validated confirm method parameter object.\n */\nfunction getValidatedParams(\n params: unknown,\n struct: Struct<any, any>,\n): DialogParameters {\n try {\n return createUnion(params, struct, 'type');\n } catch (error) {\n throw rpcErrors.invalidParams({\n message: `Invalid params: ${error.message}`,\n });\n }\n}\n"],"mappings":"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","names":["methodHooks"]}
|
package/dist/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('./chunk-7TVJV425.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkGP6TDVNTjs = require('./chunk-GP6TDVNT.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
|
-
var
|
|
7
|
+
var _chunkINB4AX37js = require('./chunk-INB4AX37.js');
|
|
8
8
|
require('./chunk-AOWUGDER.js');
|
|
9
9
|
require('./chunk-IDZGMGIB.js');
|
|
10
10
|
require('./chunk-PS6OEQXL.js');
|
|
11
|
-
require('./chunk-
|
|
12
|
-
require('./chunk-
|
|
11
|
+
require('./chunk-D5WQBUZB.js');
|
|
12
|
+
require('./chunk-UDB4MUXI.js');
|
|
13
13
|
require('./chunk-4LSOS7SM.js');
|
|
14
14
|
require('./chunk-3UAWEHMF.js');
|
|
15
15
|
require('./chunk-NP3KGMVC.js');
|
|
@@ -19,10 +19,10 @@ require('./chunk-NWT2EXFD.js');
|
|
|
19
19
|
|
|
20
20
|
|
|
21
21
|
|
|
22
|
-
var
|
|
22
|
+
var _chunkRX7WZZ32js = require('./chunk-RX7WZZ32.js');
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
var
|
|
25
|
+
var _chunkRIALLTR7js = require('./chunk-RIALLTR7.js');
|
|
26
26
|
|
|
27
27
|
|
|
28
28
|
|
|
@@ -36,9 +36,9 @@ require('./chunk-SYUGPLEP.js');
|
|
|
36
36
|
require('./chunk-P74WXDY4.js');
|
|
37
37
|
|
|
38
38
|
|
|
39
|
-
var
|
|
39
|
+
var _chunkR2M4YLJ7js = require('./chunk-R2M4YLJ7.js');
|
|
40
40
|
require('./chunk-QDZAWH6F.js');
|
|
41
|
-
require('./chunk-
|
|
41
|
+
require('./chunk-I7DR6BFO.js');
|
|
42
42
|
require('./chunk-S7AR3ROH.js');
|
|
43
43
|
require('./chunk-LGUJMQC7.js');
|
|
44
44
|
|
|
@@ -114,5 +114,5 @@ var _snapsutils = require('@metamask/snaps-utils');
|
|
|
114
114
|
|
|
115
115
|
|
|
116
116
|
|
|
117
|
-
exports.SnapCaveatType = _snapsutils.SnapCaveatType; exports.SnapEndowments = _chunkYGKFOOWIjs.SnapEndowments; exports.WALLET_SNAP_PERMISSION_KEY = _chunkFFHVA6PPjs.WALLET_SNAP_PERMISSION_KEY; exports.buildSnapEndowmentSpecifications =
|
|
117
|
+
exports.SnapCaveatType = _snapsutils.SnapCaveatType; exports.SnapEndowments = _chunkYGKFOOWIjs.SnapEndowments; exports.WALLET_SNAP_PERMISSION_KEY = _chunkFFHVA6PPjs.WALLET_SNAP_PERMISSION_KEY; exports.buildSnapEndowmentSpecifications = _chunkRX7WZZ32js.buildSnapEndowmentSpecifications; exports.buildSnapRestrictedMethodSpecifications = _chunkRX7WZZ32js.buildSnapRestrictedMethodSpecifications; exports.caveatMappers = _chunkAYJK7MSHjs.caveatMappers; exports.caveatSpecifications = _chunkAYJK7MSHjs.caveatSpecifications; exports.createSnapsMethodMiddleware = _chunkGP6TDVNTjs.createSnapsMethodMiddleware; exports.endowmentCaveatMappers = _chunkJRSPKOFGjs.endowmentCaveatMappers; exports.endowmentCaveatSpecifications = _chunkJRSPKOFGjs.endowmentCaveatSpecifications; exports.endowmentPermissionBuilders = _chunkJRSPKOFGjs.endowmentPermissionBuilders; exports.getChainIdsCaveat = _chunkIEUCBULUjs.getChainIdsCaveat; exports.getCronjobCaveatJobs = _chunkOQOTJFFVjs.getCronjobCaveatJobs; exports.getEncryptionEntropy = _chunkR2M4YLJ7js.getEncryptionEntropy; exports.getKeyringCaveatOrigins = _chunkPWUEAR4Hjs.getKeyringCaveatOrigins; exports.getLookupMatchersCaveat = _chunkIEUCBULUjs.getLookupMatchersCaveat; exports.getMaxRequestTimeCaveat = _chunkFCVWU5XHjs.getMaxRequestTimeCaveat; exports.getRpcCaveatOrigins = _chunkLIWV3FMYjs.getRpcCaveatOrigins; exports.getSignatureOriginCaveat = _chunkTEXEQGNZjs.getSignatureOriginCaveat; exports.getTransactionOriginCaveat = _chunk6TKD32TSjs.getTransactionOriginCaveat; exports.handlerEndowments = _chunkJRSPKOFGjs.handlerEndowments; exports.permittedMethods = _chunkINB4AX37js.handlers; exports.processSnapPermissions = _chunkRX7WZZ32js.processSnapPermissions; exports.restrictedMethodPermissionBuilders = _chunkRIALLTR7js.restrictedMethodPermissionBuilders; exports.selectHooks = _chunkYG7W4CDTjs.selectHooks;
|
|
118
118
|
//# sourceMappingURL=index.js.map
|
package/dist/index.mjs
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
import "./chunk-TNENASGX.mjs";
|
|
2
2
|
import {
|
|
3
3
|
createSnapsMethodMiddleware
|
|
4
|
-
} from "./chunk-
|
|
4
|
+
} from "./chunk-VNH2GKLV.mjs";
|
|
5
5
|
import {
|
|
6
6
|
handlers
|
|
7
|
-
} from "./chunk-
|
|
7
|
+
} from "./chunk-3W4SMZFD.mjs";
|
|
8
8
|
import "./chunk-TKXU7ZXP.mjs";
|
|
9
9
|
import "./chunk-MXCJWR45.mjs";
|
|
10
10
|
import "./chunk-MXPVC2XP.mjs";
|
|
11
|
-
import "./chunk-
|
|
12
|
-
import "./chunk-
|
|
11
|
+
import "./chunk-GVJLWGSI.mjs";
|
|
12
|
+
import "./chunk-634BK2VP.mjs";
|
|
13
13
|
import "./chunk-UB3733UY.mjs";
|
|
14
14
|
import "./chunk-62URQ5VS.mjs";
|
|
15
15
|
import "./chunk-I6FU5MGE.mjs";
|
|
@@ -19,10 +19,10 @@ import {
|
|
|
19
19
|
buildSnapEndowmentSpecifications,
|
|
20
20
|
buildSnapRestrictedMethodSpecifications,
|
|
21
21
|
processSnapPermissions
|
|
22
|
-
} from "./chunk-
|
|
22
|
+
} from "./chunk-L675SYPP.mjs";
|
|
23
23
|
import {
|
|
24
24
|
restrictedMethodPermissionBuilders
|
|
25
|
-
} from "./chunk-
|
|
25
|
+
} from "./chunk-PG32JMWC.mjs";
|
|
26
26
|
import {
|
|
27
27
|
caveatMappers,
|
|
28
28
|
caveatSpecifications
|
|
@@ -35,10 +35,10 @@ import "./chunk-IBV23QOX.mjs";
|
|
|
35
35
|
import "./chunk-IZYMBIBD.mjs";
|
|
36
36
|
import "./chunk-E6WUMFQT.mjs";
|
|
37
37
|
import {
|
|
38
|
-
|
|
39
|
-
} from "./chunk-
|
|
38
|
+
getEncryptionEntropy
|
|
39
|
+
} from "./chunk-NESDQ4PF.mjs";
|
|
40
40
|
import "./chunk-JWDQUKKU.mjs";
|
|
41
|
-
import "./chunk-
|
|
41
|
+
import "./chunk-X247BMMW.mjs";
|
|
42
42
|
import "./chunk-TNRH2LRU.mjs";
|
|
43
43
|
import "./chunk-6WUIFFMQ.mjs";
|
|
44
44
|
import {
|
|
@@ -102,7 +102,7 @@ export {
|
|
|
102
102
|
endowmentPermissionBuilders,
|
|
103
103
|
getChainIdsCaveat,
|
|
104
104
|
getCronjobCaveatJobs,
|
|
105
|
-
|
|
105
|
+
getEncryptionEntropy,
|
|
106
106
|
getKeyringCaveatOrigins,
|
|
107
107
|
getLookupMatchersCaveat,
|
|
108
108
|
getMaxRequestTimeCaveat,
|
package/dist/permissions.js
CHANGED
|
@@ -2,8 +2,8 @@
|
|
|
2
2
|
|
|
3
3
|
|
|
4
4
|
|
|
5
|
-
var
|
|
6
|
-
require('./chunk-
|
|
5
|
+
var _chunkRX7WZZ32js = require('./chunk-RX7WZZ32.js');
|
|
6
|
+
require('./chunk-RIALLTR7.js');
|
|
7
7
|
require('./chunk-AYJK7MSH.js');
|
|
8
8
|
require('./chunk-2KTJCF3C.js');
|
|
9
9
|
require('./chunk-VHY3NATP.js');
|
|
@@ -12,9 +12,9 @@ require('./chunk-VUA6ICJO.js');
|
|
|
12
12
|
require('./chunk-Q5W3YGEB.js');
|
|
13
13
|
require('./chunk-SYUGPLEP.js');
|
|
14
14
|
require('./chunk-P74WXDY4.js');
|
|
15
|
-
require('./chunk-
|
|
15
|
+
require('./chunk-R2M4YLJ7.js');
|
|
16
16
|
require('./chunk-QDZAWH6F.js');
|
|
17
|
-
require('./chunk-
|
|
17
|
+
require('./chunk-I7DR6BFO.js');
|
|
18
18
|
require('./chunk-S7AR3ROH.js');
|
|
19
19
|
require('./chunk-LGUJMQC7.js');
|
|
20
20
|
require('./chunk-FFHVA6PP.js');
|
|
@@ -39,5 +39,5 @@ require('./chunk-YGKFOOWI.js');
|
|
|
39
39
|
|
|
40
40
|
|
|
41
41
|
|
|
42
|
-
exports.buildSnapEndowmentSpecifications =
|
|
42
|
+
exports.buildSnapEndowmentSpecifications = _chunkRX7WZZ32js.buildSnapEndowmentSpecifications; exports.buildSnapRestrictedMethodSpecifications = _chunkRX7WZZ32js.buildSnapRestrictedMethodSpecifications; exports.processSnapPermissions = _chunkRX7WZZ32js.processSnapPermissions;
|
|
43
43
|
//# sourceMappingURL=permissions.js.map
|
package/dist/permissions.mjs
CHANGED
|
@@ -2,8 +2,8 @@ import {
|
|
|
2
2
|
buildSnapEndowmentSpecifications,
|
|
3
3
|
buildSnapRestrictedMethodSpecifications,
|
|
4
4
|
processSnapPermissions
|
|
5
|
-
} from "./chunk-
|
|
6
|
-
import "./chunk-
|
|
5
|
+
} from "./chunk-L675SYPP.mjs";
|
|
6
|
+
import "./chunk-PG32JMWC.mjs";
|
|
7
7
|
import "./chunk-Y4LNTDZ2.mjs";
|
|
8
8
|
import "./chunk-EKXDFYIX.mjs";
|
|
9
9
|
import "./chunk-WFAY5FPP.mjs";
|
|
@@ -12,9 +12,9 @@ import "./chunk-LR7UR4YU.mjs";
|
|
|
12
12
|
import "./chunk-IBV23QOX.mjs";
|
|
13
13
|
import "./chunk-IZYMBIBD.mjs";
|
|
14
14
|
import "./chunk-E6WUMFQT.mjs";
|
|
15
|
-
import "./chunk-
|
|
15
|
+
import "./chunk-NESDQ4PF.mjs";
|
|
16
16
|
import "./chunk-JWDQUKKU.mjs";
|
|
17
|
-
import "./chunk-
|
|
17
|
+
import "./chunk-X247BMMW.mjs";
|
|
18
18
|
import "./chunk-TNRH2LRU.mjs";
|
|
19
19
|
import "./chunk-6WUIFFMQ.mjs";
|
|
20
20
|
import "./chunk-VVBTXSID.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkUDB4MUXIjs = require('../chunk-UDB4MUXI.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.createInterfaceHandler =
|
|
6
|
+
exports.createInterfaceHandler = _chunkUDB4MUXIjs.createInterfaceHandler;
|
|
7
7
|
//# sourceMappingURL=createInterface.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkINB4AX37js = require('../chunk-INB4AX37.js');
|
|
5
5
|
require('../chunk-AOWUGDER.js');
|
|
6
6
|
require('../chunk-IDZGMGIB.js');
|
|
7
7
|
require('../chunk-PS6OEQXL.js');
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-D5WQBUZB.js');
|
|
9
|
+
require('../chunk-UDB4MUXI.js');
|
|
10
10
|
require('../chunk-4LSOS7SM.js');
|
|
11
11
|
require('../chunk-3UAWEHMF.js');
|
|
12
12
|
require('../chunk-NP3KGMVC.js');
|
|
@@ -16,5 +16,5 @@ require('../chunk-FFHVA6PP.js');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.handlers =
|
|
19
|
+
exports.handlers = _chunkINB4AX37js.handlers; exports.methodHandlers = _chunkINB4AX37js.methodHandlers;
|
|
20
20
|
//# sourceMappingURL=handlers.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
handlers,
|
|
3
3
|
methodHandlers
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-3W4SMZFD.mjs";
|
|
5
5
|
import "../chunk-TKXU7ZXP.mjs";
|
|
6
6
|
import "../chunk-MXCJWR45.mjs";
|
|
7
7
|
import "../chunk-MXPVC2XP.mjs";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-GVJLWGSI.mjs";
|
|
9
|
+
import "../chunk-634BK2VP.mjs";
|
|
10
10
|
import "../chunk-UB3733UY.mjs";
|
|
11
11
|
import "../chunk-62URQ5VS.mjs";
|
|
12
12
|
import "../chunk-I6FU5MGE.mjs";
|
package/dist/permitted/index.js
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});require('../chunk-7TVJV425.js');
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkGP6TDVNTjs = require('../chunk-GP6TDVNT.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
var
|
|
8
|
+
var _chunkINB4AX37js = require('../chunk-INB4AX37.js');
|
|
9
9
|
require('../chunk-AOWUGDER.js');
|
|
10
10
|
require('../chunk-IDZGMGIB.js');
|
|
11
11
|
require('../chunk-PS6OEQXL.js');
|
|
12
|
-
require('../chunk-
|
|
13
|
-
require('../chunk-
|
|
12
|
+
require('../chunk-D5WQBUZB.js');
|
|
13
|
+
require('../chunk-UDB4MUXI.js');
|
|
14
14
|
require('../chunk-4LSOS7SM.js');
|
|
15
15
|
require('../chunk-3UAWEHMF.js');
|
|
16
16
|
require('../chunk-NP3KGMVC.js');
|
|
@@ -22,5 +22,5 @@ require('../chunk-YG7W4CDT.js');
|
|
|
22
22
|
|
|
23
23
|
|
|
24
24
|
|
|
25
|
-
exports.createSnapsMethodMiddleware =
|
|
25
|
+
exports.createSnapsMethodMiddleware = _chunkGP6TDVNTjs.createSnapsMethodMiddleware; exports.handlers = _chunkINB4AX37js.handlers; exports.methodHandlers = _chunkINB4AX37js.methodHandlers;
|
|
26
26
|
//# sourceMappingURL=index.js.map
|
package/dist/permitted/index.mjs
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
import "../chunk-TNENASGX.mjs";
|
|
2
2
|
import {
|
|
3
3
|
createSnapsMethodMiddleware
|
|
4
|
-
} from "../chunk-
|
|
4
|
+
} from "../chunk-VNH2GKLV.mjs";
|
|
5
5
|
import {
|
|
6
6
|
handlers,
|
|
7
7
|
methodHandlers
|
|
8
|
-
} from "../chunk-
|
|
8
|
+
} from "../chunk-3W4SMZFD.mjs";
|
|
9
9
|
import "../chunk-TKXU7ZXP.mjs";
|
|
10
10
|
import "../chunk-MXCJWR45.mjs";
|
|
11
11
|
import "../chunk-MXPVC2XP.mjs";
|
|
12
|
-
import "../chunk-
|
|
13
|
-
import "../chunk-
|
|
12
|
+
import "../chunk-GVJLWGSI.mjs";
|
|
13
|
+
import "../chunk-634BK2VP.mjs";
|
|
14
14
|
import "../chunk-UB3733UY.mjs";
|
|
15
15
|
import "../chunk-62URQ5VS.mjs";
|
|
16
16
|
import "../chunk-I6FU5MGE.mjs";
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
4
|
-
require('../chunk-
|
|
3
|
+
var _chunkGP6TDVNTjs = require('../chunk-GP6TDVNT.js');
|
|
4
|
+
require('../chunk-INB4AX37.js');
|
|
5
5
|
require('../chunk-AOWUGDER.js');
|
|
6
6
|
require('../chunk-IDZGMGIB.js');
|
|
7
7
|
require('../chunk-PS6OEQXL.js');
|
|
8
|
-
require('../chunk-
|
|
9
|
-
require('../chunk-
|
|
8
|
+
require('../chunk-D5WQBUZB.js');
|
|
9
|
+
require('../chunk-UDB4MUXI.js');
|
|
10
10
|
require('../chunk-4LSOS7SM.js');
|
|
11
11
|
require('../chunk-3UAWEHMF.js');
|
|
12
12
|
require('../chunk-NP3KGMVC.js');
|
|
@@ -16,5 +16,5 @@ require('../chunk-FFHVA6PP.js');
|
|
|
16
16
|
require('../chunk-YG7W4CDT.js');
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.createSnapsMethodMiddleware =
|
|
19
|
+
exports.createSnapsMethodMiddleware = _chunkGP6TDVNTjs.createSnapsMethodMiddleware;
|
|
20
20
|
//# sourceMappingURL=middleware.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import {
|
|
2
2
|
createSnapsMethodMiddleware
|
|
3
|
-
} from "../chunk-
|
|
4
|
-
import "../chunk-
|
|
3
|
+
} from "../chunk-VNH2GKLV.mjs";
|
|
4
|
+
import "../chunk-3W4SMZFD.mjs";
|
|
5
5
|
import "../chunk-TKXU7ZXP.mjs";
|
|
6
6
|
import "../chunk-MXCJWR45.mjs";
|
|
7
7
|
import "../chunk-MXPVC2XP.mjs";
|
|
8
|
-
import "../chunk-
|
|
9
|
-
import "../chunk-
|
|
8
|
+
import "../chunk-GVJLWGSI.mjs";
|
|
9
|
+
import "../chunk-634BK2VP.mjs";
|
|
10
10
|
import "../chunk-UB3733UY.mjs";
|
|
11
11
|
import "../chunk-62URQ5VS.mjs";
|
|
12
12
|
import "../chunk-I6FU5MGE.mjs";
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkD5WQBUZBjs = require('../chunk-D5WQBUZB.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
exports.updateInterfaceHandler =
|
|
6
|
+
exports.updateInterfaceHandler = _chunkD5WQBUZBjs.updateInterfaceHandler;
|
|
7
7
|
//# sourceMappingURL=updateInterface.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
3
|
|
|
4
|
-
var
|
|
4
|
+
var _chunkI7DR6BFOjs = require('../chunk-I7DR6BFO.js');
|
|
5
5
|
|
|
6
6
|
|
|
7
7
|
|
|
8
|
-
exports.dialogBuilder =
|
|
8
|
+
exports.dialogBuilder = _chunkI7DR6BFOjs.dialogBuilder; exports.getDialogImplementation = _chunkI7DR6BFOjs.getDialogImplementation;
|
|
9
9
|
//# sourceMappingURL=dialog.js.map
|
package/dist/restricted/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";Object.defineProperty(exports, "__esModule", {value: true});
|
|
2
2
|
|
|
3
|
-
var
|
|
3
|
+
var _chunkRIALLTR7js = require('../chunk-RIALLTR7.js');
|
|
4
4
|
|
|
5
5
|
|
|
6
6
|
|
|
@@ -14,9 +14,9 @@ require('../chunk-SYUGPLEP.js');
|
|
|
14
14
|
require('../chunk-P74WXDY4.js');
|
|
15
15
|
|
|
16
16
|
|
|
17
|
-
var
|
|
17
|
+
var _chunkR2M4YLJ7js = require('../chunk-R2M4YLJ7.js');
|
|
18
18
|
require('../chunk-QDZAWH6F.js');
|
|
19
|
-
require('../chunk-
|
|
19
|
+
require('../chunk-I7DR6BFO.js');
|
|
20
20
|
require('../chunk-S7AR3ROH.js');
|
|
21
21
|
require('../chunk-LGUJMQC7.js');
|
|
22
22
|
|
|
@@ -29,5 +29,5 @@ require('../chunk-YG7W4CDT.js');
|
|
|
29
29
|
|
|
30
30
|
|
|
31
31
|
|
|
32
|
-
exports.WALLET_SNAP_PERMISSION_KEY = _chunkFFHVA6PPjs.WALLET_SNAP_PERMISSION_KEY; exports.caveatMappers = _chunkAYJK7MSHjs.caveatMappers; exports.caveatSpecifications = _chunkAYJK7MSHjs.caveatSpecifications; exports.
|
|
32
|
+
exports.WALLET_SNAP_PERMISSION_KEY = _chunkFFHVA6PPjs.WALLET_SNAP_PERMISSION_KEY; exports.caveatMappers = _chunkAYJK7MSHjs.caveatMappers; exports.caveatSpecifications = _chunkAYJK7MSHjs.caveatSpecifications; exports.getEncryptionEntropy = _chunkR2M4YLJ7js.getEncryptionEntropy; exports.restrictedMethodPermissionBuilders = _chunkRIALLTR7js.restrictedMethodPermissionBuilders;
|
|
33
33
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import {
|
|
2
2
|
restrictedMethodPermissionBuilders
|
|
3
|
-
} from "../chunk-
|
|
3
|
+
} from "../chunk-PG32JMWC.mjs";
|
|
4
4
|
import {
|
|
5
5
|
caveatMappers,
|
|
6
6
|
caveatSpecifications
|
|
@@ -13,10 +13,10 @@ import "../chunk-IBV23QOX.mjs";
|
|
|
13
13
|
import "../chunk-IZYMBIBD.mjs";
|
|
14
14
|
import "../chunk-E6WUMFQT.mjs";
|
|
15
15
|
import {
|
|
16
|
-
|
|
17
|
-
} from "../chunk-
|
|
16
|
+
getEncryptionEntropy
|
|
17
|
+
} from "../chunk-NESDQ4PF.mjs";
|
|
18
18
|
import "../chunk-JWDQUKKU.mjs";
|
|
19
|
-
import "../chunk-
|
|
19
|
+
import "../chunk-X247BMMW.mjs";
|
|
20
20
|
import "../chunk-TNRH2LRU.mjs";
|
|
21
21
|
import "../chunk-6WUIFFMQ.mjs";
|
|
22
22
|
import {
|
|
@@ -27,7 +27,7 @@ export {
|
|
|
27
27
|
WALLET_SNAP_PERMISSION_KEY,
|
|
28
28
|
caveatMappers,
|
|
29
29
|
caveatSpecifications,
|
|
30
|
-
|
|
30
|
+
getEncryptionEntropy,
|
|
31
31
|
restrictedMethodPermissionBuilders
|
|
32
32
|
};
|
|
33
33
|
//# sourceMappingURL=index.mjs.map
|
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
|
|
7
7
|
|
|
8
8
|
|
|
9
|
-
var
|
|
9
|
+
var _chunkR2M4YLJ7js = require('../chunk-R2M4YLJ7.js');
|
|
10
10
|
require('../chunk-YG7W4CDT.js');
|
|
11
11
|
|
|
12
12
|
|
|
@@ -16,5 +16,5 @@ require('../chunk-YG7W4CDT.js');
|
|
|
16
16
|
|
|
17
17
|
|
|
18
18
|
|
|
19
|
-
exports.STATE_ENCRYPTION_SALT =
|
|
19
|
+
exports.STATE_ENCRYPTION_SALT = _chunkR2M4YLJ7js.STATE_ENCRYPTION_SALT; exports.STORAGE_SIZE_LIMIT = _chunkR2M4YLJ7js.STORAGE_SIZE_LIMIT; exports.getEncryptionEntropy = _chunkR2M4YLJ7js.getEncryptionEntropy; exports.getManageStateImplementation = _chunkR2M4YLJ7js.getManageStateImplementation; exports.getValidatedParams = _chunkR2M4YLJ7js.getValidatedParams; exports.manageStateBuilder = _chunkR2M4YLJ7js.manageStateBuilder; exports.specificationBuilder = _chunkR2M4YLJ7js.specificationBuilder;
|
|
20
20
|
//# sourceMappingURL=manageState.js.map
|
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
import {
|
|
2
2
|
STATE_ENCRYPTION_SALT,
|
|
3
3
|
STORAGE_SIZE_LIMIT,
|
|
4
|
-
|
|
4
|
+
getEncryptionEntropy,
|
|
5
5
|
getManageStateImplementation,
|
|
6
6
|
getValidatedParams,
|
|
7
7
|
manageStateBuilder,
|
|
8
8
|
specificationBuilder
|
|
9
|
-
} from "../chunk-
|
|
9
|
+
} from "../chunk-NESDQ4PF.mjs";
|
|
10
10
|
import "../chunk-SGQXD5K7.mjs";
|
|
11
11
|
export {
|
|
12
12
|
STATE_ENCRYPTION_SALT,
|
|
13
13
|
STORAGE_SIZE_LIMIT,
|
|
14
|
-
|
|
14
|
+
getEncryptionEntropy,
|
|
15
15
|
getManageStateImplementation,
|
|
16
16
|
getValidatedParams,
|
|
17
17
|
manageStateBuilder,
|