oil-mint-api

Crates.iooil-mint-api
lib.rsoil-mint-api
version0.1.9
created_at2026-01-07 21:31:17.345158+00
updated_at2026-01-21 01:17:09.892646+00
descriptionAPI for interacting with the OIL mint program on Solana
homepagehttps://oil.supply
repositoryhttps://github.com/oil-protocol/oil
max_upload_size
id2029044
size85,159
My name is Tenji (0xNerd)

documentation

https://docs.rs/oil-mint-api

README

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

Commit count: 968

cargo fmt