TypeScript CLI for automating a Meteora DAMM v2 pool with FCFS Alpha Vault support: mint the base token, create the pool (hasAlphaVault: true), then create the customizable FCFS vault tied to that pool.
- Node.js 18+ recommended
- npm (or any compatible package manager)
- RPC endpoint with sufficient rate limits for mainnet launches
- Pinata API key + secret (token mint step uploads image + metadata JSON to IPFS)
-
Install
npm install
-
Configure
cp .env.example .env
Edit
.env. The full variable list and comments live in.env.example. -
Run in order
Step Command Sends transactions? Output (default paths) 1. Mint + metadata npm run mint:tokenYes — always executes on-chain (fund the wallet on mainnet; devnet may auto-airdrop if balance is low) data/latest-token-mint.json2. DAMM v2 pool npm run launch:dammv2Only if DRY_RUN=falsedata/latest-pool.json3. FCFS Alpha Vault npm run create:alpha-vault:fcfsOnly if DRY_RUN=falsedata/latest-alpha-vault.json -
Dry run (pool + vault)
LeaveDRY_RUN=true(default). Scripts still write JSON outputs so you can verify addresses and parameters before broadcasting. -
Go live
SetDRY_RUN=falseforlaunch:dammv2andcreate:alpha-vault:fcfs, then run those steps again. -
Validate pipeline (in-memory Redis, no live txs for vault step):
npm run validate
| Script | Source file | Purpose |
|---|---|---|
npm run mint:token |
src/token_mint.ts |
Create SPL or Token-2022 mint, Metaplex metadata, Pinata uploads |
npm run launch:dammv2 |
src/damm-v2-launch.ts |
Create DAMM v2 pool from CONFIG_ADDRESS, seed liquidity, optional alpha-vault linkage |
npm run create:alpha-vault:fcfs |
src/alpha-vault-fcfs.ts |
Create Meteora FCFS Alpha Vault for the pool (reads mint + pool JSON by default) |
npm run validate |
src/validate.ts |
Full Redis + artifact pipeline smoke test (DRY_RUN) |
WALLET_SECRET_KEY— JSON byte array ([1,2,…]), comma-separated bytes, or base58 secret key.RPC_URL— Your cluster RPC; cluster is inferred from the URL unless you setCLUSTER(devnet|mainnet-beta).CONFIG_ADDRESS— Existing DAMM v2 config account pubkey (required for pool creation).DRY_RUN—true(default): pool and Alpha Vault scripts do not send transactions; they still persist JSON artifacts.TOKEN_MINT_OUTPUT_PATH/POOL_OUTPUT_PATH/ALPHA_VAULT_OUTPUT_PATH— Wire steps together without copy-pasting addresses. Each step also mirrors artifacts to Redis (REDIS_URL, optionalLAUNCH_SESSION_ID).REDIS_URL— Redis for launch artifact handoff (defaultredis://127.0.0.1:6379). SetREDIS_MEMORY=truefor in-memory mode duringnpm run validate.POOL_ADDRESS(optional, Alpha Vault step) — Override pool address instead of readingPOOL_OUTPUT_PATH.SILENT_LOGS=1— Reduce console noise from logger output.
Pinata, token metadata, pool pricing, caps, whitelist mode, and vesting timestamps are documented inline in .env.example.
- Token —
mint:tokenwritestokenMint(and metadata URIs) to the mint output file. - Pool —
launch:dammv2reads that mint, usesCONNECT_ALPHA_VAULT_POOL(defaulttrue), and writespoolAddress(+ timing fields the vault script may use). - Alpha Vault —
create:alpha-vault:fcfsuses@meteora-ag/alpha-vaultwithPoolType.DAMMV2, derives depositing/vesting windows from pool activation when present, and writes vault details + optionaltxSignature.
Dependencies (from package.json): @meteora-ag/cp-amm-sdk, @meteora-ag/alpha-vault, @solana/web3.js, @solana/spl-token, @metaplex-foundation/mpl-token-metadata, and others.
Launching with an Alpha Vault lets multiple prepared wallets participate in a controlled early window at a single effective price (per vault rules), instead of racing public liquidity with ad-hoc bundled swaps. Exact on-chain footprint depends on how you fund and operate wallets; this kit focuses on Meteora-native pool + FCFS vault setup rather than Jito-style bundles.
| Topic | Typical Jito bundle | Alpha Vault on Meteora |
|---|---|---|
| Scale | Limited by bundle complexity | Scales via vault participants and caps |
| Execution | Bundle landing / ordering | Vault + pool lifecycle |
| Analytics | Tight same-block clusters can look linked | Vault flow presents as protocol participation |
For a live example and holder visualization, see the links and illustration in the Example (Bubblemaps) section below.
Alpha Vault is Meteora’s mechanism to tie a vault to a pool (DAMM or DAMM v2) so early participants deposit quote during a window and receive base tokens under vesting and cap rules. This repository targets DAMM v2 and FCFS (createCustomizableFcfsVault) with configurable:
- Depositing window and vesting schedule (timestamps; defaults derived from pool activation when available)
- Global and per-wallet caps (raw quote units: lamports for WSOL, 6 decimals for USDC)
- Whitelist mode:
permissionless,permission_with_merkle_proof, orpermission_with_authority
graph TD
C[Creator Wallet] --> M[Mixing Wallet]
M --> L2A[Layer 2 Wallet A]
M --> L2B[Layer 2 Wallet B]
L2A -.-> D1[Dormant 7 days]
L2B -.-> D2[Dormant 14 days]
D1 --> W1[User Wallet 1]
D1 --> W2[User Wallet 2]
D1 --> W3[User Wallet 3]
D2 --> W4[User Wallet 4]
D2 --> W5[User Wallet 5]
D2 --> W6[User Wallet 6]
style C fill:#ff6b6b
style M fill:#feca57
style W1 fill:#48dbfb
style W2 fill:#48dbfb
style W3 fill:#48dbfb
style W4 fill:#48dbfb
style W5 fill:#48dbfb
style W6 fill:#48dbfb
linkStyle 0,1,2 stroke:#ff9ff3,stroke-width:2px
linkStyle 3,4,5,6,7,8 stroke:#1dd1a1,stroke-width:1px,stroke-dasharray: 5 5
This tooling interacts with mainnet contracts and irreversible transactions. You are responsible for key safety, regulatory compliance, and the economic design of your launch. Test on devnet first when possible.