@gvnrdao/dh-sdk 0.0.338 → 0.0.340

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.
@@ -3,6 +3,7 @@ import type { LoanData } from "../interfaces";
3
3
  import type { GraphPositionWithBorrowerDTO } from "../types/graph-dtos";
4
4
  import type { LoanEvents, LoanEventsFilter } from "../types/event-types";
5
5
  import type { BitcoinOperations, EnrichedBitcoinBalance } from "../modules/bitcoin/bitcoin-operations.module";
6
+ import { type BorrowerDebtRow } from "../utils/borrower-ucd-debt-summary";
6
7
  export interface DiamondHandsGraphConfig {
7
8
  endpoint: string;
8
9
  requestTimeoutMs?: number;
@@ -321,6 +322,19 @@ export declare class DiamondHandsGraph {
321
322
  * Get user positions from subgraph
322
323
  */
323
324
  private getUserPositionsOnly;
325
+ /**
326
+ * Raw `{ id, status, ucdDebt }` for EVERY position of a borrower: one round trip per
327
+ * 1000 positions, no count walk, no vault RPCs, and no `LoanData` transform (which
328
+ * coerces wei to a float and leaves `status` a string cast to the numeric enum).
329
+ *
330
+ * Deliberately issues the `GetUserPositions` document rather than a leaner one: the
331
+ * lit-ops graph proxy only passes allowlisted documents (graph-document-policy.ts),
332
+ * and that one is already listed, so this needs no server change. The extra fields
333
+ * cost bytes, not round trips.
334
+ *
335
+ * Throws past `BORROWER_DEBT_ROWS_MAX_PAGES` — never a partial set.
336
+ */
337
+ getBorrowerDebtRows(borrower: string): Promise<BorrowerDebtRow[]>;
324
338
  /**
325
339
  * Get user positions, plus an accurate total count.
326
340
  *
package/dist/index.d.ts CHANGED
@@ -41,7 +41,7 @@ export type { DhServerLoginMessage, DhServerLoginPayload, } from './utils/eip712
41
41
  export { DEFAULT_LIT_NETWORK, VALID_LIT_NETWORKS, SDK_DEFAULTS, } from './constants/chunks/sdk-config';
42
42
  export { ALL_CONTRACTS, ALL_DEPLOYMENTS, getContractsByNetwork, getDeploymentByNetwork, LOCALHOST_CONTRACTS, SEPOLIA_CONTRACTS, } from './constants/chunks/deployment-addresses';
43
43
  export type { DeploymentContracts, DeploymentData, DeploymentLatestEnv, } from './constants/chunks/deployment-addresses';
44
- export type { CreateLoanRequest, CreateLoanResult, LoanData, LoanDataDetail, PaginatedLoansResponse, PKPValidationData, BitcoinAddresses, } from './interfaces/chunks/loan-operations.i';
44
+ export type { CreateLoanRequest, CreateLoanResult, LoanData, LoanDataDetail, PaginatedLoansResponse, BorrowerUcdDebtSummary, BorrowerUcdDebtStatusCount, PKPValidationData, BitcoinAddresses, } from './interfaces/chunks/loan-operations.i';
45
45
  export type { DiamondHandsSDKConfig, SDKMode, ContractAddresses, BitcoinProviderConfig, } from './interfaces/chunks/config.i';
46
46
  export type { PKPData, PKPCreationRequest, PKPCreationResult, PKPValidationResult, } from './interfaces/chunks/pkp-integration.i';
47
47
  export type { AuthorizationRequest, AuthorizationResult, BTCDepositRequest, BTCDepositResult, } from './interfaces/chunks/requests.i';