diff --git a/client/package.json b/client/package.json index e81b9c38c..9f8810e0e 100644 --- a/client/package.json +++ b/client/package.json @@ -19,14 +19,14 @@ "@bibliothecadao/eternum": "workspace:^", "@cartridge/connector": "0.5.5", "@cartridge/controller": "0.5.5", - "@dojoengine/core": "1.0.3-alpha.2", - "@dojoengine/create-burner": "1.0.3-alpha.2", - "@dojoengine/react": "1.0.3-alpha.2", + "@dojoengine/core": "1.0.4-alpha.3.1.0", + "@dojoengine/create-burner": "1.0.4-alpha.3.1.0", + "@dojoengine/react": "1.0.4-alpha.3.1.0", "@dojoengine/recs": "^2.0.13", - "@dojoengine/state": "1.0.3-alpha.2", - "@dojoengine/torii-client": "1.0.3-alpha.2", - "@dojoengine/torii-wasm": "1.0.3-alpha.2", - "@dojoengine/utils": "1.0.3-alpha.2", + "@dojoengine/state": "1.0.4-alpha.3.1.0", + "@dojoengine/torii-client": "1.0.4-alpha.3.1.0", + "@dojoengine/torii-wasm": "1.0.4-alpha.3.1.0", + "@dojoengine/utils": "1.0.4-alpha.3.1.0", "@headlessui/react": "^1.7.18", "@latticexyz/utils": "^2.0.0-next.12", "@radix-ui/react-collapsible": "^1.1.1", diff --git a/client/src/dojo/queries.ts b/client/src/dojo/queries.ts index 5d3e3a50f..2657e67a0 100644 --- a/client/src/dojo/queries.ts +++ b/client/src/dojo/queries.ts @@ -1,41 +1,83 @@ // onload -> fetch single key entities import { Component, Metadata, Schema } from "@dojoengine/recs"; -import { setEntities } from "@dojoengine/state"; -import { Clause, PatternMatching, ToriiClient } from "@dojoengine/torii-client"; +import { getEntities } from "@dojoengine/state"; +import { PatternMatching, ToriiClient } from "@dojoengine/torii-client"; // on hexception -> fetch below queries based on entityID // background sync after load -> -export const getEntities = async ( +export const syncPosition = async ( client: ToriiClient, - clause: Clause | undefined, components: Component[], - limit: number = 100, - logging: boolean = false, + entityID: string, ) => { - if (logging) console.log("Starting getEntities"); - let offset = 0; - let continueFetching = true; - - while (continueFetching) { - const entities = await client.getEntities({ - limit, - offset, - clause, - dont_include_hashed_keys: false, - order_by: [], - }); - - setEntities(entities, components); + await getEntities( + client, + { + Keys: { + keys: [entityID], + pattern_matching: "FixedLen" as PatternMatching, + models: ["s0_eternum-Position"], + }, + }, + components, + [], + [], + 30_000, + ); +}; +export const syncBuildingQty = async ( + client: ToriiClient, + components: Component[], + entityID: string, +) => { + await getEntities( + client, + { + Keys: { + keys: [entityID, undefined], + pattern_matching: "FixedLen" as PatternMatching, + models: ["s0_eternum-BuildingQuantityv2"], + }, + }, + components, + [], + [], + 30_000, + ); +}; - if (Object.keys(entities).length < limit) { - continueFetching = false; - } else { - offset += limit; - } - } +export const addToSubscriptionBuildingQty = async ( + client: ToriiClient, + components: Component[], + entityID: string[], +) => { + const start = performance.now(); + await getEntities( + client, + { + Composite: { + operator: "Or", + clauses: [ + ...entityID.map((id) => ({ + Keys: { + keys: [id, undefined], + pattern_matching: "VariableLen" as PatternMatching, + models: ["s0_eternum-BuildingQuantityv2"], + }, + })), + ], + }, + }, + components, + [], + [], + 30_000, + ); + const end = performance.now(); + console.log("AddToSubscription Building qty", end - start); }; export const addToSubscription = async ( @@ -44,6 +86,7 @@ export const addToSubscription = async ( entityID: string[], position?: { x: number; y: number }[], ) => { + const start = performance.now(); await getEntities( client, { @@ -69,16 +112,20 @@ export const addToSubscription = async ( ], }, }, - components, + components as any, + [], + [], 30_000, - false, ); + const end = performance.now(); + console.log("AddToSubscriptionEnd", end - start); }; export const addMarketSubscription = async ( client: ToriiClient, components: Component[], ) => { + const start = performance.now(); await getEntities( client, { @@ -89,7 +136,11 @@ export const addMarketSubscription = async ( }, }, components, + [], + [], 30_000, false, ); + const end = performance.now(); + console.log("MarketEnd", end - start); }; diff --git a/client/src/dojo/setup.ts b/client/src/dojo/setup.ts index 27c5d6767..469b145e4 100644 --- a/client/src/dojo/setup.ts +++ b/client/src/dojo/setup.ts @@ -30,7 +30,7 @@ export const syncEntitiesDebounced = async ( const debouncedSetEntities = debounce(() => { if (Object.keys(entityBatch).length > 0) { - console.log("Applying batch update", entityBatch); + // console.log("Applying batch update", entityBatch); setEntities(entityBatch, components, logging); entityBatch = {}; // Clear the batch after applying } @@ -79,7 +79,7 @@ export async function setup({ ...config }: DojoConfig) { const configClauses: Clause[] = [ { Keys: { - keys: [WORLD_CONFIG_ID.toString(), undefined, undefined], + keys: [WORLD_CONFIG_ID.toString()], pattern_matching: "FixedLen", models: [], }, @@ -91,6 +91,13 @@ export async function setup({ ...config }: DojoConfig) { models: [], }, }, + { + Keys: { + keys: [WORLD_CONFIG_ID.toString(), undefined, undefined], + pattern_matching: "FixedLen", + models: [], + }, + }, { Keys: { keys: [BUILDING_CATEGORY_POPULATION_CONFIG_ID.toString(), undefined], @@ -107,34 +114,74 @@ export async function setup({ ...config }: DojoConfig) { }, ]; + const CompositeStart = performance.now(); await getEntities( network.toriiClient, { Composite: { operator: "Or", clauses: configClauses } }, network.contractComponents as any, ); + const CompositeEnd = performance.now(); // fetch all existing entities from torii + const SingleKeyStart = performance.now(); await getEntities( network.toriiClient, { Keys: { keys: [undefined], pattern_matching: "FixedLen", - models: [], + models: [ + "s0_eternum-AddressName", + "s0_eternum-Realm", + "s0_eternum-PopulationConfig", + "s0_eternum-CapacityConfig", + "s0_eternum-ProductionConfig", + "s0_eternum-RealmLevelConfig", + "s0_eternum-BankConfig", + "s0_eternum-Bank", + "s0_eternum-Trade", + "s0_eternum-Army", + // Probably load this w/ market + ], + }, + }, + network.contractComponents as any, + [], + [], + 40_000, + false, + ); + const SingleKeyEnd = performance.now(); + + const DoubleKeyStart = performance.now(); + await getEntities( + network.toriiClient, + { + Keys: { + keys: [undefined, undefined], + pattern_matching: "FixedLen", + models: ["s0_eternum-CapacityConfigCategory", "s0_eternum-ResourceCost"], }, }, network.contractComponents as any, + [], + [], 40_000, false, ); + const DoubleKeyEnd = performance.now(); + const SyncStart = performance.now(); const sync = await syncEntitiesDebounced(network.toriiClient, network.contractComponents as any, [], false); + const SyncEnd = performance.now(); configManager.setDojo(components); const eventSync = getEvents( network.toriiClient, network.contractComponents.events as any, + [], + [], 20000, { Keys: { @@ -151,7 +198,6 @@ export async function setup({ ...config }: DojoConfig) { "s0_eternum-SwapEvent", "s0_eternum-LiquidityEvent", "s0_eternum-HyperstructureContribution", - "s0_eternum-MapExplored", ], }, }, @@ -159,6 +205,11 @@ export async function setup({ ...config }: DojoConfig) { false, ); + console.log("CompositeEnd", CompositeEnd - CompositeStart); + console.log("SyncEnd", SyncEnd - SyncStart); + console.log("SingleKeyEnd", SingleKeyEnd - SingleKeyStart); + console.log("DoubleKeyEnd", DoubleKeyEnd - DoubleKeyStart); + return { network, components, diff --git a/client/src/main.tsx b/client/src/main.tsx index f756ca640..4d97dc4ce 100644 --- a/client/src/main.tsx +++ b/client/src/main.tsx @@ -62,7 +62,10 @@ async function init() { root.render(); + const setupStart = performance.now(); const setupResult = await setup(dojoConfig); + const setupEnd = performance.now(); + console.log("SetupEnd", setupEnd - setupStart); const graphic = new GameRenderer(setupResult); diff --git a/client/src/three/scenes/Worldmap.ts b/client/src/three/scenes/Worldmap.ts index 3a3c7b6c2..7bb807b4f 100644 --- a/client/src/three/scenes/Worldmap.ts +++ b/client/src/three/scenes/Worldmap.ts @@ -676,8 +676,6 @@ export default class WorldmapScene extends HexagonScene { // Create a unique key for this chunk range const chunkKey = `${startCol - range},${startCol + range},${startRow - range},${startRow + range}`; - console.log(chunkKey); - // Skip if we've already fetched this chunk if (this.fetchedChunks.has(chunkKey)) { console.log("Already fetched"); @@ -686,9 +684,10 @@ export default class WorldmapScene extends HexagonScene { // Add to fetched chunks before the query to prevent concurrent duplicate requests this.fetchedChunks.add(chunkKey); + console.log(startCol, startRow, range); try { - await getEntities( + const promiseTiles = getEntities( this.dojo.network.toriiClient, { Composite: { @@ -730,9 +729,68 @@ export default class WorldmapScene extends HexagonScene { }, }, this.dojo.network.contractComponents as any, + [], + ["s0_eternum-Tile"], 1000, false, ); + const promisePositions = getEntities( + this.dojo.network.toriiClient, + { + Composite: { + operator: "And", + clauses: [ + { + Composite: { + operator: "And", + clauses: [ + { + Member: { + model: "s0_eternum-Position", + member: "x", + operator: "Gte", + value: { Primitive: { U32: startCol - range } }, + }, + }, + { + Member: { + model: "s0_eternum-Position", + member: "x", + operator: "Lte", + value: { Primitive: { U32: startCol + range } }, + }, + }, + { + Member: { + model: "s0_eternum-Position", + member: "y", + operator: "Gte", + value: { Primitive: { U32: startRow - range } }, + }, + }, + { + Member: { + model: "s0_eternum-Position", + member: "y", + operator: "Lte", + value: { Primitive: { U32: startRow + range } }, + }, + }, + ], + }, + }, + ], + }, + }, + this.dojo.network.contractComponents as any, + [], + ["s0_eternum-Tile"], + 1000, + false, + ); + Promise.all([promiseTiles, promisePositions]).then(([tiles, positions]) => { + console.log(tiles, positions); + }); } catch (error) { // If there's an error, remove the chunk from cached set so it can be retried this.fetchedChunks.delete(chunkKey); diff --git a/client/src/ui/layouts/World.tsx b/client/src/ui/layouts/World.tsx index 129cd5083..3511530e0 100644 --- a/client/src/ui/layouts/World.tsx +++ b/client/src/ui/layouts/World.tsx @@ -3,19 +3,20 @@ import { lazy, Suspense, useEffect, useMemo, useState } from "react"; import { Redirect } from "wouter"; import useUIStore from "../../hooks/store/useUIStore"; -import { addMarketSubscription, addToSubscription } from "@/dojo/queries"; +import { addMarketSubscription, addToSubscription, addToSubscriptionBuildingQty, syncBuildingQty } from "@/dojo/queries"; import { useDojo } from "@/hooks/context/DojoContext"; import { PlayerStructure, useEntities } from "@/hooks/helpers/useEntities"; import { useStructureEntityId } from "@/hooks/helpers/useStructureEntityId"; import { useFetchBlockchainData } from "@/hooks/store/useBlockchainStore"; import { useWorldStore } from "@/hooks/store/useWorldLoading"; -import { ADMIN_BANK_ENTITY_ID } from "@bibliothecadao/eternum"; +import { ADMIN_BANK_ENTITY_ID, BuildingType } from "@bibliothecadao/eternum"; import { getComponentValue } from "@dojoengine/recs"; import { getEntityIdFromKeys } from "@dojoengine/utils"; import { env } from "../../../env"; import { IS_MOBILE } from "../config"; import { LoadingOroborus } from "../modules/loading-oroborus"; import { LoadingScreen } from "../modules/LoadingScreen"; +import { useBuildings } from "@/hooks/helpers/use-buildings"; // Lazy load components const SelectedArmy = lazy(() => @@ -116,6 +117,12 @@ export const World = ({ backgroundImage }: { backgroundImage: string }) => { [structures, subscriptions], ); + // const { getBuildings } = useBuildings(); + // filteredStructures.forEach((structure) => { + // console.log("Buildings", getBuildings(structure.position.x, structure.position.y)); + // }); + + // console.log("FilteredStructures", filteredStructures); useEffect(() => { if ( !structureEntityId || @@ -126,6 +133,13 @@ export const World = ({ backgroundImage }: { backgroundImage: string }) => { return; } + // syncBuildingQty(dojo.network.toriiClient, dojo.network.contractComponents as any, structureEntityId.toString()); + // filteredStructures.forEach((structure) => { + // syncBuildingQty(dojo.network.toriiClient, dojo.network.contractComponents as any, structure.entity_id.toString()); + // }); + + + const position = getComponentValue( dojo.setup.components.Position, getEntityIdFromKeys([BigInt(structureEntityId)]), @@ -141,7 +155,13 @@ export const World = ({ backgroundImage }: { backgroundImage: string }) => { const fetch = async () => { try { + const start = performance.now(); await Promise.all([ + addToSubscriptionBuildingQty( + dojo.network.toriiClient, + dojo.network.contractComponents as any, + [...filteredStructures.map((structure) => structure.entity_id.toString())], + ), addToSubscription( dojo.network.toriiClient, dojo.network.contractComponents as any, @@ -159,11 +179,14 @@ export const World = ({ backgroundImage }: { backgroundImage: string }) => { ), addMarketSubscription(dojo.network.toriiClient, dojo.network.contractComponents as any), ]); + const end = performance.now(); + console.log("FetchEnd", end - start); } catch (error) { console.error("Fetch failed", error); } finally { setWorldLoading(false); setMarketLoading(false); + console.log("Done fetching") } }; diff --git a/client/src/ui/modules/world-structures/WorldStructuresMenu.tsx b/client/src/ui/modules/world-structures/WorldStructuresMenu.tsx index db712e55f..830290638 100644 --- a/client/src/ui/modules/world-structures/WorldStructuresMenu.tsx +++ b/client/src/ui/modules/world-structures/WorldStructuresMenu.tsx @@ -374,6 +374,8 @@ const fetchHyperstructureData = async (client: ToriiClient, components: Componen }, }, components as any, + [], + [], 40_000, false, ); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 53e3a5c7c..6c891eee0 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -137,29 +137,29 @@ importers: specifier: 0.5.5 version: 0.5.5(encoding@0.1.13) '@dojoengine/core': - specifier: 1.0.3-alpha.2 - version: 1.0.3-alpha.2(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2) + specifier: 1.0.4-alpha.3.1.0 + version: 1.0.4-alpha.3.1.0(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2) '@dojoengine/create-burner': - specifier: 1.0.3-alpha.2 - version: 1.0.3-alpha.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2) + specifier: 1.0.4-alpha.3.1.0 + version: 1.0.4-alpha.3.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2) '@dojoengine/react': - specifier: 1.0.3-alpha.2 - version: 1.0.3-alpha.2(@types/node@20.17.10)(@types/react@18.3.16)(@vitest/ui@2.1.8(vitest@2.1.8))(jsdom@24.1.3)(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(type-fest@2.19.0)(typescript@5.7.2)(zod@3.24.1) + specifier: 1.0.4-alpha.3.1.0 + version: 1.0.4-alpha.3.1.0(@types/node@20.17.10)(@types/react@18.3.16)(@vitest/ui@2.1.8)(jsdom@24.1.3)(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(type-fest@2.19.0)(typescript@5.7.2)(zod@3.24.1) '@dojoengine/recs': specifier: ^2.0.13 version: 2.0.13(typescript@5.7.2)(zod@3.24.1) '@dojoengine/state': - specifier: 1.0.3-alpha.2 - version: 1.0.3-alpha.2(@types/node@20.17.10)(@vitest/ui@2.1.8(vitest@2.1.8))(jsdom@24.1.3)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(typescript@5.7.2)(zod@3.24.1) + specifier: 1.0.4-alpha.3.1.0 + version: 1.0.4-alpha.3.1.0(@types/node@20.17.10)(@vitest/ui@2.1.8)(jsdom@24.1.3)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(typescript@5.7.2)(zod@3.24.1) '@dojoengine/torii-client': - specifier: 1.0.3-alpha.2 - version: 1.0.3-alpha.2 + specifier: 1.0.4-alpha.3.1.0 + version: 1.0.4-alpha.3.1.0 '@dojoengine/torii-wasm': - specifier: 1.0.3-alpha.2 - version: 1.0.3-alpha.2 + specifier: 1.0.4-alpha.3.1.0 + version: 1.0.4-alpha.3.1.0 '@dojoengine/utils': - specifier: 1.0.3-alpha.2 - version: 1.0.3-alpha.2(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2)(zod@3.24.1) + specifier: 1.0.4-alpha.3.1.0 + version: 1.0.4-alpha.3.1.0(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2)(zod@3.24.1) '@headlessui/react': specifier: ^1.7.18 version: 1.7.19(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -285,7 +285,7 @@ importers: version: 0.20.5(@vite-pwa/assets-generator@0.2.6)(vite@5.4.11(@types/node@20.17.10)(terser@5.37.0))(workbox-build@7.3.0(@types/babel__core@7.20.5))(workbox-window@7.3.0) vitest-canvas-mock: specifier: ^0.3.3 - version: 0.3.3(vitest@2.1.8(@types/node@20.17.10)(@vitest/ui@2.1.8)(jsdom@24.1.3)(terser@5.37.0)) + version: 0.3.3(vitest@2.1.8) wouter: specifier: ^2.12.1 version: 2.12.1(react@18.3.1) @@ -325,7 +325,7 @@ importers: version: 4.3.4(vite@5.4.11(@types/node@20.17.10)(terser@5.37.0)) '@vitest/coverage-v8': specifier: ^2.0.5 - version: 2.1.8(vitest@2.1.8(@types/node@20.17.10)(@vitest/ui@2.1.8)(jsdom@24.1.3)(terser@5.37.0)) + version: 2.1.8(vitest@2.1.8) '@vitest/ui': specifier: ^2.0.1 version: 2.1.8(vitest@2.1.8) @@ -437,13 +437,13 @@ importers: version: 1.0.3-alpha.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2) '@dojoengine/react': specifier: 1.0.3-alpha.2 - version: 1.0.3-alpha.2(@types/node@20.17.10)(@types/react@18.3.16)(@vitest/ui@2.1.8(vitest@2.1.8))(jsdom@24.1.3)(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(type-fest@2.19.0)(typescript@5.7.2)(zod@3.24.1) + version: 1.0.3-alpha.2(@types/node@20.17.10)(@types/react@18.3.16)(jsdom@24.1.3)(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(type-fest@2.19.0)(typescript@5.7.2)(zod@3.24.1) '@dojoengine/recs': specifier: ^2.0.13 version: 2.0.13(typescript@5.7.2)(zod@3.24.1) '@dojoengine/state': specifier: 1.0.3-alpha.2 - version: 1.0.3-alpha.2(@types/node@20.17.10)(@vitest/ui@2.1.8(vitest@2.1.8))(jsdom@24.1.3)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(typescript@5.7.2)(zod@3.24.1) + version: 1.0.3-alpha.2(@types/node@20.17.10)(jsdom@24.1.3)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(typescript@5.7.2)(zod@3.24.1) '@dojoengine/torii-client': specifier: 1.0.3-alpha.2 version: 1.0.3-alpha.2 @@ -1502,6 +1502,12 @@ packages: peerDependencies: starknet: 6.11.0 + '@dojoengine/core@1.0.4-alpha.3.1.0': + resolution: {integrity: sha512-tUlM0xT5ZDVtjM8gETDVl5pdmbGyVtXDZ+O1JOslMT/eyO425UiFH9Ovsc20HFH+Bg8X4RfAxSkuLSmR453HZQ==} + hasBin: true + peerDependencies: + starknet: 6.11.0 + '@dojoengine/create-burner@1.0.3-alpha.2': resolution: {integrity: sha512-vZnH8tVRp+ZY6Fl1ql+proYbxbf22RNXngfdE/pAgnQG2qS/0lDsoP2O7N4h+LJDKyVGjHxY01+JPhDU6kMzeA==} peerDependencies: @@ -1509,6 +1515,13 @@ packages: react-dom: ^18.2.0 starknet: 6.11.0 + '@dojoengine/create-burner@1.0.4-alpha.3.1.0': + resolution: {integrity: sha512-8oU8KOxBoD2v5gdrXVztCC6pA4Mvi8N3Ocjlt7vTqBSiwaxJljX7oW8pQ7JDaSBFSqmSr89erJHGzsQA/CpZlg==} + peerDependencies: + react: ^18.2.0 + react-dom: ^18.2.0 + starknet: 6.11.0 + '@dojoengine/react@1.0.3-alpha.2': resolution: {integrity: sha512-Fj0jKXqsFB3c8crNngwlfjtqIB1NwISf9pQkrzjzSAlkC171NjPyIxA5qbXCfhVYs7XYGi3Ka26piJj3r0yPhA==} peerDependencies: @@ -1516,6 +1529,13 @@ packages: starknet: 6.11.0 type-fest: ^2.14.0 + '@dojoengine/react@1.0.4-alpha.3.1.0': + resolution: {integrity: sha512-Ll9saYr/6HJNO1YrBtMealjYvT05UBKT4kCONw5EVxjz+HqHdCU7UqnfmmBPTKs8RTSAP1LeRKnfS7QY84DH5w==} + peerDependencies: + react: ^18.2.0 + starknet: 6.11.0 + type-fest: ^2.14.0 + '@dojoengine/recs@2.0.13': resolution: {integrity: sha512-Cgz4Unlnk2FSDoFTYKrJexX/KiSYPMFMxftxQkC+9LUKS5yNGkgFQM7xu4/L1HvpDAenL7NjUmH6ynRAS7Iifw==} @@ -1524,17 +1544,33 @@ packages: peerDependencies: starknet: 6.11.0 + '@dojoengine/state@1.0.4-alpha.3.1.0': + resolution: {integrity: sha512-nTKYX09ffpKvXvq2wJA3kNVLc0ZUkvkCg1ha7cajVaauhvSQAXRl1cPQQSf3rGzhqz4EwHpXNn3nGry2qsXdaQ==} + peerDependencies: + starknet: 6.11.0 + '@dojoengine/torii-client@1.0.3-alpha.2': resolution: {integrity: sha512-wJxixfj33CNnKEIOKTwI4tgNPDZq/3uiBh9qCz+buDiCjkWvbAiUlwwLUZj9a9PFG+TAQWB6SpjWzFwOwNpejA==} + '@dojoengine/torii-client@1.0.4-alpha.3.1.0': + resolution: {integrity: sha512-fW8MmcagcqI0BTxkIxmrUw+hBQ7NdoNvhg9FrW2st38jfGMz0txdWdhKXOiUTkpaNXW/C4PeKe9sa9wVn7Bp5g==} + '@dojoengine/torii-wasm@1.0.3-alpha.2': resolution: {integrity: sha512-9eQc4eTV53+DNtnrMRTddTYA1kG4285OF1qNOUrAZJstLPNcLzIboJtejVcXA6v5Kb+vkI70ypdp2A+QprEDdw==} + '@dojoengine/torii-wasm@1.0.4-alpha.3.1.0': + resolution: {integrity: sha512-17dB5tD+DS1gAUnWCAXKpKo2+FNc6Q06wBgrGHCzKAC+6qWdXCuHqlx1IZjiZbUNm/3kB1VoYO55G46vjsozTQ==} + '@dojoengine/utils@1.0.3-alpha.2': resolution: {integrity: sha512-NulEGvwArNhaSF9dkq5zuK/dWPu+Ri6NyMJcPsy2v0/6voP2ecQ0SKNMPDlBqX7GNC5Rrpr+mY9q1StYHtprNA==} peerDependencies: starknet: 6.11.0 + '@dojoengine/utils@1.0.4-alpha.3.1.0': + resolution: {integrity: sha512-CnudTUoFK7UyNEDuMZ6kHtw+jbx/k/9YZzC/+QgHs2Wm/FW0K3oo+nQMlijE2f/OIFeQYph+g8y1HpUWtevapw==} + peerDependencies: + starknet: 6.11.0 + '@emotion/hash@0.9.2': resolution: {integrity: sha512-MyqliTZGuOm3+5ZRSaaBGP3USLw6+EGykkwZns2EPC5g8jJ4z9OrdZY9apkl3+UP9+sdz76YYkwCKP5gh8iY3g==} @@ -10668,6 +10704,16 @@ snapshots: - typescript - utf-8-validate + '@dojoengine/core@1.0.4-alpha.3.1.0(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2)': + dependencies: + '@dojoengine/recs': 2.0.13(typescript@5.7.2)(zod@3.24.1) + starknet: 6.11.0(encoding@0.1.13) + zod: 3.24.1 + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + '@dojoengine/create-burner@1.0.3-alpha.2(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2)': dependencies: '@dojoengine/core': 1.0.3-alpha.2(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2) @@ -10684,10 +10730,26 @@ snapshots: - typescript - utf-8-validate - '@dojoengine/react@1.0.3-alpha.2(@types/node@20.17.10)(@types/react@18.3.16)(@vitest/ui@2.1.8(vitest@2.1.8))(jsdom@24.1.3)(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(type-fest@2.19.0)(typescript@5.7.2)(zod@3.24.1)': + '@dojoengine/create-burner@1.0.4-alpha.3.1.0(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2)': + dependencies: + '@dojoengine/core': 1.0.4-alpha.3.1.0(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2) + '@scure/bip32': 1.6.0 + '@starknet-react/core': 2.3.0(get-starknet-core@3.3.4(starknet@6.11.0(encoding@0.1.13)))(react@18.3.1)(starknet@6.11.0(encoding@0.1.13)) + encoding: 0.1.13 + get-starknet-core: 3.3.4(starknet@6.11.0(encoding@0.1.13)) + js-cookie: 3.0.5 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + starknet: 6.11.0(encoding@0.1.13) + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + + '@dojoengine/react@1.0.3-alpha.2(@types/node@20.17.10)(@types/react@18.3.16)(jsdom@24.1.3)(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(type-fest@2.19.0)(typescript@5.7.2)(zod@3.24.1)': dependencies: '@dojoengine/recs': 2.0.13(typescript@5.7.2)(zod@3.24.1) - '@dojoengine/state': 1.0.3-alpha.2(@types/node@20.17.10)(@vitest/ui@2.1.8(vitest@2.1.8))(jsdom@24.1.3)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(typescript@5.7.2)(zod@3.24.1) + '@dojoengine/state': 1.0.3-alpha.2(@types/node@20.17.10)(jsdom@24.1.3)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(typescript@5.7.2)(zod@3.24.1) '@dojoengine/torii-client': 1.0.3-alpha.2 '@dojoengine/utils': 1.0.3-alpha.2(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2)(zod@3.24.1) '@latticexyz/utils': 2.2.14 @@ -10722,6 +10784,44 @@ snapshots: - utf-8-validate - zod + '@dojoengine/react@1.0.4-alpha.3.1.0(@types/node@20.17.10)(@types/react@18.3.16)(@vitest/ui@2.1.8)(jsdom@24.1.3)(react@18.3.1)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(type-fest@2.19.0)(typescript@5.7.2)(zod@3.24.1)': + dependencies: + '@dojoengine/recs': 2.0.13(typescript@5.7.2)(zod@3.24.1) + '@dojoengine/state': 1.0.4-alpha.3.1.0(@types/node@20.17.10)(@vitest/ui@2.1.8)(jsdom@24.1.3)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(typescript@5.7.2)(zod@3.24.1) + '@dojoengine/torii-client': 1.0.4-alpha.3.1.0 + '@dojoengine/utils': 1.0.4-alpha.3.1.0(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2)(zod@3.24.1) + '@latticexyz/utils': 2.2.14 + encoding: 0.1.13 + fast-deep-equal: 3.1.3 + get-starknet-core: 3.3.4(starknet@6.11.0(encoding@0.1.13)) + js-cookie: 3.0.5 + react: 18.3.1 + rxjs: 7.5.5 + starknet: 6.11.0(encoding@0.1.13) + type-fest: 2.19.0 + zustand: 4.5.5(@types/react@18.3.16)(react@18.3.1) + transitivePeerDependencies: + - '@edge-runtime/vm' + - '@types/node' + - '@types/react' + - '@vitest/browser' + - '@vitest/ui' + - bufferutil + - happy-dom + - immer + - jsdom + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - typescript + - utf-8-validate + - zod + '@dojoengine/recs@2.0.13(typescript@5.4.4)(zod@3.24.1)': dependencies: '@latticexyz/schema-type': 2.0.12(typescript@5.4.4)(zod@3.24.1) @@ -10746,12 +10846,38 @@ snapshots: - utf-8-validate - zod - '@dojoengine/state@1.0.3-alpha.2(@types/node@20.17.10)(@vitest/ui@2.1.8(vitest@2.1.8))(jsdom@24.1.3)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(typescript@5.7.2)(zod@3.24.1)': + '@dojoengine/state@1.0.3-alpha.2(@types/node@20.17.10)(jsdom@24.1.3)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(typescript@5.7.2)(zod@3.24.1)': dependencies: '@dojoengine/recs': 2.0.13(typescript@5.7.2)(zod@3.24.1) '@dojoengine/torii-client': 1.0.3-alpha.2 starknet: 6.11.0(encoding@0.1.13) - vitest: 1.6.0(@types/node@20.17.10)(@vitest/ui@2.1.8(vitest@2.1.8))(jsdom@24.1.3)(terser@5.37.0) + vitest: 1.6.0(@types/node@20.17.10)(@vitest/ui@2.1.8)(jsdom@24.1.3)(terser@5.37.0) + transitivePeerDependencies: + - '@edge-runtime/vm' + - '@types/node' + - '@vitest/browser' + - '@vitest/ui' + - bufferutil + - happy-dom + - jsdom + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + - typescript + - utf-8-validate + - zod + + '@dojoengine/state@1.0.4-alpha.3.1.0(@types/node@20.17.10)(@vitest/ui@2.1.8)(jsdom@24.1.3)(starknet@6.11.0(encoding@0.1.13))(terser@5.37.0)(typescript@5.7.2)(zod@3.24.1)': + dependencies: + '@dojoengine/recs': 2.0.13(typescript@5.7.2)(zod@3.24.1) + '@dojoengine/torii-client': 1.0.4-alpha.3.1.0 + starknet: 6.11.0(encoding@0.1.13) + vitest: 1.6.0(@types/node@20.17.10)(@vitest/ui@2.1.8)(jsdom@24.1.3)(terser@5.37.0) transitivePeerDependencies: - '@edge-runtime/vm' - '@types/node' @@ -10776,8 +10902,14 @@ snapshots: dependencies: '@dojoengine/torii-wasm': 1.0.3-alpha.2 + '@dojoengine/torii-client@1.0.4-alpha.3.1.0': + dependencies: + '@dojoengine/torii-wasm': 1.0.4-alpha.3.1.0 + '@dojoengine/torii-wasm@1.0.3-alpha.2': {} + '@dojoengine/torii-wasm@1.0.4-alpha.3.1.0': {} + '@dojoengine/utils@1.0.3-alpha.2(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2)(zod@3.24.1)': dependencies: '@dojoengine/recs': 2.0.13(typescript@5.7.2)(zod@3.24.1) @@ -10791,6 +10923,19 @@ snapshots: - utf-8-validate - zod + '@dojoengine/utils@1.0.4-alpha.3.1.0(starknet@6.11.0(encoding@0.1.13))(typescript@5.7.2)(zod@3.24.1)': + dependencies: + '@dojoengine/recs': 2.0.13(typescript@5.7.2)(zod@3.24.1) + '@latticexyz/utils': 2.2.14 + mathjs: 12.4.3 + micro-starknet: 0.2.3 + starknet: 6.11.0(encoding@0.1.13) + transitivePeerDependencies: + - bufferutil + - typescript + - utf-8-validate + - zod + '@emotion/hash@0.9.2': {} '@esbuild/aix-ppc64@0.19.12': @@ -14170,7 +14315,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@vitest/coverage-v8@2.1.8(vitest@2.1.8(@types/node@20.17.10)(@vitest/ui@2.1.8)(jsdom@24.1.3)(terser@5.37.0))': + '@vitest/coverage-v8@2.1.8(vitest@2.1.8)': dependencies: '@ampproject/remapping': 2.3.0 '@bcoe/v8-coverage': 0.2.3 @@ -19952,12 +20097,12 @@ snapshots: tsx: 4.19.2 yaml: 2.6.1 - vitest-canvas-mock@0.3.3(vitest@2.1.8(@types/node@20.17.10)(@vitest/ui@2.1.8)(jsdom@24.1.3)(terser@5.37.0)): + vitest-canvas-mock@0.3.3(vitest@2.1.8): dependencies: jest-canvas-mock: 2.5.2 vitest: 2.1.8(@types/node@20.17.10)(@vitest/ui@2.1.8)(jsdom@24.1.3)(terser@5.37.0) - vitest@1.6.0(@types/node@20.17.10)(@vitest/ui@2.1.8(vitest@2.1.8))(jsdom@24.1.3)(terser@5.37.0): + vitest@1.6.0(@types/node@20.17.10)(@vitest/ui@2.1.8)(jsdom@24.1.3)(terser@5.37.0): dependencies: '@vitest/expect': 1.6.0 '@vitest/runner': 1.6.0