pontus-x_cli 1.2.7 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +131 -43
- package/dist/commands/access.js +17 -2
- package/dist/commands/access.js.map +1 -1
- package/dist/commands/change-currency.d.ts +13 -0
- package/dist/commands/change-currency.js +69 -0
- package/dist/commands/change-currency.js.map +1 -0
- package/dist/commands/change-price.js +7 -5
- package/dist/commands/change-price.js.map +1 -1
- package/dist/commands/compute-results.d.ts +1 -1
- package/dist/commands/compute-results.js +5 -6
- package/dist/commands/compute-results.js.map +1 -1
- package/dist/commands/compute-status.d.ts +1 -1
- package/dist/commands/compute-status.js +12 -8
- package/dist/commands/compute-status.js.map +1 -1
- package/dist/commands/compute.d.ts +3 -3
- package/dist/commands/compute.js +70 -52
- package/dist/commands/compute.js.map +1 -1
- package/dist/commands/edit-additional-metadata.d.ts +1 -1
- package/dist/commands/edit-additional-metadata.js +16 -11
- package/dist/commands/edit-additional-metadata.js.map +1 -1
- package/dist/commands/edit-algo.js +12 -4
- package/dist/commands/edit-algo.js.map +1 -1
- package/dist/commands/edit-asset-allowed.d.ts +1 -1
- package/dist/commands/edit-asset-allowed.js +73 -43
- package/dist/commands/edit-asset-allowed.js.map +1 -1
- package/dist/commands/edit-asset-url.js +13 -5
- package/dist/commands/edit-asset-url.js.map +1 -1
- package/dist/commands/edit-compute-network.d.ts +14 -0
- package/dist/commands/edit-compute-network.js +78 -0
- package/dist/commands/edit-compute-network.js.map +1 -0
- package/dist/commands/edit-keywords.d.ts +13 -0
- package/dist/commands/edit-keywords.js +57 -0
- package/dist/commands/edit-keywords.js.map +1 -0
- package/dist/commands/edit-trusted-algos.d.ts +1 -1
- package/dist/commands/edit-trusted-algos.js +53 -45
- package/dist/commands/edit-trusted-algos.js.map +1 -1
- package/dist/commands/edit-trusted-publishers.js +13 -5
- package/dist/commands/edit-trusted-publishers.js.map +1 -1
- package/dist/commands/generate-asset-credentials.js +1 -1
- package/dist/commands/generate-asset-credentials.js.map +1 -1
- package/dist/commands/generate-manifest.d.ts +3 -3
- package/dist/commands/generate-manifest.js +20 -20
- package/dist/commands/generate-manifest.js.map +1 -1
- package/dist/commands/generate-private-keys.d.ts +2 -2
- package/dist/commands/generate-private-keys.js +26 -26
- package/dist/commands/generate-private-keys.js.map +1 -1
- package/dist/commands/get.js +2 -2
- package/dist/commands/get.js.map +1 -1
- package/dist/commands/publish.d.ts +2 -1
- package/dist/commands/publish.js +54 -7
- package/dist/commands/publish.js.map +1 -1
- package/dist/commands/render.js +46 -27
- package/dist/commands/render.js.map +1 -1
- package/dist/commands/revoke.js +11 -5
- package/dist/commands/revoke.js.map +1 -1
- package/dist/commands/self-description.js +8 -3
- package/dist/commands/self-description.js.map +1 -1
- package/dist/config.d.ts +17 -14
- package/dist/config.js +75 -49
- package/dist/config.js.map +1 -1
- package/dist/lib/aquarius.js +95 -27
- package/dist/lib/aquarius.js.map +1 -1
- package/dist/lib/gaia-x_compliance/generate-credentials/index.js +35 -20
- package/dist/lib/gaia-x_compliance/generate-credentials/index.js.map +1 -1
- package/dist/lib/spec.d.ts +3 -3
- package/dist/lib/spec.js +66 -30
- package/dist/lib/spec.js.map +1 -1
- package/dist/scripts/patch-nautilus.cjs +15 -0
- package/dist/scripts/patch-nautilus.cjs.map +1 -0
- package/dist/scripts/patch-nautilus.d.cts +1 -0
- package/dist/types/manifest-schema.json +2 -8
- package/dist/types/schema.json +467 -62
- package/dist/utils/asset.d.ts +2 -2
- package/dist/utils/asset.js +23 -23
- package/dist/utils/asset.js.map +1 -1
- package/dist/utils/connection.d.ts +2 -1
- package/dist/utils/connection.js +84 -4
- package/dist/utils/connection.js.map +1 -1
- package/dist/utils/login.d.ts +2 -2
- package/dist/utils/login.js +13 -13
- package/dist/utils/login.js.map +1 -1
- package/oclif.manifest.json +169 -15
- package/package.json +6 -6
package/README.md
CHANGED
|
@@ -22,7 +22,7 @@ $ npm install -g pontus-x_cli
|
|
|
22
22
|
$ pontus-x_cli COMMAND
|
|
23
23
|
running command...
|
|
24
24
|
$ pontus-x_cli (--version)
|
|
25
|
-
pontus-x_cli/
|
|
25
|
+
pontus-x_cli/2.0.0 linux-x64 node-v26.12.0
|
|
26
26
|
$ pontus-x_cli --help [COMMAND]
|
|
27
27
|
USAGE
|
|
28
28
|
$ pontus-x_cli COMMAND
|
|
@@ -62,6 +62,7 @@ accounts:
|
|
|
62
62
|
<!-- commands -->
|
|
63
63
|
* [`pontus-x_cli access DID`](#pontus-x_cli-access-did)
|
|
64
64
|
* [`pontus-x_cli autocomplete [SHELL]`](#pontus-x_cli-autocomplete-shell)
|
|
65
|
+
* [`pontus-x_cli change-currency DID NEWCURRENCY`](#pontus-x_cli-change-currency-did-newcurrency)
|
|
65
66
|
* [`pontus-x_cli change-price DID NEWPRICE`](#pontus-x_cli-change-price-did-newprice)
|
|
66
67
|
* [`pontus-x_cli check-participant-compliance`](#pontus-x_cli-check-participant-compliance)
|
|
67
68
|
* [`pontus-x_cli compute [ALGORITHM]`](#pontus-x_cli-compute-algorithm)
|
|
@@ -71,6 +72,8 @@ accounts:
|
|
|
71
72
|
* [`pontus-x_cli edit-algo DID IMAGE TAG CHECKSUM ENTRYPOINT`](#pontus-x_cli-edit-algo-did-image-tag-checksum-entrypoint)
|
|
72
73
|
* [`pontus-x_cli edit-asset-allowed`](#pontus-x_cli-edit-asset-allowed)
|
|
73
74
|
* [`pontus-x_cli edit-asset-url DID URL`](#pontus-x_cli-edit-asset-url-did-url)
|
|
75
|
+
* [`pontus-x_cli edit-compute-network DID`](#pontus-x_cli-edit-compute-network-did)
|
|
76
|
+
* [`pontus-x_cli edit-keywords DID KEYWORDS`](#pontus-x_cli-edit-keywords-did-keywords)
|
|
74
77
|
* [`pontus-x_cli edit-trusted-algos`](#pontus-x_cli-edit-trusted-algos)
|
|
75
78
|
* [`pontus-x_cli edit-trusted-publishers`](#pontus-x_cli-edit-trusted-publishers)
|
|
76
79
|
* [`pontus-x_cli export-private-key`](#pontus-x_cli-export-private-key)
|
|
@@ -106,7 +109,7 @@ EXAMPLES
|
|
|
106
109
|
$ pontus-x_cli access did:op:af3e93c4f18903f91b108e7204b8a752e7605f4547ed507212bd6aca63af5686
|
|
107
110
|
```
|
|
108
111
|
|
|
109
|
-
_See code: [src/commands/access.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
112
|
+
_See code: [src/commands/access.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/access.ts)_
|
|
110
113
|
|
|
111
114
|
## `pontus-x_cli autocomplete [SHELL]`
|
|
112
115
|
|
|
@@ -139,6 +142,30 @@ EXAMPLES
|
|
|
139
142
|
|
|
140
143
|
_See code: [@oclif/plugin-autocomplete](https://github.com/oclif/plugin-autocomplete/blob/v3.2.38/src/commands/autocomplete/index.ts)_
|
|
141
144
|
|
|
145
|
+
## `pontus-x_cli change-currency DID NEWCURRENCY`
|
|
146
|
+
|
|
147
|
+
Change the currency keeping the existing price for an asset with the given DID
|
|
148
|
+
|
|
149
|
+
```
|
|
150
|
+
USAGE
|
|
151
|
+
$ pontus-x_cli change-currency DID NEWCURRENCY [-y]
|
|
152
|
+
|
|
153
|
+
ARGUMENTS
|
|
154
|
+
DID DID of the asset
|
|
155
|
+
NEWCURRENCY (EURAU|EUROe) New currency for the asset
|
|
156
|
+
|
|
157
|
+
FLAGS
|
|
158
|
+
-y, --yes Automatic yes to prompts
|
|
159
|
+
|
|
160
|
+
DESCRIPTION
|
|
161
|
+
Change the currency keeping the existing price for an asset with the given DID
|
|
162
|
+
|
|
163
|
+
EXAMPLES
|
|
164
|
+
$ pontus-x_cli change-currency did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a EURAU
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
_See code: [src/commands/change-currency.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/change-currency.ts)_
|
|
168
|
+
|
|
142
169
|
## `pontus-x_cli change-price DID NEWPRICE`
|
|
143
170
|
|
|
144
171
|
Change the price keeping the existing currency for an asset with the given DID
|
|
@@ -161,7 +188,7 @@ EXAMPLES
|
|
|
161
188
|
$ pontus-x_cli change-price did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a 10
|
|
162
189
|
```
|
|
163
190
|
|
|
164
|
-
_See code: [src/commands/change-price.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
191
|
+
_See code: [src/commands/change-price.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/change-price.ts)_
|
|
165
192
|
|
|
166
193
|
## `pontus-x_cli check-participant-compliance`
|
|
167
194
|
|
|
@@ -182,7 +209,7 @@ EXAMPLES
|
|
|
182
209
|
$ pontus-x_cli check-participant-compliance -p ./CEP.data.json --vp ./CEP.vp.json
|
|
183
210
|
```
|
|
184
211
|
|
|
185
|
-
_See code: [src/commands/check-participant-compliance.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
212
|
+
_See code: [src/commands/check-participant-compliance.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/check-participant-compliance.ts)_
|
|
186
213
|
|
|
187
214
|
## `pontus-x_cli compute [ALGORITHM]`
|
|
188
215
|
|
|
@@ -191,7 +218,7 @@ Compute the algorithm on one or more datasets.
|
|
|
191
218
|
```
|
|
192
219
|
USAGE
|
|
193
220
|
$ pontus-x_cli compute [ALGORITHM] [-d <value>...] [-y] [-m <value>] [-a <value>] [-n
|
|
194
|
-
PONTUSXDEV|PONTUSXTEST]
|
|
221
|
+
PONTUSXDEV|PONTUSXTEST|OP_SEPOLIA]
|
|
195
222
|
|
|
196
223
|
ARGUMENTS
|
|
197
224
|
[ALGORITHM] Algorithm DID (did:op:...)
|
|
@@ -201,7 +228,7 @@ FLAGS
|
|
|
201
228
|
-d, --datasets=<value>... Dataset DIDs (did:op:...)
|
|
202
229
|
-m, --manifest=<value> Path to manifest file with the accounts to use for authentication
|
|
203
230
|
-n, --network=<option> Network to use (env: NETWORK)
|
|
204
|
-
<options: PONTUSXDEV|PONTUSXTEST>
|
|
231
|
+
<options: PONTUSXDEV|PONTUSXTEST|OP_SEPOLIA>
|
|
205
232
|
-y, --yes Automatic yes to prompts
|
|
206
233
|
|
|
207
234
|
DESCRIPTION
|
|
@@ -213,7 +240,7 @@ EXAMPLES
|
|
|
213
240
|
$ pontus-x_cli compute <algorithmDid> -t <tag1> -t <tag2> ...
|
|
214
241
|
```
|
|
215
242
|
|
|
216
|
-
_See code: [src/commands/compute.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
243
|
+
_See code: [src/commands/compute.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/compute.ts)_
|
|
217
244
|
|
|
218
245
|
## `pontus-x_cli compute-results JOBID`
|
|
219
246
|
|
|
@@ -221,22 +248,22 @@ Get the compute job results.
|
|
|
221
248
|
|
|
222
249
|
```
|
|
223
250
|
USAGE
|
|
224
|
-
$ pontus-x_cli compute-results JOBID -p <value>
|
|
251
|
+
$ pontus-x_cli compute-results JOBID [-p <value>]
|
|
225
252
|
|
|
226
253
|
ARGUMENTS
|
|
227
254
|
JOBID Compute job ID
|
|
228
255
|
|
|
229
256
|
FLAGS
|
|
230
|
-
-p, --provider=<value>
|
|
257
|
+
-p, --provider=<value> Ocean Node URL (defaults to configured oceanNodeUri)
|
|
231
258
|
|
|
232
259
|
DESCRIPTION
|
|
233
260
|
Get the compute job results.
|
|
234
261
|
|
|
235
262
|
EXAMPLES
|
|
236
|
-
$ pontus-x_cli compute-results 215bae450c8f40f59bfc5d1ccada3931
|
|
263
|
+
$ pontus-x_cli compute-results 0x1234...-215bae450c8f40f59bfc5d1ccada3931
|
|
237
264
|
```
|
|
238
265
|
|
|
239
|
-
_See code: [src/commands/compute-results.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
266
|
+
_See code: [src/commands/compute-results.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/compute-results.ts)_
|
|
240
267
|
|
|
241
268
|
## `pontus-x_cli compute-status JOBID`
|
|
242
269
|
|
|
@@ -244,22 +271,22 @@ Check compute job status.
|
|
|
244
271
|
|
|
245
272
|
```
|
|
246
273
|
USAGE
|
|
247
|
-
$ pontus-x_cli compute-status JOBID -p <value>
|
|
274
|
+
$ pontus-x_cli compute-status JOBID [-p <value>]
|
|
248
275
|
|
|
249
276
|
ARGUMENTS
|
|
250
277
|
JOBID Compute job ID
|
|
251
278
|
|
|
252
279
|
FLAGS
|
|
253
|
-
-p, --provider=<value>
|
|
280
|
+
-p, --provider=<value> Ocean Node URL (defaults to configured oceanNodeUri)
|
|
254
281
|
|
|
255
282
|
DESCRIPTION
|
|
256
283
|
Check compute job status.
|
|
257
284
|
|
|
258
285
|
EXAMPLES
|
|
259
|
-
$ pontus-x_cli compute-status 215bae450c8f40f59bfc5d1ccada3931
|
|
286
|
+
$ pontus-x_cli compute-status 0x1234...-215bae450c8f40f59bfc5d1ccada3931
|
|
260
287
|
```
|
|
261
288
|
|
|
262
|
-
_See code: [src/commands/compute-status.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
289
|
+
_See code: [src/commands/compute-status.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/compute-status.ts)_
|
|
263
290
|
|
|
264
291
|
## `pontus-x_cli edit-additional-metadata DID METADATAFILE`
|
|
265
292
|
|
|
@@ -283,7 +310,7 @@ EXAMPLES
|
|
|
283
310
|
$ pontus-x_cli edit-additional-metadata did:op:dcdb747f8feff3122c6d6c0f45a339a6e09415e721f98f61cc2c1d62ab35a21f ./metadata.json
|
|
284
311
|
```
|
|
285
312
|
|
|
286
|
-
_See code: [src/commands/edit-additional-metadata.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
313
|
+
_See code: [src/commands/edit-additional-metadata.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/edit-additional-metadata.ts)_
|
|
287
314
|
|
|
288
315
|
## `pontus-x_cli edit-algo DID IMAGE TAG CHECKSUM ENTRYPOINT`
|
|
289
316
|
|
|
@@ -310,7 +337,7 @@ EXAMPLES
|
|
|
310
337
|
$ pontus-x_cli edit-algo did:op:dcdb747f8feff3122c6d6c0f45a339a6e09415e721f98f61cc2c1d62ab35a21f rogargon/pandas-profiling 4.16 sha256:81dca5439f07dff4d56097546a9fce7335be3de8e2622dc105c64e54376f86b5 "python /algorithm/src/main.py"
|
|
311
338
|
```
|
|
312
339
|
|
|
313
|
-
_See code: [src/commands/edit-algo.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
340
|
+
_See code: [src/commands/edit-algo.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/edit-algo.ts)_
|
|
314
341
|
|
|
315
342
|
## `pontus-x_cli edit-asset-allowed`
|
|
316
343
|
|
|
@@ -318,13 +345,14 @@ Overwrite the list of allowed users for assets
|
|
|
318
345
|
|
|
319
346
|
```
|
|
320
347
|
USAGE
|
|
321
|
-
$ pontus-x_cli edit-asset-allowed [-u <value>...] [-d <value>...] [-y] [-m <value>] [-p] [-n
|
|
348
|
+
$ pontus-x_cli edit-asset-allowed [-u <value>...] [-d <value>...] [-y] [-m <value>] [-p] [-n
|
|
349
|
+
PONTUSXDEV|PONTUSXTEST|OP_SEPOLIA]
|
|
322
350
|
|
|
323
351
|
FLAGS
|
|
324
352
|
-d, --datasets=<value>... Asset DIDs to edit (did:op:...)
|
|
325
353
|
-m, --manifest=<value> Path to manifest file with the accounts to use for authentication
|
|
326
354
|
-n, --network=<option> Network to use (env: NETWORK)
|
|
327
|
-
<options: PONTUSXDEV|PONTUSXTEST>
|
|
355
|
+
<options: PONTUSXDEV|PONTUSXTEST|OP_SEPOLIA>
|
|
328
356
|
-p, --public Make assets public (remove all address restrictions)
|
|
329
357
|
-u, --users=<value>... Ethereum addresses of users to allow (0x...)
|
|
330
358
|
-y, --yes Skip confirmation prompt
|
|
@@ -338,7 +366,7 @@ EXAMPLES
|
|
|
338
366
|
$ pontus-x_cli edit-asset-allowed -u 0xAbc123... --public
|
|
339
367
|
```
|
|
340
368
|
|
|
341
|
-
_See code: [src/commands/edit-asset-allowed.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
369
|
+
_See code: [src/commands/edit-asset-allowed.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/edit-asset-allowed.ts)_
|
|
342
370
|
|
|
343
371
|
## `pontus-x_cli edit-asset-url DID URL`
|
|
344
372
|
|
|
@@ -362,7 +390,58 @@ EXAMPLES
|
|
|
362
390
|
$ pontus-x_cli edit-asset-url did:op:af3e93c4f18903f91b108e7204b8a752e7605f4547ed507212bd6aca63af5686 https://raw.githubusercontent.com/plotly/datasets/refs/heads/master/titanic.csv
|
|
363
391
|
```
|
|
364
392
|
|
|
365
|
-
_See code: [src/commands/edit-asset-url.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
393
|
+
_See code: [src/commands/edit-asset-url.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/edit-asset-url.ts)_
|
|
394
|
+
|
|
395
|
+
## `pontus-x_cli edit-compute-network DID`
|
|
396
|
+
|
|
397
|
+
Enable or disable algorithm network access for an asset's compute service
|
|
398
|
+
|
|
399
|
+
```
|
|
400
|
+
USAGE
|
|
401
|
+
$ pontus-x_cli edit-compute-network DID [-d | -e] [-y]
|
|
402
|
+
|
|
403
|
+
ARGUMENTS
|
|
404
|
+
DID DID of the asset
|
|
405
|
+
|
|
406
|
+
FLAGS
|
|
407
|
+
-d, --disable Disable algorithm network access
|
|
408
|
+
-e, --[no-]enable Enable algorithm network access
|
|
409
|
+
-y, --yes Skip confirmation prompt
|
|
410
|
+
|
|
411
|
+
DESCRIPTION
|
|
412
|
+
Enable or disable algorithm network access for an asset's compute service
|
|
413
|
+
|
|
414
|
+
EXAMPLES
|
|
415
|
+
$ pontus-x_cli edit-compute-network did:ope:37d12a459bed3461cb4553aeac7e8484a7ff144e618fd5a604fb01d73b965d40 --enable
|
|
416
|
+
|
|
417
|
+
$ pontus-x_cli edit-compute-network did:ope:37d12a459bed3461cb4553aeac7e8484a7ff144e618fd5a604fb01d73b965d40 --disable
|
|
418
|
+
```
|
|
419
|
+
|
|
420
|
+
_See code: [src/commands/edit-compute-network.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/edit-compute-network.ts)_
|
|
421
|
+
|
|
422
|
+
## `pontus-x_cli edit-keywords DID KEYWORDS`
|
|
423
|
+
|
|
424
|
+
Change the list of keywords of the indicated DID
|
|
425
|
+
|
|
426
|
+
```
|
|
427
|
+
USAGE
|
|
428
|
+
$ pontus-x_cli edit-keywords DID KEYWORDS [-y]
|
|
429
|
+
|
|
430
|
+
ARGUMENTS
|
|
431
|
+
DID Algorithm DID
|
|
432
|
+
KEYWORDS Comma separated list of keywords
|
|
433
|
+
|
|
434
|
+
FLAGS
|
|
435
|
+
-y, --yes Skip confirmation prompt
|
|
436
|
+
|
|
437
|
+
DESCRIPTION
|
|
438
|
+
Change the list of keywords of the indicated DID
|
|
439
|
+
|
|
440
|
+
EXAMPLES
|
|
441
|
+
$ pontus-x_cli edit-keywords did:op:dcdb747f8feff3122c6d6c0f45a339a6e09415e721f98f61cc2c1d62ab35a21f agrospai,agriculture,data
|
|
442
|
+
```
|
|
443
|
+
|
|
444
|
+
_See code: [src/commands/edit-keywords.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/edit-keywords.ts)_
|
|
366
445
|
|
|
367
446
|
## `pontus-x_cli edit-trusted-algos`
|
|
368
447
|
|
|
@@ -370,14 +449,15 @@ Overwrite datasets trusted algorithms
|
|
|
370
449
|
|
|
371
450
|
```
|
|
372
451
|
USAGE
|
|
373
|
-
$ pontus-x_cli edit-trusted-algos [-d <value>...] [-a <value>...] [-y] [-m <value>] [-p] [-n
|
|
452
|
+
$ pontus-x_cli edit-trusted-algos [-d <value>...] [-a <value>...] [-y] [-m <value>] [-p] [-n
|
|
453
|
+
PONTUSXDEV|PONTUSXTEST|OP_SEPOLIA]
|
|
374
454
|
|
|
375
455
|
FLAGS
|
|
376
456
|
-a, --algorithms=<value>... Trusted algorithm DIDs (did:op:...)
|
|
377
457
|
-d, --datasets=<value>... Dataset DIDs (did:op:...)
|
|
378
458
|
-m, --manifest=<value> Path to manifest file with the accounts to use for authentication
|
|
379
459
|
-n, --network=<option> Network to use (env: NETWORK)
|
|
380
|
-
<options: PONTUSXDEV|PONTUSXTEST>
|
|
460
|
+
<options: PONTUSXDEV|PONTUSXTEST|OP_SEPOLIA>
|
|
381
461
|
-p, --public Make dataset public (set all algorithms as trusted)
|
|
382
462
|
-y, --yes Skip confirmation prompt
|
|
383
463
|
|
|
@@ -388,7 +468,7 @@ EXAMPLES
|
|
|
388
468
|
$ pontus-x_cli edit-trusted-algos -d <datasetDid1> <datasetDid2> ... -a <algorithmDid1> <algorithmDid2> ...
|
|
389
469
|
```
|
|
390
470
|
|
|
391
|
-
_See code: [src/commands/edit-trusted-algos.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
471
|
+
_See code: [src/commands/edit-trusted-algos.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/edit-trusted-algos.ts)_
|
|
392
472
|
|
|
393
473
|
## `pontus-x_cli edit-trusted-publishers`
|
|
394
474
|
|
|
@@ -396,13 +476,14 @@ Overwrite datasets trusted publishers
|
|
|
396
476
|
|
|
397
477
|
```
|
|
398
478
|
USAGE
|
|
399
|
-
$ pontus-x_cli edit-trusted-publishers [-d <value>...] [-p <value>...] [-y] [-m <value>] [-n
|
|
479
|
+
$ pontus-x_cli edit-trusted-publishers [-d <value>...] [-p <value>...] [-y] [-m <value>] [-n
|
|
480
|
+
PONTUSXDEV|PONTUSXTEST|OP_SEPOLIA]
|
|
400
481
|
|
|
401
482
|
FLAGS
|
|
402
483
|
-d, --datasets=<value>... Dataset DIDs (did:op:...)
|
|
403
484
|
-m, --manifest=<value> Path to manifest file with the accounts to use for authentication
|
|
404
485
|
-n, --network=<option> Network to use (env: NETWORK)
|
|
405
|
-
<options: PONTUSXDEV|PONTUSXTEST>
|
|
486
|
+
<options: PONTUSXDEV|PONTUSXTEST|OP_SEPOLIA>
|
|
406
487
|
-p, --publishers=<value>... Trusted publisher DIDs (did:op:...)
|
|
407
488
|
-y, --yes Skip confirmation prompt
|
|
408
489
|
|
|
@@ -413,7 +494,7 @@ EXAMPLES
|
|
|
413
494
|
$ pontus-x_cli edit-trusted-publishers -d <datasetDid1> <datasetDid2> ... -p <publisherDid1> <publisherDid2> ...
|
|
414
495
|
```
|
|
415
496
|
|
|
416
|
-
_See code: [src/commands/edit-trusted-publishers.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
497
|
+
_See code: [src/commands/edit-trusted-publishers.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/edit-trusted-publishers.ts)_
|
|
417
498
|
|
|
418
499
|
## `pontus-x_cli export-private-key`
|
|
419
500
|
|
|
@@ -435,7 +516,7 @@ EXAMPLES
|
|
|
435
516
|
$ pontus-x_cli export-private-key
|
|
436
517
|
```
|
|
437
518
|
|
|
438
|
-
_See code: [src/commands/export-private-key.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
519
|
+
_See code: [src/commands/export-private-key.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/export-private-key.ts)_
|
|
439
520
|
|
|
440
521
|
## `pontus-x_cli generate-asset-credentials DID`
|
|
441
522
|
|
|
@@ -461,7 +542,7 @@ EXAMPLES
|
|
|
461
542
|
$ pontus-x_cli generate-asset-credentials -p ./CEP.data.json -d ./did.json -c certificate.key did:op:01f8bc1e797a854dc718bd7a802acb07c5fc39f706b03dd454bceb66be6828c6
|
|
462
543
|
```
|
|
463
544
|
|
|
464
|
-
_See code: [src/commands/generate-asset-credentials.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
545
|
+
_See code: [src/commands/generate-asset-credentials.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/generate-asset-credentials.ts)_
|
|
465
546
|
|
|
466
547
|
## `pontus-x_cli generate-did-web`
|
|
467
548
|
|
|
@@ -482,7 +563,7 @@ EXAMPLES
|
|
|
482
563
|
$ pontus-x_cli generate-did-web -d <https://compliance.agrospai.udl.cat> -c certificate-chain.crt
|
|
483
564
|
```
|
|
484
565
|
|
|
485
|
-
_See code: [src/commands/generate-did-web.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
566
|
+
_See code: [src/commands/generate-did-web.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/generate-did-web.ts)_
|
|
486
567
|
|
|
487
568
|
## `pontus-x_cli generate-manifest`
|
|
488
569
|
|
|
@@ -506,7 +587,7 @@ EXAMPLES
|
|
|
506
587
|
$ pontus-x_cli generate-manifest --keys-dir ./keys --password-env KEY_PASSWORD --output manifest.yaml
|
|
507
588
|
```
|
|
508
589
|
|
|
509
|
-
_See code: [src/commands/generate-manifest.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
590
|
+
_See code: [src/commands/generate-manifest.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/generate-manifest.ts)_
|
|
510
591
|
|
|
511
592
|
## `pontus-x_cli generate-participant-credentials`
|
|
512
593
|
|
|
@@ -529,7 +610,7 @@ EXAMPLES
|
|
|
529
610
|
$ pontus-x_cli generate-participant-credentials -p ./CEP.data.json -d ./did.json -c certificate.key
|
|
530
611
|
```
|
|
531
612
|
|
|
532
|
-
_See code: [src/commands/generate-participant-credentials.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
613
|
+
_See code: [src/commands/generate-participant-credentials.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/generate-participant-credentials.ts)_
|
|
533
614
|
|
|
534
615
|
## `pontus-x_cli generate-private-keys`
|
|
535
616
|
|
|
@@ -555,7 +636,7 @@ EXAMPLES
|
|
|
555
636
|
$ pontus-x_cli generate-private-keys --count 5 --output-dir ./keys
|
|
556
637
|
```
|
|
557
638
|
|
|
558
|
-
_See code: [src/commands/generate-private-keys.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
639
|
+
_See code: [src/commands/generate-private-keys.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/generate-private-keys.ts)_
|
|
559
640
|
|
|
560
641
|
## `pontus-x_cli get DID`
|
|
561
642
|
|
|
@@ -575,7 +656,7 @@ EXAMPLES
|
|
|
575
656
|
$ pontus-x_cli get did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a
|
|
576
657
|
```
|
|
577
658
|
|
|
578
|
-
_See code: [src/commands/get.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
659
|
+
_See code: [src/commands/get.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/get.ts)_
|
|
579
660
|
|
|
580
661
|
## `pontus-x_cli help [COMMAND]`
|
|
581
662
|
|
|
@@ -618,7 +699,7 @@ EXAMPLES
|
|
|
618
699
|
$ pontus-x_cli login d999baae98ac5246568fd726be8832c49626867d.json
|
|
619
700
|
```
|
|
620
701
|
|
|
621
|
-
_See code: [src/commands/login.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
702
|
+
_See code: [src/commands/login.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/login.ts)_
|
|
622
703
|
|
|
623
704
|
## `pontus-x_cli logout`
|
|
624
705
|
|
|
@@ -635,7 +716,7 @@ EXAMPLES
|
|
|
635
716
|
$ pontus-x_cli logout
|
|
636
717
|
```
|
|
637
718
|
|
|
638
|
-
_See code: [src/commands/logout.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
719
|
+
_See code: [src/commands/logout.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/logout.ts)_
|
|
639
720
|
|
|
640
721
|
## `pontus-x_cli publish PATH`
|
|
641
722
|
|
|
@@ -643,16 +724,17 @@ Publish the asset as instructed in the provided script folder.
|
|
|
643
724
|
|
|
644
725
|
```
|
|
645
726
|
USAGE
|
|
646
|
-
$ pontus-x_cli publish PATH [--dry-run] [-m <value>] [-p <value>] [-r]
|
|
727
|
+
$ pontus-x_cli publish PATH [--dry-run] [-m <value>] [-p <value>] [--resume <value>] [-r]
|
|
647
728
|
|
|
648
729
|
ARGUMENTS
|
|
649
730
|
PATH Path to find a JSON/YAML or TS file describing the asset to publish
|
|
650
731
|
|
|
651
732
|
FLAGS
|
|
652
733
|
-m, --manifest=<value> [default: ./manifest.yaml] Path to the manifest file
|
|
653
|
-
-p, --provider=<value>
|
|
734
|
+
-p, --provider=<value> The Ocean Node URL (defaults to OCEAN_NODE_URI from .env)
|
|
654
735
|
-r, --recursive Recursively publish assets in a directory (only for JSON/YAML files)
|
|
655
736
|
--dry-run Dry run the publishing process
|
|
737
|
+
--resume=<value> Resume an incomplete publish on an existing NFT address
|
|
656
738
|
|
|
657
739
|
DESCRIPTION
|
|
658
740
|
Publish the asset as instructed in the provided script folder.
|
|
@@ -667,7 +749,7 @@ EXAMPLES
|
|
|
667
749
|
$ pontus-x_cli publish samples/publish/algo/index.ts
|
|
668
750
|
```
|
|
669
751
|
|
|
670
|
-
_See code: [src/commands/publish.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
752
|
+
_See code: [src/commands/publish.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/publish.ts)_
|
|
671
753
|
|
|
672
754
|
## `pontus-x_cli render [DID]`
|
|
673
755
|
|
|
@@ -684,7 +766,7 @@ FLAGS
|
|
|
684
766
|
-t, --tags=<value>... Tags to filter datasets (they must have all the provided tags)
|
|
685
767
|
```
|
|
686
768
|
|
|
687
|
-
_See code: [src/commands/render.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
769
|
+
_See code: [src/commands/render.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/render.ts)_
|
|
688
770
|
|
|
689
771
|
## `pontus-x_cli revoke`
|
|
690
772
|
|
|
@@ -708,7 +790,7 @@ EXAMPLES
|
|
|
708
790
|
$ pontus-x_cli revoke -d did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a did:op:abcee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7b
|
|
709
791
|
```
|
|
710
792
|
|
|
711
|
-
_See code: [src/commands/revoke.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
793
|
+
_See code: [src/commands/revoke.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/revoke.ts)_
|
|
712
794
|
|
|
713
795
|
## `pontus-x_cli self-description DID SDURL`
|
|
714
796
|
|
|
@@ -732,7 +814,7 @@ EXAMPLES
|
|
|
732
814
|
$ pontus-x_cli self-description did:op:d22954f2cbf6a85c897ce605c275cc786e099592cc59e3b7dd66b93e784bed8c https://example.com/self-description.json
|
|
733
815
|
```
|
|
734
816
|
|
|
735
|
-
_See code: [src/commands/self-description.ts](https://github.com/AgrospAI/pontus-x_cli/blob/
|
|
817
|
+
_See code: [src/commands/self-description.ts](https://github.com/AgrospAI/pontus-x_cli/blob/v2.0.0/src/commands/self-description.ts)_
|
|
736
818
|
<!-- commandsstop -->
|
|
737
819
|
|
|
738
820
|
# Useful information
|
|
@@ -856,10 +938,16 @@ npm run test:clean
|
|
|
856
938
|
npm run test
|
|
857
939
|
```
|
|
858
940
|
|
|
941
|
+
### Run a specific test
|
|
942
|
+
|
|
943
|
+
```sh
|
|
944
|
+
npm run test -t TEST_NAME # example: "run login writes PRIVATE_KEY", etc.
|
|
945
|
+
```
|
|
946
|
+
|
|
859
947
|
### Run a specific test file once
|
|
860
948
|
|
|
861
949
|
```sh
|
|
862
|
-
npm run test
|
|
950
|
+
npm run test TEST_FILE_NAME # example: access, login, get, etc.
|
|
863
951
|
```
|
|
864
952
|
|
|
865
953
|
### Run a specific test folder
|
package/dist/commands/access.js
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
const nautilus_1 = require("@deltadao/nautilus");
|
|
3
4
|
const core_1 = require("@oclif/core");
|
|
4
5
|
const connection_1 = require("../utils/connection");
|
|
5
6
|
class Access extends core_1.Command {
|
|
@@ -8,8 +9,22 @@ class Access extends core_1.Command {
|
|
|
8
9
|
const { did } = args;
|
|
9
10
|
this.log(`Getting access to downloadable asset: ${did}`);
|
|
10
11
|
const { nautilus } = await connection_1.Connection.connect();
|
|
11
|
-
|
|
12
|
-
|
|
12
|
+
try {
|
|
13
|
+
const { url } = await nautilus.access({ assetDid: did });
|
|
14
|
+
this.log(`Download URL: ${url}\n`);
|
|
15
|
+
}
|
|
16
|
+
catch (error) {
|
|
17
|
+
if (error instanceof nautilus_1.OrderCheckError) {
|
|
18
|
+
const costs = error.costs.map((c) => `${c.amount} ${c.symbol}`).join(" + ");
|
|
19
|
+
this.error(`Previous order check failed: ${error.message}\n` +
|
|
20
|
+
(costs ? `Potential duplicate cost: ${costs}\n` : "") +
|
|
21
|
+
`Please check your RPC connection or retry later.`);
|
|
22
|
+
}
|
|
23
|
+
else if (error instanceof nautilus_1.PolicyDeniedError) {
|
|
24
|
+
this.error(`Policy denied access to asset: ${error.reason || error.message} (code: ${error.code || "unknown"})`);
|
|
25
|
+
}
|
|
26
|
+
throw error;
|
|
27
|
+
}
|
|
13
28
|
}
|
|
14
29
|
}
|
|
15
30
|
Access.args = {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"access.js","sourceRoot":"","sources":["../../src/commands/access.ts"],"names":[],"mappings":";;AAAA,sCAA4C;AAC5C,mDAAgD;AAEhD,MAAqB,MAAO,SAAQ,cAAO;IASzC,KAAK,CAAC,GAAG;QACP,MAAM,EAAE,IAAI,EAAE,GAAG,MAA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AAK,CAAC,CAAC,CAAC,6BAA6B,KAAK,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;oBACrD,kDAAkD,CACrD,CAAC;YACJ,CAAC;iBAAM,IAAI,KAAK,YAAY,4BAAiB,EAAE,CAAC;gBAC9C,IAAI,CAAC,KAAK,CACR,kCAAkC,KAAK,CAAC,MAAM,IAAI,KAAK,CAAC,OAAO,WAAW,KAAK,CAAC,IAAI,IAAI,SAAS,GAAG,CACrG,CAAC;YACJ,CAAC;YACD,MAAM,KAAK,CAAC;QACd,CAAC;IACH,CAAC;;AA/BM,WAAI,GAAG;IACZ,GAAG,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;CACtE,CAAC;AACK,kBAAW,GAAG,sDAAsD,CAAC;AACrE,eAAQ,GAAsB;IACnC,6GAA6G;CAC9G,CAAC;kBAPiB,MAAM"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Command } from '@oclif/core';
|
|
2
|
+
export default class ChangeCurrency extends Command {
|
|
3
|
+
static args: {
|
|
4
|
+
did: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
5
|
+
newCurrency: import("@oclif/core/lib/interfaces").Arg<string, Record<string, unknown>>;
|
|
6
|
+
};
|
|
7
|
+
static flags: {
|
|
8
|
+
yes: import("@oclif/core/lib/interfaces").BooleanFlag<boolean>;
|
|
9
|
+
};
|
|
10
|
+
static description: string;
|
|
11
|
+
static examples: Command.Example[];
|
|
12
|
+
run(): Promise<void>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,69 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
|
+
};
|
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const nautilus_1 = require("@deltadao/nautilus");
|
|
7
|
+
const core_1 = require("@oclif/core");
|
|
8
|
+
const readline_sync_1 = __importDefault(require("readline-sync"));
|
|
9
|
+
const connection_1 = require("../utils/connection");
|
|
10
|
+
class ChangeCurrency extends core_1.Command {
|
|
11
|
+
async run() {
|
|
12
|
+
var _a, _b, _c, _d, _e;
|
|
13
|
+
const { args, flags } = await this.parse(ChangeCurrency);
|
|
14
|
+
const { did, newCurrency } = args;
|
|
15
|
+
const connection = await connection_1.Connection.connect();
|
|
16
|
+
if (flags.yes || readline_sync_1.default.keyInYNStrict(`Set the current price to currency ${newCurrency} for asset ${did}? `)) {
|
|
17
|
+
try {
|
|
18
|
+
if (!connection.remoteStore) {
|
|
19
|
+
throw new Error("Editing requires a remote store. Please set PINATA_JWT or IPFS_UPLOAD_URL in your environment.");
|
|
20
|
+
}
|
|
21
|
+
const published = await connection.nautilus.getAsset(did);
|
|
22
|
+
const assetBuilder = new nautilus_1.AssetBuilder(published);
|
|
23
|
+
const serviceId = ((_a = (0, nautilus_1.getServices)(published)[0]) === null || _a === void 0 ? void 0 : _a.id) || ((_b = published.services[0]) === null || _b === void 0 ? void 0 : _b.id);
|
|
24
|
+
const serviceBuilder = new nautilus_1.ServiceBuilder({
|
|
25
|
+
asset: published,
|
|
26
|
+
serviceId,
|
|
27
|
+
});
|
|
28
|
+
const currentPrice = (_e = (_d = (_c = published.stats) === null || _c === void 0 ? void 0 : _c.price) === null || _d === void 0 ? void 0 : _d.value) !== null && _e !== void 0 ? _e : 0;
|
|
29
|
+
if (newCurrency === "EUROe") {
|
|
30
|
+
serviceBuilder.setPricing(connection.pricingConfig.fixedRateEUROe(currentPrice));
|
|
31
|
+
}
|
|
32
|
+
else {
|
|
33
|
+
serviceBuilder.setPricing(connection.pricingConfig.fixedRateEURAU(currentPrice));
|
|
34
|
+
}
|
|
35
|
+
const service = serviceBuilder.build();
|
|
36
|
+
const asset = assetBuilder.addService(service).build();
|
|
37
|
+
const result = await connection.nautilus.edit(asset);
|
|
38
|
+
const txHash = result.setMetadataTxReceipt.hash ||
|
|
39
|
+
result.setMetadataTxReceipt.transactionHash;
|
|
40
|
+
this.log(`Price currency updated, transaction: ${connection.networkConfig.explorerUri}/tx/${txHash}\n`);
|
|
41
|
+
}
|
|
42
|
+
catch (error) {
|
|
43
|
+
this.error(`Error changing the currency: ${error}`);
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
ChangeCurrency.args = {
|
|
49
|
+
did: core_1.Args.string({ description: 'DID of the asset', required: true }),
|
|
50
|
+
newCurrency: core_1.Args.string({
|
|
51
|
+
description: 'New currency for the asset',
|
|
52
|
+
options: ["EURAU", "EUROe"],
|
|
53
|
+
required: true,
|
|
54
|
+
}),
|
|
55
|
+
};
|
|
56
|
+
ChangeCurrency.flags = {
|
|
57
|
+
yes: core_1.Flags.boolean({
|
|
58
|
+
char: 'y',
|
|
59
|
+
description: 'Automatic yes to prompts',
|
|
60
|
+
required: false,
|
|
61
|
+
default: false,
|
|
62
|
+
}),
|
|
63
|
+
};
|
|
64
|
+
ChangeCurrency.description = 'Change the currency keeping the existing price for an asset with the given DID';
|
|
65
|
+
ChangeCurrency.examples = [
|
|
66
|
+
'<%= config.bin %> <%= command.id %> did:op:ffeee8c8f19328985ef6743b08e61ef89d5141027fd47612e32e7900cacd2b7a EURAU',
|
|
67
|
+
];
|
|
68
|
+
exports.default = ChangeCurrency;
|
|
69
|
+
//# sourceMappingURL=change-currency.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"change-currency.js","sourceRoot":"","sources":["../../src/commands/change-currency.ts"],"names":[],"mappings":";;;;;AAAA,iDAA8E;AAC9E,sCAAkD;AAClD,kEAAwC;AAExC,oDAAgD;AAEhD,MAAqB,cAAe,SAAQ,cAAO;IAsBjD,KAAK,CAAC,GAAG;;QACP,MAAM,EAAE,IAAI,EAAE,KAAK,EAAE,GAAG,MAAM,IAAI,CAAC,KAAK,CAAC,cAAc,CAAC,CAA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M,KAAK,GAAG,YAAY,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,KAAK,EAAE,CAAA;gBACtD,MAAM,MAAM,GAAG,MAAM,UAAU,CAAC,QAAQ,CAAC,IAAI,CAAC,KAAK,CAAC,CAAA;gBACpD,MAAM,MAAM,GACT,MAAM,CAAC,oBAA4B,CAAC,IAAI;oBACxC,MAAM,CAAC,oBAA4B,CAAC,eAAe,CAAA;gBACtD,IAAI,CAAC,GAAG,CACN,wCAAwC,UAAU,CAAC,aAAa,CAAC,WAAW,OAAO,MAAM,IAAI,CAC9F,CAAA;YACH,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,IAAI,CAAC,KAAK,CAAC,gCAAgC,KAAK,EAAE,CAAC,CAAA;YACrD,CAAC;QACH,CAAC;IACH,CAAC;;AA7DM,mBAAI,GAAG;IACZ,GAAG,EAAE,WAAI,CAAC,MAAM,CAAC,EAAE,WAAW,EAAE,kBAAkB,EAAE,QAAQ,EAAE,IAAI,EAAE,CAAC;IACrE,WAAW,EAAE,WAAI,CAAC,MAAM,CAAC;QACvB,WAAW,EAAE,4BAA4B;QACzC,OAAO,EAAE,CAAE,OAAO,EAAE,OAAO,CAAE;QAC7B,QAAQ,EAAE,IAAI;KACf,CAAC;CACH,CAAA;AACM,oBAAK,GAAG;IACb,GAAG,EAAE,YAAK,CAAC,OAAO,CAAC;QACjB,IAAI,EAAE,GAAG;QACT,WAAW,EAAE,0BAA0B;QACvC,QAAQ,EAAE,KAAK;QACf,OAAO,EAAE,KAAK;KACf,CAAC;CACH,CAAA;AACM,0BAAW,GAAG,gFAAgF,CAAA;AAC9F,uBAAQ,GAAsB;IACnC,mHAAmH;CACpH,CAAA;kBApBkB,cAAc"}
|
|
@@ -3,12 +3,13 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
+
const nautilus_1 = require("@deltadao/nautilus");
|
|
6
7
|
const core_1 = require("@oclif/core");
|
|
7
8
|
const readline_sync_1 = __importDefault(require("readline-sync"));
|
|
8
9
|
const connection_1 = require("../utils/connection");
|
|
9
10
|
class ChangePrice extends core_1.Command {
|
|
10
11
|
async run() {
|
|
11
|
-
var _a, _b;
|
|
12
|
+
var _a, _b, _c, _d;
|
|
12
13
|
const { args, flags } = await this.parse(ChangePrice);
|
|
13
14
|
const { did, newPrice } = args;
|
|
14
15
|
const connection = await connection_1.Connection.connect();
|
|
@@ -16,10 +17,11 @@ class ChangePrice extends core_1.Command {
|
|
|
16
17
|
if (flags.yes ||
|
|
17
18
|
readline_sync_1.default.keyInYNStrict(`Set the price to ${newPriceNumber.toString()} for asset ${did}? `)) {
|
|
18
19
|
try {
|
|
19
|
-
const
|
|
20
|
-
const serviceId = (_b = (_a =
|
|
21
|
-
const tx = await connection.nautilus.setServicePrice(
|
|
22
|
-
|
|
20
|
+
const asset = await connection.nautilus.getAsset(did);
|
|
21
|
+
const serviceId = ((_b = (_a = (0, nautilus_1.getServices)(asset)) === null || _a === void 0 ? void 0 : _a[0]) === null || _b === void 0 ? void 0 : _b.id) || ((_d = (_c = asset.services) === null || _c === void 0 ? void 0 : _c[0]) === null || _d === void 0 ? void 0 : _d.id);
|
|
22
|
+
const tx = await connection.nautilus.setServicePrice(asset, serviceId, newPriceNumber.toString());
|
|
23
|
+
const txHash = tx.hash || tx.transactionHash;
|
|
24
|
+
this.log(`Price updated for asset, transaction: ${connection.networkConfig.explorerUri}/tx/${txHash}\n`);
|
|
23
25
|
}
|
|
24
26
|
catch (error) {
|
|
25
27
|
this.error(`Error changing the price: ${error}`);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"change-price.js","sourceRoot":"","sources":["../../src/commands/change-price.ts"],"names":[],"mappings":";;;;;AAAA,sCAAmD;AACnD,kEAAyC;AACzC,mDAAgD;AAEhD,MAAqB,WAAY,SAAQ,cAAO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eResults extends Command {
|
|
|
6
6
|
static description: string;
|
|
7
7
|
static examples: Command.Example[];
|
|
8
8
|
static flags: {
|
|
9
|
-
provider: import("@oclif/core/lib/interfaces").OptionFlag<string, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
9
|
+
provider: import("@oclif/core/lib/interfaces").OptionFlag<string | undefined, import("@oclif/core/lib/interfaces").CustomOptions>;
|
|
10
10
|
};
|
|
11
11
|
run(): Promise<void>;
|
|
12
12
|
}
|