@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.mjs CHANGED
@@ -1061,6 +1061,7 @@ __export(lending_exports, {
1061
1061
  depositFunds: () => depositFunds,
1062
1062
  getNodeWalletPDA: () => getNodeWalletPDA,
1063
1063
  getTradingPoolPDA: () => getTradingPoolPDA,
1064
+ getWithdrawalAccessList: () => getWithdrawalAccessList,
1064
1065
  getWithdrawalAccessListPDA: () => getWithdrawalAccessListPDA,
1065
1066
  removeFromWithdrawalAccessList: () => removeFromWithdrawalAccessList,
1066
1067
  updateInterestRate: () => updateInterestRate,
@@ -1504,6 +1505,14 @@ function removeFromWithdrawalAccessList(lavarageProgram, params) {
1504
1505
  return new VersionedTransaction(messageV0);
1505
1506
  });
1506
1507
  }
1508
+ function getWithdrawalAccessList(lavarageProgram, params) {
1509
+ return __async(this, null, function* () {
1510
+ var _a;
1511
+ const withdrawalAccessList = getWithdrawalAccessListPDA(lavarageProgram.programId);
1512
+ const withdrawalAccessListAccount = yield lavarageProgram.account.withdrawalAccessList.fetch(withdrawalAccessList);
1513
+ return (_a = withdrawalAccessListAccount.accessEntries.find((entry) => entry.fromPubkey.toString() === params.nodeWallet)) == null ? void 0 : _a.toPubkey;
1514
+ });
1515
+ }
1507
1516
 
1508
1517
  // idl/lavarage.ts
1509
1518
  var IDL = {