Compare commits
1145 Commits
v1.0.3.165
...
v1.0.6.5
Author | SHA1 | Date | |
---|---|---|---|
eedf189d44 | |||
f027d36db8 | |||
0c79474e0c | |||
610f9e2b22 | |||
4db4b28369 | |||
18464f5cd5 | |||
cf24c1307a | |||
35e870a8e7 | |||
01be74b219 | |||
b8da6847b9 | |||
e2e37a0db4 | |||
56daf347b9 | |||
5098f63175 | |||
d9b12a6927 | |||
fe4ffcfc62 | |||
64a68b95b0 | |||
58d01738ab | |||
a18dae6d04 | |||
b2959e583a | |||
a38a4d6f69 | |||
0a6ea59254 | |||
04984a51e6 | |||
8947f13dbe | |||
c0549d872c | |||
adcd5f0737 | |||
0929857b12 | |||
7d21b39534 | |||
aaf85216eb | |||
2c87100ffb | |||
6c22546577 | |||
24177ffc46 | |||
8ae4315d43 | |||
a588c72e6c | |||
a656f86003 | |||
c9dc60be7b | |||
91cb9129ab | |||
ae32fdeea7 | |||
5803512820 | |||
553b1f139b | |||
623347bc48 | |||
f64f86fbb6 | |||
39b5462809 | |||
a6ee64ea63 | |||
0dcd834535 | |||
f0fc0441bd | |||
69eaaef963 | |||
9dbfe22171 | |||
5ca4e71c34 | |||
26b04e70b1 | |||
ad2430496d | |||
d4ecfa79d6 | |||
8f4cd929cd | |||
fb213b0e0f | |||
e48d18279c | |||
5f46b48d45 | |||
0cc24c8076 | |||
2738c749dc | |||
a7b178b844 | |||
69c44b19d4 | |||
e6abce8022 | |||
ab64bbc3b0 | |||
5da83e9945 | |||
0e6a8cc33e | |||
2e2ea657ef | |||
e5fb9e2d31 | |||
1386f205fd | |||
a294ad41cb | |||
ed497cab99 | |||
282d0abb62 | |||
034b732e7c | |||
b1e9c005b7 | |||
0d144d088e | |||
b2855e74ef | |||
0652e30c30 | |||
1c58fabc30 | |||
262ba6ee1e | |||
e0534577d1 | |||
c12423f28b | |||
3dd6577b32 | |||
a638b4fb28 | |||
798cf66e3f | |||
6cf29123f3 | |||
e65d42bd61 | |||
febf8ac5b3 | |||
c8a9b66694 | |||
9c185f1081 | |||
0a444508f8 | |||
1d00ee41c4 | |||
266434fe7b | |||
7c88333060 | |||
e0b561b12a | |||
16e5e2d757 | |||
8a07c62603 | |||
4df847bc10 | |||
b5df44ce8e | |||
716952cd58 | |||
7b9b418e93 | |||
dfd7c6d4a6 | |||
920caaa524 | |||
13f10657b8 | |||
dd5fd2e5bb | |||
97b00053c4 | |||
76e46d2fa7 | |||
4c62c5dc22 | |||
c7209df7e2 | |||
c17b8e4d9e | |||
0ab33b704c | |||
ba027de3f7 | |||
3ac257bfda | |||
ec495ea4d1 | |||
3b035158a2 | |||
36582a2741 | |||
450d3cb7d2 | |||
8d157ac5ca | |||
89dc379761 | |||
3e800e7e53 | |||
b12c6289d0 | |||
7e50267cb0 | |||
6714eb9f7f | |||
f1d6f0b2a6 | |||
445606e2b1 | |||
ad05f479a8 | |||
a78c1c8278 | |||
06d6d15441 | |||
87676ece18 | |||
acfd3f1002 | |||
d5cbe66b0e | |||
88aa34747b | |||
cc8dcade49 | |||
a64dd9af16 | |||
8405ce6369 | |||
18e68d04f9 | |||
f3010f622c | |||
ff87319a74 | |||
fa517417ed | |||
f9b86a6b2e | |||
8a21dfa93f | |||
c88ae2d7fe | |||
25e979687f | |||
af866939f4 | |||
e72becdfcb | |||
4bd97eecc9 | |||
8ffe6dcfa0 | |||
23002ac70d | |||
1262ad3cd4 | |||
d8f145c4dc | |||
9c5fd1b478 | |||
24f3285003 | |||
179520a211 | |||
ec31a4fe17 | |||
ab780485b2 | |||
07c5c2972d | |||
af593117e4 | |||
931505d135 | |||
6c7433b2f1 | |||
38ca0accde | |||
df79c2cf48 | |||
94bcbeb604 | |||
35e45333b1 | |||
f17a6f13a4 | |||
1bff7bdc47 | |||
13cb2c695f | |||
c581b80132 | |||
4dd0ae8bdc | |||
4db67e5bc5 | |||
6aa9122160 | |||
f84f2dca64 | |||
3c6992e910 | |||
7f79d16f02 | |||
790c386ba8 | |||
ee72badf21 | |||
c9c4453660 | |||
f3611ac693 | |||
cc6fe24e82 | |||
5a7730951a | |||
eef729b5f9 | |||
0bb0a38649 | |||
39029adcd8 | |||
c967f91abb | |||
1ba0685596 | |||
f2daa6a150 | |||
e021d42551 | |||
13509e31ca | |||
b9af805ac1 | |||
378d2bc8ba | |||
b73aa55a75 | |||
a729dd1380 | |||
09335e2cf1 | |||
31738c465d | |||
38fb64130d | |||
493b10393b | |||
b406f52670 | |||
ef3f314754 | |||
d2910686cd | |||
793b1b56d9 | |||
d8f9075e2a | |||
1199d4ead9 | |||
4520e1bb3e | |||
afece8193e | |||
3b14585d1a | |||
9cd32a908f | |||
b9ca02088d | |||
440ce0221a | |||
caff7eda9f | |||
aef1cefc18 | |||
1385c7cc9b | |||
8d0260b644 | |||
5d9827fb60 | |||
256d711fde | |||
1d82c3779b | |||
abc9d07977 | |||
40d95acfb9 | |||
9a92bc05db | |||
8962bf00f6 | |||
2083954aa5 | |||
66af258876 | |||
4ba04031ef | |||
a30456a92d | |||
c8dd13577e | |||
fac35b46bb | |||
748cb778e0 | |||
bbcca24bcc | |||
b8c52b1120 | |||
b1b3ce48ee | |||
da864f4c6c | |||
758f627e12 | |||
20322c6ab8 | |||
7a711f0690 | |||
067b977ec8 | |||
58f0ca3d8a | |||
4176f3659b | |||
5979fe5eef | |||
362ba21567 | |||
71894ba245 | |||
2b19e0fbc6 | |||
4d0b402e8b | |||
933e0c30bf | |||
b430afe3e1 | |||
2f25f1790e | |||
d90fcf15bd | |||
be9cc41957 | |||
ef99eeb300 | |||
1646241dfb | |||
543e628a8b | |||
36269cbed6 | |||
75dcdc72d2 | |||
f5c90bebdc | |||
15af66de55 | |||
17c8ac8248 | |||
e5c6b9a979 | |||
753849cedd | |||
b81e4c01ec | |||
2a32b05df1 | |||
e3a0fe88c1 | |||
ee3aa49eee | |||
dd27ad79bd | |||
cfd0f556a5 | |||
347e70f4ea | |||
828aae35ce | |||
2f56783b7e | |||
dc4ecdaa38 | |||
1440e8c55d | |||
51a072808f | |||
0a8c2926ea | |||
5e79f567a7 | |||
e2eb26eb93 | |||
740a50a26d | |||
be3f248a5a | |||
f2870caed2 | |||
ad22d3fd91 | |||
9dcd8b6edf | |||
9607e0e55d | |||
ad221eaaa2 | |||
74a1a5262d | |||
32ae82d4da | |||
9c6c8d4f8f | |||
45fbe6972b | |||
c262132a2f | |||
911a7ef6b5 | |||
8cb3757f5c | |||
10bf914d78 | |||
684177ee44 | |||
b2052ca308 | |||
4174fa648d | |||
182d67881d | |||
9284ac7461 | |||
55eec06e77 | |||
069acf0297 | |||
d9d2c7d213 | |||
83b28e0b00 | |||
c2d52fd48f | |||
32e6643303 | |||
5faf6be02d | |||
9ff93ac2d5 | |||
5131d8d328 | |||
2147f8ec8b | |||
cfa568a230 | |||
ace904cf16 | |||
cb337f4a65 | |||
9df78946c5 | |||
e47359129e | |||
4187e0f94c | |||
b2899529c3 | |||
3d2b4cbfa8 | |||
9daa424afd | |||
aa04951081 | |||
d8da8023c2 | |||
60cadb8b6d | |||
dcf8783c2e | |||
eb9dc95c58 | |||
f94fb4f65e | |||
e0aff2cf9d | |||
d2369f45ce | |||
7b718ada63 | |||
652604a36f | |||
8a4834dd2b | |||
6d49093620 | |||
489ce0bebc | |||
58922c23a6 | |||
be3183fc45 | |||
38b4812eb3 | |||
69fdc2d821 | |||
9104b0f974 | |||
6ec7373a1a | |||
39be605459 | |||
4d4459fa4e | |||
2a3dbaa7b4 | |||
6069e8f083 | |||
30ea223d09 | |||
0a957d7097 | |||
f28a898053 | |||
8921d4fac8 | |||
a66578c46d | |||
e45dcf61c4 | |||
40bfc9b368 | |||
73684d11c8 | |||
0d4ca4520b | |||
f1c1846c66 | |||
d59295688e | |||
c1808164f2 | |||
8f8562705a | |||
6da6723c72 | |||
0a726d598c | |||
4ffd2265ea | |||
3ce6269212 | |||
dc0cf26f51 | |||
713a1f03e9 | |||
c07952629c | |||
d958b1808c | |||
4a596c7373 | |||
bf7c8d5a5c | |||
84f9ee3765 | |||
c22536ce67 | |||
c14fd69a0e | |||
0812596929 | |||
d33a449332 | |||
02b99d2b06 | |||
b4f0cf510d | |||
eb6b1b431c | |||
e955ddb9f1 | |||
48acd101a5 | |||
694cedb89a | |||
47e9f820e4 | |||
a7d7b5abc3 | |||
03d6c86899 | |||
e9bd1bad67 | |||
c9f0295516 | |||
42df6d58b1 | |||
078a2d7e39 | |||
f352399428 | |||
0b2f115b73 | |||
9aed4b0e87 | |||
3054f91fe7 | |||
91da129abc | |||
f77c27ca71 | |||
19cc93daae | |||
4516bbdadd | |||
0cf9b20328 | |||
1c510d45f0 | |||
5b958d7ff6 | |||
d9872bc94d | |||
f177a39b96 | |||
0e53ead14e | |||
9b0fb9ecdc | |||
fa08c52f74 | |||
ce15eed343 | |||
b993da9751 | |||
a93e3be197 | |||
858d56d20c | |||
0818abe233 | |||
c39138e3ba | |||
98c530cada | |||
e4f3c1ae94 | |||
05b45f8cf5 | |||
d530059e7e | |||
7a04be0f30 | |||
c3d8c8d4b0 | |||
0af4be3d99 | |||
8a68e1b49d | |||
cf99f0fca0 | |||
31e335792f | |||
d1efddd312 | |||
dbe1579fc4 | |||
2de20937ac | |||
10f5967e41 | |||
0f743cec41 | |||
f371c47be5 | |||
d334eed9bb | |||
0819df3d26 | |||
e276443d2d | |||
0fc862bac3 | |||
c640289f4f | |||
8891111b2c | |||
abd0ba49ca | |||
62f00fa970 | |||
f6252b73f1 | |||
0dbed93454 | |||
1cf60acb29 | |||
44889a3826 | |||
8a3c751c10 | |||
f14ad8be58 | |||
4463d2408c | |||
7e60328cff | |||
45ba4675fc | |||
79c685c99b | |||
1c5567225c | |||
8ba852084e | |||
9365706777 | |||
8e8415515d | |||
eb9fe7c401 | |||
371b33a2e1 | |||
2711f2cb2f | |||
25dd38af5c | |||
0545f6b74d | |||
e7b8220bac | |||
9a0adcf9ed | |||
0a8fb1b835 | |||
92a8d864d3 | |||
fa46252c65 | |||
e051581c39 | |||
50a9772388 | |||
75fdb8f2e4 | |||
de755ac0bb | |||
7ca0a8c56c | |||
1cb3e5f98c | |||
f507452a37 | |||
083a213e74 | |||
8f17d373a3 | |||
5e6cc4f55a | |||
d8550f6cca | |||
e70753df5e | |||
0744e23ca6 | |||
fcd4f223f8 | |||
39beacf884 | |||
69c2400ec7 | |||
81561c6f3d | |||
85d393fec3 | |||
0d8e2f0d4a | |||
13b9a7bf6e | |||
f6aeee2b70 | |||
86e7b7bdb3 | |||
735995954f | |||
98c4b658c4 | |||
3c3e2f80da | |||
eba0778045 | |||
4055498921 | |||
811fd98a39 | |||
47930035a7 | |||
6a8dbf49da | |||
0e07fcc706 | |||
dbe7f464bd | |||
7ca74aeea7 | |||
cf7c5102fc | |||
b71eb12e23 | |||
709b06baa3 | |||
f900d520da | |||
f2e94e6819 | |||
be21e7d253 | |||
8f0cc9de03 | |||
67b04473b5 | |||
b2ff041ec0 | |||
8dea7df82a | |||
5f6f54db36 | |||
41bebfedc4 | |||
4917f32574 | |||
8f4f87cd8f | |||
7ca2df9fcc | |||
d96bd15b3b | |||
cb5601c68b | |||
34e76494e3 | |||
81bba8c829 | |||
9ac5011bed | |||
6c055ff9ef | |||
db89754a26 | |||
8239fd7e0e | |||
e7ea8ac40f | |||
a249a164f7 | |||
44896559c6 | |||
112495323e | |||
2767fca5d6 | |||
b5b32cacfc | |||
98a74a15f7 | |||
68686cd249 | |||
565dbd88ff | |||
c4d2ece9c7 | |||
59f00ea3df | |||
00f4691f38 | |||
a578857806 | |||
80e46db48a | |||
f4ad04ec2e | |||
66d01aecc3 | |||
b176b972b6 | |||
90ccf88d4b | |||
12b5c88acf | |||
3024ace641 | |||
d907010e1d | |||
bc5068ac7b | |||
68482732f7 | |||
d05f914841 | |||
f323d06f5c | |||
0aad14dcfe | |||
b812c7493a | |||
f244170f7b | |||
5c9d0fd40a | |||
10d6e44a38 | |||
a7a793088d | |||
18ce6c83c4 | |||
768f335a3c | |||
56ed583bff | |||
901f3c4f7a | |||
d12e6a0465 | |||
ef5a05d051 | |||
111cdbd4dc | |||
4e70f5b8f1 | |||
26aac6c45d | |||
0de8cbfd45 | |||
c6d72f0487 | |||
c79e79a5b6 | |||
f73c912945 | |||
37cb49d785 | |||
ea9836a701 | |||
3dbb8a0cc1 | |||
0e1818f535 | |||
e1947c0077 | |||
7c349b12b2 | |||
d758bedaed | |||
a80146e894 | |||
68d13b8724 | |||
f974e1b6cd | |||
50d3a53e4f | |||
53be80a26d | |||
2d608621d9 | |||
ede5aceeeb | |||
b6959bdfd4 | |||
eb0dee07d8 | |||
067a42d400 | |||
f363ebd41d | |||
698ae56d82 | |||
5a9793a952 | |||
57fffc8ef0 | |||
78d4bc07d2 | |||
b381e629f1 | |||
0c7314f771 | |||
4dca905a91 | |||
4ace7e07c9 | |||
74c80fa536 | |||
f2a005eeac | |||
7f29769352 | |||
ffcc967aef | |||
23aefccbe9 | |||
a0d70ea8a4 | |||
db29a31de6 | |||
e399815427 | |||
16eedf4153 | |||
ce87d2e45c | |||
c18167889d | |||
adefaf2fa8 | |||
c9d830f9ae | |||
9e70bb448a | |||
6c7d3ae0bf | |||
51211dccb0 | |||
53f9c22fb7 | |||
1b3e40fd70 | |||
dc3c130162 | |||
ea7231ff26 | |||
b47b942e97 | |||
b90ce01e05 | |||
85d61c4c93 | |||
ad307e859e | |||
f6801187cb | |||
5b929e85cf | |||
8e2728902a | |||
6894a224b6 | |||
77f5d0be35 | |||
bce1345ccc | |||
2c26d55813 | |||
87f411e5f1 | |||
4af3fa4eb2 | |||
7974633bba | |||
1fb75c908b | |||
26112a1ed6 | |||
17bcfe154c | |||
3ce16dc9a3 | |||
f9342b1c92 | |||
39cc420415 | |||
9b7323f9fa | |||
77fff553d1 | |||
cfdd1af3a3 | |||
22da4182b1 | |||
002f6d3e87 | |||
02998fff49 | |||
8156fce81a | |||
2d3b0717f8 | |||
e33200058d | |||
7230a91b4f | |||
c06c5d4104 | |||
92ae1109d0 | |||
19ffd031ec | |||
466a0c6049 | |||
97e5f2e656 | |||
bce386bc7a | |||
f47ffd7ed0 | |||
0b115c3228 | |||
a22c12adc9 | |||
8f293db29b | |||
7bcc559ec7 | |||
e3a8e1a187 | |||
9d9d0461ad | |||
6bacddc159 | |||
b7d66efb20 | |||
26480dc602 | |||
ba316d02ca | |||
82582d24ea | |||
aeaaa2f7d5 | |||
89c39d15de | |||
2cabc63752 | |||
e03311e5ec | |||
810e12f474 | |||
60157eb70c | |||
1f3f456123 | |||
97b7d920cb | |||
3ffd79c279 | |||
09c7b2a5e4 | |||
df1447b917 | |||
22f22c0fa0 | |||
272de60f9f | |||
b40dd46871 | |||
e67d2ee498 | |||
310f6a385c | |||
6245684801 | |||
79f0e5768b | |||
967f28542f | |||
df413d1af0 | |||
a3b4ceba50 | |||
2496ec73bf | |||
f84fe82f9b | |||
c5a073cee8 | |||
ed81a17039 | |||
22f8c4b88b | |||
27d7d03d4c | |||
ca8d83099f | |||
3b250dbbd0 | |||
bc0215b647 | |||
25527ec1dd | |||
9e1ac8cd28 | |||
8688334f0d | |||
8d6a70ed7b | |||
36e3eeecaa | |||
25d08c1a71 | |||
7c1d0f2e8f | |||
0e8cd20533 | |||
6bc5c05cf3 | |||
dbf6676115 | |||
188774f30a | |||
cfef1f3432 | |||
892ea0e9af | |||
f6549cda33 | |||
9fb83f268b | |||
31d927c93d | |||
16977009ea | |||
08db3b1613 | |||
32c6228dfa | |||
f3700c39e3 | |||
7d0aa8d91f | |||
bdfe77dbb5 | |||
2e225a1435 | |||
c2a4bc2603 | |||
561caf966a | |||
33eb5f8117 | |||
efa62e72af | |||
94e8bf4a72 | |||
391d7b01d1 | |||
9d1cd085ea | |||
311972c39f | |||
72d4fa6cd0 | |||
016bf1d671 | |||
406b06a0be | |||
24439f1dc2 | |||
15df2dfb0c | |||
d393cee732 | |||
4c175ca340 | |||
5ed21fd740 | |||
88af6c441f | |||
5da9bd1784 | |||
a122c38666 | |||
e9870a4455 | |||
dbb8dae5e2 | |||
6f9043b2bc | |||
0235624c64 | |||
ea8f121cb0 | |||
9b9cb83a06 | |||
17421497a1 | |||
761f6152d0 | |||
eb14635a53 | |||
37b065ce6a | |||
dd0f8faf79 | |||
006ebf3f15 | |||
572c7ebbd8 | |||
b728cd61ae | |||
04f71155b0 | |||
e45c5ae71e | |||
632911d28c | |||
5fb72513a0 | |||
4b392ad70a | |||
42f6fbb4e5 | |||
afce1682a6 | |||
9f7af1c7d3 | |||
ca1355f80c | |||
0d2f35c22f | |||
6c71949888 | |||
91e06d0858 | |||
fe776edc9e | |||
1c7185a574 | |||
8a7825f3bd | |||
3f23531f20 | |||
29d95a53a3 | |||
718835255f | |||
ca1f910d55 | |||
0e410af63f | |||
0bbe095f6f | |||
8b1a457312 | |||
7a46b2fd1b | |||
bfd25b8a14 | |||
dae8163846 | |||
4db6c16068 | |||
906ecc021b | |||
8fc593a73e | |||
f8e3b62edf | |||
3051724ad8 | |||
b82abb066d | |||
ccfb97612e | |||
6bf3dd96fb | |||
f1e8b4b6e6 | |||
82af723f1f | |||
aeb90a3674 | |||
64ab8e3fbe | |||
f7474340cd | |||
04acbf6509 | |||
f88c02cccd | |||
be5e0ea3fd | |||
b6c7af32de | |||
29294318d0 | |||
d3325f17c5 | |||
51514252b6 | |||
18abc4913b | |||
d2958e1a7d | |||
be44c3f9c2 | |||
72e407b69d | |||
66b9d0739b | |||
3e717ecdbc | |||
91720a0f34 | |||
9d531a385d | |||
26137200b9 | |||
376b5fc160 | |||
dbb2924ccc | |||
d0188f42b7 | |||
6208706d46 | |||
3288264ca0 | |||
16f2ddddf0 | |||
783185d99c | |||
4ca83de131 | |||
f2b986a357 | |||
a0065bc2ba | |||
dc43b54892 | |||
603a3dd273 | |||
16b5f70e4b | |||
9a989b46cc | |||
6c64e7c220 | |||
d66325a241 | |||
bf8190d122 | |||
23aec25686 | |||
405c0c609f | |||
95e0f3378d | |||
c9850a5e24 | |||
3cf7d01f37 | |||
ae9fae1f7d | |||
69b423edc8 | |||
5e8b379c50 | |||
d03124dfba | |||
fdc11bba8d | |||
dc5d8a6cb7 | |||
2042f59283 | |||
8230a408ac | |||
7805e5cea4 | |||
36868644dc | |||
321b67efd4 | |||
9ea42dd981 | |||
631d97c6b3 | |||
13569fe4a2 | |||
12e2b93ac9 | |||
0dd1b668cd | |||
e751be21ea | |||
15b8a159f5 | |||
24a88fcfb5 | |||
9f842be53a | |||
c6632fe083 | |||
0b720768b8 | |||
9f12fe7e0a | |||
cff5b82b06 | |||
677cc3bee9 | |||
aef5cc50d5 | |||
6729827645 | |||
d7eeadac41 | |||
7cdfa7d4c5 | |||
9070b475ea | |||
43a99bfef2 | |||
18ffd678b7 | |||
7566d3dac8 | |||
741b93dc04 | |||
b19298f633 | |||
1954dfd4d7 | |||
31cc966b38 | |||
261931c8ef | |||
2c44c25b25 | |||
f072ec3a8c | |||
113869bd08 | |||
0dab96f0a6 | |||
342f63a625 | |||
f52c6b65ce | |||
07efa87fe5 | |||
ffa04b625a | |||
b9807aac56 | |||
b973c0ab82 | |||
0d876b9322 | |||
09a72f2cfb | |||
455ac8786a | |||
213e68859e | |||
2f4967a23a | |||
0c170fc399 | |||
d1383d78c5 | |||
8876f1f992 | |||
b53cb50a91 | |||
1f35534dfb | |||
294dad01c3 | |||
0ec566e6df | |||
536a85eadc | |||
8cdc73c31f | |||
afaabd06d9 | |||
bb6f6e7d27 | |||
73588ea22b | |||
b6e3ad9325 | |||
7e9bf9598d | |||
3680e03cdb | |||
0b89598f39 | |||
bad4c9dc60 | |||
95a751c505 | |||
359e761922 | |||
654bb0c8ca | |||
3eb503b13b | |||
31e0bb43e8 | |||
4bc0fd98ca | |||
9206f0cd2e | |||
e834cd7595 | |||
50e1e2d982 | |||
6ddb20d022 | |||
0cacfa140b | |||
1ab016d21e | |||
6ad7d18c42 | |||
a46774c2ee | |||
58f9b9b0c1 | |||
0000257dcc | |||
8c3907df82 | |||
f7c1dff576 | |||
16982dc76a | |||
9532db7bae | |||
a93062e0f0 | |||
6c828a29ec | |||
b7c65b2ba6 | |||
f40a8853f6 | |||
1889c33d80 | |||
308ca479df | |||
0b7d5c839a | |||
9e0d6618b1 | |||
02a2bd92af | |||
03d90f79ea | |||
b066cfd904 | |||
475d7f01b7 | |||
b30597b8f1 | |||
1824f03d35 | |||
4cd3d167b1 | |||
4640c63094 | |||
2460012caa | |||
db7768ef57 | |||
74b6aa7353 | |||
0e0297d650 | |||
8dd6ecc0b8 | |||
e84d4d3cb5 | |||
da54154ae7 | |||
a9dbbe1955 | |||
3fbe86c286 | |||
0022e71dd4 | |||
c74121fefc | |||
67c3581989 | |||
1d1c1141a3 | |||
cf00784096 | |||
db209af787 | |||
30bd94ee43 | |||
f313a5f221 | |||
b9ef5af5d7 | |||
59677b6521 | |||
56283df05a | |||
ef271a088a | |||
6043b7c75d | |||
c338779f0e | |||
34239dc383 | |||
67758609a7 | |||
6af3b4a51d | |||
16afca8058 | |||
f2bb24f6ab | |||
44ee7c66ce | |||
117622200b | |||
340ba5c714 | |||
9e16b506e5 | |||
e865d85c2c | |||
284e66c730 | |||
587f244f1d | |||
379e5741e7 | |||
ec4c346e0a | |||
5099f98d2a | |||
ebc99adc58 | |||
048dff7e9e | |||
a70934938a | |||
d9a93f996f | |||
3456d87bb5 | |||
4947fa4d45 | |||
37f4b34b5e | |||
66206399e1 | |||
1e3f62718d | |||
114ab98059 | |||
47baa219fd | |||
96509717cb | |||
89bbcb6092 | |||
95dbb65612 | |||
7db8d52624 | |||
77073fa78c | |||
9e315f99d0 | |||
16ad3ee7fe | |||
559015c70d | |||
15d02dab4f | |||
332a1da167 | |||
e12aa9e657 | |||
9503e07dc8 | |||
9b44370832 | |||
568015c58f | |||
58f56eac90 | |||
03532e4063 | |||
de6081c2dc | |||
197b46880c | |||
b7ec22ee89 | |||
fad53a9fa2 | |||
5b4fec11ed | |||
0ef4602a65 | |||
c8f182f13f | |||
36630d9586 | |||
32f2acee53 | |||
3be2ef5c91 | |||
7e5d269c39 | |||
6e0c090622 | |||
cccf3ca617 | |||
9e9b5945fe | |||
77f6019d82 | |||
35432d919c | |||
25e6f82aa3 | |||
d22993871f | |||
80563de587 | |||
b5102c4269 | |||
9d215ea27d | |||
cdf6886c39 | |||
79b034b505 | |||
bfba105aec | |||
1bbdaa1251 | |||
ca462bec84 | |||
eb5dcab32d | |||
ca3acdacdc | |||
33f63508e8 | |||
5033cb3186 | |||
3d1122be7c | |||
1d092a15fb | |||
501a21b89e | |||
b9006e4417 | |||
5b3b96b372 | |||
338a0f9251 | |||
29ba761d7c | |||
b96e668dfd | |||
de3753d04e | |||
2a030fe7fb | |||
f595d823b6 | |||
78d191f7d8 | |||
3b6dbe76c5 | |||
e3b348b55c | |||
cf012a7946 | |||
8d1ff01ee8 | |||
e9bda50054 | |||
8ca2824b00 | |||
f7d70daff3 | |||
42d27d69dc | |||
5a9d1e3257 | |||
9cc9a16bb9 | |||
a3efe9a9dc | |||
94b0b9498d | |||
bb322d6bf3 | |||
b0f820e95a | |||
da588380ed | |||
8fa65408ed | |||
2d68d0da63 | |||
2bc7fa0316 | |||
55f416c48c | |||
aff91f49ef | |||
ba02372d13 | |||
e5a3ef3e22 | |||
137c3ef2ce | |||
87352f0b62 | |||
2226884946 | |||
9d2cd46464 | |||
f3b2b350ce | |||
96c04481da | |||
dad2642fa7 | |||
59bdb943dd | |||
67da6ee379 | |||
9c9c102e74 | |||
26241be6fa | |||
2bb4dd5d01 | |||
5312bb1dee | |||
bf6f5aa335 | |||
4a58763f98 | |||
b8202da7aa | |||
edfc82ac75 | |||
b28fc85974 | |||
ab1b36bcdc | |||
5443ac4688 | |||
d92d8ba0e4 | |||
0f19d303eb | |||
1332f597e5 | |||
de004074b7 | |||
29741f39ac | |||
33ea8984fc | |||
85517b0344 | |||
74c574255e | |||
70d4e98dff | |||
f1900d30f2 | |||
463567cb07 | |||
53b0e675c3 | |||
d323bb35cc | |||
3e13e478ad | |||
5f421b0679 | |||
c99fe54db1 | |||
05a2985c5b | |||
47408498b9 | |||
e75b4ec6bf | |||
ff99ab1239 | |||
2841cd8498 | |||
519f4af867 | |||
68cc3aba21 | |||
3a2970a495 | |||
b31fb1a269 | |||
3801eeec43 | |||
94cdd399d5 | |||
c784144a07 | |||
b600e5777e | |||
e49074d797 | |||
02d26467f9 | |||
e68b45c76a | |||
f410f7d4d1 | |||
d4dbe6fe17 | |||
c7305ba5e1 | |||
e11963aca0 | |||
2d77426e04 | |||
7e0f9e1d28 | |||
18e181bb9f | |||
c3c9585a95 | |||
4b5b941761 | |||
79c70b31a3 | |||
072139f707 | |||
9d80db98c5 | |||
a5df029d43 | |||
47f16aadd5 | |||
f8b2b18c6e | |||
4be6c06af5 | |||
92c58eea7f | |||
5e6049bf3f | |||
7adaa146dc | |||
e3b51f593e | |||
e64094dfcc | |||
cb6fcadb86 | |||
297b84a18b | |||
b7c0e049b5 | |||
aeef160d0b | |||
34c1a304a9 | |||
4f1ae4733c | |||
e009c1a25a | |||
79f12a7058 | |||
deb197cfa5 | |||
2710130667 | |||
48163961ed | |||
8658cb5f29 | |||
a6a56e4791 | |||
22e39998e2 | |||
70d1056d48 | |||
3bd5c3e1b5 | |||
0a1a4fd3b5 | |||
e508b22d34 | |||
a7815f107e | |||
ded5670108 | |||
c1ffeb331b | |||
ad1148d3e2 | |||
a7b926d907 | |||
1f7a821c09 | |||
bf45edb5d8 | |||
686f5bf151 | |||
426fe793e6 | |||
aee55103a3 | |||
778bf97079 | |||
2dcb3111f8 | |||
03d1f98402 | |||
34755b32dc | |||
6679ee1ca2 | |||
8420c74b31 | |||
0077105a2d | |||
51db617584 | |||
514b695907 | |||
b470ce2dad | |||
161850150a | |||
b02cfa9d41 | |||
dfe655393d | |||
8c81dae167 |
.circleci
.editorconfig.github/ISSUE_TEMPLATE
.gitignore.run
.vscode
BTCPayServer.Abstractions
BTCPayServer.Abstractions.csproj
Configuration
Constants
Contracts
BaseDbContextFactory.csIBTCPayServerPlugin.csINotificationHandler.csIPluginHookAction.csIPluginHookFilter.csIPluginHookService.csISettingsRepository.csIStartupTask.csISyncSummaryProvider.csIUIExtension.cs
Converters
Extensions
Models
PushNuget.ps1Services
icon.pngBTCPayServer.Client
BTCPayServer.Client.csprojBTCPayServerClient.APIKeys.csBTCPayServerClient.Authorization.csBTCPayServerClient.Health.csBTCPayServerClient.Invoices.csBTCPayServerClient.Lightning.Internal.csBTCPayServerClient.Lightning.Store.csBTCPayServerClient.Notifications.csBTCPayServerClient.OnChainPaymentMethods.csBTCPayServerClient.PaymentRequests.csBTCPayServerClient.PullPayments.csBTCPayServerClient.ServerInfo.csBTCPayServerClient.Stores.csBTCPayServerClient.Webhooks.csBTCPayServerClient.csGreenFieldAPIException.csGreenFieldValidationException.cs
JsonConverters
LightMoneyJsonConverter.csMoneyJsonConverter.csNodeUriJsonConverter.csNumericStringJsonConverter.csPermissionJsonConverter.csTimeSpanJsonConverter.cs
Models
AddCustomerEmailRequest.csApiHealthData.csApiKeyData.csApplicationUserData.csApprovePayoutRequest.csConnectToNodeRequest.csCreateApiKeyRequest.csCreateApplicationUserRequest.csCreateInvoiceRequest.csCreateLightningInvoiceRequest.csCreatePaymentRequestRequest.csCreatePayoutRequest.csCreatePullPaymentRequest.csCreateStoreRequest.csGreenfieldAPIError.csGreenfieldValidationError.csInvoiceData.csInvoiceExceptionStatus.csInvoicePaymentMethodDataModel.csLightningInvoiceData.csLightningNodeInformationData.csMarkInvoiceStatusRequest.csNotificationData.csOnChainPaymentMethodData.csOnChainPaymentMethodPreviewResultData.csOpenLightningChannelRequest.csPayLightningInvoiceRequest.csPaymentRequestBaseData.csPaymentRequestData.csPayoutData.csPullPaymentBaseData.csServerInfoData.csStoreBaseData.csStoreData.csStoreWebhookData.csUpdateInvoiceRequest.csUpdateNotification.csUpdatePaymentRequestRequest.csUpdateStoreRequest.csWebhookDeliveryData.csWebhookDeliveryStatus.csWebhookEvent.csWebhookEventType.csWebhookInvoiceEvent.cs
Permissions.csPushNuget.ps1icon.pngBTCPayServer.Common
Altcoins
BTCPayNetworkProvider.Argoneum.csBTCPayNetworkProvider.BGold.csBTCPayNetworkProvider.BPlus.csBTCPayNetworkProvider.Bitcore.csBTCPayNetworkProvider.Chaincoin.csBTCPayNetworkProvider.Dash.csBTCPayNetworkProvider.Dogecoin.csBTCPayNetworkProvider.Feathercoin.csBTCPayNetworkProvider.Groestlcoin.csBTCPayNetworkProvider.Litecoin.csBTCPayNetworkProvider.Monacoin.csBTCPayNetworkProvider.MonetaryUnit.csBTCPayNetworkProvider.Polis.csBTCPayNetworkProvider.Ufo.csBTCPayNetworkProvider.Viacoin.cs
BTCPayNetwork.csBTCPayNetworkProvider.Bitcoin.csBTCPayNetworkProvider.csBTCPayServer.Common.csprojCustomThreadPool.csExtensions.csEthereum
Liquid
BTCPayNetworkProvider.Liquid.csBTCPayNetworkProvider.LiquidAssets.csElementsLikeBtcPayNetwork.csLiquidExtensions.cs
Monero
Logging
Shims.csSynchronizationContextRemover.csZipUtils.csBTCPayServer.Data
ApplicationDbContext.csApplicationDbContextFactory.csBTCPayServer.Data.csproj
Data
APIKeyData.csAddressInvoiceData.csAppData.csApplicationDbContext.csApplicationDbContextFactory.csApplicationUser.csHistoricalAddressInvoiceData.csInvoiceData.csInvoiceEventData.csInvoiceSearchData.csInvoiceWebhookDeliveryData.csNotificationData.csOffchainTransactionData.csPairedSINData.csPairingCodeData.csPayjoinLock.csPaymentData.csPaymentRequestData.csPayoutData.csPendingInvoiceData.csPlannedTransaction.csPullPaymentData.csRefundData.csSettingData.csStoreData.csStoreWebhookData.csStoredFile.csU2FDevice.csUserStore.csWalletData.csWalletTransactionData.csWebhookData.csWebhookDeliveryData.cs
Migrations
20170913143004_Init.cs20170926073744_Settings.cs20170926084408_RequiresEmailConfirmation.cs20171006013443_AddressMapping.cs20171010082424_Tokens.cs20171012020112_PendingInvoices.cs20171023101754_StoreBlob.cs20171024163354_RenewUsedAddresses.cs20171105235734_PaymentAccounted.cs20171221054550_AltcoinSupport.cs20180106095215_DerivationStrategies.cs20180109021122_defaultcrypto.cs20180114123253_events.cs20180402095640_appdata.cs20180429083930_legacyapikey.cs20180719095626_CanDeleteStores.cs20190121133309_AddPaymentRequests.cs20190219032533_AppsTagging.cs20190225091644_AddOpenIddict.cs20190324141717_AddFiles.cs20190425081749_AddU2fDevices.cs20190701082105_sort_paymentrequests.cs20190802142637_WalletData.cs20200110064617_OpenIddictUpdate.cs20200119130108_ExtendApiKeys.cs20200224134444_Remove_OpenIddict.cs20200225133433_AddApiKeyLabel.cs20200402065615_AddApiKeyBlob.cs20200413052418_PlannedTransactions.cs20200507092343_AddArchivedToInvoice.cs20200625064111_refundnotificationpullpayments.cs20200901161733_AddInvoiceEventLogSeverity.cs20201002145033_AddCreateDateToUser.cs20201007090617_u2fDeviceCascade.cs20201015151438_AddDisabledNotificationsToUser.cs20201108054749_webhooks.cs20201208054211_invoicesorderindex.cs20201228225040_AddingInvoiceSearchesTable.csApplicationDbContextModelSnapshot.cs
MigrationsExtensions.csBTCPayServer.PluginPacker
BTCPayServer.Plugins.Test
BTCPayServer.Rating
BTCPayServer.Rating.csprojCurrencies.jsonCurrencyNameTable.csCurrencyPair.csExchangeRates.csExtensions.csMultiValueDictionary.cs
Providers
ArgoneumRateProvider.csBackgroundFetcherRateProvider.csBitbankRateProvider.csBitflyerRateProvider.csBitpayRateProvider.csByllsRateProvider.csCoinGeckoRateProvider.csExchangeSharpRateProvider.csFallbackRateProvider.csHitBTCRateProvider.csHttpClientRequestMaker.csIRateProvider.csKrakenExchangeRateProvider.csNullRateProvider.csPolisRateProvider.cs
RateRules.csServices
BTCPayServer.Tests
AltcoinTests
ApiKeysTests.csBTCPayServer.Tests.csprojBTCPayServerTester.csChangellyTests.csChargeTester.csCheckoutUITests.csCoinSwitchTests.csCrowdfundTests.csCustomerHttpServer.csDockerfileExtensions.csFakeServer.csGreenfieldAPITests.csLightningDTester.csLnd
Logging
MockDelay.csMocks
PSBTTests.csPayJoinTests.csPaymentHandlerTest.csPaymentRequestTests.csProcessLauncher.csProperties
README.mdRateRulesTest.csSeleniumTester.csSeleniumTests.csServerTester.csStorageTests.csTestAccount.csTestUtils.csU2FTests.csUnitTest1.csUtilitiesTests.csUtils.csdocker-bitcoin-generate.shdocker-compose.altcoins.ymldocker-compose.monero.ymldocker-compose.ymldocker-customer-lightning-cli.ps1docker-customer-lightning-cli.shdocker-elements.ps1docker-entrypoint.shdocker-lightning-channel-setup.shdocker-lightning-channel-teardown.shdocker-merchant-lightning-cli.ps1docker-merchant-lightning-cli.shxunit.runner.jsonBTCPayServer
BTCPayServer.csprojBitpayHttpException.csSocketFactory.csSocks5HttpClientHandler.csStorePolicies.csTransactionComparer.csWalletId.csWebSocketHelper.csWellKnownTempData.csZoneLimits.cs_ViewImports.cshtmlbundleconfig.json
Components
Icon
NotificationsDropdown
Pager
QRCode
UiExtensionPoint
Configuration
BTCPayServerOptions.csConfigException.csConfigurationExtensions.csDefaultConfiguration.csExternalConnectionString.csExternalService.csExternalServicesOptions.csLightningNetworkOptions.csNBXplorerConnectionSetting.csNBXplorerOptions.cs
Contracts
Controllers
AccessTokenController.csAccountController.csAppsController.Crowdfund.csAppsController.PointOfSale.csAppsController.csAppsPublicController.csChangellyController.csErrorController.cs
CorsPolicies.csCurrencies.txtCurrencyValue.csGreenField
ApiKeysController.csGreenFieldUtils.csHealthController.csInvoiceController.csLightningNodeApiController.Internal.csLightningNodeApiController.Store.csLightningNodeApiController.csNotificationsController.csPaymentRequestsController.csPullPaymentController.csServerInfoController.csStoreOnChainPaymentMethodsController.csStoreWebhooksController.csStoresController.csTestApiKeyController.csUsersController.cs
HomeController.csInvoiceController.API.csInvoiceController.UI.csInvoiceController.csMacaroons.csManageController.2FA.csManageController.APIKeys.csManageController.Notifications.csManageController.U2F.csManageController.csNotificationsController.csPaymentRequestController.csPublicController.csPublicLightningNodeInfoController.csPullPaymentController.csRateController.csServerController.Plugins.csServerController.Storage.csServerController.Users.csServerController.csStorageController.csStoresController.BTCLike.csStoresController.Changelly.csStoresController.CoinSwitch.csStoresController.Email.csStoresController.Integrations.csStoresController.LightningLike.csStoresController.csUserStoresController.csVaultController.csWalletsController.PSBT.csWalletsController.PullPayments.csWalletsController.csData
AddressInvoiceDataExtensions.csHistoricalAddressInvoiceDataExtensions.csInvoiceDataExtensions.csPaymentDataExtensions.csPaymentRequestDataExtensions.csPullPaymentsExtensions.csStoreBlob.csStoreDataExtensions.csWalletDataExtensions.csWalletTransactionDataExtensions.csWebhookDataExtensions.cs
DerivationSchemeParser.csDerivationSchemeSettings.csEventAggregator.csEvents
IHasInvoiceId.csInvoiceDataChangedEvent.csInvoiceEvent.csInvoiceIPNEvent.csInvoiceNeedUpdateEvent.csInvoiceNewAddressEvent.csInvoiceNewPaymentDetailsEvent.csInvoiceStopWatchedEvent.csNBXplorerStateChangedEvent.csNewBlockEvent.csUserPasswordResetRequestedEvent.csUserRegisteredEvent.csWalletChangedEvent.cs
ExplorerClientProvider.csExtensions.csExtensions
ActionLogicExtensions.csControllerBaseExtensions.csEmailSenderExtensions.csModelStateExtensions.csMoneyExtensions.csSSHClientExtensions.csStringExtensions.csUrlHelperExtensions.csWebHostExtensions.cs
Filters
ContentSecurityPolicyAttribute.csOnlyIfSupportAttribute.csOnlyMediaTypeAttribute.csReferrerPolicyAttribute.csXContentTypeOptionsAttribute.csXFrameOptionsAttribute.csXXSSProtectionAttribute.cs
HostedServices
AppInventoryUpdaterHostedService.csBackgroundJobSchedulerHostedService.csBaseAsyncService.csCheckConfigurationHostedService.csCssThemeManager.csDbMigrationsHostedService.csDelayedTransactionBroadcasterHostedService.csDynamicDnsHostedService.csEventHostedServiceBase.csInvoiceEventSaverService.csInvoiceNotificationManager.csInvoiceWatcher.csNBXplorerWaiter.csNewVersionCheckerHostedService.csPullPaymentHostedService.csRatesHostedService.csSocks5HttpProxyServer.csTorServicesHostedService.csTransactionLabelMarkerHostedService.csUserEventHostedService.csWebhookNotificationManager.cs
Hosting
BTCPayServerServices.csBTCpayMiddleware.csBlockExplorerLinkStartupTask.csHeadersOverrideMiddleware.csMigrationStartupTask.csResourceBundleProvider.csSkippableObjectValidatorProvider.csStartup.cs
HwiWebSocketTransport.csIDelay.csJsonConverters
CurrencyPairJsonConverter.csCurrencyValueJsonConverter.csDateTimeMilliJsonConverter.csPaymentMethodIdJsonConverter.csUriJsonConverter.cs
Logging
ModelBinders
DerivationSchemeModelBinder.csInvariantDecimalModelBinder.csPaymentMethodIdModelBinder.csWalletIdModelBinder.cs
Models
AccountViewModels
ForgotPasswordViewModel.csLoginViewModel.csLoginWith2faViewModel.csLoginWithRecoveryCodeViewModel.csRegisterViewModel.csSecondaryLoginViewModel.csSetPasswordViewModel.cs
AppViewModels
CreateAppViewModel.csListAppsViewModel.csUpdateCrowdfundViewModel.csUpdatePointOfSaleViewModel.csViewCrowdfundViewModel.csViewPointOfSaleViewModel.cs
Authorization
BasePagingViewModel.csBitpayCreateInvoiceRequest.csBitpayErrorsModel.csBitpayTranslatorViewModel.csConfirmModel.csDataWrapper.csErrorViewModel.csGetTokensResponse.csInvoiceResponse.csInvoicingModels
CreateInvoiceModel.csInvoiceDetailsModel.csInvoicesModel.csPaymentModel.csRefundModel.csUpdateCustomerModel.cs
ManageViewModels
ChangePasswordViewModel.csEnableAuthenticatorViewModel.csGenerateRecoveryCodesViewModel.csIndexViewModel.csRemoveLoginViewModel.csSetPasswordViewModel.csTwoFactorAuthenticationViewModel.cs
NotificationViewModels
PaymentRequestViewModels
PostRedictViewModel.csServerViewModels
ChargeServiceViewModel.csDynamicDnsViewModel.csEmailsViewModel.csLightningWalletServices.csLndSeedBackupViewModel.csLndServicesViewModel.csLogsViewModel.csMaintenanceViewModel.csSSHServiceViewModel.csServicesViewModel.csUserViewModel.csUsersViewModel.csViewFilesViewModel.cs
StoreViewModels
CheckoutExperienceViewModel.csCreateStoreViewModel.csDerivationSchemeViewModel.csEditWebhookViewModel.csIntegrationsViewModel.csLightningNodeViewModel.csPairingModel.csPayButtonViewModel.csRatesViewModel.csRecoverySeedBackupViewModel.csStoreUsersViewModel.csStoreViewModel.csStoresViewModel.csTokensViewModel.csUpdateChangellySettingsViewModel.csUpdateCoinSwitchSettingsViewModel.csWebhooksViewModel.cs
TokenRequest.csViewPullPaymentModel.csWalletViewModels
ListTransactionsViewModel.csListWalletsViewModel.csPayoutsModel.csPullPaymentsModel.csRescanWalletModel.csSignWithSeedViewModel.csSigningContextModel.csWalletModel.csWalletPSBTCombineViewModel.csWalletPSBTReadyViewModel.csWalletPSBTViewModel.csWalletSendLedgerModel.csWalletSendModel.csWalletSendVaultModel.csWalletSettingsViewModel.cs
PaymentRequest
Payments
Bitcoin
BitcoinLikeOnChainPaymentMethod.csBitcoinLikePaymentData.csBitcoinLikePaymentHandler.csNBXplorerListener.cs
Changelly
Changelly.csChangellyCalculationHelper.csChangellyClientProvider.csChangellyException.csChangellySettings.cs
Models
Coinswitch
IPaymentFilter.csIPaymentMethodDetails.csIPaymentMethodHandler.csISupportedPaymentMethod.csLightning
LightningLikePaymentData.csLightningLikePaymentHandler.csLightningLikePaymentMethodDetails.csLightningListener.csLightningSupportedPaymentMethod.cs
PayJoin
PaymentMethodExtensions.csPaymentMethodId.csPaymentMethodUnavailableException.csPaymentTypes.Bitcoin.csPaymentTypes.Lightning.csPaymentTypes.csPlugins
Program.csProperties
Roles.csSSH
SearchString.csSecurity
AuthenticationExtensions.cs
Bitpay
BitToken.csBitpayAuthenticationHandler.csBitpayAuthenticationOptions.csBitpayAuthenticationTypes.csBitpayAuthorizationHandler.csBitpayClaims.csPairingCodeEntity.csTokenRepository.cs
ContentSecurityPolicies.csCookieAuthorizationHandler.csGreenField
APIKeyExtensions.csAPIKeyRepository.csAPIKeysAuthenticationHandler.csBasicAuthenticationHandler.csGreenFieldAuthorizationHandler.csGreenFieldConstants.cs
PolicyRequirement.csSecurityExtensions.csServerPolicies.csServices
Altcoins
Ethereum
Configuration
EthereumLikeExtensions.csFilters
Payments
EthereumLikeOnChainPaymentMethodDetails.csEthereumLikePaymentData.csEthereumLikePaymentMethodHandler.csEthereumPaymentType.csEthereumSupportedPaymentMethod.cs
Services
UI
Monero
Configuration
MoneroLikeExtensions.csMoneroStoreNavExtension.csPayments
MoneroLikeOnChainPaymentMethodDetails.csMoneroLikePaymentData.csMoneroLikePaymentMethodHandler.csMoneroPaymentType.csMoneroSupportedPaymentMethod.cs
RPC
Services
MoneroLikeSummaryUpdaterHostedService.csMoneroListener.csMoneroRPCProvider.csMoneroSyncSummaryProvider.cs
UI
Apps
BTCPayNetworkJsonSerializerSettings.csBTCPayServerEnvironment.csDelayedTransactionBroadcaster.csDynamicDnsSettings.csFees
HardwareWalletService.csIBackgroundJobClient.csInvoices
Labels
LanguageService.csLedgerHardwareWalletService.csLightningClientFactoryService.csLightningConfigurationProvider.csMails
EmailSender.csEmailSenderFactory.csEmailSettings.csIEmailSender.csServerEmailSender.csStoreEmailSender.cs
MigrationSettings.csNBXSyncSummaryProvider.csNotifications
PayjoinClient.csPaymentRequests
PoliciesSettings.csSafe.csSettingsRepository.csShopify
ApiModels
CreateScriptResponse.csCreateWebhookResponse.cs
DataHolders
OrdersCountResp.csShopifyOrder.csShopifyTransaction.csTransactionsCreateReq.csTransactionsCreateResp.csTransactionsListResp.csModels
OrderTransactionRegisterLogic.csShopifyApiClient.csShopifyApiException.csShopifyExtensions.csShopifyOrderMarkerHostedService.csStores
ThemesSettings.csTorServices.csTorrc.csWalletRepository.csWallets
Storage
Models
Services
FileService.csStoredFileRepository.cs
StorageExtensions.csProviders
AmazonS3Storage/Configuration
AzureBlobStorage/Configuration
FileSystemStorage
GoogleCloudStorage/Configuration
Models
U2F
Validation
Views
Account
ConfirmEmail.cshtmlForgotPassword.cshtmlLogin.cshtmlLoginWith2fa.cshtmlLoginWithU2F.cshtmlRegister.cshtmlResetPassword.cshtmlResetPasswordConfirmation.cshtmlSecondaryLogin.cshtmlSetPassword.cshtml
Apps
AppsPublic
Error
EthereumLikeStore
Home
Invoice
Checkout-Body.cshtmlCheckout.cshtmlCheckoutNoScript.cshtmlInvoice.cshtmlListInvoices.cshtmlListInvoicesPaymentsPartial.cshtmlPosData.cshtmlRefund.cshtml
Manage
APIKeys.cshtmlAddApiKey.cshtmlAddU2FDevice.cshtmlAuthorizeAPIKey.cshtmlChangePassword.cshtmlConfirmAPIKey.cshtmlDisable2fa.cshtmlEnableAuthenticator.cshtmlGenerateRecoveryCodes.cshtmlIndex.cshtmlManageNavPages.csNotificationSettings.cshtmlResetAuthenticator.cshtmlSetPassword.cshtmlTwoFactorAuthentication.cshtmlU2FAuthentication.cshtml_Nav.cshtml
MoneroLikeStore
Notifications
PaymentRequest
EditPaymentRequest.cshtmlGetPaymentRequests.cshtmlMinimalPaymentRequest.cshtmlViewPaymentRequest.cshtml
PublicLightningNodeInfo
PullPayment
Server
CLightningRestServices.cshtmlCreateUser.cshtmlDynamicDnsServices.cshtmlFiles.cshtmlLightningWalletServices.cshtmlListPlugins.cshtmlListUsers.cshtmlLndServices.cshtmlLogs.cshtmlMaintenance.cshtmlP2PService.cshtmlPolicies.cshtmlRPCService.cshtmlServerNavPages.csServices.cshtmlTheme.cshtmlUser.cshtml_Nav.cshtml
Shared
Bitcoin
BitcoinLikeMethodCheckout.cshtmlBitcoinLikeMethodCheckoutNoScript.cshtmlNBXSyncSummary.cshtmlViewBitcoinLikePaymentData.cshtml
CameraScanner.cshtmlConfirm.cshtmlEmailsBody.cshtmlEthereum
ETHSyncSummary.cshtmlEthereumLikeMethodCheckout.cshtmlStoreNavEthereumExtension.cshtmlUpdateChainConfig.cshtmlViewEthereumLikePaymentData.cshtml
Header.cshtmlLayoutPartials
Lightning
LightningLikeMethodCheckout.cshtmlLightningLikeMethodCheckoutNoScript.cshtmlViewLightningLikePaymentData.cshtml
Monero
PostRedirect.cshtmlShowQR.cshtmlSyncModal.cshtmlVaultElements.cshtml_BTCPaySupporters.cshtml_Layout.cshtml_LayoutPos.cshtml_LayoutSimple.cshtml_LayoutWelcome.cshtml_NavLayout.cshtml_StatusMessage.cshtml_ValidationScriptsPartial.cshtmlStores
AddDerivationScheme.cshtmlAddDerivationSchemes_HardwareWalletDialogs.cshtmlAddDerivationSchemes_NBXWalletGenerate.cshtmlAddLightningNode.cshtmlCheckoutExperience.cshtmlCreateToken.cshtmlIntegrations.cshtml
Integrations
ListTokens.cshtmlModifyWebhook.cshtmlPayButton.cshtmlPayButtonEnable.cshtmlRates.cshtmlStoreNavPages.csStoreUsers.cshtmlUpdateChangellySettings.cshtmlUpdateStore.cshtmlWebhooks.cshtml_Nav.cshtmlUserStores
ViewsRazor.csWallets
CoinSelection.cshtmlListWallets.cshtmlNewPullPayment.cshtmlPayouts.cshtmlPullPayments.cshtmlSignWithSeed.cshtmlSigningContext.cshtmlWalletCameraScanner.cshtmlWalletPSBT.cshtmlWalletPSBTReady.cshtmlWalletReceive.cshtmlWalletRescan.cshtmlWalletSend.cshtmlWalletSendLedger.cshtmlWalletSendVault.cshtmlWalletSettings.cshtmlWalletSigningMenu.cshtmlWalletTransactions.cshtmlWalletsNavPages.cs_Nav.cshtml_ViewImports.cshtml
wwwroot
_bootstrap_kitchensink.html
checkout
fonts
montserrat-v14-latin-ext_latin-300.woffmontserrat-v14-latin-ext_latin-300.woff2montserrat-v14-latin-ext_latin-300italic.woffmontserrat-v14-latin-ext_latin-300italic.woff2montserrat-v14-latin-ext_latin-700.woffmontserrat-v14-latin-ext_latin-700.woff2montserrat-v14-latin-ext_latin-700italic.woffmontserrat-v14-latin-ext_latin-700italic.woff2montserrat-v14-latin-ext_latin-italic.woffmontserrat-v14-latin-ext_latin-italic.woff2montserrat-v14-latin-ext_latin-regular.woffmontserrat-v14-latin-ext_latin-regular.woff2open-sans-v17-latin-ext_latin-300.woffopen-sans-v17-latin-ext_latin-300.woff2open-sans-v17-latin-ext_latin-300italic.woffopen-sans-v17-latin-ext_latin-300italic.woff2open-sans-v17-latin-ext_latin-600.woffopen-sans-v17-latin-ext_latin-600.woff2open-sans-v17-latin-ext_latin-600italic.woffopen-sans-v17-latin-ext_latin-600italic.woff2open-sans-v17-latin-ext_latin-700.woffopen-sans-v17-latin-ext_latin-700.woff2open-sans-v17-latin-ext_latin-700italic.woffopen-sans-v17-latin-ext_latin-700italic.woff2open-sans-v17-latin-ext_latin-800.woffopen-sans-v17-latin-ext_latin-800.woff2open-sans-v17-latin-ext_latin-800italic.woffopen-sans-v17-latin-ext_latin-800italic.woff2open-sans-v17-latin-ext_latin-italic.woffopen-sans-v17-latin-ext_latin-italic.woff2open-sans-v17-latin-ext_latin-regular.woffopen-sans-v17-latin-ext_latin-regular.woff2roboto-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woffroboto-mono-v12-vietnamese_latin-ext_latin_greek_cyrillic-ext_cyrillic-regular.woff2roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woffroboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500.woff2roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500italic.woffroboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-500italic.woff2roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700.woffroboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700.woff2roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woffroboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-700italic.woff2roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-italic.woffroboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-italic.woff2roboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woffroboto-v20-vietnamese_latin-ext_latin_greek-ext_greek_cyrillic-ext_cyrillic-regular.woff2
img
imlegacy
js
StoreAddDerivationScheme.jsWalletSendLedger.jscopy-to-clipboard.jsledgerwebsocket.jsvaultbridge.ui.js
wallet
light-pos
locales
am-ET.jsonar.jsonbg-BG.jsonbs-BA.jsonda-DK.jsonde-DE.jsonel-GR.jsones-ES.jsonfi-FI.jsonhi.jsonhy.jsonid.jsonis-IS.jsonnl-NL.jsonno.jsonpl.jsonpt-BR.jsonpt-PT.jsonro.jsonsk-SK.jsonsv.jsontr.jsonzh-SP.jsonzu.json
main
modal
paybutton
payment-request-admin
payment-request
products/js
shopify
swagger/v1
swagger.template.api-keys.jsonswagger.template.authorization.jsonswagger.template.health.jsonswagger.template.invoices.jsonswagger.template.jsonswagger.template.lightning.common.jsonswagger.template.lightning.internal.jsonswagger.template.lightning.store.jsonswagger.template.misc.jsonswagger.template.notifications.jsonswagger.template.payment-requests.jsonswagger.template.pull-payments.jsonswagger.template.serverinfo.jsonswagger.template.stores-payment-methods.on-chain.jsonswagger.template.stores.jsonswagger.template.users.jsonswagger.template.webhooks.json
vendor
animatecss
bc-ur
jquery-prettydropdowns
summernote
font
summernote-bs4.csssummernote-bs4.jssummernote-bs4.js.mapsummernote-bs4.min.csssummernote-bs4.min.jssummernote-bs4.min.js.LICENSE.txtsummernote-bs4.min.js.mapu2f
vue-qrcode
Build
Changelog.mdLICENSEREADME.mdRELEASE-CHECKLIST.mdamd64.Dockerfilearm32v7.Dockerfilearm64v8.Dockerfilebtcpayserver.slndocs
6
.circleci/can-build.sh
Executable file
6
.circleci/can-build.sh
Executable file
@ -0,0 +1,6 @@
|
||||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
echo "Checking if it is possible to build Bitcoin only..."
|
||||
cd ../BTCPayServer.Tests
|
||||
docker-compose -f "docker-compose.yml" build
|
@ -7,7 +7,7 @@ jobs:
|
||||
- checkout
|
||||
- run:
|
||||
command: |
|
||||
cd .circleci && ./run-tests.sh "Fast=Fast"
|
||||
cd .circleci && ./run-tests.sh "Fast=Fast" && ./can-build.sh
|
||||
selenium_tests:
|
||||
machine:
|
||||
enabled: true
|
||||
@ -49,8 +49,10 @@ jobs:
|
||||
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
||||
#
|
||||
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-amd64 -f amd64.Dockerfile .
|
||||
sudo docker build --pull --build-arg CONFIGURATION_NAME=Altcoins-Release -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 -f amd64.Dockerfile .
|
||||
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
||||
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-amd64
|
||||
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64
|
||||
|
||||
arm32v7:
|
||||
machine:
|
||||
@ -63,8 +65,10 @@ jobs:
|
||||
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
||||
#
|
||||
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 -f arm32v7.Dockerfile .
|
||||
sudo docker build --pull --build-arg CONFIGURATION_NAME=Altcoins-Release -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 -f arm32v7.Dockerfile .
|
||||
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
||||
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm32v7
|
||||
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7
|
||||
|
||||
arm64v8:
|
||||
machine:
|
||||
@ -77,8 +81,10 @@ jobs:
|
||||
LATEST_TAG=${CIRCLE_TAG:1} #trim v from tag
|
||||
#
|
||||
sudo docker build --pull -t $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 -f arm64v8.Dockerfile .
|
||||
sudo docker build --build-arg CONFIGURATION_NAME=Altcoins-Release --pull -t $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8 -f arm64v8.Dockerfile .
|
||||
sudo docker login --username=$DOCKERHUB_USER --password=$DOCKERHUB_PASS
|
||||
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-arm64v8
|
||||
sudo docker push $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8
|
||||
|
||||
multiarch:
|
||||
machine:
|
||||
@ -99,6 +105,13 @@ jobs:
|
||||
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm32v7 --os linux --arch arm --variant v7
|
||||
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG $DOCKERHUB_REPO:$LATEST_TAG-arm64v8 --os linux --arch arm64 --variant v8
|
||||
sudo docker manifest push $DOCKERHUB_REPO:$LATEST_TAG -p
|
||||
|
||||
|
||||
sudo docker manifest create --amend $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8
|
||||
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-amd64 --os linux --arch amd64
|
||||
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm32v7 --os linux --arch arm --variant v7
|
||||
sudo docker manifest annotate $DOCKERHUB_REPO:$LATEST_TAG-altcoins $DOCKERHUB_REPO:$LATEST_TAG-altcoins-arm64v8 --os linux --arch arm64 --variant v8
|
||||
sudo docker manifest push $DOCKERHUB_REPO:$LATEST_TAG-altcoins -p
|
||||
|
||||
workflows:
|
||||
version: 2
|
||||
@ -111,7 +124,6 @@ workflows:
|
||||
filters:
|
||||
branches:
|
||||
only: master
|
||||
|
||||
publish:
|
||||
jobs:
|
||||
- amd64:
|
||||
@ -119,22 +131,24 @@ workflows:
|
||||
# ignore any commit on any branch by default
|
||||
branches:
|
||||
ignore: /.*/
|
||||
# only act on version tags v1.0.0.88
|
||||
# only act on version tags v1.0.0.88 or v1.0.2-1
|
||||
# OR feature tags like vlndseedbackup
|
||||
# OR features on specific versions like v1.0.0.88-lndseedbackup-1
|
||||
tags:
|
||||
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/
|
||||
|
||||
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
|
||||
- arm32v7:
|
||||
filters:
|
||||
branches:
|
||||
ignore: /.*/
|
||||
tags:
|
||||
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/
|
||||
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
|
||||
- arm64v8:
|
||||
filters:
|
||||
branches:
|
||||
ignore: /.*/
|
||||
tags:
|
||||
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/
|
||||
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
|
||||
- multiarch:
|
||||
requires:
|
||||
- amd64
|
||||
@ -144,4 +158,4 @@ workflows:
|
||||
branches:
|
||||
ignore: /.*/
|
||||
tags:
|
||||
only: /(v[1-9]+(\.[0-9]+)*)|(v[a-z]+)/
|
||||
only: /(v[1-9]+(\.[0-9]+)*(-[a-z0-9-]+)?)|(v[a-z0-9-]+)/
|
||||
|
@ -3,7 +3,7 @@ set -e
|
||||
|
||||
cd ../BTCPayServer.Tests
|
||||
docker-compose -v
|
||||
docker-compose down --v
|
||||
docker-compose pull
|
||||
docker-compose build
|
||||
docker-compose run -e "TEST_FILTERS=$1" tests
|
||||
docker-compose -f "docker-compose.altcoins.yml" down --v
|
||||
docker-compose -f "docker-compose.altcoins.yml" pull
|
||||
docker-compose -f "docker-compose.altcoins.yml" build
|
||||
docker-compose -f "docker-compose.altcoins.yml" run -e "TEST_FILTERS=$1" tests
|
||||
|
@ -10,8 +10,9 @@ root = true
|
||||
insert_final_newline = true
|
||||
indent_style = space
|
||||
indent_size = 4
|
||||
charset = utf-8
|
||||
|
||||
[project.json]
|
||||
[launchSettings.json]
|
||||
indent_size = 2
|
||||
|
||||
# C# files
|
||||
@ -146,4 +147,4 @@ indent_size = 2
|
||||
[*.sh]
|
||||
end_of_line = lf
|
||||
[*.{cmd, bat}]
|
||||
end_of_line = crlf
|
||||
end_of_line = crlf
|
||||
|
63
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
63
.github/ISSUE_TEMPLATE/bug-report.md
vendored
Normal file
@ -0,0 +1,63 @@
|
||||
---
|
||||
name: "\U0001F41B Bug report"
|
||||
about: Report a bug or a technical issue
|
||||
|
||||
---
|
||||
|
||||
<!--
|
||||
Thank you for reporting a technical issue.
|
||||
|
||||
This issue tracker is only for bug reports and problems.
|
||||
|
||||
For general questions please read our documentation docs.btcpayserver.org. You can ask technical questions in discussions https://github.com/btcpayserver/btcpayserver/discussions and general support on our community chat chat.btcpayserver.org
|
||||
|
||||
Please fill in as much of the template below as you're able.
|
||||
-->
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce the bug**
|
||||
Steps to reproduce the reported bug:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
|
||||
<!--
|
||||
A clear and concise description of what you expected to happen.
|
||||
-->
|
||||
|
||||
**Screenshots**
|
||||
|
||||
|
||||
<!--
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
-->
|
||||
|
||||
**Your BTCPay Environment (please complete the following information):**
|
||||
- BTCPay Server Version: <!--[available in the right bottom corner of footer] -->
|
||||
- Deployment Method: <!--[e.g. Docker, Manual, Third-Party-host]-->
|
||||
- Browser: <!--[e.g. Chrome, Safari]-->
|
||||
|
||||
**Logs (if applicable)**
|
||||
|
||||
|
||||
<!--
|
||||
Basic logs can be found in Server Settings > Logs.
|
||||
More logs https://docs.btcpayserver.org/Troubleshooting/#2-looking-through-the-logs
|
||||
-->
|
||||
|
||||
**Setup Parameters**
|
||||
|
||||
<!--
|
||||
If you're reporting a deployment issue run `. btcpay-setup.sh -i` and paste the setup parameters here with your private information removed or obscured.
|
||||
-->
|
||||
|
||||
**Additional context**
|
||||
|
||||
<!--
|
||||
Add any other context about the problem here.
|
||||
-->
|
37
.github/ISSUE_TEMPLATE/bug_report.md
vendored
37
.github/ISSUE_TEMPLATE/bug_report.md
vendored
@ -1,37 +0,0 @@
|
||||
---
|
||||
name: Report a problem
|
||||
about: File a technical problem or report a bug
|
||||
---
|
||||
|
||||
**Describe the problem/bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**Your environment**
|
||||
* Version of BTCPay Server:
|
||||
* Deployment method:
|
||||
* Other relevant environment details:
|
||||
|
||||
**Logs (if applicable)**
|
||||
Basic logs can be found in Server Settings > Logs.
|
||||
|
||||
**Setup Parameters**
|
||||
If you're reporting a deployment issue run `. btcpay-setup.sh -i` and paste your the paremeters by obscuring private information.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior:
|
||||
1. Go to '...'
|
||||
2. Click on '....'
|
||||
3. Scroll down to '....'
|
||||
4. See error
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Actual behavior**
|
||||
Tell us what happens instead
|
||||
|
||||
**Screenshots/Links**
|
||||
If applicable, add screenshots or links to help explain your problem.
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
11
.github/ISSUE_TEMPLATE/config.yml
vendored
Normal file
@ -0,0 +1,11 @@
|
||||
blank_issues_enabled: false
|
||||
contact_links:
|
||||
- name: 🚀 Discussions
|
||||
url: https://github.com/btcpayserver/btcpayserver/discussions
|
||||
about: Technical discussions, questions and feature requests
|
||||
- name: 📝 Official Documentation
|
||||
url: https://docs.btcpayserver.org
|
||||
about: Check our documentation for answers to common questions
|
||||
- name: 💬 Community Support Chat
|
||||
url: https://chat.btcpayserver.org/
|
||||
about: Ask general questions and get community support in real-time
|
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
20
.github/ISSUE_TEMPLATE/feature_request.md
vendored
@ -1,20 +0,0 @@
|
||||
---
|
||||
name: Feature request
|
||||
about: Ideas and feature requests
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Provide examples**
|
||||
If applicable provide examples, wireframes, sketches or images to better explain your idea.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
7
.gitignore
vendored
7
.gitignore
vendored
@ -292,5 +292,10 @@ __pycache__/
|
||||
BTCPayServer/wwwroot/bundles/*
|
||||
!BTCPayServer/wwwroot/bundles/.gitignore
|
||||
|
||||
.vscode
|
||||
.vscode/*
|
||||
!.vscode/launch.json
|
||||
!.vscode/tasks.json
|
||||
!.vscode/extensions.json
|
||||
BTCPayServer/testpwd
|
||||
.DS_Store
|
||||
Packed Plugins
|
||||
|
21
.run/Pack Test Extension.run.xml
Normal file
21
.run/Pack Test Extension.run.xml
Normal file
@ -0,0 +1,21 @@
|
||||
<component name="ProjectRunConfigurationManager">
|
||||
<configuration default="false" name="Pack Test Plugin" type="DotNetProject" factoryName=".NET Project" singleton="false">
|
||||
<option name="EXE_PATH" value="$PROJECT_DIR$/BTCPayServer.PluginPacker/bin/Debug/netcoreapp3.1/BTCPayServer.PluginPacker.dll" />
|
||||
<option name="PROGRAM_PARAMETERS" value="../../../../BTCPayServer.Plugins.Test\bin\Debug\netcoreapp3.1 BTCPayServer.Plugins.Test "../../../../Packed Plugins"" />
|
||||
<option name="WORKING_DIRECTORY" value="$PROJECT_DIR$/BTCPayServer.PluginPacker/bin/Debug/netcoreapp3.1" />
|
||||
<option name="PASS_PARENT_ENVS" value="1" />
|
||||
<option name="USE_EXTERNAL_CONSOLE" value="0" />
|
||||
<option name="USE_MONO" value="0" />
|
||||
<option name="RUNTIME_ARGUMENTS" value="" />
|
||||
<option name="PROJECT_PATH" value="$PROJECT_DIR$/BTCPayServer.PluginPacker/BTCPayServer.PluginPacker.csproj" />
|
||||
<option name="PROJECT_EXE_PATH_TRACKING" value="1" />
|
||||
<option name="PROJECT_ARGUMENTS_TRACKING" value="1" />
|
||||
<option name="PROJECT_WORKING_DIRECTORY_TRACKING" value="1" />
|
||||
<option name="PROJECT_KIND" value="DotNetCore" />
|
||||
<option name="PROJECT_TFM" value=".NETCoreApp,Version=v3.1" />
|
||||
<method v="2">
|
||||
<option name="Build" default="false" projectName="BTCPayServer.Plugins.Test" projectPath="C:\Git\btcpayserver\BTCPayServer.Plugins.Test\BTCPayServer.Plugins.Test.csproj" />
|
||||
<option name="Build" />
|
||||
</method>
|
||||
</configuration>
|
||||
</component>
|
3
.vscode/extensions.json
vendored
Normal file
3
.vscode/extensions.json
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
{
|
||||
"recommendations": ["ms-dotnettools.csharp"]
|
||||
}
|
33
.vscode/launch.json
vendored
Normal file
33
.vscode/launch.json
vendored
Normal file
@ -0,0 +1,33 @@
|
||||
{
|
||||
// Use IntelliSense to find out which attributes exist for C# debugging
|
||||
// Use hover for the description of the existing attributes
|
||||
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": ".NET Core Launch (web)",
|
||||
"type": "coreclr",
|
||||
"request": "launch",
|
||||
"preLaunchTask": "build",
|
||||
// If you have changed target frameworks, make sure to update the program path.
|
||||
"program": "${workspaceFolder}/BTCPayServer/bin/Debug/netcoreapp3.1/BTCPayServer.dll",
|
||||
"args": [],
|
||||
"cwd": "${workspaceFolder}/BTCPayServer",
|
||||
"stopAtEntry": false,
|
||||
// Enable launching a web browser when ASP.NET Core starts. For more information: https://aka.ms/VSCode-CS-LaunchJson-WebBrowser
|
||||
"serverReadyAction": {
|
||||
"action": "openExternally",
|
||||
"pattern": "\\bListening on\\s+(https?://\\S+)"
|
||||
},
|
||||
"env": {
|
||||
"ASPNETCORE_ENVIRONMENT": "Development"
|
||||
},
|
||||
"sourceFileMap": {
|
||||
"/Views": "${workspaceFolder}/Views"
|
||||
},
|
||||
"logging": {
|
||||
"moduleLoad": false
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
42
.vscode/tasks.json
vendored
Normal file
42
.vscode/tasks.json
vendored
Normal file
@ -0,0 +1,42 @@
|
||||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"label": "build",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"build",
|
||||
"${workspaceFolder}/BTCPayServer/BTCPayServer.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "publish",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"publish",
|
||||
"${workspaceFolder}/BTCPayServer/BTCPayServer.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
},
|
||||
{
|
||||
"label": "watch",
|
||||
"command": "dotnet",
|
||||
"type": "process",
|
||||
"args": [
|
||||
"watch",
|
||||
"run",
|
||||
"${workspaceFolder}/BTCPayServer/BTCPayServer.csproj",
|
||||
"/property:GenerateFullPaths=true",
|
||||
"/consoleloggerparameters:NoSummary"
|
||||
],
|
||||
"problemMatcher": "$msCompile"
|
||||
}
|
||||
]
|
||||
}
|
39
BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj
Normal file
39
BTCPayServer.Abstractions/BTCPayServer.Abstractions.csproj
Normal file
@ -0,0 +1,39 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Import Project="../Build/Version.csproj" Condition="Exists('../Build/Version.csproj')" />
|
||||
<Import Project="../Build/Common.csproj" />
|
||||
|
||||
<PropertyGroup>
|
||||
<Company>BTCPay Server</Company>
|
||||
<Copyright>Copyright © BTCPay Server 2020</Copyright>
|
||||
<Description>A library for BTCPay Server plugin development</Description>
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
<PackageTags>btcpay,btcpayserver</PackageTags>
|
||||
<PackageProjectUrl>https://github.com/btcpayserver/btcpayserver/tree/master/BTCPayServer.Abstractions</PackageProjectUrl>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<RepositoryUrl>https://github.com/btcpayserver/btcpayserver</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>1591;1573;1572;1584;1570;3021</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<FrameworkReference Include="Microsoft.AspNetCore.App" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="icon.png" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="3.1.4" />
|
||||
<PackageReference Include="Microsoft.EntityFrameworkCore.Sqlite" Version="3.1.4" />
|
||||
<PackageReference Include="Npgsql.EntityFrameworkCore.PostgreSQL" Version="3.1.4" />
|
||||
<PackageReference Include="Pomelo.EntityFrameworkCore.MySql" Version="3.1.1" />
|
||||
</ItemGroup>
|
||||
</Project>
|
12
BTCPayServer.Abstractions/Configuration/DataDirectories.cs
Normal file
12
BTCPayServer.Abstractions/Configuration/DataDirectories.cs
Normal file
@ -0,0 +1,12 @@
|
||||
namespace BTCPayServer.Configuration
|
||||
{
|
||||
public class DataDirectories
|
||||
{
|
||||
public string DataDir { get; set; }
|
||||
public string PluginDir { get; set; }
|
||||
public string TempStorageDir { get; set; }
|
||||
public string StorageDir { get; set; }
|
||||
}
|
||||
|
||||
|
||||
}
|
@ -1,4 +1,4 @@
|
||||
namespace BTCPayServer.Security
|
||||
namespace BTCPayServer.Abstractions.Constants
|
||||
{
|
||||
public class AuthenticationSchemes
|
||||
{
|
109
BTCPayServer.Abstractions/Contracts/BaseDbContextFactory.cs
Normal file
109
BTCPayServer.Abstractions/Contracts/BaseDbContextFactory.cs
Normal file
@ -0,0 +1,109 @@
|
||||
using System;
|
||||
using BTCPayServer.Abstractions.Models;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
using Microsoft.EntityFrameworkCore.Metadata;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
using Microsoft.Extensions.Options;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Migrations;
|
||||
using Npgsql.EntityFrameworkCore.PostgreSQL.Migrations.Operations;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Contracts
|
||||
{
|
||||
public abstract class BaseDbContextFactory<T> where T: DbContext
|
||||
{
|
||||
private readonly IOptions<DatabaseOptions> _options;
|
||||
private readonly string _schemaPrefix;
|
||||
|
||||
public BaseDbContextFactory(IOptions<DatabaseOptions> options, string schemaPrefix)
|
||||
{
|
||||
_options = options;
|
||||
_schemaPrefix = schemaPrefix;
|
||||
}
|
||||
|
||||
public abstract T CreateContext();
|
||||
|
||||
class CustomNpgsqlMigrationsSqlGenerator : NpgsqlMigrationsSqlGenerator
|
||||
{
|
||||
public CustomNpgsqlMigrationsSqlGenerator(MigrationsSqlGeneratorDependencies dependencies, IMigrationsAnnotationProvider annotations, Npgsql.EntityFrameworkCore.PostgreSQL.Infrastructure.Internal.INpgsqlOptions opts) : base(dependencies, annotations, opts)
|
||||
{
|
||||
}
|
||||
|
||||
protected override void Generate(NpgsqlCreateDatabaseOperation operation, IModel model, MigrationCommandListBuilder builder)
|
||||
{
|
||||
builder
|
||||
.Append("CREATE DATABASE ")
|
||||
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(operation.Name));
|
||||
|
||||
// POSTGRES gotcha: Indexed Text column (even if PK) are not used if we are not using C locale
|
||||
builder
|
||||
.Append(" TEMPLATE ")
|
||||
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("template0"));
|
||||
|
||||
builder
|
||||
.Append(" LC_CTYPE ")
|
||||
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("C"));
|
||||
|
||||
builder
|
||||
.Append(" LC_COLLATE ")
|
||||
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("C"));
|
||||
|
||||
builder
|
||||
.Append(" ENCODING ")
|
||||
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier("UTF8"));
|
||||
|
||||
if (operation.Tablespace != null)
|
||||
{
|
||||
builder
|
||||
.Append(" TABLESPACE ")
|
||||
.Append(Dependencies.SqlGenerationHelper.DelimitIdentifier(operation.Tablespace));
|
||||
}
|
||||
|
||||
builder.AppendLine(Dependencies.SqlGenerationHelper.StatementTerminator);
|
||||
|
||||
EndStatement(builder, suppressTransaction: true);
|
||||
}
|
||||
}
|
||||
|
||||
public void ConfigureBuilder(DbContextOptionsBuilder builder)
|
||||
{
|
||||
switch (_options.Value.DatabaseType)
|
||||
{
|
||||
case DatabaseType.Sqlite:
|
||||
builder.UseSqlite(_options.Value.ConnectionString, o =>
|
||||
{
|
||||
if (!string.IsNullOrEmpty(_schemaPrefix))
|
||||
{
|
||||
o.MigrationsHistoryTable(_schemaPrefix);
|
||||
}
|
||||
});
|
||||
break;
|
||||
case DatabaseType.Postgres:
|
||||
builder
|
||||
.UseNpgsql(_options.Value.ConnectionString, o =>
|
||||
{
|
||||
o.EnableRetryOnFailure(10);
|
||||
if (!string.IsNullOrEmpty(_schemaPrefix))
|
||||
{
|
||||
o.MigrationsHistoryTable(_schemaPrefix);
|
||||
}
|
||||
})
|
||||
.ReplaceService<IMigrationsSqlGenerator, CustomNpgsqlMigrationsSqlGenerator>();
|
||||
break;
|
||||
case DatabaseType.MySQL:
|
||||
builder.UseMySql(_options.Value.ConnectionString, o =>
|
||||
{
|
||||
o.EnableRetryOnFailure(10);
|
||||
|
||||
if (!string.IsNullOrEmpty(_schemaPrefix))
|
||||
{
|
||||
o.MigrationsHistoryTable(_schemaPrefix);
|
||||
}
|
||||
});
|
||||
break;
|
||||
default:
|
||||
throw new ArgumentOutOfRangeException();
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
32
BTCPayServer.Abstractions/Contracts/IBTCPayServerPlugin.cs
Normal file
32
BTCPayServer.Abstractions/Contracts/IBTCPayServerPlugin.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using System.Text.Json.Serialization;
|
||||
using BTCPayServer.Abstractions.Converters;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Contracts
|
||||
{
|
||||
public interface IBTCPayServerPlugin
|
||||
{
|
||||
public string Identifier { get; }
|
||||
string Name { get; }
|
||||
[JsonConverter(typeof(VersionConverter))]
|
||||
Version Version { get; }
|
||||
string Description { get; }
|
||||
bool SystemPlugin { get; set; }
|
||||
PluginDependency[] Dependencies { get; }
|
||||
void Execute(IApplicationBuilder applicationBuilder, IServiceProvider applicationBuilderApplicationServices);
|
||||
void Execute(IServiceCollection applicationBuilder);
|
||||
|
||||
public class PluginDependency
|
||||
{
|
||||
public string Identifier { get; set; }
|
||||
public string Condition { get; set; }
|
||||
public override string ToString()
|
||||
{
|
||||
return $"{Identifier}: {Condition}";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
27
BTCPayServer.Abstractions/Contracts/INotificationHandler.cs
Normal file
27
BTCPayServer.Abstractions/Contracts/INotificationHandler.cs
Normal file
@ -0,0 +1,27 @@
|
||||
using System;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Contracts
|
||||
{
|
||||
public abstract class BaseNotification
|
||||
{
|
||||
public abstract string Identifier { get; }
|
||||
public abstract string NotificationType { get; }
|
||||
}
|
||||
|
||||
public interface INotificationHandler
|
||||
{
|
||||
string NotificationType { get; }
|
||||
Type NotificationBlobType { get; }
|
||||
public (string identifier, string name)[] Meta { get; }
|
||||
void FillViewModel(object notification, NotificationViewModel vm);
|
||||
}
|
||||
|
||||
public class NotificationViewModel
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public DateTimeOffset Created { get; set; }
|
||||
public string Body { get; set; }
|
||||
public string ActionLink { get; set; }
|
||||
public bool Seen { get; set; }
|
||||
}
|
||||
}
|
10
BTCPayServer.Abstractions/Contracts/IPluginHookAction.cs
Normal file
10
BTCPayServer.Abstractions/Contracts/IPluginHookAction.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Contracts
|
||||
{
|
||||
public interface IPluginHookAction
|
||||
{
|
||||
public string Hook { get; }
|
||||
Task Execute(object args);
|
||||
}
|
||||
}
|
11
BTCPayServer.Abstractions/Contracts/IPluginHookFilter.cs
Normal file
11
BTCPayServer.Abstractions/Contracts/IPluginHookFilter.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Contracts
|
||||
{
|
||||
public interface IPluginHookFilter
|
||||
{
|
||||
public string Hook { get; }
|
||||
|
||||
Task<object> Execute(object args);
|
||||
}
|
||||
}
|
10
BTCPayServer.Abstractions/Contracts/IPluginHookService.cs
Normal file
10
BTCPayServer.Abstractions/Contracts/IPluginHookService.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Contracts
|
||||
{
|
||||
public interface IPluginHookService
|
||||
{
|
||||
Task ApplyAction(string hook, object args);
|
||||
Task<object> ApplyFilter(string hook, object args);
|
||||
}
|
||||
}
|
12
BTCPayServer.Abstractions/Contracts/ISettingsRepository.cs
Normal file
12
BTCPayServer.Abstractions/Contracts/ISettingsRepository.cs
Normal file
@ -0,0 +1,12 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Contracts
|
||||
{
|
||||
public interface ISettingsRepository
|
||||
{
|
||||
Task<T> GetSettingAsync<T>(string name = null);
|
||||
Task UpdateSetting<T>(T obj, string name = null);
|
||||
Task<T> WaitSettingsChanged<T>(CancellationToken cancellationToken = default);
|
||||
}
|
||||
}
|
@ -1,10 +1,7 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BTCPayServer
|
||||
namespace BTCPayServer.Abstractions.Contracts
|
||||
{
|
||||
public interface IStartupTask
|
||||
{
|
@ -0,0 +1,9 @@
|
||||
namespace BTCPayServer.Abstractions.Contracts
|
||||
{
|
||||
public interface ISyncSummaryProvider
|
||||
{
|
||||
bool AllAvailable();
|
||||
|
||||
string Partial { get; }
|
||||
}
|
||||
}
|
9
BTCPayServer.Abstractions/Contracts/IUIExtension.cs
Normal file
9
BTCPayServer.Abstractions/Contracts/IUIExtension.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace BTCPayServer.Abstractions.Contracts
|
||||
{
|
||||
public interface IUIExtension
|
||||
{
|
||||
string Partial { get; }
|
||||
|
||||
string Location { get; }
|
||||
}
|
||||
}
|
19
BTCPayServer.Abstractions/Converters/VersionConverter.cs
Normal file
19
BTCPayServer.Abstractions/Converters/VersionConverter.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using System.Text.Json;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Converters
|
||||
{
|
||||
public class VersionConverter : JsonConverter<Version>
|
||||
{
|
||||
public override Version Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
|
||||
{
|
||||
return Version.Parse(reader.GetString());
|
||||
}
|
||||
|
||||
public override void Write(Utf8JsonWriter writer, Version value, JsonSerializerOptions options)
|
||||
{
|
||||
writer.WriteStringValue(value.ToString());
|
||||
}
|
||||
}
|
||||
}
|
20
BTCPayServer.Abstractions/Extensions/Extensions.cs
Normal file
20
BTCPayServer.Abstractions/Extensions/Extensions.cs
Normal file
@ -0,0 +1,20 @@
|
||||
using System.Text.Json;
|
||||
using BTCPayServer.Abstractions.Models;
|
||||
using Microsoft.AspNetCore.Mvc.ViewFeatures;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Extensions
|
||||
{
|
||||
public static class SetStatusMessageModelExtensions
|
||||
{
|
||||
public static void SetStatusMessageModel(this ITempDataDictionary tempData, StatusMessageModel statusMessage)
|
||||
{
|
||||
if (statusMessage == null)
|
||||
{
|
||||
tempData.Remove("StatusMessageModel");
|
||||
return;
|
||||
}
|
||||
|
||||
tempData["StatusMessageModel"] = JsonSerializer.Serialize(statusMessage, new JsonSerializerOptions());
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,12 @@
|
||||
using BTCPayServer.Abstractions.Contracts;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Extensions
|
||||
{
|
||||
public static class ServiceCollectionExtensions
|
||||
{
|
||||
public static IServiceCollection AddStartupTask<T>(this IServiceCollection services)
|
||||
where T : class, IStartupTask
|
||||
=> services.AddTransient<IStartupTask, T>();
|
||||
}
|
||||
}
|
35
BTCPayServer.Abstractions/Models/BaseBTCPayServerPlugin.cs
Normal file
35
BTCPayServer.Abstractions/Models/BaseBTCPayServerPlugin.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using BTCPayServer.Abstractions.Contracts;
|
||||
using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Models
|
||||
{
|
||||
public abstract class BaseBTCPayServerPlugin : IBTCPayServerPlugin
|
||||
{
|
||||
public abstract string Identifier { get; }
|
||||
public abstract string Name { get; }
|
||||
|
||||
public virtual Version Version
|
||||
{
|
||||
get
|
||||
{
|
||||
return Assembly.GetAssembly(GetType())?.GetName().Version ?? new Version(1, 0, 0, 0);
|
||||
}
|
||||
}
|
||||
|
||||
public abstract string Description { get; }
|
||||
public bool SystemPlugin { get; set; }
|
||||
public virtual IBTCPayServerPlugin.PluginDependency[] Dependencies { get; } = Array.Empty<IBTCPayServerPlugin.PluginDependency>();
|
||||
|
||||
public virtual void Execute(IApplicationBuilder applicationBuilder,
|
||||
IServiceProvider applicationBuilderApplicationServices)
|
||||
{
|
||||
}
|
||||
|
||||
public virtual void Execute(IServiceCollection applicationBuilder)
|
||||
{
|
||||
}
|
||||
}
|
||||
}
|
8
BTCPayServer.Abstractions/Models/DatabaseOptions.cs
Normal file
8
BTCPayServer.Abstractions/Models/DatabaseOptions.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace BTCPayServer.Abstractions.Models
|
||||
{
|
||||
public class DatabaseOptions
|
||||
{
|
||||
public DatabaseType DatabaseType { get; set; }
|
||||
public string ConnectionString { get; set; }
|
||||
}
|
||||
}
|
9
BTCPayServer.Abstractions/Models/DatabaseType.cs
Normal file
9
BTCPayServer.Abstractions/Models/DatabaseType.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace BTCPayServer.Abstractions.Models
|
||||
{
|
||||
public enum DatabaseType
|
||||
{
|
||||
Sqlite,
|
||||
Postgres,
|
||||
MySQL,
|
||||
}
|
||||
}
|
5
BTCPayServer/Models/StatusMessageModel.cs → BTCPayServer.Abstractions/Models/StatusMessageModel.cs
5
BTCPayServer/Models/StatusMessageModel.cs → BTCPayServer.Abstractions/Models/StatusMessageModel.cs
@ -1,15 +1,12 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace BTCPayServer.Models
|
||||
namespace BTCPayServer.Abstractions.Models
|
||||
{
|
||||
public class StatusMessageModel
|
||||
{
|
||||
public StatusMessageModel()
|
||||
{
|
||||
}
|
||||
|
||||
public string Message { get; set; }
|
||||
public string Html { get; set; }
|
||||
public StatusSeverity Severity { get; set; }
|
7
BTCPayServer.Abstractions/PushNuget.ps1
Normal file
7
BTCPayServer.Abstractions/PushNuget.ps1
Normal file
@ -0,0 +1,7 @@
|
||||
rm "bin\release\" -Recurse -Force
|
||||
dotnet pack --configuration Release --include-symbols -p:SymbolPackageFormat=snupkg
|
||||
$package=(ls .\bin\Release\*.nupkg).FullName
|
||||
dotnet nuget push $package --source "https://api.nuget.org/v3/index.json"
|
||||
$ver = ((ls .\bin\release\*.nupkg)[0].Name -replace '.*(\d+\.\d+\.\d+)\.nupkg','$1')
|
||||
git tag -a "BTCPayServer.Abstractions/v$ver" -m "BTCPayServer.Abstractions/$ver"
|
||||
git push origin "BTCPayServer.Abstractions/v$ver"
|
16
BTCPayServer.Abstractions/Services/PluginAction.cs
Normal file
16
BTCPayServer.Abstractions/Services/PluginAction.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Abstractions.Contracts;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Services
|
||||
{
|
||||
public abstract class PluginAction<T>:IPluginHookAction
|
||||
{
|
||||
public abstract string Hook { get; }
|
||||
public Task Execute(object args)
|
||||
{
|
||||
return Execute(args is T args1 ? args1 : default);
|
||||
}
|
||||
|
||||
public abstract Task Execute(T arg);
|
||||
}
|
||||
}
|
17
BTCPayServer.Abstractions/Services/PluginHookFilter.cs
Normal file
17
BTCPayServer.Abstractions/Services/PluginHookFilter.cs
Normal file
@ -0,0 +1,17 @@
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Abstractions.Contracts;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Services
|
||||
{
|
||||
public abstract class PluginHookFilter<T>:IPluginHookFilter
|
||||
{
|
||||
public abstract string Hook { get; }
|
||||
|
||||
public Task<object> Execute(object args)
|
||||
{
|
||||
return Execute(args is T args1 ? args1 : default).ContinueWith(task => task.Result as object);
|
||||
}
|
||||
|
||||
public abstract Task<T> Execute(T arg);
|
||||
}
|
||||
}
|
16
BTCPayServer.Abstractions/Services/UIExtension.cs
Normal file
16
BTCPayServer.Abstractions/Services/UIExtension.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using BTCPayServer.Abstractions.Contracts;
|
||||
|
||||
namespace BTCPayServer.Abstractions.Services
|
||||
{
|
||||
public class UIExtension: IUIExtension
|
||||
{
|
||||
public UIExtension(string partial, string location)
|
||||
{
|
||||
Partial = partial;
|
||||
Location = location;
|
||||
}
|
||||
|
||||
public string Partial { get; }
|
||||
public string Location { get; }
|
||||
}
|
||||
}
|
BIN
BTCPayServer.Abstractions/icon.png
Normal file
BIN
BTCPayServer.Abstractions/icon.png
Normal file
Binary file not shown.
After ![]() (image error) Size: 29 KiB |
@ -1,12 +1,37 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<TargetFramework>netstandard2.1</TargetFramework>
|
||||
<Company>BTCPay Server</Company>
|
||||
<Copyright>Copyright © BTCPay Server 2020</Copyright>
|
||||
<Description>A client library for BTCPay Server Greenfield API</Description>
|
||||
<PackageIcon>icon.png</PackageIcon>
|
||||
<PackageTags>btcpay,btcpayserver</PackageTags>
|
||||
<PackageProjectUrl>https://github.com/btcpayserver/btcpayserver/tree/master/BTCPayServer.Client</PackageProjectUrl>
|
||||
<PackageLicenseExpression>MIT</PackageLicenseExpression>
|
||||
<RepositoryUrl>https://github.com/btcpayserver/btcpayserver</RepositoryUrl>
|
||||
<RepositoryType>git</RepositoryType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<Version Condition=" '$(Version)' == '' ">1.2.0</Version>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<EmbedUntrackedSources>true</EmbedUntrackedSources>
|
||||
<DebugType>portable</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<NoWarn>1591;1573;1572;1584;1570;3021</NoWarn>
|
||||
<GenerateDocumentationFile>true</GenerateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
<ItemGroup Condition=" '$(Configuration)' == 'Release' ">
|
||||
<PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<PackageReference Include="NBitcoin" Version="5.0.29" />
|
||||
<PackageReference Include="NBitcoin" Version="5.0.68" />
|
||||
<PackageReference Include="BTCPayServer.Lightning.Common" Version="1.2.0" />
|
||||
<PackageReference Include="Newtonsoft.Json" Version="12.0.3" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<None Include="icon.png" Pack="true" PackagePath="\" />
|
||||
</ItemGroup>
|
||||
</Project>
|
||||
|
@ -25,7 +25,7 @@ namespace BTCPayServer.Client
|
||||
public virtual async Task RevokeCurrentAPIKeyInfo(CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/api-keys/current", null, HttpMethod.Delete), token);
|
||||
HandleResponse(response);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
|
||||
public virtual async Task RevokeAPIKey(string apikey, CancellationToken token = default)
|
||||
@ -33,7 +33,7 @@ namespace BTCPayServer.Client
|
||||
if (apikey == null)
|
||||
throw new ArgumentNullException(nameof(apikey));
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/api-keys/{apikey}", null, HttpMethod.Delete), token);
|
||||
HandleResponse(response);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -1,13 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
|
||||
|
||||
public static Uri GenerateAuthorizeUri(Uri btcpayHost, string[] permissions, bool strict = true,
|
||||
bool selectiveStores = false)
|
||||
bool selectiveStores = false, (string ApplicationIdentifier, Uri Redirect) applicationDetails = default)
|
||||
{
|
||||
var result = new UriBuilder(btcpayHost);
|
||||
result.Path = "api-keys/authorize";
|
||||
@ -18,6 +19,15 @@ namespace BTCPayServer.Client
|
||||
{"strict", strict}, {"selectiveStores", selectiveStores}, {"permissions", permissions}
|
||||
});
|
||||
|
||||
if (applicationDetails.Redirect != null)
|
||||
{
|
||||
AppendPayloadToQuery(result, new KeyValuePair<string, object>("redirect", applicationDetails.Redirect));
|
||||
if (!string.IsNullOrEmpty(applicationDetails.ApplicationIdentifier))
|
||||
{
|
||||
AppendPayloadToQuery(result, new KeyValuePair<string, object>("applicationIdentifier", applicationDetails.ApplicationIdentifier));
|
||||
}
|
||||
}
|
||||
|
||||
return result.Uri;
|
||||
}
|
||||
}
|
||||
|
15
BTCPayServer.Client/BTCPayServerClient.Health.cs
Normal file
15
BTCPayServer.Client/BTCPayServerClient.Health.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Client.Models;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
public virtual async Task<ApiHealthData> GetHealth(CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/health"), token);
|
||||
return await HandleResponse<ApiHealthData>(response);
|
||||
}
|
||||
}
|
||||
}
|
89
BTCPayServer.Client/BTCPayServerClient.Invoices.cs
Normal file
89
BTCPayServer.Client/BTCPayServerClient.Invoices.cs
Normal file
@ -0,0 +1,89 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Client.Models;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
public virtual async Task<IEnumerable<InvoiceData>> GetInvoices(string storeId, bool includeArchived = false,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response =
|
||||
await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/invoices",
|
||||
new Dictionary<string, object>() {{nameof(includeArchived), includeArchived}}), token);
|
||||
return await HandleResponse<IEnumerable<InvoiceData>>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<InvoiceData> GetInvoice(string storeId, string invoiceId,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}"), token);
|
||||
return await HandleResponse<InvoiceData>(response);
|
||||
}
|
||||
public virtual async Task<InvoicePaymentMethodDataModel[]> GetInvoicePaymentMethods(string storeId, string invoiceId,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}/payment-methods"), token);
|
||||
return await HandleResponse<InvoicePaymentMethodDataModel[]>(response);
|
||||
}
|
||||
|
||||
public virtual async Task ArchiveInvoice(string storeId, string invoiceId,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}",
|
||||
method: HttpMethod.Delete), token);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
|
||||
public virtual async Task<InvoiceData> CreateInvoice(string storeId,
|
||||
CreateInvoiceRequest request, CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/invoices", bodyPayload: request,
|
||||
method: HttpMethod.Post), token);
|
||||
return await HandleResponse<InvoiceData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<InvoiceData> UpdateInvoice(string storeId, string invoiceId,
|
||||
UpdateInvoiceRequest request, CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}", bodyPayload: request,
|
||||
method: HttpMethod.Put), token);
|
||||
return await HandleResponse<InvoiceData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<InvoiceData> MarkInvoiceStatus(string storeId, string invoiceId,
|
||||
MarkInvoiceStatusRequest request, CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
if (request.Status!= InvoiceStatus.Settled && request.Status!= InvoiceStatus.Invalid)
|
||||
throw new ArgumentOutOfRangeException(nameof(request.Status), "Status can only be Invalid or Complete");
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}/status", bodyPayload: request,
|
||||
method: HttpMethod.Post), token);
|
||||
return await HandleResponse<InvoiceData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<InvoiceData> UnarchiveInvoice(string storeId, string invoiceId, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/invoices/{invoiceId}/unarchive",
|
||||
method: HttpMethod.Post), token);
|
||||
return await HandleResponse<InvoiceData>(response);
|
||||
}
|
||||
}
|
||||
}
|
91
BTCPayServer.Client/BTCPayServerClient.Lightning.Internal.cs
Normal file
91
BTCPayServer.Client/BTCPayServerClient.Lightning.Internal.cs
Normal file
@ -0,0 +1,91 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Client.Models;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
public async Task<LightningNodeInformationData> GetLightningNodeInfo(string cryptoCode,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/info",
|
||||
method: HttpMethod.Get), token);
|
||||
return await HandleResponse<LightningNodeInformationData>(response);
|
||||
}
|
||||
|
||||
public async Task ConnectToLightningNode(string cryptoCode, ConnectToNodeRequest request,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/connect", bodyPayload: request,
|
||||
method: HttpMethod.Post), token);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<LightningChannelData>> GetLightningNodeChannels(string cryptoCode,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/channels",
|
||||
method: HttpMethod.Get), token);
|
||||
return await HandleResponse<IEnumerable<LightningChannelData>>(response);
|
||||
}
|
||||
|
||||
public async Task<string> OpenLightningChannel(string cryptoCode, OpenLightningChannelRequest request,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/channels", bodyPayload: request,
|
||||
method: HttpMethod.Post), token);
|
||||
return await HandleResponse<string>(response);
|
||||
}
|
||||
|
||||
public async Task<string> GetLightningDepositAddress(string cryptoCode, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/address", method: HttpMethod.Post), token);
|
||||
return await HandleResponse<string>(response);
|
||||
}
|
||||
|
||||
|
||||
public async Task PayLightningInvoice(string cryptoCode, PayLightningInvoiceRequest request,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/invoices/pay", bodyPayload: request,
|
||||
method: HttpMethod.Post), token);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
|
||||
public async Task<LightningInvoiceData> GetLightningInvoice(string cryptoCode,
|
||||
string invoiceId, CancellationToken token = default)
|
||||
{
|
||||
if (invoiceId == null)
|
||||
throw new ArgumentNullException(nameof(invoiceId));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/invoices/{invoiceId}",
|
||||
method: HttpMethod.Get), token);
|
||||
return await HandleResponse<LightningInvoiceData>(response);
|
||||
}
|
||||
|
||||
public async Task<LightningInvoiceData> CreateLightningInvoice(string cryptoCode, CreateLightningInvoiceRequest request,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/server/lightning/{cryptoCode}/invoices", bodyPayload: request,
|
||||
method: HttpMethod.Post), token);
|
||||
return await HandleResponse<LightningInvoiceData>(response);
|
||||
}
|
||||
}
|
||||
}
|
92
BTCPayServer.Client/BTCPayServerClient.Lightning.Store.cs
Normal file
92
BTCPayServer.Client/BTCPayServerClient.Lightning.Store.cs
Normal file
@ -0,0 +1,92 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Client.Models;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
public async Task<LightningNodeInformationData> GetLightningNodeInfo(string storeId, string cryptoCode,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/info",
|
||||
method: HttpMethod.Get), token);
|
||||
return await HandleResponse<LightningNodeInformationData>(response);
|
||||
}
|
||||
|
||||
public async Task ConnectToLightningNode(string storeId, string cryptoCode, ConnectToNodeRequest request,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/connect", bodyPayload: request,
|
||||
method: HttpMethod.Post), token);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
|
||||
public async Task<IEnumerable<LightningChannelData>> GetLightningNodeChannels(string storeId, string cryptoCode,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/channels",
|
||||
method: HttpMethod.Get), token);
|
||||
return await HandleResponse<IEnumerable<LightningChannelData>>(response);
|
||||
}
|
||||
|
||||
public async Task<string> OpenLightningChannel(string storeId, string cryptoCode, OpenLightningChannelRequest request,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/channels", bodyPayload: request,
|
||||
method: HttpMethod.Post), token);
|
||||
return await HandleResponse<string>(response);
|
||||
}
|
||||
|
||||
public async Task<string> GetLightningDepositAddress(string storeId, string cryptoCode,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/address", method: HttpMethod.Post),
|
||||
token);
|
||||
return await HandleResponse<string>(response);
|
||||
}
|
||||
|
||||
public async Task PayLightningInvoice(string storeId, string cryptoCode, PayLightningInvoiceRequest request,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/pay", bodyPayload: request,
|
||||
method: HttpMethod.Post), token);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
|
||||
public async Task<LightningInvoiceData> GetLightningInvoice(string storeId, string cryptoCode,
|
||||
string invoiceId, CancellationToken token = default)
|
||||
{
|
||||
if (invoiceId == null)
|
||||
throw new ArgumentNullException(nameof(invoiceId));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices/{invoiceId}",
|
||||
method: HttpMethod.Get), token);
|
||||
return await HandleResponse<LightningInvoiceData>(response);
|
||||
}
|
||||
|
||||
public async Task<LightningInvoiceData> CreateLightningInvoice(string storeId, string cryptoCode,
|
||||
CreateLightningInvoiceRequest request, CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/lightning/{cryptoCode}/invoices", bodyPayload: request,
|
||||
method: HttpMethod.Post), token);
|
||||
return await HandleResponse<LightningInvoiceData>(response);
|
||||
}
|
||||
}
|
||||
}
|
47
BTCPayServer.Client/BTCPayServerClient.Notifications.cs
Normal file
47
BTCPayServer.Client/BTCPayServerClient.Notifications.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Client.Models;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
public virtual async Task<IEnumerable<NotificationData>> GetNotifications(bool? seen = null,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response =
|
||||
await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/users/me/notifications",
|
||||
seen != null ? new Dictionary<string, object>() {{nameof(seen), seen}} : null), token);
|
||||
return await HandleResponse<IEnumerable<NotificationData>>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<NotificationData> GetNotification(string notificationId,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/users/me/notifications/{notificationId}"), token);
|
||||
return await HandleResponse<NotificationData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<NotificationData> UpdateNotification(string notificationId, bool? seen,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/users/me/notifications/{notificationId}",
|
||||
method: HttpMethod.Put, bodyPayload: new UpdateNotification() {Seen = seen}), token);
|
||||
return await HandleResponse<NotificationData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task RemoveNotification(string notificationId, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/users/me/notifications/{notificationId}",
|
||||
method: HttpMethod.Delete), token);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,74 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Client.Models;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
public virtual async Task<IEnumerable<OnChainPaymentMethodData>> GetStoreOnChainPaymentMethods(string storeId,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response =
|
||||
await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain"), token);
|
||||
return await HandleResponse<IEnumerable<OnChainPaymentMethodData>>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<OnChainPaymentMethodData> GetStoreOnChainPaymentMethod(string storeId,
|
||||
string cryptoCode, CancellationToken token = default)
|
||||
{
|
||||
var response =
|
||||
await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}"), token);
|
||||
return await HandleResponse<OnChainPaymentMethodData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task RemoveStoreOnChainPaymentMethod(string storeId,
|
||||
string cryptoCode, CancellationToken token = default)
|
||||
{
|
||||
var response =
|
||||
await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}",
|
||||
method: HttpMethod.Delete), token);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
|
||||
public virtual async Task<OnChainPaymentMethodData> UpdateStoreOnChainPaymentMethod(string storeId,
|
||||
string cryptoCode, OnChainPaymentMethodData paymentMethod,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}",
|
||||
bodyPayload: paymentMethod, method: HttpMethod.Put), token);
|
||||
return await HandleResponse<OnChainPaymentMethodData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<OnChainPaymentMethodPreviewResultData>
|
||||
PreviewProposedStoreOnChainPaymentMethodAddresses(
|
||||
string storeId, string cryptoCode, OnChainPaymentMethodData paymentMethod, int offset = 0,
|
||||
int amount = 10,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/preview",
|
||||
bodyPayload: paymentMethod,
|
||||
queryPayload: new Dictionary<string, object>() {{"offset", offset}, {"amount", amount}},
|
||||
method: HttpMethod.Post), token);
|
||||
return await HandleResponse<OnChainPaymentMethodPreviewResultData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<OnChainPaymentMethodPreviewResultData> PreviewStoreOnChainPaymentMethodAddresses(
|
||||
string storeId, string cryptoCode, int offset = 0, int amount = 10,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/payment-methods/Onchain/{cryptoCode}/preview",
|
||||
queryPayload: new Dictionary<string, object>() {{"offset", offset}, {"amount", amount}},
|
||||
method: HttpMethod.Get), token);
|
||||
return await HandleResponse<OnChainPaymentMethodPreviewResultData>(response);
|
||||
}
|
||||
}
|
||||
}
|
62
BTCPayServer.Client/BTCPayServerClient.PaymentRequests.cs
Normal file
62
BTCPayServer.Client/BTCPayServerClient.PaymentRequests.cs
Normal file
@ -0,0 +1,62 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Client.Models;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
public virtual async Task<IEnumerable<PaymentRequestData>> GetPaymentRequests(string storeId,
|
||||
bool includeArchived = false,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response =
|
||||
await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/payment-requests",
|
||||
new Dictionary<string, object>() {{nameof(includeArchived), includeArchived}}), token);
|
||||
return await HandleResponse<IEnumerable<PaymentRequestData>>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<PaymentRequestData> GetPaymentRequest(string storeId, string paymentRequestId,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/payment-requests/{paymentRequestId}"), token);
|
||||
return await HandleResponse<PaymentRequestData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task ArchivePaymentRequest(string storeId, string paymentRequestId,
|
||||
CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/payment-requests/{paymentRequestId}",
|
||||
method: HttpMethod.Delete), token);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
|
||||
public virtual async Task<PaymentRequestData> CreatePaymentRequest(string storeId,
|
||||
CreatePaymentRequestRequest request, CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/payment-requests", bodyPayload: request,
|
||||
method: HttpMethod.Post), token);
|
||||
return await HandleResponse<PaymentRequestData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<PaymentRequestData> UpdatePaymentRequest(string storeId, string paymentRequestId,
|
||||
UpdatePaymentRequestRequest request, CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}/payment-requests/{paymentRequestId}", bodyPayload: request,
|
||||
method: HttpMethod.Put), token);
|
||||
return await HandleResponse<PaymentRequestData>(response);
|
||||
}
|
||||
}
|
||||
}
|
61
BTCPayServer.Client/BTCPayServerClient.PullPayments.cs
Normal file
61
BTCPayServer.Client/BTCPayServerClient.PullPayments.cs
Normal file
@ -0,0 +1,61 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using BTCPayServer.Client.Models;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
public async Task<PullPaymentData> CreatePullPayment(string storeId, CreatePullPaymentRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/pull-payments", bodyPayload: request, method: HttpMethod.Post), cancellationToken);
|
||||
return await HandleResponse<PullPaymentData>(response);
|
||||
}
|
||||
public async Task<PullPaymentData> GetPullPayment(string pullPaymentId, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}", method: HttpMethod.Get), cancellationToken);
|
||||
return await HandleResponse<PullPaymentData>(response);
|
||||
}
|
||||
|
||||
public async Task<PullPaymentData[]> GetPullPayments(string storeId, bool includeArchived = false, CancellationToken cancellationToken = default)
|
||||
{
|
||||
Dictionary<string, object> query = new Dictionary<string, object>();
|
||||
query.Add("includeArchived", includeArchived);
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/pull-payments", queryPayload: query, method: HttpMethod.Get), cancellationToken);
|
||||
return await HandleResponse<PullPaymentData[]>(response);
|
||||
}
|
||||
|
||||
public async Task ArchivePullPayment(string storeId, string pullPaymentId, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}", method: HttpMethod.Delete), cancellationToken);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
|
||||
public async Task<PayoutData[]> GetPayouts(string pullPaymentId, bool includeCancelled = false, CancellationToken cancellationToken = default)
|
||||
{
|
||||
Dictionary<string, object> query = new Dictionary<string, object>();
|
||||
query.Add("includeCancelled", includeCancelled);
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}/payouts", queryPayload: query, method: HttpMethod.Get), cancellationToken);
|
||||
return await HandleResponse<PayoutData[]>(response);
|
||||
}
|
||||
public async Task<PayoutData> CreatePayout(string pullPaymentId, CreatePayoutRequest payoutRequest, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/pull-payments/{HttpUtility.UrlEncode(pullPaymentId)}/payouts", bodyPayload: payoutRequest, method: HttpMethod.Post), cancellationToken);
|
||||
return await HandleResponse<PayoutData>(response);
|
||||
}
|
||||
|
||||
public async Task CancelPayout(string storeId, string payoutId, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/payouts/{HttpUtility.UrlEncode(payoutId)}", method: HttpMethod.Delete), cancellationToken);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
public async Task<PayoutData> ApprovePayout(string storeId, string payoutId, ApprovePayoutRequest request, CancellationToken cancellationToken = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{HttpUtility.UrlEncode(storeId)}/payouts/{HttpUtility.UrlEncode(payoutId)}", bodyPayload: request, method: HttpMethod.Post), cancellationToken);
|
||||
return await HandleResponse<PayoutData>(response);
|
||||
}
|
||||
}
|
||||
}
|
15
BTCPayServer.Client/BTCPayServerClient.ServerInfo.cs
Normal file
15
BTCPayServer.Client/BTCPayServerClient.ServerInfo.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Client.Models;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
public virtual async Task<ServerInfoData> GetServerInfo(CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/server/info"), token);
|
||||
return await HandleResponse<ServerInfoData>(response);
|
||||
}
|
||||
}
|
||||
}
|
51
BTCPayServer.Client/BTCPayServerClient.Stores.cs
Normal file
51
BTCPayServer.Client/BTCPayServerClient.Stores.cs
Normal file
@ -0,0 +1,51 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Client.Models;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
public virtual async Task<IEnumerable<StoreData>> GetStores(CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/stores"), token);
|
||||
return await HandleResponse<IEnumerable<StoreData>>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<StoreData> GetStore(string storeId, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}"), token);
|
||||
return await HandleResponse<StoreData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task RemoveStore(string storeId, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(
|
||||
CreateHttpRequest($"api/v1/stores/{storeId}", method: HttpMethod.Delete), token);
|
||||
await HandleResponse(response);
|
||||
}
|
||||
|
||||
public virtual async Task<StoreData> CreateStore(CreateStoreRequest request, CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest("api/v1/stores", bodyPayload: request, method: HttpMethod.Post), token);
|
||||
return await HandleResponse<StoreData>(response);
|
||||
}
|
||||
|
||||
public virtual async Task<StoreData> UpdateStore(string storeId, UpdateStoreRequest request, CancellationToken token = default)
|
||||
{
|
||||
if (request == null)
|
||||
throw new ArgumentNullException(nameof(request));
|
||||
if (storeId == null)
|
||||
throw new ArgumentNullException(nameof(storeId));
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}", bodyPayload: request, method: HttpMethod.Put), token);
|
||||
return await HandleResponse<StoreData>(response);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
65
BTCPayServer.Client/BTCPayServerClient.Webhooks.cs
Normal file
65
BTCPayServer.Client/BTCPayServerClient.Webhooks.cs
Normal file
@ -0,0 +1,65 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net.Http;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using BTCPayServer.Client.Models;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public partial class BTCPayServerClient
|
||||
{
|
||||
public async Task<StoreWebhookData> CreateWebhook(string storeId, Client.Models.CreateStoreWebhookRequest create, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks", bodyPayload: create, method: HttpMethod.Post), token);
|
||||
return await HandleResponse<StoreWebhookData>(response);
|
||||
}
|
||||
public async Task<StoreWebhookData> GetWebhook(string storeId, string webhookId, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}"), token);
|
||||
if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
|
||||
return null;
|
||||
return await HandleResponse<StoreWebhookData>(response);
|
||||
}
|
||||
public async Task<StoreWebhookData> UpdateWebhook(string storeId, string webhookId, Models.UpdateStoreWebhookRequest update, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}", bodyPayload: update, method: HttpMethod.Put), token);
|
||||
return await HandleResponse<StoreWebhookData>(response);
|
||||
}
|
||||
public async Task<bool> DeleteWebhook(string storeId, string webhookId, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}", method: HttpMethod.Delete), token);
|
||||
return response.IsSuccessStatusCode;
|
||||
}
|
||||
public async Task<StoreWebhookData[]> GetWebhooks(string storeId, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks"), token);
|
||||
return await HandleResponse<StoreWebhookData[]>(response);
|
||||
}
|
||||
public async Task<WebhookDeliveryData[]> GetWebhookDeliveries(string storeId, string webhookId, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries"), token);
|
||||
return await HandleResponse<WebhookDeliveryData[]>(response);
|
||||
}
|
||||
public async Task<WebhookDeliveryData> GetWebhookDelivery(string storeId, string webhookId, string deliveryId, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}"), token);
|
||||
return await HandleResponse<WebhookDeliveryData>(response);
|
||||
}
|
||||
public async Task<string> RedeliverWebhook(string storeId, string webhookId, string deliveryId, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/redeliver", null, HttpMethod.Post), token);
|
||||
return await HandleResponse<string>(response);
|
||||
}
|
||||
|
||||
public async Task<WebhookEvent> GetWebhookDeliveryRequest(string storeId, string webhookId, string deliveryId, CancellationToken token = default)
|
||||
{
|
||||
var response = await _httpClient.SendAsync(CreateHttpRequest($"api/v1/stores/{storeId}/webhooks/{webhookId}/deliveries/{deliveryId}/request"), token);
|
||||
if (response.StatusCode == System.Net.HttpStatusCode.NotFound)
|
||||
return null;
|
||||
return await HandleResponse<WebhookEvent>(response);
|
||||
}
|
||||
}
|
||||
}
|
@ -18,6 +18,8 @@ namespace BTCPayServer.Client
|
||||
private readonly string _password;
|
||||
private readonly HttpClient _httpClient;
|
||||
|
||||
public Uri Host => _btcpayHost;
|
||||
|
||||
public string APIKey => _apiKey;
|
||||
|
||||
public BTCPayServerClient(Uri btcpayHost, HttpClient httpClient = null)
|
||||
@ -33,7 +35,7 @@ namespace BTCPayServer.Client
|
||||
_btcpayHost = btcpayHost;
|
||||
_httpClient = httpClient ?? new HttpClient();
|
||||
}
|
||||
|
||||
|
||||
public BTCPayServerClient(Uri btcpayHost, string username, string password, HttpClient httpClient = null)
|
||||
{
|
||||
_apiKey = APIKey;
|
||||
@ -43,22 +45,35 @@ namespace BTCPayServer.Client
|
||||
_httpClient = httpClient ?? new HttpClient();
|
||||
}
|
||||
|
||||
protected void HandleResponse(HttpResponseMessage message)
|
||||
protected async Task HandleResponse(HttpResponseMessage message)
|
||||
{
|
||||
if (message.StatusCode == System.Net.HttpStatusCode.UnprocessableEntity)
|
||||
{
|
||||
var err = JsonConvert.DeserializeObject<Models.GreenfieldValidationError[]>(await message.Content.ReadAsStringAsync());
|
||||
;
|
||||
throw new GreenFieldValidationException(err);
|
||||
}
|
||||
else if (message.StatusCode == System.Net.HttpStatusCode.BadRequest)
|
||||
{
|
||||
var err = JsonConvert.DeserializeObject<Models.GreenfieldAPIError>(await message.Content.ReadAsStringAsync());
|
||||
throw new GreenFieldAPIException(err);
|
||||
}
|
||||
|
||||
message.EnsureSuccessStatusCode();
|
||||
}
|
||||
|
||||
protected async Task<T> HandleResponse<T>(HttpResponseMessage message)
|
||||
{
|
||||
HandleResponse(message);
|
||||
return JsonConvert.DeserializeObject<T>(await message.Content.ReadAsStringAsync());
|
||||
await HandleResponse(message);
|
||||
var str = await message.Content.ReadAsStringAsync();
|
||||
return JsonConvert.DeserializeObject<T>(str);
|
||||
}
|
||||
|
||||
protected virtual HttpRequestMessage CreateHttpRequest(string path,
|
||||
Dictionary<string, object> queryPayload = null,
|
||||
HttpMethod method = null)
|
||||
{
|
||||
UriBuilder uriBuilder = new UriBuilder(_btcpayHost) {Path = path};
|
||||
UriBuilder uriBuilder = new UriBuilder(_btcpayHost) { Path = path };
|
||||
if (queryPayload != null && queryPayload.Any())
|
||||
{
|
||||
AppendPayloadToQuery(uriBuilder, queryPayload);
|
||||
@ -89,29 +104,37 @@ namespace BTCPayServer.Client
|
||||
return request;
|
||||
}
|
||||
|
||||
private static void AppendPayloadToQuery(UriBuilder uri, Dictionary<string, object> payload)
|
||||
public static void AppendPayloadToQuery(UriBuilder uri, KeyValuePair<string, object> keyValuePair)
|
||||
{
|
||||
if (uri.Query.Length > 1)
|
||||
uri.Query += "&";
|
||||
|
||||
UriBuilder uriBuilder = uri;
|
||||
if (!(keyValuePair.Value is string) &&
|
||||
keyValuePair.Value.GetType().GetInterfaces().Contains((typeof(IEnumerable))))
|
||||
{
|
||||
foreach (var item in (IEnumerable)keyValuePair.Value)
|
||||
{
|
||||
uriBuilder.Query = uriBuilder.Query + Uri.EscapeDataString(keyValuePair.Key) + "=" +
|
||||
Uri.EscapeDataString(item.ToString()) + "&";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uriBuilder.Query = uriBuilder.Query + Uri.EscapeDataString(keyValuePair.Key) + "=" +
|
||||
Uri.EscapeDataString(keyValuePair.Value.ToString()) + "&";
|
||||
}
|
||||
uri.Query = uri.Query.Trim('&');
|
||||
}
|
||||
|
||||
public static void AppendPayloadToQuery(UriBuilder uri, Dictionary<string, object> payload)
|
||||
{
|
||||
if (uri.Query.Length > 1)
|
||||
uri.Query += "&";
|
||||
foreach (KeyValuePair<string, object> keyValuePair in payload)
|
||||
{
|
||||
UriBuilder uriBuilder = uri;
|
||||
if (keyValuePair.Value.GetType().GetInterfaces().Contains((typeof(IEnumerable))))
|
||||
{
|
||||
foreach (var item in (IEnumerable)keyValuePair.Value)
|
||||
{
|
||||
uriBuilder.Query = uriBuilder.Query + Uri.EscapeDataString(keyValuePair.Key) + "=" +
|
||||
Uri.EscapeDataString(item.ToString()) + "&";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
uriBuilder.Query = uriBuilder.Query + Uri.EscapeDataString(keyValuePair.Key) + "=" +
|
||||
Uri.EscapeDataString(keyValuePair.Value.ToString()) + "&";
|
||||
}
|
||||
AppendPayloadToQuery(uri, keyValuePair);
|
||||
}
|
||||
|
||||
uri.Query = uri.Query.Trim('&');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
15
BTCPayServer.Client/GreenFieldAPIException.cs
Normal file
15
BTCPayServer.Client/GreenFieldAPIException.cs
Normal file
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public class GreenFieldAPIException : Exception
|
||||
{
|
||||
public GreenFieldAPIException(Models.GreenfieldAPIError error) : base(error.Message)
|
||||
{
|
||||
if (error == null)
|
||||
throw new ArgumentNullException(nameof(error));
|
||||
APIError = error;
|
||||
}
|
||||
public Models.GreenfieldAPIError APIError { get; }
|
||||
}
|
||||
}
|
28
BTCPayServer.Client/GreenFieldValidationException.cs
Normal file
28
BTCPayServer.Client/GreenFieldValidationException.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using System.Text;
|
||||
using BTCPayServer.Client.Models;
|
||||
|
||||
namespace BTCPayServer.Client
|
||||
{
|
||||
public class GreenFieldValidationException : Exception
|
||||
{
|
||||
public GreenFieldValidationException(Models.GreenfieldValidationError[] errors) : base(BuildMessage(errors))
|
||||
{
|
||||
ValidationErrors = errors;
|
||||
}
|
||||
|
||||
private static string BuildMessage(GreenfieldValidationError[] errors)
|
||||
{
|
||||
if (errors == null)
|
||||
throw new ArgumentNullException(nameof(errors));
|
||||
StringBuilder builder = new StringBuilder();
|
||||
foreach (var error in errors)
|
||||
{
|
||||
builder.AppendLine($"{error.Path}: {error.Message}");
|
||||
}
|
||||
return builder.ToString();
|
||||
}
|
||||
|
||||
public Models.GreenfieldValidationError[] ValidationErrors { get; }
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using System.Globalization;
|
||||
using BTCPayServer.Lightning;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.JsonConverters
|
||||
{
|
||||
public class LightMoneyJsonConverter : BTCPayServer.Lightning.JsonConverters.LightMoneyJsonConverter
|
||||
{
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
if (value != null)
|
||||
writer.WriteValue(((LightMoney)value).MilliSatoshi.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
}
|
||||
}
|
25
BTCPayServer.Client/JsonConverters/MoneyJsonConverter.cs
Normal file
25
BTCPayServer.Client/JsonConverters/MoneyJsonConverter.cs
Normal file
@ -0,0 +1,25 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using NBitcoin;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.JsonConverters
|
||||
{
|
||||
public class MoneyJsonConverter : NBitcoin.JsonConverters.MoneyJsonConverter
|
||||
{
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
if (reader.TokenType == JsonToken.String)
|
||||
{
|
||||
return new Money(long.Parse((string)reader.Value));
|
||||
}
|
||||
return base.ReadJson(reader, objectType, existingValue, serializer);
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
if (value != null)
|
||||
writer.WriteValue(((Money)value).Satoshi.ToString(CultureInfo.InvariantCulture));
|
||||
}
|
||||
}
|
||||
}
|
26
BTCPayServer.Client/JsonConverters/NodeUriJsonConverter.cs
Normal file
26
BTCPayServer.Client/JsonConverters/NodeUriJsonConverter.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Diagnostics.CodeAnalysis;
|
||||
using BTCPayServer.Lightning;
|
||||
using NBitcoin.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.JsonConverters
|
||||
{
|
||||
public class NodeUriJsonConverter : JsonConverter<NodeInfo>
|
||||
{
|
||||
public override NodeInfo ReadJson(JsonReader reader, Type objectType, [AllowNull] NodeInfo existingValue, bool hasExistingValue, JsonSerializer serializer)
|
||||
{
|
||||
if (reader.TokenType != JsonToken.String)
|
||||
throw new JsonObjectException(reader.Path, "Unexpected token type for NodeUri");
|
||||
if (NodeInfo.TryParse((string)reader.Value, out var info))
|
||||
return info;
|
||||
throw new JsonObjectException(reader.Path, "Invalid NodeUri");
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, [AllowNull] NodeInfo value, JsonSerializer serializer)
|
||||
{
|
||||
if (value is NodeInfo)
|
||||
writer.WriteValue(value.ToString());
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,56 @@
|
||||
using System;
|
||||
using System.Globalization;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace BTCPayServer.JsonConverters
|
||||
{
|
||||
public class NumericStringJsonConverter : JsonConverter
|
||||
{
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return (objectType == typeof(decimal) ||
|
||||
objectType == typeof(decimal?) ||
|
||||
objectType == typeof(double) ||
|
||||
objectType == typeof(double?));
|
||||
}
|
||||
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue,
|
||||
JsonSerializer serializer)
|
||||
{
|
||||
JToken token = JToken.Load(reader);
|
||||
switch (token.Type)
|
||||
{
|
||||
case JTokenType.Float:
|
||||
case JTokenType.Integer:
|
||||
case JTokenType.String:
|
||||
if (objectType == typeof(decimal) || objectType == typeof(decimal?) )
|
||||
return decimal.Parse(token.ToString(), CultureInfo.InvariantCulture);
|
||||
if (objectType == typeof(double) || objectType == typeof(double?))
|
||||
return double.Parse(token.ToString(), CultureInfo.InvariantCulture);
|
||||
|
||||
throw new JsonSerializationException("Unexpected object type: " + objectType);
|
||||
case JTokenType.Null when objectType == typeof(decimal?) || objectType == typeof(double?):
|
||||
return null;
|
||||
default:
|
||||
throw new JsonSerializationException("Unexpected token type: " +
|
||||
token.Type);
|
||||
}
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
switch (value)
|
||||
{
|
||||
case null:
|
||||
break;
|
||||
case decimal x:
|
||||
writer.WriteValue(x.ToString(CultureInfo.InvariantCulture));
|
||||
break;
|
||||
case double x:
|
||||
writer.WriteValue(x.ToString(CultureInfo.InvariantCulture));
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
@ -1,9 +1,7 @@
|
||||
using System;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
using NBitcoin.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.JsonConverters
|
||||
{
|
||||
|
68
BTCPayServer.Client/JsonConverters/TimeSpanJsonConverter.cs
Normal file
68
BTCPayServer.Client/JsonConverters/TimeSpanJsonConverter.cs
Normal file
@ -0,0 +1,68 @@
|
||||
using System;
|
||||
using NBitcoin.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.JsonConverters
|
||||
{
|
||||
public abstract class TimeSpanJsonConverter : JsonConverter
|
||||
{
|
||||
public class Seconds : TimeSpanJsonConverter
|
||||
{
|
||||
protected override long ToLong(TimeSpan value)
|
||||
{
|
||||
return (long)value.TotalSeconds;
|
||||
}
|
||||
|
||||
protected override TimeSpan ToTimespan(long value)
|
||||
{
|
||||
return TimeSpan.FromSeconds(value);
|
||||
}
|
||||
}
|
||||
public class Minutes : TimeSpanJsonConverter
|
||||
{
|
||||
protected override long ToLong(TimeSpan value)
|
||||
{
|
||||
return (long)value.TotalMinutes;
|
||||
}
|
||||
protected override TimeSpan ToTimespan(long value)
|
||||
{
|
||||
return TimeSpan.FromMinutes(value);
|
||||
}
|
||||
}
|
||||
public override bool CanConvert(Type objectType)
|
||||
{
|
||||
return objectType == typeof(TimeSpan) || objectType == typeof(TimeSpan?);
|
||||
}
|
||||
|
||||
protected abstract TimeSpan ToTimespan(long value);
|
||||
protected abstract long ToLong(TimeSpan value);
|
||||
public override object ReadJson(JsonReader reader, Type objectType, object existingValue, JsonSerializer serializer)
|
||||
{
|
||||
try
|
||||
{
|
||||
var nullable = objectType == typeof(TimeSpan?);
|
||||
if (reader.TokenType == JsonToken.Null)
|
||||
{
|
||||
if (nullable)
|
||||
return null;
|
||||
return TimeSpan.Zero;
|
||||
}
|
||||
if (reader.TokenType != JsonToken.Integer)
|
||||
throw new JsonObjectException("Invalid timespan, expected integer", reader);
|
||||
return ToTimespan((long)reader.Value);
|
||||
}
|
||||
catch
|
||||
{
|
||||
throw new JsonObjectException("Invalid timespan", reader);
|
||||
}
|
||||
}
|
||||
|
||||
public override void WriteJson(JsonWriter writer, object value, JsonSerializer serializer)
|
||||
{
|
||||
if (value is TimeSpan s)
|
||||
{
|
||||
writer.WriteValue(ToLong(s));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
7
BTCPayServer.Client/Models/AddCustomerEmailRequest.cs
Normal file
7
BTCPayServer.Client/Models/AddCustomerEmailRequest.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class AddCustomerEmailRequest
|
||||
{
|
||||
public string Email { get; set; }
|
||||
}
|
||||
}
|
7
BTCPayServer.Client/Models/ApiHealthData.cs
Normal file
7
BTCPayServer.Client/Models/ApiHealthData.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class ApiHealthData
|
||||
{
|
||||
public bool Synchronized { get; set; }
|
||||
}
|
||||
}
|
@ -7,6 +7,7 @@ namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public string ApiKey { get; set; }
|
||||
public string Label { get; set; }
|
||||
|
||||
[JsonProperty(ItemConverterType = typeof(PermissionJsonConverter))]
|
||||
public Permission[] Permissions { get; set; }
|
||||
}
|
||||
|
@ -1,3 +1,6 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class ApplicationUserData
|
||||
@ -6,33 +9,31 @@ namespace BTCPayServer.Client.Models
|
||||
/// the id of the user
|
||||
/// </summary>
|
||||
public string Id { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the email AND username of the user
|
||||
/// </summary>
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether the user has verified their email
|
||||
/// </summary>
|
||||
public bool EmailConfirmed { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// whether the user needed to verify their email on account creation
|
||||
/// </summary>
|
||||
public bool RequiresEmailConfirmation { get; set; }
|
||||
}
|
||||
|
||||
public class CreateApplicationUserRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// the email AND username of the new user
|
||||
/// the roles of the user
|
||||
/// </summary>
|
||||
public string Email { get; set; }
|
||||
public string[] Roles { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// password of the new user
|
||||
/// the date the user was created. Null if created before v1.0.5.6.
|
||||
/// </summary>
|
||||
public string Password { get; set; }
|
||||
/// <summary>
|
||||
/// Whether this user is an administrator. If left null and there are no admins in the system, the user will be created as an admin.
|
||||
/// </summary>
|
||||
public bool? IsAdministrator { get; set; }
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset? Created { get; set; }
|
||||
}
|
||||
}
|
||||
|
8
BTCPayServer.Client/Models/ApprovePayoutRequest.cs
Normal file
8
BTCPayServer.Client/Models/ApprovePayoutRequest.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class ApprovePayoutRequest
|
||||
{
|
||||
public int Revision { get; set; }
|
||||
public string RateRule { get; set; }
|
||||
}
|
||||
}
|
21
BTCPayServer.Client/Models/ConnectToNodeRequest.cs
Normal file
21
BTCPayServer.Client/Models/ConnectToNodeRequest.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using BTCPayServer.Client.JsonConverters;
|
||||
using BTCPayServer.Lightning;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class ConnectToNodeRequest
|
||||
{
|
||||
public ConnectToNodeRequest()
|
||||
{
|
||||
|
||||
}
|
||||
public ConnectToNodeRequest(NodeInfo nodeInfo)
|
||||
{
|
||||
NodeURI = nodeInfo;
|
||||
}
|
||||
[JsonConverter(typeof(NodeUriJsonConverter))]
|
||||
[JsonProperty("nodeURI")]
|
||||
public NodeInfo NodeURI { get; set; }
|
||||
}
|
||||
}
|
@ -1,6 +1,3 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using BTCPayServer.Client.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
@ -9,6 +6,7 @@ namespace BTCPayServer.Client.Models
|
||||
public class CreateApiKeyRequest
|
||||
{
|
||||
public string Label { get; set; }
|
||||
|
||||
[JsonProperty(ItemConverterType = typeof(PermissionJsonConverter))]
|
||||
public Permission[] Permissions { get; set; }
|
||||
}
|
||||
|
20
BTCPayServer.Client/Models/CreateApplicationUserRequest.cs
Normal file
20
BTCPayServer.Client/Models/CreateApplicationUserRequest.cs
Normal file
@ -0,0 +1,20 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class CreateApplicationUserRequest
|
||||
{
|
||||
/// <summary>
|
||||
/// the email AND username of the new user
|
||||
/// </summary>
|
||||
public string Email { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// password of the new user
|
||||
/// </summary>
|
||||
public string Password { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether this user is an administrator. If left null and there are no admins in the system, the user will be created as an admin.
|
||||
/// </summary>
|
||||
public bool? IsAdministrator { get; set; }
|
||||
}
|
||||
}
|
39
BTCPayServer.Client/Models/CreateInvoiceRequest.cs
Normal file
39
BTCPayServer.Client/Models/CreateInvoiceRequest.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using System;
|
||||
using BTCPayServer.Client.JsonConverters;
|
||||
using BTCPayServer.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class CreateInvoiceRequest
|
||||
{
|
||||
[JsonProperty(ItemConverterType = typeof(NumericStringJsonConverter))]
|
||||
public decimal Amount { get; set; }
|
||||
public string Currency { get; set; }
|
||||
public JObject Metadata { get; set; }
|
||||
public CheckoutOptions Checkout { get; set; } = new CheckoutOptions();
|
||||
|
||||
public class CheckoutOptions
|
||||
{
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public SpeedPolicy? SpeedPolicy { get; set; }
|
||||
|
||||
public string[] PaymentMethods { get; set; }
|
||||
|
||||
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
|
||||
[JsonProperty("expirationMinutes")]
|
||||
public TimeSpan? Expiration { get; set; }
|
||||
[JsonConverter(typeof(TimeSpanJsonConverter.Minutes))]
|
||||
[JsonProperty("monitoringMinutes")]
|
||||
public TimeSpan? Monitoring { get; set; }
|
||||
|
||||
public double? PaymentTolerance { get; set; }
|
||||
[JsonProperty("redirectURL")]
|
||||
public string RedirectURL { get; set; }
|
||||
public string DefaultLanguage { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
28
BTCPayServer.Client/Models/CreateLightningInvoiceRequest.cs
Normal file
28
BTCPayServer.Client/Models/CreateLightningInvoiceRequest.cs
Normal file
@ -0,0 +1,28 @@
|
||||
using System;
|
||||
using BTCPayServer.Lightning;
|
||||
using BTCPayServer.Lightning.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class CreateLightningInvoiceRequest
|
||||
{
|
||||
public CreateLightningInvoiceRequest()
|
||||
{
|
||||
|
||||
}
|
||||
public CreateLightningInvoiceRequest(LightMoney amount, string description, TimeSpan expiry)
|
||||
{
|
||||
Amount = amount;
|
||||
Description = description;
|
||||
Expiry = expiry;
|
||||
}
|
||||
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
||||
public LightMoney Amount { get; set; }
|
||||
public string Description { get; set; }
|
||||
[JsonConverter(typeof(JsonConverters.TimeSpanJsonConverter.Seconds))]
|
||||
public TimeSpan Expiry { get; set; }
|
||||
public bool PrivateRouteHints { get; set; }
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class CreatePaymentRequestRequest : PaymentRequestBaseData
|
||||
{
|
||||
}
|
||||
}
|
13
BTCPayServer.Client/Models/CreatePayoutRequest.cs
Normal file
13
BTCPayServer.Client/Models/CreatePayoutRequest.cs
Normal file
@ -0,0 +1,13 @@
|
||||
using BTCPayServer.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class CreatePayoutRequest
|
||||
{
|
||||
public string Destination { get; set; }
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal? Amount { get; set; }
|
||||
public string PaymentMethod { get; set; }
|
||||
}
|
||||
}
|
22
BTCPayServer.Client/Models/CreatePullPaymentRequest.cs
Normal file
22
BTCPayServer.Client/Models/CreatePullPaymentRequest.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using BTCPayServer.Client.JsonConverters;
|
||||
using BTCPayServer.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class CreatePullPaymentRequest
|
||||
{
|
||||
public string Name { get; set; }
|
||||
[JsonProperty(ItemConverterType = typeof(NumericStringJsonConverter))]
|
||||
public decimal Amount { get; set; }
|
||||
public string Currency { get; set; }
|
||||
[JsonConverter(typeof(TimeSpanJsonConverter.Seconds))]
|
||||
public TimeSpan? Period { get; set; }
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset? ExpiresAt { get; set; }
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset? StartsAt { get; set; }
|
||||
public string[] PaymentMethods { get; set; }
|
||||
}
|
||||
}
|
6
BTCPayServer.Client/Models/CreateStoreRequest.cs
Normal file
6
BTCPayServer.Client/Models/CreateStoreRequest.cs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class CreateStoreRequest : StoreBaseData
|
||||
{
|
||||
}
|
||||
}
|
22
BTCPayServer.Client/Models/GreenfieldAPIError.cs
Normal file
22
BTCPayServer.Client/Models/GreenfieldAPIError.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class GreenfieldAPIError
|
||||
{
|
||||
public GreenfieldAPIError()
|
||||
{
|
||||
|
||||
}
|
||||
public GreenfieldAPIError(string code, string message)
|
||||
{
|
||||
code = code ?? "generic-error";
|
||||
if (message == null)
|
||||
throw new ArgumentNullException(nameof(message));
|
||||
Code = code;
|
||||
Message = message;
|
||||
}
|
||||
public string Code { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
24
BTCPayServer.Client/Models/GreenfieldValidationError.cs
Normal file
24
BTCPayServer.Client/Models/GreenfieldValidationError.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class GreenfieldValidationError
|
||||
{
|
||||
public GreenfieldValidationError()
|
||||
{
|
||||
|
||||
}
|
||||
public GreenfieldValidationError(string path, string message)
|
||||
{
|
||||
if (path == null)
|
||||
throw new ArgumentNullException(nameof(path));
|
||||
if (message == null)
|
||||
throw new ArgumentNullException(nameof(message));
|
||||
Path = path;
|
||||
Message = message;
|
||||
}
|
||||
|
||||
public string Path { get; set; }
|
||||
public string Message { get; set; }
|
||||
}
|
||||
}
|
30
BTCPayServer.Client/Models/InvoiceData.cs
Normal file
30
BTCPayServer.Client/Models/InvoiceData.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class InvoiceData : CreateInvoiceRequest
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string CheckoutLink { get; set; }
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public InvoiceStatus Status { get; set; }
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public InvoiceExceptionStatus AdditionalStatus { get; set; }
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset MonitoringExpiration { get; set; }
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset ExpirationTime { get; set; }
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset CreatedTime { get; set; }
|
||||
}
|
||||
public enum InvoiceStatus
|
||||
{
|
||||
New,
|
||||
Processing,
|
||||
Expired,
|
||||
Invalid,
|
||||
Settled
|
||||
}
|
||||
}
|
12
BTCPayServer.Client/Models/InvoiceExceptionStatus.cs
Normal file
12
BTCPayServer.Client/Models/InvoiceExceptionStatus.cs
Normal file
@ -0,0 +1,12 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public enum InvoiceExceptionStatus
|
||||
{
|
||||
None,
|
||||
PaidLate,
|
||||
PaidPartial,
|
||||
Marked,
|
||||
Invalid,
|
||||
PaidOver
|
||||
}
|
||||
}
|
61
BTCPayServer.Client/Models/InvoicePaymentMethodDataModel.cs
Normal file
61
BTCPayServer.Client/Models/InvoicePaymentMethodDataModel.cs
Normal file
@ -0,0 +1,61 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BTCPayServer.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class InvoicePaymentMethodDataModel
|
||||
{
|
||||
public string Destination { get; set; }
|
||||
public string PaymentLink { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal Rate { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal PaymentMethodPaid { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal TotalPaid { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal Due { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal Amount { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal NetworkFee { get; set; }
|
||||
|
||||
public List<Payment> Payments { get; set; }
|
||||
public string PaymentMethod { get; set; }
|
||||
|
||||
public class Payment
|
||||
{
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTime ReceivedDate { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal Value { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal Fee { get; set; }
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public PaymentStatus Status { get; set; }
|
||||
|
||||
public string Destination { get; set; }
|
||||
|
||||
public enum PaymentStatus
|
||||
{
|
||||
Invalid,
|
||||
Processing,
|
||||
Settled
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
30
BTCPayServer.Client/Models/LightningInvoiceData.cs
Normal file
30
BTCPayServer.Client/Models/LightningInvoiceData.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using System;
|
||||
using BTCPayServer.Client.JsonConverters;
|
||||
using BTCPayServer.Lightning;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class LightningInvoiceData
|
||||
{
|
||||
public string Id { get; set; }
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public LightningInvoiceStatus Status { get; set; }
|
||||
|
||||
[JsonProperty("BOLT11")]
|
||||
public string BOLT11 { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset? PaidAt { get; set; }
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset ExpiresAt { get; set; }
|
||||
|
||||
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
||||
public LightMoney Amount { get; set; }
|
||||
|
||||
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
||||
public LightMoney AmountReceived { get; set; }
|
||||
}
|
||||
}
|
30
BTCPayServer.Client/Models/LightningNodeInformationData.cs
Normal file
30
BTCPayServer.Client/Models/LightningNodeInformationData.cs
Normal file
@ -0,0 +1,30 @@
|
||||
using BTCPayServer.Client.JsonConverters;
|
||||
using BTCPayServer.Lightning;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class LightningNodeInformationData
|
||||
{
|
||||
[JsonProperty("nodeURIs", ItemConverterType = typeof(NodeUriJsonConverter))]
|
||||
public NodeInfo[] NodeURIs { get; set; }
|
||||
public int BlockHeight { get; set; }
|
||||
}
|
||||
|
||||
public class LightningChannelData
|
||||
{
|
||||
public string RemoteNode { get; set; }
|
||||
|
||||
public bool IsPublic { get; set; }
|
||||
|
||||
public bool IsActive { get; set; }
|
||||
|
||||
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
||||
public LightMoney Capacity { get; set; }
|
||||
|
||||
[JsonConverter(typeof(LightMoneyJsonConverter))]
|
||||
public LightMoney LocalBalance { get; set; }
|
||||
|
||||
public string ChannelPoint { get; set; }
|
||||
}
|
||||
}
|
11
BTCPayServer.Client/Models/MarkInvoiceStatusRequest.cs
Normal file
11
BTCPayServer.Client/Models/MarkInvoiceStatusRequest.cs
Normal file
@ -0,0 +1,11 @@
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class MarkInvoiceStatusRequest
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public InvoiceStatus Status { get; set; }
|
||||
}
|
||||
}
|
16
BTCPayServer.Client/Models/NotificationData.cs
Normal file
16
BTCPayServer.Client/Models/NotificationData.cs
Normal file
@ -0,0 +1,16 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class NotificationData
|
||||
{
|
||||
public string Id { get; set; }
|
||||
public string Body { get; set; }
|
||||
public bool Seen { get; set; }
|
||||
public Uri Link { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset CreatedTime { get; set; }
|
||||
}
|
||||
}
|
39
BTCPayServer.Client/Models/OnChainPaymentMethodData.cs
Normal file
39
BTCPayServer.Client/Models/OnChainPaymentMethodData.cs
Normal file
@ -0,0 +1,39 @@
|
||||
using NBitcoin;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class OnChainPaymentMethodData
|
||||
{
|
||||
/// <summary>
|
||||
/// Whether the payment method is enabled
|
||||
/// </summary>
|
||||
public bool Enabled { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Crypto code of the payment method
|
||||
/// </summary>
|
||||
public string CryptoCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// The derivation scheme
|
||||
/// </summary>
|
||||
public string DerivationScheme { get; set; }
|
||||
|
||||
public string Label { get; set; }
|
||||
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.KeyPathJsonConverter))]
|
||||
public RootedKeyPath AccountKeyPath { get; set; }
|
||||
|
||||
public OnChainPaymentMethodData()
|
||||
{
|
||||
}
|
||||
|
||||
public OnChainPaymentMethodData(string cryptoCode, string derivationScheme, bool enabled)
|
||||
{
|
||||
Enabled = enabled;
|
||||
CryptoCode = cryptoCode;
|
||||
DerivationScheme = derivationScheme;
|
||||
}
|
||||
}
|
||||
}
|
@ -0,0 +1,23 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class OnChainPaymentMethodPreviewResultData
|
||||
{
|
||||
/// <summary>
|
||||
/// a list of addresses generated by the derivation scheme
|
||||
/// </summary>
|
||||
public IList<OnChainPaymentMethodPreviewResultAddressItem> Addresses { get; set; } =
|
||||
new List<OnChainPaymentMethodPreviewResultAddressItem>();
|
||||
|
||||
public class OnChainPaymentMethodPreviewResultAddressItem
|
||||
{
|
||||
/// <summary>
|
||||
/// The key path relative to the account key path.
|
||||
/// </summary>
|
||||
public string KeyPath { get; set; }
|
||||
//The address generated at the key path
|
||||
public string Address { get; set; }
|
||||
}
|
||||
}
|
||||
}
|
21
BTCPayServer.Client/Models/OpenLightningChannelRequest.cs
Normal file
21
BTCPayServer.Client/Models/OpenLightningChannelRequest.cs
Normal file
@ -0,0 +1,21 @@
|
||||
using BTCPayServer.Client.JsonConverters;
|
||||
using BTCPayServer.Lightning;
|
||||
using NBitcoin;
|
||||
using NBitcoin.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
using MoneyJsonConverter = BTCPayServer.Client.JsonConverters.MoneyJsonConverter;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class OpenLightningChannelRequest
|
||||
{
|
||||
[JsonConverter(typeof(NodeUriJsonConverter))]
|
||||
[JsonProperty("nodeURI")]
|
||||
public NodeInfo NodeURI { get; set; }
|
||||
[JsonConverter(typeof(MoneyJsonConverter))]
|
||||
public Money ChannelAmount { get; set; }
|
||||
|
||||
[JsonConverter(typeof(FeeRateJsonConverter))]
|
||||
public FeeRate FeeRate { get; set; }
|
||||
}
|
||||
}
|
8
BTCPayServer.Client/Models/PayLightningInvoiceRequest.cs
Normal file
8
BTCPayServer.Client/Models/PayLightningInvoiceRequest.cs
Normal file
@ -0,0 +1,8 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class PayLightningInvoiceRequest
|
||||
{
|
||||
[Newtonsoft.Json.JsonProperty("BOLT11")]
|
||||
public string BOLT11 { get; set; }
|
||||
}
|
||||
}
|
26
BTCPayServer.Client/Models/PaymentRequestBaseData.cs
Normal file
26
BTCPayServer.Client/Models/PaymentRequestBaseData.cs
Normal file
@ -0,0 +1,26 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BTCPayServer.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class PaymentRequestBaseData
|
||||
{
|
||||
[JsonProperty(ItemConverterType = typeof(NumericStringJsonConverter))]
|
||||
public decimal Amount { get; set; }
|
||||
public string Currency { get; set; }
|
||||
public DateTime? ExpiryDate { get; set; }
|
||||
public string Title { get; set; }
|
||||
public string Description { get; set; }
|
||||
public string Email { get; set; }
|
||||
|
||||
public string EmbeddedCSS { get; set; }
|
||||
public string CustomCSSLink { get; set; }
|
||||
public bool AllowCustomPaymentAmounts { get; set; }
|
||||
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, JToken> AdditionalData { get; set; }
|
||||
}
|
||||
}
|
22
BTCPayServer.Client/Models/PaymentRequestData.cs
Normal file
22
BTCPayServer.Client/Models/PaymentRequestData.cs
Normal file
@ -0,0 +1,22 @@
|
||||
using System;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class PaymentRequestData : PaymentRequestBaseData
|
||||
{
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public PaymentRequestData.PaymentRequestStatus Status { get; set; }
|
||||
public DateTimeOffset Created { get; set; }
|
||||
public string Id { get; set; }
|
||||
public bool Archived { get; set; }
|
||||
|
||||
public enum PaymentRequestStatus
|
||||
{
|
||||
Pending = 0,
|
||||
Completed = 1,
|
||||
Expired = 2
|
||||
}
|
||||
}
|
||||
}
|
32
BTCPayServer.Client/Models/PayoutData.cs
Normal file
32
BTCPayServer.Client/Models/PayoutData.cs
Normal file
@ -0,0 +1,32 @@
|
||||
using System;
|
||||
using BTCPayServer.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public enum PayoutState
|
||||
{
|
||||
AwaitingApproval,
|
||||
AwaitingPayment,
|
||||
InProgress,
|
||||
Completed,
|
||||
Cancelled
|
||||
}
|
||||
public class PayoutData
|
||||
{
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset Date { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string PullPaymentId { get; set; }
|
||||
public string Destination { get; set; }
|
||||
public string PaymentMethod { get; set; }
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal Amount { get; set; }
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal? PaymentMethodAmount { get; set; }
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public PayoutState State { get; set; }
|
||||
public int Revision { get; set; }
|
||||
}
|
||||
}
|
24
BTCPayServer.Client/Models/PullPaymentBaseData.cs
Normal file
24
BTCPayServer.Client/Models/PullPaymentBaseData.cs
Normal file
@ -0,0 +1,24 @@
|
||||
using System;
|
||||
using BTCPayServer.Client.JsonConverters;
|
||||
using BTCPayServer.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class PullPaymentData
|
||||
{
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset StartsAt { get; set; }
|
||||
[JsonConverter(typeof(NBitcoin.JsonConverters.DateTimeToUnixTimeConverter))]
|
||||
public DateTimeOffset? ExpiresAt { get; set; }
|
||||
public string Id { get; set; }
|
||||
public string Name { get; set; }
|
||||
public string Currency { get; set; }
|
||||
[JsonConverter(typeof(NumericStringJsonConverter))]
|
||||
public decimal Amount { get; set; }
|
||||
[JsonConverter(typeof(TimeSpanJsonConverter.Seconds))]
|
||||
public TimeSpan? Period { get; set; }
|
||||
public bool Archived { get; set; }
|
||||
public string ViewLink { get; set; }
|
||||
}
|
||||
}
|
47
BTCPayServer.Client/Models/ServerInfoData.cs
Normal file
47
BTCPayServer.Client/Models/ServerInfoData.cs
Normal file
@ -0,0 +1,47 @@
|
||||
using System.Collections.Generic;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class ServerInfoData
|
||||
{
|
||||
/// <summary>
|
||||
/// the BTCPay Server version
|
||||
/// </summary>
|
||||
public string Version { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the Tor hostname
|
||||
/// </summary>
|
||||
public string Onion { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// the payment methods this server supports
|
||||
/// </summary>
|
||||
public IEnumerable<string> SupportedPaymentMethods { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// are all chains fully synched
|
||||
/// </summary>
|
||||
public bool FullySynched { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// detailed sync information per chain
|
||||
/// </summary>
|
||||
public IEnumerable<ServerInfoSyncStatusData> SyncStatus { get; set; }
|
||||
}
|
||||
|
||||
public class ServerInfoSyncStatusData
|
||||
{
|
||||
public string CryptoCode { get; set; }
|
||||
public int ChainHeight { get; set; }
|
||||
public int? SyncHeight { get; set; }
|
||||
public ServerInfoNodeData NodeInformation { get; set; }
|
||||
}
|
||||
|
||||
public class ServerInfoNodeData
|
||||
{
|
||||
public int Headers { get; set; }
|
||||
public int Blocks { get; set; }
|
||||
public double VerificationProgress { get; set; }
|
||||
}
|
||||
}
|
83
BTCPayServer.Client/Models/StoreBaseData.cs
Normal file
83
BTCPayServer.Client/Models/StoreBaseData.cs
Normal file
@ -0,0 +1,83 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using BTCPayServer.Client.JsonConverters;
|
||||
using Newtonsoft.Json;
|
||||
using Newtonsoft.Json.Converters;
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public abstract class StoreBaseData
|
||||
{
|
||||
/// <summary>
|
||||
/// the name of the store
|
||||
/// </summary>
|
||||
public string Name { get; set; }
|
||||
|
||||
public string Website { get; set; }
|
||||
|
||||
[JsonConverter(typeof(TimeSpanJsonConverter.Seconds))]
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public TimeSpan InvoiceExpiration { get; set; } = TimeSpan.FromMinutes(15);
|
||||
|
||||
[JsonConverter(typeof(TimeSpanJsonConverter.Seconds))]
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public TimeSpan MonitoringExpiration { get; set; } = TimeSpan.FromMinutes(60);
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
public SpeedPolicy SpeedPolicy { get; set; }
|
||||
public string LightningDescriptionTemplate { get; set; }
|
||||
public double PaymentTolerance { get; set; } = 0;
|
||||
public bool AnyoneCanCreateInvoice { get; set; }
|
||||
|
||||
|
||||
public bool RequiresRefundEmail { get; set; }
|
||||
public bool LightningAmountInSatoshi { get; set; }
|
||||
public bool LightningPrivateRouteHints { get; set; }
|
||||
public bool OnChainWithLnInvoiceFallback { get; set; }
|
||||
public bool RedirectAutomatically { get; set; }
|
||||
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public bool ShowRecommendedFee { get; set; } = true;
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public int RecommendedFeeBlockTarget { get; set; } = 1;
|
||||
|
||||
public string DefaultPaymentMethod { get; set; }
|
||||
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public string DefaultLang { get; set; } = "en";
|
||||
|
||||
public string CustomLogo { get; set; }
|
||||
|
||||
public string CustomCSS { get; set; }
|
||||
|
||||
public string HtmlTitle { get; set; }
|
||||
|
||||
|
||||
|
||||
[JsonConverter(typeof(StringEnumConverter))]
|
||||
[JsonProperty(NullValueHandling = NullValueHandling.Ignore)]
|
||||
public NetworkFeeMode NetworkFeeMode { get; set; } = NetworkFeeMode.Never;
|
||||
|
||||
public bool PayJoinEnabled { get; set; }
|
||||
|
||||
|
||||
[JsonExtensionData]
|
||||
public IDictionary<string, JToken> AdditionalData { get; set; }
|
||||
}
|
||||
|
||||
public enum NetworkFeeMode
|
||||
{
|
||||
MultiplePaymentsOnly,
|
||||
Always,
|
||||
Never
|
||||
}
|
||||
|
||||
public enum SpeedPolicy
|
||||
{
|
||||
HighSpeed = 0,
|
||||
MediumSpeed = 1,
|
||||
LowSpeed = 2,
|
||||
LowMediumSpeed = 3
|
||||
}
|
||||
}
|
10
BTCPayServer.Client/Models/StoreData.cs
Normal file
10
BTCPayServer.Client/Models/StoreData.cs
Normal file
@ -0,0 +1,10 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class StoreData : StoreBaseData
|
||||
{
|
||||
/// <summary>
|
||||
/// the id of the store
|
||||
/// </summary>
|
||||
public string Id { get; set; }
|
||||
}
|
||||
}
|
35
BTCPayServer.Client/Models/StoreWebhookData.cs
Normal file
35
BTCPayServer.Client/Models/StoreWebhookData.cs
Normal file
@ -0,0 +1,35 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Newtonsoft.Json;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class StoreWebhookBaseData
|
||||
{
|
||||
public class AuthorizedEventsData
|
||||
{
|
||||
public bool Everything { get; set; } = true;
|
||||
|
||||
[JsonProperty(ItemConverterType = typeof(Newtonsoft.Json.Converters.StringEnumConverter))]
|
||||
public WebhookEventType[] SpecificEvents { get; set; } = Array.Empty<WebhookEventType>();
|
||||
}
|
||||
|
||||
public bool Enabled { get; set; } = true;
|
||||
[JsonProperty(DefaultValueHandling = DefaultValueHandling.Ignore)]
|
||||
public string Secret { get; set; }
|
||||
public bool AutomaticRedelivery { get; set; } = true;
|
||||
public string Url { get; set; }
|
||||
public AuthorizedEventsData AuthorizedEvents { get; set; } = new AuthorizedEventsData();
|
||||
}
|
||||
public class UpdateStoreWebhookRequest : StoreWebhookBaseData
|
||||
{
|
||||
}
|
||||
public class CreateStoreWebhookRequest : StoreWebhookBaseData
|
||||
{
|
||||
}
|
||||
public class StoreWebhookData : StoreWebhookBaseData
|
||||
{
|
||||
public string Id { get; set; }
|
||||
}
|
||||
}
|
9
BTCPayServer.Client/Models/UpdateInvoiceRequest.cs
Normal file
9
BTCPayServer.Client/Models/UpdateInvoiceRequest.cs
Normal file
@ -0,0 +1,9 @@
|
||||
using Newtonsoft.Json.Linq;
|
||||
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class UpdateInvoiceRequest
|
||||
{
|
||||
public JObject Metadata { get; set; }
|
||||
}
|
||||
}
|
7
BTCPayServer.Client/Models/UpdateNotification.cs
Normal file
7
BTCPayServer.Client/Models/UpdateNotification.cs
Normal file
@ -0,0 +1,7 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class UpdateNotification
|
||||
{
|
||||
public bool? Seen { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,6 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class UpdatePaymentRequestRequest : PaymentRequestBaseData
|
||||
{
|
||||
}
|
||||
}
|
6
BTCPayServer.Client/Models/UpdateStoreRequest.cs
Normal file
6
BTCPayServer.Client/Models/UpdateStoreRequest.cs
Normal file
@ -0,0 +1,6 @@
|
||||
namespace BTCPayServer.Client.Models
|
||||
{
|
||||
public class UpdateStoreRequest : StoreBaseData
|
||||
{
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user