import org.json.simple.JsonObject; //导入方法依赖的package包/类
static JSONObject unconfirmedTransaction(Transaction transaction) {
JSONObject json = new JSONObject();
json.put("type", transaction.getType().getType());
json.put("subtype", transaction.getType().getSubtype());
json.put("timestamp", transaction.getTimestamp());
json.put("deadline", transaction.getDeadline());
json.put("senderPublicKey", Convert.toHexString(transaction.getSenderPublicKey()));
if (transaction.getRecipientId() != 0) {
putAccount(json, "recipient", transaction.getRecipientId());
}
json.put("amountNQT", String.valueOf(transaction.getAmountNQT()));
json.put("feeNQT", String.valueOf(transaction.getFeeNQT()));
if (transaction.getReferencedTransactionFullHash() != null) {