Skip to content

Commit 0b87c9b

Browse files
committed
testdata: add basic swap sessions
1 parent 7b1c656 commit 0b87c9b

5 files changed

Lines changed: 814 additions & 0 deletions

File tree

Lines changed: 132 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,132 @@
1+
{
2+
"metadata": {
3+
"args": [
4+
"loop",
5+
"out",
6+
"--network",
7+
"regtest",
8+
"500000",
9+
"--fast"
10+
],
11+
"env": {},
12+
"version": "0.31.7-beta commit=vbump-lndclient-64-g3b735173216470e023b3b72949dd82af9adbebe1 commit_hash=3b735173216470e023b3b72949dd82af9adbebe1",
13+
"duration": 1332472129
14+
},
15+
"events": [
16+
{
17+
"time_ms": 1,
18+
"kind": "grpc",
19+
"data": {
20+
"method": "/looprpc.SwapClient/LoopOutQuote",
21+
"event": "request",
22+
"message_type": "looprpc.QuoteRequest",
23+
"payload": {
24+
"amt": "500000",
25+
"conf_target": 9,
26+
"external_htlc": false,
27+
"swap_publication_deadline": "1769407086",
28+
"loop_in_last_hop": "",
29+
"loop_in_route_hints": [],
30+
"private": false,
31+
"deposit_outpoints": [],
32+
"asset_info": null,
33+
"auto_select_deposits": false,
34+
"fast": false
35+
}
36+
}
37+
},
38+
{
39+
"time_ms": 22,
40+
"kind": "grpc",
41+
"data": {
42+
"method": "/looprpc.SwapClient/LoopOutQuote",
43+
"event": "response",
44+
"message_type": "looprpc.OutQuoteResponse",
45+
"payload": {
46+
"swap_fee_sat": "3875",
47+
"prepay_amt_sat": "1337",
48+
"htlc_sweep_fee_sat": "3793",
49+
"swap_payment_dest": "AhbcGtFvFiW2ru6gxtm66Xv9DpxBdSBXK4a7EX7jbSWd",
50+
"cltv_delta": 0,
51+
"conf_target": 9,
52+
"asset_rfq_info": null
53+
}
54+
}
55+
},
56+
{
57+
"time_ms": 23,
58+
"kind": "stdout",
59+
"data": {
60+
"text": "Send off-chain: 500000 sat\nReceive on-chain: 492332 sat\nEstimated total fee: 7668 sat\n\nFast swap requested.\n\nCONTINUE SWAP? (y/n): "
61+
}
62+
},
63+
{
64+
"time_ms": 1240,
65+
"kind": "stdin",
66+
"data": {
67+
"text": "y\n"
68+
}
69+
},
70+
{
71+
"time_ms": 1241,
72+
"kind": "grpc",
73+
"data": {
74+
"method": "/looprpc.SwapClient/LoopOut",
75+
"event": "request",
76+
"message_type": "looprpc.LoopOutRequest",
77+
"payload": {
78+
"amt": "500000",
79+
"dest": "",
80+
"max_swap_routing_fee": "10010",
81+
"max_prepay_routing_fee": "36",
82+
"max_swap_fee": "3875",
83+
"max_prepay_amt": "1337",
84+
"max_miner_fee": "948250",
85+
"loop_out_channel": "0",
86+
"outgoing_chan_set": [],
87+
"sweep_conf_target": 9,
88+
"htlc_confirmations": 1,
89+
"swap_publication_deadline": "1769407086",
90+
"label": "",
91+
"initiator": "loop-cli",
92+
"account": "",
93+
"account_addr_type": "ADDRESS_TYPE_UNKNOWN",
94+
"is_external_addr": false,
95+
"reservation_ids": [],
96+
"payment_timeout": 0,
97+
"asset_info": null,
98+
"asset_rfq_info": null
99+
}
100+
}
101+
},
102+
{
103+
"time_ms": 1327,
104+
"kind": "grpc",
105+
"data": {
106+
"method": "/looprpc.SwapClient/LoopOut",
107+
"event": "response",
108+
"message_type": "looprpc.SwapResponse",
109+
"payload": {
110+
"id": "e5f3a1d5cee33e239571d0c1e8cbc6926cbc1d784b9fe185ff6589e949db4549",
111+
"id_bytes": "5fOh1c7jPiOVcdDB6MvGkmy8HXhLn+GF/2WJ6UnbRUk=",
112+
"htlc_address": "bcrt1p69ekm32epfcy8ymkqdj5clvh37vmlgw76k9x5nfs76c7qgghnpqqmtf80x",
113+
"htlc_address_p2wsh": "",
114+
"htlc_address_p2tr": "bcrt1p69ekm32epfcy8ymkqdj5clvh37vmlgw76k9x5nfs76c7qgghnpqqmtf80x",
115+
"server_message": ""
116+
}
117+
}
118+
},
119+
{
120+
"time_ms": 1329,
121+
"kind": "stdout",
122+
"data": {
123+
"text": "Swap initiated\nID: e5f3a1d5cee33e239571d0c1e8cbc6926cbc1d784b9fe185ff6589e949db4549\n\nRun `loop monitor` to monitor progress.\n"
124+
}
125+
},
126+
{
127+
"time_ms": 1332,
128+
"kind": "exit",
129+
"data": {}
130+
}
131+
]
132+
}
Lines changed: 118 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,118 @@
1+
{
2+
"metadata": {
3+
"args": [
4+
"loop",
5+
"in",
6+
"--network",
7+
"regtest",
8+
"500000"
9+
],
10+
"env": {},
11+
"version": "0.31.7-beta commit=vbump-lndclient-69-g057ef82340ab279a5659ab6ae7edab61448a2acd commit_hash=057ef82340ab279a5659ab6ae7edab61448a2acd",
12+
"duration": 2146386627
13+
},
14+
"events": [
15+
{
16+
"time_ms": 5,
17+
"kind": "grpc",
18+
"data": {
19+
"method": "/looprpc.SwapClient/GetLoopInQuote",
20+
"event": "request",
21+
"message_type": "looprpc.QuoteRequest",
22+
"payload": {
23+
"amt": "500000",
24+
"conf_target": 0,
25+
"external_htlc": false,
26+
"swap_publication_deadline": "0",
27+
"loop_in_last_hop": "",
28+
"loop_in_route_hints": [],
29+
"private": false,
30+
"deposit_outpoints": [],
31+
"asset_info": null,
32+
"auto_select_deposits": false,
33+
"fast": false
34+
}
35+
}
36+
},
37+
{
38+
"time_ms": 444,
39+
"kind": "grpc",
40+
"data": {
41+
"method": "/looprpc.SwapClient/GetLoopInQuote",
42+
"event": "response",
43+
"message_type": "looprpc.InQuoteResponse",
44+
"payload": {
45+
"swap_fee_sat": "1825",
46+
"htlc_publish_fee_sat": "3875",
47+
"cltv_delta": 0,
48+
"conf_target": 6,
49+
"quoted_amt": "500000"
50+
}
51+
}
52+
},
53+
{
54+
"time_ms": 445,
55+
"kind": "stdout",
56+
"data": {
57+
"text": "Send on-chain: 500000 sat\nReceive off-chain: 494300 sat\nEstimated total fee: 5700 sat\n\nCONTINUE SWAP? (y/n): "
58+
}
59+
},
60+
{
61+
"time_ms": 1682,
62+
"kind": "stdin",
63+
"data": {
64+
"text": "y\n"
65+
}
66+
},
67+
{
68+
"time_ms": 1682,
69+
"kind": "grpc",
70+
"data": {
71+
"method": "/looprpc.SwapClient/LoopIn",
72+
"event": "request",
73+
"message_type": "looprpc.LoopInRequest",
74+
"payload": {
75+
"amt": "500000",
76+
"max_swap_fee": "1825",
77+
"max_miner_fee": "11625",
78+
"last_hop": "",
79+
"external_htlc": false,
80+
"htlc_conf_target": 0,
81+
"label": "",
82+
"initiator": "loop-cli",
83+
"route_hints": [],
84+
"private": false
85+
}
86+
}
87+
},
88+
{
89+
"time_ms": 2140,
90+
"kind": "grpc",
91+
"data": {
92+
"method": "/looprpc.SwapClient/LoopIn",
93+
"event": "response",
94+
"message_type": "looprpc.SwapResponse",
95+
"payload": {
96+
"id": "33b431ce62ab7f8f3ff5e2aee9452ec9aa18713e734ecd79fc9cfb4bd77cc7d8",
97+
"id_bytes": "M7QxzmKrf48/9eKu6UUuyaoYcT5zTs15/Jz7S9d8x9g=",
98+
"htlc_address": "bcrt1pmtw7fch8de39wxfqunuucudgulkvyxm59epz9p0ph673squ7l2ns3gpcsu",
99+
"htlc_address_p2wsh": "",
100+
"htlc_address_p2tr": "bcrt1pmtw7fch8de39wxfqunuucudgulkvyxm59epz9p0ph673squ7l2ns3gpcsu",
101+
"server_message": ""
102+
}
103+
}
104+
},
105+
{
106+
"time_ms": 2141,
107+
"kind": "stdout",
108+
"data": {
109+
"text": "Swap initiated\nID: 33b431ce62ab7f8f3ff5e2aee9452ec9aa18713e734ecd79fc9cfb4bd77cc7d8\nHTLC address (P2TR): bcrt1pmtw7fch8de39wxfqunuucudgulkvyxm59epz9p0ph673squ7l2ns3gpcsu\n\nRun `loop monitor` to monitor progress.\n"
110+
}
111+
},
112+
{
113+
"time_ms": 2146,
114+
"kind": "exit",
115+
"data": {}
116+
}
117+
]
118+
}

0 commit comments

Comments
 (0)