For developers

Magna API: Reading Magna Vesting Onchain

Magna keeps each allocation in a Merkle leaf, so its vesting can't be listed from the chain. What you can read (escrow balances), what a claim reveals (the full schedule), the decode calls, and a one-call REST alternative.

·6 min read·By Non Fungible Howard

Magna vesting can only be partly read from the chain. Each distribution's vester contract holds the tokens and a Merkle root; every recipient's allocation and schedule sits in an off-chain leaf. You can see how much is escrowed, and you can recover a recipient's full schedule once they have claimed, because a claim reveals their leaf.

This guide covers what's readable, how to decode a claim into a schedule, and the one-call shortcut. For what Magna is, see What is Magna?.

What the chain shows

QuestionReadable onchain?
How much is escrowed in a distributionYes: the vester contract's token balance
Who the recipients areNo: only the Merkle root is stored
A recipient's schedule, after their first claimYes: decoded from the claim
A recipient's schedule, before any claimNo

Decoding a claim into a schedule

A recipient claims by calling withdraw(withdrawalAmount, rootIndex, decodableArgs, proof) on the vester. Those arguments carry their encoded leaf, and the vester exposes views that decode them:

text
getCalendarLeafAllocationData(rootIndex, decodableArgs, proof)
  → allocation + { unlockTimestamps[], unlockAmounts[] }

getIntervalLeafAllocationData(rootIndex, decodableArgs, proof)
  → allocation + { pieces[] { startDate, periodLength, numberOfPeriods, amount } }

Both return the allocation (total, original beneficiary) and its distribution state (withdrawn so far, terminated or not). So the recipe is: watch for token transfers out of each vester, fetch the transaction that paid out, decode its withdraw calldata, and call the matching view.

What trips people up

  • Finding the vesters. Each distribution deploys its own vester from Magna's factory, so you need the factory's deployment events to know which contracts to watch.
  • Interval schedules. An interval piece unlocks its amount over numberOfPeriods periods, not once. Expand it per period, or you'll show one large unlock where there are many small ones.
  • Unclaimed allocations stay invisible. Nothing onchain lists them. For a recipient who hasn't claimed, the project's own claim portal is the source of truth.

The shortcut: one REST call

The Vestream API tracks Magna vesters on seven EVM chains, decodes every claim into a full schedule, and returns it in the same shape as 12 other vesting platforms:

bash
curl "https://www.vestream.io/api/v1/wallet/0xYOUR_WALLET/vestings?protocol=magna" \
  -H "Authorization: Bearer vstr_live_YOUR_KEY"

Coverage is recipients who have claimed at least once; the response's coverage note says so. A free key takes 30 seconds at vestream.io/build.

Frequently Asked Questions

Does Magna have a public vesting API?

Magna's allocations are kept off-chain in Merkle leaves. Onchain you can read escrow balances and decode a recipient's schedule from their claims; Vestream's API does that across seven chains.

Why can't I see a Magna allocation onchain?

The vester stores only a Merkle root. An allocation becomes visible when its recipient first claims, because the claim carries their leaf.

Which chains does Vestream read Magna on?

Ethereum, BNB Chain, Polygon, Base, Arbitrum, Optimism and Avalanche.

Track your own token vesting

Paste any wallet, see every unlock across 13 protocols and 13 chains. Free, no sign-up.

Build with the same data

A free API key and MCP server for token vesting, lock and unlock data across every protocol we index.

Get a free API key →

Read the developer docs

More from Vestream Resources