#
@latticexyz/std-client
#
Enumerations
#
Type Aliases
#
ActionSystem
Ƭ ActionSystem: ReturnType
<typeof createActionSystem
#
Defined in
std-client/src/systems/ActionSystem/createActionSystem.ts:23
#
ContractComponent
Ƭ ContractComponent: Component
<Schema
, { contractId
: string
; tableId?
: string
}>
#
Defined in
std-client/src/setup/types.ts:29
#
ContractComponents
Ƭ ContractComponents: Object
#
Index signature
▪ [key: string
]: ContractComponent
#
Defined in
std-client/src/setup/types.ts:31
#
DecodedNetworkComponentUpdate
Ƭ DecodedNetworkComponentUpdate: Omit
<Omit
<NetworkComponentUpdate
, "entity"
>, "component"
> & { component
: Component
<Schema
> ; entity
: EntityIndex
}
#
Defined in
std-client/src/setup/types.ts:15
#
DecodedSystemCall
Ƭ DecodedSystemCall<T
, C
>: Omit
<SystemCall
<C
>, "updates"
> & { args
: Record
<string
, unknown
> ; systemId
: keyof T
; updates
: DecodedNetworkComponentUpdate
#
Type parameters
#
Defined in
std-client/src/setup/types.ts:20
#
NetworkComponents
Ƭ NetworkComponents<C
>: C
& { ComponentsRegistry
: Component
<{ value
: Type.String
}> ; LoadingState
: Component
<{ msg
: Type.String
; percentage
: Type.Number
; state
: Type.Number
}> ; SystemsRegistry
: Component
<{ value
: Type.String
}> }
#
Type parameters
#
Defined in
std-client/src/setup/types.ts:35
#
SetupContractConfig
Ƭ SetupContractConfig: NetworkConfig
& Omit
<SyncWorkerConfig
, "worldContract"
| "mappings"
> & { devMode?
: boolean
; disableCache?
: boolean
; worldAddress
: string
}
#
Defined in
std-client/src/setup/types.ts:5
#
Variables
#
ActionStateString
• Const
ActionStateString: Object
#
Type declaration
#
Defined in
std-client/src/systems/ActionSystem/constants.ts:11
#
Functions
#
applyNetworkUpdates
▸ applyNetworkUpdates<C
>(world
, components
, ecsEvents$
, mappings
, ack$
, decodeAndEmitSystemCall?
): Object
Sets up synchronization between contract components and client components
#
Type parameters
#
Parameters
#
Returns
Object
#
Defined in
std-client/src/setup/utils.ts:136
#
createActionSystem
▸ createActionSystem<M
>(world
, txReduced$
): Object
#
Type parameters
#
Parameters
#
Returns
Object
#
Defined in
std-client/src/systems/ActionSystem/createActionSystem.ts:25
#
createDecodeNetworkComponentUpdate
▸ createDecodeNetworkComponentUpdate<C
>(world
, components
, mappings
): (update
: NetworkComponentUpdate
) => DecodedNetworkComponentUpdate
undefined
#
Type parameters
#
Parameters
#
Returns
fn
▸ (update
): DecodedNetworkComponentUpdate
undefined
#
Parameters
#
Returns
DecodedNetworkComponentUpdate
undefined
#
Defined in
std-client/src/setup/utils.ts:38
#
createEncoders
▸ createEncoders(world
, components
, signerOrProvider
): Promise
<Record
<string
, (value
: { [key: string]
: unknown
; }) => string
>>
#
Parameters
#
Returns
Promise
<Record
<string
, (value
: { [key: string]
: unknown
; }) => string
>>
#
Defined in
std-client/src/setup/utils.ts:103
#
createSystemCallStreams
▸ createSystemCallStreams<C
, SystemTypes
>(world
, systemNames
, systemsRegistry
, getSystemContract
, decodeNetworkComponentUpdate
): Object
#
Type parameters
#
Parameters
#
Returns
Object
#
Defined in
std-client/src/setup/utils.ts:61
#
defineActionComponent
▸ defineActionComponent<T
>(world
): Component
<{ metadata
: OptionalT
= Type.OptionalT; on
: OptionalEntity
= Type.OptionalEntity; overrides
: OptionalStringArray
= Type.OptionalStringArray; state
: Number
= Type.Number; txHash
: OptionalString
= Type.OptionalString }, Metadata
, T
>
#
Type parameters
#
Parameters
#
Returns
Component
<{ metadata
: OptionalT
= Type.OptionalT; on
: OptionalEntity
= Type.OptionalEntity; overrides
: OptionalStringArray
= Type.OptionalStringArray; state
: Number
= Type.Number; txHash
: OptionalString
= Type.OptionalString }, Metadata
, T
>
#
Defined in
std-client/src/components/ActionComponent.ts:3
#
defineBoolComponent
▸ defineBoolComponent<M
>(world
, options?
): Component
<{ value
: Boolean
}, M
, undefined
>
#
Type parameters
#
Parameters
#
Returns
Component
<{ value
: Boolean
}, M
, undefined
>
#
Defined in
std-client/src/components/BoolComponent.ts:3
#
defineCoordComponent
▸ defineCoordComponent<M
>(world
, options?
): Component
<{ x
: Number
; y
: Number
}, M
, undefined
>
#
Type parameters
#
Parameters
#
Returns
Component
<{ x
: Number
; y
: Number
}, M
, undefined
>
#
Defined in
std-client/src/components/CoordComponent.ts:3
#
defineDevHighlightComponent
▸ defineDevHighlightComponent(world
): Component
<{ value
: OptionalNumber
= Type.OptionalNumber }, Metadata
, undefined
>
DevHighlight is for use during development to highlight the positions of entities that you are interacting with. Example: Highlight the Entities that you are currently editing in the ComponentBrowser.
#
Parameters
#
Returns
Component
<{ value
: OptionalNumber
= Type.OptionalNumber }, Metadata
, undefined
>
#
Defined in
std-client/src/components/DevHighlight.ts:8
#
defineNumberComponent
▸ defineNumberComponent<M
>(world
, options?
): Component
<{ value
: Number
}, M
, undefined
>
#
Type parameters
#
Parameters
#
Returns
Component
<{ value
: Number
}, M
, undefined
>
#
Defined in
std-client/src/components/NumberComponent.ts:3
#
defineStringComponent
▸ defineStringComponent<M
>(world
, options?
): Component
<{ value
: String
}, M
, undefined
>
#
Type parameters
#
Parameters
#
Returns
Component
<{ value
: String
}, M
, undefined
>
#
Defined in
std-client/src/components/StringComponent.ts:3
#
defineVoxelCoordComponent
▸ defineVoxelCoordComponent<M
>(world
, options?
): Component
<{ x
: Number
; y
: Number
; z
: Number
}, M
, undefined
>
#
Type parameters
#
Parameters
#
Returns
Component
<{ x
: Number
; y
: Number
; z
: Number
}, M
, undefined
>
#
Defined in
std-client/src/components/VoxelCoordComponent.ts:3
#
findEntityWithComponentInRelationshipChain
▸ findEntityWithComponentInRelationshipChain(relationshipComponent
, entity
, searchComponent
): EntityIndex
| undefined
Starting with the given entity, traverse the relationship chain until you find an entity that has the given component.
#
Parameters
#
Returns
EntityIndex
| undefined
The first entity in the relationship chain that has the given component or undefined if the relationship chain is broken.
#
Defined in
#
findInRelationshipChain
▸ findInRelationshipChain(relationshipComponent
, entity
, searchEntity
): boolean
Find a specific entity in a relationship chain.
#
Parameters
#
Returns
boolean
True if the entity is found in the relationship chain, false otherwise.
#
Defined in
#
getBurnerWallet
▸ getBurnerWallet(cacheKey?
): BehaviorSubject
<Hex
>
#
Parameters
#
Returns
BehaviorSubject
<Hex
>
#
Defined in
std-client/src/getBurnerWallet.ts:15
#
getCurrentTurn
▸ getCurrentTurn(world
, gameConfigComponent
, clock
): number
#
Parameters
#
Returns
number
#
Defined in
#
getGameConfig
▸ getGameConfig(world
, gameConfigComponent
): undefined
| ComponentValue
<{ actionCooldownLength
: String
; startTime
: String
; turnLength
: String
}, undefined
>
#
Parameters
#
Returns
undefined
| ComponentValue
<{ actionCooldownLength
: String
; startTime
: String
; turnLength
: String
}, undefined
>
#
Defined in
#
getPlayerEntity
▸ getPlayerEntity(address
, world
, Player
): EntityIndex
| undefined
#
Parameters
#
Returns
EntityIndex
| undefined
#
Defined in
#
getStringColor
▸ getStringColor(address
): number
#
Parameters
#
Returns
number
#
Defined in
#
getTurnAtTime
▸ getTurnAtTime(world
, gameConfigComponent
, time
): number
#
Parameters
#
Returns
number
#
Defined in
#
isUntraversable
▸ isUntraversable(untraversableComponent
, positionComponent
, targetPosition
): boolean
#
Parameters
#
Returns
boolean
#
Defined in
#
randomColor
▸ randomColor(id
): number
Generate a random color based on the given id.
#
Parameters
#
Returns
number
A color in the range 0x000000 - 0xFFFFFF
#
Defined in
#
resolveRelationshipChain
▸ resolveRelationshipChain(relationshipComponent
, entity
): EntityIndex
| undefined
Starting with the given entity, traverse the relationship chain until the end is reached.
#
Parameters
#
Returns
EntityIndex
| undefined
The last entity in the relationship chain or undefined if the relationship chain is broken.
#
Defined in
#
setupMUDNetwork
▸ setupMUDNetwork<C
, SystemTypes
>(networkConfig
, world
, contractComponents
, SystemAbis
, options?
): Promise
<{ components
: NetworkComponents
C
> ; ecsEvent$
: Observable
<NetworkEvent
<C
>> ; encoders
: Promise
<unknown
> ; gasPriceInput$
: BehaviorSubject
<number
> ; mappings
: Mappings
<C
> ; network
: { blockNumber$
: Observable
<number
> ; clock
: Clock
; config
: NetworkConfig
; connected
: IComputedValue
<ConnectionState
> ; connectedAddress
: IComputedValue
<undefined
| string
> ; connectedAddressChecksummed
: IComputedValue
<undefined
| string
> ; dispose
: () => void
; providers
: IComputedValue
<{ json
: MUDJsonRpcProvider
| MUDJsonRpcBatchProvider
; ws
: undefined
| WebSocketProvider
}> ; signer
: IComputedValue
<undefined
| Signer
> } ; playerEntity
: undefined
| EntityIndex
; playerEntityId
: undefined
| EntityID
; registerComponent
: (key
: string
, component
: ContractComponent
void
; registerSystem
: (system
: { contract
: Contract
; id
: string
}) => Promise
<void
> ; singletonEntity
: EntityIndex
; singletonEntityId
: EntityID
= SingletonID; startSync
: () => void
; systemCallStreams
: Record
<string
, Subject
<DecodedSystemCall
[key: string]
: Contract
; }, Components
>>> ; systems
: TxQueue
<SystemTypes
> ; txQueue
: TxQueue
<{ World
: World
}> ; txReduced$
: Observable
<string
> }>
#
Type parameters
#
Parameters
#
Returns
Promise
<{ components
: NetworkComponents
C
> ; ecsEvent$
: Observable
<NetworkEvent
<C
>> ; encoders
: Promise
<unknown
> ; gasPriceInput$
: BehaviorSubject
<number
> ; mappings
: Mappings
<C
> ; network
: { blockNumber$
: Observable
<number
> ; clock
: Clock
; config
: NetworkConfig
; connected
: IComputedValue
<ConnectionState
> ; connectedAddress
: IComputedValue
<undefined
| string
> ; connectedAddressChecksummed
: IComputedValue
<undefined
| string
> ; dispose
: () => void
; providers
: IComputedValue
<{ json
: MUDJsonRpcProvider
| MUDJsonRpcBatchProvider
; ws
: undefined
| WebSocketProvider
}> ; signer
: IComputedValue
<undefined
| Signer
> } ; playerEntity
: undefined
| EntityIndex
; playerEntityId
: undefined
| EntityID
; registerComponent
: (key
: string
, component
: ContractComponent
void
; registerSystem
: (system
: { contract
: Contract
; id
: string
}) => Promise
<void
> ; singletonEntity
: EntityIndex
; singletonEntityId
: EntityID
= SingletonID; startSync
: () => void
; systemCallStreams
: Record
<string
, Subject
<DecodedSystemCall
[key: string]
: Contract
; }, Components
>>> ; systems
: TxQueue
<SystemTypes
> ; txQueue
: TxQueue
<{ World
: World
}> ; txReduced$
: Observable
<string
> }>
#
Defined in
std-client/src/setup/setupMUDNetwork.ts:29
#
setupMUDV2Network
▸ setupMUDV2Network<C
>(__namedParameters
): Promise
<{ components
: { Callbacks
: Component
<{ value
: BigIntArray
= RecsType.BigIntArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; FunctionSelectors
: Component
<{ name
: String
= RecsType.String; namespace
: String
= RecsType.String; systemFunctionSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Hooks
: Component
<{ value
: StringArray
= RecsType.StringArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; InstalledModules
: Component
<{ moduleAddress
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Mixed
: Component
<{ a32
: NumberArray
= RecsType.NumberArray; s
: String
= RecsType.String; u128
: BigInt
= RecsType.BigInt; u32
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; NamespaceOwner
: Component
<{ owner
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceAccess
: Component
<{ access
: Boolean
= RecsType.Boolean }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceType
: Component
<{ resourceType
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; StoreMetadata
: Component
<{ abiEncodedFieldNames
: String
= RecsType.String; tableName
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; SystemRegistry
: Component
<{ resourceSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Systems
: Component
<{ publicAccess
: Boolean
= RecsType.Boolean; system
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Vector2
: Component
<{ x
: Number
= RecsType.Number; y
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; storeSchemaComponent
: Component
<{ keySchema
: String
= Type.String; valueSchema
: String
= Type.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> } & C
& { ComponentsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.components" }, undefined
> ; LoadingState
: Component
<{ msg
: String
= Type.String; percentage
: Number
= Type.Number; state
: Number
= Type.Number }, { contractId
: string
= "component.LoadingState" }, undefined
> ; SystemsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.systems" }, undefined
> } ; ecsEvent$
: Observable
<NetworkEvent
<{ Callbacks
: Component
<{ value
: BigIntArray
= RecsType.BigIntArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; FunctionSelectors
: Component
<{ name
: String
= RecsType.String; namespace
: String
= RecsType.String; systemFunctionSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Hooks
: Component
<{ value
: StringArray
= RecsType.StringArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; InstalledModules
: Component
<{ moduleAddress
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Mixed
: Component
<{ a32
: NumberArray
= RecsType.NumberArray; s
: String
= RecsType.String; u128
: BigInt
= RecsType.BigInt; u32
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; NamespaceOwner
: Component
<{ owner
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceAccess
: Component
<{ access
: Boolean
= RecsType.Boolean }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceType
: Component
<{ resourceType
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; StoreMetadata
: Component
<{ abiEncodedFieldNames
: String
= RecsType.String; tableName
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; SystemRegistry
: Component
<{ resourceSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Systems
: Component
<{ publicAccess
: Boolean
= RecsType.Boolean; system
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Vector2
: Component
<{ x
: Number
= RecsType.Number; y
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; storeSchemaComponent
: Component
<{ keySchema
: String
= Type.String; valueSchema
: String
= Type.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> } & C
& { ComponentsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.components" }, undefined
> ; LoadingState
: Component
<{ msg
: String
= Type.String; percentage
: Number
= Type.Number; state
: Number
= Type.Number }, { contractId
: string
= "component.LoadingState" }, undefined
> ; SystemsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.systems" }, undefined
> }>> ; encoders
: Promise
<unknown
> ; gasPriceInput$
: BehaviorSubject
<number
> ; mappings
: Mappings
<{ Callbacks
: Component
<{ value
: BigIntArray
= RecsType.BigIntArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; FunctionSelectors
: Component
<{ name
: String
= RecsType.String; namespace
: String
= RecsType.String; systemFunctionSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Hooks
: Component
<{ value
: StringArray
= RecsType.StringArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; InstalledModules
: Component
<{ moduleAddress
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Mixed
: Component
<{ a32
: NumberArray
= RecsType.NumberArray; s
: String
= RecsType.String; u128
: BigInt
= RecsType.BigInt; u32
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; NamespaceOwner
: Component
<{ owner
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceAccess
: Component
<{ access
: Boolean
= RecsType.Boolean }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceType
: Component
<{ resourceType
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; StoreMetadata
: Component
<{ abiEncodedFieldNames
: String
= RecsType.String; tableName
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; SystemRegistry
: Component
<{ resourceSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Systems
: Component
<{ publicAccess
: Boolean
= RecsType.Boolean; system
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Vector2
: Component
<{ x
: Number
= RecsType.Number; y
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; storeSchemaComponent
: Component
<{ keySchema
: String
= Type.String; valueSchema
: String
= Type.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> } & C
& { ComponentsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.components" }, undefined
> ; LoadingState
: Component
<{ msg
: String
= Type.String; percentage
: Number
= Type.Number; state
: Number
= Type.Number }, { contractId
: string
= "component.LoadingState" }, undefined
> ; SystemsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.systems" }, undefined
> }> ; network
: { blockNumber$
: Observable
<number
> ; clock
: Clock
; config
: NetworkConfig
; connected
: IComputedValue
<ConnectionState
> ; connectedAddress
: IComputedValue
<undefined
| string
> ; connectedAddressChecksummed
: IComputedValue
<undefined
| string
> ; dispose
: () => void
; providers
: IComputedValue
<{ json
: MUDJsonRpcProvider
| MUDJsonRpcBatchProvider
; ws
: undefined
| WebSocketProvider
}> ; signer
: IComputedValue
<undefined
| Signer
> } ; networkConfig
: SetupContractConfig
playerEntity
: undefined
| EntityIndex
; playerEntityId
: undefined
| EntityID
; registerComponent
: (key
: string
, component
: ContractComponent
void
; singletonEntity
: EntityIndex
; singletonEntityId
: EntityID
= SingletonID; startSync
: () => void
; txQueue
: TxQueue
<{ World
: World
}> ; txReduced$
: Observable
<string
> ; world
: World
}>
#
Type parameters
#
Parameters
#
Returns
Promise
<{ components
: { Callbacks
: Component
<{ value
: BigIntArray
= RecsType.BigIntArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; FunctionSelectors
: Component
<{ name
: String
= RecsType.String; namespace
: String
= RecsType.String; systemFunctionSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Hooks
: Component
<{ value
: StringArray
= RecsType.StringArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; InstalledModules
: Component
<{ moduleAddress
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Mixed
: Component
<{ a32
: NumberArray
= RecsType.NumberArray; s
: String
= RecsType.String; u128
: BigInt
= RecsType.BigInt; u32
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; NamespaceOwner
: Component
<{ owner
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceAccess
: Component
<{ access
: Boolean
= RecsType.Boolean }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceType
: Component
<{ resourceType
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; StoreMetadata
: Component
<{ abiEncodedFieldNames
: String
= RecsType.String; tableName
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; SystemRegistry
: Component
<{ resourceSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Systems
: Component
<{ publicAccess
: Boolean
= RecsType.Boolean; system
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Vector2
: Component
<{ x
: Number
= RecsType.Number; y
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; storeSchemaComponent
: Component
<{ keySchema
: String
= Type.String; valueSchema
: String
= Type.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> } & C
& { ComponentsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.components" }, undefined
> ; LoadingState
: Component
<{ msg
: String
= Type.String; percentage
: Number
= Type.Number; state
: Number
= Type.Number }, { contractId
: string
= "component.LoadingState" }, undefined
> ; SystemsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.systems" }, undefined
> } ; ecsEvent$
: Observable
<NetworkEvent
<{ Callbacks
: Component
<{ value
: BigIntArray
= RecsType.BigIntArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; FunctionSelectors
: Component
<{ name
: String
= RecsType.String; namespace
: String
= RecsType.String; systemFunctionSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Hooks
: Component
<{ value
: StringArray
= RecsType.StringArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; InstalledModules
: Component
<{ moduleAddress
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Mixed
: Component
<{ a32
: NumberArray
= RecsType.NumberArray; s
: String
= RecsType.String; u128
: BigInt
= RecsType.BigInt; u32
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; NamespaceOwner
: Component
<{ owner
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceAccess
: Component
<{ access
: Boolean
= RecsType.Boolean }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceType
: Component
<{ resourceType
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; StoreMetadata
: Component
<{ abiEncodedFieldNames
: String
= RecsType.String; tableName
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; SystemRegistry
: Component
<{ resourceSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Systems
: Component
<{ publicAccess
: Boolean
= RecsType.Boolean; system
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Vector2
: Component
<{ x
: Number
= RecsType.Number; y
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; storeSchemaComponent
: Component
<{ keySchema
: String
= Type.String; valueSchema
: String
= Type.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> } & C
& { ComponentsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.components" }, undefined
> ; LoadingState
: Component
<{ msg
: String
= Type.String; percentage
: Number
= Type.Number; state
: Number
= Type.Number }, { contractId
: string
= "component.LoadingState" }, undefined
> ; SystemsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.systems" }, undefined
> }>> ; encoders
: Promise
<unknown
> ; gasPriceInput$
: BehaviorSubject
<number
> ; mappings
: Mappings
<{ Callbacks
: Component
<{ value
: BigIntArray
= RecsType.BigIntArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; FunctionSelectors
: Component
<{ name
: String
= RecsType.String; namespace
: String
= RecsType.String; systemFunctionSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Hooks
: Component
<{ value
: StringArray
= RecsType.StringArray }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; InstalledModules
: Component
<{ moduleAddress
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Mixed
: Component
<{ a32
: NumberArray
= RecsType.NumberArray; s
: String
= RecsType.String; u128
: BigInt
= RecsType.BigInt; u32
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; NamespaceOwner
: Component
<{ owner
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceAccess
: Component
<{ access
: Boolean
= RecsType.Boolean }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; ResourceType
: Component
<{ resourceType
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; StoreMetadata
: Component
<{ abiEncodedFieldNames
: String
= RecsType.String; tableName
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; SystemRegistry
: Component
<{ resourceSelector
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Systems
: Component
<{ publicAccess
: Boolean
= RecsType.Boolean; system
: String
= RecsType.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; Vector2
: Component
<{ x
: Number
= RecsType.Number; y
: Number
= RecsType.Number }, { contractId
: `0x$` ; tableId
: string
}, undefined
> ; storeSchemaComponent
: Component
<{ keySchema
: String
= Type.String; valueSchema
: String
= Type.String }, { contractId
: `0x$` ; tableId
: string
}, undefined
> } & C
& { ComponentsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.components" }, undefined
> ; LoadingState
: Component
<{ msg
: String
= Type.String; percentage
: Number
= Type.Number; state
: Number
= Type.Number }, { contractId
: string
= "component.LoadingState" }, undefined
> ; SystemsRegistry
: Component
<{ value
: String
}, { contractId
: string
= "world.component.systems" }, undefined
> }> ; network
: { blockNumber$
: Observable
<number
> ; clock
: Clock
; config
: NetworkConfig
; connected
: IComputedValue
<ConnectionState
> ; connectedAddress
: IComputedValue
<undefined
| string
> ; connectedAddressChecksummed
: IComputedValue
<undefined
| string
> ; dispose
: () => void
; providers
: IComputedValue
<{ json
: MUDJsonRpcProvider
| MUDJsonRpcBatchProvider
; ws
: undefined
| WebSocketProvider
}> ; signer
: IComputedValue
<undefined
| Signer
> } ; networkConfig
: SetupContractConfig
playerEntity
: undefined
| EntityIndex
; playerEntityId
: undefined
| EntityID
; registerComponent
: (key
: string
, component
: ContractComponent
void
; singletonEntity
: EntityIndex
; singletonEntityId
: EntityID
= SingletonID; startSync
: () => void
; txQueue
: TxQueue
<{ World
: World
}> ; txReduced$
: Observable
<string
> ; world
: World
}>
#
Defined in
std-client/src/setup/setupMUDV2Network.ts:33
#
useComponentValueStream
▸ useComponentValueStream<T
>(component
, entity?
): undefined
| null
| ComponentValue
<T
, undefined
>
Deprecated
Use hooks exported from @latticexyz/react package instead.
#
Type parameters
#
Parameters
#
Returns
undefined
| null
| ComponentValue
<T
, undefined
>
#
Defined in
#
useQuery
▸ useQuery(queryFragments
): undefined
| ObservableSet
<EntityIndex
>
Handles subscribing and unsubscribing to a queries update stream to keep the matching set up to date
Deprecated
Use hooks exported from @latticexyz/react package instead.
#
Parameters
#
Returns
undefined
| ObservableSet
<EntityIndex
>
Mobx ObservablesSet with entities currently matching the query
#
Defined in
#
useStream
▸ useStream<T
>(stream
, defaultValue?
): undefined
| T
Deprecated
Use hooks exported from @latticexyz/react package instead.
#
Type parameters
#
Parameters
#
Returns
undefined
| T
#
Defined in
#
waitForActionCompletion
▸ waitForActionCompletion(Action
, entity
): Promise
<void
>
#
Parameters
#
Returns
Promise
<void
>
#
Defined in
std-client/src/systems/ActionSystem/utils/waitForActionCompletion.ts:6
#
waitForComponentValue
▸ waitForComponentValue<S
>(component
, entity
, value
): Promise
<void
>
#
Type parameters
#
Parameters
#
Returns
Promise
<void
>
#
Defined in
#
waitForComponentValueIn
▸ waitForComponentValueIn<S
, T
>(component
, entity
, values
): Promise
<void
>
#
Type parameters
#
Parameters
#
Returns
Promise
<void
>