@pufferfinance/puffer-sdk 1.1.0 → 1.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +1 -1
  2. package/dist/api/puffer-client.d.ts +12 -0
  3. package/dist/{ccip-BERTKE3h.js → ccip-D9sqjqG8.js} +2 -2
  4. package/dist/{ccip-BERTKE3h.js.map → ccip-D9sqjqG8.js.map} +1 -1
  5. package/dist/{ccip-CsTi3xD2.cjs → ccip-x56ET8k8.cjs} +2 -2
  6. package/dist/{ccip-CsTi3xD2.cjs.map → ccip-x56ET8k8.cjs.map} +1 -1
  7. package/dist/contracts/abis/mainnet/PufLocker.d.ts +476 -0
  8. package/dist/contracts/abis/mainnet/PufToken.d.ts +676 -0
  9. package/dist/contracts/abis/mainnet/PufferL2Depositor.d.ts +351 -0
  10. package/dist/contracts/abis/puf-locker-abis.d.ts +480 -0
  11. package/dist/contracts/abis/puf-token-abis.d.ts +680 -0
  12. package/dist/contracts/abis/puffer-depositor-abis.d.ts +355 -0
  13. package/dist/contracts/addresses.d.ts +2 -0
  14. package/dist/contracts/handlers/erc20-permit-handler.d.ts +13909 -0
  15. package/dist/contracts/handlers/puf-locker-handler.d.ts +33842 -0
  16. package/dist/contracts/handlers/puf-locker-handler.test.d.ts +1 -0
  17. package/dist/contracts/handlers/puf-token-handler.test.d.ts +1 -0
  18. package/dist/contracts/handlers/puffer-depositor-handler.d.ts +9866 -4
  19. package/dist/contracts/handlers/puffer-l2-depositor-handler.d.ts +21769 -0
  20. package/dist/contracts/handlers/puffer-l2-depositor-handler.test.d.ts +1 -0
  21. package/dist/contracts/tokens.d.ts +35 -1
  22. package/dist/main-BqWpl7pY.cjs +41 -0
  23. package/dist/main-BqWpl7pY.cjs.map +1 -0
  24. package/dist/{main-CjjW4BLK.js → main-DXvt8xU1.js} +4783 -2610
  25. package/dist/main-DXvt8xU1.js.map +1 -0
  26. package/dist/main.cjs +1 -1
  27. package/dist/main.d.ts +1 -0
  28. package/dist/main.js +8 -6
  29. package/package.json +1 -1
  30. package/dist/contracts/handlers/puffer-vault-handler.d.ts +0 -62
  31. package/dist/contracts/handlers/tokens-handler.d.ts +0 -46
  32. package/dist/main-C4aA8dQe.cjs +0 -41
  33. package/dist/main-C4aA8dQe.cjs.map +0 -1
  34. package/dist/main-CjjW4BLK.js.map +0 -1
  35. /package/dist/contracts/handlers/{tokens-handler.test.d.ts → erc20-permit-handler.test.d.ts} +0 -0
package/dist/main.cjs CHANGED
@@ -1,2 +1,2 @@
1
- "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main-C4aA8dQe.cjs");exports.Chain=e.Chain;exports.PufferClient=e.PufferClient;exports.PufferClientHelpers=e.PufferClientHelpers;exports.TOKENS_ADDRESSES=e.TOKENS_ADDRESSES;exports.Token=e.Token;exports.VIEM_CHAINS=e.VIEM_CHAINS;
1
+ "use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main-BqWpl7pY.cjs");exports.CHAIN_ADDRESSES=e.CHAIN_ADDRESSES;exports.Chain=e.Chain;exports.PufferClient=e.PufferClient;exports.PufferClientHelpers=e.PufferClientHelpers;exports.TOKENS_ADDRESSES=e.TOKENS_ADDRESSES;exports.TOKENS_PERMIT_VERSION=e.TOKENS_PERMIT_VERSION;exports.Token=e.Token;exports.VIEM_CHAINS=e.VIEM_CHAINS;
2
2
  //# sourceMappingURL=main.cjs.map
package/dist/main.d.ts CHANGED
@@ -2,3 +2,4 @@ export * from './api/puffer-client';
2
2
  export * from './api/puffer-client-helpers';
3
3
  export * from './chains/constants';
4
4
  export * from './contracts/tokens';
5
+ export * from './contracts/addresses';
package/dist/main.js CHANGED
@@ -1,10 +1,12 @@
1
- import { C as s, P as f, f as r, h as C, T as S, V as n } from "./main-CjjW4BLK.js";
1
+ import { k as s, C as E, P as e, f, h as C, j as r, T as I, V as N } from "./main-DXvt8xU1.js";
2
2
  export {
3
- s as Chain,
4
- f as PufferClient,
5
- r as PufferClientHelpers,
3
+ s as CHAIN_ADDRESSES,
4
+ E as Chain,
5
+ e as PufferClient,
6
+ f as PufferClientHelpers,
6
7
  C as TOKENS_ADDRESSES,
7
- S as Token,
8
- n as VIEM_CHAINS
8
+ r as TOKENS_PERMIT_VERSION,
9
+ I as Token,
10
+ N as VIEM_CHAINS
9
11
  };
10
12
  //# sourceMappingURL=main.js.map
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@pufferfinance/puffer-sdk",
3
3
  "description": "SDK for interacting with the puffer smart contracts",
4
- "version": "1.1.0",
4
+ "version": "1.2.1",
5
5
  "repository": {
6
6
  "type": "git",
7
7
  "url": "https://github.com/PufferFinance/puffer-sdk.git"
@@ -1,62 +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 in exchange for pufETH. 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
- * Check the pufETH balance of the wallet.
43
- *
44
- * @param walletAddress Wallet address to check the balance of.
45
- * @returns pufETH balance in wei.
46
- */
47
- balanceOf(walletAddress: Address): Promise<bigint>;
48
- /**
49
- * Get the rate of pufETH compared to ETH.
50
- *
51
- * @returns Rate of pufETH compared to 1 ETH.
52
- */
53
- getPufETHRate(): Promise<bigint>;
54
- /**
55
- * Get the allowance for the given owner and spender.
56
- *
57
- * @param ownerAddress Address of the owner.
58
- * @param spenderAddress Address of the spender.
59
- * @returns Allowance for the given owner and spender.
60
- */
61
- getAllowance(ownerAddress: Address, spenderAddress: Address): Promise<bigint>;
62
- }
@@ -1,46 +0,0 @@
1
- import { WalletClient, PublicClient, Address } from 'viem';
2
- import { Chain } from '../../chains/constants';
3
- import { Token } from '../tokens';
4
-
5
- /**
6
- * Handler for performing operations for and with tokens.
7
- */
8
- export declare class TokensHandler {
9
- private chain;
10
- private walletClient;
11
- private publicClient;
12
- /**
13
- * Create the handler for processing tokens.
14
- *
15
- * @param chain Chain to use for the client.
16
- * @param walletClient The wallet client to use for wallet
17
- * interactions.
18
- * @param publicClient The public client to use for public
19
- * interactions.
20
- */
21
- constructor(chain: Chain, walletClient: WalletClient, publicClient: PublicClient);
22
- private getContract;
23
- /**
24
- * Process and get permit signature for the given token to perform
25
- * transactions through the `PufferDepositor` contract.
26
- *
27
- * @param token Token for which to get the permit signature.
28
- * @param walletAddress Wallet address making the transaction.
29
- * @param value Value of the transaction.
30
- * @returns Permit signature in the form `{ r, s, v?, yParity }`.
31
- */
32
- getPermitSignature(token: Token, walletAddress: Address, value: bigint): Promise<{
33
- deadline: bigint;
34
- r: `0x${string}`;
35
- s: `0x${string}`;
36
- v: bigint;
37
- yParity: number;
38
- } | {
39
- deadline: bigint;
40
- r: `0x${string}`;
41
- s: `0x${string}`;
42
- yParity: number;
43
- v?: undefined;
44
- }>;
45
- private getPermitVersion;
46
- }