@metamask/snaps-rpc-methods
Version:
MetaMask Snaps JSON-RPC method implementations
16 lines • 910 B
text/typescript
import type { PermittedHandlerExport } from "@metamask/permission-controller";
import type { GetFileParams } from "@metamask/snaps-sdk";
import type { InferMatching } from "@metamask/snaps-utils";
export declare const GetFileArgsStruct: import("@metamask/superstruct").Struct<{
path: string;
encoding?: "base64" | "hex" | "utf8" | undefined;
}, {
path: import("@metamask/superstruct").Struct<string, null>;
encoding: import("@metamask/superstruct").Struct<"base64" | "hex" | "utf8" | undefined, null>;
}>;
export type InferredGetFileParams = InferMatching<typeof GetFileArgsStruct, GetFileParams>;
export declare const getFileHandler: PermittedHandlerExport<GetFileHooks, InferredGetFileParams, string>;
export type GetFileHooks = {
getSnapFile: (path: InferredGetFileParams['path'], encoding: InferredGetFileParams['encoding']) => Promise<string>;
};
//# sourceMappingURL=getFile.d.cts.map