@@ -33,26 +33,23 @@ export class Commands {
3333 public signer : Signer ;
3434 public config : Config ;
3535 public aquarius : Aquarius ;
36- public providerUrl : string ;
36+ public oceanNodeUrl : string ;
3737 // optional settings for indexing wait time
3838 private indexingParams : IndexerWaitParams ;
3939
4040 constructor ( signer : Signer , network : string | number , config ?: Config ) {
4141 this . signer = signer ;
4242 this . config = config || new ConfigHelper ( ) . getConfig ( network ) ;
43- this . providerUrl = process . env . NODE_URL ;
43+ this . oceanNodeUrl = process . env . NODE_URL ;
4444 this . indexingParams = getIndexingWaitSettings ( ) ;
45-
46- console . log ( "Using Provider :" , this . providerUrl ) ;
47- this . config . metadataCacheUri = this . providerUrl ;
48-
45+ console . log ( "Using Ocean Node URL :" , this . oceanNodeUrl ) ;
46+ this . config . metadataCacheUri = this . oceanNodeUrl ;
4947 this . aquarius = new Aquarius ( this . config . metadataCacheUri ) ;
50- console . log ( "Using Aquarius :" , this . config . metadataCacheUri ) ;
5148 }
5249
5350 public async start ( ) {
5451 console . log ( 'Starting the interactive CLI flow...\n\n' ) ;
55- const data = await interactiveFlow ( this . providerUrl ) ; // Collect data via CLI
52+ const data = await interactiveFlow ( this . oceanNodeUrl ) ; // Collect data via CLI
5653 await publishAsset ( data , this . signer , this . config ) ; // Publish asset with collected data
5754 }
5855
@@ -83,7 +80,7 @@ export class Commands {
8380 this . signer ,
8481 asset . services [ 0 ] . files ,
8582 asset ,
86- this . providerUrl ,
83+ this . oceanNodeUrl ,
8784 this . config ,
8885 this . aquarius ,
8986 encryptDDO
@@ -114,7 +111,7 @@ export class Commands {
114111 this . signer ,
115112 algoAsset . services [ 0 ] . files ,
116113 algoAsset ,
117- this . providerUrl ,
114+ this . oceanNodeUrl ,
118115 this . config ,
119116 this . aquarius ,
120117 encryptDDO
@@ -156,7 +153,7 @@ export class Commands {
156153 const updateAssetTx = await updateAssetMetadata (
157154 this . signer ,
158155 asset ,
159- this . providerUrl ,
156+ this . oceanNodeUrl ,
160157 this . aquarius ,
161158 encryptDDO
162159 ) ;
@@ -185,8 +182,8 @@ export class Commands {
185182 }
186183
187184 const providerURI =
188- this . providerUrl && dataDdo . chainId === 8996
189- ? this . providerUrl
185+ this . oceanNodeUrl && dataDdo . chainId === 8996
186+ ? this . oceanNodeUrl
190187 : dataDdo . services [ 0 ] . serviceEndpoint ;
191188 console . log ( "Downloading asset using provider: " , providerURI ) ;
192189 const datatoken = new Datatoken ( this . signer , this . config . chainId , this . config ) ;
@@ -262,10 +259,10 @@ export class Commands {
262259 console . error ( "Not all the data ddos are available." ) ;
263260 return ;
264261 }
265- let providerURI = this . providerUrl
262+ let providerURI = this . oceanNodeUrl
266263 if ( ddos . length > 0 ) {
267- providerURI = this . providerUrl && ddos [ 0 ] . chainId === 8996
268- ? this . providerUrl
264+ providerURI = this . oceanNodeUrl && ddos [ 0 ] . chainId === 8996
265+ ? this . oceanNodeUrl
269266 : ddos [ 0 ] . services [ 0 ] . serviceEndpoint ;
270267 }
271268
@@ -278,7 +275,7 @@ export class Commands {
278275 return ;
279276 }
280277
281- const computeEnvs = await ProviderInstance . getComputeEnvironments ( this . providerUrl ) ;
278+ const computeEnvs = await ProviderInstance . getComputeEnvironments ( this . oceanNodeUrl ) ;
282279
283280 if ( ! computeEnvs || computeEnvs . length < 1 ) {
284281 console . error (
@@ -495,10 +492,10 @@ export class Commands {
495492 console . error ( "Not all the data ddos are available." ) ;
496493 return ;
497494 }
498- let providerURI = this . providerUrl
495+ let providerURI = this . oceanNodeUrl
499496 if ( ddos . length > 0 ) {
500- providerURI = this . providerUrl && ddos [ 0 ] . chainId === 8996
501- ? this . providerUrl
497+ providerURI = this . oceanNodeUrl && ddos [ 0 ] . chainId === 8996
498+ ? this . oceanNodeUrl
502499 : ddos [ 0 ] . services [ 0 ] . serviceEndpoint ;
503500 }
504501
@@ -510,7 +507,7 @@ export class Commands {
510507 return ;
511508 }
512509
513- const computeEnvs = await ProviderInstance . getComputeEnvironments ( this . providerUrl ) ;
510+ const computeEnvs = await ProviderInstance . getComputeEnvironments ( this . oceanNodeUrl ) ;
514511
515512 if ( ! computeEnvs || computeEnvs . length < 1 ) {
516513 console . error (
@@ -633,8 +630,8 @@ export class Commands {
633630 }
634631
635632 const providerURI =
636- this . providerUrl && dataDdo . chainId === 8996
637- ? this . providerUrl
633+ this . oceanNodeUrl && dataDdo . chainId === 8996
634+ ? this . oceanNodeUrl
638635 : dataDdo . services [ 0 ] . serviceEndpoint ;
639636
640637 const jobStatus = await ProviderInstance . computeStop (
@@ -649,7 +646,7 @@ export class Commands {
649646 }
650647
651648 public async getComputeEnvironments ( ) {
652- const computeEnvs = await ProviderInstance . getComputeEnvironments ( this . providerUrl ) ;
649+ const computeEnvs = await ProviderInstance . getComputeEnvironments ( this . oceanNodeUrl ) ;
653650
654651 if ( ! computeEnvs || computeEnvs . length < 1 ) {
655652 console . error (
@@ -662,7 +659,7 @@ export class Commands {
662659
663660 public async computeStreamableLogs ( args : string [ ] ) {
664661 const jobId = args [ 0 ]
665- const logsResponse = await ProviderInstance . computeStreamableLogs ( this . providerUrl , this . signer , jobId ,
662+ const logsResponse = await ProviderInstance . computeStreamableLogs ( this . oceanNodeUrl , this . signer , jobId ,
666663 ) ;
667664 console . log ( 'response: ' , logsResponse )
668665
@@ -743,7 +740,7 @@ export class Commands {
743740 const txid = await updateAssetMetadata (
744741 this . signer ,
745742 asset ,
746- this . providerUrl ,
743+ this . oceanNodeUrl ,
747744 this . aquarius ,
748745 encryptDDO
749746 ) ;
@@ -806,7 +803,7 @@ export class Commands {
806803 const txid = await updateAssetMetadata (
807804 this . signer ,
808805 asset ,
809- this . providerUrl ,
806+ this . oceanNodeUrl ,
810807 this . aquarius ,
811808 encryptDDO
812809 ) ;
@@ -832,8 +829,8 @@ export class Commands {
832829 agreementId = args [ 3 ] ;
833830 }
834831 const providerURI =
835- this . providerUrl && dataDdo . chainId === 8996
836- ? this . providerUrl
832+ this . oceanNodeUrl && dataDdo . chainId === 8996
833+ ? this . oceanNodeUrl
837834 : dataDdo . services [ 0 ] . serviceEndpoint ;
838835
839836 const jobStatus = ( await ProviderInstance . computeStatus (
@@ -848,7 +845,7 @@ export class Commands {
848845 public async downloadJobResults ( args : string [ ] ) {
849846
850847 const jobResult = await ProviderInstance . getComputeResultUrl (
851- this . providerUrl ,
848+ this . oceanNodeUrl ,
852849 this . signer ,
853850 args [ 1 ] ,
854851 parseInt ( args [ 2 ] )
0 commit comments