Class ReceiptRoutesApi
- java.lang.Object
-
- io.nem.symbol.sdk.openapi.jersey2.api.ReceiptRoutesApi
-
@Generated(value="org.openapitools.codegen.languages.JavaClientCodegen", date="2020-05-15T14:38:14.328808-03:00[America/Argentina/Buenos_Aires]") public class ReceiptRoutesApi extends java.lang.Object
-
-
Constructor Summary
Constructors Constructor Description ReceiptRoutesApi()ReceiptRoutesApi(ApiClient apiClient)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ApiClientgetApiClient()StatementsDTOgetBlockReceipts(java.math.BigInteger height)Get receipts from a block Returns the receipts linked to a block.ApiResponse<StatementsDTO>getBlockReceiptsWithHttpInfo(java.math.BigInteger height)Get receipts from a block Returns the receipts linked to a block.MerkleProofInfoDTOgetMerkleReceipts(java.math.BigInteger height, java.lang.String hash)Get the merkle path for a given a receipt statement hash and block Returns the merkle path for a receipt statement or resolution linked to a block.ApiResponse<MerkleProofInfoDTO>getMerkleReceiptsWithHttpInfo(java.math.BigInteger height, java.lang.String hash)Get the merkle path for a given a receipt statement hash and block Returns the merkle path for a receipt statement or resolution linked to a block.voidsetApiClient(ApiClient apiClient)
-
-
-
Constructor Detail
-
ReceiptRoutesApi
public ReceiptRoutesApi()
-
ReceiptRoutesApi
public ReceiptRoutesApi(ApiClient apiClient)
-
-
Method Detail
-
getApiClient
public ApiClient getApiClient()
-
setApiClient
public void setApiClient(ApiClient apiClient)
-
getBlockReceipts
public StatementsDTO getBlockReceipts(java.math.BigInteger height) throws ApiException
Get receipts from a block Returns the receipts linked to a block.- Parameters:
height- Block height. (required)- Returns:
- StatementsDTO
- Throws:
ApiException- if fails to make API call- Http Response Details
Status Code Description Response Headers 200 success - 404 ResourceNotFound - 409 InvalidArgument -
-
getBlockReceiptsWithHttpInfo
public ApiResponse<StatementsDTO> getBlockReceiptsWithHttpInfo(java.math.BigInteger height) throws ApiException
Get receipts from a block Returns the receipts linked to a block.- Parameters:
height- Block height. (required)- Returns:
- ApiResponse<StatementsDTO>
- Throws:
ApiException- if fails to make API call- Http Response Details
Status Code Description Response Headers 200 success - 404 ResourceNotFound - 409 InvalidArgument -
-
getMerkleReceipts
public MerkleProofInfoDTO getMerkleReceipts(java.math.BigInteger height, java.lang.String hash) throws ApiException
Get the merkle path for a given a receipt statement hash and block Returns the merkle path for a receipt statement or resolution linked to a block. The merkle path is the minimum number of nodes needed to calculate the merkle root. Steps to calculate the merkle root: 1. proofHash = hash (leaf). 2. Concatenate proofHash with the first unprocessed item from the merklePath list as follows: * a) If item.position == left -> proofHash = sha_256(item.hash + proofHash). * b) If item.position == right -> proofHash = sha_256(proofHash+ item.hash). 3. Repeat 2. for every item in the merklePath list. 4. Compare if the calculated proofHash equals the one recorded in the block header (block.receiptsHash) to verify if the statement was linked with the block.- Parameters:
height- Block height. (required)hash- Receipt hash. (required)- Returns:
- MerkleProofInfoDTO
- Throws:
ApiException- if fails to make API call- Http Response Details
Status Code Description Response Headers 200 success - 404 ResourceNotFound - 409 InvalidArgument -
-
getMerkleReceiptsWithHttpInfo
public ApiResponse<MerkleProofInfoDTO> getMerkleReceiptsWithHttpInfo(java.math.BigInteger height, java.lang.String hash) throws ApiException
Get the merkle path for a given a receipt statement hash and block Returns the merkle path for a receipt statement or resolution linked to a block. The merkle path is the minimum number of nodes needed to calculate the merkle root. Steps to calculate the merkle root: 1. proofHash = hash (leaf). 2. Concatenate proofHash with the first unprocessed item from the merklePath list as follows: * a) If item.position == left -> proofHash = sha_256(item.hash + proofHash). * b) If item.position == right -> proofHash = sha_256(proofHash+ item.hash). 3. Repeat 2. for every item in the merklePath list. 4. Compare if the calculated proofHash equals the one recorded in the block header (block.receiptsHash) to verify if the statement was linked with the block.- Parameters:
height- Block height. (required)hash- Receipt hash. (required)- Returns:
- ApiResponse<MerkleProofInfoDTO>
- Throws:
ApiException- if fails to make API call- Http Response Details
Status Code Description Response Headers 200 success - 404 ResourceNotFound - 409 InvalidArgument -
-
-