{"name":"Gifted Stock","site":"https://www.giftedstock.com","skill":"https://www.giftedstock.com/SKILL.md","chains":{"base":{"chainId":8453,"explorer":"https://basescan.org","publicRpc":"https://mainnet.base.org","money":{"USDC":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913"},"stocks":"Coinbase tokenized stocks"},"robinhood":{"chainId":4663,"explorer":"https://robin.etherscan.io","publicRpc":"https://rpc.mainnet.chain.robinhood.com","money":{"USDG":"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168"},"stocks":"Robinhood stock tokens"}},"contracts":{"base":{"normalBox":"0xFc4633d297E936072cbf83e43F26B104B70188DC","premiumBox":"0xc7E36409B4F6A9D4F7Dd575E11C4C5beA682e827","giftBox":"0x5a095D4aB6f9aea04D87e10312FBf1d2695ABa8A","giftRouter":"0x60C52b3552B62bbaf7082B285FE269fc659ec439","aerodromeRouter":"0x698Cb2b6dd822994581fEa6eA4Fc755d1363A92F","aeroRouter":"0x9Ee35Bf1bd69a03c6F0393582030fCe8Bb93D418","uniswapRouter02":"0x2626664c2603336E57B271c5C0b26F421741e481","uniswapRouter":"0xd6145b2D3F379919E8CdEda7B97e37c4b2Ca9c40","permit2":"0x000000000022D473030F116dDEE9F6B43aC78BA3","relayDepository":"0x4cD00E387622C35bDDB9b4c962C136462338BC31","campaignVault":"0xc5Fefb7D57c5D58DbC1E6C8D0B637C15F1cAb1Af"},"robinhood":{"normalBox":"0xB669dF5aB27db31c20696743e9C78951c863c1Ca","premiumBox":"0x9e0C3611EFf93aB12346a6C9c35D3BcEa69C58e6","uniswapRouter":"0x204FAca1764B154221e35c0d20aBb3c525710498","permit2":"0x000000000022D473030F116dDEE9F6B43aC78BA3","relayDepository":"0x4cD00E387622C35bDDB9b4c962C136462338BC31","campaignVault":"0xc5Fefb7D57c5D58DbC1E6C8D0B637C15F1cAb1Af"}},"feeWallet":"0xd98EE65e5271267EBE34f87B846403107c068A0f","functions":{"base":{"normalBox":[{"signature":"mint(uint256)","selector":"0xa0712d68"},{"signature":"mintWithEth(uint256)","selector":"0x0df10da9"},{"signature":"open(uint256[])","selector":"0x8da91778"},{"signature":"sendCards(address,uint256[])","selector":"0x800bf2b0"},{"signature":"settle(uint256,uint256[])","selector":"0x71384969"},{"signature":"cancelStuck(uint256,uint256[])","selector":"0x687cc5a6"}],"premiumBox":[{"signature":"mint(uint256)","selector":"0xa0712d68"},{"signature":"mintWithEth(uint256)","selector":"0x0df10da9"},{"signature":"open(uint256[])","selector":"0x8da91778"},{"signature":"sendCards(address,uint256[])","selector":"0x800bf2b0"},{"signature":"settle(uint256,uint256[])","selector":"0x71384969"},{"signature":"cancelStuck(uint256,uint256[])","selector":"0x687cc5a6"}],"giftBox":[{"signature":"claim(uint256,bytes,uint256,bytes,bytes32[])","selector":"0xe03a49d6"},{"signature":"open(uint256[])","selector":"0x8da91778"},{"signature":"reclaim(uint256,uint32,address)","selector":"0x96ed9702"}],"giftRouter":[{"signature":"buy((address,uint256)[],(uint8,bytes,uint256)[],uint32,address[],(address,uint8,bytes32,bytes32,bytes32,uint40,uint40,address,uint16,uint32),(uint256,uint256,uint8,bytes,(uint256,uint256,uint8,bytes32,bytes32)))","selector":"0x9326c675"}],"aerodromeRouter":[{"signature":"multicall(bytes[])","selector":"0xac9650d8"}],"aeroRouter":[{"signature":"multicall(bytes[])","selector":"0xac9650d8"}],"uniswapRouter02":[{"signature":"multicall(uint256,bytes[])","selector":"0x5ae401dc"}],"relayDepository":[{"signature":"depositNative(address,bytes32)","selector":"0x49290c1c"},{"signature":"depositErc20(address,address,uint256,bytes32)","selector":"0xe8017952"}],"uniswapRouter":[{"signature":"execute(bytes,bytes[],uint256)","selector":"0x3593564c"}],"permit2":[{"signature":"approve(address,address,uint160,uint48)","selector":"0x87517c45"}],"campaignVault":[{"signature":"createPartner(address,(bool,uint256,uint256,bytes))","selector":"0xc60e5958"},{"signature":"buy(uint64,address,uint32,(bool,uint256,uint256,bytes))","selector":"0xb940874e"},{"signature":"buyAndLaunch((uint64,address,uint8,uint32,uint40,uint40,bytes32),uint32,(bool,uint256,uint256,bytes))","selector":"0xbf164fb5"},{"signature":"launch((uint64,address,uint8,uint32,uint40,uint40,bytes32),uint32,(bool,uint256,uint256,bytes))","selector":"0xa0ece7b9"},{"signature":"buyAndRaise(uint64,uint32,(bool,uint256,uint256,bytes))","selector":"0x9e77b49c"},{"signature":"raise(uint64,uint32,(bool,uint256,uint256,bytes))","selector":"0x49d7bd23"},{"signature":"cancel(uint64,uint32)","selector":"0xcc0a92f6"},{"signature":"withdraw(uint64,address,uint32,address)","selector":"0x53dd90c5"},{"signature":"setPartnerManager(uint64,address,bool)","selector":"0x7c4ec139"},{"signature":"claimFirstCome(uint64,uint32,uint256,bytes,uint32,address)","selector":"0x06718a9b"},{"signature":"claimRaffle(uint64,uint32,bytes32[],uint32,address)","selector":"0x85265a01"}]},"robinhood":{"normalBox":[{"signature":"mint(uint256)","selector":"0xa0712d68"},{"signature":"mintWithEth(uint256)","selector":"0x0df10da9"},{"signature":"open(uint256[])","selector":"0x8da91778"},{"signature":"sendCards(address,uint256[])","selector":"0x800bf2b0"},{"signature":"revealAndSettle(uint256,uint256[],bytes)","selector":"0xe4ed3a8f"}],"premiumBox":[{"signature":"mint(uint256)","selector":"0xa0712d68"},{"signature":"mintWithEth(uint256)","selector":"0x0df10da9"},{"signature":"open(uint256[])","selector":"0x8da91778"},{"signature":"sendCards(address,uint256[])","selector":"0x800bf2b0"},{"signature":"revealAndSettle(uint256,uint256[],bytes)","selector":"0xe4ed3a8f"}],"uniswapRouter":[{"signature":"execute(bytes,bytes[],uint256)","selector":"0x3593564c"}],"permit2":[{"signature":"approve(address,address,uint160,uint48)","selector":"0x87517c45"}],"relayDepository":[{"signature":"depositNative(address,bytes32)","selector":"0x49290c1c"},{"signature":"depositErc20(address,address,uint256,bytes32)","selector":"0xe8017952"}],"campaignVault":[{"signature":"createPartner(address,(bool,uint256,uint256,bytes))","selector":"0xc60e5958"},{"signature":"buy(uint64,address,uint32,(bool,uint256,uint256,bytes))","selector":"0xb940874e"},{"signature":"buyAndLaunch((uint64,address,uint8,uint32,uint40,uint40,bytes32),uint32,(bool,uint256,uint256,bytes))","selector":"0xbf164fb5"},{"signature":"launch((uint64,address,uint8,uint32,uint40,uint40,bytes32),uint32,(bool,uint256,uint256,bytes))","selector":"0xa0ece7b9"},{"signature":"buyAndRaise(uint64,uint32,(bool,uint256,uint256,bytes))","selector":"0x9e77b49c"},{"signature":"raise(uint64,uint32,(bool,uint256,uint256,bytes))","selector":"0x49d7bd23"},{"signature":"cancel(uint64,uint32)","selector":"0xcc0a92f6"},{"signature":"withdraw(uint64,address,uint32,address)","selector":"0x53dd90c5"},{"signature":"setPartnerManager(uint64,address,bool)","selector":"0x7c4ec139"},{"signature":"claimFirstCome(uint64,uint32,uint256,bytes,uint32,address)","selector":"0x06718a9b"},{"signature":"claimRaffle(uint64,uint32,bytes32[],uint32,address)","selector":"0x85265a01"}]},"token":[{"signature":"approve(address,uint256)","selector":"0x095ea7b3"}]},"inside":{"multicall":{"on":["aerodromeRouter","aeroRouter","uniswapRouter02"],"calls":[{"signature":"exactInputSingle((address,address,int24,address,uint256,uint256,uint256,uint160))","selector":"0xa026383e","rule":"Aerodrome and Aero: the tokens asked (WETH for ETH); recipient is the router itself (the step's `to`); amountIn is the amount asked; no price limit"},{"signature":"exactInput((bytes,address,uint256,uint256,uint256))","selector":"0xc04b8d59","rule":"Aerodrome and Aero: a path from the token asked to the one asked (WETH for ETH), one or two pools, the token between them USDC or WETH and never either end; recipient is the router itself; amountIn is the amount asked (the step's `value` with ETH in); deadline no later than `validUntil`"},{"signature":"exactInput((bytes,address,uint256,uint256))","selector":"0xb858183f","rule":"SwapRouter02: the same path rule; recipient is the router itself; amountIn is the amount asked; the deadline is multicall's own, no later than `validUntil`"},{"signature":"sweepTokenWithFee(address,uint256,address,uint256,address)","selector":"0xe0e189a0","rule":"token is the one asked; recipient is your wallet; feeRecipient is the fee wallet; feeBips 100 with a stock or a token (cbBTC, BNKR...) on either side, else 75; amountMinimum less the fee is `summary.to.minimumOut`, above 0"},{"signature":"unwrapWETH9WithFee(uint256,address,uint256,address)","selector":"0x9b2c0a37","rule":"when ETH is asked; recipient is your wallet; feeRecipient is the fee wallet; feeBips 75 or 100 as above; amountMinimum less the fee is `summary.to.minimumOut`, above 0"},{"signature":"refundETH()","selector":"0x12210e8a","rule":"returns unspent ETH to the caller"}],"always":"exactly one swap, then exactly one sweepTokenWithFee or unwrapWETH9WithFee: it pays you. refundETH follows it when ETH goes in, and nothing else"},"execute":{"on":["uniswapRouter"],"routerItself":"0x0000000000000000000000000000000000000002","all":"2^255","commands":[{"byte":"0x00","name":"V3_SWAP_EXACT_IN","input":"(address recipient, uint256 amountIn, uint256 amountOutMin, bytes path, bool payerIsUser, uint256[] minHopPriceX36)","rule":"one pool, from what the router holds; recipient is 0x0000000000000000000000000000000000000002; amountIn is the amount asked on the first hop, 2^255 (all the router holds) after; payerIsUser only on a first hop paid in a token; no hop floors"},{"byte":"0x10","name":"V4_SWAP","input":"(bytes actions, bytes[] params)","rule":"actions exactly SETTLE (0x0b), SWAP_EXACT_IN_SINGLE (0x06), TAKE (0x0e): SETTLE pays what the router holds, the amount asked on the first hop and 2^255 after; a pool with no hook (0x0000000000000000000000000000000000000000), or on Base AXIS/USDC's own pool, exactly the key (0x5bE75e3b0aFf5D1A042A5363Ae36AcB1d6d755ea, 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913, 100, 1, 0xB0b24B89dB0dafbE43C5b40226b63A179f592880); hookData empty; the swap's amountIn is 0 (all of it); TAKE takes the pool's other currency to 0x0000000000000000000000000000000000000002, amount 0 (all of it)"},{"byte":"0x0b","name":"WRAP_ETH","input":"(address recipient, uint256 amountMin)","rule":"the ETH the router holds; recipient is 0x0000000000000000000000000000000000000002; the amount asked on the first hop, 2^255 after"},{"byte":"0x0c","name":"UNWRAP_WETH","input":"(address recipient, uint256 amountMin)","rule":"the WETH the router holds; recipient is 0x0000000000000000000000000000000000000002; amountMin 0"},{"byte":"0x06","name":"PAY_PORTION","input":"(address token, address recipient, uint256 bips)","rule":"token is the one asked, what the router holds (0x0000000000000000000000000000000000000000 for ETH); recipient is the fee wallet; bips 100 with a stock token or a token (cbBTC, BNKR...) on either side, else 75"},{"byte":"0x04","name":"SWEEP","input":"(address token, address recipient, uint256 amountMin)","rule":"token is PAY_PORTION's; recipient is your wallet; amountMin is `summary.to.minimumOut`, above 0"}],"always":"no other command byte, none with the 0x80 allow-revert flag. One hop, or two through USDG on Robinhood Chain or USDC on Base. The last two commands are one PAY_PORTION, then one SWEEP: it pays you. With ETH in, the step's `value` is the amount asked. On Base only a token's swap (AXIS) goes through it"},"permit2":{"on":["permit2"],"rule":"approve(token, spender, amount, expiration): the token asked, the Uniswap router on the same chain, the amount asked and an expiration no later than the swap's deadline; the token's own approval for Permit2 is the amount asked too"},"relay":{"on":["relayDepository"],"rule":"depositor (the first argument) is your wallet, where a refund goes; depositErc20's token and amount, or depositNative's `value`, are what you asked, its approval the same. The id (the last argument) is the EIP-712 hash of Relay's order, `summary.route.order`: it must hash to it, take exactly the deposit, pay only your wallet on the other chain in the token asked at least `summary.to.minimumOut`, make no calls there and refund only your wallet"},"giftBuy":{"on":["giftRouter"],"rules":["items: what each box holds, sorted by address, the amounts you asked (dollars at today's prices); legs: one for each item, in the same order","a leg buys its item with USDC: venue 0 Aerodrome Slipstream, 1 Aero or 2 Uniswap v3 with a path of the item, 3 bytes, ..., USDC (one to three pools, neither end in between), or 4 Uniswap v4 with abi-encoded pool keys from the item to USDC; never 3 (Aerodrome classic). A USDC item, and an ETH payer's ETH, as it is: venue 0, path empty, maxIn 0. A USDC payer's ETH: bought as WETH on venues 0-2. maxIn no more than what the item costs now on that path and 3%","boxes and recipients: the wallets asked, one box each; for a basket your own wallet, once a box; none for a link","opt.linkKey: your link key's address for a link, else zero; opt.gateKind, opt.gate, opt.claimFrom and opt.claimUntil as asked (all zero without a link); opt.design: the design asked (zero for none; a basket's carries no title)","opt.messageHash: keccak256 of your note (zero without one), or of \"basket:<code>\" for a basket","opt.maxFeeBps: the gift box's own fee (settings().feeBps); opt.frontendBps: 250 less that fee; opt.frontend: the fee wallet, or a basket's maker when you buy someone else's basket - 2.5% on top in all","pay.budget: exactly the legs' maxIn and the USDC item with both fees on it; the USDC approval before it is that budget; pay.deadline no later than validUntil; pay.permit all zero","paid in USDC: pay.ethVenue 0, pay.ethPath empty, value 0. Paid in ETH: pay.ethVenue 0-2, pay.ethPath USDC first and WETH last, and the step's value the boxes' ETH with both fees and no more than the budget is worth at Chainlink's ETH price and 5%"]},"campaignVault":{"on":["campaignVault"],"rules":["createPartner(owner, pay): owner is your wallet","every partnerId is the one your request names (from your createPartner receipt) and a partner your wallet owns or manages on that chain (partnerOf(id).owner, isPartnerManager); a box is one of the four boxes","launch and buyAndLaunch: the terms are the campaign you saved (box, perWinner, style raffle 1 or first come 0, its end exactly, its start as saved or the moment of the plan once past), count or qty the prize's boxes; raise and buyAndRaise: the campaignId your request names (from its launch receipt), of that partner","pay: as the request's payWith; inEth false with maxUsdc no more than the vault's own quote (partnerFeeQuote, buyQuote, campaignFeeQuote) and 1% and one exact approval of the chain's dollar for all of them; or inEth true with the step's value no more than the quote in ETH and 3% (the plan adds 1%; the vault sends the change back); permitDeadline 0 and permitSig empty","withdraw: to is your wallet; cancel: the campaignId your request names, max 0 (all of it)","setPartnerManager: your partner, the wallet you asked","claimFirstCome(campaignId, total, deadline, signature, max, to) and claimRaffle(campaignId, total, proof, max, to): campaignId the one your request names; total your share (the vault's approval or the winners' list sets it); max what this call takes, 1 to 200; to your wallet or zero (the sender: you); nothing is paid"]}},"builderCode":{"chain":"base","suffix":"0x62635f6c666261797877780b0080218021802180218021802180218021","what":"ERC-8021 builder code bc_lfbayxwx: Base counts the transaction as made through Gifted Stock; the contract never reads it"},"plansLast":{"buyWithMoney":null,"buyWithEth":600,"open":600,"send":null,"settle":null,"swap":600,"bridge":180,"gift":1200,"basketBuy":1200,"claimVerifiedLink":600,"claimOtherLink":null,"giftOpen":null,"giftTakeBack":null,"partnerCreate":600,"campaignLaunch":600,"campaignRaise":600,"campaignCancel":null,"poolWithdraw":null,"partnerManager":null},"fees":{"mysteryBox":"the box price; opening adds a small fee in ETH","swapWithStock":"1%","swapWithToken":"1%","swapWithoutStock":"0.75%","bridge":"1%","partnerFee":"the campaign vault's partner fee (partnerFeeQuote), whatever it charges now","campaignFee":"the campaign vault's campaign fee (campaignFeeQuote) on the boxes launched or raised, whatever it charges now","giftBox":"2.5% on top of what the boxes hold: the gift contract's fee (read from it) and the app-fee slot's share of 2.5%, to the fee wallet - or to a basket's maker when you buy someone else's basket (each plan's summary.fee)"},"rules":["every write endpoint answers with unsigned transactions; sign and send them in order from the wallet you named","the server never asks for a private key and never sends a transaction"],"endpoints":{"read":{"GET /api/agent/v1":"this: chains, contracts, every function a step calls, fees, how long plans last, endpoints","GET /api/agent/v1/boxes":"the four mystery boxes: price, odds, bonus pot, open fee, what they pay out now","GET /api/agent/v1/wallet/{address}":"a wallet's balances and mystery boxes on both chains","GET /api/agent/v1/box/{chain}/{box}/{id}":"one mystery box: sealed, opening or opened, and its prize","GET /api/agent/v1/gifts?wallet={address}":"a wallet's gift boxes and the gifts it made","GET /api/agent/v1/gift/{batchId}":"a gift link's public facts","GET /api/agent/v1/tokens?chain=base|robinhood&skill=1.5.1":"what can be swapped on a chain, tokens (cbBTC, BNKR...) on Base among them","GET /api/campaign/{code}":"a campaign's public page data: campaign, tasks, vault (chain, campaignId), winners","GET /api/agent/v1/verify?wallet={address}":"whether a wallet may join verified-only campaigns, and each way to get there","GET /api/agent/v1/history?wallet={address}":"what a wallet has done with its boxes, newest first: mystery boxes and gift boxes (25 lines a list; `next` pages on)","GET /api/agent/v1/openapi.json":"this API as an OpenAPI 3.1 spec","GET /api/agent/v1/quote?chain=base&sell=USDC&buy=NVDAc&amount=100":"what an amount gets on a swap now, no wallet needed"},"write":{"POST /api/agent/v1/tx/buy":"buy mystery boxes","POST /api/agent/v1/tx/open":"open mystery boxes (no ids: every sealed box of that kind the wallet holds)","POST /api/agent/v1/tx/send":"send sealed mystery boxes to a wallet","POST /api/agent/v1/tx/settle":"settle your own boxes the keeper left opening for an hour","POST /api/agent/v1/tx/swap":"swap on one chain, or bridge money between Base and Robinhood Chain","POST /api/agent/v1/tx/gift":"make a gift box: to wallets or behind a link","POST /api/agent/v1/tx/gift/claim":"claim a box from a gift link","POST /api/agent/v1/tx/gift/open":"open gift boxes","POST /api/agent/v1/tx/gift/take-back":"take back boxes nobody claimed from your link","POST /api/agent/v1/tx/basket":"buy boxes of a basket: a mix someone published on giftedstock.com/basket","POST /api/agent/v1/tx/partner":"a partner's vault transaction: create (the partner fee), withdraw (free boxes back), manager (name or remove one)","POST /api/agent/v1/tx/campaign":"launch, raise or cancel a saved campaign through the vault, or claim a campaign's boxes","POST /api/agent/v1/tx/basket/create":"publish your own basket and buy its first box (your agent token)"},"join":{"POST /api/campaign/{code}/task/{taskId}/click":"{ wallet }: a link task's click (it counts ten seconds later)","POST /api/campaign/{code}/task/{taskId}/verify":"{ wallet }: check one task","GET /api/campaign/{code}/join?address={address}":"the message to sign to join","POST /api/campaign/{code}/join":"{ message, signature }: join (a raffle, or a first-come campaign not in the vault)","POST /api/campaign/{code}/vault-claim":"{ hash }: count a claim transaction you sent","POST /api/verify/ethos":"{ wallet }: check the wallet's Ethos profile","POST /api/verify/nft":"{ wallet, collectionId }: check a listed NFT"},"partner":{"GET /api/agent/v1/session?wallet={address}":"the sign-in message for your agent token (personal_sign it)","POST /api/agent/v1/session":"{ message, signature } -> { token, expiresAt }: 24 hours, `Authorization: Bearer <token>` below","DELETE /api/agent/v1/session":"sign the wallet out everywhere","POST /api/partner/create":"register a partner: { wallet, name, slug, description, site, logoData, vault: { chain, hash } }, then sign the 428's message","GET /api/partner/me?wallet={address}":"the partners your wallet runs or manages","GET /api/partner/{slug}":"your partner: profile, campaigns, pool","GET /api/partner/{slug}/kinds":"the task kinds your partner may use","PUT /api/partner/{slug}":"edit the profile (signed)","POST /api/partner/{slug}/upload?kind=banner|logo":"an image, multipart field `file`: its url for a campaign's bannerUrl or the logo","POST /api/partner/{slug}/allowlists":"{ csv }: a wallet list for a whitelist task","POST /api/partner/{slug}/task-test":"try an API task's endpoint before saving it (signed)","POST /api/partner/{slug}/campaigns":"save a campaign: mode draft (answers missing) or ready","GET /api/partner/{slug}/campaigns/{code}":"one campaign as you run it","PUT /api/partner/{slug}/campaigns/{code}":"edit a campaign not yet launched","PUT /api/partner/{slug}/campaigns/{code}/text":"after launch: name, description, banner, task words (signed)","DELETE /api/partner/{slug}/campaigns/{code}":"delete a draft","GET /api/partner/{slug}/campaigns/{code}/vault":"the launch as the server works it out: chain, terms, pool, problem","POST /api/partner/{slug}/campaigns/{code}/vault":"{ action: launched | raised | cancelled, hash }: count a vault transaction you sent","POST /api/partner/{slug}/managers":"{ wallet, chain, hash }: count a setPartnerManager you sent"}}}