Integration APIs

CHAINFetch Deposit State

Last updated January 31, 2026

Fetch user deposit state directly from the blockchain using the Genesis JavaScript SDK. Check deposit amounts, claim status, and whether a user has deposited.

On-chain fetching requires Umi and the Genesis SDK.

Methods

MethodLaunch TypeBehavior
fetchLaunchPoolDepositV2Launch PoolThrows if not found
safeFetchLaunchPoolDepositV2Launch PoolReturns null if not found
fetchPresaleDepositV2PresaleThrows if not found
safeFetchPresaleDepositV2PresaleReturns null if not found

Launch Pool Deposits

import {
fetchLaunchPoolDepositV2,
safeFetchLaunchPoolDepositV2,
} from '@metaplex-foundation/genesis';
// Throws if not found — use when you expect the deposit to exist
const deposit = await fetchLaunchPoolDepositV2(umi, depositPda);
console.log('Amount:', deposit.amountQuoteToken);
console.log('Claimed:', deposit.claimed);
// Returns null if not found — use for optional lookups
const maybeDeposit = await safeFetchLaunchPoolDepositV2(umi, depositPda);
if (maybeDeposit) {
console.log('Amount:', maybeDeposit.amountQuoteToken);
}

Presale Deposits

import {
fetchPresaleDepositV2,
safeFetchPresaleDepositV2,
} from '@metaplex-foundation/genesis';
// Throws if not found — use when you expect the deposit to exist
const deposit = await fetchPresaleDepositV2(umi, depositPda);
console.log('Amount deposited:', deposit.amountQuoteToken);
console.log('Amount claimed:', deposit.amountClaimed);
console.log('Fully claimed:', deposit.claimed);
// Returns null if not found — use for optional lookups
const maybeDeposit = await safeFetchPresaleDepositV2(umi, depositPda);
if (maybeDeposit) {
console.log('Amount deposited:', maybeDeposit.amountQuoteToken);
}

Checking if a User Has Deposited

Use the safeFetch variants to check if a user has deposited without throwing an error:

import {
safeFetchLaunchPoolDepositV2,
safeFetchPresaleDepositV2,
findLaunchPoolDepositV2Pda,
findPresaleDepositV2Pda,
} from '@metaplex-foundation/genesis';
// Launch Pool
const [lpDepositPda] = findLaunchPoolDepositV2Pda(umi, {
bucket: launchPoolBucket,
recipient: userPublicKey,
});
const lpDeposit = await safeFetchLaunchPoolDepositV2(umi, lpDepositPda);
const hasLpDeposit = lpDeposit !== null;
// Presale
const [psDepositPda] = findPresaleDepositV2Pda(umi, {
bucket: presaleBucket,
recipient: userPublicKey,
});
const psDeposit = await safeFetchPresaleDepositV2(umi, psDepositPda);
const hasPsDeposit = psDeposit !== null;