UNPKG

@metamask/snaps-rpc-methods

Version:
20 lines 1.06 kB
import type { PermittedHandlerExport } from "@metamask/permission-controller"; import type { AvailableCurrency, CurrencyRate, GetCurrencyRateParams, GetCurrencyRateResult } from "@metamask/snaps-sdk"; import { type InferMatching } from "@metamask/snaps-utils"; export type GetCurrencyRateMethodHooks = { /** * @param currency - The currency symbol. * Currently only 'btc' is supported. * @returns The {@link CurrencyRate} object. */ getCurrencyRate: (currency: AvailableCurrency) => CurrencyRate | undefined; }; export declare const getCurrencyRateHandler: PermittedHandlerExport<GetCurrencyRateMethodHooks, GetCurrencyRateParameters, GetCurrencyRateResult>; declare const GetCurrencyRateParametersStruct: import("@metamask/superstruct").Struct<{ currency: "btc" | "BTC"; }, { currency: import("@metamask/superstruct").Struct<"btc" | "BTC", null>; }>; export type GetCurrencyRateParameters = InferMatching<typeof GetCurrencyRateParametersStruct, GetCurrencyRateParams>; export {}; //# sourceMappingURL=getCurrencyRate.d.mts.map