Skip to content

Commit 7daf1d3

Browse files
committed
looprpc: withdrawal of static address deposits
1 parent 6b2d22b commit 7daf1d3

File tree

8 files changed

+1093
-213
lines changed

8 files changed

+1093
-213
lines changed

looprpc/client.pb.go

Lines changed: 441 additions & 213 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

looprpc/client.proto

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,12 @@ service SwapClient {
137137
ListUnspent returns a list of utxos behind a static address.
138138
*/
139139
rpc ListUnspent (ListUnspentRequest) returns (ListUnspentResponse);
140+
141+
/* loop:`static withdraw`
142+
WithdrawDeposits withdraws a selection or all deposits of a static address.
143+
*/
144+
rpc WithdrawDeposits (WithdrawDepositsRequest)
145+
returns (WithdrawDepositsResponse);
140146
}
141147

142148
message LoopOutRequest {
@@ -1456,4 +1462,36 @@ message Utxo {
14561462
The number of confirmations for the Utxo.
14571463
*/
14581464
int64 confirmations = 4;
1465+
}
1466+
1467+
message WithdrawDepositsRequest {
1468+
/*
1469+
The outpoints of the deposits to withdraw.
1470+
*/
1471+
repeated OutPoint outpoints = 1;
1472+
1473+
/*
1474+
If set to true, all deposits will be withdrawn.
1475+
*/
1476+
bool all = 2;
1477+
}
1478+
1479+
message WithdrawDepositsResponse {
1480+
}
1481+
1482+
message OutPoint {
1483+
/*
1484+
Raw bytes representing the transaction id.
1485+
*/
1486+
bytes txid_bytes = 1;
1487+
1488+
/*
1489+
Reversed, hex-encoded string representing the transaction id.
1490+
*/
1491+
string txid_str = 2;
1492+
1493+
/*
1494+
The index of the output on the transaction.
1495+
*/
1496+
uint32 output_index = 3;
14591497
}

looprpc/client.swagger.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1261,6 +1261,25 @@
12611261
}
12621262
}
12631263
},
1264+
"looprpcOutPoint": {
1265+
"type": "object",
1266+
"properties": {
1267+
"txid_bytes": {
1268+
"type": "string",
1269+
"format": "byte",
1270+
"description": "Raw bytes representing the transaction id."
1271+
},
1272+
"txid_str": {
1273+
"type": "string",
1274+
"description": "Reversed, hex-encoded string representing the transaction id."
1275+
},
1276+
"output_index": {
1277+
"type": "integer",
1278+
"format": "int64",
1279+
"description": "The index of the output on the transaction."
1280+
}
1281+
}
1282+
},
12641283
"looprpcOutQuoteResponse": {
12651284
"type": "object",
12661285
"properties": {
@@ -1546,6 +1565,9 @@
15461565
}
15471566
}
15481567
},
1568+
"looprpcWithdrawDepositsResponse": {
1569+
"type": "object"
1570+
},
15491571
"protobufAny": {
15501572
"type": "object",
15511573
"properties": {

looprpc/client_grpc.pb.go

Lines changed: 40 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

looprpc/swapclient.pb.json.go

Lines changed: 25 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)