@gvnrdao/dh-sdk 0.0.209 → 0.0.210
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.
- package/dist/index.js +1984 -387
- package/dist/index.mjs +1984 -387
- package/dist/modules/bitcoin/bitcoin-operations.module.d.ts +2 -2
- package/dist/modules/diamond-hands-sdk.d.ts +10 -10
- package/dist/modules/loan/loan-query.module.d.ts +1 -1
- package/dist/modules/pkp/pkp-manager.module.d.ts +1 -1
- package/package.json +4 -3
|
@@ -184,11 +184,11 @@ export declare class BitcoinOperations {
|
|
|
184
184
|
/**
|
|
185
185
|
* Get balance cache statistics
|
|
186
186
|
*/
|
|
187
|
-
getBalanceCacheStats(): import("
|
|
187
|
+
getBalanceCacheStats(): import("../cache/cache-manager.module").CacheStats | null;
|
|
188
188
|
/**
|
|
189
189
|
* Get address cache statistics
|
|
190
190
|
*/
|
|
191
|
-
getAddressCacheStats(): import("
|
|
191
|
+
getAddressCacheStats(): import("../cache/cache-manager.module").CacheStats | null;
|
|
192
192
|
/**
|
|
193
193
|
* Get current network configuration
|
|
194
194
|
*/
|
|
@@ -428,7 +428,7 @@ export declare class DiamondHandsSDK {
|
|
|
428
428
|
getLoansByBorrower(borrower: string, pagination?: {
|
|
429
429
|
page: number;
|
|
430
430
|
pageSize: number;
|
|
431
|
-
}): Promise<Result<import("
|
|
431
|
+
}): Promise<Result<import("../interfaces/chunks/loan-operations.i").PaginatedLoansResponse, SDKError>>;
|
|
432
432
|
/**
|
|
433
433
|
* Get all active loans
|
|
434
434
|
*
|
|
@@ -438,7 +438,7 @@ export declare class DiamondHandsSDK {
|
|
|
438
438
|
getActiveLoans(pagination?: {
|
|
439
439
|
page: number;
|
|
440
440
|
pageSize: number;
|
|
441
|
-
}): Promise<Result<import("
|
|
441
|
+
}): Promise<Result<import("../interfaces/chunks/loan-operations.i").PaginatedLoansResponse, SDKError>>;
|
|
442
442
|
/**
|
|
443
443
|
* Get loans by state/status
|
|
444
444
|
*
|
|
@@ -449,7 +449,7 @@ export declare class DiamondHandsSDK {
|
|
|
449
449
|
getLoansByState(state: string, pagination?: {
|
|
450
450
|
page: number;
|
|
451
451
|
pageSize: number;
|
|
452
|
-
}): Promise<Result<import("
|
|
452
|
+
}): Promise<Result<import("../interfaces/chunks/loan-operations.i").PaginatedLoansResponse, SDKError>>;
|
|
453
453
|
/**
|
|
454
454
|
* Get all loans with pagination
|
|
455
455
|
*
|
|
@@ -463,11 +463,11 @@ export declare class DiamondHandsSDK {
|
|
|
463
463
|
maxRows?: number;
|
|
464
464
|
orderBy?: "createdAt" | "lastUpdatedAt" | "ucdDebt";
|
|
465
465
|
orderDirection?: "asc" | "desc";
|
|
466
|
-
}, source?: "subgraph" | "contract"): Promise<Result<import("
|
|
466
|
+
}, source?: "subgraph" | "contract"): Promise<Result<import("../interfaces/chunks/loan-operations.i").PaginatedLoansResponse, SDKError>>;
|
|
467
467
|
/**
|
|
468
468
|
* Get all events for a loan position from the subgraph
|
|
469
469
|
*/
|
|
470
|
-
getLoanEvents(positionId: string, filter?: import("../types/event-types").LoanEventsFilter): Promise<Result<import("
|
|
470
|
+
getLoanEvents(positionId: string, filter?: import("../types/event-types").LoanEventsFilter): Promise<Result<import("../types/event-types").LoanEvents, SDKError>>;
|
|
471
471
|
/**
|
|
472
472
|
* Wait for the subgraph to index up to (and including) the given block number.
|
|
473
473
|
* Call after on-chain actions (createLoan, mintUCD, etc.) before querying the subgraph.
|
|
@@ -482,7 +482,7 @@ export declare class DiamondHandsSDK {
|
|
|
482
482
|
* @param address - Bitcoin address
|
|
483
483
|
* @returns Balance in satoshis
|
|
484
484
|
*/
|
|
485
|
-
getBitcoinBalance(address: string): Promise<Result<import("
|
|
485
|
+
getBitcoinBalance(address: string): Promise<Result<import("./bitcoin/bitcoin-operations.module").EnrichedBitcoinBalance, SDKError>>;
|
|
486
486
|
/**
|
|
487
487
|
* Get the current Bitcoin price
|
|
488
488
|
*
|
|
@@ -502,7 +502,7 @@ export declare class DiamondHandsSDK {
|
|
|
502
502
|
* @param publicKey - PKP public key
|
|
503
503
|
* @returns Bitcoin addresses for all networks
|
|
504
504
|
*/
|
|
505
|
-
deriveBitcoinAddresses(publicKey: string): Promise<Result<import("
|
|
505
|
+
deriveBitcoinAddresses(publicKey: string): Promise<Result<import("../interfaces/chunks/loan-operations.i").BitcoinAddresses, SDKError>>;
|
|
506
506
|
/**
|
|
507
507
|
* Get PKP data by token ID
|
|
508
508
|
*
|
|
@@ -543,7 +543,7 @@ export declare class DiamondHandsSDK {
|
|
|
543
543
|
* @param recipient - Recipient address
|
|
544
544
|
* @returns Transaction result
|
|
545
545
|
*/
|
|
546
|
-
mintMockBTC(amount: Satoshis, recipient: string): Promise<Result<import("
|
|
546
|
+
mintMockBTC(amount: Satoshis, recipient: string): Promise<Result<import("./mock/mock-token-manager.module").MockTokenTransactionResult, SDKError>>;
|
|
547
547
|
/**
|
|
548
548
|
* Approve mock BTC spending (test networks only)
|
|
549
549
|
*
|
|
@@ -551,7 +551,7 @@ export declare class DiamondHandsSDK {
|
|
|
551
551
|
* @param amount - Amount in satoshis
|
|
552
552
|
* @returns Transaction result
|
|
553
553
|
*/
|
|
554
|
-
approveMockBTC(spender: string, amount: Satoshis): Promise<Result<import("
|
|
554
|
+
approveMockBTC(spender: string, amount: Satoshis): Promise<Result<import("./mock/mock-token-manager.module").MockTokenTransactionResult, SDKError>>;
|
|
555
555
|
/**
|
|
556
556
|
* Get SDK configuration
|
|
557
557
|
*/
|
|
@@ -563,7 +563,7 @@ export declare class DiamondHandsSDK {
|
|
|
563
563
|
/**
|
|
564
564
|
* Get cache statistics
|
|
565
565
|
*/
|
|
566
|
-
getCacheStats(): Record<string, import("
|
|
566
|
+
getCacheStats(): Record<string, import("./cache/cache-manager.module").CacheStats>;
|
|
567
567
|
/**
|
|
568
568
|
* Get contract manager (for advanced usage)
|
|
569
569
|
*/
|
|
@@ -196,7 +196,7 @@ export declare class LoanQuery {
|
|
|
196
196
|
/**
|
|
197
197
|
* Get cache statistics
|
|
198
198
|
*/
|
|
199
|
-
getCacheStats(): import("
|
|
199
|
+
getCacheStats(): import("../cache/cache-manager.module").CacheStats | null;
|
|
200
200
|
}
|
|
201
201
|
/**
|
|
202
202
|
* Factory function to create a LoanQuery instance
|
|
@@ -124,7 +124,7 @@ export declare class PKPManager {
|
|
|
124
124
|
/**
|
|
125
125
|
* Get cache statistics
|
|
126
126
|
*/
|
|
127
|
-
getCacheStats(): import("
|
|
127
|
+
getCacheStats(): import("../cache/cache-manager.module").CacheStats | null;
|
|
128
128
|
}
|
|
129
129
|
/**
|
|
130
130
|
* Factory function to create a PKPManager instance
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@gvnrdao/dh-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.210",
|
|
4
4
|
"description": "TypeScript SDK for Diamond Hands Protocol - Bitcoin-backed lending with LIT Protocol PKPs",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"types": "dist/sdk/src/index.d.ts",
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/sdk/src/index.d.ts",
|
|
11
|
+
"browser": "./dist/index.mjs",
|
|
11
12
|
"import": "./dist/index.mjs",
|
|
12
13
|
"require": "./dist/index.js"
|
|
13
14
|
},
|
|
@@ -69,8 +70,8 @@
|
|
|
69
70
|
},
|
|
70
71
|
"sideEffects": false,
|
|
71
72
|
"dependencies": {
|
|
72
|
-
"@gvnrdao/dh-lit-actions": "0.0.281",
|
|
73
|
-
"@gvnrdao/dh-lit-ops": "0.0.253",
|
|
73
|
+
"@gvnrdao/dh-lit-actions": "^0.0.281",
|
|
74
|
+
"@gvnrdao/dh-lit-ops": "^0.0.253",
|
|
74
75
|
"@noble/hashes": "^1.5.0",
|
|
75
76
|
"axios": "^1.15.2",
|
|
76
77
|
"bech32": "^2.0.0",
|