mirror of
https://github.com/Ride-The-Lightning/RTL.git
synced 2026-08-13 12:33:07 +02:00
Loop monitor POC
Loop monitor POC
This commit is contained in:
parent
c0dd171873
commit
2f5817cb36
29 changed files with 1999 additions and 147 deletions
|
|
@ -320,6 +320,28 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|||
SOFTWARE.
|
||||
|
||||
|
||||
after
|
||||
MIT
|
||||
Copyright (c) 2011 Raynos.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
angular-user-idle
|
||||
MIT
|
||||
|
||||
|
|
@ -347,6 +369,114 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
arraybuffer.slice
|
||||
MIT
|
||||
Copyright (C) 2013 Rase-
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies
|
||||
of the Software, and to permit persons to whom the Software is furnished to do
|
||||
so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
backo2
|
||||
MIT
|
||||
|
||||
base64-arraybuffer
|
||||
MIT
|
||||
Copyright (c) 2012 Niklas von Hertzen
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
blob
|
||||
MIT
|
||||
MIT License
|
||||
|
||||
Copyright (C) 2014 Rase-
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
component-bind
|
||||
|
||||
component-emitter
|
||||
MIT
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 Component contributors <dev@component.io>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person
|
||||
obtaining a copy of this software and associated documentation
|
||||
files (the "Software"), to deal in the Software without
|
||||
restriction, including without limitation the rights to use,
|
||||
copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the
|
||||
Software is furnished to do so, subject to the following
|
||||
conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
component-inherit
|
||||
|
||||
convert-hex
|
||||
|
||||
convert-string
|
||||
|
|
@ -1025,6 +1155,80 @@ ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
|||
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
debug
|
||||
MIT
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 TJ Holowaychuk <tj@vision-media.ca>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of this software
|
||||
and associated documentation files (the 'Software'), to deal in the Software without restriction,
|
||||
including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all copies or substantial
|
||||
portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT
|
||||
LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
|
||||
engine.io-client
|
||||
MIT
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014-2015 Automattic <dev@cloudup.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
engine.io-parser
|
||||
MIT
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2016 Guillermo Rauch (@rauchg)
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining
|
||||
a copy of this software and associated documentation files (the
|
||||
'Software'), to deal in the Software without restriction, including
|
||||
without limitation the rights to use, copy, modify, merge, publish,
|
||||
distribute, sublicense, and/or sell copies of the Software, and to
|
||||
permit persons to whom the Software is furnished to do so, subject to
|
||||
the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be
|
||||
included in all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
|
||||
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
|
||||
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
|
||||
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
|
||||
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
|
||||
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
hammerjs
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
|
@ -1050,6 +1254,63 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
|
||||
|
||||
has-binary2
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Kevin Roark
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the "Software"), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
has-cors
|
||||
MIT
|
||||
|
||||
indexof
|
||||
|
||||
isarray
|
||||
MIT
|
||||
|
||||
ms
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2016 Zeit, Inc.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
ngx-perfect-scrollbar
|
||||
MIT
|
||||
The MIT License
|
||||
|
|
@ -1075,6 +1336,56 @@ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|||
THE SOFTWARE.
|
||||
|
||||
|
||||
parseqs
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Gal Koren
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
parseuri
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Gal Koren
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
|
||||
perfect-scrollbar
|
||||
MIT
|
||||
The MIT License (MIT) Copyright (c) 2012-2017 Hyunje Jun and other contributors
|
||||
|
|
@ -1348,6 +1659,77 @@ Apache-2.0
|
|||
|
||||
sha256
|
||||
|
||||
socket.io-client
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2014 Guillermo Rauch
|
||||
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
socket.io-parser
|
||||
MIT
|
||||
(The MIT License)
|
||||
|
||||
Copyright (c) 2014 Guillermo Rauch <guillermo@learnboost.com>
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy of
|
||||
this software and associated documentation files (the 'Software'), to deal in
|
||||
the Software without restriction, including without limitation the rights to
|
||||
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
|
||||
the Software, and to permit persons to whom the Software is furnished to do so,
|
||||
subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
|
||||
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
|
||||
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
|
||||
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
||||
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
||||
|
||||
|
||||
to-array
|
||||
MIT
|
||||
Copyright (c) 2012 Raynos.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
||||
tslib
|
||||
Apache-2.0
|
||||
Apache License
|
||||
|
|
@ -1407,6 +1789,32 @@ If the Work includes a "NOTICE" text file as part of its distribution, then any
|
|||
END OF TERMS AND CONDITIONS
|
||||
|
||||
|
||||
yeast
|
||||
MIT
|
||||
The MIT License (MIT)
|
||||
|
||||
Copyright (c) 2015 Unshift.io, Arnout Kazemier, the Contributors.
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
in the Software without restriction, including without limitation the rights
|
||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
|
||||
|
||||
|
||||
zone.js
|
||||
MIT
|
||||
The MIT License
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -9,8 +9,8 @@
|
|||
<link rel="icon" type="image/png" sizes="32x32" href="assets/images/favicon/favicon-32x32.png">
|
||||
<link rel="icon" type="image/png" sizes="16x16" href="assets/images/favicon/favicon-16x16.png">
|
||||
<link rel="manifest" href="assets/images/favicon/site.webmanifest">
|
||||
<link rel="stylesheet" href="styles.299bd849df2ee75dd3f7.css"></head>
|
||||
<link rel="stylesheet" href="styles.f18574731fbd952bd733.css"></head>
|
||||
<body>
|
||||
<rtl-app></rtl-app>
|
||||
<script src="runtime.2e0b6727a990b37572f4.js"></script><script src="polyfills-es5.92f4069201c83f4833ef.js" nomodule></script><script src="polyfills.5ddcccdb990eb395f306.js"></script><script src="main.045a6cef456c662edb82.js"></script></body>
|
||||
<script src="runtime.c34eacb3a1d0815d5d31.js"></script><script src="polyfills-es5.2e75d230d7f9c760eb2f.js" nomodule></script><script src="polyfills.1ebb102854b0ec478c1b.js"></script><script src="main.9b61a11b9d60ea3819ec.js"></script></body>
|
||||
</html>
|
||||
|
|
|
|||
File diff suppressed because one or more lines are too long
1
angular/main.9b61a11b9d60ea3819ec.js
Normal file
1
angular/main.9b61a11b9d60ea3819ec.js
Normal file
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
|
@ -1 +0,0 @@
|
|||
!function(e){function r(r){for(var n,i,a=r[0],c=r[1],f=r[2],p=0,s=[];p<a.length;p++)o[i=a[p]]&&s.push(o[i][0]),o[i]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,a=1;a<t.length;a++)0!==o[t[a]]&&(n=!1);n&&(u.splice(r--,1),e=i(i.s=t[0]))}return e}var n={},o={0:0},u=[];function i(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,i),t.l=!0,t.exports}i.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,a=document.createElement("script");a.charset="utf-8",a.timeout=120,i.nc&&a.setAttribute("nonce",i.nc),a.src=function(e){return i.p+""+({}[e]||e)+"."+{1:"9e71a210a8bdc5ba9df9",6:"1df8cc6666448eb1b667",7:"cee151d78befebb72c4b"}[e]+".js"}(e);var c=new Error;u=function(r){a.onerror=a.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:a})}),12e4);a.onerror=a.onload=u,document.head.appendChild(a)}return Promise.all(r)},i.m=e,i.c=n,i.d=function(e,r,t){i.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},i.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},i.t=function(e,r){if(1&r&&(e=i(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(i.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)i.d(t,n,(function(r){return e[r]}).bind(null,n));return t},i.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return i.d(r,"a",r),r},i.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},i.p="",i.oe=function(e){throw console.error(e),e};var a=window.webpackJsonp=window.webpackJsonp||[],c=a.push.bind(a);a.push=r,a=a.slice();for(var f=0;f<a.length;f++)r(a[f]);var l=c;t()}([]);
|
||||
1
angular/runtime.c34eacb3a1d0815d5d31.js
Normal file
1
angular/runtime.c34eacb3a1d0815d5d31.js
Normal file
|
|
@ -0,0 +1 @@
|
|||
!function(e){function r(r){for(var n,a,i=r[0],c=r[1],f=r[2],p=0,s=[];p<i.length;p++)o[a=i[p]]&&s.push(o[a][0]),o[a]=0;for(n in c)Object.prototype.hasOwnProperty.call(c,n)&&(e[n]=c[n]);for(l&&l(r);s.length;)s.shift()();return u.push.apply(u,f||[]),t()}function t(){for(var e,r=0;r<u.length;r++){for(var t=u[r],n=!0,i=1;i<t.length;i++)0!==o[t[i]]&&(n=!1);n&&(u.splice(r--,1),e=a(a.s=t[0]))}return e}var n={},o={0:0},u=[];function a(r){if(n[r])return n[r].exports;var t=n[r]={i:r,l:!1,exports:{}};return e[r].call(t.exports,t,t.exports,a),t.l=!0,t.exports}a.e=function(e){var r=[],t=o[e];if(0!==t)if(t)r.push(t[2]);else{var n=new Promise((function(r,n){t=o[e]=[r,n]}));r.push(t[2]=n);var u,i=document.createElement("script");i.charset="utf-8",i.timeout=120,a.nc&&i.setAttribute("nonce",a.nc),i.src=function(e){return a.p+""+({}[e]||e)+"."+{1:"9e71a210a8bdc5ba9df9",6:"a0c4b63d37d2817e57a8",7:"f304a8c9801c62bf8967"}[e]+".js"}(e);var c=new Error;u=function(r){i.onerror=i.onload=null,clearTimeout(f);var t=o[e];if(0!==t){if(t){var n=r&&("load"===r.type?"missing":r.type),u=r&&r.target&&r.target.src;c.message="Loading chunk "+e+" failed.\n("+n+": "+u+")",c.name="ChunkLoadError",c.type=n,c.request=u,t[1](c)}o[e]=void 0}};var f=setTimeout((function(){u({type:"timeout",target:i})}),12e4);i.onerror=i.onload=u,document.head.appendChild(i)}return Promise.all(r)},a.m=e,a.c=n,a.d=function(e,r,t){a.o(e,r)||Object.defineProperty(e,r,{enumerable:!0,get:t})},a.r=function(e){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},a.t=function(e,r){if(1&r&&(e=a(e)),8&r)return e;if(4&r&&"object"==typeof e&&e&&e.__esModule)return e;var t=Object.create(null);if(a.r(t),Object.defineProperty(t,"default",{enumerable:!0,value:e}),2&r&&"string"!=typeof e)for(var n in e)a.d(t,n,(function(r){return e[r]}).bind(null,n));return t},a.n=function(e){var r=e&&e.__esModule?function(){return e.default}:function(){return e};return a.d(r,"a",r),r},a.o=function(e,r){return Object.prototype.hasOwnProperty.call(e,r)},a.p="",a.oe=function(e){throw console.error(e),e};var i=window.webpackJsonp=window.webpackJsonp||[],c=i.push.bind(i);i.push=r,i=i.slice();for(var f=0;f<i.length;f++)r(i[f]);var l=c;t()}([]);
|
||||
File diff suppressed because one or more lines are too long
1
angular/styles.f18574731fbd952bd733.css
Normal file
1
angular/styles.f18574731fbd952bd733.css
Normal file
File diff suppressed because one or more lines are too long
6
app.js
6
app.js
|
|
@ -4,10 +4,12 @@ const bodyParser = require("body-parser");
|
|||
const cookieParser = require("cookie-parser");
|
||||
const common = require("./common");
|
||||
const app = express();
|
||||
|
||||
const baseHref = "/rtl/";
|
||||
const apiRoot = baseHref + "api/";
|
||||
const apiLNDRoot = baseHref + "api/lnd/";
|
||||
const apiCLRoot = baseHref + "api/cl/";
|
||||
const apiLoopRoot = baseHref + "api/loop";
|
||||
|
||||
const authenticateRoutes = require("./routes/authenticate");
|
||||
const RTLConfRoutes = require("./routes/RTLConf");
|
||||
|
|
@ -36,6 +38,8 @@ const paymentsCLRoutes = require("./routes/c-lightning/payments");
|
|||
const peersCLRoutes = require("./routes/c-lightning/peers");
|
||||
const networkCLRoutes = require("./routes/c-lightning/network");
|
||||
|
||||
const loopRoutes = require('./routes/loopd/loop');
|
||||
|
||||
app.use(cookieParser(common.secret_key));
|
||||
app.use(bodyParser.json());
|
||||
app.use(bodyParser.urlencoded({ extended: false }));
|
||||
|
|
@ -83,6 +87,8 @@ app.use(apiCLRoot + "payments", paymentsCLRoutes);
|
|||
app.use(apiCLRoot + "peers", peersCLRoutes);
|
||||
app.use(apiCLRoot + "network", networkCLRoutes);
|
||||
|
||||
app.use(apiLoopRoot, loopRoutes);
|
||||
|
||||
app.use((req, res, next) => {
|
||||
res.sendFile(path.join(__dirname, "angular", "index.html"));
|
||||
});
|
||||
|
|
|
|||
438
controllers/loopd/client.proto
Normal file
438
controllers/loopd/client.proto
Normal file
|
|
@ -0,0 +1,438 @@
|
|||
syntax = "proto3";
|
||||
|
||||
import "google/api/annotations.proto";
|
||||
|
||||
package looprpc;
|
||||
|
||||
/**
|
||||
SwapClient is a service that handles the client side process of onchain/offchain
|
||||
swaps. The service is designed for a single client.
|
||||
*/
|
||||
service SwapClient {
|
||||
/** loop: `out`
|
||||
LoopOut initiates an loop out swap with the given parameters. The call
|
||||
returns after the swap has been set up with the swap server. From that
|
||||
point onwards, progress can be tracked via the SwapStatus stream that is
|
||||
returned from Monitor().
|
||||
*/
|
||||
rpc LoopOut (LoopOutRequest) returns (SwapResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/loop/out"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
LoopIn initiates a loop in swap with the given parameters. The call
|
||||
returns after the swap has been set up with the swap server. From that
|
||||
point onwards, progress can be tracked via the SwapStatus stream
|
||||
that is returned from Monitor().
|
||||
*/
|
||||
rpc LoopIn (LoopInRequest) returns (SwapResponse) {
|
||||
option (google.api.http) = {
|
||||
post: "/v1/loop/in"
|
||||
body: "*"
|
||||
};
|
||||
}
|
||||
|
||||
/** loop: `monitor`
|
||||
Monitor will return a stream of swap updates for currently active swaps.
|
||||
TODO: add MonitorSync version for REST clients.
|
||||
*/
|
||||
rpc Monitor (MonitorRequest) returns (stream SwapStatus);
|
||||
|
||||
/** loop: `terms`
|
||||
LoopOutTerms returns the terms that the server enforces for a loop out swap.
|
||||
*/
|
||||
rpc LoopOutTerms (TermsRequest) returns (TermsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/loop/out/terms"
|
||||
};
|
||||
}
|
||||
|
||||
/** loop: `quote`
|
||||
LoopOutQuote returns a quote for a loop out swap with the provided
|
||||
parameters.
|
||||
*/
|
||||
rpc LoopOutQuote (QuoteRequest) returns (QuoteResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/loop/out/quote/{amt}"
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
GetTerms returns the terms that the server enforces for swaps.
|
||||
*/
|
||||
rpc GetLoopInTerms (TermsRequest) returns (TermsResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/loop/in/terms"
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
GetQuote returns a quote for a swap with the provided parameters.
|
||||
*/
|
||||
rpc GetLoopInQuote (QuoteRequest) returns (QuoteResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/loop/in/quote/{amt}"
|
||||
};
|
||||
}
|
||||
|
||||
/**
|
||||
GetLsatTokens returns all LSAT tokens the daemon ever paid for.
|
||||
*/
|
||||
rpc GetLsatTokens (TokensRequest) returns (TokensResponse) {
|
||||
option (google.api.http) = {
|
||||
get: "/v1/lsat/tokens"
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
message LoopOutRequest {
|
||||
/**
|
||||
Requested swap amount in sat. This does not include the swap and miner fee.
|
||||
*/
|
||||
int64 amt = 1;
|
||||
|
||||
/**
|
||||
Base58 encoded destination address for the swap.
|
||||
*/
|
||||
string dest = 2;
|
||||
|
||||
/**
|
||||
Maximum off-chain fee in msat that may be paid for payment to the server.
|
||||
This limit is applied during path finding. Typically this value is taken
|
||||
from the response of the GetQuote call.
|
||||
*/
|
||||
int64 max_swap_routing_fee = 3;
|
||||
|
||||
/**
|
||||
Maximum off-chain fee in msat that may be paid for payment to the server.
|
||||
This limit is applied during path finding. Typically this value is taken
|
||||
from the response of the GetQuote call.
|
||||
*/
|
||||
int64 max_prepay_routing_fee = 4;
|
||||
|
||||
/**
|
||||
Maximum we are willing to pay the server for the swap. This value is not
|
||||
disclosed in the swap initiation call, but if the server asks for a
|
||||
higher fee, we abort the swap. Typically this value is taken from the
|
||||
response of the GetQuote call. It includes the prepay amount.
|
||||
*/
|
||||
int64 max_swap_fee = 5;
|
||||
|
||||
/**
|
||||
Maximum amount of the swap fee that may be charged as a prepayment.
|
||||
*/
|
||||
int64 max_prepay_amt = 6;
|
||||
|
||||
/**
|
||||
Maximum in on-chain fees that we are willing to spent. If we want to
|
||||
sweep the on-chain htlc and the fee estimate turns out higher than this
|
||||
value, we cancel the swap. If the fee estimate is lower, we publish the
|
||||
sweep tx.
|
||||
If the sweep tx is not confirmed, we are forced to ratchet up fees until it
|
||||
is swept. Possibly even exceeding max_miner_fee if we get close to the htlc
|
||||
timeout. Because the initial publication revealed the preimage, we have no
|
||||
other choice. The server may already have pulled the off-chain htlc. Only
|
||||
when the fee becomes higher than the swap amount, we can only wait for fees
|
||||
to come down and hope - if we are past the timeout - that the server is not
|
||||
publishing the revocation.
|
||||
max_miner_fee is typically taken from the response of the GetQuote call.
|
||||
*/
|
||||
int64 max_miner_fee = 7;
|
||||
|
||||
/**
|
||||
The channel to loop out, the channel to loop out is selected based on the
|
||||
lowest routing fee for the swap payment to the server.
|
||||
*/
|
||||
uint64 loop_out_channel = 8;
|
||||
|
||||
/**
|
||||
The number of blocks from the on-chain HTLC's confirmation height that it
|
||||
should be swept within.
|
||||
*/
|
||||
int32 sweep_conf_target = 9;
|
||||
|
||||
/**
|
||||
The latest time (in unix seconds) we allow the server to wait before
|
||||
publishing the HTLC on chain. Setting this to a larger value will give the
|
||||
server the opportunity to batch multiple swaps together, and wait for
|
||||
low-fee periods before publishing the HTLC, potentially resulting in a
|
||||
lower total swap fee.
|
||||
*/
|
||||
uint64 swap_publication_deadline = 10;
|
||||
}
|
||||
|
||||
message LoopInRequest {
|
||||
/**
|
||||
Requested swap amount in sat. This does not include the swap and miner
|
||||
fee.
|
||||
*/
|
||||
int64 amt = 1;
|
||||
|
||||
/**
|
||||
Maximum we are willing to pay the server for the swap. This value is not
|
||||
disclosed in the swap initiation call, but if the server asks for a
|
||||
higher fee, we abort the swap. Typically this value is taken from the
|
||||
response of the GetQuote call.
|
||||
*/
|
||||
int64 max_swap_fee = 2;
|
||||
|
||||
/**
|
||||
Maximum in on-chain fees that we are willing to spent. If we want to
|
||||
publish the on-chain htlc and the fee estimate turns out higher than this
|
||||
value, we cancel the swap.
|
||||
max_miner_fee is typically taken from the response of the GetQuote call.
|
||||
*/
|
||||
int64 max_miner_fee = 3;
|
||||
|
||||
/**
|
||||
The channel to loop in. If zero, the channel to loop in is selected based
|
||||
on the lowest routing fee for the swap payment from the server.
|
||||
Note: NOT YET IMPLEMENTED
|
||||
*/
|
||||
uint64 loop_in_channel = 4;
|
||||
|
||||
/**
|
||||
If external_htlc is true, we expect the htlc to be published by an external
|
||||
actor.
|
||||
*/
|
||||
bool external_htlc = 5;
|
||||
}
|
||||
|
||||
message SwapResponse {
|
||||
/**
|
||||
Swap identifier to track status in the update stream that is returned from
|
||||
the Start() call. Currently this is the hash that locks the htlcs.
|
||||
*/
|
||||
string id = 1;
|
||||
|
||||
/**
|
||||
The address of the on-chain htlc.
|
||||
*/
|
||||
string htlc_address = 2;
|
||||
}
|
||||
|
||||
message MonitorRequest {
|
||||
}
|
||||
|
||||
message SwapStatus {
|
||||
/**
|
||||
Requested swap amount in sat. This does not include the swap and miner
|
||||
fee.
|
||||
*/
|
||||
int64 amt = 1;
|
||||
|
||||
/**
|
||||
Swap identifier to track status in the update stream that is returned from
|
||||
the Start() call. Currently this is the hash that locks the htlcs.
|
||||
*/
|
||||
string id = 2;
|
||||
|
||||
/**
|
||||
Swap type
|
||||
*/
|
||||
SwapType type = 3;
|
||||
|
||||
/**
|
||||
State the swap is currently in, see State enum.
|
||||
*/
|
||||
SwapState state = 4;
|
||||
|
||||
/**
|
||||
Initiation time of the swap.
|
||||
*/
|
||||
int64 initiation_time = 5;
|
||||
|
||||
/**
|
||||
Initiation time of the swap.
|
||||
*/
|
||||
int64 last_update_time = 6;
|
||||
|
||||
/**
|
||||
Htlc address.
|
||||
*/
|
||||
string htlc_address = 7;
|
||||
|
||||
/// Swap server cost
|
||||
int64 cost_server = 8;
|
||||
|
||||
// On-chain transaction cost
|
||||
int64 cost_onchain = 9;
|
||||
|
||||
// Off-chain routing fees
|
||||
int64 cost_offchain = 10;
|
||||
}
|
||||
|
||||
enum SwapType {
|
||||
// LOOP_OUT indicates an loop out swap (off-chain to on-chain)
|
||||
LOOP_OUT = 0;
|
||||
|
||||
// LOOP_IN indicates a loop in swap (on-chain to off-chain)
|
||||
LOOP_IN = 1;
|
||||
}
|
||||
|
||||
enum SwapState {
|
||||
/**
|
||||
INITIATED is the initial state of a swap. At that point, the initiation
|
||||
call to the server has been made and the payment process has been started
|
||||
for the swap and prepayment invoices.
|
||||
*/
|
||||
INITIATED = 0;
|
||||
|
||||
/**
|
||||
PREIMAGE_REVEALED is reached when the sweep tx publication is first
|
||||
attempted. From that point on, we should consider the preimage to no
|
||||
longer be secret and we need to do all we can to get the sweep confirmed.
|
||||
This state will mostly coalesce with StateHtlcConfirmed, except in the
|
||||
case where we wait for fees to come down before we sweep.
|
||||
*/
|
||||
PREIMAGE_REVEALED = 1;
|
||||
|
||||
/**
|
||||
HTLC_PUBLISHED is reached when the htlc tx has been published in a loop in
|
||||
swap.
|
||||
*/
|
||||
HTLC_PUBLISHED = 2;
|
||||
|
||||
/**
|
||||
SUCCESS is the final swap state that is reached when the sweep tx has
|
||||
the required confirmation depth.
|
||||
*/
|
||||
SUCCESS = 3;
|
||||
|
||||
/**
|
||||
FAILED is the final swap state for a failed swap with or without loss of
|
||||
the swap amount.
|
||||
*/
|
||||
FAILED = 4;
|
||||
|
||||
/**
|
||||
INVOICE_SETTLED is reached when the swap invoice in a loop in swap has been
|
||||
paid, but we are still waiting for the htlc spend to confirm.
|
||||
*/
|
||||
INVOICE_SETTLED = 5;
|
||||
}
|
||||
|
||||
message TermsRequest {
|
||||
}
|
||||
|
||||
message TermsResponse {
|
||||
|
||||
reserved 1, 2, 3, 4, 7;
|
||||
|
||||
/**
|
||||
Minimum swap amount (sat)
|
||||
*/
|
||||
int64 min_swap_amount = 5;
|
||||
|
||||
/**
|
||||
Maximum swap amount (sat)
|
||||
*/
|
||||
int64 max_swap_amount = 6;
|
||||
}
|
||||
|
||||
message QuoteRequest {
|
||||
/**
|
||||
The amount to swap in satoshis.
|
||||
*/
|
||||
int64 amt = 1;
|
||||
|
||||
/**
|
||||
The confirmation target that should be used either for the sweep of the
|
||||
on-chain HTLC broadcast by the swap server in the case of a Loop Out, or for
|
||||
the confirmation of the on-chain HTLC broadcast by the swap client in the
|
||||
case of a Loop In.
|
||||
*/
|
||||
int32 conf_target = 2;
|
||||
|
||||
/**
|
||||
If external_htlc is true, we expect the htlc to be published by an external
|
||||
actor.
|
||||
*/
|
||||
bool external_htlc = 3;
|
||||
}
|
||||
|
||||
message QuoteResponse {
|
||||
/**
|
||||
The fee that the swap server is charging for the swap.
|
||||
*/
|
||||
int64 swap_fee = 1;
|
||||
|
||||
/**
|
||||
The part of the swap fee that is requested as a prepayment.
|
||||
*/
|
||||
int64 prepay_amt = 2;
|
||||
|
||||
/**
|
||||
An estimate of the on-chain fee that needs to be paid to sweep the HTLC.
|
||||
*/
|
||||
int64 miner_fee = 3;
|
||||
|
||||
/**
|
||||
The node pubkey where the swap payment needs to be paid
|
||||
to. This can be used to test connectivity before initiating the swap.
|
||||
*/
|
||||
bytes swap_payment_dest = 4;
|
||||
|
||||
/**
|
||||
On-chain cltv expiry delta
|
||||
*/
|
||||
int32 cltv_delta = 5;
|
||||
}
|
||||
|
||||
message TokensRequest {
|
||||
}
|
||||
|
||||
message TokensResponse {
|
||||
/**
|
||||
List of all tokens the daemon knows of, including old/expired tokens.
|
||||
*/
|
||||
repeated LsatToken tokens = 1;
|
||||
}
|
||||
|
||||
message LsatToken {
|
||||
/**
|
||||
The base macaroon that was baked by the auth server.
|
||||
*/
|
||||
bytes base_macaroon = 1;
|
||||
|
||||
/**
|
||||
The payment hash of the payment that was paid to obtain the token.
|
||||
*/
|
||||
bytes payment_hash = 2;
|
||||
|
||||
/**
|
||||
The preimage of the payment hash, knowledge of this is proof that the
|
||||
payment has been paid. If the preimage is set to all zeros, this means the
|
||||
payment is still pending and the token is not yet fully valid.
|
||||
*/
|
||||
bytes payment_preimage = 3;
|
||||
|
||||
/**
|
||||
The amount of millisatoshis that was paid to get the token.
|
||||
*/
|
||||
int64 amount_paid_msat = 4;
|
||||
|
||||
/**
|
||||
The amount of millisatoshis paid in routing fee to pay for the token.
|
||||
*/
|
||||
int64 routing_fee_paid_msat = 5;
|
||||
|
||||
/**
|
||||
The creation time of the token as UNIX timestamp in seconds.
|
||||
*/
|
||||
int64 time_created = 6;
|
||||
|
||||
/**
|
||||
Indicates whether the token is expired or still valid.
|
||||
*/
|
||||
bool expired = 7;
|
||||
|
||||
/**
|
||||
Identifying attribute of this token in the store. Currently represents the
|
||||
file name of the token where it's stored on the file system.
|
||||
*/
|
||||
string storage_name = 8;
|
||||
}
|
||||
25
controllers/loopd/loop.js
Normal file
25
controllers/loopd/loop.js
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
const grpc = require('grpc');
|
||||
const protoLoader = require('@grpc/proto-loader');
|
||||
const packageDefinition = protoLoader.loadSync('./controllers/loopd/client.proto', {keepCase: true, longs: String, enums: String, defaults: true, oneofs: true});
|
||||
const looprpc = grpc.loadPackageDefinition(packageDefinition).looprpc;
|
||||
const swapClient = new looprpc.SwapClient('localhost:11010', grpc.credentials.createInsecure());
|
||||
|
||||
exports.loopIn = (req, res, next) => {
|
||||
swapClient.loopIn(req.body, function(error, response) {
|
||||
if (error) {
|
||||
res.status(500).json({message: 'Loop In Failed!', error: error});
|
||||
} else {
|
||||
res.status(200).json(response);
|
||||
}
|
||||
})
|
||||
};
|
||||
|
||||
exports.loopOut = (req, res, next) => {
|
||||
swapClient.loopOut(req.body, function(error, response) {
|
||||
if (error) {
|
||||
res.status(500).json({message: 'Loop Out Failed!', error: error});
|
||||
} else {
|
||||
res.status(200).json(response);
|
||||
}
|
||||
})
|
||||
};
|
||||
1049
package-lock.json
generated
1049
package-lock.json
generated
File diff suppressed because it is too large
Load diff
|
|
@ -31,6 +31,7 @@
|
|||
"@fortawesome/fontawesome-svg-core": "^1.2.25",
|
||||
"@fortawesome/free-regular-svg-icons": "^5.11.2",
|
||||
"@fortawesome/free-solid-svg-icons": "^5.11.2",
|
||||
"@grpc/proto-loader": "^0.5.3",
|
||||
"@ngrx/effects": "^8.4.0",
|
||||
"@ngrx/router-store": "^8.4.0",
|
||||
"@ngrx/store": "^8.4.0",
|
||||
|
|
@ -41,6 +42,7 @@
|
|||
"cookie-parser": "^1.4.4",
|
||||
"core-js": "^2.6.10",
|
||||
"express": "^4.16.4",
|
||||
"grpc": "^1.24.2",
|
||||
"hammerjs": "^2.0.8",
|
||||
"ini": "^1.3.5",
|
||||
"jsonwebtoken": "^8.4.0",
|
||||
|
|
@ -54,6 +56,8 @@
|
|||
"rxjs": "^6.5.3",
|
||||
"rxjs-compat": "^6.5.3",
|
||||
"sha256": "^0.2.0",
|
||||
"socket.io": "^2.3.0",
|
||||
"socket.io-client": "^2.3.0",
|
||||
"tslib": "^1.9.0",
|
||||
"upper-case": "^1.1.3",
|
||||
"zone.js": "~0.9.1"
|
||||
|
|
|
|||
9
routes/loopd/loop.js
Normal file
9
routes/loopd/loop.js
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
const LoopController = require("../../controllers/loopd/loop");
|
||||
const express = require("express");
|
||||
const router = express.Router();
|
||||
const authCheck = require("../authCheck");
|
||||
|
||||
router.get("/loopin", authCheck, LoopController.loopIn);
|
||||
router.get("/loopout", authCheck, LoopController.loopOut);
|
||||
|
||||
module.exports = router;
|
||||
39
rtl.js
39
rtl.js
|
|
@ -3,6 +3,11 @@ const common = require("./common");
|
|||
const debug = require("debug")("node-angular");
|
||||
const http = require("http");
|
||||
var connect = require('./connect').setServerConfiguration(); //Do NOT Remove
|
||||
const grpc = require('grpc');
|
||||
const protoLoader = require('@grpc/proto-loader');
|
||||
const packageDefinition = protoLoader.loadSync('./controllers/loopd/client.proto', {keepCase: true, longs: String, enums: String, defaults: true, oneofs: true});
|
||||
const looprpc = grpc.loadPackageDefinition(packageDefinition).looprpc;
|
||||
const swapClient = new looprpc.SwapClient('localhost:11010', grpc.credentials.createInsecure());
|
||||
|
||||
const onError = error => {
|
||||
if (error.syscall !== "listen") {
|
||||
|
|
@ -35,6 +40,40 @@ const onListening = () => {
|
|||
};
|
||||
|
||||
const server = http.createServer(app);
|
||||
const io = require('socket.io')(server);
|
||||
|
||||
const loopMonitor = io.of('/loopMonitor').on('connection', (socket) => {
|
||||
let i = 1;
|
||||
let call = null;
|
||||
socket.on('start', function() {
|
||||
console.log('Application started subscription');
|
||||
console.log(call);
|
||||
var request = {};
|
||||
call = swapClient.monitor(request);
|
||||
call.on('data', function(response) {
|
||||
console.log('Monitor sent message as: ' + JSON.stringify(response));
|
||||
socket.emit('message', { message: response });
|
||||
});
|
||||
call.on('status', function(status) {
|
||||
console.log('Monitor status: ' + JSON.stringify(status));
|
||||
socket.emit('status', { message: status });
|
||||
});
|
||||
call.on('end', function() {
|
||||
console.log('Monitor stopped streaming');
|
||||
socket.emit('end');
|
||||
});
|
||||
interval = setInterval(() => {
|
||||
socket.emit('message', { message: 'Message ' + i });
|
||||
i++;
|
||||
}, 2000);
|
||||
});
|
||||
socket.on('end', function() {
|
||||
// call = null;
|
||||
clearInterval(interval);
|
||||
console.log('Socket stopped subscription');
|
||||
});
|
||||
});
|
||||
|
||||
server.on("error", onError);
|
||||
server.on("listening", onListening);
|
||||
server.listen(common.port);
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
public appConfig: RTLConfiguration;
|
||||
public accessKey = '';
|
||||
public smallScreen = false;
|
||||
unsubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
|
||||
unSubs: Array<Subject<void>> = [new Subject(), new Subject(), new Subject(), new Subject(), new Subject(), new Subject()];
|
||||
|
||||
constructor(private logger: LoggerService, private commonService: CommonService, private store: Store<fromRTLReducer.RTLState>, private actions$: Actions,
|
||||
private userIdle: UserIdleService, private router: Router, private sessionService: SessionService) {}
|
||||
|
|
@ -41,7 +41,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
this.store.dispatch(new RTLActions.FetchRTLConfig());
|
||||
this.accessKey = this.readAccessKey();
|
||||
this.store.select('root')
|
||||
.pipe(takeUntil(this.unsubs[0]))
|
||||
.pipe(takeUntil(this.unSubs[0]))
|
||||
.subscribe(rtlStore => {
|
||||
this.selNode = rtlStore.selNode;
|
||||
this.settings = this.selNode.settings;
|
||||
|
|
@ -61,7 +61,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
this.flgLoading[0] = false;
|
||||
}
|
||||
});
|
||||
this.actions$.pipe(takeUntil(this.unsubs[1]),
|
||||
this.actions$.pipe(takeUntil(this.unSubs[1]),
|
||||
filter((action) => action.type === RTLActions.SET_RTL_CONFIG))
|
||||
.subscribe((action: (RTLActions.SetRTLConfig)) => {
|
||||
if (action.type === RTLActions.SET_RTL_CONFIG) {
|
||||
|
|
@ -79,8 +79,8 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
}
|
||||
});
|
||||
this.userIdle.startWatching();
|
||||
this.userIdle.onTimerStart().pipe(takeUntil(this.unsubs[2])).subscribe(count => {});
|
||||
this.userIdle.onTimeout().pipe(takeUntil(this.unsubs[3])).subscribe(() => {
|
||||
this.userIdle.onTimerStart().pipe(takeUntil(this.unSubs[2])).subscribe(count => {});
|
||||
this.userIdle.onTimeout().pipe(takeUntil(this.unSubs[3])).subscribe(() => {
|
||||
if (this.sessionService.getItem('token')) {
|
||||
this.logger.warn('Time limit exceeded for session inactivity.');
|
||||
this.store.dispatch(new RTLActions.OpenAlert({ width: '55%', data: {
|
||||
|
|
@ -92,7 +92,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
this.userIdle.resetTimer();
|
||||
}
|
||||
});
|
||||
this.commonService.containerWidthChanged.pipe(takeUntil(this.unsubs[4]))
|
||||
this.commonService.containerWidthChanged.pipe(takeUntil(this.unSubs[4]))
|
||||
.subscribe((fieldType: string) => {
|
||||
if(fieldType !== 'menuType') {
|
||||
this.sideNavToggle();
|
||||
|
|
@ -144,7 +144,7 @@ export class AppComponent implements OnInit, AfterViewInit, OnDestroy {
|
|||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.unsubs.forEach(unsub => {
|
||||
this.unSubs.forEach(unsub => {
|
||||
unsub.next();
|
||||
unsub.complete();
|
||||
});
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ import { MatButtonModule } from '@angular/material/button';
|
|||
import { LayoutModule } from '@angular/cdk/layout';
|
||||
import { ChannelLiquidityInfoComponent } from './home/channel-liquidity-info/channel-liquidity-info.component';
|
||||
import { DashboardTransactionsComponent } from './home/dashboard-transactions/dashboard-transactions.component';
|
||||
import { LoopComponent } from './loop/loop.component';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
|
@ -96,7 +97,8 @@ import { DashboardTransactionsComponent } from './home/dashboard-transactions/da
|
|||
ChannelStatusInfoComponent,
|
||||
ChannelCapacityInfoComponent,
|
||||
ChannelLiquidityInfoComponent,
|
||||
DashboardTransactionsComponent
|
||||
DashboardTransactionsComponent,
|
||||
LoopComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: LoggerService, useClass: ConsoleLoggerService },
|
||||
|
|
|
|||
|
|
@ -8,8 +8,8 @@ import { WalletComponent } from './wallet/wallet.component';
|
|||
import { TransactionsComponent } from './transactions/transactions.component';
|
||||
import { LookupsComponent } from './lookups/lookups.component';
|
||||
import { RoutingComponent } from './routing/routing.component';
|
||||
import { RoutingPeersComponent } from './routing/routing-peers/routing-peers.component';
|
||||
import { OnChainComponent } from './on-chain/on-chain.component';
|
||||
import { LoopComponent } from './loop/loop.component';
|
||||
|
||||
import { AuthGuard, LNDUnlockedGuard } from '../shared/services/auth.guard';
|
||||
import { NotFoundComponent } from '../shared/components/not-found/not-found.component';
|
||||
|
|
@ -24,6 +24,7 @@ export const LndRoutes: Routes = [
|
|||
{ path: 'onchain', component: OnChainComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: 'routing', component: RoutingComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: 'lookups', component: LookupsComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: 'loop', component: LoopComponent, canActivate: [LNDUnlockedGuard] },
|
||||
{ path: '**', component: NotFoundComponent }
|
||||
]}
|
||||
];
|
||||
|
|
|
|||
22
src/app/lnd/loop/loop.component.html
Normal file
22
src/app/lnd/loop/loop.component.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<div fxLayout="column">
|
||||
<div fxLayout="row" fxLayoutAlign="start center" class="padding-gap-x page-title-container">
|
||||
<fa-icon [icon]="faCircleNotch" class="page-title-img mr-1"></fa-icon>
|
||||
<span class="page-title">Loop Monitor</span>
|
||||
</div>
|
||||
<div fxLayout="row" fxFlex="100" fxLayoutAlign="start start" class="padding-gap-x">
|
||||
<mat-card fxLayout="row" fxFlex="100" fxLayoutAlign="start start">
|
||||
<mat-card-content fxLayout="column" fxFlex="100" fxLayoutAlign="start start" class="card-content-gap">
|
||||
<div fxFlex="30" fxLayoutAlign="space-between center">
|
||||
<button fxFlex="48" fxLayoutAlign="center center" mat-stroked-button color="primary" tabindex="1" (click)="onStopMonitor()">Stop Monitor</button>
|
||||
<button fxFlex="48" fxLayoutAlign="center center" mat-raised-button color="primary" tabindex="2" (click)="onStartMonitor()">Start Monitor</button>
|
||||
</div>
|
||||
<div fxLayout="column" fxLayoutAlign="center start" class="mt-2">
|
||||
<span fxFlex="100" fxLayoutAlign="center center" *ngFor="let log of loopMonitorLogs" class="loop-monitor-logs">
|
||||
<mat-divider class="w-100 mt-2"></mat-divider>
|
||||
<h5>{{log | json}}</h5>
|
||||
</span>
|
||||
</div>
|
||||
</mat-card-content>
|
||||
</mat-card>
|
||||
</div>
|
||||
</div>
|
||||
3
src/app/lnd/loop/loop.component.scss
Normal file
3
src/app/lnd/loop/loop.component.scss
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
.loop-monitor-logs {
|
||||
min-height: 4rem;
|
||||
}
|
||||
25
src/app/lnd/loop/loop.component.spec.ts
Normal file
25
src/app/lnd/loop/loop.component.spec.ts
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import { LoopComponent } from './loop.component';
|
||||
|
||||
describe('LoopComponent', () => {
|
||||
let component: LoopComponent;
|
||||
let fixture: ComponentFixture<LoopComponent>;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
declarations: [ LoopComponent ]
|
||||
})
|
||||
.compileComponents();
|
||||
}));
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(LoopComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('should create', () => {
|
||||
expect(component).toBeTruthy();
|
||||
});
|
||||
});
|
||||
36
src/app/lnd/loop/loop.component.ts
Normal file
36
src/app/lnd/loop/loop.component.ts
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
import { Component, OnInit, OnDestroy } from '@angular/core';
|
||||
import { Subscription } from 'rxjs';
|
||||
import { faCircleNotch } from '@fortawesome/free-solid-svg-icons';
|
||||
|
||||
import { SocketService } from '../../shared/services/socket.service';
|
||||
|
||||
@Component({
|
||||
selector: 'rtl-loop',
|
||||
templateUrl: './loop.component.html',
|
||||
styleUrls: ['./loop.component.scss']
|
||||
})
|
||||
export class LoopComponent implements OnInit, OnDestroy {
|
||||
faCircleNotch = faCircleNotch;
|
||||
loopMonitorLogs = [];
|
||||
sub: Subscription;
|
||||
|
||||
constructor(private socketService: SocketService) { }
|
||||
|
||||
ngOnInit() {}
|
||||
|
||||
onStartMonitor() {
|
||||
this.sub = this.socketService.startLoopMonitor().subscribe(log => {
|
||||
this.loopMonitorLogs.push(log);
|
||||
console.warn(log);
|
||||
});
|
||||
}
|
||||
|
||||
onStopMonitor() {
|
||||
this.socketService.stopLoopMonitor();
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
|
||||
ngOnDestroy() {
|
||||
this.sub.unsubscribe();
|
||||
}
|
||||
}
|
||||
34
src/app/shared/services/socket.service.ts
Normal file
34
src/app/shared/services/socket.service.ts
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
import { Injectable } from '@angular/core';
|
||||
import { Observable, Observer } from 'rxjs';
|
||||
import { map, catchError } from 'rxjs/operators';
|
||||
import * as socketIo from 'socket.io-client';
|
||||
|
||||
export interface Socket {
|
||||
on(event: string, callback: (data: any) => void);
|
||||
emit(event: string, data: any);
|
||||
}
|
||||
|
||||
@Injectable()
|
||||
export class SocketService {
|
||||
socket: Socket;
|
||||
loopMonitor: any;
|
||||
observer: Observer<any>;
|
||||
|
||||
startLoopMonitor(): Observable<any> {
|
||||
// this.loopMonitor = socketIo('http://localhost:3000/loopMonitor');
|
||||
this.loopMonitor = socketIo('/loopMonitor');
|
||||
this.loopMonitor.emit('start');
|
||||
this.loopMonitor.on('message', (res) => { this.observer.next(res.message); });
|
||||
return this.createObservable();
|
||||
}
|
||||
|
||||
createObservable(): Observable<any> {
|
||||
return new Observable<any>(observer => { this.observer = observer; });
|
||||
}
|
||||
|
||||
stopLoopMonitor() {
|
||||
this.loopMonitor.emit('end');
|
||||
this.loopMonitor = null;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
@ -43,9 +43,10 @@ import { CurrencyUnitConverterComponent } from './components/currency-unit-conve
|
|||
import { ClipboardDirective } from './directive/clipboard.directive';
|
||||
import { AutoFocusDirective } from './directive/auto-focus.directive';
|
||||
import { RemoveLeadingZerosPipe } from './pipes/app.pipe';
|
||||
import { CommonService } from './services/common.service';
|
||||
import { OpenChannelComponent } from './components/data-modal/open-channel/open-channel.component';
|
||||
import { ShowPubkeyComponent } from './components/data-modal/show-pubkey/show-pubkey.component';
|
||||
import { CommonService } from './services/common.service';
|
||||
import { SocketService } from './services/socket.service';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
|
|
@ -184,7 +185,7 @@ import { ShowPubkeyComponent } from './components/data-modal/show-pubkey/show-pu
|
|||
{ provide: PERFECT_SCROLLBAR_CONFIG, useValue: DEFAULT_PERFECT_SCROLLBAR_CONFIG },
|
||||
{ provide: MAT_DIALOG_DEFAULT_OPTIONS, useValue: { hasBackdrop: true, autoFocus: true, disableClose: true, role: 'dialog', width: '700px' } },
|
||||
{ provide: MAT_SNACK_BAR_DEFAULT_OPTIONS, useValue: { duration: 2000, verticalPosition: 'bottom', panelClass: 'rtl-snack-bar' } },
|
||||
CommonService, DecimalPipe
|
||||
CommonService, DecimalPipe, SocketService
|
||||
]
|
||||
})
|
||||
export class SharedModule { }
|
||||
|
|
|
|||
|
|
@ -429,6 +429,10 @@ body {
|
|||
padding-top: 2rem !important;
|
||||
}
|
||||
|
||||
.pt-3 {
|
||||
padding-top: 3rem !important;
|
||||
}
|
||||
|
||||
.pb-2 {
|
||||
padding-bottom: 2rem !important;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue