@@ -16,27 +16,14 @@ export interface ExtraAccountMeta {
1616 isSigner : boolean ;
1717 /** Whether the account is writable */
1818 isWritable : boolean ;
19- /** Optional seed for PDA derivation */
20- seeds ?: Array < {
21- /** Literal seed value or instruction account index reference */
22- value : string | number ;
23- /** Type of seed: 'literal' for string/buffer, 'accountKey' for instruction account index */
24- type : 'literal' | 'accountKey' ;
25- } > ;
2619}
2720
2821/**
2922 * Interface for transfer hook configuration
3023 */
3124export interface TransferHookConfig {
32- /** The transfer hook program ID */
33- programId : string ;
34- /** The transfer hook authority */
35- authority : string ;
3625 /** Extra account metas required by the transfer hook */
3726 extraAccountMetas : ExtraAccountMeta [ ] ;
38- /** The PDA address for extra account metas (cached) */
39- extraAccountMetasPDA ?: string ;
4027}
4128
4229/**
@@ -45,34 +32,18 @@ export interface TransferHookConfig {
4532export interface Token2022Config {
4633 /** The mint address of the token */
4734 mintAddress : string ;
48- /** Token symbol */
49- symbol : string ;
50- /** Token name */
51- name : string ;
52- /** Number of decimal places */
53- decimals : number ;
54- /** Program ID (TOKEN_2022_PROGRAM_ID) */
55- programId : string ;
5635 /** Transfer hook configuration if applicable */
5736 transferHook ?: TransferHookConfig ;
58- /** Whether the token has transfer fees */
59- hasTransferFees ?: boolean ;
6037}
6138
6239/**
6340 * Token configurations map
64- * Key: mintAddress or symbol
41+ * Key: mintAddress
6542 */
6643export const TOKEN_2022_CONFIGS : Record < string , Token2022Config > = { } ;
6744
6845TOKEN_2022_STATIC_CONFIGS . forEach ( ( config ) => {
6946 TOKEN_2022_CONFIGS [ config . mintAddress ] = config ;
70- TOKEN_2022_CONFIGS [ config . symbol ] = config ;
71- } ) ;
72-
73- // Create symbol mappings for convenience
74- Object . values ( TOKEN_2022_CONFIGS ) . forEach ( ( config ) => {
75- TOKEN_2022_CONFIGS [ config . symbol ] = config ;
7647} ) ;
7748
7849/**
0 commit comments