import { StaticAbiType, SchemaAbiType, SchemaAbiTypeToPrimitiveType } from '@latticexyz/schema-type/internal'; import { BlockNumber, BlockTag, Address, Hex, Log, GetLogsErrorType, Client } from 'viem'; import { s as storeEventsAbi, a as StoreEventsAbiItem, S as StoreEventsAbi, b as StoreSetRecordEventAbiItem } from './store-CDoWdOke.js'; export { C as CODEGEN_DEFAULTS, f as CONFIG_DEFAULTS, R as NoStaticKeyFieldError, T as TABLE_CODEGEN_DEFAULTS, e as TABLE_DEFAULTS, c as TABLE_DEPLOY_DEFAULTS, V as ValidKeys, I as ValidateTableOptions, w as defineNamespaces, z as defineSchema, d as defineStore, N as defineTable, Y as defineTableShorthand, Q as defineTables, X as expandTableShorthand, B as extendedScope, Z as extractInternalType, i as flattenNamespacedTables, j as get, k as getPath, l as hasOwnKey, n as isObject, A as isSchemaInput, U as isTableShorthandInput, _ as isUserTypes, G as isValidPrimaryKey, m as mapEnums, o as mergeIfUndefined, p as parseNumber, J as requiredTableKey, r as resolveCodegen, h as resolveEnums, q as resolveNamespace, E as resolveNamespaceMode, u as resolveNamespaces, y as resolveSchema, F as resolveStore, M as resolveTable, L as resolveTableCodegen, P as resolveTables, g as scopeWithEnums, $ as scopeWithUserTypes, H as validateKeys, v as validateNamespace, t as validateNamespaces, x as validateSchema, D as validateStore, K as validateTable, W as validateTableShorthand, O as validateTables, a0 as validateUserTypes } from './store-CDoWdOke.js'; import { Table } from '@latticexyz/config'; export { AbiType, Schema } from '@latticexyz/config'; import { getSchemaPrimitives, getKeySchema } from '@latticexyz/protocol-parser/internal'; export { A as AbiTypeScope, o as Codegen, C as CodegenInput, j as EnumValues, i as Enums, E as EnumsInput, p as Namespace, N as NamespaceInput, q as Namespaces, h as NamespacesInput, b as SchemaInput, r as Scope, s as ScopeOptions, c as ScopedSchemaInput, a as Store, S as StoreInput, m as Table, k as TableCodegen, T as TableCodegenInput, l as TableDeploy, d as TableDeployInput, e as TableInput, f as TableShorthandInput, n as Tables, g as TablesInput, U as UserTypes, u as extendScope, t as getStaticAbiTypeKeys } from './output-DjNNBwhs.js'; import '@ark/util'; type KeySchema = { readonly [k: string]: { readonly type: StaticAbiType; }; }; type ValueSchema = { readonly [k: string]: { readonly type: SchemaAbiType; }; }; /** Map a table schema like `{ value: { type: "uint256" } }` to its primitive types like `{ value: bigint }` */ type SchemaToPrimitives = { readonly [key in keyof schema]: SchemaAbiTypeToPrimitiveType; }; declare const emptyRecord: { readonly staticData: "0x"; readonly encodedLengths: "0x"; readonly dynamicData: "0x"; }; type GetStoreLogsParameters = { /** Store address or list of store addresses from which logs originated */ address?: Address | Address[] | undefined; /** Optionally match a specific table ID or list of table IDs */ tableId?: Hex | Hex[] | undefined; /** Block number or tag after which to include logs */ fromBlock?: fromBlock | BlockNumber | BlockTag | undefined; /** Block number or tag before which to include logs */ toBlock?: toBlock | BlockNumber | BlockTag | undefined; }; type GetStoreLogsReturnType = Log[]; type GetStoreLogsErrorType = GetLogsErrorType; /** * Returns an unordered list of store event logs matching the provided parameters. * * @param client - Client to use * @param parameters - {@link GetStoreLogsParameters} * @returns A list of event logs. {@link GetStoreLogsReturnType} * * @example * import { createClient, http } from 'viem' * import { mainnet } from 'viem/chains' * import { getStoreLogs } from '@latticexyz/store' * * const client = createPublicClient({ * chain: mainnet, * transport: http(), * }) * const storeLogs = await getStoreLogs(client) */ declare function getStoreLogs(client: Client, { address, tableId, fromBlock, toBlock }?: GetStoreLogsParameters): Promise>; type StoreLog = Log; type StoreSetRecordLog = Log; declare function flattenStoreLogs(logs: StoreLog[]): StoreSetRecordLog[]; type PartialTable = Pick; type PartialLog = Pick, "args">; type LogToRecordArgs = { table: table; log: PartialLog; }; declare function logToRecord
({ table, log, }: LogToRecordArgs
): getSchemaPrimitives; type GetRecordOptions
= { address: Address; table: table; key: getSchemaPrimitives>; blockTag?: "latest" | "pending"; }; declare function getRecord
(client: Client, { address, table, key, blockTag }: GetRecordOptions
): Promise>; declare function getStaticDataLocation(tableId: Hex, keyTuple: readonly Hex[]): Hex; export { type GetRecordOptions, type GetStoreLogsErrorType, type GetStoreLogsParameters, type GetStoreLogsReturnType, type KeySchema, type LogToRecordArgs, type SchemaToPrimitives, type ValueSchema, emptyRecord, flattenStoreLogs, getRecord, getStaticDataLocation, getStoreLogs, logToRecord };