The Calculation Engine sends a request to the nostr Interpretation Engine, which returns a response.
The request is an object with three properties: source, universalInterpretationProtocolID and parameters.
The request must validate against the nostr interpretation engine request json schema:
{
required: [ "source", "universalInterpretationProtocolID", "parameters" ],
properties: {
source: {
type: string,
enum: [ " nostr" ]
},
universalInterpretationProtocolID: {
type: string
},
parameters: {
type: object
},
}
}
where:
universalInterpretationProtocolIDmust be recognized, i.e. must be in the Interpretation Engine's database of supported protocolsparametersis a stringified version of an object, the schema of which is protocol-specific.
An example request is the following:
{
source: nostr
universalInterpretationProtocolID: basicFollowsInterpretationProtocol
parameters: ... (see below)
}
where parameters is the object:
{
score: 1.0,
confidence: 0.05,
depth: 5,
pubkeys: [...],
context: notSpam
}
The Interpretation Engine sends a response back to the Calculation Engine.
An example success response:
{
success: true,
ratingsTable: ...
}
The ratingsTable is a stringified (or should we leave this as an array?) array of individual ratings. Example:
[
{
rater: pk_Bob,
ratee: pk_Alice,
context: notSpam,
score: 1.0,
confidence: 0.05
},
{
rater: pk_Bob,
ratee: pk_Charlie,
context: notSpam,
score: 1.0,
confidence: 0.05
}
]
{
success: false,
message: ...
}
(work in progress to specify the error messages)