انتقل إلى المحتوى الرئيسي

Function: parseCommandKey()

parseCommandKey(key): ParsedCommandKey | undefined

Defined in: packages/contracts/src/commands.ts:116

Parses a command key. Six tokens with no wildcard anywhere, the first agent and the third admin, so a command key can never be mistaken for a routed subject or a standing key: parseRoutedSubject and parseStandingKey return undefined for every string this accepts, and the reverse.

Parameters​

key​

string

For example agent.shared.admin.did.create.v1.

Returns​

ParsedCommandKey | undefined

The parts, or undefined if the string is not a well-formed command key.