The OpenRPC Method which encloses the content descriptor
The OpenRPC Content Descriptor that is a param in the method
an ID for the param/method combo.
It follows the format {method.name}/{indexWithinParams}|{contentDescriptor.name}
where:
[[ContentDescriptorNotFoundInMethodError]]
const { generateMethodParamId }
const methodObject = {
name: "foo",
params: [{
name: "fooParam",
schema: { type: "integer" }
}],
result: {}
};
const paramId = generateMethodParamId(methodObject, methodObject.params[0]);
console.log(paramId);
// outputs:
// "foo/0/fooParam"
Create a unique identifier for a parameter within a given method. This is typically used to create hashmap keys for method to parameter mappings.