@SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class AddressAndAmount extends BaseClass {

	private String address;
	private BigDecimal amount;

	public AddressAndAmount(String address, BigDecimal amount) {
		this.address = address;
		this.amount = amount.setScale(BitcoindClient.SCALE);
	}

} public enum SignatureHashAlgorithm {

	ALL,
	NONE,
	SINGLE,
	ALL_ANYONECANPAY("ALL|ANYONECANPAY"),
	NONE_ANYONECANPAY("NONE|ANYONECANPAY"),
	SINGLE_ANYONECANPAY("SINGLE|ANYONECANPAY");

	private String value;

	private SignatureHashAlgorithm() {
		value = name();
	}

	private SignatureHashAlgorithm(String value) {
		this.value = value;
	}
	
	public String toString() {
		return value;
	};

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
@JsonPropertyOrder({"txid", "vout"})
public class TransactionOutputRef extends BaseClass {

	@JsonProperty("txid")
	private String txId;
	
	@JsonProperty("vout")
	private Integer vout;

	/**
	 * Full constructor.
	 * 
	 * @param txId - transaction id.
	 * @param vout - output number.
	 */
	public TransactionOutputRef(@JsonProperty("txid") String txId, @JsonProperty("vout") Integer vout) {
		this.txId = txId;
		this.vout = vout;
	}

	
} public enum AddNodeAction {

	/**
	 * Add the given node.
	 */
	ADD("add"),

	/**
	 * Remove the given node.
	 */
	REMOVE("remove"),

	/**
	 * Try connecting to the given node once.
	 */
	ONE_TRY("onetry");

	private String value;

	private AddNodeAction(String value) {
		this.value = value;
	}

	@Override
	public String toString() {
		return value;
	}

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class TemplateRequest extends JsonExtra {

	private String[] capabilities;

	@JsonInclude(Include.NON_EMPTY)
	private String mode;

	/**
	 * Constructor.
	 *
	 * @param capabilities - SHOULD contain a list of the following, to indicate client-side support:
	 * "longpoll", "coinbasetxn", "coinbasevalue", "proposal", "serverlist",
	 * "workid", and any of the mutations (see {@link https://en.bitcoin.it/wiki/BIP_0022}).
	 * @param mode - MUST be "template" or omitted (null).
	 */
	public TemplateRequest(String[] capabilities, String mode) {
		this.capabilities = capabilities;
		this.mode = mode;
	}

} @SuppressWarnings("serial")
public class BigDecimalResponse extends BitcoindJsonRpcResponse<BigDecimal> {

} @SuppressWarnings("serial")
public class BooleanResponse extends BitcoindJsonRpcResponse<Boolean> {

} @SuppressWarnings("serial")
public class CreateMultiSigResponse extends BitcoindJsonRpcResponse<CreateMultiSigResult> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class DecodeRawTransactionResponse extends BitcoindJsonRpcResponse<DecodeRawTransactionResult> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class GetAddedNodeInfoResponse extends BitcoindJsonRpcResponse<AddedNodeInfo[]> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class GetBlockResponse extends BitcoindJsonRpcResponse<GetBlockResult> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class GetBlockTemplateResponse extends BitcoindJsonRpcResponse<GetBlockTemplateResult> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class GetInfoResponse extends BitcoindJsonRpcResponse<GetInfoResult> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class GetMiningInfoResponse extends BitcoindJsonRpcResponse<GetMiningInfoResult> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class GetPeerInfoResponse extends BitcoindJsonRpcResponse<PeerInfo[]> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class GetRawTransactionResponse extends BitcoindJsonRpcResponse<GetRawTransactionResult> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class GetTransactionResponse extends BitcoindJsonRpcResponse<GetTransactionResult> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class GetTxOutResponse extends BitcoindJsonRpcResponse<GetTxOutResult> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class GetTxOutSetInfoResponse extends BitcoindJsonRpcResponse<GetTxOutSetInfoResult> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class GetWorkResponse extends BitcoindJsonRpcResponse<GetWorkResult> {

} @SuppressWarnings("serial")
public class IntegerResponse extends BitcoindJsonRpcResponse<Integer> {

} @SuppressWarnings("serial")
public class ListAccountsResponse extends BitcoindJsonRpcResponse<ListAccountsResult> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class ListAddressGroupingsResponse extends BitcoindJsonRpcResponse<ListAddressGroupingsResult[]> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class ListLockUnspentResponse extends BitcoindJsonRpcResponse<TransactionOutputRef[]> {

} @SuppressWarnings("serial")
public class ListReceivedByAccountResponse extends BitcoindJsonRpcResponse<ListReceivedByAccountResult[]> {

} @SuppressWarnings("serial")
public class ListReceivedByAddressResponse extends BitcoindJsonRpcResponse<ListReceivedByAddressResult[]> {

} @SuppressWarnings("serial")
public class ListTransactionsResponse extends BitcoindJsonRpcResponse<TransactionData[]> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class ListUnspentResponse extends BitcoindJsonRpcResponse<ListUnspentResult[]> {

} @SuppressWarnings("serial")
public class LongResponse extends BitcoindJsonRpcResponse<Long> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class SignRawTransactionResponse extends BitcoindJsonRpcResponse<SignRawTransactionResult> {

} @SuppressWarnings("serial")
public class StringArrayResponse extends BitcoindJsonRpcResponse<String[]> {

} @SuppressWarnings("serial")
public class StringResponse extends BitcoindJsonRpcResponse<String> {

} @SuppressWarnings("serial")
@RooJavaBean(settersByDefault = false)
public class ValidateAddressResponse extends BitcoindJsonRpcResponse<ValidateAddressResult> {

} @SuppressWarnings("serial")
public class VoidResponse extends BitcoindJsonRpcResponse<Object> {

}
import java.math.BigDecimal;
import java.util.List;
import org.springframework.beans.factory.annotation.Required;
import dk.clanie.bitcoin.AddressAndAmount;
import dk.clanie.bitcoin.SignatureHashAlgorithm;
import dk.clanie.bitcoin.TransactionOutputRef;
import dk.clanie.bitcoin.client.request.AddNodeAction;
import dk.clanie.bitcoin.client.request.TemplateRequest;
import dk.clanie.bitcoin.client.response.BigDecimalResponse;
import dk.clanie.bitcoin.client.response.BooleanResponse;
import dk.clanie.bitcoin.client.response.CreateMultiSigResponse;
import dk.clanie.bitcoin.client.response.DecodeRawTransactionResponse;
import dk.clanie.bitcoin.client.response.GetAddedNodeInfoResponse;
import dk.clanie.bitcoin.client.response.GetBlockResponse;
import dk.clanie.bitcoin.client.response.GetBlockTemplateResponse;
import dk.clanie.bitcoin.client.response.GetInfoResponse;
import dk.clanie.bitcoin.client.response.GetMiningInfoResponse;
import dk.clanie.bitcoin.client.response.GetPeerInfoResponse;
import dk.clanie.bitcoin.client.response.GetRawTransactionResponse;
import dk.clanie.bitcoin.client.response.GetTransactionResponse;
import dk.clanie.bitcoin.client.response.GetTxOutResponse;
import dk.clanie.bitcoin.client.response.GetTxOutSetInfoResponse;
import dk.clanie.bitcoin.client.response.GetWorkResponse;
import dk.clanie.bitcoin.client.response.IntegerResponse;
import dk.clanie.bitcoin.client.response.ListAccountsResponse;
import dk.clanie.bitcoin.client.response.ListAddressGroupingsResponse;
import dk.clanie.bitcoin.client.response.ListLockUnspentResponse;
import dk.clanie.bitcoin.client.response.ListReceivedByAccountResponse;
import dk.clanie.bitcoin.client.response.ListReceivedByAddressResponse;
import dk.clanie.bitcoin.client.response.ListTransactionsResponse;
import dk.clanie.bitcoin.client.response.ListUnspentResponse;
import dk.clanie.bitcoin.client.response.LongResponse;
import dk.clanie.bitcoin.client.response.SignRawTransactionResponse;
import dk.clanie.bitcoin.client.response.StringArrayResponse;
import dk.clanie.bitcoin.client.response.StringResponse;
import dk.clanie.bitcoin.client.response.ValidateAddressResponse;
import dk.clanie.bitcoin.client.response.VoidResponse;
package dk.clanie.bitcoin.client;




public interface BitcoindClient {

	public static final int SCALE = 8;

	/**
	 * Sets url for calling bitcoind.
	 * 
	 * @param url
	 */
	@Required
	void setUrl(String url);

	/**
	 * Add a nrequired-to-sign multisignature address to the wallet.
	 * <p>
	 * Each key is a bitcoin address or hex-encoded public key. If <code>account</code>
	 * is specified, the new address is assigned to the given account.
	 * 
	 * @param nrequired - number of signatures required.
	 * @param keys - keys which may sign. Each is a bitcoin address or a hex-encoded public key.
	 * @param account optional. If given the new address is assigned to this account.
	 * @return {@link StringResponse}.
	 */
	StringResponse addMultiSigAddress(int nrequired, List<String> keys,