1
0
mirror of https://github.com/oceanprotocol/market.git synced 2024-12-02 05:57:29 +01:00

ddo creation updates

This commit is contained in:
Matthias Kretschmann 2021-11-11 08:55:35 +00:00
parent 51891f9b9f
commit 7acd9a2388
Signed by: m
GPG Key ID: 606EEEF3C479A91F

View File

@ -38,14 +38,14 @@ export function transformPublishFormToDdo(data: Partial<FormPublishData>): DDO {
const service: Service = { const service: Service = {
type: access, type: access,
files: filesEncrypted, files: filesEncrypted,
datatokenAddress: '', datatokenAddress: '', // how to get before publish?
serviceEndpoint: providerUrl, serviceEndpoint: providerUrl,
timeout timeout
} }
const newDdo: DDO = { const newDdo: DDO = {
'@context': [''], '@context': ['https://w3id.org/did/v1'],
id: '', id: '', // how to get before publish? sha256(address of ERC721 contract + data.chainId)
version: '4.0.0', version: '4.0.0',
created: currentTime, created: currentTime,
updated: currentTime, updated: currentTime,
@ -58,6 +58,9 @@ export function transformPublishFormToDdo(data: Partial<FormPublishData>): DDO {
author, author,
license: 'https://market.oceanprotocol.com/terms', license: 'https://market.oceanprotocol.com/terms',
links, links,
additionalInformation: {
termsAndConditions
},
...(type === 'algorithm' && { ...(type === 'algorithm' && {
...getAlgorithmComponent( ...getAlgorithmComponent(
image, image,