UNPKG

@metamask/keyring-api

Version:
132 lines 5.66 kB
import type { Infer } from "@metamask/superstruct"; import { EthScope } from "./index.cjs"; export declare const EthBytesStruct: import("@metamask/superstruct").Struct<string, null>; export declare const EthAddressStruct: import("@metamask/superstruct").Struct<string, null>; export declare const EthUint256Struct: import("@metamask/superstruct").Struct<string, null>; /** * Supported Ethereum methods. */ export declare enum EthMethod { PersonalSign = "personal_sign", Sign = "eth_sign", SignTransaction = "eth_signTransaction", SignTypedDataV1 = "eth_signTypedData_v1", SignTypedDataV3 = "eth_signTypedData_v3", SignTypedDataV4 = "eth_signTypedData_v4", PrepareUserOperation = "eth_prepareUserOperation", PatchUserOperation = "eth_patchUserOperation", SignUserOperation = "eth_signUserOperation" } export declare const EthEoaAccountStruct: import("@metamask/superstruct").Struct<{ type: "eip155:eoa"; id: string; options: Record<string, import("@metamask/utils").Json> & { entropy?: { type: "mnemonic"; id: string; derivationPath: string; groupIndex: number; } | { type: "private-key"; }; exportable?: boolean; }; address: string; scopes: EthScope.Eoa[]; methods: ("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[]; }, { /** * Account address. */ address: import("@metamask/superstruct").Struct<string, null>; /** * Account type. */ type: import("@metamask/superstruct").Struct<"eip155:eoa", "eip155:eoa">; /** * Account scopes (must be ['eip155:0']). */ scopes: import("@metamask/superstruct").Struct<EthScope.Eoa[], import("@metamask/superstruct").Struct<EthScope.Eoa, EthScope.Eoa>>; /** * Account supported methods. */ methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTransaction" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4", { personal_sign: "personal_sign"; eth_sign: "eth_sign"; eth_signTransaction: "eth_signTransaction"; eth_signTypedData_v1: "eth_signTypedData_v1"; eth_signTypedData_v3: "eth_signTypedData_v3"; eth_signTypedData_v4: "eth_signTypedData_v4"; }>>; id: import("@metamask/superstruct").Struct<string, null>; options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> & { entropy?: { type: "mnemonic"; id: string; derivationPath: string; groupIndex: number; } | { type: "private-key"; }; exportable?: boolean; }, null>; }>; export type EthEoaAccount = Infer<typeof EthEoaAccountStruct>; export declare const EthErc4337AccountStruct: import("@metamask/superstruct").Struct<{ type: "eip155:erc4337"; id: string; options: Record<string, import("@metamask/utils").Json> & { entropy?: { type: "mnemonic"; id: string; derivationPath: string; groupIndex: number; } | { type: "private-key"; }; exportable?: boolean; }; address: string; scopes: `${string}:${string}`[]; methods: ("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[]; }, { /** * Account address. */ address: import("@metamask/superstruct").Struct<string, null>; /** * Account type. */ type: import("@metamask/superstruct").Struct<"eip155:erc4337", "eip155:erc4337">; /** * Account supported scopes (CAIP-2 chain IDs). */ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>; /** * Account supported methods. */ methods: import("@metamask/superstruct").Struct<("personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation")[], import("@metamask/superstruct").Struct<"personal_sign" | "eth_sign" | "eth_signTypedData_v1" | "eth_signTypedData_v3" | "eth_signTypedData_v4" | "eth_prepareUserOperation" | "eth_patchUserOperation" | "eth_signUserOperation", { personal_sign: "personal_sign"; eth_sign: "eth_sign"; eth_signTypedData_v1: "eth_signTypedData_v1"; eth_signTypedData_v3: "eth_signTypedData_v3"; eth_signTypedData_v4: "eth_signTypedData_v4"; eth_prepareUserOperation: "eth_prepareUserOperation"; eth_patchUserOperation: "eth_patchUserOperation"; eth_signUserOperation: "eth_signUserOperation"; }>>; id: import("@metamask/superstruct").Struct<string, null>; options: import("@metamask/superstruct").Struct<Record<string, import("@metamask/utils").Json> & { entropy?: { type: "mnemonic"; id: string; derivationPath: string; groupIndex: number; } | { type: "private-key"; }; exportable?: boolean; }, null>; }>; export type EthErc4337Account = Infer<typeof EthErc4337AccountStruct>; //# sourceMappingURL=types.d.cts.map