Skip to content

@latticexyz/common@2.0.0-next.3

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 21 Aug 11:48
· 1165 commits to main since this release
b04639b

Minor Changes

  • #1311 331f0d63 Thanks @alvrs! - Deprecate @latticexyz/std-client and remove v1 network dependencies.

    • getBurnerWallet is replaced by getBurnerPrivateKey from @latticexyz/common. It now returns a Hex string instead of an rxjs 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 notably setupMUDNetwork and setupMUDV2Network). 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 from createStoreSync, syncToRecs, and syncToSqlite. This should help with rendering loading screens using the SyncProgress RECS component and avoid the long flashes of no content in templates.

    By default, syncToRecs and syncToSqlite 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 then blockStoreOperations$.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