インテグレーションAPI
CHAINFetch Bucket State
Last updated January 31, 2026
Genesis JavaScript SDK を使用してブロックチェーンからリアルタイムのバケット状態を直接取得します。デポジット合計、カウント、トークン割り当て、時間条件を返します。
オンチェーンフェッチには Umi と Genesis SDK が必要です。
メソッド
| メソッド | ローンチタイプ | 説明 |
|---|---|---|
fetchLaunchPoolBucketV2 | Launch Pool | Launch Pool バケット状態を取得 |
fetchPresaleBucketV2 | Presale | Presale バケット状態を取得 |
Launch Pool バケット
import { fetchLaunchPoolBucketV2 } from '@metaplex-foundation/genesis';
const bucket = await fetchLaunchPoolBucketV2(umi, launchPoolBucket);
console.log('Total deposits:', bucket.quoteTokenDepositTotal);
console.log('Deposit count:', bucket.depositCount);
console.log('Claim count:', bucket.claimCount);
console.log('Token allocation:', bucket.bucket.baseTokenAllocation);
Presale バケット
import { fetchPresaleBucketV2 } from '@metaplex-foundation/genesis';
const bucket = await fetchPresaleBucketV2(umi, presaleBucket);
console.log('Total deposits:', bucket.quoteTokenDepositTotal);
console.log('Deposit count:', bucket.depositCount);
console.log('Token allocation:', bucket.bucket.baseTokenAllocation);
console.log('SOL cap:', bucket.allocationQuoteTokenCap);
時間条件
各バケットにはローンチフェーズを制御する4つの時間条件があります:
| 条件 | 目的 |
|---|---|
depositStartCondition | デポジット受付開始時刻 |
depositEndCondition | デポジット受付終了時刻 |
claimStartCondition | クレーム受付開始時刻 |
claimEndCondition | クレーム受付終了時刻 |
const bucket = await fetchLaunchPoolBucketV2(umi, launchPoolBucket);
// Deposit window
const depositStart = bucket.depositStartCondition.time;
const depositEnd = bucket.depositEndCondition.time;
// Claim window
const claimStart = bucket.claimStartCondition.time;
const claimEnd = bucket.claimEndCondition.time;
console.log('Deposit starts:', new Date(Number(depositStart) * 1000));
console.log('Deposit ends:', new Date(Number(depositEnd) * 1000));
console.log('Claims start:', new Date(Number(claimStart) * 1000));
console.log('Claims end:', new Date(Number(claimEnd) * 1000));
