public class JccJingtum extends Object
| 构造器和说明 |
|---|
JccJingtum(Boolean guomi,
ArrayList<String> rpcNodes) |
JccJingtum(Integer fee,
String baseToken,
Boolean guomi,
ArrayList<String> rpcNodes)
井通公链、联盟链RPC服务构造函数
|
JccJingtum(String alphabet,
Integer fee,
String baseToken,
Boolean guomi,
ArrayList<String> rpcNodes)
井通公链、联盟链RPC服务构造函数
|
JccJingtum(String alphabet,
Integer fee,
String baseToken,
String platform,
Boolean guomi,
ArrayList<String> rpcNodes)
井通公链、联盟链RPC服务构造函数
|
| 限定符和类型 | 方法和说明 |
|---|---|
String |
cancleOrderNoCheck(String secret,
long pSequence)
快速撤单
|
String |
cancleOrderWithCheck(String secret,
long pSequence)
快速撤单并确认
|
String |
createOrderNoCheck(String secret,
String pPayToke,
String pPayAmount,
String pGetToken,
String pGetAmount,
String memos)
快速挂单,每笔交易不校验是否成功,适用于批量挂单,优点:挂单效率高,缺点:交易成功率无法保证,需要调用者自己进行校验
|
String |
createOrderNoCheck(String secret,
String pPayToke,
String pPayAmount,
String pPayIssuer,
String pGetToken,
String pGetAmount,
String pGetIssuer,
String memos)
快速挂单,每笔交易不校验是否成功,适用于批量挂单,优点:挂单效率高,缺点:交易成功率无法保证,需要调用者自己进行校验
|
String |
createOrderWithCheck(String secret,
String pPayToke,
String pPayAmount,
String pGetToken,
String pGetAmount,
String memos)
挂单并校验,每笔挂单都会校验是否成功,适合普通调用,优点:每笔交易都进行确认,缺点:效率低下
|
String |
createOrderWithCheck(String secret,
String pPayToke,
String pPayAmount,
String pPayIssuer,
String pGetToken,
String pGetAmount,
String pGetIssuer,
String memos)
挂单并校验,每笔挂单都会校验是否成功,适合普通调用,优点:每笔交易都进行确认,缺点:效率低下
|
String |
createWallet()
创建钱包(账号)
|
String |
getAddress(String secret)
通过钱包密钥获取钱包地址
|
String |
getAlphabet()
获取钱包字母表
|
Integer |
getFee()
获取每笔交易燃料费
|
String |
getIssuer()
获取银关地址
|
String |
getMemoData(String hexStrMemData)
16进制备注内容直接转换成为字符串(无需Unicode解码)
|
String |
getPlatform()
获取交易平台账号
|
long |
getSequence(String address)
获取sequence
|
String |
paymentNoCheck(String secret,
String receiver,
String pToken,
String pAmount,
String memos)
快速转账,每笔交易不校验是否成功,适用于批量转账,优点:转账效率高,缺点:交易成功率无法保证,需要调用者自己进行校验
|
String |
paymentNoCheck(String secret,
String receiver,
String pToken,
String pAmount,
String pIssuer,
String memos)
快速转账,每笔交易不校验是否成功,适用于批量转账,优点:转账效率高,缺点:交易成功率无法保证,需要调用者自己进行校验
|
String |
paymentWithCheck(String secret,
String receiver,
String pToken,
String pAmount,
String memos)
转账并校验,每笔交易都会校验是否成功,适合普通转账,优点:每笔交易都进行确认,缺点:转账效率低下
|
String |
paymentWithCheck(String secret,
String receiver,
String pToken,
String pAmount,
String pIssuer,
String memos)
转账并校验,每笔交易都会校验是否成功,适合普通转账,优点:每笔交易都进行确认,缺点:转账效率低下
|
String |
requestTx(String hash)
根据hash获取交易详情
|
void |
setFee(Integer fee)
设置每笔交易燃料费
|
void |
setIssuer(String issuer)
设置银关地址
|
void |
setPlatform(String platform)
设置交易平台账号
|
void |
setSequence(String address,
long pSequence)
设置sequence
|
String |
setTokenIssue721(String secret,
String receiver,
String pToken,
String pAmount,
String pIssuer,
String memos)
转账并校验,每笔交易都会校验是否成功,适合普通转账,优点:每笔交易都进行确认,缺点:转账效率低下
|
void |
setTryTimes(int tryTimes)
设置出错尝试次数
|
SignedTransaction |
signWithCancleOrder(String secret,
long pSequence,
long sequence)
撤单签名
|
SignedTransaction |
signWithCreateOrder(String secret,
String pPayToke,
String pPayAmount,
String pPayIssuer,
String pGetToken,
String pGetAmount,
String pGetIssuer,
long sequence,
String memos)
挂单签名
|
SignedTransaction |
signWthPayment(String secret,
String receiver,
String pToken,
String pAmount,
String pIssuer,
long sequence,
String memos)
转账交易签名
|
String |
submitBlob(String txBlob)
向节点发送交易请求,并且根据签名得到的hash进行交易确认
|
String |
submitNoCheck(String txBlob)
向节点发送交易请求,并且根据签名得到的hash进行交易确认
|
String |
submitWithCheck(String txBlob,
String hash)
向节点发送交易请求,并且根据签名得到的hash进行交易确认
|
long |
transferTime(Long blockTime)
时间戳转换,区块链账本上的时间戳是相对于2000-01-01 08:00:00的偏移时间,换算成当前时间需要转换
|
public JccJingtum(Boolean guomi, ArrayList<String> rpcNodes)
rpcNodes - rpc节点服务器地址列表guomi - 是否国密链public JccJingtum(Integer fee, String baseToken, Boolean guomi, ArrayList<String> rpcNodes)
fee - 每笔交易燃料费(fee取值范围为10-1000000000的整数,燃料费计算公式=fee/1000000,)baseToken - 交易燃料手续费通证,也是公链的本币guomi - 是否国密链rpcNodes - rpc节点服务器地址列表public JccJingtum(String alphabet, Integer fee, String baseToken, Boolean guomi, ArrayList<String> rpcNodes)
alphabet - 字母表,每一条联盟链都可以用不同的或者相同alphabetfee - 每笔交易燃料费(fee取值范围为10-1000000000的整数,燃料费计算公式=fee/1000000,)baseToken - 交易燃料手续费通证,也是公链的本币guomi - 是否国密链rpcNodes - rpc节点服务器地址列表public JccJingtum(String alphabet, Integer fee, String baseToken, String platform, Boolean guomi, ArrayList<String> rpcNodes)
alphabet - 字母表,每一条联盟链都可以用不同的或者相同alphabetfee - 每笔交易燃料费(fee取值范围为10-1000000000的整数,燃料费计算公式=fee/1000000,)baseToken - 交易燃料手续费通证,也是公链的本币platform - 交易的平台账号(与手续费有关)guomi - 是否国密链rpcNodes - rpc节点服务器地址列表public void setFee(Integer fee) throws Exception
fee - 每笔交易燃料费(fee取值范围为10-1000000000的整数,燃料费计算公式=fee/1000000,)Exceptionpublic Integer getFee()
public void setPlatform(String platform) throws Exception
platform - 交易平台账号Exceptionpublic String getPlatform()
public void setIssuer(String issuer) throws Exception
issuer - 银关地址Exceptionpublic String getIssuer()
public String getAlphabet()
public String createWallet() throws Exception
Exception - 抛出异常public String getAddress(String secret) throws Exception
secret - 钱包密钥Exception - 抛出异常public void setTryTimes(int tryTimes)
tryTimes - 次数public long getSequence(String address) throws Exception
address - 钱包地址Exception - 抛出异常public void setSequence(String address, long pSequence) throws Exception
address - 钱包地址pSequence - 交易序列号Exception - 抛出异常public String requestTx(String hash) throws Exception
hash - 交易hashException - 抛出异常public String getMemoData(String hexStrMemData) throws Exception
hexStrMemData - 16进制备注内容Exception - 抛出异常public long transferTime(Long blockTime)
blockTime - 区块链账本上的时间戳public String paymentWithCheck(String secret, String receiver, String pToken, String pAmount, String memos) throws Exception
secret - 发送者钱包密钥receiver - 接收者钱包地址pToken - 转账TokenpAmount - 转账数量memos - 交易备注(无就传"")Exception - 抛出异常public String paymentWithCheck(String secret, String receiver, String pToken, String pAmount, String pIssuer, String memos) throws Exception
secret - 发送者钱包密钥receiver - 接收者钱包地址pToken - 转账TokenpAmount - 转账数量pIssuer - 银关地址memos - 交易备注(无就传"")Exception - 抛出异常public String paymentNoCheck(String secret, String receiver, String pToken, String pAmount, String memos) throws Exception
secret - 发送者钱包密钥receiver - 接收者钱包地址pToken - 转账TokenpAmount - 转账数量memos - 交易备注(无就传"")Exception - 抛出异常public String paymentNoCheck(String secret, String receiver, String pToken, String pAmount, String pIssuer, String memos) throws Exception
secret - 发送者钱包密钥receiver - 接收者钱包地址pToken - 转账TokenpAmount - 转账数量pIssuer - 银关地址memos - 交易备注(无就传"")Exception - 抛出异常public String createOrderWithCheck(String secret, String pPayToke, String pPayAmount, String pGetToken, String pGetAmount, String memos) throws Exception
secret - 挂单方钱包密钥pPayToke - 挂单方支付的Token名称pPayAmount - 挂单方支付的Token数量pGetToken - 挂单方期望得到的Token名称pGetAmount - 挂单方期望得到的Token数量memos - 交易备注(无就传"")Exceptionpublic String createOrderWithCheck(String secret, String pPayToke, String pPayAmount, String pPayIssuer, String pGetToken, String pGetAmount, String pGetIssuer, String memos) throws Exception
secret - 挂单方钱包密钥pPayToke - 挂单方支付的Token名称pPayAmount - 挂单方支付的Token数量pPayIssuer - 挂单方支付的Token的银关地址pGetToken - 挂单方期望得到的Token名称pGetAmount - 挂单方期望得到的Token数量pGetIssuer - 挂单方期望得到的Token的银关地址memos - 交易备注(无就传"")Exceptionpublic String createOrderNoCheck(String secret, String pPayToke, String pPayAmount, String pGetToken, String pGetAmount, String memos) throws Exception
secret - 挂单方钱包密钥pPayToke - 挂单方支付的Token名称pPayAmount - 挂单方支付的Token数量pGetToken - 挂单方期望得到的Token名称pGetAmount - 挂单方期望得到的Token数量memos - 交易备注(无就传"")Exceptionpublic String createOrderNoCheck(String secret, String pPayToke, String pPayAmount, String pPayIssuer, String pGetToken, String pGetAmount, String pGetIssuer, String memos) throws Exception
secret - 挂单方钱包密钥pPayToke - 挂单方支付的Token名称pPayAmount - 挂单方支付的Token数量pPayIssuer - 挂单方支付的Token的银关地址pGetToken - 挂单方期望得到的Token名称pGetAmount - 挂单方期望得到的Token数量pGetIssuer - 挂单方期望得到的Token的银关地址memos - 交易备注(无就传"")Exceptionpublic String cancleOrderNoCheck(String secret, long pSequence) throws Exception
secret - 钱包密钥pSequence - 挂单序列号Exceptionpublic String cancleOrderWithCheck(String secret, long pSequence) throws Exception
secret - 钱包密钥pSequence - 挂单序列号Exceptionpublic String setTokenIssue721(String secret, String receiver, String pToken, String pAmount, String pIssuer, String memos) throws Exception
secret - 发送者钱包密钥receiver - 接收者钱包地址pToken - 转账TokenpAmount - 转账数量pIssuer - 银关地址memos - 交易备注(无就传"")Exception - 抛出异常public String submitWithCheck(String txBlob, String hash) throws Exception
txBlob - 交易信息hash - hashException - 抛出异常public String submitNoCheck(String txBlob) throws Exception
txBlob - 交易信息Exception - 抛出异常public String submitBlob(String txBlob) throws Exception
txBlob - 交易信息Exception - 抛出异常public SignedTransaction signWthPayment(String secret, String receiver, String pToken, String pAmount, String pIssuer, long sequence, String memos) throws Exception
secret - 发送者钱包密钥receiver - 接收者钱包地址pToken - 转账TokenpAmount - 转账数量pIssuer - 银关地址sequence - 交易序列号memos - 交易备注(无就传"")Exception - 抛出异常public SignedTransaction signWithCreateOrder(String secret, String pPayToke, String pPayAmount, String pPayIssuer, String pGetToken, String pGetAmount, String pGetIssuer, long sequence, String memos) throws Exception
secret - 挂单方钱包密钥pPayToke - 挂单方支付的Token名称pPayAmount - 挂单方支付的Token数量pPayIssuer - 挂单方支付的Token的银关地址pGetToken - 挂单方期望得到的Token名称pGetAmount - 挂单方期望得到的Token数量pGetIssuer - 挂单方期望得到的Token的银关地址sequence - 交易序列号memos - 交易备注(无就传"")Exceptionpublic SignedTransaction signWithCancleOrder(String secret, long pSequence, long sequence) throws Exception
secret - 钱包密钥pSequence - 挂单序列号sequence - 交易序列号ExceptionCopyright © 2021. All rights reserved.