> For the complete documentation index, see [llms.txt](https://perena.gitbook.io/perena/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://perena.gitbook.io/perena/developers/legacy-usd-sdk.md). Agents can also search and read this documentation through its [MCP server](https://perena.gitbook.io/perena/~gitbook/mcp).

# Legacy USD\* SDK

@perena/bankineco-sdk for integrations built on the pre-V2 USD\* program

`@perena/bankineco-sdk` targets the original USD\* program (mint, burn and junior staking against yielding vaults). It is published and maintained for integrations that already depend on it. **New work should use the** [**Vault SDK**](https://perena.gitbook.io/perena/developers/vault-sdk.md)**.**

```bash
npm install @perena/bankineco-sdk
```

```typescript
import { UsdStarClient, USDC_MINT, USDC_DECIMALS, USD_STAR_DECIMALS, fromUiAmount } from "@perena/bankineco-sdk";

const client = UsdStarClient.new({ env: "prod", rpcUrl, wallet: anchorWallet });

// Mint USD* with 1 USDC
const { transaction, lookupTables } = await client.mintFromYieldingTx({
  yieldingAmount: fromUiAmount(1, USDC_DECIMALS),
  fromYieldingMint: USDC_MINT,
  user: anchorWallet.publicKey,
});

// Burn 1 USD* for USDC
await client.burnForYieldingTx({
  banKMintAmount: fromUiAmount(1, USD_STAR_DECIMALS),
  toYieldingMint: USDC_MINT,
  user: anchorWallet.publicKey,
});
```

Other entry points: `getLatestUsdStarUiPrice(rpcUrl, env)`, `latestBankMintUiPrice()`, `latestJuniorMintUiPrice()`, `yieldingToBankMintQuote`, `bankMintToYieldingQuote`, `fetchUnstakeFee`, `stakeJuniorTx`, `requestUnstakeJuniorTx`, `instantUnstakeJuniorTx`, and `getMintAndBurnCpiAccounts` / `getStakeCpiAccounts` for CPI callers.

Full examples: [npmjs.com/package/@perena/bankineco-sdk](https://www.npmjs.com/package/@perena/bankineco-sdk). Confirm with the Perena team before starting new work on this surface.
