Closed BjBe82 closed 6 months ago
Hi @BjBe82
From the example above it looks like you are missing the setDefault()
function in the consumerParameter. As of right now a default value is required as defined in the OceanProtocol DDO spec.
const consumerParameterBuilder = new ConsumerParameterBuilder();
const petitionerParam = consumerParameterBuilder
.setType('text')
.setName('Public Address')
.setLabel('Public Address Label')
.setDescription('Web3 Public Address of the petitioner.')
.setRequired(true)
.setDefault('my default value') // add this to match the DDO spec
.build();
Thanks. With the default value, the code above runs. The service does not show up in https://cooperants.pontus-x.eu/profile, but this might be another issue.
Summary
I tried to create a SaaS service description, which produces multiple errors when using the Nautilus API. To dig down what the error is i replaced all the code with the provided example code to publish a service see below. The only thing changed was to add a parameter.
Current Behavior
Trying to execute the code throws an error:
Expected Behavior
A Service description with parameter is available in the portal.
Environment