@@ -169,6 +169,16 @@ export interface VetTokenConstructorOptions extends AccountConstructorOptions {
169169 contractAddress : string ;
170170 gasTankToken ?: string ;
171171}
172+
173+ /**
174+ * Midnight Network token (DUST) constructor options
175+ * DUST is the fee token on the Midnight Network
176+ */
177+ export interface NightTokenConstructorOptions extends AccountConstructorOptions {
178+ // Token identifier (e.g., 'dust' for the fee token)
179+ tokenId : string ;
180+ }
181+
172182export interface CosmosTokenConstructorOptions extends AccountConstructorOptions {
173183 denom : string ;
174184}
@@ -706,6 +716,20 @@ export class VetToken extends AccountCoinToken {
706716 }
707717}
708718
719+ /**
720+ * Midnight Network supports the DUST token for transaction fees.
721+ * DUST is a native token on the Midnight Network used to pay for transaction fees.
722+ */
723+ export class NightToken extends AccountCoinToken {
724+ public tokenId : string ;
725+ constructor ( options : NightTokenConstructorOptions ) {
726+ super ( {
727+ ...options ,
728+ } ) ;
729+ this . tokenId = options . tokenId ;
730+ }
731+ }
732+
709733/**
710734 * Cosmos network supports tokens
711735 * Cosmos tokens work similar to native coins, but the token is determined by
@@ -3778,6 +3802,94 @@ export function tvetToken(
37783802 ) ;
37793803}
37803804
3805+ /**
3806+ * Factory function for Night token (DUST) instances.
3807+ *
3808+ * @param id uuid v4
3809+ * @param name unique identifier of the token
3810+ * @param fullName Complete human-readable name of the token
3811+ * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
3812+ * @param tokenId Token identifier (e.g., 'dust')
3813+ * @param asset Asset which this coin represents
3814+ * @param features Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
3815+ * @param prefix Optional token prefix. Defaults to empty string
3816+ * @param suffix Optional token suffix. Defaults to token name.
3817+ * @param network Optional token network. Defaults to the mainnet Night network.
3818+ * @param primaryKeyCurve The elliptic curve for this chain/token
3819+ */
3820+ export function nightToken (
3821+ id : string ,
3822+ name : string ,
3823+ fullName : string ,
3824+ decimalPlaces : number ,
3825+ tokenId : string ,
3826+ asset : UnderlyingAsset ,
3827+ features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
3828+ prefix = '' ,
3829+ suffix : string = name . toUpperCase ( ) ,
3830+ network : AccountNetwork = Networks . main . night ,
3831+ primaryKeyCurve : KeyCurve = KeyCurve . Ed25519
3832+ ) {
3833+ return Object . freeze (
3834+ new NightToken ( {
3835+ id,
3836+ name,
3837+ fullName,
3838+ network,
3839+ tokenId,
3840+ prefix,
3841+ suffix,
3842+ features,
3843+ decimalPlaces,
3844+ asset,
3845+ isToken : true ,
3846+ primaryKeyCurve,
3847+ baseUnit : BaseUnit . NIGHT ,
3848+ } )
3849+ ) ;
3850+ }
3851+
3852+ /**
3853+ * Factory function for testnet Night token (DUST) instances.
3854+ *
3855+ * @param id uuid v4
3856+ * @param name unique identifier of the token
3857+ * @param fullName Complete human-readable name of the token
3858+ * @param decimalPlaces Number of decimal places this token supports (divisibility exponent)
3859+ * @param tokenId Token identifier (e.g., 'tdust')
3860+ * @param asset Asset which this coin represents
3861+ * @param features Features of this coin. Defaults to the DEFAULT_FEATURES defined in `AccountCoin`
3862+ * @param prefix Optional token prefix. Defaults to empty string
3863+ * @param suffix Optional token suffix. Defaults to token name.
3864+ * @param network Optional token network. Defaults to the testnet Night network.
3865+ */
3866+ export function tnightToken (
3867+ id : string ,
3868+ name : string ,
3869+ fullName : string ,
3870+ decimalPlaces : number ,
3871+ tokenId : string ,
3872+ asset : UnderlyingAsset ,
3873+ features : CoinFeature [ ] = AccountCoin . DEFAULT_FEATURES ,
3874+ prefix = '' ,
3875+ suffix : string = name . toUpperCase ( ) ,
3876+ network : AccountNetwork = Networks . test . night
3877+ ) {
3878+ return nightToken (
3879+ id ,
3880+ name ,
3881+ fullName ,
3882+ decimalPlaces ,
3883+ tokenId ,
3884+ asset ,
3885+ features ,
3886+ prefix ,
3887+ suffix ,
3888+ network ,
3889+ KeyCurve . Ed25519
3890+ ) ;
3891+ }
3892+
37813893/**
37823894 * Factory function for Vet NFT collections.
37833895 *
0 commit comments