Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
99e4c68
chore: publish v5
AdriGeorge Sep 1, 2025
05c098f
chore: publish v5
AdriGeorge Sep 1, 2025
bc2b222
chore: buy v5
AdriGeorge Sep 4, 2025
a8d1ab6
chore: free compute for v5
AdriGeorge Sep 12, 2025
c99c066
fix: removed file downaloded
AdriGeorge Sep 12, 2025
0cf5f3b
fix: fix
AdriGeorge Sep 12, 2025
ff24527
fix: fix
AdriGeorge Sep 12, 2025
3eb1d58
fix: fix
AdriGeorge Sep 12, 2025
f16b780
chore: paid c2d
AdriGeorge Sep 12, 2025
622c64c
fix: test
AdriGeorge Sep 12, 2025
50b7684
chore: publish, allow and disallow algo
AdriGeorge Sep 15, 2025
310bece
chore: add example metadata
AdriGeorge Sep 15, 2025
9814227
Merge pull request #132 from oceanprotocol/feat/publishV5
AdriGeorge Sep 15, 2025
f87e2bd
fix: fix
AdriGeorge Sep 16, 2025
481ff00
chore: add serviceIds for dataset and algo in commands
AdriGeorge Sep 16, 2025
587e940
Update README.md
AdriGeorge Sep 16, 2025
c719550
Update README.md
AdriGeorge Sep 17, 2025
f55cb7c
fix: fix
AdriGeorge Sep 17, 2025
d56b9f9
fix: logs
AdriGeorge Sep 17, 2025
575845c
fix: logs
AdriGeorge Sep 17, 2025
69c2dae
Update README.md
AdriGeorge Sep 17, 2025
04dea96
fix: removed logs
AdriGeorge Sep 17, 2025
4ee88e6
chore: some tests
AdriGeorge Sep 24, 2025
812b5f7
fix: tests
AdriGeorge Sep 24, 2025
38ec032
chore: tests
AdriGeorge Sep 24, 2025
edc393b
fix: tests
AdriGeorge Sep 24, 2025
d78df55
fix: tests
AdriGeorge Sep 24, 2025
f540202
fix: tests
AdriGeorge Sep 24, 2025
e0081e1
fix: tests
AdriGeorge Sep 24, 2025
b4f6f84
Merge branch 'main' of https://github.com/oceanprotocol/ocean-cli int…
AdriGeorge Nov 28, 2025
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
36 changes: 30 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,14 @@ export INDEXING_RETRY_INTERVAL='3000'
export AVOID_LOOP_RUN='true/false'
```

- Optional, set SSI_WALLET_API, SSI_WALLET_ID, SSI_WALLET_DID to support v5 DDOs (assets using credentialSubject and SSI policy flows).

```
export SSI_WALLET_API="https://your-ssi-wallet.example/api"
export SSI_WALLET_ID="did:example:your-wallet-did-or-id"
export export SSI_WALLET_DID="did:example"
```



### Build the TypeScript code
Expand All @@ -108,7 +116,7 @@ npm run cli h

E.g. run publish command

Make sure to update chainId from the assets from `metadata` folder.
Make sure to update chainId and serviceEnpoint from the assets from `metadata` folder.

```
npm run cli publish metadata/simpleDownloadDataset.json
Expand Down Expand Up @@ -186,23 +194,29 @@ npm run cli <command> [options] <arguments>
**Download:**

- **Positional:**
`npm run cli download did:op:123 ./custom-folder`
`npm run cli download did:op:123 ./custom-folder serviceId`

- **Named Options:**
`npm run cli download --did did:op:123 --folder ./custom-folder`
`npm run cli download --did did:op:123 --folder ./custom-folder --service serviceId`
(Order of `--did` and `--folder` does not matter.)

- **Rules:**
serviceId is optional. If omitted, the CLI defaults to the first available download service.

---

**Start Compute:**

- **Positional:**
`npm run cli startCompute -- did1,did2 algoDid env1 maxJobDuration paymentToken resources --accept true`
`npm run cli startCompute -- did1,did2 algoDid env1 maxJobDuration paymentToken resources svc1,svc2 algoServiceId`

- **Named Options:**
`npm run cli startCompute --datasets did1,did2 --algo algoDid --env env1 --maxJobDuration maxJobDuration --token paymentToken --resources resources --accept true`
`npm run cli startCompute --datasets did1,did2 --algo algoDid --env env1 --maxJobDuration maxJobDuration --token paymentToken --resources resources --accept true --services svc1,svc2 ----algo-service algoServiceId`
(Options can be provided in any order.)

- **Rules:**
serviceIds and algoServiceId are optional. If omitted, the CLI defaults to the first available service.


- `maxJobDuration` is a required parameter an represents the time measured in seconds for job maximum execution, the payment is based on this maxJobDuration value, user needs to provide this.
- `paymentToken` is required and represents the address of the token that is supported by the environment for processing the compute job payment. It can be retrieved from `getComputeEnvironments` command output.
Expand All @@ -218,7 +232,11 @@ e.g.: `'[{"id":"cpu","amount":3},{"id":"ram","amount":16772672536},{"id":"disk",
`npm run cli startFreeCompute did1,did2 algoDid env1`

- **Named Options:**
`npm run cli startFreeCompute --datasets did1,did2 --algo algoDid --env env1`
`npm run cli startFreeCompute --datasets did1,did2 --algo algoDid --env env1 --services svc1,svc2 ----algo-service algoServiceId`
(Options can be provided in any order.)

- **Rules:**
serviceIds and algoServiceId are optional. If omitted, the CLI defaults to the first available service.`
(Options can be provided in any order.)

---
Expand Down Expand Up @@ -416,6 +434,8 @@ e.g.: `'[{"id":"cpu","amount":3},{"id":"ram","amount":16772672536},{"id":"disk",
- **download:**
`-d, --did <did>`
`-f, --folder [destinationFolder]` (Default: `.`)
`-s, --service <serviceId>` (Optional, target a specific service)


- **startCompute:**
`-d, --datasets <datasetDids>`
Expand All @@ -426,11 +446,15 @@ e.g.: `'[{"id":"cpu","amount":3},{"id":"ram","amount":16772672536},{"id":"disk",
`-t, --token <paymentToken>`
`--resources <resources>`
`--amountToDeposit <amountToDeposit>` (Id `''`, it will fallback to initialize compute payment amount.)
`-s, --services [serviceIds]` (Optional, comma-separated; must match datasetDids length, positional 1–1)
`-x, --algo-service [algoServiceId]` (Optional, override algorithm service)

- **startFreeCompute:**
`-d, --datasets <datasetDids>`
`-a, --algo <algoDid>`
`-e, --env <computeEnvId>`
`-s, --services [serviceIds]` (Optional, comma-separated; must match datasetDids length, positional 1–1)
`-x, --algo-service [algoServiceId]` (Optional, override algorithm service)

- **getComputeEnvironments:**

Expand Down
199 changes: 199 additions & 0 deletions metadata/jsAlgoV5.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,199 @@
{
"@context": [
"https://www.w3.org/ns/credentials/v2"
],
"id": "did:ope",
"version": "5.0.0",
"credentialSubject": {
"chainId": 8996,
"metadata": {
"created": "2025-09-09T11:57:52Z",
"updated": "2025-09-09T11:57:52Z",
"type": "algorithm",
"name": "cli algo test",
"description": {
"@value": "testing algo",
"@direction": "",
"@language": ""
},
"tags": [
"test"
],
"author": "",
"license": {
"name": "https://raw.githubusercontent.com/oceanprotocol/c2d-examples/main/branin_and_gpr/branin.arff",
"licenseDocuments": [
{
"sha256": "71a828f4ddc3fee436d80fc5b02535fc5e13ae8f19eae87ec02734bb01126c5b",
"mirrors": [
{
"method": "get",
"type": "url",
"url": "https://raw.githubusercontent.com/oceanprotocol/c2d-examples/main/branin_and_gpr/branin.arff"
}
],
"name": "https://raw.githubusercontent.com/oceanprotocol/c2d-examples/main/branin_and_gpr/branin.arff",
"fileType": "text/plain; charset=utf-8"
}
]
},
"links": {},
"additionalInformation": {
"termsAndConditions": true
},
"algorithm": {
"language": "arff",
"version": "0.1",
"container": {
"entrypoint": "node $ALGO",
"image": "node",
"tag": "latest",
"checksum": "sha256:c3688c7b5cc3b159ddf4f744594de62461df7ef43124378f118cb470e4f72bcb"
}
},
"copyrightHolder": "",
"providedBy": ""
},
"services": [
{
"compute": {
"publisherTrustedAlgorithms": [],
"publisherTrustedAlgorithmPublishers": [
"*"
],
"allowRawAlgorithm": false,
"allowNetworkAccess": true
},
"credentials": {
"allow": [
{
"values": [
{
"request_credentials": [
{
"format": "jwt_vc_json",
"policies": [],
"type": "UniversityDegree"
}
],
"vc_policies": [
"not-before",
"revoked-status-list",
"signature"
]
}
],
"type": "SSIpolicy"
},
{
"values": [
{
"address": "*"
}
],
"type": "address"
}
],
"match_deny": "any",
"deny": []
},
"name": "test service",
"files": {
"datatokenAddress": "0x0",
"nftAddress": "0x0",
"files": [
{
"type": "url",
"url": "https://raw.githubusercontent.com/oceanprotocol/c2d-examples/main/branin_and_gpr/branin.arff",
"method": "GET"
}
]
},
"description": {
"@value": "testing new service",
"@direction": "ltr",
"@language": "en"
},
"id": "23033c06ea9adc6ff5dff42938417c7750e75efbdfbfecf5d6d544705450df24",
"datatokenAddress": "0x0",
"serviceEndpoint": "https://ocean-node-vm3.oceanenterprise.io",
"state": 0,
"type": "compute",
"timeout": 31556952
}
],
"nftAddress": "0x0",
"credentials": {
"allow": [
{
"values": [
{
"request_credentials": [
{
"format": "jwt_vc_json",
"policies": [],
"type": "UniversityDegree"
}
],
"vc_policies": [
"not-before",
"revoked-status-list",
"signature"
]
}
],
"type": "SSIpolicy"
},
{
"values": [
{
"address": "*"
}
],
"type": "address"
}
],
"deny": [],
"match_deny": "any"
}
},
"additionalDdos": [],
"type": [
"VerifiableCredential"
],
"issuer": "did:jwk:eyJrdHkiOiJPS1AiLCJjcnYiOiJFZDI1NTE5Iiwia2lkIjoiekxlRGh1UG15QndrampiV1pRZTBPeHdEMjMxYmx3aXFTMGQ0VTJETnZFbyIsIngiOiJta3NvaEladWlsblJWWmhTbmwxNGRpdTZZWDF3UUFFX0ozbWJoWDNDOFRjIn0",
"indexedMetadata": {
"stats": [
{
"symbol": "OEAT",
"name": "Access Token",
"orders": 0,
"datatokenAddress": "",
"serviceId": "23033c06ea9adc6ff5dff42938417c7750e75efbdfbfecf5d6d544705450df24",
"prices": [
{
"exchangeId": "",
"price": "2.0",
"contract": "",
"type": "fixedrate",
"token": ""
}
]
}
],
"nft": {
"state": 0,
"address": "",
"name": "Data NFT",
"symbol": "OEC-NFT",
"owner": "",
"created": "",
"tokenURI": ""
},
"event": {
},
"purgatory": {
"state": false
}
}
}
Loading