@metamask/keyring-api
Version:
MetaMask Keyring API
212 lines • 7.24 kB
text/typescript
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 {
SendBitcoin = "sendBitcoin"
}
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: "sendBitcoin"[];
}, {
/**
* 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<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
sendBitcoin: "sendBitcoin";
}>>;
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: "sendBitcoin"[];
}, {
/**
* 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<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
sendBitcoin: "sendBitcoin";
}>>;
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: "sendBitcoin"[];
}, {
/**
* 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<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
sendBitcoin: "sendBitcoin";
}>>;
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: "sendBitcoin"[];
}, {
/**
* 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<"sendBitcoin"[], import("@metamask/superstruct").Struct<"sendBitcoin", {
sendBitcoin: "sendBitcoin";
}>>;
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