@lavarage/sdk 7.0.0 → 7.0.1
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.d.mts +5 -2
- package/dist/index.d.ts +5 -2
- package/dist/index.js +9 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +9 -0
- package/dist/index.mjs.map +1 -1
- package/lending.ts +10 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -3383,17 +3383,20 @@ declare function addToWithdrawalAccessList(lavarageProgram: Program<Lavarage$1>
|
|
|
3383
3383
|
computeBudgetMicroLamports?: number;
|
|
3384
3384
|
}): Promise<VersionedTransaction>;
|
|
3385
3385
|
declare function removeFromWithdrawalAccessList(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
|
|
3386
|
-
withdrawalAccessList: PublicKey;
|
|
3387
3386
|
authority: PublicKey;
|
|
3388
3387
|
nodeWallet: string;
|
|
3389
3388
|
computeBudgetMicroLamports?: number;
|
|
3390
3389
|
}): Promise<VersionedTransaction>;
|
|
3390
|
+
declare function getWithdrawalAccessList(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
|
|
3391
|
+
nodeWallet: string;
|
|
3392
|
+
}): Promise<PublicKey | undefined>;
|
|
3391
3393
|
|
|
3392
3394
|
declare const lending_addToWithdrawalAccessList: typeof addToWithdrawalAccessList;
|
|
3393
3395
|
declare const lending_createOffer: typeof createOffer;
|
|
3394
3396
|
declare const lending_depositFunds: typeof depositFunds;
|
|
3395
3397
|
declare const lending_getNodeWalletPDA: typeof getNodeWalletPDA;
|
|
3396
3398
|
declare const lending_getTradingPoolPDA: typeof getTradingPoolPDA;
|
|
3399
|
+
declare const lending_getWithdrawalAccessList: typeof getWithdrawalAccessList;
|
|
3397
3400
|
declare const lending_getWithdrawalAccessListPDA: typeof getWithdrawalAccessListPDA;
|
|
3398
3401
|
declare const lending_removeFromWithdrawalAccessList: typeof removeFromWithdrawalAccessList;
|
|
3399
3402
|
declare const lending_updateInterestRate: typeof updateInterestRate;
|
|
@@ -3404,7 +3407,7 @@ declare const lending_withdrawFunds: typeof withdrawFunds;
|
|
|
3404
3407
|
declare const lending_withdrawFundsV1: typeof withdrawFundsV1;
|
|
3405
3408
|
declare const lending_withdrawFundsV2: typeof withdrawFundsV2;
|
|
3406
3409
|
declare namespace lending {
|
|
3407
|
-
export { lending_addToWithdrawalAccessList as addToWithdrawalAccessList, lending_createOffer as createOffer, lending_depositFunds as depositFunds, lending_getNodeWalletPDA as getNodeWalletPDA, lending_getTradingPoolPDA as getTradingPoolPDA, lending_getWithdrawalAccessListPDA as getWithdrawalAccessListPDA, lending_removeFromWithdrawalAccessList as removeFromWithdrawalAccessList, lending_updateInterestRate as updateInterestRate, lending_updateMaxBorrow as updateMaxBorrow, lending_updateMaxExposure as updateMaxExposure, lending_updateOffer as updateOffer, lending_withdrawFunds as withdrawFunds, lending_withdrawFundsV1 as withdrawFundsV1, lending_withdrawFundsV2 as withdrawFundsV2 };
|
|
3410
|
+
export { lending_addToWithdrawalAccessList as addToWithdrawalAccessList, lending_createOffer as createOffer, lending_depositFunds as depositFunds, lending_getNodeWalletPDA as getNodeWalletPDA, lending_getTradingPoolPDA as getTradingPoolPDA, lending_getWithdrawalAccessList as getWithdrawalAccessList, lending_getWithdrawalAccessListPDA as getWithdrawalAccessListPDA, lending_removeFromWithdrawalAccessList as removeFromWithdrawalAccessList, lending_updateInterestRate as updateInterestRate, lending_updateMaxBorrow as updateMaxBorrow, lending_updateMaxExposure as updateMaxExposure, lending_updateOffer as updateOffer, lending_withdrawFunds as withdrawFunds, lending_withdrawFundsV1 as withdrawFundsV1, lending_withdrawFundsV2 as withdrawFundsV2 };
|
|
3408
3411
|
}
|
|
3409
3412
|
|
|
3410
3413
|
declare function getPda(seed: Buffer | Buffer[], programId: PublicKey): PublicKey;
|
package/dist/index.d.ts
CHANGED
|
@@ -3383,17 +3383,20 @@ declare function addToWithdrawalAccessList(lavarageProgram: Program<Lavarage$1>
|
|
|
3383
3383
|
computeBudgetMicroLamports?: number;
|
|
3384
3384
|
}): Promise<VersionedTransaction>;
|
|
3385
3385
|
declare function removeFromWithdrawalAccessList(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
|
|
3386
|
-
withdrawalAccessList: PublicKey;
|
|
3387
3386
|
authority: PublicKey;
|
|
3388
3387
|
nodeWallet: string;
|
|
3389
3388
|
computeBudgetMicroLamports?: number;
|
|
3390
3389
|
}): Promise<VersionedTransaction>;
|
|
3390
|
+
declare function getWithdrawalAccessList(lavarageProgram: Program<Lavarage$1> | Program<Lavarage>, params: {
|
|
3391
|
+
nodeWallet: string;
|
|
3392
|
+
}): Promise<PublicKey | undefined>;
|
|
3391
3393
|
|
|
3392
3394
|
declare const lending_addToWithdrawalAccessList: typeof addToWithdrawalAccessList;
|
|
3393
3395
|
declare const lending_createOffer: typeof createOffer;
|
|
3394
3396
|
declare const lending_depositFunds: typeof depositFunds;
|
|
3395
3397
|
declare const lending_getNodeWalletPDA: typeof getNodeWalletPDA;
|
|
3396
3398
|
declare const lending_getTradingPoolPDA: typeof getTradingPoolPDA;
|
|
3399
|
+
declare const lending_getWithdrawalAccessList: typeof getWithdrawalAccessList;
|
|
3397
3400
|
declare const lending_getWithdrawalAccessListPDA: typeof getWithdrawalAccessListPDA;
|
|
3398
3401
|
declare const lending_removeFromWithdrawalAccessList: typeof removeFromWithdrawalAccessList;
|
|
3399
3402
|
declare const lending_updateInterestRate: typeof updateInterestRate;
|
|
@@ -3404,7 +3407,7 @@ declare const lending_withdrawFunds: typeof withdrawFunds;
|
|
|
3404
3407
|
declare const lending_withdrawFundsV1: typeof withdrawFundsV1;
|
|
3405
3408
|
declare const lending_withdrawFundsV2: typeof withdrawFundsV2;
|
|
3406
3409
|
declare namespace lending {
|
|
3407
|
-
export { lending_addToWithdrawalAccessList as addToWithdrawalAccessList, lending_createOffer as createOffer, lending_depositFunds as depositFunds, lending_getNodeWalletPDA as getNodeWalletPDA, lending_getTradingPoolPDA as getTradingPoolPDA, lending_getWithdrawalAccessListPDA as getWithdrawalAccessListPDA, lending_removeFromWithdrawalAccessList as removeFromWithdrawalAccessList, lending_updateInterestRate as updateInterestRate, lending_updateMaxBorrow as updateMaxBorrow, lending_updateMaxExposure as updateMaxExposure, lending_updateOffer as updateOffer, lending_withdrawFunds as withdrawFunds, lending_withdrawFundsV1 as withdrawFundsV1, lending_withdrawFundsV2 as withdrawFundsV2 };
|
|
3410
|
+
export { lending_addToWithdrawalAccessList as addToWithdrawalAccessList, lending_createOffer as createOffer, lending_depositFunds as depositFunds, lending_getNodeWalletPDA as getNodeWalletPDA, lending_getTradingPoolPDA as getTradingPoolPDA, lending_getWithdrawalAccessList as getWithdrawalAccessList, lending_getWithdrawalAccessListPDA as getWithdrawalAccessListPDA, lending_removeFromWithdrawalAccessList as removeFromWithdrawalAccessList, lending_updateInterestRate as updateInterestRate, lending_updateMaxBorrow as updateMaxBorrow, lending_updateMaxExposure as updateMaxExposure, lending_updateOffer as updateOffer, lending_withdrawFunds as withdrawFunds, lending_withdrawFundsV1 as withdrawFundsV1, lending_withdrawFundsV2 as withdrawFundsV2 };
|
|
3408
3411
|
}
|
|
3409
3412
|
|
|
3410
3413
|
declare function getPda(seed: Buffer | Buffer[], programId: PublicKey): PublicKey;
|
package/dist/index.js
CHANGED
|
@@ -1106,6 +1106,7 @@ __export(lending_exports, {
|
|
|
1106
1106
|
depositFunds: () => depositFunds,
|
|
1107
1107
|
getNodeWalletPDA: () => getNodeWalletPDA,
|
|
1108
1108
|
getTradingPoolPDA: () => getTradingPoolPDA,
|
|
1109
|
+
getWithdrawalAccessList: () => getWithdrawalAccessList,
|
|
1109
1110
|
getWithdrawalAccessListPDA: () => getWithdrawalAccessListPDA,
|
|
1110
1111
|
removeFromWithdrawalAccessList: () => removeFromWithdrawalAccessList,
|
|
1111
1112
|
updateInterestRate: () => updateInterestRate,
|
|
@@ -1535,6 +1536,14 @@ function removeFromWithdrawalAccessList(lavarageProgram, params) {
|
|
|
1535
1536
|
return new import_web3.VersionedTransaction(messageV0);
|
|
1536
1537
|
});
|
|
1537
1538
|
}
|
|
1539
|
+
function getWithdrawalAccessList(lavarageProgram, params) {
|
|
1540
|
+
return __async(this, null, function* () {
|
|
1541
|
+
var _a;
|
|
1542
|
+
const withdrawalAccessList = getWithdrawalAccessListPDA(lavarageProgram.programId);
|
|
1543
|
+
const withdrawalAccessListAccount = yield lavarageProgram.account.withdrawalAccessList.fetch(withdrawalAccessList);
|
|
1544
|
+
return (_a = withdrawalAccessListAccount.accessEntries.find((entry) => entry.fromPubkey.toString() === params.nodeWallet)) == null ? void 0 : _a.toPubkey;
|
|
1545
|
+
});
|
|
1546
|
+
}
|
|
1538
1547
|
|
|
1539
1548
|
// idl/lavarage.ts
|
|
1540
1549
|
var IDL = {
|