{"protocol":"Launkr","network":"mainnet","contracts":{"trait":"SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM.restricted-ft-trait-v6","singleton":"SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM.lp-singleton-v6","template":"SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM.restricted-token-template-v6"},"explorerLinks":{"singleton":"https://explorer.hiro.so/txid/SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM.lp-singleton-v6?chain=mainnet","template":"https://explorer.hiro.so/txid/SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM.restricted-token-template-v6?chain=mainnet"},"constants":{"tokenDecimals":6,"supply":{"minAtomic":"100000000000000","maxAtomic":"1000000000000000000000"},"directMode":{"minStxSeedUstx":"100000000","feeTreasuryBps":450,"feeProtocolBps":50,"totalFeeBps":500},"bondingMode":{"minVirtualStxUstx":"500000000","minGraduationThresholdUstx":"2000000000","maxGraduationStxUstx":"10000000000000","maxGraduationRatio":"10x virtualStx","feeTreasuryBps":90,"feeProtocolBps":10,"totalFeeBps":100},"graduatedMode":{"feeTreasuryBps":450,"feeProtocolBps":50,"totalFeeBps":500,"note":"Transition happens atomically inside the buy that crosses graduation-threshold. No separate call needed."},"swapAndBurn":{"fee":0,"note":"Permissionless, fee-free. Disabled on bonding pools (ERR_NOT_GRADUATED u217)."}},"readOnly":{"description":"All read-only calls use POST to the Hiro call-read endpoint. The sender field can be any valid STX address.","getPool":{"description":"Get pool state for a token. Returns reserves, mode, graduation progress, and fee-receiver.","httpMethod":"POST","url":"https://api.hiro.so/v2/contracts/call-read/SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM/lp-singleton-v6/get-pool","body":{"sender":"<any-stx-address>","arguments":["<hex-encoded-token-principal>"]},"note":"Encode the token principal as a hex Clarity value. Mode: u0=direct, u1=bonding, u2=graduated.","returnedFields":["stx-reserve","token-reserve","fee-receiver","active","mode","virtual-stx","virtual-token","graduation-threshold","bonded-stx-collected","bonded-tokens-sold"]},"quoteBuy":{"description":"Simulate a buy. Returns tokens-out net of fees, or none if pool missing / stx-in is zero.","httpMethod":"POST","url":"https://api.hiro.so/v2/contracts/call-read/SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM/lp-singleton-v6/quote-buy","body":{"sender":"<any-stx-address>","arguments":["<hex-token-principal>","<hex-uint-stx-in-ustx>"]}},"quoteSell":{"description":"Simulate a sell. Returns stx-out net of fees, or none if pool missing / tokens-in is zero.","httpMethod":"POST","url":"https://api.hiro.so/v2/contracts/call-read/SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM/lp-singleton-v6/quote-sell","body":{"sender":"<any-stx-address>","arguments":["<hex-token-principal>","<hex-uint-tokens-in>"]}},"quoteSwapAndBurn":{"description":"Simulate swap-and-burn. Returns tokens burned, or none. Only works on graduated pools.","httpMethod":"POST","url":"https://api.hiro.so/v2/contracts/call-read/SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM/lp-singleton-v6/quote-swap-and-burn","body":{"sender":"<any-stx-address>","arguments":["<hex-token-principal>","<hex-uint-stx-in-ustx>"]}},"isPaused":{"description":"Check if the entire protocol is paused.","httpMethod":"POST","url":"https://api.hiro.so/v2/contracts/call-read/SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM/lp-singleton-v6/is-paused","body":{"sender":"<any-stx-address>","arguments":[]}}},"writes":{"launch":{"description":"Launch a new token. Two sequential transactions: deploy token contract, then create pool.","endpoint":"/api/launch","method":"POST","body":{"network":"mainnet","deployerAddress":"<your-stx-address>","name":"<token name, e.g. My Agent Token>","symbol":"<e.g. MAT>","supply":"<atomic units string, e.g. 1000000000000000 = 1B tokens @ 6 decimals>","uri":"<optional metadata URI>","mode":"bonding | direct","feeReceiver":"<stx-address that receives 90% of swap fees>","bondingMode":{"virtualStx":"<uSTX, min 500000000>","graduationThreshold":"<uSTX, min 2000000000>"},"directMode":{"stxSeed":"<uSTX, min 100000000>"}}},"swap":{"description":"Buy tokens with STX.","contractId":"SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM.lp-singleton-v6","functionName":"swap-exact-stx-for-tokens","functionArgs":[{"name":"token","type":"principal","description":"token contract principal"},{"name":"stx-in","type":"uint","description":"uSTX to spend"},{"name":"min-tokens-out","type":"uint","description":"slippage guard — min tokens to receive"},{"name":"deadline","type":"uint","description":"max Stacks block height (use 0xffffffff for no deadline)"},{"name":"recipient","type":"principal","description":"address to receive tokens (usually tx-sender)"}],"note":"Use quote-buy first to get min-tokens-out. Fees are deducted from stx-in before XYK math."},"sell":{"description":"Sell tokens for STX.","contractId":"SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM.lp-singleton-v6","functionName":"swap-exact-tokens-for-stx","functionArgs":[{"name":"token","type":"principal"},{"name":"tokens-in","type":"uint","description":"atomic token units to sell"},{"name":"min-stx-out","type":"uint","description":"slippage guard"},{"name":"deadline","type":"uint"},{"name":"recipient","type":"principal"}]},"swapAndBurn":{"description":"Buy tokens with STX and burn them immediately. Fee-free. Graduated pools only.","contractId":"SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM.lp-singleton-v6","functionName":"swap-and-burn","functionArgs":[{"name":"token","type":"principal"},{"name":"stx-in","type":"uint"},{"name":"min-tokens-burned","type":"uint","description":"slippage guard"},{"name":"deadline","type":"uint"}]}},"errors":{"u200":"ERR_POOL_EXISTS — pool already exists for this token","u201":"ERR_TOKEN_NOT_OURS — token source hash doesn't match APPROVED_TOKEN_HASH","u209":"ERR_VIRTUAL_RATIO_TOO_LOW — virtualStx too low relative to supply","u217":"ERR_NOT_GRADUATED — swap-and-burn called on a bonding pool","u220":"ERR_RATIO_TOO_HIGH — graduationThreshold > 10x virtualStx","u221":"ERR_GRADUATION_TOO_HIGH — graduationThreshold > 10M STX","u224":"ERR_DEGENERATE_CURVE — < 50% of supply would be released at graduation"},"agentQuickStart":["1. Call GET /api/protocol?network=mainnet (this endpoint) to get contract addresses.","2. Call POST /api/launch with your token params to get a 2-step signed intent.","3. Sign + broadcast step 1 (contract deploy) with your STX key.","4. Wait for step 1 to confirm: GET https://api.hiro.so/extended/v1/tx/{txid}","5. Sign + broadcast step 2 (create-pool) with your STX key.","6. Monitor your pool: POST https://api.hiro.so/v2/contracts/call-read/SP2ABWV7JE5SFV1A1BDS8HARP2QY7QRPGC9Z367PM/lp-singleton-v6/get-pool","7. To trade: use swap-exact-stx-for-tokens on the singleton (quote-buy first for slippage)."]}