Skip to content

Defined in: src/types/entity.ts:36

An entity as the node returns it, decoded: the fields a query selected, with its attributes as a map keyed by name. Which fields are populated is decided by the selection, so each may be undefined.

Queries do not return these: select(), query() and getEntity() lay each one out as a flat row — the selected entity fields and attributes side by side, typed by the selection and, through a schema, by its columns.

new Entity(fields): Entity

Defined in: src/types/entity.ts:47

EntityFields = {}

Entity

attributes: Readonly<Record<string, ArkivValue>> | undefined

Defined in: src/types/entity.ts:45

Attribute names, types and values.

EntityFields.attributes


attributeSchema: Readonly<Record<string, { indexed: boolean | undefined; type: "bool" | "bytes" | "key" | "i32" | "u64" | "u256" | "dec" | "str" | "addr"; }>> | undefined

Defined in: src/types/entity.ts:44

Attribute names, types and indexing, with no values.

EntityFields.attributeSchema


createdAt: bigint | undefined

Defined in: src/types/entity.ts:40

Block the entity was created at.

EntityFields.createdAt


creationFlags: ResolvedCreationFlags | undefined

Defined in: src/types/entity.ts:43

The immutable properties the entity was created with.

EntityFields.creationFlags


creator: `0x${string}` | undefined

Defined in: src/types/entity.ts:39

EntityFields.creator


expiresAt: bigint | undefined

Defined in: src/types/entity.ts:42

Block the entity expires at.

EntityFields.expiresAt


key: `0x${string}` | undefined

Defined in: src/types/entity.ts:37

EntityFields.key


owner: `0x${string}` | undefined

Defined in: src/types/entity.ts:38

EntityFields.owner


updatedAt: bigint | undefined

Defined in: src/types/entity.ts:41

Block the entity was last patched at.

EntityFields.updatedAt