diff --git a/package.json b/package.json index 19617c8e7..2e539041f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@nevermined-io/sdk", - "version": "3.0.0-rc25", + "version": "3.0.0", "description": "Javascript SDK for connecting with Nevermined Data Platform ", "main": "./dist/node/sdk.js", "typings": "./dist/node/sdk.d.ts", diff --git a/src/keeper/contracts/DIDRegistry.ts b/src/keeper/contracts/DIDRegistry.ts index 81670e17f..02d308b46 100644 --- a/src/keeper/contracts/DIDRegistry.ts +++ b/src/keeper/contracts/DIDRegistry.ts @@ -465,7 +465,7 @@ export class DIDRegistry extends ContractBase { public async getProvenanceEntry(provId: string) { const provenance: ProvenanceRegistry = await this.call('getProvenanceEntry', [zeroX(provId)]) const did = provenance[0] - console.log(provenance) + if (did.match(/^0x0+$/)) { return } diff --git a/src/keeper/contracts/managers/ConditionStoreManager.ts b/src/keeper/contracts/managers/ConditionStoreManager.ts index ffdcb4e8b..a19463d23 100644 --- a/src/keeper/contracts/managers/ConditionStoreManager.ts +++ b/src/keeper/contracts/managers/ConditionStoreManager.ts @@ -55,7 +55,6 @@ export class ConditionStoreManager extends ContractBase { public async getCondition(conditionId: string) { const a: any = await this.call('getCondition', [zeroX(conditionId)]) - console.log('Condition: ', a) return { typeRef: a[0], //a.typeRef, state: Number(a[1]), //Number(a.state), diff --git a/src/nevermined/NvmApp.ts b/src/nevermined/NvmApp.ts index 35f76d47b..939cd4622 100644 --- a/src/nevermined/NvmApp.ts +++ b/src/nevermined/NvmApp.ts @@ -168,20 +168,12 @@ export class NvmApp { config.zeroDevProjectId, ) this.userAccount = await NvmAccount.fromZeroDevSigner(kernelClient) - // this.zeroDevSignerAccount = smartAccountSigner - // this.useZeroDevSigner = true } else if (account instanceof NvmAccount) { this.userAccount = account } else { this.userAccount = this.fullSDK.accounts.getAccount(account as string) } - console.log( - `Using account: ${this.userAccount.getAddress()} with type ${ - this.userAccount.accountType.signerType - }`, - ) - if ( config && config.marketplaceAuthToken && @@ -193,16 +185,13 @@ export class NvmApp { this.userAccount, message, ) - console.log('Client assertion: ', clientAssertion) this.loginCredentials = await this.fullSDK.services.marketplace.login(clientAssertion) - console.log('Login credentials: ', this.loginCredentials) } const nodeInfo = await this.fullSDK.services.node.getNeverminedNodeInfo() this.assetProviders = [nodeInfo['provider-address']] - console.log('Asset Providers: ', this.assetProviders) if (!isValidAddress(this.configNVM.nftContractAddress as string)) { const contractABI = await ContractHandler.getABIArtifact( 'NFT1155SubscriptionUpgradeable', @@ -644,8 +633,6 @@ export class NvmApp { const numberCredits = salesService.attributes.main.nftAttributes.amount const subscriptionOwner = await this.fullSDK.assets.owner(subscriptionDid) - console.log(`Subscription Owner: ${subscriptionOwner}`) - console.log(`User Address: ${address}`) const balance = await this.fullSDK.nfts1155.balance(subscriptionDid, address) const isOwner = address.toLowerCase() === subscriptionOwner.toLowerCase() const canAccess = isOwner || balance >= numberCredits diff --git a/src/nevermined/api/ConditionsApi.ts b/src/nevermined/api/ConditionsApi.ts index b142ed868..8827f1838 100644 --- a/src/nevermined/api/ConditionsApi.ts +++ b/src/nevermined/api/ConditionsApi.ts @@ -439,7 +439,6 @@ export class ConditionsApi extends Instantiable { const duration = DDO.getDurationFromService(service) const expirationBlock = duration > 0 ? Number(await this.client.public.getBlockNumber()) + duration : 0 - console.log(`ConditionsApi :: transferNft with expiration block = ${expirationBlock}`) const params = template.params( accessConsumer, @@ -497,9 +496,6 @@ export class ConditionsApi extends Instantiable { const duration = DDO.getDurationFromService(service) || 0 const expirationBlock = duration > 0 ? Number(await this.client.public.getBlockNumber()) + duration : 0 - console.log( - `ConditionsApi :: transferNftForDelegate with expiration block = ${expirationBlock}`, - ) const params = template.params( accessConsumer, diff --git a/src/nevermined/utils/ServiceAgreement.ts b/src/nevermined/utils/ServiceAgreement.ts index ab795c047..f9f19fac0 100644 --- a/src/nevermined/utils/ServiceAgreement.ts +++ b/src/nevermined/utils/ServiceAgreement.ts @@ -26,7 +26,6 @@ export class ServiceAgreement extends Instantiable { throw new Error('TemplateId not found in DDO.') } - console.log(`Signing service agreement`) const serviceAgreementHashSignature = await this.createHashSignature( service.templateId, serviceAgreementId, @@ -57,7 +56,6 @@ export class ServiceAgreement extends Instantiable { timeoutValues, ) - console.log(`Signing text using agreement: ${serviceAgreementHash}`) const serviceAgreementHashSignature = await this.nevermined.utils.signature.signText( getBytes(serviceAgreementHash), consumer, diff --git a/src/nevermined/utils/WebServiceConnector.ts b/src/nevermined/utils/WebServiceConnector.ts index 42f8405c6..e96d9312e 100644 --- a/src/nevermined/utils/WebServiceConnector.ts +++ b/src/nevermined/utils/WebServiceConnector.ts @@ -154,7 +154,6 @@ export class WebServiceConnector { } public async uploadFile(url: string, data: ReadStream, encrypt?: boolean): Promise { - console.log(`Trying to upload file`) const form = new FormData() form.append('file', data) if (encrypt) {