@metamask/snaps-rpc-methods
Version:
MetaMask Snaps JSON-RPC method implementations
19 lines • 995 B
text/typescript
import type { PermittedHandlerExport } from "@metamask/permission-controller";
import type { GetInterfaceContextParams, GetInterfaceContextResult, InterfaceContext } from "@metamask/snaps-sdk";
import { type InferMatching } from "@metamask/snaps-utils";
export type GetInterfaceContextMethodHooks = {
/**
* @param id - The interface ID.
* @returns The interface context.
*/
getInterfaceContext: (id: string) => InterfaceContext | null;
};
export declare const getInterfaceContextHandler: PermittedHandlerExport<GetInterfaceContextMethodHooks, GetInterfaceContextParameters, GetInterfaceContextResult>;
declare const GetInterfaceContextParametersStruct: import("@metamask/superstruct").Struct<{
id: string;
}, {
id: import("@metamask/superstruct").Struct<string, null>;
}>;
export type GetInterfaceContextParameters = InferMatching<typeof GetInterfaceContextParametersStruct, GetInterfaceContextParams>;
export {};
//# sourceMappingURL=getInterfaceContext.d.mts.map