A new CLI generated with oclif
$ npm install -g pontus-x_cli
$ pontus-x_cli COMMAND
running command...
$ pontus-x_cli (--version)
pontus-x_cli/1.2.5 darwin-arm64 node-v20.19.4
$ pontus-x_cli --help [COMMAND]
USAGE
$ pontus-x_cli COMMAND
...Example:
metadata:
type: algorithm
author: Universitat de Lleida (UdL)
name: Exploratory Data Analysis
description: description.md
...Check samples/publish folder for more examples.
Example:
accounts:
- name: Universitat de Lleida (UdL)
address: '0xd999baae98ac5246568fd726be8832c49626867d'
privateKeyPath: keys/d999baae98ac5246568fd726be8832c49626867d.json
passwordEnvKey: UDL_KEY_PASSWORDpontus-x_cli access DIDpontus-x_cli autocomplete [SHELL]pontus-x_cli change-price DID NEWPRICEpontus-x_cli check-participant-compliancepontus-x_cli compute [ALGORITHM]pontus-x_cli compute-results JOBIDpontus-x_cli compute-status JOBIDpontus-x_cli edit-additional-metadata DID METADATAFILEpontus-x_cli edit-algo DID IMAGE TAG CHECKSUM ENTRYPOINTpontus-x_cli edit-asset-url DID URLpontus-x_cli edit-trusted-algospontus-x_cli edit-trusted-publisherspontus-x_cli export-private-keypontus-x_cli generate-asset-credentials DIDpontus-x_cli generate-did-webpontus-x_cli generate-participant-credentialspontus-x_cli get DIDpontus-x_cli help [COMMAND]pontus-x_cli login KEYFILEpontus-x_cli logoutpontus-x_cli publish PATHpontus-x_cli render [DID]pontus-x_cli revokepontus-x_cli self-description DID SDURL
Access an asset that can be downloaded given its DID
USAGE
$ pontus-x_cli access DID
ARGUMENTS
DID DID of the asset
DESCRIPTION
Access an asset that can be downloaded given its DID
EXAMPLES
$ pontus-x_cli access did:op:af3e93c4f18903f91b108e7204b8a752e7605f4547ed507212bd6aca63af5686
See code: src/commands/access.ts
Display autocomplete installation instructions.
USAGE
$ pontus-x_cli autocomplete [SHELL] [-r]
ARGUMENTS
[SHELL] (zsh|bash|powershell) Shell type
FLAGS
-r, --refresh-cache Refresh cache (ignores displaying instructions)
DESCRIPTION
Display autocomplete installation instructions.
EXAMPLES
$ pontus-x_cli autocomplete
$ pontus-x_cli autocomplete bash
$ pontus-x_cli autocomplete zsh
$ pontus-x_cli autocomplete powershell
$ pontus-x_cli autocomplete --refresh-cache
See code: @oclif/plugin-autocomplete
Change the price keeping the existing currency for an asset with the given DID
USAGE
$ pontus-x_cli change-price DID NEWPRICE [-y]
ARGUMENTS
DID DID of the asset
NEWPRICE New price for the asset
FLAGS
-y, --yes Automatic yes to prompts
DESCRIPTION
Change the price keeping the existing currency for an asset with the given DID
EXAMPLES
$ pontus-x_cli change-price did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a 10
See code: src/commands/change-price.ts
Use Gaia-X Compliance to check a participant Verifiable Presentation
USAGE
$ pontus-x_cli check-participant-compliance -p <value> --vp <value>
FLAGS
-p, --participant=<value> (required) Path to the JSON file including the required participant data
--vp=<value> (required) Path to the participant Verifiable Presentation file
DESCRIPTION
Use Gaia-X Compliance to check a participant Verifiable Presentation
EXAMPLES
$ pontus-x_cli check-participant-compliance -p ./CEP.data.json --vp ./CEP.vp.json
See code: src/commands/check-participant-compliance.ts
Compute the algorithm on one or more datasets.
USAGE
$ pontus-x_cli compute [ALGORITHM] [-d <value>...] [-y] [-m <value>] [-n PONTUSXDEV|PONTUSXTEST]
ARGUMENTS
[ALGORITHM] Algorithm DID (did:op:...)
FLAGS
-d, --datasets=<value>... Dataset DIDs (did:op:...)
-m, --manifest=<value> Path to manifest file with the accounts to use for authentication
-n, --network=<option> Network to use (env: NETWORK)
<options: PONTUSXDEV|PONTUSXTEST>
-y, --yes Automatic yes to prompts
DESCRIPTION
Compute the algorithm on one or more datasets.
EXAMPLES
$ pontus-x_cli compute <algorithmDid> -d <datasetDid1> <datasetDid2> ...
$ pontus-x_cli compute <algorithmDid> -t <tag1> -t <tag2> ...
See code: src/commands/compute.ts
Get the compute job results.
USAGE
$ pontus-x_cli compute-results JOBID -p <value>
ARGUMENTS
JOBID Compute job ID
FLAGS
-p, --provider=<value> (required) [default: https://provider.agrospai.udl.cat] The Provider URL
DESCRIPTION
Get the compute job results.
EXAMPLES
$ pontus-x_cli compute-results 215bae450c8f40f59bfc5d1ccada3931 -p https://provider.agrospai.udl.cat
See code: src/commands/compute-results.ts
Check compute job status.
USAGE
$ pontus-x_cli compute-status JOBID -p <value>
ARGUMENTS
JOBID Compute job ID
FLAGS
-p, --provider=<value> (required) [default: https://provider.agrospai.udl.cat] The Provider URL
DESCRIPTION
Check compute job status.
EXAMPLES
$ pontus-x_cli compute-status 215bae450c8f40f59bfc5d1ccada3931 -p https://provider.agrospai.udl.cat
See code: src/commands/compute-status.ts
Change the container additional metadata for a given DID
USAGE
$ pontus-x_cli edit-additional-metadata DID METADATAFILE [-y]
ARGUMENTS
DID Algorithm DID
METADATAFILE JSON metadata file path
FLAGS
-y, --yes Skip confirmation prompt
DESCRIPTION
Change the container additional metadata for a given DID
EXAMPLES
$ pontus-x_cli edit-additional-metadata did:op:dcdb747f8feff3122c6d6c0f45a339a6e09415e721f98f61cc2c1d62ab35a21f ./metadata.json
See code: src/commands/edit-additional-metadata.ts
Change the container metadata for a given algorithm DID
USAGE
$ pontus-x_cli edit-algo DID IMAGE TAG CHECKSUM ENTRYPOINT [-y]
ARGUMENTS
DID Algorithm DID
IMAGE Container image
TAG Container tag
CHECKSUM Image checksum
ENTRYPOINT Algorithm entrypoint
FLAGS
-y, --yes Skip confirmation prompt
DESCRIPTION
Change the container metadata for a given algorithm DID
EXAMPLES
$ pontus-x_cli edit-algo did:op:dcdb747f8feff3122c6d6c0f45a339a6e09415e721f98f61cc2c1d62ab35a21f rogargon/pandas-profiling 4.16 sha256:81dca5439f07dff4d56097546a9fce7335be3de8e2622dc105c64e54376f86b5 "python /algorithm/src/main.py"
See code: src/commands/edit-algo.ts
Change the URL of an asset DID
USAGE
$ pontus-x_cli edit-asset-url DID URL [-y]
ARGUMENTS
DID DID of the asset
URL New URL for the asset
FLAGS
-y, --yes Automatic yes to prompts
DESCRIPTION
Change the URL of an asset DID
EXAMPLES
$ pontus-x_cli edit-asset-url did:op:af3e93c4f18903f91b108e7204b8a752e7605f4547ed507212bd6aca63af5686 https://raw.githubusercontent.com/plotly/datasets/refs/heads/master/titanic.csv
See code: src/commands/edit-asset-url.ts
Overwrite datasets trusted algorithms
USAGE
$ pontus-x_cli edit-trusted-algos [-d <value>...] [-a <value>...] [-y] [-m <value>] [-p] [-n PONTUSXDEV|PONTUSXTEST]
FLAGS
-a, --algorithms=<value>... Trusted algorithm DIDs (did:op:...)
-d, --datasets=<value>... Dataset DIDs (did:op:...)
-m, --manifest=<value> Path to manifest file with the accounts to use for authentication
-n, --network=<option> Network to use (env: NETWORK)
<options: PONTUSXDEV|PONTUSXTEST>
-p, --public Make dataset public (set all algorithms as trusted)
-y, --yes Skip confirmation prompt
DESCRIPTION
Overwrite datasets trusted algorithms
EXAMPLES
$ pontus-x_cli edit-trusted-algos -d <datasetDid1> <datasetDid2> ... -a <algorithmDid1> <algorithmDid2> ...
See code: src/commands/edit-trusted-algos.ts
Overwrite datasets trusted publishers
USAGE
$ pontus-x_cli edit-trusted-publishers [-d <value>...] [-p <value>...] [-y] [-m <value>] [-n PONTUSXDEV|PONTUSXTEST]
FLAGS
-d, --datasets=<value>... Dataset DIDs (did:op:...)
-m, --manifest=<value> Path to manifest file with the accounts to use for authentication
-n, --network=<option> Network to use (env: NETWORK)
<options: PONTUSXDEV|PONTUSXTEST>
-p, --publishers=<value>... Trusted publisher DIDs (did:op:...)
-y, --yes Skip confirmation prompt
DESCRIPTION
Overwrite datasets trusted publishers
EXAMPLES
$ pontus-x_cli edit-trusted-publishers -d <datasetDid1> <datasetDid2> ... -p <publisherDid1> <publisherDid2> ...
See code: src/commands/edit-trusted-publishers.ts
Export your private key as a JSON file, to use later with the login command or for Pontus-X portals automation
USAGE
$ pontus-x_cli export-private-key [-f <value>] [-p <value>] [-k <value>]
FLAGS
-f, --filepath=<value> File path to save the encrypted private key (default is <address>.json)
-k, --privateKey=<value> Your private key
-p, --password=<value> Password to encrypt the private key file
DESCRIPTION
Export your private key as a JSON file, to use later with the login command or for Pontus-X portals automation
EXAMPLES
$ pontus-x_cli export-private-key
See code: src/commands/export-private-key.ts
Generate the Gaia-X credentials for the input DID asset, including its verifiable presentation
USAGE
$ pontus-x_cli generate-asset-credentials DID -c <value> -d <value> -p <value> [-w <value>]
ARGUMENTS
DID DID of the asset
FLAGS
-c, --certificate=<value> (required) Path to the certificate.key file
-d, --didjson=<value> (required) Path to the did.json file
-p, --participant=<value> (required) Path to the JSON file including the required participant data
-w, --password=<value> Password for the private key file (if not provided, it will be asked interactively)
DESCRIPTION
Generate the Gaia-X credentials for the input DID asset, including its verifiable presentation
EXAMPLES
$ pontus-x_cli generate-asset-credentials -p ./CEP.data.json -d ./did.json -c certificate.key did:op:01f8bc1e797a854dc718bd7a802acb07c5fc39f706b03dd454bceb66be6828c6
See code: src/commands/generate-asset-credentials.ts
Generate a did.json to set up a DID-Web source to publish Gaia-X complaint credentials
USAGE
$ pontus-x_cli generate-did-web -c <value> -d <value>
FLAGS
-c, --certificate=<value> (required) Path to the file with the certificate chain for the DID domain URL
-d, --domain=<value> (required) URL where the DID-Web document will be hosted
DESCRIPTION
Generate a did.json to set up a DID-Web source to publish Gaia-X complaint credentials
EXAMPLES
$ pontus-x_cli generate-did-web -d <https://compliance.agrospai.udl.cat> -c certificate-chain.crt
See code: src/commands/generate-did-web.ts
Generate the Gaia-X credentials for the participant including their verifiable presentation
USAGE
$ pontus-x_cli generate-participant-credentials -c <value> -d <value> -p <value> [-w <value>]
FLAGS
-c, --certificate=<value> (required) Path to the certificate.key file
-d, --didjson=<value> (required) Path to the did.json file
-p, --participant=<value> (required) Path to the JSON file including the required participant data
-w, --password=<value> Password for the private key file (if not provided, it will be asked interactively)
DESCRIPTION
Generate the Gaia-X credentials for the participant including their verifiable presentation
EXAMPLES
$ pontus-x_cli generate-participant-credentials -p ./CEP.data.json -d ./did.json -c certificate.key
See code: src/commands/generate-participant-credentials.ts
Get the available metadata to the asset with the given DID
USAGE
$ pontus-x_cli get DID
ARGUMENTS
DID DID of the asset
DESCRIPTION
Get the available metadata to the asset with the given DID
EXAMPLES
$ pontus-x_cli get did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a
See code: src/commands/get.ts
Display help for pontus-x_cli.
USAGE
$ pontus-x_cli help [COMMAND...] [-n]
ARGUMENTS
[COMMAND...] Command to show help for.
FLAGS
-n, --nested-commands Include all nested commands in the output.
DESCRIPTION
Display help for pontus-x_cli.
See code: @oclif/plugin-help
Login to retrieve your private key from a JSON key store and store it in .env
USAGE
$ pontus-x_cli login KEYFILE [-p <value>]
ARGUMENTS
KEYFILE Path to the keyFile.json
FLAGS
-p, --password=<value> Password to decrypt the key file
DESCRIPTION
Login to retrieve your private key from a JSON key store and store it in .env
EXAMPLES
$ pontus-x_cli login d999baae98ac5246568fd726be8832c49626867d.json
See code: src/commands/login.ts
Logout to remove your private key from .env file
USAGE
$ pontus-x_cli logout
DESCRIPTION
Logout to remove your private key from .env file
EXAMPLES
$ pontus-x_cli logout
See code: src/commands/logout.ts
Publish the asset as instructed in the provided script folder.
USAGE
$ pontus-x_cli publish PATH [--dry-run] [-m <value>] [-p <value>] [-r]
ARGUMENTS
PATH Path to find a JSON/YAML or TS file describing the asset to publish
FLAGS
-m, --manifest=<value> [default: ./manifest.yaml] Path to the manifest file
-p, --provider=<value> [default: https://provider.agrospai.udl.cat] The Provider URL
-r, --recursive Recursively publish assets in a directory (only for JSON/YAML files)
--dry-run Dry run the publishing process
DESCRIPTION
Publish the asset as instructed in the provided script folder.
EXAMPLES
$ pontus-x_cli publish samples/publish/algo/
$ pontus-x_cli publish samples/publish/algo/spec.json
$ pontus-x_cli publish samples/publish/algo/spec.yaml
$ pontus-x_cli publish samples/publish/algo/index.ts
See code: src/commands/publish.ts
USAGE
$ pontus-x_cli render [DID] [-d <value>] [-t <value>...] [-a]
ARGUMENTS
[DID] Dataset DID
FLAGS
-a, --onlyAccess Only render datasets with an access service
-d, --dst=<value> [default: rendered] Destination folder to save the rendered specs
-t, --tags=<value>... Tags to filter datasets (they must have all the provided tags)
See code: src/commands/render.ts
Publisher revocation of one or more owned DIDs
USAGE
$ pontus-x_cli revoke [-d <value>...] [-m <value>] [-p <value>...] [-r] [-y]
FLAGS
-d, --dids=<value>... DID to revoke
-m, --manifest=<value> [default: ./manifest.yaml] Path to the manifest file
-p, --paths=<value>... Path to find a JSON/YAML file describing the assets to revoke
-r, --recursive Recursively revoke assets in a directory (only for JSON/YAML files)
-y, --yes Skip confirmation prompt
DESCRIPTION
Publisher revocation of one or more owned DIDs
EXAMPLES
$ pontus-x_cli revoke -d did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a did:op:abcee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7b
See code: src/commands/revoke.ts
Associate Gaia-X Self-Description to the asset with the given DID
USAGE
$ pontus-x_cli self-description DID SDURL [-y]
ARGUMENTS
DID DID of the asset
SDURL URL of the Self-Description
FLAGS
-y, --yes Skip confirmation prompt
DESCRIPTION
Associate Gaia-X Self-Description to the asset with the given DID
EXAMPLES
$ pontus-x_cli self-description did:op:d22954f2cbf6a85c897ce605c275cc786e099592cc59e3b7dd66b93e784bed8c https://example.com/self-description.json
See code: src/commands/self-description.ts
You can use the following command to obtain the certificate chain for the compliance service:
curl -o certificate-chain.crt "https://whatsmychaincert.com/generate?include_leaf=1&include_root=1&host=compliance.agrospai.udl.cat"If you are using Kubernetes with cert-manager, you can extract the key with the following command:
kubectl get secret compliance-tls -n tenant-1 -o jsonpath='{.data.tls\.key}' | base64 --decode > certificate.keynpm installnpm run build./bin/dev.js COMMAND./bin/run.js COMMANDnpm run dev -- COMMANDnpm install -g .npm run formatnpm run lintnpm run tscYou can customize the tests in test/config.ts file. The two most important parameters are PRIVATE_KEY_PATH and PRIVATE_KEY_PASSWORD.
By default, you need to have the privateKey.json file in the base root. Which you can generate with the command: npm run dev export-private-key -f privateKey.json.
The tests are organized in folders by functionality:
test/
├── auth/
├── read/
└── write/
- auth: commands related to authentication.
- read: commands that do not make modifications in the blockchain.
- write: commands that make modifications in the blockchain. All write commands are run sequentially to avoid conflicts.
Because the tests interact with the blockchain, we need to first deploy some assets manually and keep track of their DIDs. To do that, you can run:
npm run test:initThere are some tests that need the certificate.key to be present in the samples/data folder. You can obtain it following the instructions in the How to obtain the certificate key section.
Whenever you want to clean up the deployed assets in the blockchain, you can run:
npm run test:cleannpm run testnpm run test TEST_NAME # example: access, login, get, etc.npm run test TEST_FOLDER # example: auth, read, writenpm run test:watch TEST_NAME # example: access, login, get, etc.npm run test:uinpx vitest --reporter=htmlnpm run prepack
npm run postpacknpm run schema