Skip to content

@gala-chain/apiAPI


API > UserRef

Type alias: UserRef

UserRef: string & object | UserAlias

Description

Type for user ref. Technically it is a string, but it has an additional marker (tag) to distinguish it from other strings at the compilation level, and mark that it was actually validated as a user ref. Also, any user alias is a valid user ref as well.

You may use the asValidUserRef function to validate any string as a user ref and return it as the UserRef type.

Source

chain-api/src/types/UserRef.ts:30