@pufferfinance/puffer-sdk 1.22.0 → 1.22.2
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/api/puffer-client.cjs +1 -1
- package/dist/api/puffer-client.cjs.map +1 -1
- package/dist/api/puffer-client.d.ts +3 -0
- package/dist/api/puffer-client.js +24 -17
- package/dist/api/puffer-client.js.map +1 -1
- package/dist/contracts/handlers/institutional-vault-handler.cjs +1 -1
- package/dist/contracts/handlers/institutional-vault-handler.cjs.map +1 -1
- package/dist/contracts/handlers/institutional-vault-handler.d.ts +1 -1
- package/dist/contracts/handlers/institutional-vault-handler.js +1 -1
- package/dist/contracts/handlers/institutional-vault-handler.js.map +1 -1
- package/dist/utils/version.cjs +1 -1
- package/dist/utils/version.js +1 -1
- package/package.json +1 -1
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var s=Object.defineProperty;var u=(
|
|
1
|
+
"use strict";var s=Object.defineProperty;var u=(l,e,r)=>e in l?s(l,e,{enumerable:!0,configurable:!0,writable:!0,value:r}):l[e]=r;var t=(l,e,r)=>u(l,typeof e!="symbol"?e+"":e,r);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const c=require("../constants-BI6T6ZbJ.cjs"),o=require("../contracts/handlers/puffer-vault-handler.cjs"),d=require("../contracts/handlers/puffer-depositor-handler.cjs"),h=require("../contracts/handlers/puffer-l2-depositor-handler.cjs"),w=require("../contracts/handlers/erc20-permit-handler.cjs"),C=require("../contracts/handlers/puf-locker-handler.cjs"),p=require("../contracts/handlers/l2-reward-manager-handler.cjs"),f=require("../contracts/handlers/l1-reward-manager-handler.cjs"),_=require("../contracts/handlers/puffer-withdrawal-manager-handler.cjs"),H=require("../contracts/handlers/nucleus-boring-vault-handler.cjs"),b=require("../contracts/handlers/nucleus-teller-handler.cjs"),q=require("../contracts/handlers/nucleus-accountant-handler.cjs"),g=require("../contracts/handlers/nucleus-atomic-queue-handler.cjs"),V=require("../contracts/handlers/mtw-carrot-handler.cjs"),M=require("../contracts/handlers/carrot-staking-handler.cjs"),P=require("../contracts/handlers/distributor-handler.cjs"),m=require("../contracts/handlers/concrete-vault-handler.cjs"),k=require("../contracts/handlers/validator-ticket-handler.cjs"),A=require("../contracts/handlers/puffer-oracle-v2-handler.cjs"),R=require("../contracts/handlers/puffer-protocol-handler.cjs"),T=require("../contracts/handlers/guardian-module-handler.cjs"),L=require("../contracts/handlers/institutional-vault-handler.cjs"),n=require("../createWalletClient-KYWq_Sx_.cjs");class v{constructor(e,r,a){t(this,"walletClient");t(this,"publicClient");t(this,"erc20Permit");t(this,"vault");t(this,"depositor");t(this,"l2Depositor");t(this,"pufLocker");t(this,"l2RewardManager");t(this,"l1RewardManager");t(this,"pufferWithdrawalManager");t(this,"nucleusBoringVault");t(this,"nucleusTeller");t(this,"nucleusAccountant");t(this,"nucleusAtomicQueue");t(this,"mtwCarrot");t(this,"carrotStaker");t(this,"distributor");t(this,"concreteVault");t(this,"validatorTicket");t(this,"pufferOracleV2");t(this,"pufferProtocol");t(this,"guardianModule");t(this,"institutionalVault");const i=c.VIEM_CHAINS[e];this.walletClient=r??n.createWalletClient({chain:i,transport:n.http()}),this.publicClient=a??n.createPublicClient({chain:i,transport:n.http()}),this.erc20Permit=new w.ERC20PermitHandler(e,this.walletClient,this.publicClient),this.vault=new o.PufferVaultHandler(e,this.walletClient,this.publicClient),this.depositor=new d.PufferDepositorHandler(e,this.walletClient,this.publicClient),this.l2Depositor=new h.PufferL2DepositorHandler(e,this.walletClient,this.publicClient),this.pufLocker=new C.PufLockerHandler(e,this.walletClient,this.publicClient),this.l2RewardManager=new p.L2RewardManagerHandler(e,this.walletClient,this.publicClient),this.l1RewardManager=new f.L1RewardManagerHandler(e,this.walletClient,this.publicClient),this.pufferWithdrawalManager=new _.PufferWithdrawalManagerHandler(e,this.walletClient,this.publicClient),this.nucleusBoringVault=new H.NucleusBoringVaultHandler(e,this.walletClient,this.publicClient),this.nucleusTeller=new b.NucleusTellerHandler(e,this.walletClient,this.publicClient),this.nucleusAccountant=new q.NucleusAccountantHandler(e,this.walletClient,this.publicClient),this.nucleusAtomicQueue=new g.NucleusAtomicQueueHandler(e,this.walletClient,this.publicClient),this.mtwCarrot=new V.MtwCarrotHandler(e,this.walletClient,this.publicClient),this.carrotStaker=new M.CarrotStakingHandler(e,this.walletClient,this.publicClient),this.distributor=new P.DistributorHandler(e,this.walletClient,this.publicClient),this.concreteVault=new m.ConcreteVaultHandler(e,this.walletClient,this.publicClient),this.validatorTicket=new k.ValidatorTicketHandler(e,this.walletClient,this.publicClient),this.pufferOracleV2=new A.PufferOracleV2Handler(e,this.walletClient,this.publicClient),this.pufferProtocol=new R.PufferProtocolHandler(e,this.walletClient,this.publicClient),this.guardianModule=new T.GuardianModuleHandler(e,this.walletClient,this.publicClient),this.institutionalVault=new L.InstitutionalVaultHandler(e,this.walletClient,this.publicClient)}async requestAddresses(){return await this.walletClient.requestAddresses()}}exports.PufferClient=v;
|
|
2
2
|
//# sourceMappingURL=puffer-client.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"puffer-client.cjs","sources":["../../lib/api/puffer-client.ts"],"sourcesContent":["import {\n PublicClient,\n WalletClient,\n createPublicClient,\n createWalletClient,\n http,\n} from 'viem';\nimport { Chain, VIEM_CHAINS } from '../chains/constants';\nimport { PufferVaultHandler } from '../contracts/handlers/puffer-vault-handler';\nimport { PufferDepositorHandler } from '../contracts/handlers/puffer-depositor-handler';\nimport { PufferL2DepositorHandler } from '../contracts/handlers/puffer-l2-depositor-handler';\nimport { ERC20PermitHandler } from '../contracts/handlers/erc20-permit-handler';\nimport { PufLockerHandler } from '../contracts/handlers/puf-locker-handler';\nimport { L2RewardManagerHandler } from '../contracts/handlers/l2-reward-manager-handler';\nimport { L1RewardManagerHandler } from '../contracts/handlers/l1-reward-manager-handler';\nimport { PufferWithdrawalManagerHandler } from '../contracts/handlers/puffer-withdrawal-manager-handler';\nimport { NucleusBoringVaultHandler } from '../contracts/handlers/nucleus-boring-vault-handler';\nimport { NucleusTellerHandler } from '../contracts/handlers/nucleus-teller-handler';\nimport { NucleusAccountantHandler } from '../contracts/handlers/nucleus-accountant-handler';\nimport { NucleusAtomicQueueHandler } from '../contracts/handlers/nucleus-atomic-queue-handler';\nimport { MtwCarrotHandler } from '../contracts/handlers/mtw-carrot-handler';\nimport { CarrotStakingHandler } from '../contracts/handlers/carrot-staking-handler';\nimport { DistributorHandler } from '../contracts/handlers/distributor-handler';\nimport { ConcreteVaultHandler } from '../contracts/handlers/concrete-vault-handler';\nimport { ValidatorTicketHandler } from '../contracts/handlers/validator-ticket-handler';\nimport { PufferOracleV2Handler } from '../contracts/handlers/puffer-oracle-v2-handler';\nimport { PufferProtocolHandler } from '../contracts/handlers/puffer-protocol-handler';\nimport { GuardianModuleHandler } from '../contracts/handlers/guardian-module-handler';\n\n/**\n * The core class and the main entry point of the Puffer SDK.\n */\nexport class PufferClient {\n private walletClient: WalletClient;\n private publicClient: PublicClient;\n\n // Contract Handlers\n /** Handler for the `ERC20Permit` contract. */\n public erc20Permit: ERC20PermitHandler;\n /** Handler for the `PufferVaultV2` contract. */\n public vault: PufferVaultHandler;\n /** Handler for the `PufferDepositor` contract. */\n public depositor: PufferDepositorHandler;\n /** Handler for the `PufferL2Depositor` contract. */\n public l2Depositor: PufferL2DepositorHandler;\n /** Handler for the `PufLocker` contract. */\n public pufLocker: PufLockerHandler;\n /** Handler for the `L2RewardManager` contract. */\n public l2RewardManager: L2RewardManagerHandler;\n /** Handler for the `L1RewardManager` contract. */\n public l1RewardManager: L1RewardManagerHandler;\n /** Handler for the `PufferWithdrawalManager` contract. */\n public pufferWithdrawalManager: PufferWithdrawalManagerHandler;\n /** Handler for the `NucleusBoringVault` contract. */\n public nucleusBoringVault: NucleusBoringVaultHandler;\n /** Handler for the `NucleusTeller` contract. */\n public nucleusTeller: NucleusTellerHandler;\n /** Handler for the `NucleusAccountant` contract. */\n public nucleusAccountant: NucleusAccountantHandler;\n /** Handler for the `NucleusAtomicQueue` contract. */\n public nucleusAtomicQueue: NucleusAtomicQueueHandler;\n /** Handler for the `mtwCARROT` (Merkl Token Wrapper) contract. */\n public mtwCarrot: MtwCarrotHandler;\n /** Handler for the `CarrotStaker` contract. */\n public carrotStaker: CarrotStakingHandler;\n /** Handler for the `Distributor` contract. */\n public distributor: DistributorHandler;\n /** Handler for the `ConcreteMultiStrategyVault` contract. */\n public concreteVault: ConcreteVaultHandler;\n /** Handler for the `ValidatorTicket` contract. */\n public validatorTicket: ValidatorTicketHandler;\n /** Handler for the `PufferOracleV2` contract. */\n public pufferOracleV2: PufferOracleV2Handler;\n /** Handler for the `PufferProtocol` contract. */\n public pufferProtocol: PufferProtocolHandler;\n /** Handler for the `GuardianModule` contract. */\n public guardianModule: GuardianModuleHandler;\n\n /**\n * Create the Puffer Client.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n chain: Chain,\n walletClient?: WalletClient,\n publicClient?: PublicClient,\n ) {\n const viemChain = VIEM_CHAINS[chain];\n\n /* istanbul ignore next */\n this.walletClient =\n walletClient ??\n createWalletClient({\n chain: viemChain,\n transport: http(),\n });\n this.publicClient =\n publicClient ??\n createPublicClient({\n chain: viemChain,\n transport: http(),\n });\n\n this.erc20Permit = new ERC20PermitHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.vault = new PufferVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.depositor = new PufferDepositorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l2Depositor = new PufferL2DepositorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufLocker = new PufLockerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l2RewardManager = new L2RewardManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l1RewardManager = new L1RewardManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferWithdrawalManager = new PufferWithdrawalManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusBoringVault = new NucleusBoringVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusTeller = new NucleusTellerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusAccountant = new NucleusAccountantHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusAtomicQueue = new NucleusAtomicQueueHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.mtwCarrot = new MtwCarrotHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.carrotStaker = new CarrotStakingHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.distributor = new DistributorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.concreteVault = new ConcreteVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.validatorTicket = new ValidatorTicketHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferOracleV2 = new PufferOracleV2Handler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferProtocol = new PufferProtocolHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.guardianModule = new GuardianModuleHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n }\n\n /**\n * Request addresses from the wallet.\n *\n * @returns An array of wallet addresses.\n */\n public async requestAddresses() {\n return await this.walletClient.requestAddresses();\n }\n}\n"],"names":["PufferClient","chain","walletClient","publicClient","__publicField","viemChain","VIEM_CHAINS","createWalletClient","http","createPublicClient","ERC20PermitHandler","PufferVaultHandler","PufferDepositorHandler","PufferL2DepositorHandler","PufLockerHandler","L2RewardManagerHandler","L1RewardManagerHandler","PufferWithdrawalManagerHandler","NucleusBoringVaultHandler","NucleusTellerHandler","NucleusAccountantHandler","NucleusAtomicQueueHandler","MtwCarrotHandler","CarrotStakingHandler","DistributorHandler","ConcreteVaultHandler","ValidatorTicketHandler","PufferOracleV2Handler","PufferProtocolHandler","GuardianModuleHandler"],"mappings":"wkDAgCO,MAAMA,CAAa,CAuDxB,YACEC,EACAC,EACAC,EACA,CA1DMC,EAAA,qBACAA,EAAA,qBAIDA,EAAA,oBAEAA,EAAA,cAEAA,EAAA,kBAEAA,EAAA,oBAEAA,EAAA,kBAEAA,EAAA,wBAEAA,EAAA,wBAEAA,EAAA,gCAEAA,EAAA,2BAEAA,EAAA,sBAEAA,EAAA,0BAEAA,EAAA,2BAEAA,EAAA,kBAEAA,EAAA,qBAEAA,EAAA,oBAEAA,EAAA,sBAEAA,EAAA,wBAEAA,EAAA,uBAEAA,EAAA,uBAEAA,EAAA,uBAgBC,MAAAC,EAAYC,cAAYL,CAAK,EAG9B,KAAA,aACHC,GACAK,qBAAmB,CACjB,MAAOF,EACP,UAAWG,EAAK,KAAA,CAAA,CACjB,EACE,KAAA,aACHL,GACAM,qBAAmB,CACjB,MAAOJ,EACP,UAAWG,EAAK,KAAA,CAAA,CACjB,EAEH,KAAK,YAAc,IAAIE,EAAA,mBACrBT,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,MAAQ,IAAIU,EAAA,mBACfV,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,UAAY,IAAIW,EAAA,uBACnBX,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,YAAc,IAAIY,EAAA,yBACrBZ,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,UAAY,IAAIa,EAAA,iBACnBb,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,gBAAkB,IAAIc,EAAA,uBACzBd,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,gBAAkB,IAAIe,EAAA,uBACzBf,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,wBAA0B,IAAIgB,EAAA,+BACjChB,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,mBAAqB,IAAIiB,EAAA,0BAC5BjB,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,cAAgB,IAAIkB,EAAA,qBACvBlB,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,kBAAoB,IAAImB,EAAA,yBAC3BnB,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,mBAAqB,IAAIoB,EAAA,0BAC5BpB,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,UAAY,IAAIqB,EAAA,iBACnBrB,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,aAAe,IAAIsB,EAAA,qBACtBtB,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,YAAc,IAAIuB,EAAA,mBACrBvB,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,cAAgB,IAAIwB,EAAA,qBACvBxB,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,gBAAkB,IAAIyB,EAAA,uBACzBzB,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,eAAiB,IAAI0B,EAAA,sBACxB1B,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,eAAiB,IAAI2B,EAAA,sBACxB3B,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,eAAiB,IAAI4B,EAAA,sBACxB5B,EACA,KAAK,aACL,KAAK,YACP,CAAA,CAQF,MAAa,kBAAmB,CACvB,OAAA,MAAM,KAAK,aAAa,iBAAiB,CAAA,CAEpD"}
|
|
1
|
+
{"version":3,"file":"puffer-client.cjs","sources":["../../lib/api/puffer-client.ts"],"sourcesContent":["import {\n PublicClient,\n WalletClient,\n createPublicClient,\n createWalletClient,\n http,\n} from 'viem';\nimport { Chain, VIEM_CHAINS } from '../chains/constants';\nimport { PufferVaultHandler } from '../contracts/handlers/puffer-vault-handler';\nimport { PufferDepositorHandler } from '../contracts/handlers/puffer-depositor-handler';\nimport { PufferL2DepositorHandler } from '../contracts/handlers/puffer-l2-depositor-handler';\nimport { ERC20PermitHandler } from '../contracts/handlers/erc20-permit-handler';\nimport { PufLockerHandler } from '../contracts/handlers/puf-locker-handler';\nimport { L2RewardManagerHandler } from '../contracts/handlers/l2-reward-manager-handler';\nimport { L1RewardManagerHandler } from '../contracts/handlers/l1-reward-manager-handler';\nimport { PufferWithdrawalManagerHandler } from '../contracts/handlers/puffer-withdrawal-manager-handler';\nimport { NucleusBoringVaultHandler } from '../contracts/handlers/nucleus-boring-vault-handler';\nimport { NucleusTellerHandler } from '../contracts/handlers/nucleus-teller-handler';\nimport { NucleusAccountantHandler } from '../contracts/handlers/nucleus-accountant-handler';\nimport { NucleusAtomicQueueHandler } from '../contracts/handlers/nucleus-atomic-queue-handler';\nimport { MtwCarrotHandler } from '../contracts/handlers/mtw-carrot-handler';\nimport { CarrotStakingHandler } from '../contracts/handlers/carrot-staking-handler';\nimport { DistributorHandler } from '../contracts/handlers/distributor-handler';\nimport { ConcreteVaultHandler } from '../contracts/handlers/concrete-vault-handler';\nimport { ValidatorTicketHandler } from '../contracts/handlers/validator-ticket-handler';\nimport { PufferOracleV2Handler } from '../contracts/handlers/puffer-oracle-v2-handler';\nimport { PufferProtocolHandler } from '../contracts/handlers/puffer-protocol-handler';\nimport { GuardianModuleHandler } from '../contracts/handlers/guardian-module-handler';\nimport { InstitutionalVaultHandler } from '../contracts/handlers/institutional-vault-handler';\n\n/**\n * The core class and the main entry point of the Puffer SDK.\n */\nexport class PufferClient {\n private walletClient: WalletClient;\n private publicClient: PublicClient;\n\n // Contract Handlers\n /** Handler for the `ERC20Permit` contract. */\n public erc20Permit: ERC20PermitHandler;\n /** Handler for the `PufferVaultV2` contract. */\n public vault: PufferVaultHandler;\n /** Handler for the `PufferDepositor` contract. */\n public depositor: PufferDepositorHandler;\n /** Handler for the `PufferL2Depositor` contract. */\n public l2Depositor: PufferL2DepositorHandler;\n /** Handler for the `PufLocker` contract. */\n public pufLocker: PufLockerHandler;\n /** Handler for the `L2RewardManager` contract. */\n public l2RewardManager: L2RewardManagerHandler;\n /** Handler for the `L1RewardManager` contract. */\n public l1RewardManager: L1RewardManagerHandler;\n /** Handler for the `PufferWithdrawalManager` contract. */\n public pufferWithdrawalManager: PufferWithdrawalManagerHandler;\n /** Handler for the `NucleusBoringVault` contract. */\n public nucleusBoringVault: NucleusBoringVaultHandler;\n /** Handler for the `NucleusTeller` contract. */\n public nucleusTeller: NucleusTellerHandler;\n /** Handler for the `NucleusAccountant` contract. */\n public nucleusAccountant: NucleusAccountantHandler;\n /** Handler for the `NucleusAtomicQueue` contract. */\n public nucleusAtomicQueue: NucleusAtomicQueueHandler;\n /** Handler for the `mtwCARROT` (Merkl Token Wrapper) contract. */\n public mtwCarrot: MtwCarrotHandler;\n /** Handler for the `CarrotStaker` contract. */\n public carrotStaker: CarrotStakingHandler;\n /** Handler for the `Distributor` contract. */\n public distributor: DistributorHandler;\n /** Handler for the `ConcreteMultiStrategyVault` contract. */\n public concreteVault: ConcreteVaultHandler;\n /** Handler for the `ValidatorTicket` contract. */\n public validatorTicket: ValidatorTicketHandler;\n /** Handler for the `PufferOracleV2` contract. */\n public pufferOracleV2: PufferOracleV2Handler;\n /** Handler for the `PufferProtocol` contract. */\n public pufferProtocol: PufferProtocolHandler;\n /** Handler for the `GuardianModule` contract. */\n public guardianModule: GuardianModuleHandler;\n /** Handler for the `InstitutionalVault` contract. */\n public institutionalVault: InstitutionalVaultHandler;\n\n /**\n * Create the Puffer Client.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n chain: Chain,\n walletClient?: WalletClient,\n publicClient?: PublicClient,\n ) {\n const viemChain = VIEM_CHAINS[chain];\n\n /* istanbul ignore next */\n this.walletClient =\n walletClient ??\n createWalletClient({\n chain: viemChain,\n transport: http(),\n });\n this.publicClient =\n publicClient ??\n createPublicClient({\n chain: viemChain,\n transport: http(),\n });\n\n this.erc20Permit = new ERC20PermitHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.vault = new PufferVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.depositor = new PufferDepositorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l2Depositor = new PufferL2DepositorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufLocker = new PufLockerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l2RewardManager = new L2RewardManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l1RewardManager = new L1RewardManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferWithdrawalManager = new PufferWithdrawalManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusBoringVault = new NucleusBoringVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusTeller = new NucleusTellerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusAccountant = new NucleusAccountantHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusAtomicQueue = new NucleusAtomicQueueHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.mtwCarrot = new MtwCarrotHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.carrotStaker = new CarrotStakingHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.distributor = new DistributorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.concreteVault = new ConcreteVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.validatorTicket = new ValidatorTicketHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferOracleV2 = new PufferOracleV2Handler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferProtocol = new PufferProtocolHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.guardianModule = new GuardianModuleHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.institutionalVault = new InstitutionalVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n }\n\n /**\n * Request addresses from the wallet.\n *\n * @returns An array of wallet addresses.\n */\n public async requestAddresses() {\n return await this.walletClient.requestAddresses();\n }\n}\n"],"names":["PufferClient","chain","walletClient","publicClient","__publicField","viemChain","VIEM_CHAINS","createWalletClient","http","createPublicClient","ERC20PermitHandler","PufferVaultHandler","PufferDepositorHandler","PufferL2DepositorHandler","PufLockerHandler","L2RewardManagerHandler","L1RewardManagerHandler","PufferWithdrawalManagerHandler","NucleusBoringVaultHandler","NucleusTellerHandler","NucleusAccountantHandler","NucleusAtomicQueueHandler","MtwCarrotHandler","CarrotStakingHandler","DistributorHandler","ConcreteVaultHandler","ValidatorTicketHandler","PufferOracleV2Handler","PufferProtocolHandler","GuardianModuleHandler","InstitutionalVaultHandler"],"mappings":"2oDAiCO,MAAMA,CAAa,CAyDxB,YACEC,EACAC,EACAC,EACA,CA5DMC,EAAA,qBACAA,EAAA,qBAIDA,EAAA,oBAEAA,EAAA,cAEAA,EAAA,kBAEAA,EAAA,oBAEAA,EAAA,kBAEAA,EAAA,wBAEAA,EAAA,wBAEAA,EAAA,gCAEAA,EAAA,2BAEAA,EAAA,sBAEAA,EAAA,0BAEAA,EAAA,2BAEAA,EAAA,kBAEAA,EAAA,qBAEAA,EAAA,oBAEAA,EAAA,sBAEAA,EAAA,wBAEAA,EAAA,uBAEAA,EAAA,uBAEAA,EAAA,uBAEAA,EAAA,2BAgBC,MAAAC,EAAYC,cAAYL,CAAK,EAG9B,KAAA,aACHC,GACAK,qBAAmB,CACjB,MAAOF,EACP,UAAWG,EAAK,KAAA,CAAA,CACjB,EACE,KAAA,aACHL,GACAM,qBAAmB,CACjB,MAAOJ,EACP,UAAWG,EAAK,KAAA,CAAA,CACjB,EAEH,KAAK,YAAc,IAAIE,EAAA,mBACrBT,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,MAAQ,IAAIU,EAAA,mBACfV,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,UAAY,IAAIW,EAAA,uBACnBX,EACA,KAAK,aACL,KAAK,YACP,EACA,KAAK,YAAc,IAAIY,EAAA,yBACrBZ,EACA,KAAK,aACL,KAAK,YACP,EAC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A,CAEpD"}
|
|
@@ -20,6 +20,7 @@ import { ValidatorTicketHandler } from '../contracts/handlers/validator-ticket-h
|
|
|
20
20
|
import { PufferOracleV2Handler } from '../contracts/handlers/puffer-oracle-v2-handler';
|
|
21
21
|
import { PufferProtocolHandler } from '../contracts/handlers/puffer-protocol-handler';
|
|
22
22
|
import { GuardianModuleHandler } from '../contracts/handlers/guardian-module-handler';
|
|
23
|
+
import { InstitutionalVaultHandler } from '../contracts/handlers/institutional-vault-handler';
|
|
23
24
|
/**
|
|
24
25
|
* The core class and the main entry point of the Puffer SDK.
|
|
25
26
|
*/
|
|
@@ -66,6 +67,8 @@ export declare class PufferClient {
|
|
|
66
67
|
pufferProtocol: PufferProtocolHandler;
|
|
67
68
|
/** Handler for the `GuardianModule` contract. */
|
|
68
69
|
guardianModule: GuardianModuleHandler;
|
|
70
|
+
/** Handler for the `InstitutionalVault` contract. */
|
|
71
|
+
institutionalVault: InstitutionalVaultHandler;
|
|
69
72
|
/**
|
|
70
73
|
* Create the Puffer Client.
|
|
71
74
|
*
|
|
@@ -7,23 +7,24 @@ import { PufferDepositorHandler as w } from "../contracts/handlers/puffer-deposi
|
|
|
7
7
|
import { PufferL2DepositorHandler as C } from "../contracts/handlers/puffer-l2-depositor-handler.js";
|
|
8
8
|
import { ERC20PermitHandler as c } from "../contracts/handlers/erc20-permit-handler.js";
|
|
9
9
|
import { PufLockerHandler as m } from "../contracts/handlers/puf-locker-handler.js";
|
|
10
|
-
import { L2RewardManagerHandler as
|
|
11
|
-
import { L1RewardManagerHandler as
|
|
10
|
+
import { L2RewardManagerHandler as h } from "../contracts/handlers/l2-reward-manager-handler.js";
|
|
11
|
+
import { L1RewardManagerHandler as f } from "../contracts/handlers/l1-reward-manager-handler.js";
|
|
12
12
|
import { PufferWithdrawalManagerHandler as d } from "../contracts/handlers/puffer-withdrawal-manager-handler.js";
|
|
13
13
|
import { NucleusBoringVaultHandler as b } from "../contracts/handlers/nucleus-boring-vault-handler.js";
|
|
14
14
|
import { NucleusTellerHandler as H } from "../contracts/handlers/nucleus-teller-handler.js";
|
|
15
|
-
import { NucleusAccountantHandler as
|
|
16
|
-
import { NucleusAtomicQueueHandler as
|
|
17
|
-
import { MtwCarrotHandler as
|
|
18
|
-
import { CarrotStakingHandler as
|
|
15
|
+
import { NucleusAccountantHandler as V } from "../contracts/handlers/nucleus-accountant-handler.js";
|
|
16
|
+
import { NucleusAtomicQueueHandler as g } from "../contracts/handlers/nucleus-atomic-queue-handler.js";
|
|
17
|
+
import { MtwCarrotHandler as P } from "../contracts/handlers/mtw-carrot-handler.js";
|
|
18
|
+
import { CarrotStakingHandler as M } from "../contracts/handlers/carrot-staking-handler.js";
|
|
19
19
|
import { DistributorHandler as k } from "../contracts/handlers/distributor-handler.js";
|
|
20
20
|
import { ConcreteVaultHandler as A } from "../contracts/handlers/concrete-vault-handler.js";
|
|
21
21
|
import { ValidatorTicketHandler as R } from "../contracts/handlers/validator-ticket-handler.js";
|
|
22
22
|
import { PufferOracleV2Handler as L } from "../contracts/handlers/puffer-oracle-v2-handler.js";
|
|
23
23
|
import { PufferProtocolHandler as T } from "../contracts/handlers/puffer-protocol-handler.js";
|
|
24
24
|
import { GuardianModuleHandler as v } from "../contracts/handlers/guardian-module-handler.js";
|
|
25
|
-
import {
|
|
26
|
-
|
|
25
|
+
import { InstitutionalVaultHandler as D } from "../contracts/handlers/institutional-vault-handler.js";
|
|
26
|
+
import { c as N, h as n, a as S } from "../createWalletClient-BI9ya5Hq.js";
|
|
27
|
+
class it {
|
|
27
28
|
/**
|
|
28
29
|
* Create the Puffer Client.
|
|
29
30
|
*
|
|
@@ -77,11 +78,13 @@ class et {
|
|
|
77
78
|
e(this, "pufferProtocol");
|
|
78
79
|
/** Handler for the `GuardianModule` contract. */
|
|
79
80
|
e(this, "guardianModule");
|
|
81
|
+
/** Handler for the `InstitutionalVault` contract. */
|
|
82
|
+
e(this, "institutionalVault");
|
|
80
83
|
const r = u[t];
|
|
81
|
-
this.walletClient = i ??
|
|
84
|
+
this.walletClient = i ?? N({
|
|
82
85
|
chain: r,
|
|
83
86
|
transport: n()
|
|
84
|
-
}), this.publicClient = a ??
|
|
87
|
+
}), this.publicClient = a ?? S({
|
|
85
88
|
chain: r,
|
|
86
89
|
transport: n()
|
|
87
90
|
}), this.erc20Permit = new c(
|
|
@@ -104,11 +107,11 @@ class et {
|
|
|
104
107
|
t,
|
|
105
108
|
this.walletClient,
|
|
106
109
|
this.publicClient
|
|
107
|
-
), this.l2RewardManager = new
|
|
110
|
+
), this.l2RewardManager = new h(
|
|
108
111
|
t,
|
|
109
112
|
this.walletClient,
|
|
110
113
|
this.publicClient
|
|
111
|
-
), this.l1RewardManager = new
|
|
114
|
+
), this.l1RewardManager = new f(
|
|
112
115
|
t,
|
|
113
116
|
this.walletClient,
|
|
114
117
|
this.publicClient
|
|
@@ -124,19 +127,19 @@ class et {
|
|
|
124
127
|
t,
|
|
125
128
|
this.walletClient,
|
|
126
129
|
this.publicClient
|
|
127
|
-
), this.nucleusAccountant = new
|
|
130
|
+
), this.nucleusAccountant = new V(
|
|
128
131
|
t,
|
|
129
132
|
this.walletClient,
|
|
130
133
|
this.publicClient
|
|
131
|
-
), this.nucleusAtomicQueue = new
|
|
134
|
+
), this.nucleusAtomicQueue = new g(
|
|
132
135
|
t,
|
|
133
136
|
this.walletClient,
|
|
134
137
|
this.publicClient
|
|
135
|
-
), this.mtwCarrot = new
|
|
138
|
+
), this.mtwCarrot = new P(
|
|
136
139
|
t,
|
|
137
140
|
this.walletClient,
|
|
138
141
|
this.publicClient
|
|
139
|
-
), this.carrotStaker = new
|
|
142
|
+
), this.carrotStaker = new M(
|
|
140
143
|
t,
|
|
141
144
|
this.walletClient,
|
|
142
145
|
this.publicClient
|
|
@@ -164,6 +167,10 @@ class et {
|
|
|
164
167
|
t,
|
|
165
168
|
this.walletClient,
|
|
166
169
|
this.publicClient
|
|
170
|
+
), this.institutionalVault = new D(
|
|
171
|
+
t,
|
|
172
|
+
this.walletClient,
|
|
173
|
+
this.publicClient
|
|
167
174
|
);
|
|
168
175
|
}
|
|
169
176
|
/**
|
|
@@ -176,6 +183,6 @@ class et {
|
|
|
176
183
|
}
|
|
177
184
|
}
|
|
178
185
|
export {
|
|
179
|
-
|
|
186
|
+
it as PufferClient
|
|
180
187
|
};
|
|
181
188
|
//# sourceMappingURL=puffer-client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"puffer-client.js","sources":["../../lib/api/puffer-client.ts"],"sourcesContent":["import {\n PublicClient,\n WalletClient,\n createPublicClient,\n createWalletClient,\n http,\n} from 'viem';\nimport { Chain, VIEM_CHAINS } from '../chains/constants';\nimport { PufferVaultHandler } from '../contracts/handlers/puffer-vault-handler';\nimport { PufferDepositorHandler } from '../contracts/handlers/puffer-depositor-handler';\nimport { PufferL2DepositorHandler } from '../contracts/handlers/puffer-l2-depositor-handler';\nimport { ERC20PermitHandler } from '../contracts/handlers/erc20-permit-handler';\nimport { PufLockerHandler } from '../contracts/handlers/puf-locker-handler';\nimport { L2RewardManagerHandler } from '../contracts/handlers/l2-reward-manager-handler';\nimport { L1RewardManagerHandler } from '../contracts/handlers/l1-reward-manager-handler';\nimport { PufferWithdrawalManagerHandler } from '../contracts/handlers/puffer-withdrawal-manager-handler';\nimport { NucleusBoringVaultHandler } from '../contracts/handlers/nucleus-boring-vault-handler';\nimport { NucleusTellerHandler } from '../contracts/handlers/nucleus-teller-handler';\nimport { NucleusAccountantHandler } from '../contracts/handlers/nucleus-accountant-handler';\nimport { NucleusAtomicQueueHandler } from '../contracts/handlers/nucleus-atomic-queue-handler';\nimport { MtwCarrotHandler } from '../contracts/handlers/mtw-carrot-handler';\nimport { CarrotStakingHandler } from '../contracts/handlers/carrot-staking-handler';\nimport { DistributorHandler } from '../contracts/handlers/distributor-handler';\nimport { ConcreteVaultHandler } from '../contracts/handlers/concrete-vault-handler';\nimport { ValidatorTicketHandler } from '../contracts/handlers/validator-ticket-handler';\nimport { PufferOracleV2Handler } from '../contracts/handlers/puffer-oracle-v2-handler';\nimport { PufferProtocolHandler } from '../contracts/handlers/puffer-protocol-handler';\nimport { GuardianModuleHandler } from '../contracts/handlers/guardian-module-handler';\n\n/**\n * The core class and the main entry point of the Puffer SDK.\n */\nexport class PufferClient {\n private walletClient: WalletClient;\n private publicClient: PublicClient;\n\n // Contract Handlers\n /** Handler for the `ERC20Permit` contract. */\n public erc20Permit: ERC20PermitHandler;\n /** Handler for the `PufferVaultV2` contract. */\n public vault: PufferVaultHandler;\n /** Handler for the `PufferDepositor` contract. */\n public depositor: PufferDepositorHandler;\n /** Handler for the `PufferL2Depositor` contract. */\n public l2Depositor: PufferL2DepositorHandler;\n /** Handler for the `PufLocker` contract. */\n public pufLocker: PufLockerHandler;\n /** Handler for the `L2RewardManager` contract. */\n public l2RewardManager: L2RewardManagerHandler;\n /** Handler for the `L1RewardManager` contract. */\n public l1RewardManager: L1RewardManagerHandler;\n /** Handler for the `PufferWithdrawalManager` contract. */\n public pufferWithdrawalManager: PufferWithdrawalManagerHandler;\n /** Handler for the `NucleusBoringVault` contract. */\n public nucleusBoringVault: NucleusBoringVaultHandler;\n /** Handler for the `NucleusTeller` contract. */\n public nucleusTeller: NucleusTellerHandler;\n /** Handler for the `NucleusAccountant` contract. */\n public nucleusAccountant: NucleusAccountantHandler;\n /** Handler for the `NucleusAtomicQueue` contract. */\n public nucleusAtomicQueue: NucleusAtomicQueueHandler;\n /** Handler for the `mtwCARROT` (Merkl Token Wrapper) contract. */\n public mtwCarrot: MtwCarrotHandler;\n /** Handler for the `CarrotStaker` contract. */\n public carrotStaker: CarrotStakingHandler;\n /** Handler for the `Distributor` contract. */\n public distributor: DistributorHandler;\n /** Handler for the `ConcreteMultiStrategyVault` contract. */\n public concreteVault: ConcreteVaultHandler;\n /** Handler for the `ValidatorTicket` contract. */\n public validatorTicket: ValidatorTicketHandler;\n /** Handler for the `PufferOracleV2` contract. */\n public pufferOracleV2: PufferOracleV2Handler;\n /** Handler for the `PufferProtocol` contract. */\n public pufferProtocol: PufferProtocolHandler;\n /** Handler for the `GuardianModule` contract. */\n public guardianModule: GuardianModuleHandler;\n\n /**\n * Create the Puffer Client.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n chain: Chain,\n walletClient?: WalletClient,\n publicClient?: PublicClient,\n ) {\n const viemChain = VIEM_CHAINS[chain];\n\n /* istanbul ignore next */\n this.walletClient =\n walletClient ??\n createWalletClient({\n chain: viemChain,\n transport: http(),\n });\n this.publicClient =\n publicClient ??\n createPublicClient({\n chain: viemChain,\n transport: http(),\n });\n\n this.erc20Permit = new ERC20PermitHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.vault = new PufferVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.depositor = new PufferDepositorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l2Depositor = new PufferL2DepositorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufLocker = new PufLockerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l2RewardManager = new L2RewardManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l1RewardManager = new L1RewardManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferWithdrawalManager = new PufferWithdrawalManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusBoringVault = new NucleusBoringVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusTeller = new NucleusTellerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusAccountant = new NucleusAccountantHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusAtomicQueue = new NucleusAtomicQueueHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.mtwCarrot = new MtwCarrotHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.carrotStaker = new CarrotStakingHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.distributor = new DistributorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.concreteVault = new ConcreteVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.validatorTicket = new ValidatorTicketHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferOracleV2 = new PufferOracleV2Handler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferProtocol = new PufferProtocolHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.guardianModule = new GuardianModuleHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n }\n\n /**\n * Request addresses from the wallet.\n *\n * @returns An array of wallet addresses.\n */\n public async requestAddresses() {\n return await this.walletClient.requestAddresses();\n }\n}\n"],"names":["PufferClient","chain","walletClient","publicClient","__publicField","viemChain","VIEM_CHAINS","createWalletClient","http","createPublicClient","ERC20PermitHandler","PufferVaultHandler","PufferDepositorHandler","PufferL2DepositorHandler","PufLockerHandler","L2RewardManagerHandler","L1RewardManagerHandler","PufferWithdrawalManagerHandler","NucleusBoringVaultHandler","NucleusTellerHandler","NucleusAccountantHandler","NucleusAtomicQueueHandler","MtwCarrotHandler","CarrotStakingHandler","DistributorHandler","ConcreteVaultHandler","ValidatorTicketHandler","PufferOracleV2Handler","PufferProtocolHandler","GuardianModuleHandler"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;AAgCO,MAAMA,GAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAuDxB,YACEC,GACAC,GACAC,GACA;AA1DM,IAAAC,EAAA;AACA,IAAAA,EAAA;AAID;AAAA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAA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MAC5BjB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,gBAAgB,IAAIkB;AAAA,MACvBlB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,oBAAoB,IAAImB;AAAA,MAC3BnB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,qBAAqB,IAAIoB;AAAA,MAC5BpB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,YAAY,IAAIqB;AAAA,MACnBrB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,eAAe,IAAIsB;AAAA,MACtBtB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,cAAc,IAAIuB;AAAA,MACrBvB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,gBAAgB,IAAIwB;AAAA,MACvBxB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,kBAAkB,IAAIyB;AAAA,MACzBzB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,iBAAiB,IAAI0B;AAAA,MACxB1B;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,iBAAiB,IAAI2B;AAAA,MACxB3B;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,iBAAiB,IAAI4B;AAAA,MACxB5B;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQF,MAAa,mBAAmB;AACvB,WAAA,MAAM,KAAK,aAAa,iBAAiB;AAAA,EAAA;AAEpD;"}
|
|
1
|
+
{"version":3,"file":"puffer-client.js","sources":["../../lib/api/puffer-client.ts"],"sourcesContent":["import {\n PublicClient,\n WalletClient,\n createPublicClient,\n createWalletClient,\n http,\n} from 'viem';\nimport { Chain, VIEM_CHAINS } from '../chains/constants';\nimport { PufferVaultHandler } from '../contracts/handlers/puffer-vault-handler';\nimport { PufferDepositorHandler } from '../contracts/handlers/puffer-depositor-handler';\nimport { PufferL2DepositorHandler } from '../contracts/handlers/puffer-l2-depositor-handler';\nimport { ERC20PermitHandler } from '../contracts/handlers/erc20-permit-handler';\nimport { PufLockerHandler } from '../contracts/handlers/puf-locker-handler';\nimport { L2RewardManagerHandler } from '../contracts/handlers/l2-reward-manager-handler';\nimport { L1RewardManagerHandler } from '../contracts/handlers/l1-reward-manager-handler';\nimport { PufferWithdrawalManagerHandler } from '../contracts/handlers/puffer-withdrawal-manager-handler';\nimport { NucleusBoringVaultHandler } from '../contracts/handlers/nucleus-boring-vault-handler';\nimport { NucleusTellerHandler } from '../contracts/handlers/nucleus-teller-handler';\nimport { NucleusAccountantHandler } from '../contracts/handlers/nucleus-accountant-handler';\nimport { NucleusAtomicQueueHandler } from '../contracts/handlers/nucleus-atomic-queue-handler';\nimport { MtwCarrotHandler } from '../contracts/handlers/mtw-carrot-handler';\nimport { CarrotStakingHandler } from '../contracts/handlers/carrot-staking-handler';\nimport { DistributorHandler } from '../contracts/handlers/distributor-handler';\nimport { ConcreteVaultHandler } from '../contracts/handlers/concrete-vault-handler';\nimport { ValidatorTicketHandler } from '../contracts/handlers/validator-ticket-handler';\nimport { PufferOracleV2Handler } from '../contracts/handlers/puffer-oracle-v2-handler';\nimport { PufferProtocolHandler } from '../contracts/handlers/puffer-protocol-handler';\nimport { GuardianModuleHandler } from '../contracts/handlers/guardian-module-handler';\nimport { InstitutionalVaultHandler } from '../contracts/handlers/institutional-vault-handler';\n\n/**\n * The core class and the main entry point of the Puffer SDK.\n */\nexport class PufferClient {\n private walletClient: WalletClient;\n private publicClient: PublicClient;\n\n // Contract Handlers\n /** Handler for the `ERC20Permit` contract. */\n public erc20Permit: ERC20PermitHandler;\n /** Handler for the `PufferVaultV2` contract. */\n public vault: PufferVaultHandler;\n /** Handler for the `PufferDepositor` contract. */\n public depositor: PufferDepositorHandler;\n /** Handler for the `PufferL2Depositor` contract. */\n public l2Depositor: PufferL2DepositorHandler;\n /** Handler for the `PufLocker` contract. */\n public pufLocker: PufLockerHandler;\n /** Handler for the `L2RewardManager` contract. */\n public l2RewardManager: L2RewardManagerHandler;\n /** Handler for the `L1RewardManager` contract. */\n public l1RewardManager: L1RewardManagerHandler;\n /** Handler for the `PufferWithdrawalManager` contract. */\n public pufferWithdrawalManager: PufferWithdrawalManagerHandler;\n /** Handler for the `NucleusBoringVault` contract. */\n public nucleusBoringVault: NucleusBoringVaultHandler;\n /** Handler for the `NucleusTeller` contract. */\n public nucleusTeller: NucleusTellerHandler;\n /** Handler for the `NucleusAccountant` contract. */\n public nucleusAccountant: NucleusAccountantHandler;\n /** Handler for the `NucleusAtomicQueue` contract. */\n public nucleusAtomicQueue: NucleusAtomicQueueHandler;\n /** Handler for the `mtwCARROT` (Merkl Token Wrapper) contract. */\n public mtwCarrot: MtwCarrotHandler;\n /** Handler for the `CarrotStaker` contract. */\n public carrotStaker: CarrotStakingHandler;\n /** Handler for the `Distributor` contract. */\n public distributor: DistributorHandler;\n /** Handler for the `ConcreteMultiStrategyVault` contract. */\n public concreteVault: ConcreteVaultHandler;\n /** Handler for the `ValidatorTicket` contract. */\n public validatorTicket: ValidatorTicketHandler;\n /** Handler for the `PufferOracleV2` contract. */\n public pufferOracleV2: PufferOracleV2Handler;\n /** Handler for the `PufferProtocol` contract. */\n public pufferProtocol: PufferProtocolHandler;\n /** Handler for the `GuardianModule` contract. */\n public guardianModule: GuardianModuleHandler;\n /** Handler for the `InstitutionalVault` contract. */\n public institutionalVault: InstitutionalVaultHandler;\n\n /**\n * Create the Puffer Client.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n chain: Chain,\n walletClient?: WalletClient,\n publicClient?: PublicClient,\n ) {\n const viemChain = VIEM_CHAINS[chain];\n\n /* istanbul ignore next */\n this.walletClient =\n walletClient ??\n createWalletClient({\n chain: viemChain,\n transport: http(),\n });\n this.publicClient =\n publicClient ??\n createPublicClient({\n chain: viemChain,\n transport: http(),\n });\n\n this.erc20Permit = new ERC20PermitHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.vault = new PufferVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.depositor = new PufferDepositorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l2Depositor = new PufferL2DepositorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufLocker = new PufLockerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l2RewardManager = new L2RewardManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.l1RewardManager = new L1RewardManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferWithdrawalManager = new PufferWithdrawalManagerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusBoringVault = new NucleusBoringVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusTeller = new NucleusTellerHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusAccountant = new NucleusAccountantHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.nucleusAtomicQueue = new NucleusAtomicQueueHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.mtwCarrot = new MtwCarrotHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.carrotStaker = new CarrotStakingHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.distributor = new DistributorHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.concreteVault = new ConcreteVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.validatorTicket = new ValidatorTicketHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferOracleV2 = new PufferOracleV2Handler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.pufferProtocol = new PufferProtocolHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.guardianModule = new GuardianModuleHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n this.institutionalVault = new InstitutionalVaultHandler(\n chain,\n this.walletClient,\n this.publicClient,\n );\n }\n\n /**\n * Request addresses from the wallet.\n *\n * @returns An array of wallet addresses.\n */\n public async requestAddresses() {\n return await this.walletClient.requestAddresses();\n }\n}\n"],"names":["PufferClient","chain","walletClient","publicClient","__publicField","viemChain","VIEM_CHAINS","createWalletClient","http","createPublicClient","ERC20PermitHandler","PufferVaultHandler","PufferDepositorHandler","PufferL2DepositorHandler","PufLockerHandler","L2RewardManagerHandler","L1RewardManagerHandler","PufferWithdrawalManagerHandler","NucleusBoringVaultHandler","NucleusTellerHandler","NucleusAccountantHandler","NucleusAtomicQueueHandler","MtwCarrotHandler","CarrotStakingHandler","DistributorHandler","ConcreteVaultHandler","ValidatorTicketHandler","PufferOracleV2Handler","PufferProtocolHandler","GuardianModuleHandler","InstitutionalVaultHandler"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAiCO,MAAMA,GAAa;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAyDxB,YACEC,GACAC,GACAC,GACA;AA5DM,IAAAC,EAAA;AACA,IAAAA,EAAA;AAID;AAAA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAAA,IAAAA,EAAA;AAEA;AAA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,KAAK,oBAAoB,IAAImB;AAAA,MAC3BnB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,qBAAqB,IAAIoB;AAAA,MAC5BpB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,YAAY,IAAIqB;AAAA,MACnBrB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,eAAe,IAAIsB;AAAA,MACtBtB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,cAAc,IAAIuB;AAAA,MACrBvB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,gBAAgB,IAAIwB;AAAA,MACvBxB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,kBAAkB,IAAIyB;AAAA,MACzBzB;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,iBAAiB,IAAI0B;AAAA,MACxB1B;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,iBAAiB,IAAI2B;AAAA,MACxB3B;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,iBAAiB,IAAI4B;AAAA,MACxB5B;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP,GACA,KAAK,qBAAqB,IAAI6B;AAAA,MAC5B7B;AAAA,MACA,KAAK;AAAA,MACL,KAAK;AAAA,IACP;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQF,MAAa,mBAAmB;AACvB,WAAA,MAAM,KAAK,aAAa,iBAAiB;AAAA,EAAA;AAEpD;"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";var n=Object.defineProperty;var s=(a,t,e)=>t in a?n(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var i=(a,t,e)=>s(a,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../abis/mainnet/InstitutionalVault.cjs"),c=require("../../constants-BI6T6ZbJ.cjs"),h=require("../../errors/validation-errors.cjs"),l=require("../../getContract-CPwqa1sR.cjs");class d{constructor(t,e,r){i(this,"viemChain");i(this,"address");this.walletClient=e,this.publicClient=r,this.viemChain=c.VIEM_CHAINS[t]}
|
|
1
|
+
"use strict";var n=Object.defineProperty;var s=(a,t,e)=>t in a?n(a,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):a[t]=e;var i=(a,t,e)=>s(a,typeof t!="symbol"?t+"":t,e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const o=require("../abis/mainnet/InstitutionalVault.cjs"),c=require("../../constants-BI6T6ZbJ.cjs"),h=require("../../errors/validation-errors.cjs"),l=require("../../getContract-CPwqa1sR.cjs");class d{constructor(t,e,r){i(this,"viemChain");i(this,"address");this.walletClient=e,this.publicClient=r,this.viemChain=c.VIEM_CHAINS[t]}withAddress(t){return this.address=t,this}getAddress(){return this.address}getContract(){if(!this.address)throw new h.InvalidContractAddressError("No address specified for the contract",{fixMessage:"Set the contract address in the handler by using the setAddress method"});const t=o.InstitutionalVault,e={public:this.publicClient,wallet:this.walletClient};return l.getContract({address:this.address,abi:t,client:e})}getBeaconDepositContract(){return this.getContract().read.BEACON_DEPOSIT_CONTRACT()}getEigenDelegationManager(){return this.getContract().read.EIGEN_DELEGATION_MANAGER()}getEigenPodManager(){return this.getContract().read.EIGEN_POD_MANAGER()}getEigenPod(){return this.getContract().read.getEigenPod()}allowance(t,e){return this.getContract().read.allowance([t,e])}approve(t,e){return this.getContract().write.approve([t,e],{account:this.walletClient.account,chain:this.viemChain})}asset(){return this.getContract().read.asset()}authority(){return this.getContract().read.authority()}balanceOf(t){return this.getContract().read.balanceOf([t])}decimals(){return this.getContract().read.decimals()}completeQueuedWithdrawals(t,e){return this.getContract().write.completeQueuedWithdrawals([t,e],{account:this.walletClient.account,chain:this.viemChain})}convertToAssets(t){return this.getContract().read.convertToAssets([t])}convertToShares(t){return this.getContract().read.convertToShares([t])}deposit(t,e){return this.getContract().write.deposit([t,e],{account:this.walletClient.account,chain:this.viemChain})}depositETH(t,e){return this.getContract().write.depositETH([t],{account:this.walletClient.account,chain:this.viemChain,value:e})}getNonRestakedValidatorETH(){return this.getContract().read.getNonRestakedValidatorETH()}getRestakedValidatorETH(){return this.getContract().read.getRestakedValidatorETH()}getWithdrawalCredentials(){return this.getContract().read.getWithdrawalCredentials()}maxDeposit(t){return this.getContract().read.maxDeposit([t])}maxMint(t){return this.getContract().read.maxMint([t])}maxRedeem(t){return this.getContract().read.maxRedeem([t])}maxWithdraw(t){return this.getContract().read.maxWithdraw([t])}mint(t,e){return this.getContract().write.mint([t,e],{account:this.walletClient.account,chain:this.viemChain})}name(){return this.getContract().read.name()}previewDeposit(t){return this.getContract().read.previewDeposit([t])}previewMint(t){return this.getContract().read.previewMint([t])}previewRedeem(t){return this.getContract().read.previewRedeem([t])}previewWithdraw(t){return this.getContract().read.previewWithdraw([t])}queueWithdrawals(t){return this.getContract().write.queueWithdrawals([t],{account:this.walletClient.account,chain:this.viemChain})}redeem(t,e,r){return this.getContract().write.redeem([t,e,r],{account:this.walletClient.account,chain:this.viemChain})}setValidatorsETH(t,e){return this.getContract().write.setValidatorsETH([t,e],{account:this.walletClient.account,chain:this.viemChain})}startNonRestakingValidators(t,e,r){return this.getContract().write.startNonRestakingValidators([t,e,r],{account:this.walletClient.account,chain:this.viemChain})}startRestakingValidators(t,e,r){return this.getContract().write.startRestakingValidators([t,e,r],{account:this.walletClient.account,chain:this.viemChain})}withdraw(t,e,r){return this.getContract().write.withdraw([t,e,r],{account:this.walletClient.account,chain:this.viemChain})}symbol(){return this.getContract().read.symbol()}totalAssets(){return this.getContract().read.totalAssets()}totalSupply(){return this.getContract().read.totalSupply()}transfer(t,e){return this.getContract().write.transfer([t,e],{account:this.walletClient.account,chain:this.viemChain})}transferFrom(t,e,r){return this.getContract().write.transferFrom([t,e,r],{account:this.walletClient.account,chain:this.viemChain})}}exports.InstitutionalVaultHandler=d;
|
|
2
2
|
//# sourceMappingURL=institutional-vault-handler.cjs.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"institutional-vault-handler.cjs","sources":["../../../lib/contracts/handlers/institutional-vault-handler.ts"],"sourcesContent":["import {\n Chain as ViemChain,\n WalletClient,\n PublicClient,\n getContract,\n GetContractReturnType,\n Address,\n} from 'viem';\nimport { InstitutionalVault } from '../abis/mainnet/InstitutionalVault';\nimport { Chain, VIEM_CHAINS } from '../../chains/constants';\nimport { InvalidContractAddressError } from '../../errors/validation-errors';\n\nexport type QueuedWithdrawal = {\n staker: Address;\n delegatedTo: Address;\n withdrawer: Address;\n nonce: bigint;\n startBlock: number;\n strategies: Address[];\n scaledShares: bigint[];\n};\n\n/**\n * Handler for the `InstitutionalVault` contract exposing methods to\n * interact with the contract.\n */\nexport class InstitutionalVaultHandler {\n private viemChain: ViemChain;\n private address?: Address;\n\n /**\n * Create the handler for the `InstitutionalVault` contract exposing\n * methods to interact with the contract.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n }\n\n /**\n * Set the address of the contract for this handler.\n *\n * @param address The address of the contract.\n * @returns The handler.\n */\n public setAddress(address: Address) {\n this.address = address;\n\n return this;\n }\n\n /**\n * Get the address of the contract for this handler.\n *\n * @returns The address of the contract.\n */\n public getAddress() {\n return this.address;\n }\n\n /**\n * Get the contract. This is a method because the typings are complex\n * and lost when trying to make it a member.\n *\n * @returns The viem contract.\n */\n public getContract() {\n if (!this.address) {\n throw new InvalidContractAddressError(\n `No address specified for the contract`,\n {\n fixMessage: `Set the contract address in the handler by using the setAddress method`,\n },\n );\n }\n\n const abi = InstitutionalVault;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({\n address: this.address,\n abi,\n client,\n }) as GetContractReturnType<typeof abi, typeof client, Address>;\n }\n\n /**\n * Get the beacon deposit contract address.\n *\n * @returns The beacon deposit contract address.\n */\n public getBeaconDepositContract() {\n return this.getContract().read.BEACON_DEPOSIT_CONTRACT();\n }\n\n /**\n * Get the eigen delegation manager contract address.\n *\n * @returns The eigen delegation manager.\n */\n public getEigenDelegationManager() {\n return this.getContract().read.EIGEN_DELEGATION_MANAGER();\n }\n\n /**\n * Get the eigen pod manager contract address.\n *\n * @returns The eigen pod manager contract address.\n */\n public getEigenPodManager() {\n return this.getContract().read.EIGEN_POD_MANAGER();\n }\n\n /**\n * Get the eigen pod address.\n *\n * @returns The eigen pod address.\n */\n public getEigenPod() {\n return this.getContract().read.getEigenPod();\n }\n\n /**\n * Get the allowance for the spender to spend the owner's tokens.\n *\n * @param owner The owner of the tokens.\n * @param spender The spender of the tokens.\n * @returns The allowance of the owner for the spender.\n */\n public allowance(owner: Address, spender: Address) {\n return this.getContract().read.allowance([owner, spender]);\n }\n\n /**\n * Approve the spender to spend the owner's tokens.\n *\n * @param spender The spender of the tokens.\n * @param amount The amount of tokens to approve.\n */\n public approve(spender: Address, amount: bigint) {\n return this.getContract().write.approve([spender, amount], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the asset of the vault.\n *\n * @returns The asset of the vault.\n */\n public asset() {\n return this.getContract().read.asset();\n }\n\n /**\n * Get the authority of the vault.\n *\n * @returns The authority of the vault.\n */\n public authority() {\n return this.getContract().read.authority();\n }\n\n /**\n * Get the balance of the address.\n *\n * @param address The address to get the balance of.\n * @returns The balance of the address.\n */\n public balanceOf(address: Address) {\n return this.getContract().read.balanceOf([address]);\n }\n\n /**\n * Get the number of decimals of the token.\n *\n * @returns The number of decimals of the token.\n */\n public decimals() {\n return this.getContract().read.decimals();\n }\n\n /**\n * Complete the queued withdrawals.\n *\n * @param withdrawals The withdrawals to complete.\n * @param receiveAsTokens Whether to receive the assets as tokens.\n */\n public completeQueuedWithdrawals(\n withdrawals: QueuedWithdrawal[],\n receiveAsTokens: boolean[],\n ) {\n return this.getContract().write.completeQueuedWithdrawals(\n [withdrawals, receiveAsTokens],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Convert shares to assets.\n *\n * @param shares The number of shares to convert.\n * @returns The number of assets.\n */\n public convertToAssets(shares: bigint) {\n return this.getContract().read.convertToAssets([shares]);\n }\n\n /**\n * Convert assets to shares.\n *\n * @param assets The number of assets to convert.\n * @returns The number of shares.\n */\n public convertToShares(assets: bigint) {\n return this.getContract().read.convertToShares([assets]);\n }\n\n /**\n * Deposit assets into the vault.\n *\n * @param assets The number of assets to deposit.\n * @param receiver The address to receive the shares.\n */\n public deposit(assets: bigint, receiver: Address) {\n return this.getContract().write.deposit([assets, receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Deposit ETH into the vault.\n *\n * @param receiver The address to receive the shares.\n * @param value The amount of ETH to deposit.\n */\n public depositETH(receiver: Address, value: bigint) {\n return this.getContract().write.depositETH([receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n value,\n });\n }\n\n /**\n * Get the non-restaked validator ETH.\n *\n * @returns The non-restaked validator ETH.\n */\n public getNonRestakedValidatorETH() {\n return this.getContract().read.getNonRestakedValidatorETH();\n }\n\n /**\n * Get the restaked validator ETH.\n *\n * @returns The restaked validator ETH.\n */\n public getRestakedValidatorETH() {\n return this.getContract().read.getRestakedValidatorETH();\n }\n\n /**\n * Get the withdrawal credentials.\n *\n * @returns The withdrawal credentials.\n */\n public getWithdrawalCredentials() {\n return this.getContract().read.getWithdrawalCredentials();\n }\n\n /**\n * Get the maximum deposit amount for the address.\n *\n * @param address The address to get the maximum deposit amount for.\n * @returns The maximum deposit amount for the address.\n */\n public maxDeposit(address: Address) {\n return this.getContract().read.maxDeposit([address]);\n }\n\n /**\n * Get the maximum mint amount for the address.\n *\n * @param address The address to get the maximum mint amount for.\n * @returns The maximum mint amount for the address.\n */\n public maxMint(address: Address) {\n return this.getContract().read.maxMint([address]);\n }\n\n /**\n * Get the maximum redeem amount for the address.\n *\n * @param address The address to get the maximum redeem amount for.\n * @returns The maximum redeem amount for the address.\n */\n public maxRedeem(address: Address) {\n return this.getContract().read.maxRedeem([address]);\n }\n\n /**\n * Get the maximum withdraw amount for the address.\n *\n * @param address The address to get the maximum withdraw amount for.\n * @returns The maximum withdraw amount for the address.\n */\n public maxWithdraw(address: Address) {\n return this.getContract().read.maxWithdraw([address]);\n }\n\n /**\n * Mint shares to the receiver.\n *\n * @param shares The number of shares to mint.\n * @param receiver The address to receive the shares.\n */\n public mint(shares: bigint, receiver: Address) {\n return this.getContract().write.mint([shares, receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the name of the contract.\n *\n * @returns The name of the contract.\n */\n public name() {\n return this.getContract().read.name();\n }\n\n /**\n * Preview the deposit amount for the assets.\n *\n * @param assets The number of assets to deposit.\n * @returns The number of shares to receive.\n */\n public previewDeposit(assets: bigint) {\n return this.getContract().read.previewDeposit([assets]);\n }\n\n /**\n * Preview the mint amount for the shares.\n *\n * @param shares The number of shares to mint.\n * @returns The number of assets to receive.\n */\n public previewMint(shares: bigint) {\n return this.getContract().read.previewMint([shares]);\n }\n\n /**\n * Preview the redeem amount for the shares.\n *\n * @param shares The number of shares to redeem.\n * @returns The number of assets to receive.\n */\n public previewRedeem(shares: bigint) {\n return this.getContract().read.previewRedeem([shares]);\n }\n\n /**\n * Preview the withdraw amount for the shares.\n *\n * @param shares The number of shares to withdraw.\n * @returns The number of assets to receive.\n */\n public previewWithdraw(shares: bigint) {\n return this.getContract().read.previewWithdraw([shares]);\n }\n\n /**\n * Queue the withdrawals.\n *\n * @param shares The number of shares to withdraw.\n */\n public queueWithdrawals(shares: bigint) {\n return this.getContract().write.queueWithdrawals([shares], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Redeem the shares to the receiver.\n *\n * @param shares The number of shares to redeem.\n * @param receiver The address to receive the assets.\n * @param owner The owner of the shares.\n */\n public redeem(shares: bigint, receiver: Address, owner: Address) {\n return this.getContract().write.redeem([shares, receiver, owner], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Set the validators ETH.\n *\n * @param restakedValidatorsETH The amount of restaked validator ETH.\n * @param nonRestakedValidatorsETH The amount of non-restaked validator ETH.\n */\n public setValidatorsETH(\n restakedValidatorsETH: bigint,\n nonRestakedValidatorsETH: bigint,\n ) {\n return this.getContract().write.setValidatorsETH(\n [restakedValidatorsETH, nonRestakedValidatorsETH],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Start the non-restaking validators.\n *\n * @param pubKeys The public keys of the validators.\n * @param signatures The signatures of the validators.\n * @param depositDataRoots The deposit data roots of the validators.\n */\n public startNonRestakingValidators(\n pubKeys: Address[],\n signatures: Address[],\n depositDataRoots: Address[],\n ) {\n return this.getContract().write.startNonRestakingValidators(\n [pubKeys, signatures, depositDataRoots],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Start the restaking validators.\n *\n * @param pubKeys The public keys of the validators.\n * @param signatures The signatures of the validators.\n * @param depositDataRoots The deposit data roots of the validators.\n */\n public startRestakingValidators(\n pubKeys: Address[],\n signatures: Address[],\n depositDataRoots: Address[],\n ) {\n return this.getContract().write.startRestakingValidators(\n [pubKeys, signatures, depositDataRoots],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Withdraw the assets to the receiver.\n *\n * @param assets The number of assets to withdraw.\n * @param receiver The address to receive the assets.\n * @param owner The owner of the assets.\n */\n public withdraw(assets: bigint, receiver: Address, owner: Address) {\n return this.getContract().write.withdraw([assets, receiver, owner], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the symbol of the contract.\n *\n * @returns The symbol of the contract.\n */\n public symbol() {\n return this.getContract().read.symbol();\n }\n\n /**\n * Get the total assets of the vault.\n *\n * @returns The total assets of the vault.\n */\n public totalAssets() {\n return this.getContract().read.totalAssets();\n }\n\n /**\n * Get the total supply of the vault.\n *\n * @returns The total supply of the vault.\n */\n public totalSupply() {\n return this.getContract().read.totalSupply();\n }\n\n /**\n * Transfer the value to the to address.\n *\n * @param to The address to transfer the value to.\n * @param value The amount of value to transfer.\n */\n public transfer(to: Address, value: bigint) {\n return this.getContract().write.transfer([to, value], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Transfer the value from the from address to the to address.\n *\n * @param from The address to transfer the value from.\n * @param to The address to transfer the value to.\n * @param value The amount of value to transfer.\n */\n public transferFrom(from: Address, to: Address, value: bigint) {\n return this.getContract().write.transferFrom([from, to, value], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n}\n"],"names":["InstitutionalVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","address","InvalidContractAddressError","abi","InstitutionalVault","client","getContract","owner","spender","amount","withdrawals","receiveAsTokens","shares","assets","receiver","value","restakedValidatorsETH","nonRestakedValidatorsETH","pubKeys","signatures","depositDataRoots","to","from"],"mappings":"obA0BO,MAAMA,CAA0B,CAcrC,YACEC,EACQC,EACAC,EACR,CAjBMC,EAAA,kBACAA,EAAA,gBAcE,KAAA,aAAAF,EACA,KAAA,aAAAC,EAEH,KAAA,UAAYE,cAAYJ,CAAK,CAAA,CAS7B,WAAWK,EAAkB,CAClC,YAAK,QAAUA,EAER,IAAA,CAQF,YAAa,CAClB,OAAO,KAAK,OAAA,CASP,aAAc,CACf,GAAA,CAAC,KAAK,QACR,MAAM,IAAIC,EAAA,4BACR,wCACA,CACE,WAAY,wEAAA,CAEhB,EAGF,MAAMC,EAAMC,EAAA,mBACNC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAa,EAEtE,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OAAA,KAAK,cAAc,MAAM,SAAS,CAACM,EAAIN,CAAK,EAAG,CACpD,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CAUI,aAAaO,EAAeD,EAAaN,EAAe,CACtD,OAAA,KAAK,cAAc,MAAM,aAAa,CAACO,EAAMD,EAAIN,CAAK,EAAG,CAC9D,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CAEL"}
|
|
1
|
+
{"version":3,"file":"institutional-vault-handler.cjs","sources":["../../../lib/contracts/handlers/institutional-vault-handler.ts"],"sourcesContent":["import {\n Chain as ViemChain,\n WalletClient,\n PublicClient,\n getContract,\n GetContractReturnType,\n Address,\n} from 'viem';\nimport { InstitutionalVault } from '../abis/mainnet/InstitutionalVault';\nimport { Chain, VIEM_CHAINS } from '../../chains/constants';\nimport { InvalidContractAddressError } from '../../errors/validation-errors';\n\nexport type QueuedWithdrawal = {\n staker: Address;\n delegatedTo: Address;\n withdrawer: Address;\n nonce: bigint;\n startBlock: number;\n strategies: Address[];\n scaledShares: bigint[];\n};\n\n/**\n * Handler for the `InstitutionalVault` contract exposing methods to\n * interact with the contract.\n */\nexport class InstitutionalVaultHandler {\n private viemChain: ViemChain;\n private address?: Address;\n\n /**\n * Create the handler for the `InstitutionalVault` contract exposing\n * methods to interact with the contract.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n }\n\n /**\n * Set the address of the contract for this handler.\n *\n * @param address The address of the contract.\n * @returns The handler.\n */\n public withAddress(address: Address) {\n this.address = address;\n\n return this;\n }\n\n /**\n * Get the address of the contract for this handler.\n *\n * @returns The address of the contract.\n */\n public getAddress() {\n return this.address;\n }\n\n /**\n * Get the contract. This is a method because the typings are complex\n * and lost when trying to make it a member.\n *\n * @returns The viem contract.\n */\n public getContract() {\n if (!this.address) {\n throw new InvalidContractAddressError(\n `No address specified for the contract`,\n {\n fixMessage: `Set the contract address in the handler by using the setAddress method`,\n },\n );\n }\n\n const abi = InstitutionalVault;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({\n address: this.address,\n abi,\n client,\n }) as GetContractReturnType<typeof abi, typeof client, Address>;\n }\n\n /**\n * Get the beacon deposit contract address.\n *\n * @returns The beacon deposit contract address.\n */\n public getBeaconDepositContract() {\n return this.getContract().read.BEACON_DEPOSIT_CONTRACT();\n }\n\n /**\n * Get the eigen delegation manager contract address.\n *\n * @returns The eigen delegation manager.\n */\n public getEigenDelegationManager() {\n return this.getContract().read.EIGEN_DELEGATION_MANAGER();\n }\n\n /**\n * Get the eigen pod manager contract address.\n *\n * @returns The eigen pod manager contract address.\n */\n public getEigenPodManager() {\n return this.getContract().read.EIGEN_POD_MANAGER();\n }\n\n /**\n * Get the eigen pod address.\n *\n * @returns The eigen pod address.\n */\n public getEigenPod() {\n return this.getContract().read.getEigenPod();\n }\n\n /**\n * Get the allowance for the spender to spend the owner's tokens.\n *\n * @param owner The owner of the tokens.\n * @param spender The spender of the tokens.\n * @returns The allowance of the owner for the spender.\n */\n public allowance(owner: Address, spender: Address) {\n return this.getContract().read.allowance([owner, spender]);\n }\n\n /**\n * Approve the spender to spend the owner's tokens.\n *\n * @param spender The spender of the tokens.\n * @param amount The amount of tokens to approve.\n */\n public approve(spender: Address, amount: bigint) {\n return this.getContract().write.approve([spender, amount], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the asset of the vault.\n *\n * @returns The asset of the vault.\n */\n public asset() {\n return this.getContract().read.asset();\n }\n\n /**\n * Get the authority of the vault.\n *\n * @returns The authority of the vault.\n */\n public authority() {\n return this.getContract().read.authority();\n }\n\n /**\n * Get the balance of the address.\n *\n * @param address The address to get the balance of.\n * @returns The balance of the address.\n */\n public balanceOf(address: Address) {\n return this.getContract().read.balanceOf([address]);\n }\n\n /**\n * Get the number of decimals of the token.\n *\n * @returns The number of decimals of the token.\n */\n public decimals() {\n return this.getContract().read.decimals();\n }\n\n /**\n * Complete the queued withdrawals.\n *\n * @param withdrawals The withdrawals to complete.\n * @param receiveAsTokens Whether to receive the assets as tokens.\n */\n public completeQueuedWithdrawals(\n withdrawals: QueuedWithdrawal[],\n receiveAsTokens: boolean[],\n ) {\n return this.getContract().write.completeQueuedWithdrawals(\n [withdrawals, receiveAsTokens],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Convert shares to assets.\n *\n * @param shares The number of shares to convert.\n * @returns The number of assets.\n */\n public convertToAssets(shares: bigint) {\n return this.getContract().read.convertToAssets([shares]);\n }\n\n /**\n * Convert assets to shares.\n *\n * @param assets The number of assets to convert.\n * @returns The number of shares.\n */\n public convertToShares(assets: bigint) {\n return this.getContract().read.convertToShares([assets]);\n }\n\n /**\n * Deposit assets into the vault.\n *\n * @param assets The number of assets to deposit.\n * @param receiver The address to receive the shares.\n */\n public deposit(assets: bigint, receiver: Address) {\n return this.getContract().write.deposit([assets, receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Deposit ETH into the vault.\n *\n * @param receiver The address to receive the shares.\n * @param value The amount of ETH to deposit.\n */\n public depositETH(receiver: Address, value: bigint) {\n return this.getContract().write.depositETH([receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n value,\n });\n }\n\n /**\n * Get the non-restaked validator ETH.\n *\n * @returns The non-restaked validator ETH.\n */\n public getNonRestakedValidatorETH() {\n return this.getContract().read.getNonRestakedValidatorETH();\n }\n\n /**\n * Get the restaked validator ETH.\n *\n * @returns The restaked validator ETH.\n */\n public getRestakedValidatorETH() {\n return this.getContract().read.getRestakedValidatorETH();\n }\n\n /**\n * Get the withdrawal credentials.\n *\n * @returns The withdrawal credentials.\n */\n public getWithdrawalCredentials() {\n return this.getContract().read.getWithdrawalCredentials();\n }\n\n /**\n * Get the maximum deposit amount for the address.\n *\n * @param address The address to get the maximum deposit amount for.\n * @returns The maximum deposit amount for the address.\n */\n public maxDeposit(address: Address) {\n return this.getContract().read.maxDeposit([address]);\n }\n\n /**\n * Get the maximum mint amount for the address.\n *\n * @param address The address to get the maximum mint amount for.\n * @returns The maximum mint amount for the address.\n */\n public maxMint(address: Address) {\n return this.getContract().read.maxMint([address]);\n }\n\n /**\n * Get the maximum redeem amount for the address.\n *\n * @param address The address to get the maximum redeem amount for.\n * @returns The maximum redeem amount for the address.\n */\n public maxRedeem(address: Address) {\n return this.getContract().read.maxRedeem([address]);\n }\n\n /**\n * Get the maximum withdraw amount for the address.\n *\n * @param address The address to get the maximum withdraw amount for.\n * @returns The maximum withdraw amount for the address.\n */\n public maxWithdraw(address: Address) {\n return this.getContract().read.maxWithdraw([address]);\n }\n\n /**\n * Mint shares to the receiver.\n *\n * @param shares The number of shares to mint.\n * @param receiver The address to receive the shares.\n */\n public mint(shares: bigint, receiver: Address) {\n return this.getContract().write.mint([shares, receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the name of the contract.\n *\n * @returns The name of the contract.\n */\n public name() {\n return this.getContract().read.name();\n }\n\n /**\n * Preview the deposit amount for the assets.\n *\n * @param assets The number of assets to deposit.\n * @returns The number of shares to receive.\n */\n public previewDeposit(assets: bigint) {\n return this.getContract().read.previewDeposit([assets]);\n }\n\n /**\n * Preview the mint amount for the shares.\n *\n * @param shares The number of shares to mint.\n * @returns The number of assets to receive.\n */\n public previewMint(shares: bigint) {\n return this.getContract().read.previewMint([shares]);\n }\n\n /**\n * Preview the redeem amount for the shares.\n *\n * @param shares The number of shares to redeem.\n * @returns The number of assets to receive.\n */\n public previewRedeem(shares: bigint) {\n return this.getContract().read.previewRedeem([shares]);\n }\n\n /**\n * Preview the withdraw amount for the shares.\n *\n * @param shares The number of shares to withdraw.\n * @returns The number of assets to receive.\n */\n public previewWithdraw(shares: bigint) {\n return this.getContract().read.previewWithdraw([shares]);\n }\n\n /**\n * Queue the withdrawals.\n *\n * @param shares The number of shares to withdraw.\n */\n public queueWithdrawals(shares: bigint) {\n return this.getContract().write.queueWithdrawals([shares], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Redeem the shares to the receiver.\n *\n * @param shares The number of shares to redeem.\n * @param receiver The address to receive the assets.\n * @param owner The owner of the shares.\n */\n public redeem(shares: bigint, receiver: Address, owner: Address) {\n return this.getContract().write.redeem([shares, receiver, owner], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Set the validators ETH.\n *\n * @param restakedValidatorsETH The amount of restaked validator ETH.\n * @param nonRestakedValidatorsETH The amount of non-restaked validator ETH.\n */\n public setValidatorsETH(\n restakedValidatorsETH: bigint,\n nonRestakedValidatorsETH: bigint,\n ) {\n return this.getContract().write.setValidatorsETH(\n [restakedValidatorsETH, nonRestakedValidatorsETH],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Start the non-restaking validators.\n *\n * @param pubKeys The public keys of the validators.\n * @param signatures The signatures of the validators.\n * @param depositDataRoots The deposit data roots of the validators.\n */\n public startNonRestakingValidators(\n pubKeys: Address[],\n signatures: Address[],\n depositDataRoots: Address[],\n ) {\n return this.getContract().write.startNonRestakingValidators(\n [pubKeys, signatures, depositDataRoots],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Start the restaking validators.\n *\n * @param pubKeys The public keys of the validators.\n * @param signatures The signatures of the validators.\n * @param depositDataRoots The deposit data roots of the validators.\n */\n public startRestakingValidators(\n pubKeys: Address[],\n signatures: Address[],\n depositDataRoots: Address[],\n ) {\n return this.getContract().write.startRestakingValidators(\n [pubKeys, signatures, depositDataRoots],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Withdraw the assets to the receiver.\n *\n * @param assets The number of assets to withdraw.\n * @param receiver The address to receive the assets.\n * @param owner The owner of the assets.\n */\n public withdraw(assets: bigint, receiver: Address, owner: Address) {\n return this.getContract().write.withdraw([assets, receiver, owner], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the symbol of the contract.\n *\n * @returns The symbol of the contract.\n */\n public symbol() {\n return this.getContract().read.symbol();\n }\n\n /**\n * Get the total assets of the vault.\n *\n * @returns The total assets of the vault.\n */\n public totalAssets() {\n return this.getContract().read.totalAssets();\n }\n\n /**\n * Get the total supply of the vault.\n *\n * @returns The total supply of the vault.\n */\n public totalSupply() {\n return this.getContract().read.totalSupply();\n }\n\n /**\n * Transfer the value to the to address.\n *\n * @param to The address to transfer the value to.\n * @param value The amount of value to transfer.\n */\n public transfer(to: Address, value: bigint) {\n return this.getContract().write.transfer([to, value], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Transfer the value from the from address to the to address.\n *\n * @param from The address to transfer the value from.\n * @param to The address to transfer the value to.\n * @param value The amount of value to transfer.\n */\n public transferFrom(from: Address, to: Address, value: bigint) {\n return this.getContract().write.transferFrom([from, to, value], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n}\n"],"names":["InstitutionalVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","address","InvalidContractAddressError","abi","InstitutionalVault","client","getContract","owner","spender","amount","withdrawals","receiveAsTokens","shares","assets","receiver","value","restakedValidatorsETH","nonRestakedValidatorsETH","pubKeys","signatures","depositDataRoots","to","from"],"mappings":"obA0BO,MAAMA,CAA0B,CAcrC,YACEC,EACQC,EACAC,EACR,CAjBMC,EAAA,kBACAA,EAAA,gBAcE,KAAA,aAAAF,EACA,KAAA,aAAAC,EAEH,KAAA,UAAYE,cAAYJ,CAAK,CAAA,CAS7B,YAAYK,EAAkB,CACnC,YAAK,QAAUA,EAER,IAAA,CAQF,YAAa,CAClB,OAAO,KAAK,OAAA,CASP,aAAc,CACf,GAAA,CAAC,KAAK,QACR,MAAM,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CAQjC,aAAc,CACnB,OAAO,KAAK,cAAc,KAAK,YAAY,CAAA,CAQtC,aAAc,CACnB,OAAO,KAAK,cAAc,KAAK,YAAY,CAAA,CAStC,SAASc,EAAaN,EAAe,CACnC,OAAA,KAAK,cAAc,MAAM,SAAS,CAACM,EAAIN,CAAK,EAAG,CACpD,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CAUI,aAAaO,EAAeD,EAAaN,EAAe,CACtD,OAAA,KAAK,cAAc,MAAM,aAAa,CAACO,EAAMD,EAAIN,CAAK,EAAG,CAC9D,QAAS,KAAK,aAAa,QAC3B,MAAO,KAAK,SAAA,CACb,CAAA,CAEL"}
|
|
@@ -35,7 +35,7 @@ export declare class InstitutionalVaultHandler {
|
|
|
35
35
|
* @param address The address of the contract.
|
|
36
36
|
* @returns The handler.
|
|
37
37
|
*/
|
|
38
|
-
|
|
38
|
+
withAddress(address: Address): this;
|
|
39
39
|
/**
|
|
40
40
|
* Get the address of the contract for this handler.
|
|
41
41
|
*
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"institutional-vault-handler.js","sources":["../../../lib/contracts/handlers/institutional-vault-handler.ts"],"sourcesContent":["import {\n Chain as ViemChain,\n WalletClient,\n PublicClient,\n getContract,\n GetContractReturnType,\n Address,\n} from 'viem';\nimport { InstitutionalVault } from '../abis/mainnet/InstitutionalVault';\nimport { Chain, VIEM_CHAINS } from '../../chains/constants';\nimport { InvalidContractAddressError } from '../../errors/validation-errors';\n\nexport type QueuedWithdrawal = {\n staker: Address;\n delegatedTo: Address;\n withdrawer: Address;\n nonce: bigint;\n startBlock: number;\n strategies: Address[];\n scaledShares: bigint[];\n};\n\n/**\n * Handler for the `InstitutionalVault` contract exposing methods to\n * interact with the contract.\n */\nexport class InstitutionalVaultHandler {\n private viemChain: ViemChain;\n private address?: Address;\n\n /**\n * Create the handler for the `InstitutionalVault` contract exposing\n * methods to interact with the contract.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n }\n\n /**\n * Set the address of the contract for this handler.\n *\n * @param address The address of the contract.\n * @returns The handler.\n */\n public setAddress(address: Address) {\n this.address = address;\n\n return this;\n }\n\n /**\n * Get the address of the contract for this handler.\n *\n * @returns The address of the contract.\n */\n public getAddress() {\n return this.address;\n }\n\n /**\n * Get the contract. This is a method because the typings are complex\n * and lost when trying to make it a member.\n *\n * @returns The viem contract.\n */\n public getContract() {\n if (!this.address) {\n throw new InvalidContractAddressError(\n `No address specified for the contract`,\n {\n fixMessage: `Set the contract address in the handler by using the setAddress method`,\n },\n );\n }\n\n const abi = InstitutionalVault;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({\n address: this.address,\n abi,\n client,\n }) as GetContractReturnType<typeof abi, typeof client, Address>;\n }\n\n /**\n * Get the beacon deposit contract address.\n *\n * @returns The beacon deposit contract address.\n */\n public getBeaconDepositContract() {\n return this.getContract().read.BEACON_DEPOSIT_CONTRACT();\n }\n\n /**\n * Get the eigen delegation manager contract address.\n *\n * @returns The eigen delegation manager.\n */\n public getEigenDelegationManager() {\n return this.getContract().read.EIGEN_DELEGATION_MANAGER();\n }\n\n /**\n * Get the eigen pod manager contract address.\n *\n * @returns The eigen pod manager contract address.\n */\n public getEigenPodManager() {\n return this.getContract().read.EIGEN_POD_MANAGER();\n }\n\n /**\n * Get the eigen pod address.\n *\n * @returns The eigen pod address.\n */\n public getEigenPod() {\n return this.getContract().read.getEigenPod();\n }\n\n /**\n * Get the allowance for the spender to spend the owner's tokens.\n *\n * @param owner The owner of the tokens.\n * @param spender The spender of the tokens.\n * @returns The allowance of the owner for the spender.\n */\n public allowance(owner: Address, spender: Address) {\n return this.getContract().read.allowance([owner, spender]);\n }\n\n /**\n * Approve the spender to spend the owner's tokens.\n *\n * @param spender The spender of the tokens.\n * @param amount The amount of tokens to approve.\n */\n public approve(spender: Address, amount: bigint) {\n return this.getContract().write.approve([spender, amount], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the asset of the vault.\n *\n * @returns The asset of the vault.\n */\n public asset() {\n return this.getContract().read.asset();\n }\n\n /**\n * Get the authority of the vault.\n *\n * @returns The authority of the vault.\n */\n public authority() {\n return this.getContract().read.authority();\n }\n\n /**\n * Get the balance of the address.\n *\n * @param address The address to get the balance of.\n * @returns The balance of the address.\n */\n public balanceOf(address: Address) {\n return this.getContract().read.balanceOf([address]);\n }\n\n /**\n * Get the number of decimals of the token.\n *\n * @returns The number of decimals of the token.\n */\n public decimals() {\n return this.getContract().read.decimals();\n }\n\n /**\n * Complete the queued withdrawals.\n *\n * @param withdrawals The withdrawals to complete.\n * @param receiveAsTokens Whether to receive the assets as tokens.\n */\n public completeQueuedWithdrawals(\n withdrawals: QueuedWithdrawal[],\n receiveAsTokens: boolean[],\n ) {\n return this.getContract().write.completeQueuedWithdrawals(\n [withdrawals, receiveAsTokens],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Convert shares to assets.\n *\n * @param shares The number of shares to convert.\n * @returns The number of assets.\n */\n public convertToAssets(shares: bigint) {\n return this.getContract().read.convertToAssets([shares]);\n }\n\n /**\n * Convert assets to shares.\n *\n * @param assets The number of assets to convert.\n * @returns The number of shares.\n */\n public convertToShares(assets: bigint) {\n return this.getContract().read.convertToShares([assets]);\n }\n\n /**\n * Deposit assets into the vault.\n *\n * @param assets The number of assets to deposit.\n * @param receiver The address to receive the shares.\n */\n public deposit(assets: bigint, receiver: Address) {\n return this.getContract().write.deposit([assets, receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Deposit ETH into the vault.\n *\n * @param receiver The address to receive the shares.\n * @param value The amount of ETH to deposit.\n */\n public depositETH(receiver: Address, value: bigint) {\n return this.getContract().write.depositETH([receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n value,\n });\n }\n\n /**\n * Get the non-restaked validator ETH.\n *\n * @returns The non-restaked validator ETH.\n */\n public getNonRestakedValidatorETH() {\n return this.getContract().read.getNonRestakedValidatorETH();\n }\n\n /**\n * Get the restaked validator ETH.\n *\n * @returns The restaked validator ETH.\n */\n public getRestakedValidatorETH() {\n return this.getContract().read.getRestakedValidatorETH();\n }\n\n /**\n * Get the withdrawal credentials.\n *\n * @returns The withdrawal credentials.\n */\n public getWithdrawalCredentials() {\n return this.getContract().read.getWithdrawalCredentials();\n }\n\n /**\n * Get the maximum deposit amount for the address.\n *\n * @param address The address to get the maximum deposit amount for.\n * @returns The maximum deposit amount for the address.\n */\n public maxDeposit(address: Address) {\n return this.getContract().read.maxDeposit([address]);\n }\n\n /**\n * Get the maximum mint amount for the address.\n *\n * @param address The address to get the maximum mint amount for.\n * @returns The maximum mint amount for the address.\n */\n public maxMint(address: Address) {\n return this.getContract().read.maxMint([address]);\n }\n\n /**\n * Get the maximum redeem amount for the address.\n *\n * @param address The address to get the maximum redeem amount for.\n * @returns The maximum redeem amount for the address.\n */\n public maxRedeem(address: Address) {\n return this.getContract().read.maxRedeem([address]);\n }\n\n /**\n * Get the maximum withdraw amount for the address.\n *\n * @param address The address to get the maximum withdraw amount for.\n * @returns The maximum withdraw amount for the address.\n */\n public maxWithdraw(address: Address) {\n return this.getContract().read.maxWithdraw([address]);\n }\n\n /**\n * Mint shares to the receiver.\n *\n * @param shares The number of shares to mint.\n * @param receiver The address to receive the shares.\n */\n public mint(shares: bigint, receiver: Address) {\n return this.getContract().write.mint([shares, receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the name of the contract.\n *\n * @returns The name of the contract.\n */\n public name() {\n return this.getContract().read.name();\n }\n\n /**\n * Preview the deposit amount for the assets.\n *\n * @param assets The number of assets to deposit.\n * @returns The number of shares to receive.\n */\n public previewDeposit(assets: bigint) {\n return this.getContract().read.previewDeposit([assets]);\n }\n\n /**\n * Preview the mint amount for the shares.\n *\n * @param shares The number of shares to mint.\n * @returns The number of assets to receive.\n */\n public previewMint(shares: bigint) {\n return this.getContract().read.previewMint([shares]);\n }\n\n /**\n * Preview the redeem amount for the shares.\n *\n * @param shares The number of shares to redeem.\n * @returns The number of assets to receive.\n */\n public previewRedeem(shares: bigint) {\n return this.getContract().read.previewRedeem([shares]);\n }\n\n /**\n * Preview the withdraw amount for the shares.\n *\n * @param shares The number of shares to withdraw.\n * @returns The number of assets to receive.\n */\n public previewWithdraw(shares: bigint) {\n return this.getContract().read.previewWithdraw([shares]);\n }\n\n /**\n * Queue the withdrawals.\n *\n * @param shares The number of shares to withdraw.\n */\n public queueWithdrawals(shares: bigint) {\n return this.getContract().write.queueWithdrawals([shares], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Redeem the shares to the receiver.\n *\n * @param shares The number of shares to redeem.\n * @param receiver The address to receive the assets.\n * @param owner The owner of the shares.\n */\n public redeem(shares: bigint, receiver: Address, owner: Address) {\n return this.getContract().write.redeem([shares, receiver, owner], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Set the validators ETH.\n *\n * @param restakedValidatorsETH The amount of restaked validator ETH.\n * @param nonRestakedValidatorsETH The amount of non-restaked validator ETH.\n */\n public setValidatorsETH(\n restakedValidatorsETH: bigint,\n nonRestakedValidatorsETH: bigint,\n ) {\n return this.getContract().write.setValidatorsETH(\n [restakedValidatorsETH, nonRestakedValidatorsETH],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Start the non-restaking validators.\n *\n * @param pubKeys The public keys of the validators.\n * @param signatures The signatures of the validators.\n * @param depositDataRoots The deposit data roots of the validators.\n */\n public startNonRestakingValidators(\n pubKeys: Address[],\n signatures: Address[],\n depositDataRoots: Address[],\n ) {\n return this.getContract().write.startNonRestakingValidators(\n [pubKeys, signatures, depositDataRoots],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Start the restaking validators.\n *\n * @param pubKeys The public keys of the validators.\n * @param signatures The signatures of the validators.\n * @param depositDataRoots The deposit data roots of the validators.\n */\n public startRestakingValidators(\n pubKeys: Address[],\n signatures: Address[],\n depositDataRoots: Address[],\n ) {\n return this.getContract().write.startRestakingValidators(\n [pubKeys, signatures, depositDataRoots],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Withdraw the assets to the receiver.\n *\n * @param assets The number of assets to withdraw.\n * @param receiver The address to receive the assets.\n * @param owner The owner of the assets.\n */\n public withdraw(assets: bigint, receiver: Address, owner: Address) {\n return this.getContract().write.withdraw([assets, receiver, owner], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the symbol of the contract.\n *\n * @returns The symbol of the contract.\n */\n public symbol() {\n return this.getContract().read.symbol();\n }\n\n /**\n * Get the total assets of the vault.\n *\n * @returns The total assets of the vault.\n */\n public totalAssets() {\n return this.getContract().read.totalAssets();\n }\n\n /**\n * Get the total supply of the vault.\n *\n * @returns The total supply of the vault.\n */\n public totalSupply() {\n return this.getContract().read.totalSupply();\n }\n\n /**\n * Transfer the value to the to address.\n *\n * @param to The address to transfer the value to.\n * @param value The amount of value to transfer.\n */\n public transfer(to: Address, value: bigint) {\n return this.getContract().write.transfer([to, value], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Transfer the value from the from address to the to address.\n *\n * @param from The address to transfer the value from.\n * @param to The address to transfer the value to.\n * @param value The amount of value to transfer.\n */\n public transferFrom(from: Address, to: Address, value: bigint) {\n return this.getContract().write.transferFrom([from, to, value], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n}\n"],"names":["InstitutionalVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","address","InvalidContractAddressError","abi","InstitutionalVault","client","getContract","owner","spender","amount","withdrawals","receiveAsTokens","shares","assets","receiver","value","restakedValidatorsETH","nonRestakedValidatorsETH","pubKeys","signatures","depositDataRoots","to","from"],"mappings":";;;;;;;AA0BO,MAAMA,EAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcrC,YACEC,GACQC,GACAC,GACR;AAjBM,IAAAC,EAAA;AACA,IAAAA,EAAA;AAcE,SAAA,eAAAF,GACA,KAAA,eAAAC,GAEH,KAAA,YAAYE,EAAYJ,CAAK;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS7B,WAAWK,GAAkB;AAClC,gBAAK,UAAUA,GAER;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQF,aAAa;AAClB,WAAO,KAAK;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASP,cAAc;AACf,QAAA,CAAC,KAAK;AACR,YAAM,IAAIC;AAAA,QACR;AAAA,QACA;AAAA,UACE,YAAY;AAAA,QAAA;AAAA,MAEhB;AAGF,UAAMC,IAAMC,GACNC,IAAS,EAAE,QAAQ,KAAK,cAAc,QAAQ,KAAK,aAAa;AAEtE,WAAOC,EAAY;AAAA,MACjB,SAAS,KAAK;AAAA,MACd,KAAAH;AAAA,MACA,QAAAE;AAAA,IAAA,CACD;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQI,2BAA2B;AAChC,WAAO,KAAK,cAAc,KAAK,wBAAwB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlD,4BAA4B;AACjC,WAAO,KAAK,cAAc,KAAK,yBAAyB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQnD,qBAAqB;AAC1B,WAAO,KAAK,cAAc,KAAK,kBAAkB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQ5C,cAAc;AACnB,WAAO,KAAK,cA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;AAAA;AAAA;AAAA;AAAA,EAQI,SAAS;AACd,WAAO,KAAK,cAAc,KAAK,OAAO;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC,cAAc;AACnB,WAAO,KAAK,cAAc,KAAK,YAAY;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQtC,cAAc;AACnB,WAAO,KAAK,cAAc,KAAK,YAAY;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAStC,SAASc,GAAaN,GAAe;AACnC,WAAA,KAAK,cAAc,MAAM,SAAS,CAACM,GAAIN,CAAK,GAAG;AAAA,MACpD,SAAS,KAAK,aAAa;AAAA,MAC3B,OAAO,KAAK;AAAA,IAAA,CACb;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUI,aAAaO,GAAeD,GAAaN,GAAe;AACtD,WAAA,KAAK,cAAc,MAAM,aAAa,CAACO,GAAMD,GAAIN,CAAK,GAAG;AAAA,MAC9D,SAAS,KAAK,aAAa;AAAA,MAC3B,OAAO,KAAK;AAAA,IAAA,CACb;AAAA,EAAA;AAEL;"}
|
|
1
|
+
{"version":3,"file":"institutional-vault-handler.js","sources":["../../../lib/contracts/handlers/institutional-vault-handler.ts"],"sourcesContent":["import {\n Chain as ViemChain,\n WalletClient,\n PublicClient,\n getContract,\n GetContractReturnType,\n Address,\n} from 'viem';\nimport { InstitutionalVault } from '../abis/mainnet/InstitutionalVault';\nimport { Chain, VIEM_CHAINS } from '../../chains/constants';\nimport { InvalidContractAddressError } from '../../errors/validation-errors';\n\nexport type QueuedWithdrawal = {\n staker: Address;\n delegatedTo: Address;\n withdrawer: Address;\n nonce: bigint;\n startBlock: number;\n strategies: Address[];\n scaledShares: bigint[];\n};\n\n/**\n * Handler for the `InstitutionalVault` contract exposing methods to\n * interact with the contract.\n */\nexport class InstitutionalVaultHandler {\n private viemChain: ViemChain;\n private address?: Address;\n\n /**\n * Create the handler for the `InstitutionalVault` contract exposing\n * methods to interact with the contract.\n *\n * @param chain Chain to use for the client.\n * @param walletClient The wallet client to use for wallet\n * interactions.\n * @param publicClient The public client to use for public\n * interactions.\n */\n constructor(\n chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\n }\n\n /**\n * Set the address of the contract for this handler.\n *\n * @param address The address of the contract.\n * @returns The handler.\n */\n public withAddress(address: Address) {\n this.address = address;\n\n return this;\n }\n\n /**\n * Get the address of the contract for this handler.\n *\n * @returns The address of the contract.\n */\n public getAddress() {\n return this.address;\n }\n\n /**\n * Get the contract. This is a method because the typings are complex\n * and lost when trying to make it a member.\n *\n * @returns The viem contract.\n */\n public getContract() {\n if (!this.address) {\n throw new InvalidContractAddressError(\n `No address specified for the contract`,\n {\n fixMessage: `Set the contract address in the handler by using the setAddress method`,\n },\n );\n }\n\n const abi = InstitutionalVault;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({\n address: this.address,\n abi,\n client,\n }) as GetContractReturnType<typeof abi, typeof client, Address>;\n }\n\n /**\n * Get the beacon deposit contract address.\n *\n * @returns The beacon deposit contract address.\n */\n public getBeaconDepositContract() {\n return this.getContract().read.BEACON_DEPOSIT_CONTRACT();\n }\n\n /**\n * Get the eigen delegation manager contract address.\n *\n * @returns The eigen delegation manager.\n */\n public getEigenDelegationManager() {\n return this.getContract().read.EIGEN_DELEGATION_MANAGER();\n }\n\n /**\n * Get the eigen pod manager contract address.\n *\n * @returns The eigen pod manager contract address.\n */\n public getEigenPodManager() {\n return this.getContract().read.EIGEN_POD_MANAGER();\n }\n\n /**\n * Get the eigen pod address.\n *\n * @returns The eigen pod address.\n */\n public getEigenPod() {\n return this.getContract().read.getEigenPod();\n }\n\n /**\n * Get the allowance for the spender to spend the owner's tokens.\n *\n * @param owner The owner of the tokens.\n * @param spender The spender of the tokens.\n * @returns The allowance of the owner for the spender.\n */\n public allowance(owner: Address, spender: Address) {\n return this.getContract().read.allowance([owner, spender]);\n }\n\n /**\n * Approve the spender to spend the owner's tokens.\n *\n * @param spender The spender of the tokens.\n * @param amount The amount of tokens to approve.\n */\n public approve(spender: Address, amount: bigint) {\n return this.getContract().write.approve([spender, amount], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the asset of the vault.\n *\n * @returns The asset of the vault.\n */\n public asset() {\n return this.getContract().read.asset();\n }\n\n /**\n * Get the authority of the vault.\n *\n * @returns The authority of the vault.\n */\n public authority() {\n return this.getContract().read.authority();\n }\n\n /**\n * Get the balance of the address.\n *\n * @param address The address to get the balance of.\n * @returns The balance of the address.\n */\n public balanceOf(address: Address) {\n return this.getContract().read.balanceOf([address]);\n }\n\n /**\n * Get the number of decimals of the token.\n *\n * @returns The number of decimals of the token.\n */\n public decimals() {\n return this.getContract().read.decimals();\n }\n\n /**\n * Complete the queued withdrawals.\n *\n * @param withdrawals The withdrawals to complete.\n * @param receiveAsTokens Whether to receive the assets as tokens.\n */\n public completeQueuedWithdrawals(\n withdrawals: QueuedWithdrawal[],\n receiveAsTokens: boolean[],\n ) {\n return this.getContract().write.completeQueuedWithdrawals(\n [withdrawals, receiveAsTokens],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Convert shares to assets.\n *\n * @param shares The number of shares to convert.\n * @returns The number of assets.\n */\n public convertToAssets(shares: bigint) {\n return this.getContract().read.convertToAssets([shares]);\n }\n\n /**\n * Convert assets to shares.\n *\n * @param assets The number of assets to convert.\n * @returns The number of shares.\n */\n public convertToShares(assets: bigint) {\n return this.getContract().read.convertToShares([assets]);\n }\n\n /**\n * Deposit assets into the vault.\n *\n * @param assets The number of assets to deposit.\n * @param receiver The address to receive the shares.\n */\n public deposit(assets: bigint, receiver: Address) {\n return this.getContract().write.deposit([assets, receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Deposit ETH into the vault.\n *\n * @param receiver The address to receive the shares.\n * @param value The amount of ETH to deposit.\n */\n public depositETH(receiver: Address, value: bigint) {\n return this.getContract().write.depositETH([receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n value,\n });\n }\n\n /**\n * Get the non-restaked validator ETH.\n *\n * @returns The non-restaked validator ETH.\n */\n public getNonRestakedValidatorETH() {\n return this.getContract().read.getNonRestakedValidatorETH();\n }\n\n /**\n * Get the restaked validator ETH.\n *\n * @returns The restaked validator ETH.\n */\n public getRestakedValidatorETH() {\n return this.getContract().read.getRestakedValidatorETH();\n }\n\n /**\n * Get the withdrawal credentials.\n *\n * @returns The withdrawal credentials.\n */\n public getWithdrawalCredentials() {\n return this.getContract().read.getWithdrawalCredentials();\n }\n\n /**\n * Get the maximum deposit amount for the address.\n *\n * @param address The address to get the maximum deposit amount for.\n * @returns The maximum deposit amount for the address.\n */\n public maxDeposit(address: Address) {\n return this.getContract().read.maxDeposit([address]);\n }\n\n /**\n * Get the maximum mint amount for the address.\n *\n * @param address The address to get the maximum mint amount for.\n * @returns The maximum mint amount for the address.\n */\n public maxMint(address: Address) {\n return this.getContract().read.maxMint([address]);\n }\n\n /**\n * Get the maximum redeem amount for the address.\n *\n * @param address The address to get the maximum redeem amount for.\n * @returns The maximum redeem amount for the address.\n */\n public maxRedeem(address: Address) {\n return this.getContract().read.maxRedeem([address]);\n }\n\n /**\n * Get the maximum withdraw amount for the address.\n *\n * @param address The address to get the maximum withdraw amount for.\n * @returns The maximum withdraw amount for the address.\n */\n public maxWithdraw(address: Address) {\n return this.getContract().read.maxWithdraw([address]);\n }\n\n /**\n * Mint shares to the receiver.\n *\n * @param shares The number of shares to mint.\n * @param receiver The address to receive the shares.\n */\n public mint(shares: bigint, receiver: Address) {\n return this.getContract().write.mint([shares, receiver], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the name of the contract.\n *\n * @returns The name of the contract.\n */\n public name() {\n return this.getContract().read.name();\n }\n\n /**\n * Preview the deposit amount for the assets.\n *\n * @param assets The number of assets to deposit.\n * @returns The number of shares to receive.\n */\n public previewDeposit(assets: bigint) {\n return this.getContract().read.previewDeposit([assets]);\n }\n\n /**\n * Preview the mint amount for the shares.\n *\n * @param shares The number of shares to mint.\n * @returns The number of assets to receive.\n */\n public previewMint(shares: bigint) {\n return this.getContract().read.previewMint([shares]);\n }\n\n /**\n * Preview the redeem amount for the shares.\n *\n * @param shares The number of shares to redeem.\n * @returns The number of assets to receive.\n */\n public previewRedeem(shares: bigint) {\n return this.getContract().read.previewRedeem([shares]);\n }\n\n /**\n * Preview the withdraw amount for the shares.\n *\n * @param shares The number of shares to withdraw.\n * @returns The number of assets to receive.\n */\n public previewWithdraw(shares: bigint) {\n return this.getContract().read.previewWithdraw([shares]);\n }\n\n /**\n * Queue the withdrawals.\n *\n * @param shares The number of shares to withdraw.\n */\n public queueWithdrawals(shares: bigint) {\n return this.getContract().write.queueWithdrawals([shares], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Redeem the shares to the receiver.\n *\n * @param shares The number of shares to redeem.\n * @param receiver The address to receive the assets.\n * @param owner The owner of the shares.\n */\n public redeem(shares: bigint, receiver: Address, owner: Address) {\n return this.getContract().write.redeem([shares, receiver, owner], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Set the validators ETH.\n *\n * @param restakedValidatorsETH The amount of restaked validator ETH.\n * @param nonRestakedValidatorsETH The amount of non-restaked validator ETH.\n */\n public setValidatorsETH(\n restakedValidatorsETH: bigint,\n nonRestakedValidatorsETH: bigint,\n ) {\n return this.getContract().write.setValidatorsETH(\n [restakedValidatorsETH, nonRestakedValidatorsETH],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Start the non-restaking validators.\n *\n * @param pubKeys The public keys of the validators.\n * @param signatures The signatures of the validators.\n * @param depositDataRoots The deposit data roots of the validators.\n */\n public startNonRestakingValidators(\n pubKeys: Address[],\n signatures: Address[],\n depositDataRoots: Address[],\n ) {\n return this.getContract().write.startNonRestakingValidators(\n [pubKeys, signatures, depositDataRoots],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Start the restaking validators.\n *\n * @param pubKeys The public keys of the validators.\n * @param signatures The signatures of the validators.\n * @param depositDataRoots The deposit data roots of the validators.\n */\n public startRestakingValidators(\n pubKeys: Address[],\n signatures: Address[],\n depositDataRoots: Address[],\n ) {\n return this.getContract().write.startRestakingValidators(\n [pubKeys, signatures, depositDataRoots],\n {\n account: this.walletClient.account!,\n chain: this.viemChain,\n },\n );\n }\n\n /**\n * Withdraw the assets to the receiver.\n *\n * @param assets The number of assets to withdraw.\n * @param receiver The address to receive the assets.\n * @param owner The owner of the assets.\n */\n public withdraw(assets: bigint, receiver: Address, owner: Address) {\n return this.getContract().write.withdraw([assets, receiver, owner], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Get the symbol of the contract.\n *\n * @returns The symbol of the contract.\n */\n public symbol() {\n return this.getContract().read.symbol();\n }\n\n /**\n * Get the total assets of the vault.\n *\n * @returns The total assets of the vault.\n */\n public totalAssets() {\n return this.getContract().read.totalAssets();\n }\n\n /**\n * Get the total supply of the vault.\n *\n * @returns The total supply of the vault.\n */\n public totalSupply() {\n return this.getContract().read.totalSupply();\n }\n\n /**\n * Transfer the value to the to address.\n *\n * @param to The address to transfer the value to.\n * @param value The amount of value to transfer.\n */\n public transfer(to: Address, value: bigint) {\n return this.getContract().write.transfer([to, value], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n\n /**\n * Transfer the value from the from address to the to address.\n *\n * @param from The address to transfer the value from.\n * @param to The address to transfer the value to.\n * @param value The amount of value to transfer.\n */\n public transferFrom(from: Address, to: Address, value: bigint) {\n return this.getContract().write.transferFrom([from, to, value], {\n account: this.walletClient.account!,\n chain: this.viemChain,\n });\n }\n}\n"],"names":["InstitutionalVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","address","InvalidContractAddressError","abi","InstitutionalVault","client","getContract","owner","spender","amount","withdrawals","receiveAsTokens","shares","assets","receiver","value","restakedValidatorsETH","nonRestakedValidatorsETH","pubKeys","signatures","depositDataRoots","to","from"],"mappings":";;;;;;;AA0BO,MAAMA,EAA0B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAcrC,YACEC,GACQC,GACAC,GACR;AAjBM,IAAAC,EAAA;AACA,IAAAA,EAAA;AAcE,SAAA,eAAAF,GACA,KAAA,eAAAC,GAEH,KAAA,YAAYE,EAAYJ,CAAK;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS7B,YAAYK,GAAkB;AACnC,gBAAK,UAAUA,GAER;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQF,aAAa;AAClB,WAAO,KAAK;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EASP,cAAc;AACf,QAAA,CAAC,KAAK;AACR,YAAM,IAAIC;AAAA,QACR;AAAA,QACA;AAAA,UACE,YAAY;AAAA,QAAA;AAAA,MAEhB;AAGF,UAAMC,IAAMC,GACNC,IAAS,EAAE,QAAQ,KAAK,cAAc,QAAQ,KAAK,aAAa;AAEtE,WAAOC,EAAY;AAAA,MACjB,SAAS,KAAK;AAAA,MACd,KAAAH;AAAA,MACA,QAAAE;AAAA,IAAA,CACD;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQI,2BAA2B;AAChC,WAAO,KAAK,cAAc,KAAK,wBAAwB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQlD,4BAA4B;AACjC,WAAO,KAAK,cAAc,KAAK,yBAAyB;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQnD,qBAAqB;AAC1B,WAAO,KAAK,cAAc,KAAK,kBAAkB;AAAA,EAA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K,aAAa;AAAA,MAC3B,OAAO,KAAK;AAAA,IAAA,CACb;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQI,SAAS;AACd,WAAO,KAAK,cAAc,KAAK,OAAO;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQjC,cAAc;AACnB,WAAO,KAAK,cAAc,KAAK,YAAY;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAQtC,cAAc;AACnB,WAAO,KAAK,cAAc,KAAK,YAAY;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAStC,SAASc,GAAaN,GAAe;AACnC,WAAA,KAAK,cAAc,MAAM,SAAS,CAACM,GAAIN,CAAK,GAAG;AAAA,MACpD,SAAS,KAAK,aAAa;AAAA,MAC3B,OAAO,KAAK;AAAA,IAAA,CACb;AAAA,EAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAUI,aAAaO,GAAeD,GAAaN,GAAe;AACtD,WAAA,KAAK,cAAc,MAAM,aAAa,CAACO,GAAMD,GAAIN,CAAK,GAAG;AAAA,MAC9D,SAAS,KAAK,aAAa;AAAA,MAC3B,OAAO,KAAK;AAAA,IAAA,CACb;AAAA,EAAA;AAEL;"}
|
package/dist/utils/version.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="1.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="1.22.1",o=e;exports.version=o;
|
|
2
2
|
//# sourceMappingURL=version.cjs.map
|
package/dist/utils/version.js
CHANGED
package/package.json
CHANGED