@latticexyz/common@2.0.0-next.3
Pre-releaseMinor Changes
-
#1311
331f0d63
Thanks @alvrs! - Deprecate@latticexyz/std-client
and remove v1 network dependencies.-
getBurnerWallet
is replaced bygetBurnerPrivateKey
from@latticexyz/common
. It now returns aHex
string instead of anrxjs
BehaviorSubject
.- import { getBurnerWallet } from "@latticexyz/std-client"; + import { getBurnerPrivateKey } from "@latticexyz/common"; - const privateKey = getBurnerWallet().value; - const privateKey = getBurnerPrivateKey();
-
All functions from
std-client
that depended on v1 network code are removed (most notablysetupMUDNetwork
andsetupMUDV2Network
). Consumers should upgrade to v2 networking code from@latticexyz/store-sync
. -
The following functions are removed from
std-client
because they are very use-case specific and depend on deprecated code:getCurrentTurn
,getTurnAtTime
,getGameConfig
,isUntraversable
,getPlayerEntity
,resolveRelationshipChain
,findEntityWithComponentInRelationshipChain
,findInRelationshipChain
. Consumers should vendor these functions if they are still needed. -
Remaining exports from
std-client
are moved to/deprecated
. The package will be removed in a future release (once there are replacements for the deprecated exports).- import { ... } from "@latticexyz/std-client"; + import { ... } from "@latticexyz/std-client/deprecated";
-
Patch Changes
-
#1315
bb6ada74
Thanks @holic! - Initial sync from indexer no longer blocks the promise returning fromcreateStoreSync
,syncToRecs
, andsyncToSqlite
. This should help with rendering loading screens using theSyncProgress
RECS component and avoid the long flashes of no content in templates.By default,
syncToRecs
andsyncToSqlite
will start syncing (via observable subscription) immediately after called.If your app needs to control when syncing starts, you can use the
startSync: false
option and thenblockStoreOperations$.subscribe()
to start the sync yourself. Just be sure to unsubscribe to avoid memory leaks.const { blockStorageOperations$ } = syncToRecs({ ... startSync: false, }); // start sync manually by subscribing to `blockStorageOperation# Change Log const subcription = blockStorageOperation$.subscribe(); // clean up subscription subscription.unsubscribe();
-
Updated dependencies []:
- @latticexyz/schema-type@2.0.0-next.3