| Crates.io | oil-mint-api |
| lib.rs | oil-mint-api |
| version | 0.1.9 |
| created_at | 2026-01-07 21:31:17.345158+00 |
| updated_at | 2026-01-21 01:17:09.892646+00 |
| description | API for interacting with the OIL mint program on Solana |
| homepage | https://oil.supply |
| repository | https://github.com/oil-protocol/oil |
| max_upload_size | |
| id | 2029044 |
| size | 85,159 |
API for interacting with the OIL mint program on Solana. This crate provides instruction builders and state types for minting OIL tokens.
steel and bytemuckAdd to your Cargo.toml:
[dependencies]
oil-mint-api = "0.0.1"
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)
consts - Program constants including mint address, treasury address, and token configurationerror - Custom program error typesinstruction - Instruction types and builderssdk - High-level SDK functions for minting operationsstate - Account state types and PDA derivation functionsinit - Initialize the authority accountmint_oil - Mint OIL tokens to the treasuryMINT_ADDRESS - The OIL token mint addressTREASURY_ADDRESS - The treasury address authorized to request mintsTOKEN_DECIMALS - Token decimal precision (11)ONE_OIL - One OIL token in indivisible units (grams)MAX_MINT_AMOUNT - Maximum amount that can be minted per requestMAX_SUPPLY - Maximum token supply (21 million OIL)The OIL mint program ID is: minti1ANBuCm6bzkWqXprLRP1xiFurquUmtkA9qFNMa
Full API documentation is available at:
Licensed under Apache-2.0