The OpenRPC Method which encloses the content descriptor
The OpenRPC Content Descriptor (either a method param or the result).
an ID for the result/method combo.
It follows the format {method.name}/result
.
[[ContentDescriptorNotFoundInMethodError]]
const { generateMethodResultId }
const methodObject = {
name: "foo",
params: [],
result: {
name: "fooResult",
schema: { type: "string" }
}
};
const resultId = generateMethodResultId(methodObject, methodObject.result);
console.log(paramId);
// outputs:
// "foo/result"
Create a unique identifier for a result within a given method. This is typically used to create hashmap keys for method to result mappings.