<?php
/**
 * This file is automatic generated by build_docs.php file
 * and is used only for autocomplete in multiple IDE
 * don't modify manually.
 */

namespace danog\MadelineProto\TON;

interface liteServer
{
    /**
     *
     *
     * @return liteServer.MasterchainInfo
     */
    public function getMasterchainInfo();

    /**
     *
     *
     * Parameters:
     * * `#` **mode** -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.MasterchainInfoExt
     */
    public function getMasterchainInfoExt($params);

    /**
     *
     *
     * @return liteServer.CurrentTime
     */
    public function getTime();

    /**
     *
     *
     * @return liteServer.Version
     */
    public function getVersion();

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **id** -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.BlockData
     */
    public function getBlock($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **id** -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.BlockState
     */
    public function getState($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **id**   -
     * * `#`                  **mode** -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.BlockHeader
     */
    public function getBlockHeader($params);

    /**
     *
     *
     * Parameters:
     * * `bytes` **body** -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.SendMsgStatus
     */
    public function sendMessage($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt`   **id**      -
     * * `liteServer.accountId` **account** -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.AccountState
     */
    public function getAccountState($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **id**        -
     * * `int`                **workchain** -
     * * `long`               **shard**     -
     * * `Bool`               **exact**     -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.ShardInfo
     */
    public function getShardInfo($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **id** -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.AllShardsInfo
     */
    public function getAllShardsInfo($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt`   **id**      -
     * * `liteServer.accountId` **account** -
     * * `long`                 **lt**      -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.TransactionInfo
     */
    public function getOneTransaction($params);

    /**
     *
     *
     * Parameters:
     * * `#`                    **count**   -
     * * `liteServer.accountId` **account** -
     * * `long`                 **lt**      -
     * * `int256`               **hash**    -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.TransactionList
     */
    public function getTransactions($params);

    /**
     *
     *
     * Parameters:
     * * `#`               **mode**  -
     * * `tonNode.blockId` **id**    -
     * * `long`            **lt**    - Optional:
     * * `int`             **utime** - Optional:.
     *
     * @param array $params Parameters
     *
     * @return liteServer.BlockHeader
     */
    public function lookupBlock($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt`        **id**            -
     * * `#`                         **mode**          -
     * * `#`                         **count**         -
     * * `liteServer.transactionId3` **after**         - Optional:
     * * `boolean`                   **reverse_order** - Optional:
     * * `boolean`                   **want_proof**    - Optional:.
     *
     * @param array $params Parameters
     *
     * @return liteServer.BlockTransactions
     */
    public function listBlockTransactions($params);

    /**
     *
     *
     * Parameters:
     * * `#`                  **mode**         -
     * * `tonNode.blockIdExt` **known_block**  -
     * * `tonNode.blockIdExt` **target_block** - Optional:.
     *
     * @param array $params Parameters
     *
     * @return liteServer.PartialBlockProof
     */
    public function getBlockProof($params);

    /**
     *
     *
     * Parameters:
     * * `#`                  **mode** -
     * * `tonNode.blockIdExt` **id**   -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.ConfigInfo
     */
    public function getConfigAll($params);

    /**
     *
     *
     * Parameters:
     * * `#`                  **mode**       -
     * * `tonNode.blockIdExt` **id**         -
     * * `[int]`              **param_list** -.
     *
     * @param array $params Parameters
     *
     * @return liteServer.ConfigInfo
     */
    public function getConfigParams($params);

    /**
     *
     *
     * Parameters:
     * * `#`                  **mode**           -
     * * `tonNode.blockIdExt` **id**             -
     * * `int`                **limit**          -
     * * `int256`             **start_after**    - Optional:
     * * `int`                **modified_after** - Optional:.
     *
     * @param array $params Parameters
     *
     * @return liteServer.ValidatorStats
     */
    public function getValidatorStats($params);

    /**
     *
     *
     * @return object
     */
    public function queryPrefix();

    /**
     *
     *
     * Parameters:
     * * `bytes` **data** -.
     *
     * @param array $params Parameters
     *
     * @return object
     */
    public function query($params);

    /**
     *
     *
     * Parameters:
     * * `int` **seqno**      -
     * * `int` **timeout_ms** -.
     *
     * @param array $params Parameters
     *
     * @return object
     */
    public function waitMasterchainSeqno($params);
}

interface tcp
{
    /**
     *
     *
     * @return tcp.Pong
     */
    public function ping();
}

interface dht
{
    /**
     *
     *
     * @return dht.Pong
     */
    public function ping();

    /**
     *
     *
     * Parameters:
     * * `dht.value` **value** -.
     *
     * @param array $params Parameters
     *
     * @return dht.Stored
     */
    public function store($params);

    /**
     *
     *
     * Parameters:
     * * `int256` **key** -
     * * `int`    **k**   -.
     *
     * @param array $params Parameters
     *
     * @return dht.Nodes
     */
    public function findNode($params);

    /**
     *
     *
     * Parameters:
     * * `int256` **key** -
     * * `int`    **k**   -.
     *
     * @param array $params Parameters
     *
     * @return dht.ValueResult
     */
    public function findValue($params);

    /**
     *
     *
     * @return dht.Node
     */
    public function getSignedAddressList();

    /**
     *
     *
     * Parameters:
     * * `dht.node` **node** -.
     *
     * @param array $params Parameters
     *
     * @return true
     */
    public function query($params);
}

interface overlay
{
    /**
     *
     *
     * Parameters:
     * * `overlay.nodes` **peers** -.
     *
     * @param array $params Parameters
     *
     * @return overlay.Nodes
     */
    public function getRandomPeers($params);

    /**
     *
     *
     * Parameters:
     * * `int256` **overlay** -.
     *
     * @param array $params Parameters
     *
     * @return true
     */
    public function query($params);

    /**
     *
     *
     * Parameters:
     * * `int256` **hash** -.
     *
     * @param array $params Parameters
     *
     * @return overlay.Broadcast
     */
    public function getBroadcast($params);

    /**
     *
     *
     * Parameters:
     * * `overlay.broadcastList` **list** -.
     *
     * @param array $params Parameters
     *
     * @return overlay.BroadcastList
     */
    public function getBroadcastList($params);
}

interface catchain
{
    /**
     *
     *
     * Parameters:
     * * `int256` **block** -.
     *
     * @param array $params Parameters
     *
     * @return catchain.BlockResult
     */
    public function getBlock($params);

    /**
     *
     *
     * Parameters:
     * * `[int256]` **blocks** -.
     *
     * @param array $params Parameters
     *
     * @return catchain.Sent
     */
    public function getBlocks($params);

    /**
     *
     *
     * Parameters:
     * * `[int]` **rt** -.
     *
     * @param array $params Parameters
     *
     * @return catchain.Difference
     */
    public function getDifference($params);

    /**
     *
     *
     * Parameters:
     * * `int256`   **block**   -
     * * `long`     **height**  -
     * * `[int256]` **stop_if** -.
     *
     * @param array $params Parameters
     *
     * @return catchain.Sent
     */
    public function getBlockHistory($params);
}

interface validatorSession
{
    /**
     *
     *
     * Parameters:
     * * `long` **hash** -.
     *
     * @param array $params Parameters
     *
     * @return validatorSession.Pong
     */
    public function ping($params);

    /**
     *
     *
     * Parameters:
     * * `int`                          **round** -
     * * `validatorSession.candidateId` **id**    -.
     *
     * @param array $params Parameters
     *
     * @return validatorSession.Candidate
     */
    public function downloadCandidate($params);
}

interface tonNode
{
    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **prev_block** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.BlockDescription
     */
    public function getNextBlockDescription($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **prev_block** -
     * * `int`                **limit**      -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.BlocksDescription
     */
    public function getNextBlocksDescription($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **next_block**   -
     * * `int`                **limit**        -
     * * `int`                **cutoff_seqno** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.BlocksDescription
     */
    public function getPrevBlocksDescription($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block**         -
     * * `Bool`               **allow_partial** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.PreparedProof
     */
    public function prepareBlockProof($params);

    /**
     *
     *
     * Parameters:
     * * `[tonNode.blockIdExt]` **blocks**        -
     * * `Bool`                 **allow_partial** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.PreparedProof
     */
    public function prepareBlockProofs($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.Prepared
     */
    public function prepareBlock($params);

    /**
     *
     *
     * Parameters:
     * * `[tonNode.blockIdExt]` **blocks** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.Prepared
     */
    public function prepareBlocks($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block**             -
     * * `tonNode.blockIdExt` **masterchain_block** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.PreparedState
     */
    public function preparePersistentState($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.PreparedState
     */
    public function prepareZeroState($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block**    -
     * * `int`                **max_size** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.KeyBlocks
     */
    public function getNextKeyBlockIds($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **prev_block** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.DataFull
     */
    public function downloadNextBlockFull($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.DataFull
     */
    public function downloadBlockFull($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.Data
     */
    public function downloadBlock($params);

    /**
     *
     *
     * Parameters:
     * * `[tonNode.blockIdExt]` **blocks** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.DataList
     */
    public function downloadBlocks($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block**             -
     * * `tonNode.blockIdExt` **masterchain_block** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.Data
     */
    public function downloadPersistentState($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block**             -
     * * `tonNode.blockIdExt` **masterchain_block** -
     * * `long`               **offset**            -
     * * `long`               **max_size**          -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.Data
     */
    public function downloadPersistentStateSlice($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.Data
     */
    public function downloadZeroState($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.Data
     */
    public function downloadBlockProof($params);

    /**
     *
     *
     * Parameters:
     * * `[tonNode.blockIdExt]` **blocks** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.DataList
     */
    public function downloadBlockProofs($params);

    /**
     *
     *
     * Parameters:
     * * `tonNode.blockIdExt` **block** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.Data
     */
    public function downloadBlockProofLink($params);

    /**
     *
     *
     * Parameters:
     * * `[tonNode.blockIdExt]` **blocks** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.DataList
     */
    public function downloadBlockProofLinks($params);

    /**
     *
     *
     * Parameters:
     * * `int` **masterchain_seqno** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.ArchiveInfo
     */
    public function getArchiveInfo($params);

    /**
     *
     *
     * Parameters:
     * * `long` **archive_id** -
     * * `long` **offset**     -
     * * `int`  **max_size**   -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.Data
     */
    public function getArchiveSlice($params);

    /**
     *
     *
     * @return tonNode.Capabilities
     */
    public function getCapabilities();

    /**
     *
     *
     * Parameters:
     * * `tonNode.externalMessage` **message** -.
     *
     * @param array $params Parameters
     *
     * @return tonNode.Success
     */
    public function slave($params);

    /**
     *
     *
     * @return object
     */
    public function query();
}

interface adnl
{
    /**
     *
     *
     * Parameters:
     * * `long` **value** -.
     *
     * @param array $params Parameters
     *
     * @return adnl.Pong
     */
    public function ping($params);
}

interface engine
{
    /**
     *
     *
     * Parameters:
     * * `PrivateKey` **key**                 -
     * * `int256`     **key_hash**            -
     * * `int`        **category**            -
     * * `int`        **election_date**       -
     * * `int`        **ttl**                 -
     * * `int256`     **permanent_key_hash**  -
     * * `int256`     **adnl_id**             -
     * * `int`        **port**                -
     * * `int256`     **peer_key**            -
     * * `int`        **permissions**         -
     * * `int`        **ip**                  -
     * * `[int]`      **categories**          -
     * * `[int]`      **priority_categories** -
     * * `int`        **in_ip**               -
     * * `int`        **in_port**             -
     * * `int`        **out_ip**              -
     * * `int`        **out_port**            -
     * * `adnl.Proxy` **proxy**               -
     * * `bytes`      **data**                -
     * * `int`        **verbosity**           -
     * * `string`     **election_addr**       -
     * * `string`     **wallet**              -
     * * `int256`     **id**                  -.
     *
     * @param array $params Parameters
     *
     * @return object
     */
    public function validator($params);
}

class InternalDoc extends APIFactory
{
    /**
         * Connect to the lite endpoints specified in the config file.
         *
         * @param string $config Path to config file
         *
         * @return \Generator
         */
    public function connect(string $config, array $extra = [])
    {
        return $this->__call(__FUNCTION__, [$config, $extra]);
    }
    /**
     * Logger.
     *
     * @param string $param Parameter
     * @param int    $level Logging level
     * @param string $file  File where the message originated
     *
     * @return void
     */
    public function logger($param, int $level = \danog\MadelineProto\Logger::NOTICE, string $file = '', array $extra = []): void
    {
        $this->API->logger($param, $level, $file, $extra);
    }
    /**
     * Call lite method.
     *
     * @param string $methodName Method name
     * @param array  $args       Arguments
     *
     * @return \Generator
     */
    public function methodCall(string $methodName, array $args = [
    ], array $aargs = [
    ], array $extra = [])
    {
        return $this->__call(__FUNCTION__, [$methodName, $args, $aargs, $extra]);
    }
    /**
     * Asynchronously run async callable.
     *
     * @param callable $func Function
     *
     * @return \Generator
     */
    public function loop(callable $func, array $extra = [])
    {
        return $this->__call(__FUNCTION__, [$func, $extra]);
    }
    /**
     * Convert parameters.
     *
     * @param array $parameters Parameters
     *
     * @return array
     */
    public function botAPItoMTProto(array $parameters, array $extra = []): array
    {
        return $this->API->botAPItoMTProto($parameters, $extra);
    }
    /**
     * Get TL method namespaces.
     *
     * @return array
     */
    public function getMethodNamespaces(array $extra = []): array
    {
        return $this->API->getMethodNamespaces($extra);
    }
}
