Skip to content
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 365cd30

Browse files
committedApr 29, 2025
looprpc: add asset out functions
1 parent 8fa841d commit 365cd30

File tree

3 files changed

+1075
-0
lines changed

3 files changed

+1075
-0
lines changed
 

‎looprpc/clientassets.pb.go

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

‎looprpc/clientassets.proto

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
syntax = "proto3";
2+
3+
import "swapserverrpc/common.proto";
4+
5+
package looprpc;
6+
7+
option go_package = "github.com/lightninglabs/loop/looprpc";
8+
9+
service AssetsClient {
10+
rpc SwapOut (SwapOutRequest) returns (SwapOutResponse);
11+
rpc ListAssetSwaps (ListAssetSwapsRequest) returns (ListAssetSwapsResponse);
12+
rpc ClientListAvailableAssets (ClientListAvailableAssetsRequest)
13+
returns (ClientListAvailableAssetsResponse);
14+
rpc ClientGetAssetSwapOutQuote (ClientGetAssetSwapOutQuoteRequest)
15+
returns (ClientGetAssetSwapOutQuoteResponse);
16+
}
17+
18+
message SwapOutRequest {
19+
uint64 amt = 1;
20+
bytes asset = 2;
21+
}
22+
23+
message SwapOutResponse {
24+
AssetSwapStatus swap_status = 1;
25+
}
26+
27+
message ListAssetSwapsRequest {
28+
}
29+
30+
message ListAssetSwapsResponse {
31+
repeated AssetSwapStatus swap_status = 1;
32+
}
33+
34+
message AssetSwapStatus {
35+
bytes swap_hash = 1;
36+
string swap_status = 2;
37+
}
38+
39+
message ClientListAvailableAssetsRequest {
40+
}
41+
42+
message ClientListAvailableAssetsResponse {
43+
repeated Asset available_assets = 1;
44+
}
45+
46+
message Asset {
47+
bytes asset_id = 1;
48+
string name = 2;
49+
uint64 sats_per_unit = 3;
50+
}
51+
52+
message ClientGetAssetSwapOutQuoteRequest {
53+
uint64 amt = 1;
54+
bytes asset = 2;
55+
}
56+
57+
message ClientGetAssetSwapOutQuoteResponse {
58+
double swap_fee = 1;
59+
uint64 prepay_amt = 2;
60+
uint64 sats_per_unit = 3;
61+
}

‎looprpc/clientassets_grpc.pb.go

Lines changed: 209 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)
Please sign in to comment.