[{"data":1,"prerenderedAt":359},["ShallowReactive",2],{"navigation_docs":3,"-guide-cli":44,"-guide-cli-surround":354},[4,24],{"title":5,"path":6,"stem":7,"children":8,"icon":23},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19],{"title":10,"path":6,"stem":7},"Getting started",{"title":12,"path":13,"stem":14},"CLI","\u002Fguide\u002Fcli","1.guide\u002F02.cli",{"title":16,"path":17,"stem":18},"Agents","\u002Fguide\u002Fagents","1.guide\u002F03.agents",{"title":20,"path":21,"stem":22},"Playground","\u002Fguide\u002Fplayground","1.guide\u002F04.playground","i-lucide-book-open",{"title":25,"path":26,"stem":27,"children":28,"icon":43},"Math","\u002Fmath","2.math\u002F00.index",[29,31,35,39],{"title":30,"path":26,"stem":27},"Overview",{"title":32,"path":33,"stem":34},"Curves and points","\u002Fmath\u002Fcurves","2.math\u002F01.curves",{"title":36,"path":37,"stem":38},"Orders and logs","\u002Fmath\u002Fgroups","2.math\u002F02.groups",{"title":40,"path":41,"stem":42},"secp256k1","\u002Fmath\u002Fsecp256k1","2.math\u002F03.secp256k1","i-lucide-sigma",{"id":45,"title":12,"body":46,"description":346,"extension":347,"links":348,"meta":349,"navigation":351,"path":13,"seo":352,"stem":14,"__hash__":353},"docs\u002F1.guide\u002F02.cli.md",{"type":47,"value":48,"toc":340},"minimark",[49,54,112,120,136,186,190,212,248,254,263,284,288,291,315,321,336],[50,51,53],"h2",{"id":52},"two-commands-and-a-server","Two commands and a server",[55,56,61],"pre",{"className":57,"code":58,"language":59,"meta":60,"style":60},"language-bash shiki shiki-themes compressions compressions compressions","npx @agntn\u002Fcurves compute log --a 2 --b 2 --p 17 --point 5,1 --other 16,4\n","bash","",[62,63,64],"code",{"__ignoreMap":60},[65,66,69,73,77,80,83,86,89,92,94,97,100,103,106,109],"span",{"class":67,"line":68},"line",1,[65,70,72],{"class":71},"sK71F","npx",[65,74,76],{"class":75},"shU9J"," @agntn\u002Fcurves",[65,78,79],{"class":75}," compute",[65,81,82],{"class":75}," log",[65,84,85],{"class":75}," --a",[65,87,88],{"class":75}," 2",[65,90,91],{"class":75}," --b",[65,93,88],{"class":75},[65,95,96],{"class":75}," --p",[65,98,99],{"class":75}," 17",[65,101,102],{"class":75}," --point",[65,104,105],{"class":75}," 5,1",[65,107,108],{"class":75}," --other",[65,110,111],{"class":75}," 16,4\n",[55,113,118],{"className":114,"code":116,"language":117,"meta":60},[115],"language-text","{\n  \"operation\": \"log\",\n  \"order\": \"19\",\n  \"scalar\": \"13\"\n}\n","text",[62,119,116],{"__ignoreMap":60},[121,122,123,124,127,128,131,132,135],"p",{},"From here on it's plain ",[62,125,126],{},"curves",". In a project that means ",[62,129,130],{},"pnpm exec curves",". Or ",[62,133,134],{},"pnpm add -g @agntn\u002Fcurves"," once.",[137,138,139,152],"table",{},[140,141,142],"thead",{},[143,144,145,149],"tr",{},[146,147,148],"th",{},"Command",[146,150,151],{},"Does",[153,154,155,166,176],"tbody",{},[143,156,157,163],{},[158,159,160],"td",{},[62,161,162],{},"curves compute \u003Coperation>",[158,164,165],{},"add, double, negate, multiply, check, order, count, points, log on a curve you give",[143,167,168,173],{},[158,169,170],{},[62,171,172],{},"curves secp256k1 \u003Coperation>",[158,174,175],{},"add, subtract, negate, multiply, lift, check on secp256k1",[143,177,178,183],{},[158,179,180],{},[62,181,182],{},"curves mcp",[158,184,185],{},"the MCP server over stdio",[50,187,189],{"id":188},"points-and-numbers","Points and numbers",[121,191,192,195,196,199,200,203,204,207,208,211],{},[62,193,194],{},"compute"," takes points as ",[62,197,198],{},"x,y",". Integers are decimal or ",[62,201,202],{},"0x"," hex. Negative a? ",[62,205,206],{},"--a -3"," works, and so does ",[62,209,210],{},"--a=-3",". It's reduced mod p anyway.",[55,213,215],{"className":57,"code":214,"language":59,"meta":60,"style":60},"curves compute multiply --a 2 --b 2 --p 17 --point 5,1 --scalar -2\n",[62,216,217],{"__ignoreMap":60},[65,218,219,221,223,226,228,230,232,234,236,238,240,242,245],{"class":67,"line":68},[65,220,126],{"class":71},[65,222,79],{"class":75},[65,224,225],{"class":75}," multiply",[65,227,85],{"class":75},[65,229,88],{"class":75},[65,231,91],{"class":75},[65,233,88],{"class":75},[65,235,96],{"class":75},[65,237,99],{"class":75},[65,239,102],{"class":75},[65,241,105],{"class":75},[65,243,244],{"class":75}," --scalar",[65,246,247],{"class":75}," -2\n",[55,249,252],{"className":250,"code":251,"language":117,"meta":60},[115],"{\n  \"operation\": \"multiply\",\n  \"point\": {\n    \"x\": \"6\",\n    \"y\": \"14\"\n  }\n}\n",[62,253,251],{"__ignoreMap":60},[121,255,256,258,259,262],{},[62,257,40],{}," takes SEC1 hex, compressed or not. ",[62,260,261],{},"--uncompressed"," writes 65 bytes instead of 33.",[55,264,266],{"className":57,"code":265,"language":59,"meta":60,"style":60},"curves secp256k1 lift --x 79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\n",[62,267,268],{"__ignoreMap":60},[65,269,270,272,275,278,281],{"class":67,"line":68},[65,271,126],{"class":71},[65,273,274],{"class":75}," secp256k1",[65,276,277],{"class":75}," lift",[65,279,280],{"class":75}," --x",[65,282,283],{"class":75}," 79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\n",[50,285,287],{"id":286},"when-it-says-no","When it says no",[121,289,290],{},"A refusal is one line on stderr and exit code 1. No stack trace.",[55,292,294],{"className":57,"code":293,"language":59,"meta":60,"style":60},"curves secp256k1 subtract --point 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 --other 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\n",[62,295,296],{"__ignoreMap":60},[65,297,298,300,302,305,307,310,312],{"class":67,"line":68},[65,299,126],{"class":71},[65,301,274],{"class":75},[65,303,304],{"class":75}," subtract",[65,306,102],{"class":75},[65,308,309],{"class":75}," 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798",[65,311,108],{"class":75},[65,313,314],{"class":75}," 0279be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798\n",[55,316,319],{"className":317,"code":318,"language":117,"meta":60},[115],"The result is the point at infinity, which is no public key, as with P minus P\n",[62,320,318],{"__ignoreMap":60},[121,322,323,324,327,328,331,332,335],{},"An option the operation doesn't take is refused too. ",[62,325,326],{},"count"," with a ",[62,329,330],{},"--scalar","? It says so instead of quietly ignoring it. ",[62,333,334],{},"curves \u003Ccommand> --help"," lists every flag.",[337,338,339],"style",{},"html pre.shiki code .sK71F, html code.shiki .sK71F{--shiki-light:var(--shiki-token-function);--shiki-default:var(--shiki-token-function);--shiki-dark:var(--shiki-token-function)}html pre.shiki code .shU9J, html code.shiki .shU9J{--shiki-light:var(--shiki-token-string);--shiki-default:var(--shiki-token-string);--shiki-dark:var(--shiki-token-string)}html .light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html.light .shiki span {color: var(--shiki-light);background: var(--shiki-light-bg);font-style: var(--shiki-light-font-style);font-weight: var(--shiki-light-font-weight);text-decoration: var(--shiki-light-text-decoration);}html .default .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .shiki span {color: var(--shiki-default);background: var(--shiki-default-bg);font-style: var(--shiki-default-font-style);font-weight: var(--shiki-default-font-weight);text-decoration: var(--shiki-default-text-decoration);}html .dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}html.dark .shiki span {color: var(--shiki-dark);background: var(--shiki-dark-bg);font-style: var(--shiki-dark-font-style);font-weight: var(--shiki-dark-font-weight);text-decoration: var(--shiki-dark-text-decoration);}",{"title":60,"searchDepth":341,"depth":341,"links":342},2,[343,344,345],{"id":52,"depth":341,"text":53},{"id":188,"depth":341,"text":189},{"id":286,"depth":341,"text":287},"The curves command runs both tools from a terminal and prints the same JSON a model gets","md",null,{"icon":350},"i-lucide-terminal",true,{"title":12,"description":346},"1HPFH9sEQN34a78UguuQOuA3876_HIGc2XBtikJpaic",[355,357],{"title":10,"path":6,"stem":7,"description":356,"children":-1},"Install @agntn\u002Fcurves and define a curve and count its points and find a discrete log in a few lines",{"title":16,"path":17,"stem":18,"description":358,"children":-1},"Both tools over local or remote MCP and Pi and OMP and the AI SDK. What they take and what the model reads back",1791298463108]