Token API Reference
The Token module defines the structure and constants for the different token types on the Midnight Network.
NIGHT Token
noxipher.token.night.NIGHTToken
NIGHT token type descriptor.
Source code in src/noxipher/token/night.py
| class NIGHTToken:
"""NIGHT token type descriptor."""
RAW_TYPE = NIGHT_TOKEN_TYPE
RAW_TYPE_HEX = NIGHT_TOKEN_TYPE_HEX
SYMBOL = "NIGHT"
DECIMALS = 6 # hypothesis — verify
TOTAL_SUPPLY_SPECKS = 24_000_000_000 * SPECKS_PER_NIGHT
|
DUST Token
noxipher.token.dust.DUSTToken
DUST token descriptor.
Source code in src/noxipher/token/dust.py
| class DUSTToken:
"""DUST token descriptor."""
SYMBOL = "DUST"
IS_TRANSFERABLE = False
ADDITIONAL_FEE_OVERHEAD = DUST_ADDITIONAL_FEE_OVERHEAD
FEE_BLOCKS_MARGIN = DUST_FEE_BLOCKS_MARGIN
@staticmethod
def estimate_tx_cost(base_gas: int) -> int:
"""
Estimate DUST cost for a transaction.
DUST cost = base_gas + additionalFeeOverhead
"""
return base_gas + DUST_ADDITIONAL_FEE_OVERHEAD
|
estimate_tx_cost(base_gas)
staticmethod
Estimate DUST cost for a transaction.
DUST cost = base_gas + additionalFeeOverhead
Source code in src/noxipher/token/dust.py
| @staticmethod
def estimate_tx_cost(base_gas: int) -> int:
"""
Estimate DUST cost for a transaction.
DUST cost = base_gas + additionalFeeOverhead
"""
return base_gas + DUST_ADDITIONAL_FEE_OVERHEAD
|
Shielded Token
noxipher.token.shielded.ShieldedToken
Shielded token type descriptor.
Source code in src/noxipher/token/shielded.py
| class ShieldedToken:
"""Shielded token type descriptor."""
TYPE_PREFIX = SHIELDED_TOKEN_TYPE_PREFIX
SYMBOL = "sNIGHT"
IS_PRIVATE = True
|