@@ -19,6 +19,7 @@ import {
1919 ZkethERC20Token ,
2020 SuiCoin ,
2121 BeraERC20Token ,
22+ AptCoin ,
2223} from './account' ;
2324import { CoinFamily , CoinKind } from './base' ;
2425import { coins } from './coins' ;
@@ -80,6 +81,10 @@ export type SuiTokenConfig = BaseNetworkConfig & {
8081 symbol : string ;
8182} ;
8283
84+ export type AptTokenConfig = BaseNetworkConfig & {
85+ fungibleAssetAddress : string ;
86+ } ;
87+
8388export interface Tokens {
8489 bitcoin : {
8590 eth : {
@@ -139,6 +144,9 @@ export interface Tokens {
139144 bera : {
140145 tokens : EthLikeTokenConfig [ ] ;
141146 } ;
147+ apt : {
148+ tokens : AptTokenConfig [ ] ;
149+ } ;
142150 } ;
143151 testnet : {
144152 eth : {
@@ -198,6 +206,9 @@ export interface Tokens {
198206 bera : {
199207 tokens : EthLikeTokenConfig [ ] ;
200208 } ;
209+ apt : {
210+ tokens : AptTokenConfig [ ] ;
211+ } ;
201212 } ;
202213}
203214
@@ -505,6 +516,20 @@ const formattedSuiTokens = coins.reduce((acc: SuiTokenConfig[], coin) => {
505516 return acc ;
506517} , [ ] ) ;
507518
519+ const formattedAptTokens = coins . reduce ( ( acc : AptTokenConfig [ ] , coin ) => {
520+ if ( coin instanceof AptCoin ) {
521+ acc . push ( {
522+ type : coin . name ,
523+ coin : coin . network . type === NetworkType . MAINNET ? 'apt' : 'tapt' ,
524+ network : coin . network . type === NetworkType . MAINNET ? 'Mainnet' : 'Testnet' ,
525+ name : coin . fullName ,
526+ fungibleAssetAddress : coin . fungibleAssetAddress ,
527+ decimalPlaces : coin . decimalPlaces ,
528+ } ) ;
529+ }
530+ return acc ;
531+ } , [ ] ) ;
532+
508533export const tokens : Tokens = {
509534 // network name for production environments
510535 bitcoin : {
@@ -565,6 +590,9 @@ export const tokens: Tokens = {
565590 bera : {
566591 tokens : formattedBeraTokens . filter ( ( token ) => token . network === 'Mainnet' ) ,
567592 } ,
593+ apt : {
594+ tokens : formattedAptTokens . filter ( ( token ) => token . network === 'Testnet' ) ,
595+ } ,
568596 } ,
569597 // network name for test environments
570598 testnet : {
@@ -625,6 +653,9 @@ export const tokens: Tokens = {
625653 bera : {
626654 tokens : formattedBeraTokens . filter ( ( token ) => token . network === 'Testnet' ) ,
627655 } ,
656+ apt : {
657+ tokens : formattedAptTokens . filter ( ( token ) => token . network === 'Testnet' ) ,
658+ } ,
628659 } ,
629660} ;
630661
0 commit comments