A DAP.Core module is designed to work with logging and 256-bits math. This module includes the following classes:
DAP.Core.logIt
A class represents logging methods.DAP.Core.Math
A class represents a 256-bits math.DAP.Core.AppContext
A class represents an application context (only for plugins).class DAP.Core.logIt
This class provides logging fuctions.
static method DAP.Core.logIt.debug(message: str)
Logs a message
with the DEBUG
logging level.
static method DAP.Core.logIt.info(message: str)
Logs a message
with the INFO
logging level.
static method DAP.Core.logIt.notice(message: str)
Logs a message
with the NOTICE
logging level.
static method DAP.Core.logIt.message(message: str)
Logs a message
with the MESSAGE
logging level.
static method DAP.Core.logIt.dap(message: str)
Logs a message
with the DAP
logging level.
static method DAP.Core.logIt.warning(message: str)
Logs a message
with the WARNING
logging level.
static method DAP.Core.logIt.att(message: str)
Logs a message
with the ATT
logging level.
static method DAP.Core.logIt.error(message: str)
Logs a message
with the ERROR
logging level.
static method DAP.Core.logIt.critical(message: str)
Logs a message
with the CRITIAL
logging level.
class DAP.Core.Math
This class provides methods with 256-bit coins.
constructor DAP.Core.Math(number: str) -> DAP.Core.Math
Creates a new instance of the DAP.Core.Math
object. The number
is string that consists a number.
getter DAP.Core.Math.coins -> str
Gets the number of coins.
getter DAP.Core.Math.balance -> str
Gets the balance.
static method DAP.Core.Math.balanceToCoins(int) -> str
Calculates the number of coins from the number of datoshi.
The class supports the following mathematical operations: +
, -
, *
and /
.
class DAP.Core.AppContext
This class provides methods for working with application context.
static method DAP.Core.AppContext.getServer(server: DAP.Network.ServerCore) -> None
Gets a current CellFrame Node server and saves in the server
. Returns nothing.
static method DAP.Core.AppContext.getHttp() -> DAP.Network.Http
Gets a current CellFrame Node HTTP server . Returns an DAP.Network
object.