[{"data":1,"prerenderedAt":749},["ShallowReactive",2],{"navigation_docs":3,"-guide-registry":96,"-guide-registry-surround":744},[4,48],{"title":5,"path":6,"stem":7,"children":8,"icon":47},"Guide","\u002Fguide","1.guide\u002F01.index",[9,11,15,19,23,27,31,35,39,43],{"title":10,"path":6,"stem":7},"Getting Started",{"title":12,"path":13,"stem":14},"Puzzle records","\u002Fguide\u002Frecords","1.guide\u002F02.records",{"title":16,"path":17,"stem":18},"Registry","\u002Fguide\u002Fregistry","1.guide\u002F03.registry",{"title":20,"path":21,"stem":22},"Lookups and views","\u002Fguide\u002Flookups","1.guide\u002F04.lookups",{"title":24,"path":25,"stem":26},"Verification","\u002Fguide\u002Fverification","1.guide\u002F05.verification",{"title":28,"path":29,"stem":30},"Balances","\u002Fguide\u002Fbalances","1.guide\u002F06.balances",{"title":32,"path":33,"stem":34},"CLI","\u002Fguide\u002Fcli","1.guide\u002F07.cli",{"title":36,"path":37,"stem":38},"Agents","\u002Fguide\u002Fagents","1.guide\u002F08.agents",{"title":40,"path":41,"stem":42},"Custom collections","\u002Fguide\u002Fcustom","1.guide\u002F09.custom",{"title":44,"path":45,"stem":46},"Playground","\u002Fguide\u002Fplayground","1.guide\u002F10.playground","i-lucide-book-open",{"title":49,"path":50,"stem":51,"children":52,"icon":95},"Collections","\u002Fcollections","2.collections\u002F00.index",[53,55,59,63,67,71,75,79,83,87,91],{"title":54,"path":50,"stem":51},"Overview",{"title":56,"path":57,"stem":58},"Bitcoin puzzle transaction","\u002Fcollections\u002Fb1000","2.collections\u002F01.b1000",{"title":60,"path":61,"stem":62},"RushWallet contest","\u002Fcollections\u002Frushwallet","2.collections\u002F02.rushwallet",{"title":64,"path":65,"stem":66},"Zden's puzzles","\u002Fcollections\u002Fzden","2.collections\u002F03.zden",{"title":68,"path":69,"stem":70},"Arweave bounties","\u002Fcollections\u002Farweave","2.collections\u002F04.arweave",{"title":72,"path":73,"stem":74},"WarpWallet challenges","\u002Fcollections\u002Fwarp","2.collections\u002F05.warp",{"title":76,"path":77,"stem":78},"Hash collision bounties","\u002Fcollections\u002Fhash_collision","2.collections\u002F06.hash_collision",{"title":80,"path":81,"stem":82},"Ballet wallets","\u002Fcollections\u002Fballet","2.collections\u002F07.ballet",{"title":84,"path":85,"stem":86},"Bitimage","\u002Fcollections\u002Fbitimage","2.collections\u002F08.bitimage",{"title":88,"path":89,"stem":90},"Bitaps mnemonic challenge","\u002Fcollections\u002Fbitaps","2.collections\u002F09.bitaps",{"title":92,"path":93,"stem":94},"GSMG.io puzzle","\u002Fcollections\u002Fgsmg","2.collections\u002F10.gsmg","i-lucide-layers",{"id":97,"title":16,"body":98,"description":737,"extension":738,"links":739,"meta":740,"navigation":207,"path":17,"seo":742,"stem":18,"__hash__":743},"docs\u002F1.guide\u002F03.registry.md",{"type":99,"value":100,"toc":730},"minimark",[101,106,303,311,315,489,517,524,528,562,566,670,696,700,708,726],[102,103,105],"h2",{"id":104},"six-functions","Six functions",[107,108,113],"pre",{"className":109,"code":110,"language":111,"meta":112,"style":112},"language-ts shiki shiki-themes github-light github-light vitesse-dark","import {\n  collectionKeys,\n  hasCollection,\n  getCollection,\n  requireCollection,\n  collections,\n  registerCollection,\n} from \"@agntn\u002Fpuzzles\";\n\ncollectionKeys(); \u002F\u002F [\"arweave\", \"b1000\", \"ballet\", \"bitaps\", \"bitimage\", \"gsmg\", \"hash_collision\", \"rushwallet\", \"warp\", \"zden\"]\nhasCollection(\"warpwallet\"); \u002F\u002F true, an alias for warp\nawait getCollection(\"b1000\"); \u002F\u002F loads src\u002Fcollections\u002Fb1000 and returns the instance, or undefined\nawait requireCollection(\"nope\"); \u002F\u002F throws UnknownCollectionError\nawait collections(); \u002F\u002F every collection, loaded once, in manifest order\n","ts","",[114,115,116,129,139,147,155,163,171,179,202,209,223,245,268,290],"code",{"__ignoreMap":112},[117,118,121,125],"span",{"class":119,"line":120},"line",1,[117,122,124],{"class":123},"sds8u","import",[117,126,128],{"class":127},"s14qF"," {\n",[117,130,132,136],{"class":119,"line":131},2,[117,133,135],{"class":134},"s9qSu","  collectionKeys",[117,137,138],{"class":127},",\n",[117,140,142,145],{"class":119,"line":141},3,[117,143,144],{"class":134},"  hasCollection",[117,146,138],{"class":127},[117,148,150,153],{"class":119,"line":149},4,[117,151,152],{"class":134},"  getCollection",[117,154,138],{"class":127},[117,156,158,161],{"class":119,"line":157},5,[117,159,160],{"class":134},"  requireCollection",[117,162,138],{"class":127},[117,164,166,169],{"class":119,"line":165},6,[117,167,168],{"class":134},"  collections",[117,170,138],{"class":127},[117,172,174,177],{"class":119,"line":173},7,[117,175,176],{"class":134},"  registerCollection",[117,178,138],{"class":127},[117,180,182,185,188,192,196,199],{"class":119,"line":181},8,[117,183,184],{"class":127},"}",[117,186,187],{"class":123}," from",[117,189,191],{"class":190},"s2tGe"," \"",[117,193,195],{"class":194},"skmWX","@agntn\u002Fpuzzles",[117,197,198],{"class":190},"\"",[117,200,201],{"class":127},";\n",[117,203,205],{"class":119,"line":204},9,[117,206,208],{"emptyLinePlaceholder":207},true,"\n",[117,210,212,216,219],{"class":119,"line":211},10,[117,213,215],{"class":214},"sTnI0","collectionKeys",[117,217,218],{"class":127},"();",[117,220,222],{"class":221},"sjj-T"," \u002F\u002F [\"arweave\", \"b1000\", \"ballet\", \"bitaps\", \"bitimage\", \"gsmg\", \"hash_collision\", \"rushwallet\", \"warp\", \"zden\"]\n",[117,224,226,229,232,234,237,239,242],{"class":119,"line":225},11,[117,227,228],{"class":214},"hasCollection",[117,230,231],{"class":127},"(",[117,233,198],{"class":190},[117,235,236],{"class":194},"warpwallet",[117,238,198],{"class":190},[117,240,241],{"class":127},");",[117,243,244],{"class":221}," \u002F\u002F true, an alias for warp\n",[117,246,248,251,254,256,258,261,263,265],{"class":119,"line":247},12,[117,249,250],{"class":123},"await",[117,252,253],{"class":214}," getCollection",[117,255,231],{"class":127},[117,257,198],{"class":190},[117,259,260],{"class":194},"b1000",[117,262,198],{"class":190},[117,264,241],{"class":127},[117,266,267],{"class":221}," \u002F\u002F loads src\u002Fcollections\u002Fb1000 and returns the instance, or undefined\n",[117,269,271,273,276,278,280,283,285,287],{"class":119,"line":270},13,[117,272,250],{"class":123},[117,274,275],{"class":214}," requireCollection",[117,277,231],{"class":127},[117,279,198],{"class":190},[117,281,282],{"class":194},"nope",[117,284,198],{"class":190},[117,286,241],{"class":127},[117,288,289],{"class":221}," \u002F\u002F throws UnknownCollectionError\n",[117,291,293,295,298,300],{"class":119,"line":292},14,[117,294,250],{"class":123},[117,296,297],{"class":214}," collections",[117,299,218],{"class":127},[117,301,302],{"class":221}," \u002F\u002F every collection, loaded once, in manifest order\n",[304,305,306,307,310],"p",{},"The first two are synchronous. They read the manifest and nothing else. The rest await an ",[114,308,309],{},"import()",". The promise for a collection is shared, so two parallel callers load one module, not two.",[102,312,314],{"id":313},"the-manifest","The manifest",[107,316,319],{"className":109,"code":317,"filename":318,"language":111,"meta":112,"style":112},"export const builtins: readonly CollectionEntry[] = [\n  { key: \"arweave\", load: () => import(\".\u002Farweave.ts\").then((m) => m.arweave) },\n  { key: \"b1000\", load: () => import(\".\u002Fb1000.ts\").then((m) => m.b1000) },\n  \u002F\u002F ...\n];\n","src\u002Fcollections\u002Findex.ts",[114,320,321,354,426,479,484],{"__ignoreMap":112},[117,322,323,326,330,334,338,341,345,348,351],{"class":119,"line":120},[117,324,325],{"class":123},"export",[117,327,329],{"class":328},"sO_1p"," const",[117,331,333],{"class":332},"sHhh0"," builtins",[117,335,337],{"class":336},"sLuFV",":",[117,339,340],{"class":328}," readonly",[117,342,344],{"class":343},"stSJJ"," CollectionEntry",[117,346,347],{"class":127},"[] ",[117,349,350],{"class":336},"=",[117,352,353],{"class":127}," [\n",[117,355,356,359,363,366,368,371,373,376,379,382,385,388,390,392,395,397,400,403,406,410,413,415,418,421,423],{"class":119,"line":131},[117,357,358],{"class":127},"  { ",[117,360,362],{"class":361},"sC822","key",[117,364,365],{"class":127},": ",[117,367,198],{"class":190},[117,369,370],{"class":194},"arweave",[117,372,198],{"class":190},[117,374,375],{"class":127},", ",[117,377,378],{"class":214},"load",[117,380,381],{"class":127},": () ",[117,383,384],{"class":336},"=>",[117,386,387],{"class":328}," import",[117,389,231],{"class":127},[117,391,198],{"class":190},[117,393,394],{"class":194},".\u002Farweave.ts",[117,396,198],{"class":190},[117,398,399],{"class":127},").",[117,401,402],{"class":214},"then",[117,404,405],{"class":127},"((",[117,407,409],{"class":408},"sZNs6","m",[117,411,412],{"class":127},") ",[117,414,384],{"class":336},[117,416,417],{"class":134}," m",[117,419,420],{"class":127},".",[117,422,370],{"class":134},[117,424,425],{"class":127},") },\n",[117,427,428,430,432,434,436,438,440,442,444,446,448,450,452,454,457,459,461,463,465,467,469,471,473,475,477],{"class":119,"line":141},[117,429,358],{"class":127},[117,431,362],{"class":361},[117,433,365],{"class":127},[117,435,198],{"class":190},[117,437,260],{"class":194},[117,439,198],{"class":190},[117,441,375],{"class":127},[117,443,378],{"class":214},[117,445,381],{"class":127},[117,447,384],{"class":336},[117,449,387],{"class":328},[117,451,231],{"class":127},[117,453,198],{"class":190},[117,455,456],{"class":194},".\u002Fb1000.ts",[117,458,198],{"class":190},[117,460,399],{"class":127},[117,462,402],{"class":214},[117,464,405],{"class":127},[117,466,409],{"class":408},[117,468,412],{"class":127},[117,470,384],{"class":336},[117,472,417],{"class":134},[117,474,420],{"class":127},[117,476,260],{"class":134},[117,478,425],{"class":127},[117,480,481],{"class":119,"line":149},[117,482,483],{"class":221},"  \u002F\u002F ...\n",[117,485,486],{"class":119,"line":157},[117,487,488],{"class":127},"];\n",[304,490,491,492,494,495,498,499,502,503,505,506,508,509,512,513,516],{},"Only the key lives here. Importing ",[114,493,195],{}," evaluates this list and the core. Not one record, not one collection class. The verification crypto does come with the core, because ",[114,496,497],{},"verifyPuzzle"," is synchronous. The CLI never imports the barrel, so ",[114,500,501],{},"puzzles --help"," stays light. A bundler sees ten literal ",[114,504,309],{}," calls and splits each collection into its own chunk. Only ever ask about ",[114,507,260],{},"? You never download the other nine. ",[114,510,511],{},"sideEffects"," in ",[114,514,515],{},"package.json"," names the CLI entry alone. The b1000 chunk is about 210 KB of records. The other nine together are 70.",[304,518,519,520,523],{},"The cost is a new way to be wrong. A collection module that exists on disk and isn't in the list is invisible to the registry. A test compares the directory with the manifest, so it can't drift quietly. And ",[114,521,522],{},"@agntn\u002Fpuzzles\u002Fcollections\u002F\u003Ckey>"," serves the module directly either way.",[102,525,527],{"id":526},"two-aliases","Two aliases",[304,529,530,533,534,537,538,540,541,544,545,375,547,550,551,554,555,537,558,561],{},[114,531,532],{},"peter_todd"," resolves to ",[114,535,536],{},"hash_collision"," and ",[114,539,236],{}," to ",[114,542,543],{},"warp",". That holds in ",[114,546,228],{},[114,548,549],{},"getCollection"," and every identifier lookup. They're the names the earlier JSON dataset used. Scripts written against it still say them, and they should keep working. Aliases live in a ",[114,552,553],{},"Map",", so ",[114,556,557],{},"constructor",[114,559,560],{},"__proto__"," are unknown keys, not Object prototype properties.",[102,563,565],{"id":564},"registering-yours","Registering yours",[107,567,569],{"className":109,"code":568,"language":111,"meta":112,"style":112},"import { registerCollection } from \"@agntn\u002Fpuzzles\";\n\nregisterCollection({ key: \"mine\", load: () => import(\".\u002Fmine\").then((m) => m.mine) });\nregisterCollection(mine); \u002F\u002F or an instance, registered as an already resolved entry\n",[114,570,571,594,598,657],{"__ignoreMap":112},[117,572,573,575,578,581,584,586,588,590,592],{"class":119,"line":120},[117,574,124],{"class":123},[117,576,577],{"class":127}," {",[117,579,580],{"class":134}," registerCollection",[117,582,583],{"class":127}," }",[117,585,187],{"class":123},[117,587,191],{"class":190},[117,589,195],{"class":194},[117,591,198],{"class":190},[117,593,201],{"class":127},[117,595,596],{"class":119,"line":131},[117,597,208],{"emptyLinePlaceholder":207},[117,599,600,603,606,608,610,612,615,617,619,621,623,625,627,629,631,634,636,638,640,642,644,646,648,650,652,654],{"class":119,"line":141},[117,601,602],{"class":214},"registerCollection",[117,604,605],{"class":127},"({ ",[117,607,362],{"class":361},[117,609,365],{"class":127},[117,611,198],{"class":190},[117,613,614],{"class":194},"mine",[117,616,198],{"class":190},[117,618,375],{"class":127},[117,620,378],{"class":214},[117,622,381],{"class":127},[117,624,384],{"class":336},[117,626,387],{"class":328},[117,628,231],{"class":127},[117,630,198],{"class":190},[117,632,633],{"class":194},".\u002Fmine",[117,635,198],{"class":190},[117,637,399],{"class":127},[117,639,402],{"class":214},[117,641,405],{"class":127},[117,643,409],{"class":408},[117,645,412],{"class":127},[117,647,384],{"class":336},[117,649,417],{"class":134},[117,651,420],{"class":127},[117,653,614],{"class":134},[117,655,656],{"class":127},") });\n",[117,658,659,661,663,665,667],{"class":119,"line":149},[117,660,602],{"class":214},[117,662,231],{"class":127},[117,664,614],{"class":134},[117,666,241],{"class":127},[117,668,669],{"class":221}," \u002F\u002F or an instance, registered as an already resolved entry\n",[304,671,672,673,675,676,375,679,375,682,537,685,688,689,692,693,420],{},"An entry with a loader stays lazy, the same as the built-ins. An instance registers as resolved. The same instance twice is a no-op. Another instance or entry under an existing key replaces what the key held, ",[114,674,260],{}," included. A fork with corrected data can stand in for the shipped one. Every aggregate view refreshes on the next read. ",[114,677,678],{},"all()",[114,680,681],{},"collectionSummaries()",[114,683,684],{},"dataVersion()",[114,686,687],{},"dataset()"," are memoized per registry snapshot, and a registration starts a new one. ",[114,690,691],{},"stats()"," and the tools recompute from those views on every call. The whole recipe is in ",[694,695,40],"a",{"href":41},[102,697,699],{"id":698},"where-the-collections-come-from","Where the collections come from",[107,701,706],{"className":702,"code":704,"language":705,"meta":112},[703],"language-text","Collection\u003CQuery> (abstract)\n├── NamedCollection        get(\"challenge_1\") or get(\"warp\u002Fchallenge_1\")\n│   ├── ArweaveCollection\n│   ├── BalletCollection\n│   ├── BitimageCollection\n│   ├── HashCollisionCollection\n│   ├── RushwalletCollection\n│   ├── WarpCollection\n│   └── ZdenCollection\n├── NumericCollection      get(71) or get(\"71\") or get(\"b1000\u002F71\")\n│   └── B1000Collection\n└── SingletonCollection    get() or get(\"gsmg\")\n    ├── BitapsCollection\n    └── GsmgCollection\n","text",[114,707,704],{"__ignoreMap":112},[304,709,710,711,713,714,717,718,721,722,725],{},"Each collection is a class with a static ",[114,712,362],{},", a static ",[114,715,716],{},"author"," built with ",[114,719,720],{},"party()",", and the puzzle list. The three bases differ only in what ",[114,723,724],{},"get"," accepts. A singleton refuses to hold anything but the one puzzle whose id equals its key. It refuses at construction time, so the two singleton ids can't drift from the manifest.",[727,728,729],"style",{},"html pre.shiki code .sds8u, html code.shiki .sds8u{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#4D9375}html pre.shiki code .s14qF, html code.shiki .s14qF{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#666666}html pre.shiki code .s9qSu, html code.shiki .s9qSu{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#BD976A}html pre.shiki code .s2tGe, html code.shiki .s2tGe{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#C98A7D77}html pre.shiki code .skmWX, html code.shiki .skmWX{--shiki-light:#032F62;--shiki-default:#032F62;--shiki-dark:#C98A7D}html pre.shiki code .sTnI0, html code.shiki .sTnI0{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#80A665}html pre.shiki code .sjj-T, html code.shiki .sjj-T{--shiki-light:#6A737D;--shiki-default:#6A737D;--shiki-dark:#758575DD}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);}html pre.shiki code .sO_1p, html code.shiki .sO_1p{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#CB7676}html pre.shiki code .sHhh0, html code.shiki .sHhh0{--shiki-light:#005CC5;--shiki-default:#005CC5;--shiki-dark:#BD976A}html pre.shiki code .sLuFV, html code.shiki .sLuFV{--shiki-light:#D73A49;--shiki-default:#D73A49;--shiki-dark:#666666}html pre.shiki code .stSJJ, html code.shiki .stSJJ{--shiki-light:#6F42C1;--shiki-default:#6F42C1;--shiki-dark:#5DA994}html pre.shiki code .sC822, html code.shiki .sC822{--shiki-light:#24292E;--shiki-default:#24292E;--shiki-dark:#B8A965}html pre.shiki code .sZNs6, html code.shiki .sZNs6{--shiki-light:#E36209;--shiki-default:#E36209;--shiki-dark:#BD976A}",{"title":112,"searchDepth":131,"depth":131,"links":731},[732,733,734,735,736],{"id":104,"depth":131,"text":105},{"id":313,"depth":131,"text":314},{"id":526,"depth":131,"text":527},{"id":564,"depth":131,"text":565},{"id":698,"depth":131,"text":699},"A manifest of ten keys and ten lazy imports. Keys and aliases answer at once. Records load on the first lookup for their collection. How to register yours.","md",null,{"icon":741},"i-lucide-list-tree",{"title":16,"description":737},"M_vi1jjxiRN-1WBq9lnTy8wo1Vt3FtVLWTqBQ6pFoVM",[745,747],{"title":12,"path":13,"stem":14,"description":746,"children":-1},"One PuzzleSpec literal per puzzle handed to a factory for its chain. Builders for addresses and keys and transactions. Absent means absent and never null.",{"title":20,"path":21,"stem":22,"description":748,"children":-1},"get and requirePuzzle by identifier. selectPuzzles by collection and status. stats and the dataset snapshot with its deterministic data version.",1789734790029]