Class GetProof

java.lang.Object
com.algorand.algosdk.v2.client.common.Query
com.algorand.algosdk.v2.client.algod.GetProof

public class GetProof
extends Query
Get a Merkle proof for a transaction in a block. /v2/blocks/{round}/transactions/{txid}/proof
  • Constructor Details

    • GetProof

      public GetProof​(Client client, java.lang.Long round, java.lang.String txid)
      Parameters:
      round - The round in which the transaction appears.
      txid - The transaction ID for which to generate a proof.
  • Method Details

    • hashtype

      public GetProof hashtype​(Enums.Hashtype hashtype)
      The type of hash function used to create the proof, must be one of: sha512_256 sha256
    • execute

      public Response<ProofResponse> execute() throws java.lang.Exception
      Execute the query.
      Specified by:
      execute in class Query
      Returns:
      the query response object.
      Throws:
      java.lang.Exception
    • execute

      public Response<ProofResponse> execute​(java.lang.String[] headers, java.lang.String[] values) throws java.lang.Exception
      Execute the query with custom headers, there must be an equal number of keys and values or else an error will be generated.
      Specified by:
      execute in class Query
      Parameters:
      headers - an array of header keys
      values - an array of header values
      Returns:
      the query response object.
      Throws:
      java.lang.Exception
    • getRequestString

      protected QueryData getRequestString()
      Specified by:
      getRequestString in class Query