@pufferfinance/puffer-sdk 1.5.2 → 1.5.4
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.js +43 -36
- package/dist/api/puffer-client.js.map +1 -1
- package/dist/contracts/abis/mainnet/PufferWithdrawalManager.cjs +2 -0
- package/dist/contracts/abis/mainnet/PufferWithdrawalManager.cjs.map +1 -0
- package/dist/contracts/abis/mainnet/PufferWithdrawalManager.js +665 -0
- package/dist/contracts/abis/mainnet/PufferWithdrawalManager.js.map +1 -0
- package/dist/contracts/abis/puffer-withdrawal-manager-abis.cjs +2 -0
- package/dist/contracts/abis/puffer-withdrawal-manager-abis.cjs.map +1 -0
- package/dist/contracts/abis/puffer-withdrawal-manager-abis.js +10 -0
- package/dist/contracts/abis/puffer-withdrawal-manager-abis.js.map +1 -0
- package/dist/contracts/addresses.cjs +1 -1
- package/dist/contracts/addresses.cjs.map +1 -1
- package/dist/contracts/addresses.js +11 -7
- package/dist/contracts/addresses.js.map +1 -1
- package/dist/contracts/handlers/erc20-permit-handler.cjs +1 -1
- package/dist/contracts/handlers/erc20-permit-handler.cjs.map +1 -1
- package/dist/contracts/handlers/erc20-permit-handler.js +19 -14
- package/dist/contracts/handlers/erc20-permit-handler.js.map +1 -1
- package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs +2 -0
- package/dist/contracts/handlers/puffer-withdrawal-manager-handler.cjs.map +1 -0
- package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js +116 -0
- package/dist/contracts/handlers/puffer-withdrawal-manager-handler.js.map +1 -0
- package/dist/contracts/tokens.cjs +1 -1
- package/dist/contracts/tokens.cjs.map +1 -1
- package/dist/contracts/tokens.js +11 -3
- package/dist/contracts/tokens.js.map +1 -1
- package/dist/main.cjs +1 -1
- package/dist/main.js +26 -23
- package/dist/main.js.map +1 -1
- package/dist/utils/version.cjs +1 -1
- package/dist/utils/version.js +1 -1
- package/package.json +1 -1
- package/dist/api/puffer-client-helpers.d.ts +0 -33
- package/dist/api/puffer-client.d.ts +0 -49
- package/dist/chains/constants.d.ts +0 -11
- package/dist/contracts/abis/holesky/PufferDepositor.d.ts +0 -283
- package/dist/contracts/abis/holesky/PufferVaultV2.d.ts +0 -1361
- package/dist/contracts/abis/l1-reward-manager-abis.d.ts +0 -527
- package/dist/contracts/abis/l2-reward-manager-abis.d.ts +0 -709
- package/dist/contracts/abis/mainnet/ERC20Permit.d.ts +0 -396
- package/dist/contracts/abis/mainnet/L1RewardManager.d.ts +0 -523
- package/dist/contracts/abis/mainnet/L2RewardManager.d.ts +0 -705
- package/dist/contracts/abis/mainnet/PufLocker.d.ts +0 -480
- package/dist/contracts/abis/mainnet/PufToken.d.ts +0 -676
- package/dist/contracts/abis/mainnet/PufferDepositor.d.ts +0 -283
- package/dist/contracts/abis/mainnet/PufferL2Depositor.d.ts +0 -373
- package/dist/contracts/abis/mainnet/PufferVaultV2.d.ts +0 -1421
- package/dist/contracts/abis/puf-locker-abis.d.ts +0 -484
- package/dist/contracts/abis/puf-token-abis.d.ts +0 -680
- package/dist/contracts/abis/puffer-depositor-abis.d.ts +0 -664
- package/dist/contracts/abis/puffer-vault-abis.d.ts +0 -2787
- package/dist/contracts/abis/tokens-abis.d.ts +0 -396
- package/dist/contracts/addresses.d.ts +0 -10
- package/dist/contracts/handlers/erc20-permit-handler.d.ts +0 -6579
- package/dist/contracts/handlers/l1-reward-manager-handler.d.ts +0 -6693
- package/dist/contracts/handlers/l2-reward-manager-handler.d.ts +0 -6939
- package/dist/contracts/handlers/puf-locker-handler.d.ts +0 -6702
- package/dist/contracts/handlers/puf-token-handler.d.ts +0 -6920
- package/dist/contracts/handlers/puffer-depositor-handler.d.ts +0 -6462
- package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +0 -6555
- package/dist/contracts/handlers/puffer-vault-handler.d.ts +0 -9030
- package/dist/contracts/tokens.d.ts +0 -47
- package/dist/errors/base-error.d.ts +0 -7
- package/dist/errors/types.d.ts +0 -4
- package/dist/errors/validation-errors.d.ts +0 -5
- package/dist/main.d.ts +0 -13
- package/dist/utils/time.d.ts +0 -1
- package/dist/utils/types.d.ts +0 -4
- package/dist/utils/version.d.ts +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"tokens.js","sources":["../../lib/contracts/tokens.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { Chain } from '../chains/constants';\n\nexport enum Token {\n USDT = 'USDT',\n USDC = 'USDC',\n DAI = 'DAI',\n WETH = 'WETH',\n stETH = 'stETH',\n wstETH = 'wstETH',\n ALT = 'ALT',\n eETH = 'eETH',\n pufETHwstE = 'pufETHwstE',\n pufETH = 'pufETH',\n}\n\nexport enum PufToken {\n pufUSDT = 'pufUSDT',\n pufUSDC = 'pufUSDC',\n pufDAI = 'pufDAI',\n pufpufETH = 'pufpufETH',\n pufWETH = 'pufWETH',\n pufstETH = 'pufstETH',\n pufwstETH = 'pufwstETH',\n pufALT = 'pufALT',\n pufeETH = 'pufeETH',\n pufpufETHwstE = 'pufpufETHwstE',\n}\n\nexport type AnyToken = Token | PufToken;\n\nexport const TOKEN_TO_PUF_TOKEN_MAP = {\n [Token.USDT]: PufToken.pufUSDT,\n [Token.USDC]: PufToken.pufUSDC,\n [Token.DAI]: PufToken.pufDAI,\n [Token.WETH]: PufToken.pufWETH,\n [Token.stETH]: PufToken.pufstETH,\n [Token.wstETH]: PufToken.pufwstETH,\n [Token.ALT]: PufToken.pufALT,\n [Token.eETH]: PufToken.pufeETH,\n [Token.pufETHwstE]: PufToken.pufpufETHwstE,\n [Token.pufETH]: PufToken.pufpufETH,\n};\n\nexport const TOKENS_ADDRESSES: {\n [key in
|
|
1
|
+
{"version":3,"file":"tokens.js","sources":["../../lib/contracts/tokens.ts"],"sourcesContent":["import { Address } from 'viem';\nimport { Chain } from '../chains/constants';\n\nexport enum Token {\n USDT = 'USDT',\n USDC = 'USDC',\n DAI = 'DAI',\n WETH = 'WETH',\n stETH = 'stETH',\n wstETH = 'wstETH',\n ALT = 'ALT',\n eETH = 'eETH',\n pufETHwstE = 'pufETHwstE',\n pufETH = 'pufETH',\n}\n\nexport enum PufToken {\n pufUSDT = 'pufUSDT',\n pufUSDC = 'pufUSDC',\n pufDAI = 'pufDAI',\n pufpufETH = 'pufpufETH',\n pufWETH = 'pufWETH',\n pufstETH = 'pufstETH',\n pufwstETH = 'pufwstETH',\n pufALT = 'pufALT',\n pufeETH = 'pufeETH',\n pufpufETHwstE = 'pufpufETHwstE',\n}\n\nexport type AnyToken = Token | PufToken;\n\nexport const TOKEN_TO_PUF_TOKEN_MAP = {\n [Token.USDT]: PufToken.pufUSDT,\n [Token.USDC]: PufToken.pufUSDC,\n [Token.DAI]: PufToken.pufDAI,\n [Token.WETH]: PufToken.pufWETH,\n [Token.stETH]: PufToken.pufstETH,\n [Token.wstETH]: PufToken.pufwstETH,\n [Token.ALT]: PufToken.pufALT,\n [Token.eETH]: PufToken.pufeETH,\n [Token.pufETHwstE]: PufToken.pufpufETHwstE,\n [Token.pufETH]: PufToken.pufpufETH,\n};\n\nexport const TOKENS_ADDRESSES: {\n [key in AnyToken]: { [chain in Chain]: Address };\n} = {\n [Token.USDT]: {\n [Chain.Mainnet]: '0xdac17f958d2ee523a2206206994597c13d831ec7',\n [Chain.Holesky]: '0xd5bef2c64f418fd460319521d37862327122e3bc',\n },\n [Token.USDC]: {\n [Chain.Mainnet]: '0xa0b86991c6218b36c1d19d4a2e9eb0ce3606eb48',\n [Chain.Holesky]: '0x64Cc0de0429bcb87e875905a0c313ec88f6d1d3E',\n },\n [Token.DAI]: {\n [Chain.Mainnet]: '0x6b175474e89094c44da98b954eedeac495271d0f',\n [Chain.Holesky]: '0x4478905505ddfb7eA1c8A9f46eAEC3695cE542ac',\n },\n [Token.WETH]: {\n [Chain.Mainnet]: '0xc02aaa39b223fe8d0a0e5c4f27ead9083c756cc2',\n [Chain.Holesky]: '0x1d181cBd1825e9eBC6AD966878D555A7215FF4F0',\n },\n [Token.stETH]: {\n [Chain.Mainnet]: '0xae7ab96520de3a18e5e111b5eaab095312d7fe84',\n [Chain.Holesky]: '0x3F1c547b21f65e10480dE3ad8E19fAAC46C95034',\n },\n [Token.wstETH]: {\n [Chain.Mainnet]: '0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0',\n [Chain.Holesky]: '0x8d09a4502Cc8Cf1547aD300E066060D043f6982D',\n },\n [Token.ALT]: {\n [Chain.Mainnet]: '0x8457ca5040ad67fdebbcc8edce889a335bc0fbfb',\n [Chain.Holesky]: '0xaf5588a571b42c7e50bd440d80f9bf94a4db94ee',\n },\n [Token.eETH]: {\n [Chain.Mainnet]: '0x35fa164735182de50811e8e2e824cfb9b6118ac2',\n [Chain.Holesky]: '0x7ba2ee123b5977e3da040e1eacb3a61c82c17876',\n },\n [Token.pufETHwstE]: {\n [Chain.Mainnet]: '0xeeda34a377dd0ca676b9511ee1324974fa8d980d',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [Token.pufETH]: {\n [Chain.Mainnet]: '0xd9a442856c234a39a81a089c06451ebaa4306a72',\n [Chain.Holesky]: '0x9196830bB4c05504E0A8475A0aD566AceEB6BeC9',\n },\n\n // TODO: Update the addresses once the contracts are deployed on chain.\n // See https://dev.azure.com/pufferfi/Frontend/_workitems/edit/1797.\n\n // Wrapped PufTokens.\n [PufToken.pufUSDT]: {\n [Chain.Mainnet]: '0x0000000000000000000000000000000000000000',\n [Chain.Holesky]: '0x61e7C87c387178D6e0aE6c04748b7FF753fC9b81',\n },\n [PufToken.pufUSDC]: {\n [Chain.Mainnet]: '0x2f0d8e30df0c598b90b34cd68b5e3981b7af3881',\n [Chain.Holesky]: '0x6D900a9f5784A2cA0004B5c3D3e08D7A9cE4A1b3',\n },\n [PufToken.pufDAI]: {\n [Chain.Mainnet]: '0x0000000000000000000000000000000000000000',\n [Chain.Holesky]: '0x2D6B705e118198A02F00490BA323B17eC5D58109',\n },\n [PufToken.pufWETH]: {\n [Chain.Mainnet]: '0x2b36f6bfd223f460e7e43ef49bc487481648948c',\n [Chain.Holesky]: '0x5335f231C22d472Ab31CC2690A2247d25efd76a5',\n },\n [PufToken.pufstETH]: {\n [Chain.Mainnet]: '0x0000000000000000000000000000000000000000',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [PufToken.pufwstETH]: {\n [Chain.Mainnet]: '0x0000000000000000000000000000000000000000',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [PufToken.pufALT]: {\n [Chain.Mainnet]: '0x0000000000000000000000000000000000000000',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [PufToken.pufeETH]: {\n [Chain.Mainnet]: '0x0000000000000000000000000000000000000000',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [PufToken.pufpufETHwstE]: {\n [Chain.Mainnet]: '0xf374014f6fa86bad50d52e6240a117b0830663cb',\n [Chain.Holesky]: '0x0000000000000000000000000000000000000000',\n },\n [PufToken.pufpufETH]: {\n [Chain.Mainnet]: '0x0000000000000000000000000000000000000000',\n [Chain.Holesky]: '0x638fd1Fe8205285E8497Eb8E6037c8254EDdB0ae',\n },\n};\n\nexport const TOKENS_PERMIT_VERSION: { [key in AnyToken]: string } = {\n [Token.USDT]: '2',\n // USDC does not support permit signatures (ERC20Permit).\n [Token.USDC]: '',\n // DAI does not support permit signatures (ERC20Permit).\n [Token.DAI]: '',\n // WETH does not support permit signatures (ERC20Permit).\n [Token.WETH]: '',\n [Token.stETH]: '2',\n // Puffer Quest v1 uses version 1 for wstETH.\n [Token.wstETH]: '1',\n [Token.ALT]: '1',\n // https://github.com/etherfi-protocol/smart-contracts/blob/7c66e571df4fe7ec502a3c325b623bc52349ef9d/src/EETH.sol#L55\n [Token.eETH]: '1',\n [Token.pufETHwstE]: 'v7.0.0',\n [Token.pufETH]: '1',\n\n // Wrapped PufTokens\n [PufToken.pufUSDT]: '1',\n [PufToken.pufUSDC]: '1',\n [PufToken.pufDAI]: '1',\n [PufToken.pufWETH]: '1',\n [PufToken.pufstETH]: '1',\n [PufToken.pufwstETH]: '1',\n [PufToken.pufALT]: '1',\n [PufToken.pufeETH]: '1',\n [PufToken.pufpufETHwstE]: '1',\n [PufToken.pufpufETH]: '1',\n};\n\nexport const TOKENS_SALT: Partial<{\n [key in AnyToken]: { [chain in Chain]: Address };\n}> = {\n [Token.pufETHwstE]: {\n // Taken from\n // https://etherscan.io/token/0xeeda34a377dd0ca676b9511ee1324974fa8d980d#readContract#F39.\n [Chain.Mainnet]:\n '0x0e986ed5610121905f03fd3850cebcc00f66166fc3ab760acb4e087d735d9457',\n [Chain.Holesky]:\n '0x0000000000000000000000000000000000000000000000000000000000000000',\n },\n};\n"],"names":["Token","PufToken","TOKEN_TO_PUF_TOKEN_MAP","TOKENS_ADDRESSES","Chain","TOKENS_PERMIT_VERSION","TOKENS_SALT"],"mappings":";AAGY,IAAAA,sBAAAA,OACVA,EAAA,OAAO,QACPA,EAAA,OAAO,QACPA,EAAA,MAAM,OACNA,EAAA,OAAO,QACPA,EAAA,QAAQ,SACRA,EAAA,SAAS,UACTA,EAAA,MAAM,OACNA,EAAA,OAAO,QACPA,EAAA,aAAa,cACbA,EAAA,SAAS,UAVCA,IAAAA,KAAA,CAAA,CAAA,GAaAC,sBAAAA,OACVA,EAAA,UAAU,WACVA,EAAA,UAAU,WACVA,EAAA,SAAS,UACTA,EAAA,YAAY,aACZA,EAAA,UAAU,WACVA,EAAA,WAAW,YACXA,EAAA,YAAY,aACZA,EAAA,SAAS,UACTA,EAAA,UAAU,WACVA,EAAA,gBAAgB,iBAVNA,IAAAA,KAAA,CAAA,CAAA;AAeL,MAAMC,IAAyB;AAAA,EACnC,MAAa;AAAA,EACb,MAAa;AAAA,EACb,KAAY;AAAA,EACZ,MAAa;AAAA,EACb,OAAc;AAAA,EACd,QAAe;AAAA,EACf,KAAY;AAAA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,WAAqB;AAAA,EACrB,QAAkB;AAAA,EAClB,SAAmB;AAAA,EACnB,eAAyB;AAAA,EACzB,WAAqB;AACxB,GAEaC,IAER;AAAA,EACF,YAAmB;AAAA;AAAA;AAAA,IAGlB,CAACF,EAAM,OAAO,GACZ;AAAA,IACF,CAACA,EAAM,OAAO,GACZ;AAAA,EACJ;AACF;"}
|
package/dist/main.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./api/puffer-client.cjs"),a=require("./api/puffer-client-helpers.cjs"),r=require("./constants-BvU-JhfL.cjs"),e=require("./contracts/tokens.cjs"),t=require("./contracts/addresses.cjs"),
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./api/puffer-client.cjs"),a=require("./api/puffer-client-helpers.cjs"),r=require("./constants-BvU-JhfL.cjs"),e=require("./contracts/tokens.cjs"),t=require("./contracts/addresses.cjs"),l=require("./contracts/handlers/erc20-permit-handler.cjs"),o=require("./contracts/handlers/l1-reward-manager-handler.cjs"),s=require("./contracts/handlers/l2-reward-manager-handler.cjs"),d=require("./contracts/handlers/puf-locker-handler.cjs"),u=require("./contracts/handlers/puf-token-handler.cjs"),f=require("./contracts/handlers/puffer-depositor-handler.cjs"),c=require("./contracts/handlers/puffer-l2-depositor-handler.cjs"),_=require("./contracts/handlers/puffer-vault-handler.cjs"),i=require("./contracts/handlers/puffer-withdrawal-manager-handler.cjs");exports.PufferClient=n.PufferClient;exports.PufferClientHelpers=a.PufferClientHelpers;exports.Chain=r.Chain;exports.VIEM_CHAINS=r.VIEM_CHAINS;exports.PufToken=e.PufToken;exports.TOKENS_ADDRESSES=e.TOKENS_ADDRESSES;exports.TOKENS_PERMIT_VERSION=e.TOKENS_PERMIT_VERSION;exports.TOKENS_SALT=e.TOKENS_SALT;exports.TOKEN_TO_PUF_TOKEN_MAP=e.TOKEN_TO_PUF_TOKEN_MAP;exports.Token=e.Token;exports.CONTRACT_ADDRESSES=t.CONTRACT_ADDRESSES;exports.ERC20PermitHandler=l.ERC20PermitHandler;exports.L1RewardManagerHandler=o.L1RewardManagerHandler;exports.L2RewardManagerHandler=s.L2RewardManagerHandler;exports.PufLockerHandler=d.PufLockerHandler;exports.PufTokenHandler=u.PufTokenHandler;exports.PufferDepositorHandler=f.PufferDepositorHandler;exports.PufferL2DepositorHandler=c.PufferL2DepositorHandler;exports.PufferVaultHandler=_.PufferVaultHandler;exports.PufferWithdrawalManagerHandler=i.PufferWithdrawalManagerHandler;
|
|
2
2
|
//# sourceMappingURL=main.cjs.map
|
package/dist/main.js
CHANGED
|
@@ -1,34 +1,37 @@
|
|
|
1
1
|
import { PufferClient as o } from "./api/puffer-client.js";
|
|
2
|
-
import { PufferClientHelpers as
|
|
2
|
+
import { PufferClientHelpers as a } from "./api/puffer-client-helpers.js";
|
|
3
3
|
import { C as n, V as p } from "./constants-rWWWhxR_.js";
|
|
4
|
-
import { PufToken as
|
|
4
|
+
import { PufToken as l, TOKENS_ADDRESSES as x, TOKENS_PERMIT_VERSION as E, TOKENS_SALT as P, TOKEN_TO_PUF_TOKEN_MAP as T, Token as d } from "./contracts/tokens.js";
|
|
5
5
|
import { CONTRACT_ADDRESSES as H } from "./contracts/addresses.js";
|
|
6
|
-
import { ERC20PermitHandler as
|
|
7
|
-
import { L1RewardManagerHandler as
|
|
8
|
-
import { L2RewardManagerHandler as
|
|
9
|
-
import { PufLockerHandler as
|
|
10
|
-
import { PufTokenHandler as
|
|
11
|
-
import { PufferDepositorHandler as
|
|
12
|
-
import { PufferL2DepositorHandler as
|
|
13
|
-
import { PufferVaultHandler as
|
|
6
|
+
import { ERC20PermitHandler as _ } from "./contracts/handlers/erc20-permit-handler.js";
|
|
7
|
+
import { L1RewardManagerHandler as N } from "./contracts/handlers/l1-reward-manager-handler.js";
|
|
8
|
+
import { L2RewardManagerHandler as R } from "./contracts/handlers/l2-reward-manager-handler.js";
|
|
9
|
+
import { PufLockerHandler as A } from "./contracts/handlers/puf-locker-handler.js";
|
|
10
|
+
import { PufTokenHandler as M } from "./contracts/handlers/puf-token-handler.js";
|
|
11
|
+
import { PufferDepositorHandler as K } from "./contracts/handlers/puffer-depositor-handler.js";
|
|
12
|
+
import { PufferL2DepositorHandler as k } from "./contracts/handlers/puffer-l2-depositor-handler.js";
|
|
13
|
+
import { PufferVaultHandler as V } from "./contracts/handlers/puffer-vault-handler.js";
|
|
14
|
+
import { PufferWithdrawalManagerHandler as w } from "./contracts/handlers/puffer-withdrawal-manager-handler.js";
|
|
14
15
|
export {
|
|
15
16
|
H as CONTRACT_ADDRESSES,
|
|
16
17
|
n as Chain,
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
18
|
+
_ as ERC20PermitHandler,
|
|
19
|
+
N as L1RewardManagerHandler,
|
|
20
|
+
R as L2RewardManagerHandler,
|
|
21
|
+
A as PufLockerHandler,
|
|
22
|
+
l as PufToken,
|
|
23
|
+
M as PufTokenHandler,
|
|
23
24
|
o as PufferClient,
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
25
|
+
a as PufferClientHelpers,
|
|
26
|
+
K as PufferDepositorHandler,
|
|
27
|
+
k as PufferL2DepositorHandler,
|
|
28
|
+
V as PufferVaultHandler,
|
|
29
|
+
w as PufferWithdrawalManagerHandler,
|
|
30
|
+
x as TOKENS_ADDRESSES,
|
|
29
31
|
E as TOKENS_PERMIT_VERSION,
|
|
30
|
-
P as
|
|
31
|
-
T as
|
|
32
|
+
P as TOKENS_SALT,
|
|
33
|
+
T as TOKEN_TO_PUF_TOKEN_MAP,
|
|
34
|
+
d as Token,
|
|
32
35
|
p as VIEM_CHAINS
|
|
33
36
|
};
|
|
34
37
|
//# sourceMappingURL=main.js.map
|
package/dist/main.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"main.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"main.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;"}
|
package/dist/utils/version.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="1.5.
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e="1.5.4",o=e;exports.version=o;
|
|
2
2
|
//# sourceMappingURL=version.cjs.map
|
package/dist/utils/version.js
CHANGED
package/package.json
CHANGED
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
import { CustomTransportConfig, PublicClient, WalletClient } from 'viem';
|
|
2
|
-
import { Chain } from '../chains/constants';
|
|
3
|
-
import { TransportProvider } from '../utils/types';
|
|
4
|
-
export type ClientConfig = {
|
|
5
|
-
chain: Chain;
|
|
6
|
-
} & ({
|
|
7
|
-
rpcUrls: string[];
|
|
8
|
-
} | {
|
|
9
|
-
provider: TransportProvider;
|
|
10
|
-
config?: CustomTransportConfig;
|
|
11
|
-
});
|
|
12
|
-
/**
|
|
13
|
-
* Helper methods for the main `PufferClient`.
|
|
14
|
-
*/
|
|
15
|
-
export declare class PufferClientHelpers {
|
|
16
|
-
/**
|
|
17
|
-
* Helper method for creating a public client based on the
|
|
18
|
-
* configuration
|
|
19
|
-
*
|
|
20
|
-
* @param config Configuration for the public client.
|
|
21
|
-
* @returns The public client created with viem.
|
|
22
|
-
*/
|
|
23
|
-
static createPublicClient(config: ClientConfig): PublicClient;
|
|
24
|
-
/**
|
|
25
|
-
* Helper method for creating a wallet client based on the
|
|
26
|
-
* configuration
|
|
27
|
-
*
|
|
28
|
-
* @param config Configuration for the wallet client.
|
|
29
|
-
* @returns The wallet client created with viem.
|
|
30
|
-
*/
|
|
31
|
-
static createWalletClient(config: ClientConfig): WalletClient;
|
|
32
|
-
private static extractTransportConfig;
|
|
33
|
-
}
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
import { PublicClient, WalletClient } from 'viem';
|
|
2
|
-
import { Chain } from '../chains/constants';
|
|
3
|
-
import { PufferVaultHandler } from '../contracts/handlers/puffer-vault-handler';
|
|
4
|
-
import { PufferDepositorHandler } from '../contracts/handlers/puffer-depositor-handler';
|
|
5
|
-
import { PufTokenHandler } from '../contracts/handlers/puf-token-handler';
|
|
6
|
-
import { PufferL2DepositorHandler } from '../contracts/handlers/puffer-l2-depositor-handler';
|
|
7
|
-
import { ERC20PermitHandler } from '../contracts/handlers/erc20-permit-handler';
|
|
8
|
-
import { PufLockerHandler } from '../contracts/handlers/puf-locker-handler';
|
|
9
|
-
import { L2RewardManagerHandler } from '../contracts/handlers/l2-reward-manager-handler';
|
|
10
|
-
import { L1RewardManagerHandler } from '../contracts/handlers/l1-reward-manager-handler';
|
|
11
|
-
/**
|
|
12
|
-
* The core class and the main entry point of the Puffer SDK.
|
|
13
|
-
*/
|
|
14
|
-
export declare class PufferClient {
|
|
15
|
-
private walletClient;
|
|
16
|
-
private publicClient;
|
|
17
|
-
/** Handler for the `ERC20Permit` contract. */
|
|
18
|
-
erc20Permit: ERC20PermitHandler;
|
|
19
|
-
/** Handler for the `PufferVaultV2` contract. */
|
|
20
|
-
vault: PufferVaultHandler;
|
|
21
|
-
/** Handler for the `PufferDepositor` contract. */
|
|
22
|
-
depositor: PufferDepositorHandler;
|
|
23
|
-
/** Handler for the `PufferL2Depositor` contract. */
|
|
24
|
-
l2Depositor: PufferL2DepositorHandler;
|
|
25
|
-
/** Handler for the `PufToken` contract. */
|
|
26
|
-
pufToken: PufTokenHandler;
|
|
27
|
-
/** Handler for the `PufLocker` contract. */
|
|
28
|
-
pufLocker: PufLockerHandler;
|
|
29
|
-
/** Handler for the `L2RewardManager` contract. */
|
|
30
|
-
l2RewardManager: L2RewardManagerHandler;
|
|
31
|
-
/** Handler for the `L1RewardManager` contract. */
|
|
32
|
-
l1RewardManager: L1RewardManagerHandler;
|
|
33
|
-
/**
|
|
34
|
-
* Create the Puffer Client.
|
|
35
|
-
*
|
|
36
|
-
* @param chain Chain to use for the client.
|
|
37
|
-
* @param walletClient The wallet client to use for wallet
|
|
38
|
-
* interactions.
|
|
39
|
-
* @param publicClient The public client to use for public
|
|
40
|
-
* interactions.
|
|
41
|
-
*/
|
|
42
|
-
constructor(chain: Chain, walletClient?: WalletClient, publicClient?: PublicClient);
|
|
43
|
-
/**
|
|
44
|
-
* Request addresses from the wallet.
|
|
45
|
-
*
|
|
46
|
-
* @returns An array of wallet addresses.
|
|
47
|
-
*/
|
|
48
|
-
requestAddresses(): Promise<import('viem').RequestAddressesReturnType>;
|
|
49
|
-
}
|
|
@@ -1,283 +0,0 @@
|
|
|
1
|
-
export declare const PufferDepositor: readonly [{
|
|
2
|
-
readonly type: "constructor";
|
|
3
|
-
readonly inputs: readonly [{
|
|
4
|
-
readonly name: "pufferVault";
|
|
5
|
-
readonly type: "address";
|
|
6
|
-
readonly internalType: "contract PufferVaultV2";
|
|
7
|
-
}, {
|
|
8
|
-
readonly name: "stETH";
|
|
9
|
-
readonly type: "address";
|
|
10
|
-
readonly internalType: "contract IStETH";
|
|
11
|
-
}];
|
|
12
|
-
readonly stateMutability: "payable";
|
|
13
|
-
}, {
|
|
14
|
-
readonly type: "function";
|
|
15
|
-
readonly name: "PUFFER_VAULT";
|
|
16
|
-
readonly inputs: readonly [];
|
|
17
|
-
readonly outputs: readonly [{
|
|
18
|
-
readonly name: "";
|
|
19
|
-
readonly type: "address";
|
|
20
|
-
readonly internalType: "contract PufferVaultV2";
|
|
21
|
-
}];
|
|
22
|
-
readonly stateMutability: "view";
|
|
23
|
-
}, {
|
|
24
|
-
readonly type: "function";
|
|
25
|
-
readonly name: "UPGRADE_INTERFACE_VERSION";
|
|
26
|
-
readonly inputs: readonly [];
|
|
27
|
-
readonly outputs: readonly [{
|
|
28
|
-
readonly name: "";
|
|
29
|
-
readonly type: "string";
|
|
30
|
-
readonly internalType: "string";
|
|
31
|
-
}];
|
|
32
|
-
readonly stateMutability: "view";
|
|
33
|
-
}, {
|
|
34
|
-
readonly type: "function";
|
|
35
|
-
readonly name: "authority";
|
|
36
|
-
readonly inputs: readonly [];
|
|
37
|
-
readonly outputs: readonly [{
|
|
38
|
-
readonly name: "";
|
|
39
|
-
readonly type: "address";
|
|
40
|
-
readonly internalType: "address";
|
|
41
|
-
}];
|
|
42
|
-
readonly stateMutability: "view";
|
|
43
|
-
}, {
|
|
44
|
-
readonly type: "function";
|
|
45
|
-
readonly name: "depositStETH";
|
|
46
|
-
readonly inputs: readonly [{
|
|
47
|
-
readonly name: "permitData";
|
|
48
|
-
readonly type: "tuple";
|
|
49
|
-
readonly internalType: "struct Permit";
|
|
50
|
-
readonly components: readonly [{
|
|
51
|
-
readonly name: "deadline";
|
|
52
|
-
readonly type: "uint256";
|
|
53
|
-
readonly internalType: "uint256";
|
|
54
|
-
}, {
|
|
55
|
-
readonly name: "amount";
|
|
56
|
-
readonly type: "uint256";
|
|
57
|
-
readonly internalType: "uint256";
|
|
58
|
-
}, {
|
|
59
|
-
readonly name: "v";
|
|
60
|
-
readonly type: "uint8";
|
|
61
|
-
readonly internalType: "uint8";
|
|
62
|
-
}, {
|
|
63
|
-
readonly name: "r";
|
|
64
|
-
readonly type: "bytes32";
|
|
65
|
-
readonly internalType: "bytes32";
|
|
66
|
-
}, {
|
|
67
|
-
readonly name: "s";
|
|
68
|
-
readonly type: "bytes32";
|
|
69
|
-
readonly internalType: "bytes32";
|
|
70
|
-
}];
|
|
71
|
-
}, {
|
|
72
|
-
readonly name: "recipient";
|
|
73
|
-
readonly type: "address";
|
|
74
|
-
readonly internalType: "address";
|
|
75
|
-
}];
|
|
76
|
-
readonly outputs: readonly [{
|
|
77
|
-
readonly name: "pufETHAmount";
|
|
78
|
-
readonly type: "uint256";
|
|
79
|
-
readonly internalType: "uint256";
|
|
80
|
-
}];
|
|
81
|
-
readonly stateMutability: "nonpayable";
|
|
82
|
-
}, {
|
|
83
|
-
readonly type: "function";
|
|
84
|
-
readonly name: "depositWstETH";
|
|
85
|
-
readonly inputs: readonly [{
|
|
86
|
-
readonly name: "permitData";
|
|
87
|
-
readonly type: "tuple";
|
|
88
|
-
readonly internalType: "struct Permit";
|
|
89
|
-
readonly components: readonly [{
|
|
90
|
-
readonly name: "deadline";
|
|
91
|
-
readonly type: "uint256";
|
|
92
|
-
readonly internalType: "uint256";
|
|
93
|
-
}, {
|
|
94
|
-
readonly name: "amount";
|
|
95
|
-
readonly type: "uint256";
|
|
96
|
-
readonly internalType: "uint256";
|
|
97
|
-
}, {
|
|
98
|
-
readonly name: "v";
|
|
99
|
-
readonly type: "uint8";
|
|
100
|
-
readonly internalType: "uint8";
|
|
101
|
-
}, {
|
|
102
|
-
readonly name: "r";
|
|
103
|
-
readonly type: "bytes32";
|
|
104
|
-
readonly internalType: "bytes32";
|
|
105
|
-
}, {
|
|
106
|
-
readonly name: "s";
|
|
107
|
-
readonly type: "bytes32";
|
|
108
|
-
readonly internalType: "bytes32";
|
|
109
|
-
}];
|
|
110
|
-
}, {
|
|
111
|
-
readonly name: "recipient";
|
|
112
|
-
readonly type: "address";
|
|
113
|
-
readonly internalType: "address";
|
|
114
|
-
}];
|
|
115
|
-
readonly outputs: readonly [{
|
|
116
|
-
readonly name: "pufETHAmount";
|
|
117
|
-
readonly type: "uint256";
|
|
118
|
-
readonly internalType: "uint256";
|
|
119
|
-
}];
|
|
120
|
-
readonly stateMutability: "nonpayable";
|
|
121
|
-
}, {
|
|
122
|
-
readonly type: "function";
|
|
123
|
-
readonly name: "isConsumingScheduledOp";
|
|
124
|
-
readonly inputs: readonly [];
|
|
125
|
-
readonly outputs: readonly [{
|
|
126
|
-
readonly name: "";
|
|
127
|
-
readonly type: "bytes4";
|
|
128
|
-
readonly internalType: "bytes4";
|
|
129
|
-
}];
|
|
130
|
-
readonly stateMutability: "view";
|
|
131
|
-
}, {
|
|
132
|
-
readonly type: "function";
|
|
133
|
-
readonly name: "proxiableUUID";
|
|
134
|
-
readonly inputs: readonly [];
|
|
135
|
-
readonly outputs: readonly [{
|
|
136
|
-
readonly name: "";
|
|
137
|
-
readonly type: "bytes32";
|
|
138
|
-
readonly internalType: "bytes32";
|
|
139
|
-
}];
|
|
140
|
-
readonly stateMutability: "view";
|
|
141
|
-
}, {
|
|
142
|
-
readonly type: "function";
|
|
143
|
-
readonly name: "setAuthority";
|
|
144
|
-
readonly inputs: readonly [{
|
|
145
|
-
readonly name: "newAuthority";
|
|
146
|
-
readonly type: "address";
|
|
147
|
-
readonly internalType: "address";
|
|
148
|
-
}];
|
|
149
|
-
readonly outputs: readonly [];
|
|
150
|
-
readonly stateMutability: "nonpayable";
|
|
151
|
-
}, {
|
|
152
|
-
readonly type: "function";
|
|
153
|
-
readonly name: "upgradeToAndCall";
|
|
154
|
-
readonly inputs: readonly [{
|
|
155
|
-
readonly name: "newImplementation";
|
|
156
|
-
readonly type: "address";
|
|
157
|
-
readonly internalType: "address";
|
|
158
|
-
}, {
|
|
159
|
-
readonly name: "data";
|
|
160
|
-
readonly type: "bytes";
|
|
161
|
-
readonly internalType: "bytes";
|
|
162
|
-
}];
|
|
163
|
-
readonly outputs: readonly [];
|
|
164
|
-
readonly stateMutability: "payable";
|
|
165
|
-
}, {
|
|
166
|
-
readonly type: "event";
|
|
167
|
-
readonly name: "AuthorityUpdated";
|
|
168
|
-
readonly inputs: readonly [{
|
|
169
|
-
readonly name: "authority";
|
|
170
|
-
readonly type: "address";
|
|
171
|
-
readonly indexed: false;
|
|
172
|
-
readonly internalType: "address";
|
|
173
|
-
}];
|
|
174
|
-
readonly anonymous: false;
|
|
175
|
-
}, {
|
|
176
|
-
readonly type: "event";
|
|
177
|
-
readonly name: "Initialized";
|
|
178
|
-
readonly inputs: readonly [{
|
|
179
|
-
readonly name: "version";
|
|
180
|
-
readonly type: "uint64";
|
|
181
|
-
readonly indexed: false;
|
|
182
|
-
readonly internalType: "uint64";
|
|
183
|
-
}];
|
|
184
|
-
readonly anonymous: false;
|
|
185
|
-
}, {
|
|
186
|
-
readonly type: "event";
|
|
187
|
-
readonly name: "Upgraded";
|
|
188
|
-
readonly inputs: readonly [{
|
|
189
|
-
readonly name: "implementation";
|
|
190
|
-
readonly type: "address";
|
|
191
|
-
readonly indexed: true;
|
|
192
|
-
readonly internalType: "address";
|
|
193
|
-
}];
|
|
194
|
-
readonly anonymous: false;
|
|
195
|
-
}, {
|
|
196
|
-
readonly type: "error";
|
|
197
|
-
readonly name: "AccessManagedInvalidAuthority";
|
|
198
|
-
readonly inputs: readonly [{
|
|
199
|
-
readonly name: "authority";
|
|
200
|
-
readonly type: "address";
|
|
201
|
-
readonly internalType: "address";
|
|
202
|
-
}];
|
|
203
|
-
}, {
|
|
204
|
-
readonly type: "error";
|
|
205
|
-
readonly name: "AccessManagedRequiredDelay";
|
|
206
|
-
readonly inputs: readonly [{
|
|
207
|
-
readonly name: "caller";
|
|
208
|
-
readonly type: "address";
|
|
209
|
-
readonly internalType: "address";
|
|
210
|
-
}, {
|
|
211
|
-
readonly name: "delay";
|
|
212
|
-
readonly type: "uint32";
|
|
213
|
-
readonly internalType: "uint32";
|
|
214
|
-
}];
|
|
215
|
-
}, {
|
|
216
|
-
readonly type: "error";
|
|
217
|
-
readonly name: "AccessManagedUnauthorized";
|
|
218
|
-
readonly inputs: readonly [{
|
|
219
|
-
readonly name: "caller";
|
|
220
|
-
readonly type: "address";
|
|
221
|
-
readonly internalType: "address";
|
|
222
|
-
}];
|
|
223
|
-
}, {
|
|
224
|
-
readonly type: "error";
|
|
225
|
-
readonly name: "AddressEmptyCode";
|
|
226
|
-
readonly inputs: readonly [{
|
|
227
|
-
readonly name: "target";
|
|
228
|
-
readonly type: "address";
|
|
229
|
-
readonly internalType: "address";
|
|
230
|
-
}];
|
|
231
|
-
}, {
|
|
232
|
-
readonly type: "error";
|
|
233
|
-
readonly name: "AddressInsufficientBalance";
|
|
234
|
-
readonly inputs: readonly [{
|
|
235
|
-
readonly name: "account";
|
|
236
|
-
readonly type: "address";
|
|
237
|
-
readonly internalType: "address";
|
|
238
|
-
}];
|
|
239
|
-
}, {
|
|
240
|
-
readonly type: "error";
|
|
241
|
-
readonly name: "ERC1967InvalidImplementation";
|
|
242
|
-
readonly inputs: readonly [{
|
|
243
|
-
readonly name: "implementation";
|
|
244
|
-
readonly type: "address";
|
|
245
|
-
readonly internalType: "address";
|
|
246
|
-
}];
|
|
247
|
-
}, {
|
|
248
|
-
readonly type: "error";
|
|
249
|
-
readonly name: "ERC1967NonPayable";
|
|
250
|
-
readonly inputs: readonly [];
|
|
251
|
-
}, {
|
|
252
|
-
readonly type: "error";
|
|
253
|
-
readonly name: "FailedInnerCall";
|
|
254
|
-
readonly inputs: readonly [];
|
|
255
|
-
}, {
|
|
256
|
-
readonly type: "error";
|
|
257
|
-
readonly name: "InvalidInitialization";
|
|
258
|
-
readonly inputs: readonly [];
|
|
259
|
-
}, {
|
|
260
|
-
readonly type: "error";
|
|
261
|
-
readonly name: "NotInitializing";
|
|
262
|
-
readonly inputs: readonly [];
|
|
263
|
-
}, {
|
|
264
|
-
readonly type: "error";
|
|
265
|
-
readonly name: "SafeERC20FailedOperation";
|
|
266
|
-
readonly inputs: readonly [{
|
|
267
|
-
readonly name: "token";
|
|
268
|
-
readonly type: "address";
|
|
269
|
-
readonly internalType: "address";
|
|
270
|
-
}];
|
|
271
|
-
}, {
|
|
272
|
-
readonly type: "error";
|
|
273
|
-
readonly name: "UUPSUnauthorizedCallContext";
|
|
274
|
-
readonly inputs: readonly [];
|
|
275
|
-
}, {
|
|
276
|
-
readonly type: "error";
|
|
277
|
-
readonly name: "UUPSUnsupportedProxiableUUID";
|
|
278
|
-
readonly inputs: readonly [{
|
|
279
|
-
readonly name: "slot";
|
|
280
|
-
readonly type: "bytes32";
|
|
281
|
-
readonly internalType: "bytes32";
|
|
282
|
-
}];
|
|
283
|
-
}];
|