Taquito TypeDocs
    Preparing search index...

    Interface TzReadProvider

    interface TzReadProvider {
        getAdaptiveIssuanceLaunchCycle(
            block: BlockIdentifier,
        ): Promise<AILaunchCycleResponse>;
        getBalance(address: string, block: BlockIdentifier): Promise<BigNumber>;
        getBigMapValue(
            bigMapQuery: BigMapQuery,
            block: BlockIdentifier,
        ): Promise<MichelsonV1Expression>;
        getBlock(block: BlockIdentifier): Promise<BlockResponse>;
        getBlockHash(block: BlockIdentifier): Promise<string>;
        getBlockLevel(block: BlockIdentifier): Promise<number>;
        getBlockTimestamp(block: BlockIdentifier): Promise<string>;
        getChainId(): Promise<string>;
        getCounter(pkh: string, block: BlockIdentifier): Promise<string>;
        getDelegate(
            address: string,
            block: BlockIdentifier,
        ): Promise<string | null>;
        getEntrypoints(contract: string): Promise<EntrypointsResponse>;
        getLiveBlocks(block: BlockIdentifier): Promise<string[]>;
        getNextProtocol(block: BlockIdentifier): Promise<string>;
        getProtocolConstants(
            block: BlockIdentifier,
        ): Promise<
            {
                cost_per_byte: BigNumber;
                hard_gas_limit_per_block: BigNumber;
                hard_gas_limit_per_operation: BigNumber;
                hard_storage_limit_per_operation: BigNumber;
                minimal_block_delay?: BigNumber;
                smart_rollup_origination_size: number;
                time_between_blocks?: BigNumber[];
            },
        >;
        getSaplingDiffByContract(
            contractAddress: string,
            block: BlockIdentifier,
        ): Promise<SaplingDiffResponse>;
        getSaplingDiffById(
            saplingStateQuery: SaplingStateQuery,
            block: BlockIdentifier,
        ): Promise<SaplingDiffResponse>;
        getScript(
            contract: string,
            block: BlockIdentifier,
        ): Promise<ScriptedContracts>;
        getSpendable(address: string, block: BlockIdentifier): Promise<BigNumber>;
        getStorage(
            contract: string,
            block: BlockIdentifier,
        ): Promise<MichelsonV1Expression>;
        isAccountRevealed(
            publicKeyHash: string,
            block: BlockIdentifier,
        ): Promise<boolean>;
    }

    Implemented by

    Index

    Methods

    • Returns the cycle at which the launch of the Adaptive Issuance feature is set to happen. A result of null means that the feature is not yet set to launch.

      Parameters

      Returns Promise<AILaunchCycleResponse>

    • The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'spendable' RPC.

      Parameters

      • address: string

        address from which we want to retrieve the spendable balance

      • block: BlockIdentifier

        from which we want to retrieve the balance

      Returns Promise<BigNumber>

      the balance in mutez

    • Access the delegate of a contract, if any.

      Parameters

      • address: string

        contract address from which we want to retrieve the delegate (baker)

      • block: BlockIdentifier

        from which we want to retrieve the delegate

      Returns Promise<string | null>

      the public key hash of the delegate or null if no delegate

    • Return the list of entrypoints of the contract

      Parameters

      • contract: string

        address of the contract we want to get the entrypoints of

      Returns Promise<EntrypointsResponse>

    • Return a list of the ancestors of the given block which, if referred to as the branch in an operation header, are recent enough for that operation to be included in the current block.

      Parameters

      Returns Promise<string[]>

    • Access protocol constants used in Taquito

      Parameters

      Returns Promise<
          {
              cost_per_byte: BigNumber;
              hard_gas_limit_per_block: BigNumber;
              hard_gas_limit_per_operation: BigNumber;
              hard_storage_limit_per_operation: BigNumber;
              minimal_block_delay?: BigNumber;
              smart_rollup_origination_size: number;
              time_between_blocks?: BigNumber[];
          },
      >

    • Access the sapling state of a smart contract.

      Parameters

      • contractAddress: string

        The address of the smart contract

      • block: BlockIdentifier

        The block you want to retrieve the sapling state from

      Returns Promise<SaplingDiffResponse>

    • Access the script (code and storage) of a smart contract

      Parameters

      • contract: string

        contract address from which we want to retrieve the script

      • block: BlockIdentifier

        from which we want to retrieve the storage value

      Returns Promise<ScriptedContracts>

      Note: The code must be in the JSON format and not contain global constant

    • The spendable balance of a contract (in mutez), also known as liquid balance. Corresponds to tez owned by the contract that are neither staked, nor in unstaked requests, nor in frozen bonds. Identical to the 'balance' RPC.

      Parameters

      • address: string

        address from which we want to retrieve the spendable balance

      • block: BlockIdentifier

        from which we want to retrieve the balance

      Returns Promise<BigNumber>

      the balance in mutez