Skip to content

Commit 5157dad

Browse files
committed
testdata: add basic swap sessions
1 parent 9640e3b commit 5157dad

5 files changed

Lines changed: 904 additions & 0 deletions

File tree

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

0 commit comments

Comments
 (0)