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:
parent
51891f9b9f
commit
7acd9a2388
@ -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,
|
||||||
|
Loading…
Reference in New Issue
Block a user