forked from circlecloud/tera
		
	
							
								
								
									
										207
									
								
								src/global.d.ts
									
									
									
									
										vendored
									
									
								
							
							
						
						
									
										207
									
								
								src/global.d.ts
									
									
									
									
										vendored
									
									
								
							@@ -18,15 +18,25 @@ declare global {
 | 
			
		||||
            HTTP_PORT_NUMBER: number;
 | 
			
		||||
            LOCAL_RUN: number;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region main-process.ts
 | 
			
		||||
            PROCESS_NAME: string;
 | 
			
		||||
            POWPROCESS: number;
 | 
			
		||||
            DEBUGPROCESS: any;
 | 
			
		||||
            START_SERVER: number;
 | 
			
		||||
            SetCalcPOW: Function;
 | 
			
		||||
            RunStopPOWProcess: Function;
 | 
			
		||||
            NEW_SERVER_PRIVATE_KEY: number;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region constant.ts
 | 
			
		||||
            UPDATE_CODE_VERSION_NUM: number;
 | 
			
		||||
            MIN_CODE_VERSION_NUM: number;
 | 
			
		||||
            MINING_VERSION_NUM: number;
 | 
			
		||||
            InitParamsArg: Function;
 | 
			
		||||
            CONST_NAME_ARR: string[];
 | 
			
		||||
            MAX_LENGTH_SENDER_MAP: number;
 | 
			
		||||
            DELTA_START_SENDER_MAP: number;
 | 
			
		||||
            NODES_DELTA_CALC_HOUR: number;
 | 
			
		||||
            USE_HARD_API_V2: number;
 | 
			
		||||
            USE_TICKET: number;
 | 
			
		||||
@@ -49,11 +59,11 @@ declare global {
 | 
			
		||||
            SERVER_PRIVATE_KEY_HEX: string;
 | 
			
		||||
            USE_NET_FOR_SERVER_ADDRES: number;
 | 
			
		||||
            NET_WORK_MODE: {
 | 
			
		||||
                ip: string;
 | 
			
		||||
                port: number;
 | 
			
		||||
                UseDirectIP: boolean;
 | 
			
		||||
                NodeWhiteList: string;
 | 
			
		||||
                DoRestartNode: number;
 | 
			
		||||
                ip?: string;
 | 
			
		||||
                port?: number | string;
 | 
			
		||||
                UseDirectIP?: boolean | number;
 | 
			
		||||
                NodeWhiteList?: string;
 | 
			
		||||
                DoRestartNode?: number;
 | 
			
		||||
            }
 | 
			
		||||
            STAT_MODE: number;
 | 
			
		||||
            MAX_STAT_PERIOD: number;
 | 
			
		||||
@@ -140,7 +150,7 @@ declare global {
 | 
			
		||||
            NEW_SIGN_TIME: number;
 | 
			
		||||
            TEST_TRANSACTION_GENERATE: number;
 | 
			
		||||
            TEST_NETWORK: boolean | number;
 | 
			
		||||
            START_PORT_NUMBER: number;
 | 
			
		||||
            START_PORT_NUMBER: number | string;
 | 
			
		||||
            GetNetworkName: Function;
 | 
			
		||||
            DEF_VERSION: string;
 | 
			
		||||
            DEF_CLIENT: string;
 | 
			
		||||
@@ -161,10 +171,6 @@ declare global {
 | 
			
		||||
            NWMODE: number;
 | 
			
		||||
            NOALIVE: number;
 | 
			
		||||
            DEV_MODE: number;
 | 
			
		||||
            START_SERVER: number;
 | 
			
		||||
            SetCalcPOW: Function;
 | 
			
		||||
            RunStopPOWProcess: Function;
 | 
			
		||||
            NEW_SERVER_PRIVATE_KEY: number;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region startlib.ts
 | 
			
		||||
@@ -180,8 +186,8 @@ declare global {
 | 
			
		||||
            ToLogClient: Function;
 | 
			
		||||
 | 
			
		||||
            glCurNumFindArr: number;
 | 
			
		||||
            ArrReconnect: [];
 | 
			
		||||
            ArrConnect: [];
 | 
			
		||||
            ArrReconnect: any[];
 | 
			
		||||
            ArrConnect: any[];
 | 
			
		||||
 | 
			
		||||
            //#region main-process.ts:51
 | 
			
		||||
            SERVER: any;
 | 
			
		||||
@@ -192,7 +198,7 @@ declare global {
 | 
			
		||||
 | 
			
		||||
            //#region main-process.ts:100
 | 
			
		||||
            GetCurrentTime: Function;
 | 
			
		||||
            //#region main-process.ts:100
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region
 | 
			
		||||
            SpeedSignLib: number;
 | 
			
		||||
@@ -269,7 +275,8 @@ declare global {
 | 
			
		||||
 | 
			
		||||
            //#region run-nw.ts
 | 
			
		||||
            NWVERSION: string;
 | 
			
		||||
            HTTP_SERVER_START_OK: boolean;
 | 
			
		||||
            HTTP_SERVER_START_OK: boolean | number;
 | 
			
		||||
            NO_HISTORY_MODE: boolean;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region crypto-library.ts
 | 
			
		||||
@@ -367,15 +374,28 @@ declare global {
 | 
			
		||||
 | 
			
		||||
            //#region base.ts
 | 
			
		||||
            glStopNode: any;
 | 
			
		||||
            GetCheckAccHash: Function;
 | 
			
		||||
            ReadHashFromBufDB: Function;
 | 
			
		||||
            STreeBuffer: any;
 | 
			
		||||
            TestCreateTr: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region html-server.ts
 | 
			
		||||
            HTTPCaller: any;
 | 
			
		||||
            DappTemplateFile: Function;
 | 
			
		||||
            DappSmartCodeFile: Function;
 | 
			
		||||
            DappClientCodeFile
 | 
			
		||||
            SendBlockFile
 | 
			
		||||
 | 
			
		||||
            DappClientCodeFile: Function;
 | 
			
		||||
            SendBlockFile: Function;
 | 
			
		||||
            SetCheckPointOnBlock: Function;
 | 
			
		||||
            SendHTMLMap: any;
 | 
			
		||||
            SendWebFile: Function;
 | 
			
		||||
            GetFileHTMLWithParsing: Function;
 | 
			
		||||
            GetFileHTMLFromMarkdown: Function;
 | 
			
		||||
            GetFileSimple: Function;
 | 
			
		||||
            SaveFileSimple: Function; SetSafeResponce: Function;
 | 
			
		||||
            GetUserContext: Function;
 | 
			
		||||
            EventNum: number;
 | 
			
		||||
            EventMap: any;
 | 
			
		||||
            AddDappEventToGlobalMap: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
@@ -397,10 +417,13 @@ declare global {
 | 
			
		||||
 | 
			
		||||
            //#region block-db.ts
 | 
			
		||||
            BlockDB: any;
 | 
			
		||||
            BLOCK_HEADER_SIZE
 | 
			
		||||
            BLOCK_HEADER_SIZE2
 | 
			
		||||
            DB_VERSION
 | 
			
		||||
 | 
			
		||||
            BLOCK_HEADER_SIZE: number;
 | 
			
		||||
            BLOCK_HEADER_SIZE2: number;
 | 
			
		||||
            DB_VERSION: number;
 | 
			
		||||
            AddInfoChain: Function;
 | 
			
		||||
            AddInfoBlock: Function;
 | 
			
		||||
            GetNodeStrPort: Function;
 | 
			
		||||
            NO_CHECK_BLOCKNUM_ONSTART: number;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region db.ts
 | 
			
		||||
@@ -436,6 +459,7 @@ declare global {
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region transaction-validator.ts
 | 
			
		||||
            CurTrItem: any;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region connect.ts
 | 
			
		||||
@@ -448,10 +472,28 @@ declare global {
 | 
			
		||||
            MIN_PERIOD_PING: number;
 | 
			
		||||
            MAX_PING_FOR_CONNECT: number;
 | 
			
		||||
            MAX_WAIT_PERIOD_FOR_HOT: number;
 | 
			
		||||
            GetGrayServerConnections: Function;
 | 
			
		||||
            SortNodeBlockProcessCount: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region code.ts
 | 
			
		||||
            RestartNode: Function;
 | 
			
		||||
            UnpackCodeFile: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region node.ts
 | 
			
		||||
            SocketStatistic: Function;
 | 
			
		||||
            GetSocketStatus: Function;
 | 
			
		||||
            SetSocketStatus: Function;
 | 
			
		||||
            NodeInfo: Function;
 | 
			
		||||
            NodeName: Function;
 | 
			
		||||
            SocketInfo: Function;
 | 
			
		||||
            FindNodeByAddr: Function;
 | 
			
		||||
            AddNodeInfo: Function;
 | 
			
		||||
            socketInit: Function;
 | 
			
		||||
            socketRead: Function;
 | 
			
		||||
            socketWrite: Function;
 | 
			
		||||
            CloseSocket: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region terahashlib.js
 | 
			
		||||
@@ -486,12 +528,125 @@ declare global {
 | 
			
		||||
            shaarrblock2: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            SendWebFile: Function;
 | 
			
		||||
            //#region wallet-node.js
 | 
			
		||||
            CleanChain: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region lexer.js
 | 
			
		||||
            LexerJS: any;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region coinlib.js
 | 
			
		||||
            ADD: Function;
 | 
			
		||||
            SUB: Function;
 | 
			
		||||
            DIV: Function;
 | 
			
		||||
            ISZERO: Function;
 | 
			
		||||
            FLOAT_FROM_COIN: Function;
 | 
			
		||||
            COIN_FROM_FLOAT: Function;
 | 
			
		||||
            COIN_FROM_STRING: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region block-exchange.ts
 | 
			
		||||
            CAN_START: boolean;
 | 
			
		||||
            StrWarn: string;
 | 
			
		||||
            SUM_LIST_LENGTH: number;
 | 
			
		||||
            CONSENSUS_TIK_TIME: number;
 | 
			
		||||
            CONSENSUS_CHECK_TIME: number;
 | 
			
		||||
            PERIOD_FOR_NEXT_SEND: number;
 | 
			
		||||
            BLOCK_DELTA_ACTIVATE: number;
 | 
			
		||||
            TIME_END_EXCHANGE: number;
 | 
			
		||||
            TIME_START_POW: number;
 | 
			
		||||
            TIME_START_SAVE: number;
 | 
			
		||||
            TIME_START_LOAD: number;
 | 
			
		||||
            TreeBlockBuf: any;
 | 
			
		||||
            DoTxLog: boolean;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region block-loader.ts
 | 
			
		||||
            HistoryBlockBuf: any
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region block-loader-const.ts
 | 
			
		||||
            PERIOD_GET_BLOCK: number;
 | 
			
		||||
            COUNT_HISTORY_BLOCKS_FOR_LOAD: number;
 | 
			
		||||
            COUNT_BLOCKS_FOR_CHECK_POW: number;
 | 
			
		||||
            MAX_DELTA_COUNT_SUM_FOR_LOAD: number;
 | 
			
		||||
            MAX_COUNT_CHAIN_LOAD: number;
 | 
			
		||||
            PACKET_ALIVE_PERIOD: number;
 | 
			
		||||
            PACKET_ALIVE_PERIOD_NEXT_NODE: number;
 | 
			
		||||
            MAX_BLOCK_SEND: number;
 | 
			
		||||
            COUNT_TASK_FOR_NODE: number;
 | 
			
		||||
            FORMAT_BLOCK_TRANSFER: string;
 | 
			
		||||
            WRK_BLOCK_TRANSFER: any;
 | 
			
		||||
            MAX_ACCOUNTS_TRANSFER: number;
 | 
			
		||||
            MAX_SMARTS_TRANSFER: number;
 | 
			
		||||
            FORMAT_REST_TRANSFER: string;
 | 
			
		||||
            FORMAT_SMART_TRANSFER: string;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region server.ts
 | 
			
		||||
            BUF_TYPE: number;
 | 
			
		||||
            STR_TYPE: number;
 | 
			
		||||
            MAX_STR_BUF_DATA: number;
 | 
			
		||||
            MAX_CONNECTION_ACTIVE: number;
 | 
			
		||||
            STAT_PERIOD: number;
 | 
			
		||||
            FORMAT_POW_TO_CLIENT: string;
 | 
			
		||||
            FORMAT_POW_TO_SERVER: string;
 | 
			
		||||
            INTERNET_IP_FROM_STUN: string;
 | 
			
		||||
            ContextPackets: any;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region terahashmining.ts
 | 
			
		||||
            CreateHashMinimal: Function;
 | 
			
		||||
            CreatePOWVersionX: Function;
 | 
			
		||||
            GetNonceHashArr: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region pow-process.ts
 | 
			
		||||
            BlockPump: any;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region tx-process.ts
 | 
			
		||||
            SetStatMode: Function;
 | 
			
		||||
            TreeFindTX
 | 
			
		||||
            bShowDetail: number;
 | 
			
		||||
            ClearDataBase: Function;
 | 
			
		||||
            RewriteAllTransactions: Function;
 | 
			
		||||
            ReWriteDAppTransactions: Function;
 | 
			
		||||
            TXPrepareLoadRest: Function;
 | 
			
		||||
            TXWriteAccArr: Function;
 | 
			
		||||
            TXWriteSmartArr: Function;
 | 
			
		||||
            TXWriteAccHash: Function;
 | 
			
		||||
            EvalCode: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region messager.ts
 | 
			
		||||
            MESSAGER: any;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region update.ts
 | 
			
		||||
            RunOnUpdate: Function;
 | 
			
		||||
            CheckRewriteTr: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region transfer-msg.ts
 | 
			
		||||
            TrName: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            //#region rest_tables.ts
 | 
			
		||||
            DoRest: Function;
 | 
			
		||||
            GetRestArr: Function;
 | 
			
		||||
            GetCurrentRestArr: Function;
 | 
			
		||||
            GetCurrentRestNum: Function;
 | 
			
		||||
            //#endregion
 | 
			
		||||
 | 
			
		||||
            nw: any;
 | 
			
		||||
            GlobalRunMap: any;
 | 
			
		||||
            sha3: any;
 | 
			
		||||
            SHA3BUF: any;
 | 
			
		||||
            shaarr: any;
 | 
			
		||||
            ELECTRON: any;
 | 
			
		||||
            TestTestWaletMode: any;
 | 
			
		||||
        }
 | 
			
		||||
        interface Process {
 | 
			
		||||
            RunRPC: Function;
 | 
			
		||||
@@ -507,6 +662,7 @@ declare global {
 | 
			
		||||
        Path: string;
 | 
			
		||||
        OnMessage: Function;
 | 
			
		||||
        PeriodAlive: number;
 | 
			
		||||
        RunRPC?: Function;
 | 
			
		||||
    }
 | 
			
		||||
    interface Worker {
 | 
			
		||||
        connected: boolean;
 | 
			
		||||
@@ -542,7 +698,12 @@ declare global {
 | 
			
		||||
        DappTransactionList?: Function;
 | 
			
		||||
        DappStaticCall?: Function;
 | 
			
		||||
        GetHistoryTransactions?: Function;
 | 
			
		||||
        GetSupply?: Function;
 | 
			
		||||
        GetTotalSupply?: Function;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    interface Buffer {
 | 
			
		||||
        Read,
 | 
			
		||||
        Write,
 | 
			
		||||
        len
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user