Skip to content

Commit 541e0e0

Browse files
committed
testdata: add loop in/out and quote sessions
1 parent 074257e commit 541e0e0

21 files changed

Lines changed: 1788 additions & 0 deletions
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
{
2+
"metadata": {
3+
"args": [
4+
"/home/user/bin/loop",
5+
"in",
6+
"--network",
7+
"regtest",
8+
"notanumber"
9+
],
10+
"env": {
11+
"HOME": "/home/user"
12+
},
13+
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
14+
"run_error": "invalid amt value \"notanumber\"",
15+
"duration": 3964079,
16+
"clock_start_unix": 1769407086
17+
},
18+
"events": [
19+
{
20+
"time_ms": 3,
21+
"kind": "stderr",
22+
"data": {
23+
"lines": [
24+
"[loop] invalid amt value \"notanumber\"\n"
25+
]
26+
}
27+
},
28+
{
29+
"time_ms": 3,
30+
"kind": "exit",
31+
"data": {
32+
"run_error": "invalid amt value \"notanumber\""
33+
}
34+
}
35+
]
36+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"metadata": {
3+
"args": [
4+
"/home/user/bin/loop",
5+
"in",
6+
"--external",
7+
"--conf_target",
8+
"6",
9+
"--network",
10+
"regtest",
11+
"10000"
12+
],
13+
"env": {
14+
"HOME": "/home/user"
15+
},
16+
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
17+
"run_error": "external and conf_target both set",
18+
"duration": 13741983,
19+
"clock_start_unix": 1769407086
20+
},
21+
"events": [
22+
{
23+
"time_ms": 13,
24+
"kind": "stderr",
25+
"data": {
26+
"lines": [
27+
"[loop] external and conf_target both set\n"
28+
]
29+
}
30+
},
31+
{
32+
"time_ms": 13,
33+
"kind": "exit",
34+
"data": {
35+
"run_error": "external and conf_target both set"
36+
}
37+
}
38+
]
39+
}
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
{
2+
"metadata": {
3+
"args": [
4+
"/home/user/bin/loop",
5+
"in",
6+
"--route_hints",
7+
"{}",
8+
"--private",
9+
"--network",
10+
"regtest",
11+
"10000"
12+
],
13+
"env": {
14+
"HOME": "/home/user"
15+
},
16+
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
17+
"run_error": "private and route_hints both set",
18+
"duration": 2834558,
19+
"clock_start_unix": 1769407086
20+
},
21+
"events": [
22+
{
23+
"time_ms": 2,
24+
"kind": "stderr",
25+
"data": {
26+
"lines": [
27+
"[loop] private and route_hints both set\n"
28+
]
29+
}
30+
},
31+
{
32+
"time_ms": 2,
33+
"kind": "exit",
34+
"data": {
35+
"run_error": "private and route_hints both set"
36+
}
37+
}
38+
]
39+
}
Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
{
2+
"metadata": {
3+
"args": [
4+
"/home/user/bin/loop",
5+
"in",
6+
"--network",
7+
"regtest",
8+
"--external",
9+
"--amt",
10+
"50000",
11+
"--last_hop",
12+
"0271d6e29301159d9e1cc5d3983479a51f3b3c0c682eda7f16aa1f47dfe09b22f7"
13+
],
14+
"env": {
15+
"HOME": "/home/user"
16+
},
17+
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
18+
"run_error": "swap canceled",
19+
"duration": 539895736,
20+
"clock_start_unix": 1769407086
21+
},
22+
"events": [
23+
{
24+
"time_ms": 1,
25+
"kind": "stdin",
26+
"data": {
27+
"text": "n\n"
28+
}
29+
},
30+
{
31+
"time_ms": 3,
32+
"kind": "grpc",
33+
"data": {
34+
"method": "/looprpc.SwapClient/GetLoopInQuote",
35+
"event": "request",
36+
"message_type": "looprpc.QuoteRequest",
37+
"payload": {
38+
"amt": "50000",
39+
"conf_target": 0,
40+
"external_htlc": true,
41+
"swap_publication_deadline": "0",
42+
"loop_in_last_hop": "AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3",
43+
"loop_in_route_hints": [],
44+
"private": false,
45+
"deposit_outpoints": [],
46+
"asset_info": null,
47+
"auto_select_deposits": false,
48+
"fast": false
49+
}
50+
}
51+
},
52+
{
53+
"time_ms": 539,
54+
"kind": "grpc",
55+
"data": {
56+
"method": "/looprpc.SwapClient/GetLoopInQuote",
57+
"event": "response",
58+
"message_type": "looprpc.InQuoteResponse",
59+
"payload": {
60+
"swap_fee_sat": "1801",
61+
"htlc_publish_fee_sat": "0",
62+
"cltv_delta": 0,
63+
"conf_target": 0,
64+
"quoted_amt": "50000"
65+
}
66+
}
67+
},
68+
{
69+
"time_ms": 539,
70+
"kind": "stderr",
71+
"data": {
72+
"lines": [
73+
"[loop] swap canceled\n"
74+
]
75+
}
76+
},
77+
{
78+
"time_ms": 539,
79+
"kind": "stdout",
80+
"data": {
81+
"lines": [
82+
"On-chain fee for external loop in is not included.\n",
83+
"Sufficient fees will need to be paid when constructing the transaction in the external wallet.\n",
84+
"\n",
85+
"Send on-chain: 50000 sat\n",
86+
"Receive off-chain: 48199 sat\n",
87+
"Loop service fee: 1801 sat\n",
88+
"\n",
89+
"CONTINUE SWAP? (y/n): "
90+
]
91+
}
92+
},
93+
{
94+
"time_ms": 539,
95+
"kind": "exit",
96+
"data": {
97+
"run_error": "swap canceled"
98+
}
99+
}
100+
]
101+
}
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
{
2+
"metadata": {
3+
"args": [
4+
"/home/user/bin/loop",
5+
"in",
6+
"--network",
7+
"regtest",
8+
"--external",
9+
"--verbose",
10+
"--amt",
11+
"50000",
12+
"--last_hop",
13+
"0271d6e29301159d9e1cc5d3983479a51f3b3c0c682eda7f16aa1f47dfe09b22f7"
14+
],
15+
"env": {
16+
"HOME": "/home/user"
17+
},
18+
"version": "0.31.7-beta commit=v0.31.7-beta-28-g6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845 commit_hash=6d8ddfc59ddc2dcfd1a9b4e4b3c53a9cf15dd845",
19+
"run_error": "swap canceled",
20+
"duration": 164102130,
21+
"clock_start_unix": 1769407086
22+
},
23+
"events": [
24+
{
25+
"time_ms": 0,
26+
"kind": "stdin",
27+
"data": {
28+
"text": "n\n"
29+
}
30+
},
31+
{
32+
"time_ms": 1,
33+
"kind": "grpc",
34+
"data": {
35+
"method": "/looprpc.SwapClient/GetLoopInQuote",
36+
"event": "request",
37+
"message_type": "looprpc.QuoteRequest",
38+
"payload": {
39+
"amt": "50000",
40+
"conf_target": 0,
41+
"external_htlc": true,
42+
"swap_publication_deadline": "0",
43+
"loop_in_last_hop": "AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3",
44+
"loop_in_route_hints": [],
45+
"private": false,
46+
"deposit_outpoints": [],
47+
"asset_info": null,
48+
"auto_select_deposits": false,
49+
"fast": false
50+
}
51+
}
52+
},
53+
{
54+
"time_ms": 163,
55+
"kind": "grpc",
56+
"data": {
57+
"method": "/looprpc.SwapClient/GetLoopInQuote",
58+
"event": "response",
59+
"message_type": "looprpc.InQuoteResponse",
60+
"payload": {
61+
"swap_fee_sat": "1801",
62+
"htlc_publish_fee_sat": "0",
63+
"cltv_delta": 0,
64+
"conf_target": 0,
65+
"quoted_amt": "50000"
66+
}
67+
}
68+
},
69+
{
70+
"time_ms": 163,
71+
"kind": "stdout",
72+
"data": {
73+
"lines": [
74+
"On-chain fee for external loop in is not included.\n",
75+
"Sufficient fees will need to be paid when constructing the transaction in the external wallet.\n",
76+
"\n",
77+
"Send on-chain: 50000 sat\n",
78+
"Receive off-chain: 48199 sat\n",
79+
"Loop service fee: 1801 sat\n",
80+
"\n",
81+
"CLTV expiry delta: 0 block\n",
82+
"\n",
83+
"CONTINUE SWAP? (y/n): "
84+
]
85+
}
86+
},
87+
{
88+
"time_ms": 164,
89+
"kind": "stderr",
90+
"data": {
91+
"lines": [
92+
"[loop] swap canceled\n"
93+
]
94+
}
95+
},
96+
{
97+
"time_ms": 164,
98+
"kind": "exit",
99+
"data": {
100+
"run_error": "swap canceled"
101+
}
102+
}
103+
]
104+
}

0 commit comments

Comments
 (0)