-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Xboc
committed
Sep 2, 2020
1 parent
ef98682
commit 526684e
Showing
63 changed files
with
5,529 additions
and
7 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
41 changes: 41 additions & 0 deletions
41
SignSdk/src/main/java/com/onlychain/signsdk/bean/AccountBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
package com.onlychain.signsdk.bean; | ||
|
||
|
||
import com.onlychain.signsdk.utils.OcMath; | ||
|
||
public class AccountBean { | ||
private String privateKey; | ||
private String publicKey; | ||
private String address; | ||
|
||
public String getPrivateKey() { | ||
return privateKey; | ||
} | ||
public byte[] getPrivateKeyBin() { | ||
return OcMath.hexStringToByteArray(privateKey); | ||
} | ||
|
||
public void setPrivateKey(String privateKey) { | ||
this.privateKey = privateKey; | ||
} | ||
|
||
public String getPublicKey() { | ||
return publicKey; | ||
} | ||
public byte[] getPublicKeyBin() { | ||
return OcMath.hexStringToByteArray(publicKey); | ||
} | ||
public void setPublicKey(String publicKey) { | ||
this.publicKey = publicKey; | ||
} | ||
|
||
public String getAddress() { | ||
return address; | ||
} | ||
public String getAddressNoPrefix() { | ||
return address.substring(2); | ||
} | ||
public void setAddress(String address) { | ||
this.address = "oc"+address; | ||
} | ||
} |
302 changes: 302 additions & 0 deletions
302
SignSdk/src/main/java/com/onlychain/signsdk/bean/ActionsBean.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,302 @@ | ||
package com.onlychain.signsdk.bean; | ||
|
||
import java.util.List; | ||
|
||
public class ActionsBean { | ||
private String version; | ||
private String actionType; | ||
private String hasTrading; | ||
private String hasAction; | ||
private TradingBean trading; | ||
private ActionBean action; | ||
private long time; | ||
private long createdBlock; | ||
private String originator; | ||
private String insLength; | ||
private String ins; | ||
private String actionSign; | ||
private String txId; | ||
|
||
public String getInsLength() { | ||
return insLength; | ||
} | ||
|
||
public void setInsLength(String insLength) { | ||
this.insLength = insLength; | ||
} | ||
|
||
public String getHasAction() { | ||
return hasAction; | ||
} | ||
|
||
public void setHasAction(String hasAction) { | ||
this.hasAction = hasAction; | ||
} | ||
|
||
public String getHasTrading() { | ||
return hasTrading; | ||
} | ||
|
||
public void setHasTrading(String hasTrading) { | ||
this.hasTrading = hasTrading; | ||
} | ||
|
||
public String getVersion() { | ||
return version; | ||
} | ||
|
||
public void setVersion(String version) { | ||
this.version = version; | ||
} | ||
|
||
public String getActionType() { | ||
return actionType; | ||
} | ||
|
||
public void setActionType(String actionType) { | ||
this.actionType = actionType; | ||
} | ||
|
||
public TradingBean getTrading() { | ||
return trading; | ||
} | ||
|
||
public void setTrading(TradingBean trading) { | ||
this.trading = trading; | ||
} | ||
|
||
public ActionBean getAction() { | ||
return action; | ||
} | ||
|
||
public void setAction(ActionBean action) { | ||
this.action = action; | ||
} | ||
|
||
public long getTime() { | ||
return time; | ||
} | ||
|
||
public void setTime(long time) { | ||
this.time = time; | ||
} | ||
|
||
public long getCreatedBlock() { | ||
return createdBlock; | ||
} | ||
|
||
public void setCreatedBlock(long createdBlock) { | ||
this.createdBlock = createdBlock; | ||
} | ||
|
||
public String getOriginator() { | ||
return originator; | ||
} | ||
|
||
public void setOriginator(String originator) { | ||
this.originator = originator; | ||
} | ||
|
||
public String getIns() { | ||
return ins; | ||
} | ||
|
||
public void setIns(String ins) { | ||
this.ins = ins; | ||
} | ||
|
||
public String getActionSign() { | ||
return actionSign; | ||
} | ||
|
||
public void setActionSign(String actionSign) { | ||
this.actionSign = actionSign; | ||
} | ||
|
||
public String getTxId() { | ||
return txId; | ||
} | ||
|
||
public void setTxId(String txId) { | ||
this.txId = txId; | ||
} | ||
|
||
public static class TradingBean { | ||
|
||
private long lockTime; | ||
private long cost; | ||
private long vinNum; | ||
private long voutNum; | ||
private List<VinBean> vin; | ||
private List<VoutBean> vout; | ||
|
||
|
||
public long getVinNum() { | ||
return vinNum; | ||
} | ||
|
||
public void setVinNum(long vinNum) { | ||
this.vinNum = vinNum; | ||
} | ||
|
||
public long getVoutNum() { | ||
return voutNum; | ||
} | ||
|
||
public void setVoutNum(long voutNum) { | ||
this.voutNum = voutNum; | ||
} | ||
|
||
public long getLockTime() { | ||
return lockTime; | ||
} | ||
|
||
public void setLockTime(long lockTime) { | ||
this.lockTime = lockTime; | ||
} | ||
|
||
public long getCost() { | ||
return cost; | ||
} | ||
|
||
public void setCost(long cost) { | ||
this.cost = cost; | ||
} | ||
|
||
public List<VinBean> getVin() { | ||
return vin; | ||
} | ||
|
||
public void setVin(List<VinBean> vin) { | ||
this.vin = vin; | ||
} | ||
|
||
public List<VoutBean> getVout() { | ||
return vout; | ||
} | ||
|
||
public void setVout(List<VoutBean> vout) { | ||
this.vout = vout; | ||
} | ||
|
||
public static class VinBean { | ||
private String txId; | ||
private String n; | ||
private int scriptLength; | ||
private String scriptSig; | ||
|
||
public int getScriptLength() { | ||
return scriptLength; | ||
} | ||
|
||
public void setScriptLength(int scriptLength) { | ||
this.scriptLength = scriptLength; | ||
} | ||
|
||
public String getTxId() { | ||
return txId; | ||
} | ||
|
||
public void setTxId(String txId) { | ||
this.txId = txId; | ||
} | ||
|
||
public String getN() { | ||
return n; | ||
} | ||
|
||
public void setN(String n) { | ||
this.n = n; | ||
} | ||
|
||
public String getScriptSig() { | ||
return scriptSig; | ||
} | ||
|
||
public void setScriptSig(String scriptSig) { | ||
this.scriptSig = scriptSig; | ||
} | ||
} | ||
|
||
public static class VoutBean { | ||
|
||
private long value; | ||
private String n; | ||
private String reqSigs; | ||
private String address; | ||
|
||
public String getN() { | ||
return n; | ||
} | ||
|
||
public void setN(String n) { | ||
this.n = n; | ||
} | ||
|
||
public long getValue() { | ||
return value; | ||
} | ||
|
||
public void setValue(long value) { | ||
this.value = value; | ||
} | ||
|
||
|
||
|
||
public String getReqSigs() { | ||
return reqSigs; | ||
} | ||
|
||
public void setReqSigs(String reqSigs) { | ||
this.reqSigs = reqSigs; | ||
} | ||
|
||
public String getAddress() { | ||
return address; | ||
} | ||
|
||
public void setAddress(String address) { | ||
this.address = address; | ||
} | ||
} | ||
} | ||
|
||
public static class ActionBean { | ||
private String voter; | ||
private int again; | ||
private int rounds; | ||
private List<String> candidate; | ||
|
||
public String getVoter() { | ||
return voter; | ||
} | ||
|
||
public void setVoter(String voter) { | ||
this.voter = voter; | ||
} | ||
|
||
public int getAgain() { | ||
return again; | ||
} | ||
|
||
public void setAgain(int again) { | ||
this.again = again; | ||
} | ||
|
||
public int getRounds() { | ||
return rounds; | ||
} | ||
|
||
public void setRounds(int rounds) { | ||
this.rounds = rounds; | ||
} | ||
|
||
public List<String> getCandidate() { | ||
return candidate; | ||
} | ||
|
||
public void setCandidate(List<String> candidate) { | ||
this.candidate = candidate; | ||
} | ||
} | ||
} |
Oops, something went wrong.