11import { object } from '@metamask/keyring-utils' ;
22import type { Infer } from '@metamask/superstruct' ;
3- import { array , enums , literal , nonempty , record } from '@metamask/superstruct' ;
3+ import { array , enums , literal , nonempty } from '@metamask/superstruct' ;
44import { definePattern } from '@metamask/utils' ;
55
66import {
77 CaipChainIdStruct ,
88 KeyringAccountStruct ,
9- SolAccountType ,
109 TrxAccountType ,
1110} from '../api' ;
1211
@@ -23,28 +22,28 @@ export const TrxAddressStruct = definePattern(
2322 * Supported TRON methods.
2423 */
2524export declare enum TrxMethod {
26- SignMessageV2 = " signMessageV2" ,
27- VerifyMessageV2 = " verifyMessageV2"
25+ SignMessageV2 = ' signMessageV2' ,
26+ VerifyMessageV2 = ' verifyMessageV2' ,
2827}
2928
3029export const TrxEoaAccountStruct = object ( {
31- ...KeyringAccountStruct . schema ,
32- /**
33- * Account address.
34- */
35- address : TrxAddressStruct ,
36- /**
37- * Account type.
38- */
39- type : literal ( `${ TrxAccountType . Eoa } ` ) ,
40- /**
41- * Account supported scopes (CAIP-2 chain IDs).
42- */
43- scopes : nonempty ( array ( CaipChainIdStruct ) ) ,
44- /**
45- * Account supported methods.
46- */
47- methods : array ( enums ( Object . values ( TrxMethod ) ) ) ,
30+ ...KeyringAccountStruct . schema ,
31+ /**
32+ * Account address.
33+ */
34+ address : TrxAddressStruct ,
35+ /**
36+ * Account type.
37+ */
38+ type : literal ( `${ TrxAccountType . Eoa } ` ) ,
39+ /**
40+ * Account supported scopes (CAIP-2 chain IDs).
41+ */
42+ scopes : nonempty ( array ( CaipChainIdStruct ) ) ,
43+ /**
44+ * Account supported methods.
45+ */
46+ methods : array ( enums ( Object . values ( TrxMethod ) ) ) ,
4847} ) ;
4948
5049export type TrxEoaAccount = Infer < typeof TrxEoaAccountStruct > ;
0 commit comments