Install the package.
npm install @pufferfinance/puffer-sdkExample 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 installStart the package in watch mode.
pnpm devSetup linking so the package can be linked to other projects locally.
pnpm link --globalTo link the package to a local project, run the following command.
pnpm link --global @pufferfinance/puffer-sdkThe release is automated using release-it and the publish.yml GitHub action. The action can be dispatched manually to make the release.