live · mainnetoc · docs
specs · api · guides
docs / documentation

@orangecheck/pledge-core


@orangecheck/pledge-core / validateResolutionQuery

Function: validateResolutionQuery()

function validateResolutionQuery(mechanism: string, query: string): ResolutionValidateResult;

Defined in: pledge-core/src/resolution.ts:75

Validate the (mechanism, query) pair against §3.4.

Returns ok+mechanism for the seven legitimate mechanisms with conforming queries; returns error otherwise. The error code matches SPEC §10 (E_RESOLUTION_UNKNOWN for unknown mechanisms, E_RESOLUTION_NONDETERMINISTIC for self_proof attempts and malformed query strings).

Parameters

ParameterType
mechanismstring
querystring

Returns

ResolutionValidateResult