SDK
The TypeScript SDK
Build a hook, a companion or both for a launch on Mintvelocity from your own terminal, or anything on the standard: the TypeScript SDK builds every instruction of the programs, decodes every account and event, and resolves a hook’s accounts.
Start here
- What you build
- A hook: your program, run inside every trade of the token, which takes a cut, refuses, or writes what it wants into each holding. A companion: your program too, a script that Mintvelocity’s companion program calls with the launch’s accounts to spend the companion fee, its pot. Or both, as a pair: the hook records at transfer time, the script reads the record and pays.
- Two lanes
- The Workshop: you submit the source; Mintvelocity checks it, deploys it under its own key and lists it, and you earn the share you choose of every launch someone else makes with it: for a hook, 0% to 50% of the creator fee in 5% steps; for a companion or a pair, half of the launcher’s part of the creator fee, or nothing. Self-serve: you deploy it, make it immutable, make a config and paste its key on the launch page. The site shows a Workshop program with Mintvelocity’s reading of it; one deployed outside it as not read by Mintvelocity.
- Your agent
- Build with your agent has the brief to paste into Claude Code, Cursor or any coding agent for a hook, a companion or a pair: the template, every rule, the test plan, the Workshop.
The two layers
A hook runs inside the trade: the token program calls it before and after every transfer, mint and burn of the token and applies what it answers; the DEX does the same with pool hooks on every swap. A hook never gets the user’s signature; it answers, and the caller checks and applies the answer, never more than the amount being moved.
A companion script never runs inside a trade: Mintvelocity’s companion program holds the pot and calls your script on a timer with the launch’s accounts; your script reads what it likes and acts as the companion address, within hard bounds the program enforces: it refuses a step that spends more than the pot, touches the dev bag, takes the companion address’s rent or breaks custody.
Install
npm install @bordrless/sdk @bordrless/shared
The fork ships the SDK source with the programs repository (Apache-2.0) until its own npm packages are published; the IDLs ship inside the package. The program ids of the fork’s deployment are published on the programs page at launch. New to the standard? Start with why Mintvelocity.
What’s in it
token, swap, bridge, launch, kit - instruction builders, one object per program. holdingAddress, poolAddress, launchAddress, registryAddress - every PDA. decodeMint, decodeHolding, decodePool, decodeLaunch - typed accounts from the IDL coders. eventsOf, typedEvent, explainFailure - events from a transaction’s inner instructions, and a failed transaction in words. fetchTokenHook, resolveHookAccounts, kitTokenHook - a hook’s accounts, resolved for one operation. buildV0Transaction, protocolLookupTable - v0 transactions with the protocol table. buildCreateConfig, inspectConfig, templateHook - a hook of yours, prepared for the mint and made into a config. companion, decodeCompanion, decodeScript, decodeApproval, inspectScriptProgram - companions and custom scripts. PROGRAM_IDS, TOKEN_HOOK_FLAGS, POOL_HOOK_FLAGS from the shared package.
What you can build
- A token
- A mint of your own with a hook of your own, named at creation and locked by revoking the hook authority: token.createMint.
- A hook
- An ordinary Solana program against the hook crate: cuts, hook data and a refusal, and for a pool hook the swap’s fee and a burn: write a hook.
- A pool, a launchpad
- An ordinary pool for any pair, or a bonding curve a program of yours opens as its own pool hook and graduates itself: swap.createPool, finalizeCurve. Every cut its hook takes is yours.
- A quote asset
- SOL, an SPL or a Token-2022 token brought into the standard one for one: bridge.register, bridge.wrap.
- A launch here
- A launch on Mintvelocity’s launchpad with a hook you wrote, from a config: buildCreateConfig; with a companion you wrote, a script: companion.createScript.
- An agent companion
- A companion whose steps a model chooses among the options its script compiles in, within the script’s own caps: agent companions.