mirror of
https://github.com/gosticks/iota.lib.java.git
synced 2026-10-03 21:16:59 +00:00
documentation
This commit is contained in:
@@ -2,6 +2,10 @@ package jota.dto.request;
|
||||
|
||||
import jota.IotaAPICommands;
|
||||
|
||||
/**
|
||||
* This class represents the core API request 'attachToTangle'.
|
||||
* It is used to attach trytes to the tangle.
|
||||
**/
|
||||
public class IotaAttachToTangleRequest extends IotaCommandRequest {
|
||||
|
||||
private String trunkTransaction;
|
||||
|
||||
@@ -2,6 +2,9 @@ package jota.dto.request;
|
||||
|
||||
import jota.IotaAPICommands;
|
||||
|
||||
/**
|
||||
* Broadcast a list of transactions to all neighbors. The input trytes for this call are provided by attachToTangle
|
||||
**/
|
||||
public class IotaBroadcastTransactionRequest extends IotaCommandRequest {
|
||||
|
||||
private String[] trytes;
|
||||
|
||||
@@ -2,6 +2,9 @@ package jota.dto.request;
|
||||
|
||||
import jota.IotaAPICommands;
|
||||
|
||||
/**
|
||||
* This class represents the core api request 'getNodeInfo', 'getNeighbors' and 'interruptAttachToTangle'
|
||||
**/
|
||||
public class IotaCommandRequest {
|
||||
|
||||
final String command;
|
||||
|
||||
@@ -2,6 +2,9 @@ package jota.dto.request;
|
||||
|
||||
import jota.IotaAPICommands;
|
||||
|
||||
/**
|
||||
* This class represents the core api request 'findTransactions'
|
||||
**/
|
||||
public class IotaFindTransactionsRequest extends IotaCommandRequest {
|
||||
|
||||
private String[] bundles; // List of bundle hashes. The hashes need to be extended to 81chars by padding the hash with 9's.
|
||||
|
||||
@@ -2,6 +2,9 @@ package jota.dto.request;
|
||||
|
||||
import jota.IotaAPICommands;
|
||||
|
||||
/**
|
||||
* This class represents the core api request 'getBalances'
|
||||
**/
|
||||
public class IotaGetBalancesRequest extends IotaCommandRequest {
|
||||
|
||||
private String[] addresses;
|
||||
|
||||
@@ -4,6 +4,9 @@ import jota.IotaAPICommands;
|
||||
|
||||
import java.util.Collection;
|
||||
|
||||
/**
|
||||
* This class represents the core API request 'getInclusionStates'
|
||||
**/
|
||||
public class IotaGetInclusionStateRequest extends IotaCommandRequest {
|
||||
|
||||
private String[] transactions;
|
||||
|
||||
@@ -2,6 +2,9 @@ package jota.dto.request;
|
||||
|
||||
import jota.IotaAPICommands;
|
||||
|
||||
/**
|
||||
* This class represents the core API request 'getTransactionsToApprove'
|
||||
**/
|
||||
public class IotaGetTransactionsToApproveRequest extends IotaCommandRequest {
|
||||
|
||||
private Integer depth;
|
||||
|
||||
@@ -2,6 +2,9 @@ package jota.dto.request;
|
||||
|
||||
import jota.IotaAPICommands;
|
||||
|
||||
/**
|
||||
* This class represents the core API request 'getTrytes'
|
||||
**/
|
||||
public class IotaGetTrytesRequest extends IotaCommandRequest {
|
||||
|
||||
private String[] hashes;
|
||||
|
||||
@@ -2,6 +2,9 @@ package jota.dto.request;
|
||||
|
||||
import jota.IotaAPICommands;
|
||||
|
||||
/**
|
||||
* This class represents the core API request 'addNeighbors' and 'removeNeighbors'
|
||||
**/
|
||||
public class IotaNeighborsRequest extends IotaCommandRequest {
|
||||
|
||||
private String[] uris;
|
||||
|
||||
@@ -2,6 +2,10 @@ package jota.dto.request;
|
||||
|
||||
import jota.IotaAPICommands;
|
||||
|
||||
/**
|
||||
* This class represents the core API request 'getTransactionsToApprove'
|
||||
* It stores transactions into the local storage. The trytes to be used for this call are returned by attachToTangle.
|
||||
**/
|
||||
public class IotaStoreTransactionsRequest extends IotaCommandRequest {
|
||||
|
||||
private String[] trytes;
|
||||
|
||||
@@ -5,6 +5,9 @@ import org.apache.commons.lang3.builder.HashCodeBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||
|
||||
/**
|
||||
* Abstract response.
|
||||
*/
|
||||
public abstract class AbstractResponse {
|
||||
|
||||
private Long duration;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaNeighborsRequest}
|
||||
**/
|
||||
public class AddNeighborsResponse extends AbstractResponse {
|
||||
|
||||
private int addedNeighbors;
|
||||
|
||||
@@ -5,6 +5,9 @@ import jota.model.Transaction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaGetBalancesRequest}
|
||||
**/
|
||||
public class AnalyzeTransactionResponse extends AbstractResponse {
|
||||
|
||||
private List<Transaction> transactions = new ArrayList<>();
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaBroadcastTransactionRequest}
|
||||
**/
|
||||
public class BroadcastTransactionsResponse extends AbstractResponse {
|
||||
// empty response
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaFindTransactionsRequest}
|
||||
**/
|
||||
public class FindTransactionResponse extends AbstractResponse {
|
||||
|
||||
String[] hashes;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaAttachToTangleRequest}
|
||||
**/
|
||||
public class GetAttachToTangleResponse extends AbstractResponse {
|
||||
|
||||
private String[] trytes;
|
||||
|
||||
@@ -4,6 +4,9 @@ import jota.model.Input;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Response of api request 'getBalancesAndFormatResponse'
|
||||
**/
|
||||
public class GetBalancesAndFormatResponse extends AbstractResponse {
|
||||
|
||||
private List<Input> input;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaGetBalancesRequest}
|
||||
**/
|
||||
public class GetBalancesResponse extends AbstractResponse {
|
||||
|
||||
private String[] balances;
|
||||
|
||||
@@ -5,6 +5,9 @@ import jota.model.Transaction;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Response of api request 'getBundle
|
||||
**/
|
||||
public class GetBundleResponse extends AbstractResponse {
|
||||
|
||||
private List<Transaction> transactions = new ArrayList<>();
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaGetInclusionStateRequest}
|
||||
**/
|
||||
public class GetInclusionStateResponse extends AbstractResponse {
|
||||
|
||||
boolean[] states;
|
||||
|
||||
@@ -1,10 +0,0 @@
|
||||
package jota.dto.response;
|
||||
|
||||
public class GetMilestoneResponse extends AbstractResponse {
|
||||
|
||||
private String milestone;
|
||||
|
||||
public String getMilestone() {
|
||||
return milestone;
|
||||
}
|
||||
}
|
||||
@@ -5,6 +5,9 @@ import jota.model.Neighbor;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaCommandRequest}
|
||||
**/
|
||||
public class GetNeighborsResponse extends AbstractResponse {
|
||||
|
||||
private List<Neighbor> neighbors = new ArrayList<>();
|
||||
|
||||
@@ -2,6 +2,9 @@ package jota.dto.response;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* Response of api request 'getNewAddress'
|
||||
**/
|
||||
public class GetNewAddressResponse extends AbstractResponse {
|
||||
|
||||
private List<String> addresses;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaNeighborsRequest}
|
||||
**/
|
||||
public class GetNodeInfoResponse extends AbstractResponse {
|
||||
|
||||
private String appName;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaCommandRequest}
|
||||
**/
|
||||
public class GetTipsResponse extends AbstractResponse {
|
||||
|
||||
private String[] hashes;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaGetTransactionsToApproveRequest}
|
||||
**/
|
||||
public class GetTransactionsToApproveResponse extends AbstractResponse {
|
||||
|
||||
private String trunkTransaction;
|
||||
|
||||
@@ -3,8 +3,8 @@ package jota.dto.response;
|
||||
import jota.model.Bundle;
|
||||
|
||||
/**
|
||||
* Created by pinpong on 28.12.16.
|
||||
*/
|
||||
* Response of api request 'getTransfer'
|
||||
**/
|
||||
public class GetTransferResponse extends AbstractResponse {
|
||||
|
||||
private Bundle[] transferBundle;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaGetTrytesRequest}
|
||||
**/
|
||||
public class GetTrytesResponse extends AbstractResponse {
|
||||
|
||||
private String[] trytes;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaCommandRequest}
|
||||
**/
|
||||
public class InterruptAttachingToTangleResponse extends AbstractResponse {
|
||||
// empty response
|
||||
}
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaNeighborsRequest}
|
||||
**/
|
||||
public class RemoveNeighborsResponse extends AbstractResponse {
|
||||
|
||||
private int removedNeighbors;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Created by pinpong on 01.01.17.
|
||||
*/
|
||||
* Response of api request 'replayBundle'
|
||||
**/
|
||||
public class ReplayBundleResponse extends AbstractResponse {
|
||||
|
||||
private Boolean[] successfully;
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Created by pinpong on 28.12.16.
|
||||
*/
|
||||
* Response of api request 'sendTransfer'
|
||||
**/
|
||||
public class SendTransferResponse extends AbstractResponse {
|
||||
|
||||
private Boolean[] successfully;
|
||||
|
||||
@@ -1,5 +1,8 @@
|
||||
package jota.dto.response;
|
||||
|
||||
/**
|
||||
* Response of {@link jota.dto.request.IotaStoreTransactionsRequest}
|
||||
**/
|
||||
public class StoreTransactionsResponse extends AbstractResponse {
|
||||
public StoreTransactionsResponse(long duration) {
|
||||
setDuration(duration);
|
||||
|
||||
Reference in New Issue
Block a user