File tree Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Expand file tree Collapse file tree 3 files changed +18
-0
lines changed Original file line number Diff line number Diff line change 11import * as ACCOUNT from 'types/generated/lit-accounts_pb' ;
22import * as SESSION from 'types/generated/lit-sessions_pb' ;
33import * as STATUS from 'types/generated/lit-status_pb' ;
4+ import * as PROXY from 'types/generated/proxy_pb' ;
45import { Accounts } from 'types/generated/lit-accounts_pb_service' ;
56import { Sessions } from 'types/generated/lit-sessions_pb_service' ;
67import { Status } from 'types/generated/lit-status_pb_service' ;
8+ import { Proxy } from 'types/generated/proxy_pb_service' ;
79import { b64 } from 'util/strings' ;
810import { MAX_DATE } from 'util/constants' ;
911import BaseApi from './base' ;
@@ -21,6 +23,12 @@ class LitApi extends BaseApi<LitEvents> {
2123 this . _grpc = grpc ;
2224 }
2325
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+
2432 /**
2533 * call the Lit `CreateAccount` RPC and return the response
2634 */
Original file line number Diff line number Diff line change @@ -24,6 +24,15 @@ class LoopApi extends BaseApi<LoopEvents> {
2424 this . _grpc = grpc ;
2525 }
2626
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+
2736 /**
2837 * call the Loop `ListSwaps` RPC and return the response
2938 */
Original file line number Diff line number Diff line change @@ -12,6 +12,7 @@ module.exports = function (app) {
1212 '/litrpc.Session' ,
1313 '/litrpc.Accounts' ,
1414 '/litrpc.Status' ,
15+ '/litrpc.Proxy' ,
1516 ] ,
1617 {
1718 target : 'https://localhost:8443' ,
You can’t perform that action at this time.
0 commit comments