Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/V5 WIP #74

Open
wants to merge 29 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
29 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,47 @@ export PROVIDER_URL='XXXX'
export ADDRESS_FILE='path-to-address-file'
```

- Optional set IPFS_API_KEY and IPFS_SECRET_API_KEY if you want to publish an asset v5.0.0

```
export IPFS_API_KEY='xxx'
export IPFS_SECRET_API_KEY='xxx'
```

- Optional set issuers env if you want to sign an asset v5.0.0 with waltId (SSI ON)
WALT_ID_ISSUER_API is api of waltId
```
export WALT_ID_ISSUER_API=
```
ISSUER_ID is the DID of the issuer
```
export ISSUER_iD=
```
ISSUER_KTY is the key type, for example OKP (Octet key pair)
```
export ISSUER_KTY=
```
ISSUER_KEY_D rapresents a parameter of private key in JWK - Private RSA JWK "dp" (First Factor CRT Exponent)
```
export ISSUER_KEY_D=
```
ISSUER_KEY_CRV is the cryptographic curve used like "Ed25519"
```
export ISSUER_KEY_CRV=
```
ISSUER_KEY_KID is the key id which helps systems identify which key to use when multiple keys might be available
```
export ISSUER_KEY_KID=
```
ISSUER_KEY_X is the public key used for verifying signatures
```
export ISSUER_KEY_X=
```
SSI indicated if should sign with waltId or with web3
```
export SSI=true
```

### Build the TypeScript code

```
Expand Down
25 changes: 25 additions & 0 deletions metadata/downloadService.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
{
"id": "ccb398c50d6abd5b456e8d7242bd856a1767a890b537c2f8c10ba8b8a10e6026",
"name": "Service 2",
"description": {
"@value": "Service 2 for accessing the dataset",
"@language": "en",
"@direction": "ltr"
},
"type": "access",
"datatokenAddress": "",
"files": {
"datatokenAddress": "",
"nftAddress": "",
"files": [
{
"type": "url",
"url": "https://dumps.wikimedia.org/enwiki/latest/enwiki-latest-abstract10.xml.gz-rss.xml",
"method": "GET"
}
]
},
"credentials": [],
"serviceEndpoint": "",
"timeout": 86400
}
88 changes: 88 additions & 0 deletions metadata/jsAlgoV5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
{
"@context": ["https://w3id.org/did/v1"],
"version": "5.0.0",
"credentialSubject": {
"id": "",
"chainId": 8996,
"metadata": {
"created": "2023-08-01T17:09:39Z",
"updated": "2023-08-01T17:09:39Z",
"type": "algorithm",
"name": "avreage price real estate algo",
"symbol": "ALGOV5",
"description": {
"@value": "New algo published using ocean CLI tool with version 5.0.0",
"@language": "en",
"@direction": "ltr"
},
"author": "OPF",
"license": {
"name": "https://market.oceanprotocol.com/terms"
},
"additionalInformation": {
"termsAndConditions": true
},
"algorithm": {
"language": "",
"version": "0.1",
"container": {
"entrypoint": "node $ALGO",
"image": "node",
"tag": "latest",
"checksum": "sha256:1155995dda741e93afe4b1c6ced2d01734a6ec69865cc0997daf1f4db7259a36"
}
}
},
"services": [
{
"id": "1234567890",
"type": "compute",
"name": "Access Service",
"description": {
"@value": "Service for accessing the dataset",
"@language": "en",
"@direction": "ltr"
},
"files": {
"datatokenAddress": "0x0",
"nftAddress": "0x0",
"files": [
{
"hash": "QmQN9hWcqN7chF3qrAL5HpZSkfc9kvjSH7o4LaGVMxs9gu",
"type": "ipfs"
}
]
},
"timeout": 86400,
"compute": {
"allowRawAlgorithm": false,
"allowNetworkAccess": true,
"publisherTrustedAlgorithmPublishers": [],
"publisherTrustedAlgorithms": []
},
"credentials": []
}
],
"credentials": [],
"nftAddress": ""
},
"issuer": "did:op:issuer-did",
"type": ["VerifiableCredential"],
"additionalDdos": [],
"stats": {
"allocated": 0,
"orders": 0,
"price": {
"value": "0"
}
},
"nft": {
"address": "",
"name": "Ocean Data NFT",
"symbol": "OCEAN-NFT",
"state": 5,
"tokenURI": "",
"owner": "",
"created": ""
}
}
14 changes: 4 additions & 10 deletions metadata/simpleComputeDataset.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
{
"@context": [
"https://w3id.org/did/v1"
],
"@context": ["https://w3id.org/did/v1"],
"id": "",
"nftAddress": "",
"version": "4.1.0",
Expand All @@ -12,9 +10,7 @@
"type": "dataset",
"name": "cli fixed asset",
"description": "asset published using ocean.js cli tool",
"tags": [
"test"
],
"tags": ["test"],
"author": "oceanprotocol",
"license": "https://market.oceanprotocol.com/terms",
"additionalInformation": {
Expand Down Expand Up @@ -47,8 +43,7 @@
}
}
],
"event": {
},
"event": {},
"nft": {
"address": "",
"name": "Ocean Data NFT",
Expand All @@ -61,8 +56,7 @@
"purgatory": {
"state": false
},
"datatokens": [
],
"datatokens": [],
"stats": {
"allocated": 0,
"orders": 0,
Expand Down
80 changes: 80 additions & 0 deletions metadata/simpleComputeDatasetV5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
{
"@context": ["https://w3id.org/did/v1"],
"version": "5.0.0",
"credentialSubject": {
"id": "",
"metadata": {
"created": "2021-12-20T14:35:20Z",
"updated": "2021-12-20T14:35:20Z",
"type": "dataset",
"name": "CLi fixed asset",
"description": {
"@value": "New asset published using ocean CLI tool with version 5.0.0",
"@language": "en",
"@direction": "ltr"
},
"tags": ["test"],
"author": "oceanprotocol",
"providedBy": "oceanprotocol",
"copyrightHolder": "copirightHolder",
"license": "https://market.oceanprotocol.com/terms",
"additionalInformation": {
"termsAndConditions": true
}
},
"services": [
{
"id": "ccb398c50d6abd5b456e8d7242bd856a1767a890b537c2f8c10ba8b8a10e6025",
"type": "compute",
"name": "service 1",
"files": {
"datatokenAddress": "0x0",
"nftAddress": "0x0",
"files": [
{
"type": "url",
"url": "https://raw.githubusercontent.com/oceanprotocol/c2d-examples/main/branin_and_gpr/branin.arff",
"method": "GET"
}
]
},
"datatokenAddress": "",
"serviceEndpoint": "http://10.84.128.6:8001",
"timeout": 86400,
"compute": {
"allowRawAlgorithm": false,
"allowNetworkAccess": true,
"publisherTrustedAlgorithmPublishers": [],
"publisherTrustedAlgorithms": []
},
"credentials": [],
"state": 0
}
],
"datatokens": [],
"credentials": [],
"chainId": 8996,
"nftAddress": ""
},
"issuer": "did:op:issuer-did",
"type": ["VerifiableCredential"],
"stats": {
"allocated": 0,
"orders": 0,
"price": {
"value": "0"
}
},
"nft": {
"address": "",
"name": "Ocean Data NFT",
"symbol": "OCEAN-NFT",
"state": 5,
"tokenURI": "",
"owner": "",
"created": ""
},
"purgatory": {
"state": false
}
}
20 changes: 7 additions & 13 deletions metadata/simpleDownloadDataset.json
Original file line number Diff line number Diff line change
@@ -1,20 +1,16 @@
{
"@context": [
"https://w3id.org/did/v1"
],
"@context": ["https://w3id.org/did/v1"],
"id": "",
"nftAddress": "",
"version": "4.1.0",
"chainId": 80001,
"chainId": 8996,
"metadata": {
"created": "2021-12-20T14:35:20Z",
"updated": "2021-12-20T14:35:20Z",
"type": "dataset",
"name": "ocean-cli demo asset",
"description": "asset published using ocean cli tool",
"tags": [
"test"
],
"tags": ["test"],
"author": "oceanprotocol",
"license": "https://market.oceanprotocol.com/terms",
"additionalInformation": {
Expand All @@ -41,8 +37,7 @@
"timeout": 86400
}
],
"event": {
},
"event": {},
"nft": {
"address": "",
"name": "Ocean Data NFT",
Expand All @@ -55,13 +50,12 @@
"purgatory": {
"state": false
},
"datatokens": [
],
"datatokens": [],
"stats": {
"allocated": 0,
"orders": 0,
"price": {
"value": "2"
"value": "0"
}
}
}
}
Loading
Loading