uk.oczadly.karl.jnano.rpc.request.node.RequestPendingExists Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of jnano Show documentation
Show all versions of jnano Show documentation
A comprehensive Java library for the Nano (and Banano) cryptocurrency.
/*
* Copyright (c) 2020 Karl Oczadly ([email protected])
* Licensed under the MIT License
*/
package uk.oczadly.karl.jnano.rpc.request.node;
import com.google.gson.annotations.Expose;
import com.google.gson.annotations.SerializedName;
import uk.oczadly.karl.jnano.rpc.request.RpcRequest;
import uk.oczadly.karl.jnano.rpc.response.ResponseExists;
/**
* This request class is used to check whether a specified block is still pending.
*
Calls the RPC command {@code pending_exists}, and returns a {@link ResponseExists} data object.
*
* @see Official RPC documentation
*/
public class RequestPendingExists extends RpcRequest {
@Expose @SerializedName("hash")
private final String blockHash;
/**
* @param blockHash the block's hash
*/
public RequestPendingExists(String blockHash) {
super("pending_exists", ResponseExists.class);
this.blockHash = blockHash;
}
/**
* @return the requested block's hash
*/
public String getBlockHash() {
return blockHash;
}
}