forked from bianjieai/avata-sdk-java
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTxTest.java
33 lines (26 loc) · 927 Bytes
/
TxTest.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
import ai.bianjie.avatasdk.AvataClient;
import ai.bianjie.avatasdk.model.tx.QueryQueueReq;
import ai.bianjie.avatasdk.model.tx.QueryQueueRes;
import ai.bianjie.avatasdk.model.tx.QueryTxRes;
import org.junit.jupiter.api.Test;
public class TxTest {
AvataClient client = new AvataClient.Builder()
.setDomain("")
.setApiKey("")
.setApiSecret("")
.init();
@Test
// 请求上链交易结果查询接口示例
public void queryTx() {
QueryTxRes txRes = client.txClient.queryTx("operationID1676014869");
System.out.println(txRes.getData());
}
@Test
//请求上链交易排队状态查询接口示例
public void queryQueueInfo() {
QueryQueueReq req = new QueryQueueReq();
req.setOperationId("test");
QueryQueueRes res = client.txClient.queryQueueInfo(req);
System.out.println(res.getData());
}
}