@pufferfinance/puffer-sdk 1.0.2 → 1.2.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.
- package/README.md +8 -7
- package/dist/api/puffer-client.d.ts +16 -0
- package/dist/ccip-CzWPognK.js +158 -0
- package/dist/ccip-CzWPognK.js.map +1 -0
- package/dist/ccip-DNUqn1xf.cjs +2 -0
- package/dist/ccip-DNUqn1xf.cjs.map +1 -0
- package/dist/chains/constants.d.ts +2 -3
- package/dist/contracts/abis/holesky/PufferDepositor.d.ts +283 -0
- package/dist/contracts/abis/mainnet/ERC20Permit.d.ts +396 -0
- package/dist/contracts/abis/mainnet/PufLocker.d.ts +476 -0
- package/dist/contracts/abis/mainnet/PufToken.d.ts +676 -0
- package/dist/contracts/abis/mainnet/PufferDepositor.d.ts +283 -0
- package/dist/contracts/abis/mainnet/PufferL2Depositor.d.ts +351 -0
- package/dist/contracts/abis/puf-locker-abis.d.ts +480 -0
- package/dist/contracts/abis/puf-token-abis.d.ts +680 -0
- package/dist/contracts/abis/puffer-depositor-abis.d.ts +642 -0
- package/dist/contracts/abis/{abis.d.ts → puffer-vault-abis.d.ts} +3 -1367
- package/dist/contracts/abis/tokens-abis.d.ts +396 -0
- package/dist/contracts/addresses.d.ts +4 -7
- package/dist/contracts/handlers/erc20-permit-handler.d.ts +13705 -0
- package/dist/contracts/handlers/puf-locker-handler.d.ts +31064 -0
- package/dist/contracts/handlers/puffer-depositor-handler.d.ts +9923 -0
- package/dist/contracts/handlers/puffer-depositor-handler.test.d.ts +1 -0
- package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +22867 -0
- package/dist/contracts/handlers/puffer-l2-depositor-handler.test.d.ts +1 -0
- package/dist/contracts/tokens.d.ts +27 -0
- package/dist/main--Ww95s5e.cjs +41 -0
- package/dist/main--Ww95s5e.cjs.map +1 -0
- package/dist/{main-CiwlneBr.js → main-Cl9ZFxdC.js} +5939 -3509
- package/dist/main-Cl9ZFxdC.js.map +1 -0
- package/dist/main.cjs +1 -1
- package/dist/main.d.ts +2 -0
- package/dist/main.js +8 -5
- package/dist/utils/time.d.ts +1 -0
- package/package.json +12 -10
- package/dist/ccip-Bv7jv7p7.cjs +0 -2
- package/dist/ccip-Bv7jv7p7.cjs.map +0 -1
- package/dist/ccip-n5cHM2-q.js +0 -165
- package/dist/ccip-n5cHM2-q.js.map +0 -1
- package/dist/contracts/abis/anvil/PufferVaultV2.d.ts +0 -1361
- package/dist/contracts/handlers/puffer-vault-handler.d.ts +0 -79
- package/dist/main-CiwlneBr.js.map +0 -1
- package/dist/main-DY0whdxp.cjs +0 -39
- package/dist/main-DY0whdxp.cjs.map +0 -1
- /package/dist/{api/puffer-client-helpers.test.d.ts → contracts/handlers/erc20-permit-handler.test.d.ts} +0 -0
- /package/dist/{api/puffer-client.test.d.ts → contracts/handlers/puf-locker-handler.test.d.ts} +0 -0
- /package/dist/{errors/validation-errors.test.d.ts → contracts/handlers/puf-token-handler.test.d.ts} +0 -0
|
@@ -1,79 +0,0 @@
|
|
|
1
|
-
import { Address, PublicClient, WalletClient } from 'viem';
|
|
2
|
-
import { Chain } from '../../chains/constants';
|
|
3
|
-
|
|
4
|
-
/**
|
|
5
|
-
* Handler for the `PufferVaultV2` contract exposing methods to interact
|
|
6
|
-
* with the contract.
|
|
7
|
-
*/
|
|
8
|
-
export declare class PufferVaultHandler {
|
|
9
|
-
private chain;
|
|
10
|
-
private walletClient;
|
|
11
|
-
private publicClient;
|
|
12
|
-
private viemChain;
|
|
13
|
-
/**
|
|
14
|
-
* Create the handler for the `PufferVaultV2` contract exposing
|
|
15
|
-
* methods to interact with the contract.
|
|
16
|
-
*
|
|
17
|
-
* @param chain Chain to use for the client.
|
|
18
|
-
* @param walletClient The wallet client to use for wallet
|
|
19
|
-
* interactions.
|
|
20
|
-
* @param publicClient The public client to use for public
|
|
21
|
-
* interactions.
|
|
22
|
-
*/
|
|
23
|
-
constructor(chain: Chain, walletClient: WalletClient, publicClient: PublicClient);
|
|
24
|
-
private getContract;
|
|
25
|
-
/**
|
|
26
|
-
* Deposit ETH to the given wallet address. This doesn't make the
|
|
27
|
-
* transaction but returns two methods namely `transact` and
|
|
28
|
-
* `estimate`.
|
|
29
|
-
*
|
|
30
|
-
* @param walletAddress Wallet address to get the ETH from.
|
|
31
|
-
* @returns `transact: (value: bigint) => Promise<Address>` - Used to
|
|
32
|
-
* make the transaction with the given value.
|
|
33
|
-
*
|
|
34
|
-
* `estimate: () => Promise<bigint>` - Gas estimate of the
|
|
35
|
-
* transaction.
|
|
36
|
-
*/
|
|
37
|
-
depositETH(walletAddress: Address): {
|
|
38
|
-
transact: (value: bigint) => Promise<`0x${string}`>;
|
|
39
|
-
estimate: () => Promise<bigint>;
|
|
40
|
-
};
|
|
41
|
-
/**
|
|
42
|
-
* Deposit stETH to the given wallet address. This doesn't make the
|
|
43
|
-
* transaction but returns two methods namely `transact` and
|
|
44
|
-
* `estimate`.
|
|
45
|
-
*
|
|
46
|
-
* @param walletAddress Wallet address to get the ETH from.
|
|
47
|
-
* @param value Value in wei of the stETH to deposit.
|
|
48
|
-
* @returns `transact: () => Promise<Address>` - Used to make the
|
|
49
|
-
* transaction with the given value.
|
|
50
|
-
*
|
|
51
|
-
* `estimate: () => Promise<bigint>` - Gas estimate of the
|
|
52
|
-
* transaction.
|
|
53
|
-
*/
|
|
54
|
-
depositStETH(walletAddress: Address, value: bigint): {
|
|
55
|
-
transact: () => Promise<`0x${string}`>;
|
|
56
|
-
estimate: () => Promise<bigint>;
|
|
57
|
-
};
|
|
58
|
-
/**
|
|
59
|
-
* Check the pufETH balance of the wallet.
|
|
60
|
-
*
|
|
61
|
-
* @param walletAddress Wallet address to check the balance of.
|
|
62
|
-
* @returns pufETH balance in wei.
|
|
63
|
-
*/
|
|
64
|
-
balanceOf(walletAddress: Address): Promise<bigint>;
|
|
65
|
-
/**
|
|
66
|
-
* Get the rate of pufETH compared to ETH.
|
|
67
|
-
*
|
|
68
|
-
* @returns Rate of pufETH compared to 1 ETH.
|
|
69
|
-
*/
|
|
70
|
-
getPufETHRate(): Promise<bigint>;
|
|
71
|
-
/**
|
|
72
|
-
* Get the allowance for the given owner and spender.
|
|
73
|
-
*
|
|
74
|
-
* @param ownerAddress Address of the owner.
|
|
75
|
-
* @param spenderAddress Address of the spender.
|
|
76
|
-
* @returns Allowance for the given owner and spender.
|
|
77
|
-
*/
|
|
78
|
-
getAllowance(ownerAddress: Address, spenderAddress: Address): Promise<bigint>;
|
|
79
|
-
}
|