Skip to content

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

attributes: Attribute[]

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


contentType: MimeType | undefined

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


createdAtBlock: bigint | undefined

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


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

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


expiresAtBlock: bigint | undefined

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


key: `0x${string}`

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


lastModifiedAtBlock: bigint | undefined

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


operationIndexInTransaction: bigint | undefined

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


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

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


payload: Uint8Array<ArrayBufferLike> | undefined

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


transactionIndexInBlock: bigint | undefined

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

toJson(): any

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

Parses the entity payload as JSON and returns the resulting object. Throws an error if the payload is undefined, which may occur if the entity was not queried with the withPayload option. Throws an error if the payload is empty or cannot be parsed as JSON.

any

The parsed JSON object from the entity payload.


toText(): string

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

Converts the entity payload from bytes to a string and returns it. Throws an error if the payload is undefined, which may occur if the entity was not queried with the withPayload option. Throws an error if the conversion from bytes to string fails.

string

The entity payload as a string.