@pufferfinance/puffer-sdk 1.1.0 → 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 +1 -1
- package/dist/api/puffer-client.d.ts +12 -0
- package/dist/{ccip-BERTKE3h.js → ccip-CzWPognK.js} +2 -2
- package/dist/{ccip-BERTKE3h.js.map → ccip-CzWPognK.js.map} +1 -1
- package/dist/{ccip-CsTi3xD2.cjs → ccip-DNUqn1xf.cjs} +2 -2
- package/dist/{ccip-CsTi3xD2.cjs.map → ccip-DNUqn1xf.cjs.map} +1 -1
- 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/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 +355 -0
- package/dist/contracts/addresses.d.ts +2 -0
- 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/puf-locker-handler.test.d.ts +1 -0
- package/dist/contracts/handlers/puf-token-handler.test.d.ts +1 -0
- package/dist/contracts/handlers/puffer-depositor-handler.d.ts +9866 -4
- 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 +14 -1
- package/dist/main--Ww95s5e.cjs +41 -0
- package/dist/main--Ww95s5e.cjs.map +1 -0
- package/dist/{main-CjjW4BLK.js → main-Cl9ZFxdC.js} +4728 -2629
- package/dist/main-Cl9ZFxdC.js.map +1 -0
- package/dist/main.cjs +1 -1
- package/dist/main.d.ts +1 -0
- package/dist/main.js +6 -5
- package/package.json +1 -1
- package/dist/contracts/handlers/puffer-vault-handler.d.ts +0 -62
- package/dist/contracts/handlers/tokens-handler.d.ts +0 -46
- package/dist/main-C4aA8dQe.cjs +0 -41
- package/dist/main-C4aA8dQe.cjs.map +0 -1
- package/dist/main-CjjW4BLK.js.map +0 -1
- /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
|
|
1
|
+
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./main--Ww95s5e.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.Token=e.Token;exports.VIEM_CHAINS=e.VIEM_CHAINS;
|
|
2
2
|
//# sourceMappingURL=main.cjs.map
|
package/dist/main.d.ts
CHANGED
package/dist/main.js
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { j as s, C as S, P as f, f as C, h as E, T as r, V as n } from "./main-Cl9ZFxdC.js";
|
|
2
2
|
export {
|
|
3
|
-
s as
|
|
3
|
+
s as CHAIN_ADDRESSES,
|
|
4
|
+
S as Chain,
|
|
4
5
|
f as PufferClient,
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
6
|
+
C as PufferClientHelpers,
|
|
7
|
+
E as TOKENS_ADDRESSES,
|
|
8
|
+
r as Token,
|
|
8
9
|
n as VIEM_CHAINS
|
|
9
10
|
};
|
|
10
11
|
//# sourceMappingURL=main.js.map
|
package/package.json
CHANGED
|
@@ -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
|
-
}
|