Skip to content

Commit f70d2ce

Browse files
committed
testdata: add loop in/out and quote sessions
1 parent 3bd9aff commit f70d2ce

21 files changed

Lines changed: 1622 additions & 0 deletions
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
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+
},
17+
"events": [
18+
{
19+
"time_ms": 3,
20+
"kind": "stderr",
21+
"data": {
22+
"text": "[loop] invalid amt value \"notanumber\"\n"
23+
}
24+
},
25+
{
26+
"time_ms": 3,
27+
"kind": "exit",
28+
"data": {
29+
"run_error": "invalid amt value \"notanumber\""
30+
}
31+
}
32+
]
33+
}
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+
"--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+
},
20+
"events": [
21+
{
22+
"time_ms": 13,
23+
"kind": "stderr",
24+
"data": {
25+
"text": "[loop] external and conf_target both set\n"
26+
}
27+
},
28+
{
29+
"time_ms": 13,
30+
"kind": "exit",
31+
"data": {
32+
"run_error": "external and conf_target both set"
33+
}
34+
}
35+
]
36+
}
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+
"--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+
},
20+
"events": [
21+
{
22+
"time_ms": 2,
23+
"kind": "stderr",
24+
"data": {
25+
"text": "[loop] private and route_hints both set\n"
26+
}
27+
},
28+
{
29+
"time_ms": 2,
30+
"kind": "exit",
31+
"data": {
32+
"run_error": "private and route_hints both set"
33+
}
34+
}
35+
]
36+
}
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
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+
},
21+
"events": [
22+
{
23+
"time_ms": 1,
24+
"kind": "stdin",
25+
"data": {
26+
"text": "n\n"
27+
}
28+
},
29+
{
30+
"time_ms": 3,
31+
"kind": "grpc",
32+
"data": {
33+
"method": "/looprpc.SwapClient/GetLoopInQuote",
34+
"event": "request",
35+
"message_type": "looprpc.QuoteRequest",
36+
"payload": {
37+
"amt": "50000",
38+
"conf_target": 0,
39+
"external_htlc": true,
40+
"swap_publication_deadline": "0",
41+
"loop_in_last_hop": "AnHW4pMBFZ2eHMXTmDR5pR87PAxoLtp/FqofR9/gmyL3",
42+
"loop_in_route_hints": [],
43+
"private": false,
44+
"deposit_outpoints": [],
45+
"asset_info": null,
46+
"auto_select_deposits": false,
47+
"fast": false
48+
}
49+
}
50+
},
51+
{
52+
"time_ms": 539,
53+
"kind": "grpc",
54+
"data": {
55+
"method": "/looprpc.SwapClient/GetLoopInQuote",
56+
"event": "response",
57+
"message_type": "looprpc.InQuoteResponse",
58+
"payload": {
59+
"swap_fee_sat": "1801",
60+
"htlc_publish_fee_sat": "0",
61+
"cltv_delta": 0,
62+
"conf_target": 0,
63+
"quoted_amt": "50000"
64+
}
65+
}
66+
},
67+
{
68+
"time_ms": 539,
69+
"kind": "stderr",
70+
"data": {
71+
"text": "[loop] swap canceled\n"
72+
}
73+
},
74+
{
75+
"time_ms": 539,
76+
"kind": "stdout",
77+
"data": {
78+
"text": "On-chain fee for external loop in is not included.\nSufficient fees will need to be paid when constructing the transaction in the external wallet.\n\nSend on-chain: 50000 sat\nReceive off-chain: 48199 sat\nLoop service fee: 1801 sat\n\nCONTINUE SWAP? (y/n): "
79+
}
80+
},
81+
{
82+
"time_ms": 539,
83+
"kind": "exit",
84+
"data": {
85+
"run_error": "swap canceled"
86+
}
87+
}
88+
]
89+
}
Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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+
},
22+
"events": [
23+
{
24+
"time_ms": 0,
25+
"kind": "stdin",
26+
"data": {
27+
"text": "n\n"
28+
}
29+
},
30+
{
31+
"time_ms": 1,
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": 163,
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": 163,
70+
"kind": "stdout",
71+
"data": {
72+
"text": "On-chain fee for external loop in is not included.\nSufficient fees will need to be paid when constructing the transaction in the external wallet.\n\nSend on-chain: 50000 sat\nReceive off-chain: 48199 sat\nLoop service fee: 1801 sat\n\nCLTV expiry delta: 0 block\n\nCONTINUE SWAP? (y/n): "
73+
}
74+
},
75+
{
76+
"time_ms": 164,
77+
"kind": "stderr",
78+
"data": {
79+
"text": "[loop] swap canceled\n"
80+
}
81+
},
82+
{
83+
"time_ms": 164,
84+
"kind": "exit",
85+
"data": {
86+
"run_error": "swap canceled"
87+
}
88+
}
89+
]
90+
}
Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
{
2+
"metadata": {
3+
"args": [
4+
"/home/user/bin/loop",
5+
"in",
6+
"--network",
7+
"regtest",
8+
"--external",
9+
"--amt",
10+
"500000",
11+
"--force"
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+
"duration": 1067066878
18+
},
19+
"events": [
20+
{
21+
"time_ms": 1,
22+
"kind": "grpc",
23+
"data": {
24+
"method": "/looprpc.SwapClient/GetLoopInQuote",
25+
"event": "request",
26+
"message_type": "looprpc.QuoteRequest",
27+
"payload": {
28+
"amt": "500000",
29+
"conf_target": 0,
30+
"external_htlc": true,
31+
"swap_publication_deadline": "0",
32+
"loop_in_last_hop": "",
33+
"loop_in_route_hints": [],
34+
"private": false,
35+
"deposit_outpoints": [],
36+
"asset_info": null,
37+
"auto_select_deposits": false,
38+
"fast": false
39+
}
40+
}
41+
},
42+
{
43+
"time_ms": 561,
44+
"kind": "grpc",
45+
"data": {
46+
"method": "/looprpc.SwapClient/GetLoopInQuote",
47+
"event": "response",
48+
"message_type": "looprpc.InQuoteResponse",
49+
"payload": {
50+
"swap_fee_sat": "1824",
51+
"htlc_publish_fee_sat": "0",
52+
"cltv_delta": 0,
53+
"conf_target": 0,
54+
"quoted_amt": "500000"
55+
}
56+
}
57+
},
58+
{
59+
"time_ms": 561,
60+
"kind": "grpc",
61+
"data": {
62+
"method": "/looprpc.SwapClient/LoopIn",
63+
"event": "request",
64+
"message_type": "looprpc.LoopInRequest",
65+
"payload": {
66+
"amt": "500000",
67+
"max_swap_fee": "1824",
68+
"max_miner_fee": "0",
69+
"last_hop": "",
70+
"external_htlc": true,
71+
"htlc_conf_target": 0,
72+
"label": "",
73+
"initiator": "loop-cli",
74+
"route_hints": [],
75+
"private": false
76+
}
77+
}
78+
},
79+
{
80+
"time_ms": 1065,
81+
"kind": "grpc",
82+
"data": {
83+
"method": "/looprpc.SwapClient/LoopIn",
84+
"event": "response",
85+
"message_type": "looprpc.SwapResponse",
86+
"payload": {
87+
"id": "2f46a232e0f584fadf2abc7e7aaeefab0176f21e0fba5344a10e21838ec390fe",
88+
"id_bytes": "L0aiMuD1hPrfKrx+eq7vqwF28h4PulNEoQ4hg47DkP4=",
89+
"htlc_address": "bcrt1pcred99xc9l2cxphneej4ph6d6mczc0442d6ulyh3a9ad389z2aaq4n775y",
90+
"htlc_address_p2wsh": "",
91+
"htlc_address_p2tr": "bcrt1pcred99xc9l2cxphneej4ph6d6mczc0442d6ulyh3a9ad389z2aaq4n775y",
92+
"server_message": ""
93+
}
94+
}
95+
},
96+
{
97+
"time_ms": 1066,
98+
"kind": "stdout",
99+
"data": {
100+
"text": "Swap initiated\nID: 2f46a232e0f584fadf2abc7e7aaeefab0176f21e0fba5344a10e21838ec390fe\nHTLC address (P2TR): bcrt1pcred99xc9l2cxphneej4ph6d6mczc0442d6ulyh3a9ad389z2aaq4n775y\n\nRun `loop monitor` to monitor progress.\n"
101+
}
102+
},
103+
{
104+
"time_ms": 1067,
105+
"kind": "exit",
106+
"data": {}
107+
}
108+
]
109+
}

0 commit comments

Comments
 (0)