@pufferfinance/puffer-sdk 1.15.0 → 1.16.0

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.
Files changed (27) hide show
  1. package/dist/contracts/abis/mainnet/PufferVaultV2.cjs +1 -1
  2. package/dist/contracts/abis/mainnet/PufferVaultV2.cjs.map +1 -1
  3. package/dist/contracts/abis/mainnet/PufferVaultV2.d.ts +18 -0
  4. package/dist/contracts/abis/mainnet/PufferVaultV2.js +24 -0
  5. package/dist/contracts/abis/mainnet/PufferVaultV2.js.map +1 -1
  6. package/dist/contracts/handlers/carrot-staking-handler.d.ts +6 -6
  7. package/dist/contracts/handlers/distributor-handler.d.ts +6 -6
  8. package/dist/contracts/handlers/erc20-permit-handler.d.ts +6 -6
  9. package/dist/contracts/handlers/l1-reward-manager-handler.d.ts +6 -6
  10. package/dist/contracts/handlers/l2-reward-manager-handler.d.ts +6 -6
  11. package/dist/contracts/handlers/mtw-carrot-handler.d.ts +6 -6
  12. package/dist/contracts/handlers/nucleus-accountant-handler.d.ts +6 -6
  13. package/dist/contracts/handlers/nucleus-atomic-queue-handler.d.ts +6 -6
  14. package/dist/contracts/handlers/nucleus-boring-vault-handler.d.ts +6 -6
  15. package/dist/contracts/handlers/nucleus-teller-handler.d.ts +6 -6
  16. package/dist/contracts/handlers/puf-locker-handler.d.ts +6 -6
  17. package/dist/contracts/handlers/puffer-depositor-handler.d.ts +6 -6
  18. package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +6 -6
  19. package/dist/contracts/handlers/puffer-vault-handler.cjs +1 -1
  20. package/dist/contracts/handlers/puffer-vault-handler.cjs.map +1 -1
  21. package/dist/contracts/handlers/puffer-vault-handler.d.ts +40 -6
  22. package/dist/contracts/handlers/puffer-vault-handler.js +37 -17
  23. package/dist/contracts/handlers/puffer-vault-handler.js.map +1 -1
  24. package/dist/contracts/handlers/puffer-withdrawal-manager-handler.d.ts +6 -6
  25. package/dist/utils/version.cjs +1 -1
  26. package/dist/utils/version.js +1 -1
  27. package/package.json +1 -1
@@ -7196,7 +7196,7 @@ export declare class NucleusAtomicQueueHandler {
7196
7196
  simulate: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7197
7197
  simulateBlocks: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7198
7198
  simulateCalls: <const calls extends readonly unknown[]>(args: import('viem').SimulateCallsParameters<calls>) => Promise<import('viem').SimulateCallsReturnType<calls>>;
7199
- simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends Chain | undefined, accountOverride extends Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, Chain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, Chain | undefined, Account | undefined, chainOverride, accountOverride>>;
7199
+ simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends Chain | undefined, accountOverride extends Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, Chain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, Chain | undefined, Account | undefined, chainOverride, accountOverride>>;
7200
7200
  verifyMessage: (args: import('viem').VerifyMessageActionParameters) => Promise<import('viem').VerifyMessageActionReturnType>;
7201
7201
  verifySiweMessage: (args: {
7202
7202
  blockNumber?: bigint | undefined | undefined;
@@ -14669,7 +14669,7 @@ export declare class NucleusAtomicQueueHandler {
14669
14669
  [x: `bytes18[${string}]`]: undefined;
14670
14670
  [x: `bytes2[${string}]`]: undefined;
14671
14671
  [x: `bytes3[${string}]`]: undefined;
14672
- [x: `bytes11[${string}]`]: undefined;
14672
+ [x: `bytes12[${string}]`]: undefined;
14673
14673
  [x: `bytes23[${string}]`]: undefined;
14674
14674
  [x: `bytes4[${string}]`]: undefined;
14675
14675
  [x: `bytes5[${string}]`]: undefined;
@@ -14678,7 +14678,7 @@ export declare class NucleusAtomicQueueHandler {
14678
14678
  [x: `bytes8[${string}]`]: undefined;
14679
14679
  [x: `bytes9[${string}]`]: undefined;
14680
14680
  [x: `bytes10[${string}]`]: undefined;
14681
- [x: `bytes12[${string}]`]: undefined;
14681
+ [x: `bytes11[${string}]`]: undefined;
14682
14682
  [x: `bytes13[${string}]`]: undefined;
14683
14683
  [x: `bytes14[${string}]`]: undefined;
14684
14684
  [x: `bytes15[${string}]`]: undefined;
@@ -14771,7 +14771,7 @@ export declare class NucleusAtomicQueueHandler {
14771
14771
  bytes18?: undefined;
14772
14772
  bytes2?: undefined;
14773
14773
  bytes3?: undefined;
14774
- bytes11?: undefined;
14774
+ bytes12?: undefined;
14775
14775
  bytes23?: undefined;
14776
14776
  bytes4?: undefined;
14777
14777
  bytes5?: undefined;
@@ -14780,7 +14780,7 @@ export declare class NucleusAtomicQueueHandler {
14780
14780
  bytes8?: undefined;
14781
14781
  bytes9?: undefined;
14782
14782
  bytes10?: undefined;
14783
- bytes12?: undefined;
14783
+ bytes11?: undefined;
14784
14784
  bytes13?: undefined;
14785
14785
  bytes14?: undefined;
14786
14786
  bytes15?: undefined;
@@ -14867,7 +14867,7 @@ export declare class NucleusAtomicQueueHandler {
14867
14867
  }, primaryType extends string>(args: import('viem').SignTypedDataParameters<typedData, primaryType, Account | undefined>) => Promise<import('viem').SignTypedDataReturnType>;
14868
14868
  switchChain: (args: import('viem').SwitchChainParameters) => Promise<void>;
14869
14869
  watchAsset: (args: import('viem').WatchAssetParameters) => Promise<import('viem').WatchAssetReturnType>;
14870
- writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends Chain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, Chain | undefined, Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14870
+ writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends Chain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, Chain | undefined, Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14871
14871
  extend: <const client extends {
14872
14872
  [x: string]: unknown;
14873
14873
  account?: undefined;
@@ -7027,7 +7027,7 @@ export declare class NucleusBoringVaultHandler {
7027
7027
  simulate: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7028
7028
  simulateBlocks: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7029
7029
  simulateCalls: <const calls extends readonly unknown[]>(args: import('viem').SimulateCallsParameters<calls>) => Promise<import('viem').SimulateCallsReturnType<calls>>;
7030
- simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
7030
+ simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
7031
7031
  verifyMessage: (args: import('viem').VerifyMessageActionParameters) => Promise<import('viem').VerifyMessageActionReturnType>;
7032
7032
  verifySiweMessage: (args: {
7033
7033
  blockNumber?: bigint | undefined | undefined;
@@ -14500,7 +14500,7 @@ export declare class NucleusBoringVaultHandler {
14500
14500
  [x: `bytes18[${string}]`]: undefined;
14501
14501
  [x: `bytes2[${string}]`]: undefined;
14502
14502
  [x: `bytes3[${string}]`]: undefined;
14503
- [x: `bytes11[${string}]`]: undefined;
14503
+ [x: `bytes12[${string}]`]: undefined;
14504
14504
  [x: `bytes23[${string}]`]: undefined;
14505
14505
  [x: `bytes4[${string}]`]: undefined;
14506
14506
  [x: `bytes5[${string}]`]: undefined;
@@ -14509,7 +14509,7 @@ export declare class NucleusBoringVaultHandler {
14509
14509
  [x: `bytes8[${string}]`]: undefined;
14510
14510
  [x: `bytes9[${string}]`]: undefined;
14511
14511
  [x: `bytes10[${string}]`]: undefined;
14512
- [x: `bytes12[${string}]`]: undefined;
14512
+ [x: `bytes11[${string}]`]: undefined;
14513
14513
  [x: `bytes13[${string}]`]: undefined;
14514
14514
  [x: `bytes14[${string}]`]: undefined;
14515
14515
  [x: `bytes15[${string}]`]: undefined;
@@ -14602,7 +14602,7 @@ export declare class NucleusBoringVaultHandler {
14602
14602
  bytes18?: undefined;
14603
14603
  bytes2?: undefined;
14604
14604
  bytes3?: undefined;
14605
- bytes11?: undefined;
14605
+ bytes12?: undefined;
14606
14606
  bytes23?: undefined;
14607
14607
  bytes4?: undefined;
14608
14608
  bytes5?: undefined;
@@ -14611,7 +14611,7 @@ export declare class NucleusBoringVaultHandler {
14611
14611
  bytes8?: undefined;
14612
14612
  bytes9?: undefined;
14613
14613
  bytes10?: undefined;
14614
- bytes12?: undefined;
14614
+ bytes11?: undefined;
14615
14615
  bytes13?: undefined;
14616
14616
  bytes14?: undefined;
14617
14617
  bytes15?: undefined;
@@ -14698,7 +14698,7 @@ export declare class NucleusBoringVaultHandler {
14698
14698
  }, primaryType extends string>(args: import('viem').SignTypedDataParameters<typedData, primaryType, import('viem').Account | undefined>) => Promise<import('viem').SignTypedDataReturnType>;
14699
14699
  switchChain: (args: import('viem').SwitchChainParameters) => Promise<void>;
14700
14700
  watchAsset: (args: import('viem').WatchAssetParameters) => Promise<import('viem').WatchAssetReturnType>;
14701
- writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14701
+ writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14702
14702
  extend: <const client extends {
14703
14703
  [x: string]: unknown;
14704
14704
  account?: undefined;
@@ -7015,7 +7015,7 @@ export declare class NucleusTellerHandler {
7015
7015
  simulate: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7016
7016
  simulateBlocks: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7017
7017
  simulateCalls: <const calls extends readonly unknown[]>(args: import('viem').SimulateCallsParameters<calls>) => Promise<import('viem').SimulateCallsReturnType<calls>>;
7018
- simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
7018
+ simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
7019
7019
  verifyMessage: (args: import('viem').VerifyMessageActionParameters) => Promise<import('viem').VerifyMessageActionReturnType>;
7020
7020
  verifySiweMessage: (args: {
7021
7021
  blockNumber?: bigint | undefined | undefined;
@@ -14488,7 +14488,7 @@ export declare class NucleusTellerHandler {
14488
14488
  [x: `bytes18[${string}]`]: undefined;
14489
14489
  [x: `bytes2[${string}]`]: undefined;
14490
14490
  [x: `bytes3[${string}]`]: undefined;
14491
- [x: `bytes11[${string}]`]: undefined;
14491
+ [x: `bytes12[${string}]`]: undefined;
14492
14492
  [x: `bytes23[${string}]`]: undefined;
14493
14493
  [x: `bytes4[${string}]`]: undefined;
14494
14494
  [x: `bytes5[${string}]`]: undefined;
@@ -14497,7 +14497,7 @@ export declare class NucleusTellerHandler {
14497
14497
  [x: `bytes8[${string}]`]: undefined;
14498
14498
  [x: `bytes9[${string}]`]: undefined;
14499
14499
  [x: `bytes10[${string}]`]: undefined;
14500
- [x: `bytes12[${string}]`]: undefined;
14500
+ [x: `bytes11[${string}]`]: undefined;
14501
14501
  [x: `bytes13[${string}]`]: undefined;
14502
14502
  [x: `bytes14[${string}]`]: undefined;
14503
14503
  [x: `bytes15[${string}]`]: undefined;
@@ -14590,7 +14590,7 @@ export declare class NucleusTellerHandler {
14590
14590
  bytes18?: undefined;
14591
14591
  bytes2?: undefined;
14592
14592
  bytes3?: undefined;
14593
- bytes11?: undefined;
14593
+ bytes12?: undefined;
14594
14594
  bytes23?: undefined;
14595
14595
  bytes4?: undefined;
14596
14596
  bytes5?: undefined;
@@ -14599,7 +14599,7 @@ export declare class NucleusTellerHandler {
14599
14599
  bytes8?: undefined;
14600
14600
  bytes9?: undefined;
14601
14601
  bytes10?: undefined;
14602
- bytes12?: undefined;
14602
+ bytes11?: undefined;
14603
14603
  bytes13?: undefined;
14604
14604
  bytes14?: undefined;
14605
14605
  bytes15?: undefined;
@@ -14686,7 +14686,7 @@ export declare class NucleusTellerHandler {
14686
14686
  }, primaryType extends string>(args: import('viem').SignTypedDataParameters<typedData, primaryType, import('viem').Account | undefined>) => Promise<import('viem').SignTypedDataReturnType>;
14687
14687
  switchChain: (args: import('viem').SwitchChainParameters) => Promise<void>;
14688
14688
  watchAsset: (args: import('viem').WatchAssetParameters) => Promise<import('viem').WatchAssetReturnType>;
14689
- writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14689
+ writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14690
14690
  extend: <const client extends {
14691
14691
  [x: string]: unknown;
14692
14692
  account?: undefined;
@@ -7021,7 +7021,7 @@ export declare class PufLockerHandler {
7021
7021
  simulate: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7022
7022
  simulateBlocks: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7023
7023
  simulateCalls: <const calls extends readonly unknown[]>(args: import('viem').SimulateCallsParameters<calls>) => Promise<import('viem').SimulateCallsReturnType<calls>>;
7024
- simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
7024
+ simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
7025
7025
  verifyMessage: (args: import('viem').VerifyMessageActionParameters) => Promise<import('viem').VerifyMessageActionReturnType>;
7026
7026
  verifySiweMessage: (args: {
7027
7027
  blockNumber?: bigint | undefined | undefined;
@@ -14494,7 +14494,7 @@ export declare class PufLockerHandler {
14494
14494
  [x: `bytes18[${string}]`]: undefined;
14495
14495
  [x: `bytes2[${string}]`]: undefined;
14496
14496
  [x: `bytes3[${string}]`]: undefined;
14497
- [x: `bytes11[${string}]`]: undefined;
14497
+ [x: `bytes12[${string}]`]: undefined;
14498
14498
  [x: `bytes23[${string}]`]: undefined;
14499
14499
  [x: `bytes4[${string}]`]: undefined;
14500
14500
  [x: `bytes5[${string}]`]: undefined;
@@ -14503,7 +14503,7 @@ export declare class PufLockerHandler {
14503
14503
  [x: `bytes8[${string}]`]: undefined;
14504
14504
  [x: `bytes9[${string}]`]: undefined;
14505
14505
  [x: `bytes10[${string}]`]: undefined;
14506
- [x: `bytes12[${string}]`]: undefined;
14506
+ [x: `bytes11[${string}]`]: undefined;
14507
14507
  [x: `bytes13[${string}]`]: undefined;
14508
14508
  [x: `bytes14[${string}]`]: undefined;
14509
14509
  [x: `bytes15[${string}]`]: undefined;
@@ -14596,7 +14596,7 @@ export declare class PufLockerHandler {
14596
14596
  bytes18?: undefined;
14597
14597
  bytes2?: undefined;
14598
14598
  bytes3?: undefined;
14599
- bytes11?: undefined;
14599
+ bytes12?: undefined;
14600
14600
  bytes23?: undefined;
14601
14601
  bytes4?: undefined;
14602
14602
  bytes5?: undefined;
@@ -14605,7 +14605,7 @@ export declare class PufLockerHandler {
14605
14605
  bytes8?: undefined;
14606
14606
  bytes9?: undefined;
14607
14607
  bytes10?: undefined;
14608
- bytes12?: undefined;
14608
+ bytes11?: undefined;
14609
14609
  bytes13?: undefined;
14610
14610
  bytes14?: undefined;
14611
14611
  bytes15?: undefined;
@@ -14692,7 +14692,7 @@ export declare class PufLockerHandler {
14692
14692
  }, primaryType extends string>(args: import('viem').SignTypedDataParameters<typedData, primaryType, import('viem').Account | undefined>) => Promise<import('viem').SignTypedDataReturnType>;
14693
14693
  switchChain: (args: import('viem').SwitchChainParameters) => Promise<void>;
14694
14694
  watchAsset: (args: import('viem').WatchAssetParameters) => Promise<import('viem').WatchAssetReturnType>;
14695
- writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14695
+ writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14696
14696
  extend: <const client extends {
14697
14697
  [x: string]: unknown;
14698
14698
  account?: undefined;
@@ -7157,7 +7157,7 @@ export declare class PufferDepositorHandler {
7157
7157
  simulate: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7158
7158
  simulateBlocks: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7159
7159
  simulateCalls: <const calls extends readonly unknown[]>(args: import('viem').SimulateCallsParameters<calls>) => Promise<import('viem').SimulateCallsReturnType<calls>>;
7160
- simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
7160
+ simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
7161
7161
  verifyMessage: (args: import('viem').VerifyMessageActionParameters) => Promise<import('viem').VerifyMessageActionReturnType>;
7162
7162
  verifySiweMessage: (args: {
7163
7163
  blockNumber?: bigint | undefined | undefined;
@@ -14630,7 +14630,7 @@ export declare class PufferDepositorHandler {
14630
14630
  [x: `bytes18[${string}]`]: undefined;
14631
14631
  [x: `bytes2[${string}]`]: undefined;
14632
14632
  [x: `bytes3[${string}]`]: undefined;
14633
- [x: `bytes11[${string}]`]: undefined;
14633
+ [x: `bytes12[${string}]`]: undefined;
14634
14634
  [x: `bytes23[${string}]`]: undefined;
14635
14635
  [x: `bytes4[${string}]`]: undefined;
14636
14636
  [x: `bytes5[${string}]`]: undefined;
@@ -14639,7 +14639,7 @@ export declare class PufferDepositorHandler {
14639
14639
  [x: `bytes8[${string}]`]: undefined;
14640
14640
  [x: `bytes9[${string}]`]: undefined;
14641
14641
  [x: `bytes10[${string}]`]: undefined;
14642
- [x: `bytes12[${string}]`]: undefined;
14642
+ [x: `bytes11[${string}]`]: undefined;
14643
14643
  [x: `bytes13[${string}]`]: undefined;
14644
14644
  [x: `bytes14[${string}]`]: undefined;
14645
14645
  [x: `bytes15[${string}]`]: undefined;
@@ -14732,7 +14732,7 @@ export declare class PufferDepositorHandler {
14732
14732
  bytes18?: undefined;
14733
14733
  bytes2?: undefined;
14734
14734
  bytes3?: undefined;
14735
- bytes11?: undefined;
14735
+ bytes12?: undefined;
14736
14736
  bytes23?: undefined;
14737
14737
  bytes4?: undefined;
14738
14738
  bytes5?: undefined;
@@ -14741,7 +14741,7 @@ export declare class PufferDepositorHandler {
14741
14741
  bytes8?: undefined;
14742
14742
  bytes9?: undefined;
14743
14743
  bytes10?: undefined;
14744
- bytes12?: undefined;
14744
+ bytes11?: undefined;
14745
14745
  bytes13?: undefined;
14746
14746
  bytes14?: undefined;
14747
14747
  bytes15?: undefined;
@@ -14828,7 +14828,7 @@ export declare class PufferDepositorHandler {
14828
14828
  }, primaryType extends string>(args: import('viem').SignTypedDataParameters<typedData, primaryType, import('viem').Account | undefined>) => Promise<import('viem').SignTypedDataReturnType>;
14829
14829
  switchChain: (args: import('viem').SwitchChainParameters) => Promise<void>;
14830
14830
  watchAsset: (args: import('viem').WatchAssetParameters) => Promise<import('viem').WatchAssetReturnType>;
14831
- writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14831
+ writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14832
14832
  extend: <const client extends {
14833
14833
  [x: string]: unknown;
14834
14834
  account?: undefined;
@@ -6931,7 +6931,7 @@ export declare class PufferL2DepositorHandler {
6931
6931
  simulate: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
6932
6932
  simulateBlocks: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
6933
6933
  simulateCalls: <const calls extends readonly unknown[]>(args: import('viem').SimulateCallsParameters<calls>) => Promise<import('viem').SimulateCallsReturnType<calls>>;
6934
- simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
6934
+ simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
6935
6935
  verifyMessage: (args: import('viem').VerifyMessageActionParameters) => Promise<import('viem').VerifyMessageActionReturnType>;
6936
6936
  verifySiweMessage: (args: {
6937
6937
  blockNumber?: bigint | undefined | undefined;
@@ -14404,7 +14404,7 @@ export declare class PufferL2DepositorHandler {
14404
14404
  [x: `bytes18[${string}]`]: undefined;
14405
14405
  [x: `bytes2[${string}]`]: undefined;
14406
14406
  [x: `bytes3[${string}]`]: undefined;
14407
- [x: `bytes11[${string}]`]: undefined;
14407
+ [x: `bytes12[${string}]`]: undefined;
14408
14408
  [x: `bytes23[${string}]`]: undefined;
14409
14409
  [x: `bytes4[${string}]`]: undefined;
14410
14410
  [x: `bytes5[${string}]`]: undefined;
@@ -14413,7 +14413,7 @@ export declare class PufferL2DepositorHandler {
14413
14413
  [x: `bytes8[${string}]`]: undefined;
14414
14414
  [x: `bytes9[${string}]`]: undefined;
14415
14415
  [x: `bytes10[${string}]`]: undefined;
14416
- [x: `bytes12[${string}]`]: undefined;
14416
+ [x: `bytes11[${string}]`]: undefined;
14417
14417
  [x: `bytes13[${string}]`]: undefined;
14418
14418
  [x: `bytes14[${string}]`]: undefined;
14419
14419
  [x: `bytes15[${string}]`]: undefined;
@@ -14506,7 +14506,7 @@ export declare class PufferL2DepositorHandler {
14506
14506
  bytes18?: undefined;
14507
14507
  bytes2?: undefined;
14508
14508
  bytes3?: undefined;
14509
- bytes11?: undefined;
14509
+ bytes12?: undefined;
14510
14510
  bytes23?: undefined;
14511
14511
  bytes4?: undefined;
14512
14512
  bytes5?: undefined;
@@ -14515,7 +14515,7 @@ export declare class PufferL2DepositorHandler {
14515
14515
  bytes8?: undefined;
14516
14516
  bytes9?: undefined;
14517
14517
  bytes10?: undefined;
14518
- bytes12?: undefined;
14518
+ bytes11?: undefined;
14519
14519
  bytes13?: undefined;
14520
14520
  bytes14?: undefined;
14521
14521
  bytes15?: undefined;
@@ -14602,7 +14602,7 @@ export declare class PufferL2DepositorHandler {
14602
14602
  }, primaryType extends string>(args: import('viem').SignTypedDataParameters<typedData, primaryType, import('viem').Account | undefined>) => Promise<import('viem').SignTypedDataReturnType>;
14603
14603
  switchChain: (args: import('viem').SwitchChainParameters) => Promise<void>;
14604
14604
  watchAsset: (args: import('viem').WatchAssetParameters) => Promise<import('viem').WatchAssetReturnType>;
14605
- writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14605
+ writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14606
14606
  extend: <const client extends {
14607
14607
  [x: string]: unknown;
14608
14608
  account?: undefined;
@@ -1,2 +1,2 @@
1
- "use strict";var r=Object.defineProperty;var o=(i,t,a)=>t in i?r(i,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[t]=a;var c=(i,t,a)=>o(i,typeof t!="symbol"?t+"":t,a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const u=require("../../constants-Bsa7cnXP.cjs"),h=require("../addresses.cjs"),m=require("../abis/mainnet/PufferVaultV2.cjs"),C=require("../../getContract-Z5RjOH18.cjs");class g{constructor(t,a,e){c(this,"viemChain");this.chain=t,this.walletClient=a,this.publicClient=e,this.viemChain=u.VIEM_CHAINS[t]}getContract(){const t=h.CONTRACT_ADDRESSES[this.chain].PufferVault,a=m.PufferVaultV2,e={public:this.publicClient,wallet:this.walletClient};return C.getContract({address:t,abi:a,client:e})}depositETH(t){return{transact:async n=>await this.getContract().write.depositETH([t],{account:t,chain:this.viemChain,value:n}),estimate:async()=>await this.getContract().estimateGas.depositETH([t],{account:t})}}async balanceOf(t){return await this.getContract().read.balanceOf([t])}async getPufETHRate(){const t=BigInt(1e18);return await this.getContract().read.previewDeposit([t])}async getAllowance(t,a){return await this.getContract().read.allowance([t,a])}withdraw(t,a,e){return{transact:async()=>await this.getContract().write.withdraw([e,a,t],{account:a,chain:this.viemChain}),estimate:async()=>await this.getContract().estimateGas.withdraw([e,a,t],{account:a})}}previewRedeem(t){return this.getContract().read.previewRedeem([t])}maxRedeem(t){return this.getContract().read.maxRedeem([t])}getExitFeeBasisPoints(){return this.getContract().read.getExitFeeBasisPoints()}getRemainingAssetsDailyWithdrawalLimit(){return this.getContract().read.getRemainingAssetsDailyWithdrawalLimit()}redeem(t,a,e){return{transact:async()=>await this.getContract().write.redeem([e,a,t],{account:t,chain:this.viemChain}),estimate:async()=>await this.getContract().estimateGas.redeem([e,a,t],{account:t})}}convertToAssets(t){return this.getContract().read.convertToAssets([t])}}exports.PufferVaultHandler=g;
1
+ "use strict";var r=Object.defineProperty;var o=(i,t,a)=>t in i?r(i,t,{enumerable:!0,configurable:!0,writable:!0,value:a}):i[t]=a;var c=(i,t,a)=>o(i,typeof t!="symbol"?t+"":t,a);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const h=require("../../constants-Bsa7cnXP.cjs"),u=require("../addresses.cjs"),m=require("../abis/mainnet/PufferVaultV2.cjs"),C=require("../../getContract-Z5RjOH18.cjs");class g{constructor(t,a,e){c(this,"viemChain");this.chain=t,this.walletClient=a,this.publicClient=e,this.viemChain=h.VIEM_CHAINS[t]}getContract(){const t=u.CONTRACT_ADDRESSES[this.chain].PufferVault,a=m.PufferVaultV2,e={public:this.publicClient,wallet:this.walletClient};return C.getContract({address:t,abi:a,client:e})}deposit(t,a){return{transact:async()=>await this.getContract().write.deposit([a,t],{account:t,chain:this.viemChain}),estimate:async()=>await this.getContract().estimateGas.deposit([a,t],{account:t})}}depositETH(t){return{transact:async n=>await this.getContract().write.depositETH([t],{account:t,chain:this.viemChain,value:n}),estimate:async()=>await this.getContract().estimateGas.depositETH([t],{account:t})}}async balanceOf(t){return await this.getContract().read.balanceOf([t])}async getPufETHRate(){const t=BigInt(1e18);return await this.getContract().read.previewDeposit([t])}async getAllowance(t,a){return await this.getContract().read.allowance([t,a])}withdraw(t,a,e){return{transact:async()=>await this.getContract().write.withdraw([e,a,t],{account:a,chain:this.viemChain}),estimate:async()=>await this.getContract().estimateGas.withdraw([e,a,t],{account:a})}}previewRedeem(t){return this.getContract().read.previewRedeem([t])}maxRedeem(t){return this.getContract().read.maxRedeem([t])}getExitFeeBasisPoints(){return this.getContract().read.getExitFeeBasisPoints()}getRemainingAssetsDailyWithdrawalLimit(){return this.getContract().read.getRemainingAssetsDailyWithdrawalLimit()}redeem(t,a,e){return{transact:async()=>await this.getContract().write.redeem([e,a,t],{account:t,chain:this.viemChain}),estimate:async()=>await this.getContract().estimateGas.redeem([e,a,t],{account:t})}}convertToAssets(t){return this.getContract().read.convertToAssets([t])}}exports.PufferVaultHandler=g;
2
2
  //# sourceMappingURL=puffer-vault-handler.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"puffer-vault-handler.cjs","sources":["../../../lib/contracts/handlers/puffer-vault-handler.ts"],"sourcesContent":["import {\n Address,\n GetContractReturnType,\n PublicClient,\n WalletClient,\n getContract,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { CONTRACT_ADDRESSES } from '../addresses';\nimport { PufferVaultV2 } from '../abis/mainnet/PufferVaultV2';\n\n/**\n * Handler for the `PufferVaultV2` contract exposing methods to interact\n * with the contract.\n */\nexport class PufferVaultHandler {\n private viemChain: ViemChain;\n\n /**\n * Create the handler for the `PufferVaultV2` 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 private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\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 const address = CONTRACT_ADDRESSES[this.chain].PufferVault as Address;\n const abi = PufferVaultV2;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Deposit ETH in exchange for pufETH. This doesn't make the\n * transaction but returns two methods namely `transact` and\n * `estimate`.\n *\n * @param walletAddress Wallet address to get the ETH from.\n * @returns `transact: (value: bigint) => Promise<Address>` - Used to\n * make the transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public depositETH(walletAddress: Address) {\n const transact = async (value: bigint) =>\n await this.getContract().write.depositETH([walletAddress], {\n account: walletAddress,\n chain: this.viemChain,\n value,\n });\n\n const estimate = async () =>\n await this.getContract().estimateGas.depositETH([walletAddress], {\n account: walletAddress,\n });\n\n return { transact, estimate };\n }\n\n /**\n * Check the pufETH balance of the wallet.\n *\n * @param walletAddress Wallet address to check the balance of.\n * @returns pufETH balance in wei.\n */\n public async balanceOf(walletAddress: Address) {\n return await this.getContract().read.balanceOf([walletAddress]);\n }\n\n /**\n * Get the rate of pufETH compared to ETH.\n *\n * @returns Rate of pufETH compared to 1 ETH.\n */\n public async getPufETHRate() {\n const oneWei = BigInt(1e18);\n return await this.getContract().read.previewDeposit([oneWei]);\n }\n\n /**\n * Get the allowance for the given owner and spender.\n *\n * @param ownerAddress Address of the owner.\n * @param spenderAddress Address of the spender.\n * @returns Allowance for the given owner and spender.\n */\n public async getAllowance(ownerAddress: Address, spenderAddress: Address) {\n return await this.getContract().read.allowance([\n ownerAddress,\n spenderAddress,\n ]);\n }\n\n /**\n * Withdraw pufETH to the given wallet address. This doesn't make the\n * transaction but returns two methods namely `transact` and\n * `estimate`.\n *\n * @param ownerAddress Address of the owner.\n * @param walletAddress Address of the receiver.\n * @param value Value of pufETH to withdraw.\n * @returns `transact: (value: bigint) => Promise<Address>` - Used to\n * make the transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public withdraw(\n ownerAddress: Address,\n walletAddress: Address,\n value: bigint,\n ) {\n const transact = async () =>\n await this.getContract().write.withdraw(\n [value, walletAddress, ownerAddress],\n {\n account: walletAddress,\n chain: this.viemChain,\n },\n );\n\n const estimate = async () =>\n await this.getContract().estimateGas.withdraw(\n [value, walletAddress, ownerAddress],\n {\n account: walletAddress,\n },\n );\n\n return { transact, estimate };\n }\n\n /**\n * Preview the amount of WETH that can be redeemed for the given\n * amount of pufETH using the `.redeem()` method.\n *\n * @param value Value of pufETH to redeem.\n * @returns Preview of the amount of WETH that can be redeemed.\n */\n public previewRedeem(value: bigint) {\n return this.getContract().read.previewRedeem([value]);\n }\n\n /**\n * Calculates the maximum amount of pufETH shares that can be redeemed\n * by the owner.\n *\n * @param ownerAddress Address of the owner's wallet.\n * @returns Maximum amount of pufETH shares that can be redeemed.\n */\n public maxRedeem(ownerAddress: Address) {\n return this.getContract().read.maxRedeem([ownerAddress]);\n }\n\n /**\n * Returns how many basis points of a fee there are when exiting. For\n * example, a 1% fee would mean 1% of the user's requested pufETH is\n * burned (which increases the value for all pufETH holders) before\n * the ETH is redeemed. i.e., you get 1% less ETH back.\n *\n * @returns Basis points of the exit fee.\n */\n public getExitFeeBasisPoints() {\n return this.getContract().read.getExitFeeBasisPoints();\n }\n\n /**\n * Returns how much WETH can still be withdrawn today.\n *\n * @returns Remaining WETH daily withdrawal limit.\n */\n public getRemainingAssetsDailyWithdrawalLimit() {\n return this.getContract().read.getRemainingAssetsDailyWithdrawalLimit();\n }\n\n /**\n * Redeems pufETH shares in exchange for WETH assets from the vault.\n * In the process, the pufETH shares of the owner are burned. This\n * doesn't make the transaction but returns two methods namely\n * `transact` and `estimate`.\n *\n * @param ownerAddress Address of the owner of pufETH.\n * @param receiverAddress Address of the receiver of WETH.\n * @param shares Amount of pufETH shares to redeem.\n * @returns `transact: (value: bigint) => Promise<Address>` - Used to\n * make the transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public redeem(\n ownerAddress: Address,\n receiverAddress: Address,\n shares: bigint,\n ) {\n const transact = async () =>\n await this.getContract().write.redeem(\n [shares, receiverAddress, ownerAddress],\n {\n account: ownerAddress,\n chain: this.viemChain,\n },\n );\n\n const estimate = async () =>\n await this.getContract().estimateGas.redeem(\n [shares, receiverAddress, ownerAddress],\n {\n account: ownerAddress,\n },\n );\n\n return { transact, estimate };\n }\n\n /**\n * Gives exchange rate of pufETH relative to WETH.\n * This does not include any fees, as compared to previewRedeem method.\n *\n * @param amount Amount of pufETH to convert.\n * @returns Amount of equivalent WETH.\n */\n public convertToAssets(amount: bigint) {\n return this.getContract().read.convertToAssets([amount]);\n }\n}\n"],"names":["PufferVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","address","CONTRACT_ADDRESSES","abi","PufferVaultV2","client","getContract","walletAddress","value","oneWei","ownerAddress","spenderAddress","receiverAddress","shares","amount"],"mappings":"6ZAeO,MAAMA,CAAmB,CAa9B,YACUC,EACAC,EACAC,EACR,CAhBMC,EAAA,kBAaE,KAAA,MAAAH,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAEH,KAAA,UAAYE,cAAYJ,CAAK,CAAA,CAS7B,aAAc,CACnB,MAAMK,EAAUC,EAAA,mBAAmB,KAAK,KAAK,EAAE,YACzCC,EAAMC,EAAA,cACNC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAa,EAEtE,OAAOC,EAAY,YAAA,CAAE,QAAAL,EAAS,IAAAE,EAAK,OAAAE,EAAQ,CAAA,CAmBtC,WAAWE,EAAwB,CAajC,MAAA,CAAE,SAZQ,MAAOC,GACtB,MAAM,KAAK,YAAY,EAAE,MAAM,WAAW,CAACD,CAAa,EAAG,CACzD,QAASA,EACT,MAAO,KAAK,UACZ,MAAAC,CAAA,CACD,EAOgB,SALF,SACf,MAAM,KAAK,cAAc,YAAY,WAAW,CAACD,CAAa,EAAG,CAC/D,QAASA,CAAA,CACV,CAEyB,CAAA,CAS9B,MAAa,UAAUA,EAAwB,CACtC,OAAA,MAAM,KAAK,YAAY,EAAE,KAAK,UAAU,CAACA,CAAa,CAAC,CAAA,CAQhE,MAAa,eAAgB,CACrB,MAAAE,EAAS,OAAO,IAAI,EACnB,OAAA,MAAM,KAAK,YAAY,EAAE,KAAK,eAAe,CAACA,CAAM,CAAC,CAAA,CAU9D,MAAa,aAAaC,EAAuBC,EAAyB,CACxE,OAAO,MAAM,KAAK,cAAc,KAAK,UAAU,CAC7CD,EACAC,CAAA,CACD,CAAA,CAiBI,SACLD,EACAH,EACAC,EACA,CAkBO,MAAA,CAAE,SAjBQ,SACf,MAAM,KAAK,cAAc,MAAM,SAC7B,CAACA,EAAOD,EAAeG,CAAY,EACnC,CACE,QAASH,EACT,MAAO,KAAK,SAAA,CAEhB,EAUiB,SARF,SACf,MAAM,KAAK,cAAc,YAAY,SACnC,CAACC,EAAOD,EAAeG,CAAY,EACnC,CACE,QAASH,CAAA,CAEb,CAE0B,CAAA,CAUvB,cAAcC,EAAe,CAClC,OAAO,KAAK,YAAY,EAAE,KAAK,cAAc,CAACA,CAAK,CAAC,CAAA,CAU/C,UAAUE,EAAuB,CACtC,OAAO,KAAK,YAAY,EAAE,KAAK,UAAU,CAACA,CAAY,CAAC,CAAA,CAWlD,uBAAwB,CAC7B,OAAO,KAAK,cAAc,KAAK,sBAAsB,CAAA,CAQhD,wCAAyC,CAC9C,OAAO,KAAK,cAAc,KAAK,uCAAuC,CAAA,CAkBjE,OACLA,EACAE,EACAC,EACA,CAkBO,MAAA,CAAE,SAjBQ,SACf,MAAM,KAAK,cAAc,MAAM,OAC7B,CAACA,EAAQD,EAAiBF,CAAY,EACtC,CACE,QAASA,EACT,MAAO,KAAK,SAAA,CAEhB,EAUiB,SARF,SACf,MAAM,KAAK,cAAc,YAAY,OACnC,CAACG,EAAQD,EAAiBF,CAAY,EACtC,CACE,QAASA,CAAA,CAEb,CAE0B,CAAA,CAUvB,gBAAgBI,EAAgB,CACrC,OAAO,KAAK,YAAY,EAAE,KAAK,gBAAgB,CAACA,CAAM,CAAC,CAAA,CAE3D"}
1
+ {"version":3,"file":"puffer-vault-handler.cjs","sources":["../../../lib/contracts/handlers/puffer-vault-handler.ts"],"sourcesContent":["import {\n Address,\n GetContractReturnType,\n PublicClient,\n WalletClient,\n getContract,\n} from 'viem';\nimport { Chain, VIEM_CHAINS, ViemChain } from '../../chains/constants';\nimport { CONTRACT_ADDRESSES } from '../addresses';\nimport { PufferVaultV2 } from '../abis/mainnet/PufferVaultV2';\n\n/**\n * Handler for the `PufferVaultV2` contract exposing methods to interact\n * with the contract.\n */\nexport class PufferVaultHandler {\n private viemChain: ViemChain;\n\n /**\n * Create the handler for the `PufferVaultV2` 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 private chain: Chain,\n private walletClient: WalletClient,\n private publicClient: PublicClient,\n ) {\n this.viemChain = VIEM_CHAINS[chain];\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 const address = CONTRACT_ADDRESSES[this.chain].PufferVault as Address;\n const abi = PufferVaultV2;\n const client = { public: this.publicClient, wallet: this.walletClient };\n\n return getContract({ address, abi, client }) as GetContractReturnType<\n typeof abi,\n typeof client,\n Address\n >;\n }\n\n /**\n * Deposit tokens(e.g. WETH) in exchange for pufETH. This doesn't make the\n * transaction but returns two methods namely `transact` and\n * `estimate`.\n *\n * @param walletAddress Wallet address to get the tokens from.\n * @param value Value of tokens to deposit.\n * @returns `transact: (value: bigint) => Promise<Address>` -\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public deposit(walletAddress: Address, value: bigint) {\n const transact = async () =>\n await this.getContract().write.deposit([value, walletAddress], {\n account: walletAddress,\n chain: this.viemChain,\n });\n\n const estimate = async () =>\n await this.getContract().estimateGas.deposit([value, walletAddress], {\n account: walletAddress,\n });\n\n return { transact, estimate };\n }\n\n /**\n * Deposit ETH in exchange for pufETH. This doesn't make the\n * transaction but returns two methods namely `transact` and\n * `estimate`.\n *\n * @param walletAddress Wallet address to get the ETH from.\n * @returns `transact: (value: bigint) => Promise<Address>` - Used to\n * make the transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public depositETH(walletAddress: Address) {\n const transact = async (value: bigint) =>\n await this.getContract().write.depositETH([walletAddress], {\n account: walletAddress,\n chain: this.viemChain,\n value,\n });\n\n const estimate = async () =>\n await this.getContract().estimateGas.depositETH([walletAddress], {\n account: walletAddress,\n });\n\n return { transact, estimate };\n }\n\n /**\n * Check the pufETH balance of the wallet.\n *\n * @param walletAddress Wallet address to check the balance of.\n * @returns pufETH balance in wei.\n */\n public async balanceOf(walletAddress: Address) {\n return await this.getContract().read.balanceOf([walletAddress]);\n }\n\n /**\n * Get the rate of pufETH compared to ETH.\n *\n * @returns Rate of pufETH compared to 1 ETH.\n */\n public async getPufETHRate() {\n const oneWei = BigInt(1e18);\n return await this.getContract().read.previewDeposit([oneWei]);\n }\n\n /**\n * Get the allowance for the given owner and spender.\n *\n * @param ownerAddress Address of the owner.\n * @param spenderAddress Address of the spender.\n * @returns Allowance for the given owner and spender.\n */\n public async getAllowance(ownerAddress: Address, spenderAddress: Address) {\n return await this.getContract().read.allowance([\n ownerAddress,\n spenderAddress,\n ]);\n }\n\n /**\n * Withdraw pufETH to the given wallet address. This doesn't make the\n * transaction but returns two methods namely `transact` and\n * `estimate`.\n *\n * @param ownerAddress Address of the owner.\n * @param walletAddress Address of the receiver.\n * @param value Value of pufETH to withdraw.\n * @returns `transact: (value: bigint) => Promise<Address>` - Used to\n * make the transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public withdraw(\n ownerAddress: Address,\n walletAddress: Address,\n value: bigint,\n ) {\n const transact = async () =>\n await this.getContract().write.withdraw(\n [value, walletAddress, ownerAddress],\n {\n account: walletAddress,\n chain: this.viemChain,\n },\n );\n\n const estimate = async () =>\n await this.getContract().estimateGas.withdraw(\n [value, walletAddress, ownerAddress],\n {\n account: walletAddress,\n },\n );\n\n return { transact, estimate };\n }\n\n /**\n * Preview the amount of WETH that can be redeemed for the given\n * amount of pufETH using the `.redeem()` method.\n *\n * @param value Value of pufETH to redeem.\n * @returns Preview of the amount of WETH that can be redeemed.\n */\n public previewRedeem(value: bigint) {\n return this.getContract().read.previewRedeem([value]);\n }\n\n /**\n * Calculates the maximum amount of pufETH shares that can be redeemed\n * by the owner.\n *\n * @param ownerAddress Address of the owner's wallet.\n * @returns Maximum amount of pufETH shares that can be redeemed.\n */\n public maxRedeem(ownerAddress: Address) {\n return this.getContract().read.maxRedeem([ownerAddress]);\n }\n\n /**\n * Returns how many basis points of a fee there are when exiting. For\n * example, a 1% fee would mean 1% of the user's requested pufETH is\n * burned (which increases the value for all pufETH holders) before\n * the ETH is redeemed. i.e., you get 1% less ETH back.\n *\n * @returns Basis points of the exit fee.\n */\n public getExitFeeBasisPoints() {\n return this.getContract().read.getExitFeeBasisPoints();\n }\n\n /**\n * Returns how much WETH can still be withdrawn today.\n *\n * @returns Remaining WETH daily withdrawal limit.\n */\n public getRemainingAssetsDailyWithdrawalLimit() {\n return this.getContract().read.getRemainingAssetsDailyWithdrawalLimit();\n }\n\n /**\n * Redeems pufETH shares in exchange for WETH assets from the vault.\n * In the process, the pufETH shares of the owner are burned. This\n * doesn't make the transaction but returns two methods namely\n * `transact` and `estimate`.\n *\n * @param ownerAddress Address of the owner of pufETH.\n * @param receiverAddress Address of the receiver of WETH.\n * @param shares Amount of pufETH shares to redeem.\n * @returns `transact: (value: bigint) => Promise<Address>` - Used to\n * make the transaction with the given value.\n *\n * `estimate: () => Promise<bigint>` - Gas estimate of the\n * transaction.\n */\n public redeem(\n ownerAddress: Address,\n receiverAddress: Address,\n shares: bigint,\n ) {\n const transact = async () =>\n await this.getContract().write.redeem(\n [shares, receiverAddress, ownerAddress],\n {\n account: ownerAddress,\n chain: this.viemChain,\n },\n );\n\n const estimate = async () =>\n await this.getContract().estimateGas.redeem(\n [shares, receiverAddress, ownerAddress],\n {\n account: ownerAddress,\n },\n );\n\n return { transact, estimate };\n }\n\n /**\n * Gives exchange rate of pufETH relative to WETH.\n * This does not include any fees, as compared to previewRedeem method.\n *\n * @param amount Amount of pufETH to convert.\n * @returns Amount of equivalent WETH.\n */\n public convertToAssets(amount: bigint) {\n return this.getContract().read.convertToAssets([amount]);\n }\n}\n"],"names":["PufferVaultHandler","chain","walletClient","publicClient","__publicField","VIEM_CHAINS","address","CONTRACT_ADDRESSES","abi","PufferVaultV2","client","getContract","walletAddress","value","oneWei","ownerAddress","spenderAddress","receiverAddress","shares","amount"],"mappings":"6ZAeO,MAAMA,CAAmB,CAa9B,YACUC,EACAC,EACAC,EACR,CAhBMC,EAAA,kBAaE,KAAA,MAAAH,EACA,KAAA,aAAAC,EACA,KAAA,aAAAC,EAEH,KAAA,UAAYE,cAAYJ,CAAK,CAAA,CAS7B,aAAc,CACnB,MAAMK,EAAUC,EAAA,mBAAmB,KAAK,KAAK,EAAE,YACzCC,EAAMC,EAAA,cACNC,EAAS,CAAE,OAAQ,KAAK,aAAc,OAAQ,KAAK,YAAa,EAEtE,OAAOC,EAAY,YAAA,CAAE,QAAAL,EAAS,IAAAE,EAAK,OAAAE,EAAQ,CAAA,CAmBtC,QAAQE,EAAwBC,EAAe,CAY7C,MAAA,CAAE,SAXQ,SACf,MAAM,KAAK,YAAA,EAAc,MAAM,QAAQ,CAACA,EAAOD,CAAa,EAAG,CAC7D,QAASA,EACT,MAAO,KAAK,SAAA,CACb,EAOgB,SALF,SACf,MAAM,KAAK,YAAA,EAAc,YAAY,QAAQ,CAACC,EAAOD,CAAa,EAAG,CACnE,QAASA,CAAA,CACV,CAEyB,CAAA,CAevB,WAAWA,EAAwB,CAajC,MAAA,CAAE,SAZQ,MAAOC,GACtB,MAAM,KAAK,YAAY,EAAE,MAAM,WAAW,CAACD,CAAa,EAAG,CACzD,QAASA,EACT,MAAO,KAAK,UACZ,MAAAC,CAAA,CACD,EAOgB,SALF,SACf,MAAM,KAAK,cAAc,YAAY,WAAW,CAACD,CAAa,EAAG,CAC/D,QAASA,CAAA,CACV,CAEyB,CAAA,CAS9B,MAAa,UAAUA,EAAwB,CACtC,OAAA,MAAM,KAAK,YAAY,EAAE,KAAK,UAAU,CAACA,CAAa,CAAC,CAAA,CAQhE,MAAa,eAAgB,CACrB,MAAAE,EAAS,OAAO,IAAI,EACnB,OAAA,MAAM,KAAK,YAAY,EAAE,KAAK,eAAe,CAACA,CAAM,CAAC,CAAA,CAU9D,MAAa,aAAaC,EAAuBC,EAAyB,CACxE,OAAO,MAAM,KAAK,cAAc,KAAK,UAAU,CAC7CD,EACAC,CAAA,CACD,CAAA,CAiBI,SACLD,EACAH,EACAC,EACA,CAkBO,MAAA,CAAE,SAjBQ,SACf,MAAM,KAAK,cAAc,MAAM,SAC7B,CAACA,EAAOD,EAAeG,CAAY,EACnC,CACE,QAASH,EACT,MAAO,KAAK,SAAA,CAEhB,EAUiB,SARF,SACf,MAAM,KAAK,cAAc,YAAY,SACnC,CAACC,EAAOD,EAAeG,CAAY,EACnC,CACE,QAASH,CAAA,CAEb,CAE0B,CAAA,CAUvB,cAAcC,EAAe,CAClC,OAAO,KAAK,YAAY,EAAE,KAAK,cAAc,CAACA,CAAK,CAAC,CAAA,CAU/C,UAAUE,EAAuB,CACtC,OAAO,KAAK,YAAY,EAAE,KAAK,UAAU,CAACA,CAAY,CAAC,CAAA,CAWlD,uBAAwB,CAC7B,OAAO,KAAK,cAAc,KAAK,sBAAsB,CAAA,CAQhD,wCAAyC,CAC9C,OAAO,KAAK,cAAc,KAAK,uCAAuC,CAAA,CAkBjE,OACLA,EACAE,EACAC,EACA,CAkBO,MAAA,CAAE,SAjBQ,SACf,MAAM,KAAK,cAAc,MAAM,OAC7B,CAACA,EAAQD,EAAiBF,CAAY,EACtC,CACE,QAASA,EACT,MAAO,KAAK,SAAA,CAEhB,EAUiB,SARF,SACf,MAAM,KAAK,cAAc,YAAY,OACnC,CAACG,EAAQD,EAAiBF,CAAY,EACtC,CACE,QAASA,CAAA,CAEb,CAE0B,CAAA,CAUvB,gBAAgBI,EAAgB,CACrC,OAAO,KAAK,YAAY,EAAE,KAAK,gBAAgB,CAACA,CAAM,CAAC,CAAA,CAE3D"}
@@ -27,6 +27,24 @@ export declare class PufferVaultHandler {
27
27
  * @returns The viem contract.
28
28
  */
29
29
  getContract(): GetContractReturnType<readonly [{
30
+ readonly type: "function";
31
+ readonly name: "deposit";
32
+ readonly inputs: readonly [{
33
+ readonly name: "assets";
34
+ readonly type: "uint256";
35
+ readonly internalType: "uint256";
36
+ }, {
37
+ readonly name: "receiver";
38
+ readonly type: "address";
39
+ readonly internalType: "address";
40
+ }];
41
+ readonly outputs: readonly [{
42
+ readonly name: "";
43
+ readonly type: "uint256";
44
+ readonly internalType: "uint256";
45
+ }];
46
+ readonly stateMutability: "nonpayable";
47
+ }, {
30
48
  readonly type: "function";
31
49
  readonly name: "depositETH";
32
50
  readonly inputs: readonly [{
@@ -7040,7 +7058,7 @@ export declare class PufferVaultHandler {
7040
7058
  simulate: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7041
7059
  simulateBlocks: <const calls extends readonly unknown[]>(args: import('viem').SimulateBlocksParameters<calls>) => Promise<import('viem').SimulateBlocksReturnType<calls>>;
7042
7060
  simulateCalls: <const calls extends readonly unknown[]>(args: import('viem').SimulateCallsParameters<calls>) => Promise<import('viem').SimulateCallsReturnType<calls>>;
7043
- simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
7061
+ simulateContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, const args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined, accountOverride extends import('viem').Account | Address | undefined = undefined>(args: import('viem').SimulateContractParameters<abi, functionName, args_1, ViemChain | undefined, chainOverride, accountOverride>) => Promise<import('viem').SimulateContractReturnType<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride, accountOverride>>;
7044
7062
  verifyMessage: (args: import('viem').VerifyMessageActionParameters) => Promise<import('viem').VerifyMessageActionReturnType>;
7045
7063
  verifySiweMessage: (args: {
7046
7064
  blockNumber?: bigint | undefined | undefined;
@@ -14513,7 +14531,7 @@ export declare class PufferVaultHandler {
14513
14531
  [x: `bytes18[${string}]`]: undefined;
14514
14532
  [x: `bytes2[${string}]`]: undefined;
14515
14533
  [x: `bytes3[${string}]`]: undefined;
14516
- [x: `bytes11[${string}]`]: undefined;
14534
+ [x: `bytes12[${string}]`]: undefined;
14517
14535
  [x: `bytes23[${string}]`]: undefined;
14518
14536
  [x: `bytes4[${string}]`]: undefined;
14519
14537
  [x: `bytes5[${string}]`]: undefined;
@@ -14522,7 +14540,7 @@ export declare class PufferVaultHandler {
14522
14540
  [x: `bytes8[${string}]`]: undefined;
14523
14541
  [x: `bytes9[${string}]`]: undefined;
14524
14542
  [x: `bytes10[${string}]`]: undefined;
14525
- [x: `bytes12[${string}]`]: undefined;
14543
+ [x: `bytes11[${string}]`]: undefined;
14526
14544
  [x: `bytes13[${string}]`]: undefined;
14527
14545
  [x: `bytes14[${string}]`]: undefined;
14528
14546
  [x: `bytes15[${string}]`]: undefined;
@@ -14615,7 +14633,7 @@ export declare class PufferVaultHandler {
14615
14633
  bytes18?: undefined;
14616
14634
  bytes2?: undefined;
14617
14635
  bytes3?: undefined;
14618
- bytes11?: undefined;
14636
+ bytes12?: undefined;
14619
14637
  bytes23?: undefined;
14620
14638
  bytes4?: undefined;
14621
14639
  bytes5?: undefined;
@@ -14624,7 +14642,7 @@ export declare class PufferVaultHandler {
14624
14642
  bytes8?: undefined;
14625
14643
  bytes9?: undefined;
14626
14644
  bytes10?: undefined;
14627
- bytes12?: undefined;
14645
+ bytes11?: undefined;
14628
14646
  bytes13?: undefined;
14629
14647
  bytes14?: undefined;
14630
14648
  bytes15?: undefined;
@@ -14711,7 +14729,7 @@ export declare class PufferVaultHandler {
14711
14729
  }, primaryType extends string>(args: import('viem').SignTypedDataParameters<typedData, primaryType, import('viem').Account | undefined>) => Promise<import('viem').SignTypedDataReturnType>;
14712
14730
  switchChain: (args: import('viem').SwitchChainParameters) => Promise<void>;
14713
14731
  watchAsset: (args: import('viem').WatchAssetParameters) => Promise<import('viem').WatchAssetReturnType>;
14714
- writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "payable" | "nonpayable">, args_1 extends import('viem').ContractFunctionArgs<abi, "payable" | "nonpayable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14732
+ writeContract: <const abi extends import('viem').Abi | readonly unknown[], functionName extends import('viem').ContractFunctionName<abi, "nonpayable" | "payable">, args_1 extends import('viem').ContractFunctionArgs<abi, "nonpayable" | "payable", functionName>, chainOverride extends ViemChain | undefined = undefined>(args: import('viem').WriteContractParameters<abi, functionName, args_1, ViemChain | undefined, import('viem').Account | undefined, chainOverride>) => Promise<import('viem').WriteContractReturnType>;
14715
14733
  extend: <const client extends {
14716
14734
  [x: string]: unknown;
14717
14735
  account?: undefined;
@@ -14729,6 +14747,22 @@ export declare class PufferVaultHandler {
14729
14747
  } & import('viem').ExactPartial<Pick<import('viem').PublicActions<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined>, "getChainId" | "prepareTransactionRequest" | "sendRawTransaction" | "call" | "createContractEventFilter" | "createEventFilter" | "estimateContractGas" | "estimateGas" | "getBlock" | "getBlockNumber" | "getContractEvents" | "getEnsText" | "getFilterChanges" | "getGasPrice" | "getLogs" | "getTransaction" | "getTransactionCount" | "getTransactionReceipt" | "readContract" | "simulateContract" | "uninstallFilter" | "watchBlockNumber" | "watchContractEvent"> & Pick<import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>, "sendTransaction" | "writeContract">>>(fn: (client: import('viem').Client<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined, import('viem').WalletRpcSchema, import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>>) => client) => import('viem').Client<import('viem').Transport, ViemChain | undefined, import('viem').Account | undefined, import('viem').WalletRpcSchema, { [K in keyof client]: client[K]; } & import('viem').WalletActions<ViemChain | undefined, import('viem').Account | undefined>>;
14730
14748
  };
14731
14749
  }, Address>;
14750
+ /**
14751
+ * Deposit tokens(e.g. WETH) in exchange for pufETH. This doesn't make the
14752
+ * transaction but returns two methods namely `transact` and
14753
+ * `estimate`.
14754
+ *
14755
+ * @param walletAddress Wallet address to get the tokens from.
14756
+ * @param value Value of tokens to deposit.
14757
+ * @returns `transact: (value: bigint) => Promise<Address>` -
14758
+ *
14759
+ * `estimate: () => Promise<bigint>` - Gas estimate of the
14760
+ * transaction.
14761
+ */
14762
+ deposit(walletAddress: Address, value: bigint): {
14763
+ transact: () => Promise<`0x${string}`>;
14764
+ estimate: () => Promise<bigint>;
14765
+ };
14732
14766
  /**
14733
14767
  * Deposit ETH in exchange for pufETH. This doesn't make the
14734
14768
  * transaction but returns two methods namely `transact` and