oil-mint-api 0.1.3

API for interacting with the OIL mint program on Solana
Documentation

oil-mint-api

API for interacting with the OIL mint program on Solana. This crate provides instruction builders and state types for minting OIL tokens.

crates.io docs.rs

Features

  • Instruction builders for OIL minting operations
  • State types and account deserialization
  • PDA derivation utilities for the authority account
  • Type-safe instruction handling using steel and bytemuck

Usage

Add to your Cargo.toml:

[dependencies]
oil-mint-api = "0.0.1"

Example

use oil_mint_api::prelude::*;
use solana_program::pubkey::Pubkey;

// Derive the authority PDA
let (authority_pda, _bump) = authority_pda();

// Build an Init instruction
let init_ix = init(&signer.pubkey());

// Build a MintOIL instruction
let mint_ix = mint_oil(amount); // amount in OIL (grams)

Modules

  • consts - Program constants including mint address, treasury address, and token configuration
  • error - Custom program error types
  • instruction - Instruction types and builders
  • sdk - High-level SDK functions for minting operations
  • state - Account state types and PDA derivation functions

Instructions

  • init - Initialize the authority account
  • mint_oil - Mint OIL tokens to the treasury

Constants

  • MINT_ADDRESS - The OIL token mint address
  • TREASURY_ADDRESS - The treasury address authorized to request mints
  • TOKEN_DECIMALS - Token decimal precision (11)
  • ONE_OIL - One OIL token in indivisible units (grams)
  • MAX_MINT_AMOUNT - Maximum amount that can be minted per request
  • MAX_SUPPLY - Maximum token supply (21 million OIL)

Program ID

The OIL mint program ID is: minti1ANBuCm6bzkWqXprLRP1xiFurquUmtkA9qFNMa

Documentation

Full API documentation is available at:

License

Licensed under Apache-2.0

Related