@wildcatfi/wildcat-sdk 3.0.25 → 3.0.26

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,6 @@
1
+ import { ApolloClient, NormalizedCacheObject } from "@apollo/client";
2
+ export declare function getBasicBorrowerData(subgraphClient: ApolloClient<NormalizedCacheObject>, borrower: string): Promise<{
3
+ isRegisteredBorrower: boolean;
4
+ hasMarkets: boolean;
5
+ }>;
6
+ //# sourceMappingURL=getBasicBorrowerData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBasicBorrowerData.d.ts","sourceRoot":"","sources":["../../src/gql/getBasicBorrowerData.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AAGrE,wBAAsB,oBAAoB,CACxC,cAAc,EAAE,YAAY,CAAC,qBAAqB,CAAC,EACnD,QAAQ,EAAE,MAAM,GACf,OAAO,CAAC;IAAE,oBAAoB,EAAE,OAAO,CAAC;IAAC,UAAU,EAAE,OAAO,CAAA;CAAE,CAAC,CASjE"}
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.getBasicBorrowerData = void 0;
4
+ const graphql_1 = require("./graphql");
5
+ async function getBasicBorrowerData(subgraphClient, borrower) {
6
+ const { data } = await subgraphClient.query({
7
+ query: graphql_1.GetBasicBorrowerDataDocument,
8
+ variables: { borrower }
9
+ });
10
+ return {
11
+ isRegisteredBorrower: data.registeredBorrowers[0]?.isRegistered ?? false,
12
+ hasMarkets: data.markets[0]?.id !== null
13
+ };
14
+ }
15
+ exports.getBasicBorrowerData = getBasicBorrowerData;
16
+ //# sourceMappingURL=getBasicBorrowerData.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getBasicBorrowerData.js","sourceRoot":"","sources":["../../src/gql/getBasicBorrowerData.ts"],"names":[],"mappings":";;;AACA,uCAAyD;AAElD,KAAK,UAAU,oBAAoB,CACxC,cAAmD,EACnD,QAAgB;IAEhB,MAAM,EAAE,IAAI,EAAE,GAAG,MAAM,cAAc,CAAC,KAAK,CAAC;QAC1C,KAAK,EAAE,sCAA4B;QACnC,SAAS,EAAE,EAAE,QAAQ,EAAE;KACxB,CAAC,CAAC;IACH,OAAO;QACL,oBAAoB,EAAE,IAAI,CAAC,mBAAmB,CAAC,CAAC,CAAC,EAAE,YAAY,IAAI,KAAK;QACxE,UAAU,EAAE,IAAI,CAAC,OAAO,CAAC,CAAC,CAAC,EAAE,EAAE,KAAK,IAAI;KACzC,CAAC;AACJ,CAAC;AAZD,oDAYC"}
@@ -13270,6 +13270,20 @@ export type SubgraphGetLenderAccountWithMarketQuery = {
13270
13270
  deployedEvent: SubgraphMarketDeployedEventFragment;
13271
13271
  } | null;
13272
13272
  };
13273
+ export type SubgraphGetBasicBorrowerDataQueryVariables = Exact<{
13274
+ borrower: Scalars["Bytes"]["input"];
13275
+ }>;
13276
+ export type SubgraphGetBasicBorrowerDataQuery = {
13277
+ __typename: "Query";
13278
+ registeredBorrowers: Array<{
13279
+ __typename: "RegisteredBorrower";
13280
+ isRegistered: boolean;
13281
+ }>;
13282
+ markets: Array<{
13283
+ __typename: "Market";
13284
+ id: string;
13285
+ }>;
13286
+ };
13273
13287
  export type SubgraphGetAllMarketsForLenderViewQueryVariables = Exact<{
13274
13288
  lender?: InputMaybe<Scalars["Bytes"]["input"]>;
13275
13289
  marketFilter?: InputMaybe<SubgraphMarket_Filter>;
@@ -14037,6 +14051,8 @@ export declare const GetLenderAccountForMarketDocument: Apollo.DocumentNode;
14037
14051
  export type GetLenderAccountForMarketQueryResult = Apollo.QueryResult<SubgraphGetLenderAccountForMarketQuery, SubgraphGetLenderAccountForMarketQueryVariables>;
14038
14052
  export declare const GetLenderAccountWithMarketDocument: Apollo.DocumentNode;
14039
14053
  export type GetLenderAccountWithMarketQueryResult = Apollo.QueryResult<SubgraphGetLenderAccountWithMarketQuery, SubgraphGetLenderAccountWithMarketQueryVariables>;
14054
+ export declare const GetBasicBorrowerDataDocument: Apollo.DocumentNode;
14055
+ export type GetBasicBorrowerDataQueryResult = Apollo.QueryResult<SubgraphGetBasicBorrowerDataQuery, SubgraphGetBasicBorrowerDataQueryVariables>;
14040
14056
  export declare const GetAllMarketsForLenderViewDocument: Apollo.DocumentNode;
14041
14057
  export type GetAllMarketsForLenderViewQueryResult = Apollo.QueryResult<SubgraphGetAllMarketsForLenderViewQuery, SubgraphGetAllMarketsForLenderViewQueryVariables>;
14042
14058
  export declare const GetAccountsWhereLenderAuthorizedOrActiveDocument: Apollo.DocumentNode;