minted-bindings
TypeScript icon, indicating that this package has built-in type declarations

0.0.4 • Public • Published

Minted Bindings

TypeScript bindings for the Minted smart contract, providing a type-safe interface for interacting with the Minted protocol on Solana.

Features

  • Complete TypeScript bindings for all Minted protocol instructions
  • Built-in support for bonding curve calculations
  • Raydium DEX integration utilities
  • Helper functions for finding PDAs and associated token accounts

Installation

pnpm add minted-bindings

Usage

Initialize Protocol

import * as anchor from '@coral-xyz/anchor'
import { initializeInstructions } from 'minted-bindings'

const instructions = await initializeInstructions({
  configInput: {
    authority: adminPublicKey,
    feeRecipient: feeRecipientPublicKey,
    buyFeePercent: 1.5,
    sellFeePercent: 1.5,
    migrationFeePercent: 1.0,
    completionBurnPercentage: 50,
    exponentialGrowthRate: 0.1
  },
  funder: payerPublicKey,
  program: mintedProgram
})

Launch Token

const { instructions, tokenMint } = await launchTokenInstructions({
  creator: creatorPublicKey,
  inputParams: {
    name: 'My Token',
    symbol: 'TKN',
    uri: 'https://metadata.url',
  },
  program: mintedProgram
})

Swap Tokens

const instructions = await swapInstructions({
  user: userPublicKey,
  feeRecipient: feeRecipientPublicKey,
  tokenMint: tokenMintPublicKey,
  bondingCurve: bondingCurvePublicKey,
  swapParams: {
    amount: new anchor.BN(1000000),
    minOut: new anchor.BN(900000),
    direction: 'buy'
  },
  program: mintedProgram
})

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i minted-bindings

Weekly Downloads

1

Version

0.0.4

License

MIT

Unpacked Size

135 kB

Total Files

5

Last publish

Collaborators

  • moshthepitt