mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Fix lint errors.
This commit is contained in:
parent
c215930335
commit
b5727bb8dc
@ -2,21 +2,21 @@ import * as HDWalletProvider from "truffle-hdwallet-provider"
|
||||
import { Config } from "../src"
|
||||
|
||||
const configJson: Config = {
|
||||
"nodeUri": "http://localhost:8545",
|
||||
"aquariusUri": "http://172.15.0.15:5000",
|
||||
"brizoUri": "http://localhost:8030",
|
||||
"secretStoreUri": "http://localhost:12001",
|
||||
"brizoAddress": "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
|
||||
"verbose": false,
|
||||
nodeUri: "http://localhost:8545",
|
||||
aquariusUri: "http://172.15.0.15:5000",
|
||||
brizoUri: "http://localhost:8030",
|
||||
secretStoreUri: "http://localhost:12001",
|
||||
brizoAddress: "0x00Bd138aBD70e2F00903268F3Db08f2D25677C9e",
|
||||
verbose: false,
|
||||
}
|
||||
|
||||
if (process.env.NETWORK_NAME === "nile") {
|
||||
Object.assign(configJson, {
|
||||
"nodeUri": "https://nile.dev-ocean.com",
|
||||
"aquariusUri": "https://nginx-aquarius.dev-ocean.com",
|
||||
"brizoUri": "https://nginx-brizo.dev-ocean.com",
|
||||
"secretStoreUri": "https://secret-store.dev-ocean.com/",
|
||||
"brizoAddress": "0x413c9ba0a05b8a600899b41b0c62dd661e689354",
|
||||
nodeUri: "https://nile.dev-ocean.com",
|
||||
aquariusUri: "https://nginx-aquarius.dev-ocean.com",
|
||||
brizoUri: "https://nginx-brizo.dev-ocean.com",
|
||||
secretStoreUri: "https://secret-store.dev-ocean.com/",
|
||||
brizoAddress: "0x413c9ba0a05b8a600899b41b0c62dd661e689354",
|
||||
})
|
||||
}
|
||||
|
||||
|
@ -98,15 +98,6 @@ export class Brizo extends Instantiable {
|
||||
return destination
|
||||
}
|
||||
|
||||
private async downloadFile(url: string, filename: string, destination?: string): Promise<string> {
|
||||
const path = `${destination}${filename}`
|
||||
const response = await WebServiceConnectorProvider
|
||||
.getConnector()
|
||||
.get(url)
|
||||
await save(await response.arrayBuffer(), path)
|
||||
return path
|
||||
}
|
||||
|
||||
public async encrypt(
|
||||
did: string,
|
||||
signedDid: string,
|
||||
@ -137,4 +128,13 @@ export class Brizo extends Instantiable {
|
||||
throw new Error("HTTP request failed")
|
||||
}
|
||||
}
|
||||
|
||||
private async downloadFile(url: string, filename: string, destination?: string): Promise<string> {
|
||||
const path = `${destination}${filename}`
|
||||
const response = await WebServiceConnectorProvider
|
||||
.getConnector()
|
||||
.get(url)
|
||||
await save(await response.arrayBuffer(), path)
|
||||
return path
|
||||
}
|
||||
}
|
||||
|
@ -12,7 +12,11 @@ export default class DIDRegistry extends ContractBase {
|
||||
}
|
||||
|
||||
public async registerAttribute(did: string, checksum: string, providers: string[], value: string, ownerAddress: string) {
|
||||
return this.send("registerAttribute", ownerAddress, [zeroX(did), Web3Provider.getWeb3().utils.fromAscii(checksum), providers.map(zeroX), value])
|
||||
return this.send(
|
||||
"registerAttribute",
|
||||
ownerAddress,
|
||||
[zeroX(did), Web3Provider.getWeb3().utils.fromAscii(checksum), providers.map(zeroX), value],
|
||||
)
|
||||
}
|
||||
|
||||
public async getDIDOwner(did: string): Promise<string> {
|
||||
|
@ -45,7 +45,6 @@ export class OceanAssets extends Instantiable {
|
||||
|
||||
const did: DID = DID.generate()
|
||||
|
||||
|
||||
const encryptedFiles = await this.ocean.secretStore.encrypt(did.getId(), metadata.base.files, publisher)
|
||||
|
||||
const serviceAgreementTemplate = await templates.escrowAccessSecretStoreTemplate.getServiceAgreementTemplate()
|
||||
|
Loading…
Reference in New Issue
Block a user