Entity
Last updated
Was this helpful?
Represents an object or resource in the Polymesh Ecosystem with its own set of properties and functionality
▪ UniqueIdentifiers
▪ HumanReadable
Protected context• context: Context
Defined in src/api/entities/Entity.ts:48
• uuid: string
Defined in src/api/entities/Entity.ts:46
Abstract exists▸ exists(): Promise‹boolean›
Defined in src/api/entities/Entity.ts:68
Determine whether this Entity exists on chain
Returns: Promise‹boolean›
▸ isEqual(entity: Entity‹unknown, unknown›): boolean
Defined in src/api/entities/Entity.ts:61
Determine whether this Entity is the same as another one
Parameters:
entity
Entity‹unknown, unknown›
Returns: boolean
Abstract toJson▸ toJson(): HumanReadable
Defined in src/api/entities/Entity.ts:73
Returns Entity data in a human readable (JSON) format
Returns: HumanReadable
Static generateUuid▸ generateUuid‹Identifiers›(identifiers: Identifiers): string
Defined in src/api/entities/Entity.ts:14
Generate the Entity's UUID from its identifying properties
Type parameters:
▪ Identifiers
Parameters:
identifiers
Identifiers
Returns: string
Static isUniqueIdentifiers▸ isUniqueIdentifiers(identifiers: unknown): boolean
Defined in src/api/entities/Entity.ts:42
Typeguard that checks whether the object passed corresponds to the unique identifiers of the class. Must be overridden
Parameters:
identifiers
unknown
object to type check
Returns: boolean
Static unserialize▸ unserialize‹Identifiers›(serialized: string): Identifiers
Defined in src/api/entities/Entity.ts:23
Unserialize a UUID into its Unique Identifiers
Type parameters:
▪ Identifiers
Parameters:
serialized
string
UUID to unserialize
Returns: Identifiers
Last updated
Was this helpful?
Was this helpful?