UNPKG

@metamask/keyring-api

Version:
252 lines 8.85 kB
import type { Infer } from "@metamask/superstruct"; export declare const BtcP2pkhAddressStruct: import("@metamask/superstruct").Struct<string, null>; export declare const BtcP2shAddressStruct: import("@metamask/superstruct").Struct<string, null>; export declare const BtcP2wpkhAddressStruct: import("@metamask/superstruct").Struct<string, null>; export declare const BtcP2trAddressStruct: import("@metamask/superstruct").Struct<string, null>; /** * Supported Bitcoin methods. */ export declare enum BtcMethod { SignPsbt = "signPsbt", ComputeFee = "computeFee", FillPsbt = "fillPsbt", BroadcastPsbt = "broadcastPsbt", SendTransfer = "sendTransfer", GetUtxo = "getUtxo", ListUtxos = "listUtxos", PublicDescriptor = "publicDescriptor", SignMessage = "signMessage" } export declare const BtcP2pkhAccountStruct: import("@metamask/superstruct").Struct<{ type: "bip122:p2pkh"; 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: BtcMethod[]; }, { /** * Account P2PKH address. */ address: import("@metamask/superstruct").Struct<string, null>; /** * Account type. */ type: import("@metamask/superstruct").Struct<"bip122:p2pkh", "bip122:p2pkh">; /** * Account supported scopes (CAIP-2 chain ID). */ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>; /** * Account supported methods. */ methods: import("@metamask/superstruct").Struct<BtcMethod[], import("@metamask/superstruct").Struct<BtcMethod, { signPsbt: BtcMethod.SignPsbt; computeFee: BtcMethod.ComputeFee; fillPsbt: BtcMethod.FillPsbt; broadcastPsbt: BtcMethod.BroadcastPsbt; sendTransfer: BtcMethod.SendTransfer; getUtxo: BtcMethod.GetUtxo; listUtxos: BtcMethod.ListUtxos; publicDescriptor: BtcMethod.PublicDescriptor; signMessage: BtcMethod.SignMessage; }>>; 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 declare const BtcP2shAccountStruct: import("@metamask/superstruct").Struct<{ type: "bip122:p2sh"; 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: BtcMethod[]; }, { /** * Account P2SH address. */ address: import("@metamask/superstruct").Struct<string, null>; /** * Account type. */ type: import("@metamask/superstruct").Struct<"bip122:p2sh", "bip122:p2sh">; /** * Account supported scopes (CAIP-2 chain ID). */ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>; /** * Account supported methods. */ methods: import("@metamask/superstruct").Struct<BtcMethod[], import("@metamask/superstruct").Struct<BtcMethod, { signPsbt: BtcMethod.SignPsbt; computeFee: BtcMethod.ComputeFee; fillPsbt: BtcMethod.FillPsbt; broadcastPsbt: BtcMethod.BroadcastPsbt; sendTransfer: BtcMethod.SendTransfer; getUtxo: BtcMethod.GetUtxo; listUtxos: BtcMethod.ListUtxos; publicDescriptor: BtcMethod.PublicDescriptor; signMessage: BtcMethod.SignMessage; }>>; 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 declare const BtcP2wpkhAccountStruct: import("@metamask/superstruct").Struct<{ type: "bip122:p2wpkh"; 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: BtcMethod[]; }, { /** * Account P2WPKH address. */ address: import("@metamask/superstruct").Struct<string, null>; /** * Account type. */ type: import("@metamask/superstruct").Struct<"bip122:p2wpkh", "bip122:p2wpkh">; /** * Account supported scopes (CAIP-2 chain ID). */ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>; /** * Account supported methods. */ methods: import("@metamask/superstruct").Struct<BtcMethod[], import("@metamask/superstruct").Struct<BtcMethod, { signPsbt: BtcMethod.SignPsbt; computeFee: BtcMethod.ComputeFee; fillPsbt: BtcMethod.FillPsbt; broadcastPsbt: BtcMethod.BroadcastPsbt; sendTransfer: BtcMethod.SendTransfer; getUtxo: BtcMethod.GetUtxo; listUtxos: BtcMethod.ListUtxos; publicDescriptor: BtcMethod.PublicDescriptor; signMessage: BtcMethod.SignMessage; }>>; 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 declare const BtcP2trAccountStruct: import("@metamask/superstruct").Struct<{ type: "bip122:p2tr"; 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: BtcMethod[]; }, { /** * Account P2TR address. */ address: import("@metamask/superstruct").Struct<string, null>; /** * Account type. */ type: import("@metamask/superstruct").Struct<"bip122:p2tr", "bip122:p2tr">; /** * Account supported scopes (CAIP-2 chain ID). */ scopes: import("@metamask/superstruct").Struct<`${string}:${string}`[], import("@metamask/superstruct").Struct<`${string}:${string}`, null>>; /** * Account supported methods. */ methods: import("@metamask/superstruct").Struct<BtcMethod[], import("@metamask/superstruct").Struct<BtcMethod, { signPsbt: BtcMethod.SignPsbt; computeFee: BtcMethod.ComputeFee; fillPsbt: BtcMethod.FillPsbt; broadcastPsbt: BtcMethod.BroadcastPsbt; sendTransfer: BtcMethod.SendTransfer; getUtxo: BtcMethod.GetUtxo; listUtxos: BtcMethod.ListUtxos; publicDescriptor: BtcMethod.PublicDescriptor; signMessage: BtcMethod.SignMessage; }>>; 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 BtcP2pkhAccount = Infer<typeof BtcP2pkhAccountStruct>; export type BtcP2shAccount = Infer<typeof BtcP2shAccountStruct>; export type BtcP2wpkhAccount = Infer<typeof BtcP2wpkhAccountStruct>; export type BtcP2trAccount = Infer<typeof BtcP2trAccountStruct>; //# sourceMappingURL=types.d.cts.map