Install the package.
npm install @pufferfinance/puffer-sdk
Example code to check pufETH balance.
import {
PufferClientHelpers,
PufferClient,
Chain,
} from '@pufferfinance/puffer-sdk';
const walletClient = PufferClientHelpers.createWalletClient({
chain: Chain.Holesky,
provider: window.ethereum,
});
const pufferClient = new PufferClient(Chain.Holesky, walletClient);
const [walletAddress] = await pufferClient.requestAddresses();
const balance = await pufferClient.vault.balanceOf(walletAddress);
- Interact with puffer smart contracts.
- Deposit ETH to mint pufETH.
- Deposit stETH to mint pufETH.
- Check pufETH balance.
- Get the latest rate of pufETH compared to ETH.
- and much more.
Check the documentation website for detailed documentation and guides.
Install dependencies.
pnpm install
Start the package in watch mode.
pnpm dev
Setup linking so the package can be linked to other projects locally.
pnpm link --global
To link the package to a local project, run the following command.
pnpm link --global @pufferfinance/puffer-sdk
The release is automated using release-it and the publish.yml GitHub action. The action can be dispatched manually to make the release.