@pufferfinance/puffer-sdk
v1.29.1
Published
SDK for interacting with the puffer smart contracts
Keywords
Readme
Usage
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);Features
- 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.
Documentation
Check the documentation website for detailed documentation and guides.
Development
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-sdkRelease
The release is automated using release-it and the publish.yml GitHub action. The action can be dispatched manually to make the release.
