@metamask/keyring-api
Version:
MetaMask Keyring API
69 lines • 2.31 kB
text/typescript
import type { Infer } from "@metamask/superstruct";
/**
* TRON addresses are Base58-encoded strings that are exactly 34 characters long
* and start with the letter 'T'.
*/
export declare const TrxAddressStruct: import("@metamask/superstruct").Struct<string, null>;
/**
* Supported TRON methods.
*/
export declare enum TrxMethod {
SignMessage = "signMessage",
SignTransaction = "signTransaction",
SignMessageV2 = "signMessageV2",
VerifyMessageV2 = "verifyMessageV2"
}
export declare const TrxEoaAccountStruct: import("@metamask/superstruct").Struct<{
type: "tron: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: `${string}:${string}`[];
methods: TrxMethod[];
}, {
/**
* Account address.
*/
address: import("@metamask/superstruct").Struct<string, null>;
/**
* Account type.
*/
type: import("@metamask/superstruct").Struct<"tron:eoa", "tron:eoa">;
/**
* 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<TrxMethod[], import("@metamask/superstruct").Struct<TrxMethod, {
signMessage: TrxMethod.SignMessage;
signTransaction: TrxMethod.SignTransaction;
signMessageV2: TrxMethod.SignMessageV2;
verifyMessageV2: TrxMethod.VerifyMessageV2;
}>>;
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 TrxEoaAccount = Infer<typeof TrxEoaAccountStruct>;
//# sourceMappingURL=types.d.mts.map