File tree 3 files changed +18
-0
lines changed
3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 1
1
import * as ACCOUNT from 'types/generated/lit-accounts_pb' ;
2
2
import * as SESSION from 'types/generated/lit-sessions_pb' ;
3
3
import * as STATUS from 'types/generated/lit-status_pb' ;
4
+ import * as PROXY from 'types/generated/proxy_pb' ;
4
5
import { Accounts } from 'types/generated/lit-accounts_pb_service' ;
5
6
import { Sessions } from 'types/generated/lit-sessions_pb_service' ;
6
7
import { Status } from 'types/generated/lit-status_pb_service' ;
8
+ import { Proxy } from 'types/generated/proxy_pb_service' ;
7
9
import { b64 } from 'util/strings' ;
8
10
import { MAX_DATE } from 'util/constants' ;
9
11
import BaseApi from './base' ;
@@ -21,6 +23,12 @@ class LitApi extends BaseApi<LitEvents> {
21
23
this . _grpc = grpc ;
22
24
}
23
25
26
+ async getInfo ( ) : Promise < PROXY . GetInfoResponse . AsObject > {
27
+ const req = new PROXY . GetInfoRequest ( ) ;
28
+ const res = await this . _grpc . request ( Proxy . GetInfo , req , this . _meta ) ;
29
+ return res . toObject ( ) ;
30
+ }
31
+
24
32
/**
25
33
* call the Lit `CreateAccount` RPC and return the response
26
34
*/
Original file line number Diff line number Diff line change @@ -24,6 +24,15 @@ class LoopApi extends BaseApi<LoopEvents> {
24
24
this . _grpc = grpc ;
25
25
}
26
26
27
+ /**
28
+ * call the Loop `GetInfo` RPC and return the response
29
+ */
30
+ async getInfo ( ) : Promise < LOOP . GetInfoResponse . AsObject > {
31
+ const req = new LOOP . GetInfoRequest ( ) ;
32
+ const res = await this . _grpc . request ( SwapClient . GetInfo , req , this . _meta ) ;
33
+ return res . toObject ( ) ;
34
+ }
35
+
27
36
/**
28
37
* call the Loop `ListSwaps` RPC and return the response
29
38
*/
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ module.exports = function (app) {
12
12
'/litrpc.Session' ,
13
13
'/litrpc.Accounts' ,
14
14
'/litrpc.Status' ,
15
+ '/litrpc.Proxy' ,
15
16
] ,
16
17
{
17
18
target : 'https://localhost:8443' ,
You can’t perform that action at this time.
0 commit comments