Docs

How Boarlink works, and what the on-chain program can do.

The program

Everything Boarlink does on-chain happens through the six actions below. The website is only a front end for them — the program can be used directly, and nothing about a vault or a link depends on this site staying up.

Amounts are always in a token's smallest unit, the same way the token itself counts them.

deposit

Moves tokens into a vault of your own. They stay under your control — anything you have not set aside for a live link can be withdrawn again whenever you like. Call it again for the same token to top the vault up.

Who calls it

The depositor — the person sending tokens.

Parameters
amountnumber
How many tokens to move into the vault.
  • The first deposit for a token creates the vault. Later deposits reuse it.
  • You never earmark tokens here — generating a link reserves what it needs as you go, and everything else stays freely withdrawable.
  • Only classic SPL tokens are supported today; Token-2022 mints are rejected.

generate

Creates a claim link. The tokens stay in your vault but are set aside so they can't be withdrawn while the link is live.

Who calls it

The depositor, plus the rent funder — whoever is paying the link's small rent deposit. They can be the same wallet.

Parameters
minttoken
Which token the link pays out.
amountnumber
How many tokens the link is worth. Must be more than zero.
claimeraddress
The public key of a fresh keypair. Whoever holds its private key can redeem the link — that key is what goes in the URL.
expiry_secondsnumber
How long the link stays valid, in seconds. Use 0 for a link that never expires.
Important: An expiry of 0 means claiming is the only way the link can ever end. It stays redeemable forever, but it cannot be closed as expired — not by you, not by anyone — so if nobody claims it, its tokens stay reserved and its rent stays locked for good. Prefer a real expiry unless you are sure.
  • The rent funder pays a small rent deposit to create the link's record, and gets all of it back when the link is claimed or closed after expiry. Reassigning the link carries that deposit over to the replacement rather than refunding it.

claim

no parameters

Redeems a link: sends the tokens from the vault to a wallet, and cleans up the link's record.

Who calls it

The keypair from the link. A separate fee payer can cover the transaction, so the recipient doesn't need SOL.

Important: The payout goes to whichever token account the transaction names, which is not necessarily yours. Claim through a client you trust, and do not sign a claim transaction someone else built for you.
  • Takes no parameters — which token and vault it draws from are read from the link's on-chain record, so signing with the link's keypair is enough.
  • The rent deposit goes back to the rent funder who paid it when the link was created.

withdraw

Takes tokens back out of your vault. Only tokens that aren't set aside for a live link can be withdrawn.

Who calls it

The depositor.

Parameters
amountnumber
How many tokens to take back. Must be more than zero.
  • Tokens set aside for live links are not withdrawable. To free them, let the link expire and close it, or have it claimed.

rotate_claimer

Reissues a live link to a new keypair, which invalidates the old link. Useful if a link was shared with the wrong person.

Who calls it

Whoever holds the current link's keypair, on their own — no other signature is needed.

Parameters
new_claimeraddress
The public key of the replacement keypair.
Important: This is the only way to undo a link that was shared with the wrong person, and it works only before they claim it.
  • Only works while the link is still live — not once it has expired or been claimed.
  • The rent deposit moves from the old link to the new one, so reassigning costs nobody anything and the original rent funder stays the one who gets it back.

close_expired

no parameters

Cleans up a link that has passed its expiry: the tokens go back to being freely withdrawable, and the rent deposit is refunded to its rent funder.

Who calls it

Anyone. It needs no permission, and the refund always goes to the rent funder who originally paid it.

Important: This is for expired links only. A link set never to expire can never be closed here or anywhere else — claiming it is the only thing that ends it.