mirror of
https://github.com/oceanprotocol-archive/squid-js.git
synced 2024-02-02 15:31:51 +01:00
Remove default exports of Ocean modules.
This commit is contained in:
parent
780475b35f
commit
5402d421c8
@ -1,10 +1,10 @@
|
||||
import deprecated from "deprecated-decorator"
|
||||
|
||||
import OceanAccounts from "./OceanAccounts"
|
||||
import OceanAgreements from "./OceanAgreements"
|
||||
import OceanAssets from "./OceanAssets"
|
||||
import OceanSecretStore from "./OceanSecretStore"
|
||||
import OceanTokens from "./OceanTokens"
|
||||
import { OceanAccounts } from "./OceanAccounts"
|
||||
import { OceanAgreements } from "./OceanAgreements"
|
||||
import { OceanAssets } from "./OceanAssets"
|
||||
import { OceanSecretStore } from "./OceanSecretStore"
|
||||
import { OceanTokens } from "./OceanTokens"
|
||||
|
||||
import AquariusProvider from "../aquarius/AquariusProvider"
|
||||
import { SearchQuery } from "../aquarius/query/SearchQuery"
|
||||
@ -27,7 +27,7 @@ import EventListener from "../keeper/EventListener"
|
||||
/**
|
||||
* Main interface for Ocean Protocol.
|
||||
*/
|
||||
export default class Ocean {
|
||||
export class Ocean {
|
||||
|
||||
/**
|
||||
* Returns the instance of Ocean.
|
||||
@ -35,13 +35,6 @@ export default class Ocean {
|
||||
* @return {Promise<Ocean>}
|
||||
*/
|
||||
public static async getInstance(config: Config): Promise<Ocean> {
|
||||
// Must be defined on instance level, right now, calling getInstance twice is going to rewrite that
|
||||
// WARN: is called on ConfigProvider.setConfig too (to work fine on test)
|
||||
Logger.setLevel(
|
||||
typeof config.verbose !== "number"
|
||||
? (config.verbose ? LogLevel.Log : LogLevel.None)
|
||||
: config.verbose as LogLevel,
|
||||
)
|
||||
ConfigProvider.setConfig(config)
|
||||
|
||||
if (!Ocean.instance) {
|
||||
|
@ -5,7 +5,7 @@ import Account from "./Account"
|
||||
/**
|
||||
* Account submodule of Ocean Protocol.
|
||||
*/
|
||||
export default class OceanAccounts {
|
||||
export class OceanAccounts {
|
||||
|
||||
/**
|
||||
* Returns the instance of OceanAccounts.
|
||||
|
@ -7,7 +7,7 @@ import ServiceAgreement from "./ServiceAgreements/ServiceAgreement"
|
||||
import { Keeper } from "../keeper/Keeper"
|
||||
import { zeroX, didPrefixed } from "../utils"
|
||||
|
||||
import OceanAgreementsConditions from "./OceanAgreementsConditions"
|
||||
import { OceanAgreementsConditions } from "./OceanAgreementsConditions"
|
||||
|
||||
export interface AgreementPrepareResult {
|
||||
agreementId: string
|
||||
@ -17,7 +17,7 @@ export interface AgreementPrepareResult {
|
||||
/**
|
||||
* Agreements submodule of Ocean Protocol.
|
||||
*/
|
||||
export default class OceanAgreements {
|
||||
export class OceanAgreements {
|
||||
|
||||
/**
|
||||
* Returns the instance of OceanAgreements.
|
||||
|
@ -4,7 +4,7 @@ import Account from "./Account"
|
||||
/**
|
||||
* Agreements Conditions submodule of Ocean Protocol.
|
||||
*/
|
||||
export default class OceanAgreementsConditions {
|
||||
export class OceanAgreementsConditions {
|
||||
|
||||
/**
|
||||
* Returns the instance of OceanAgreementsConditions.
|
||||
|
@ -11,12 +11,12 @@ import SecretStoreProvider from "../secretstore/SecretStoreProvider"
|
||||
import { Logger, fillConditionsWithDDO } from "../utils"
|
||||
import Account from "./Account"
|
||||
import DID from "./DID"
|
||||
import OceanAgreements from "./OceanAgreements"
|
||||
import { OceanAgreements } from "./OceanAgreements"
|
||||
|
||||
/**
|
||||
* Assets submodule of Ocean Protocol.
|
||||
*/
|
||||
export default class OceanAssets {
|
||||
export class OceanAssets {
|
||||
|
||||
/**
|
||||
* Returns the instance of OceanAssets.
|
||||
|
@ -4,7 +4,7 @@ import Account from "./Account"
|
||||
/**
|
||||
* SecretStore submodule of Ocean Protocol.
|
||||
*/
|
||||
export default class OceanSecretStore {
|
||||
export class OceanSecretStore {
|
||||
|
||||
/**
|
||||
* Returns the instance of OceanSecretStore.
|
||||
|
@ -4,7 +4,7 @@ import Account from "./Account"
|
||||
/**
|
||||
* Tokens submodule of Ocean Protocol.
|
||||
*/
|
||||
export default class OceanTokens {
|
||||
export class OceanTokens {
|
||||
|
||||
/**
|
||||
* Returns the instance of OceanTokens.
|
||||
|
@ -1,7 +1,7 @@
|
||||
import Config from "./models/Config"
|
||||
import Account from "./ocean/Account"
|
||||
import DID from "./ocean/DID"
|
||||
import Ocean from "./ocean/Ocean"
|
||||
import { Ocean } from "./ocean/Ocean"
|
||||
import Logger from "./utils/Logger"
|
||||
import WebServiceConnectorProvider from "./utils/WebServiceConnectorProvider"
|
||||
import Keeper from "./keeper/Keeper"
|
||||
|
@ -1,7 +1,7 @@
|
||||
import {assert} from "chai"
|
||||
import ConfigProvider from "../../src/ConfigProvider"
|
||||
import Account from "../../src/ocean/Account"
|
||||
import Ocean from "../../src/ocean/Ocean"
|
||||
import { Ocean } from "../../src/ocean/Ocean"
|
||||
import config from "../config"
|
||||
import ContractBaseMock from "../mocks/ContractBase.Mock"
|
||||
import TestContractHandler from "./TestContractHandler"
|
||||
|
@ -2,7 +2,7 @@ import {assert} from "chai"
|
||||
import ConfigProvider from "../../src/ConfigProvider"
|
||||
import DIDRegistry from "../../src/keeper/contracts/DIDRegistry"
|
||||
import Account from "../../src/ocean/Account"
|
||||
import Ocean from "../../src/ocean/Ocean"
|
||||
import { Ocean } from "../../src/ocean/Ocean"
|
||||
import { generateId } from "../../src/utils/GeneratorHelpers"
|
||||
import Logger from "../../src/utils/Logger"
|
||||
import config from "../config"
|
||||
|
@ -3,7 +3,7 @@ import ConfigProvider from "../../src/ConfigProvider"
|
||||
import EventListener from "../../src/keeper/EventListener"
|
||||
import Keeper from "../../src/keeper/Keeper"
|
||||
import Account from "../../src/ocean/Account"
|
||||
import Ocean from "../../src/ocean/Ocean"
|
||||
import { Ocean } from "../../src/ocean/Ocean"
|
||||
import config from "../config"
|
||||
import TestContractHandler from "./TestContractHandler"
|
||||
|
||||
|
@ -3,7 +3,7 @@ import ConfigProvider from "../../src/ConfigProvider"
|
||||
import EventListener from "../../src/keeper/EventListener"
|
||||
import Keeper from "../../src/keeper/Keeper"
|
||||
import Account from "../../src/ocean/Account"
|
||||
import Ocean from "../../src/ocean/Ocean"
|
||||
import { Ocean } from "../../src/ocean/Ocean"
|
||||
import config from "../config"
|
||||
import TestContractHandler from "./TestContractHandler"
|
||||
|
||||
|
@ -2,7 +2,7 @@ import {assert} from "chai"
|
||||
import ConfigProvider from "../../src/ConfigProvider"
|
||||
import Web3Provider from "../../src/keeper/Web3Provider"
|
||||
import Account from "../../src/ocean/Account"
|
||||
import Ocean from "../../src/ocean/Ocean"
|
||||
import { Ocean } from "../../src/ocean/Ocean"
|
||||
import config from "../config"
|
||||
import TestContractHandler from "../keeper/TestContractHandler"
|
||||
|
||||
|
@ -8,7 +8,7 @@ import ConfigProvider from "../../src/ConfigProvider"
|
||||
import { DDO } from "../../src/ddo/DDO"
|
||||
import { Service } from "../../src/ddo/Service"
|
||||
import Account from "../../src/ocean/Account"
|
||||
import Ocean from "../../src/ocean/Ocean"
|
||||
import { Ocean } from "../../src/ocean/Ocean"
|
||||
import SecretStoreProvider from "../../src/secretstore/SecretStoreProvider"
|
||||
import * as signatureHelpers from "../../src/utils/SignatureHelpers"
|
||||
import WebServiceConnectorProvider from "../../src/utils/WebServiceConnectorProvider"
|
||||
|
@ -2,7 +2,7 @@ import { assert, /*expect,*/ spy, use } from "chai"
|
||||
import * as spies from "chai-spies"
|
||||
|
||||
import Account from "../../src/ocean/Account"
|
||||
import OceanAccounts from "../../src/ocean/OceanAccounts"
|
||||
import { OceanAccounts } from "../../src/ocean/OceanAccounts"
|
||||
|
||||
use(spies)
|
||||
|
||||
|
@ -3,8 +3,8 @@ import * as spies from "chai-spies"
|
||||
|
||||
import ConfigProvider from "../../src/ConfigProvider"
|
||||
import Account from "../../src/ocean/Account"
|
||||
import Ocean from "../../src/ocean/Ocean"
|
||||
import OceanSecretStore from "../../src/ocean/OceanSecretStore"
|
||||
import { Ocean } from "../../src/ocean/Ocean"
|
||||
import { OceanSecretStore } from "../../src/ocean/OceanSecretStore"
|
||||
import SecretStoreProvider from "../../src/secretstore/SecretStoreProvider"
|
||||
import config from "../config"
|
||||
|
||||
|
@ -3,7 +3,7 @@ import ConfigProvider from "../../src/ConfigProvider"
|
||||
import { DDO } from "../../src/ddo/DDO"
|
||||
import Account from "../../src/ocean/Account"
|
||||
import DID from "../../src/ocean/DID"
|
||||
import Ocean from "../../src/ocean/Ocean"
|
||||
import { Ocean } from "../../src/ocean/Ocean"
|
||||
import ServiceAgreement from "../../src/ocean/ServiceAgreements/ServiceAgreement"
|
||||
import { generateId } from "../../src/utils/GeneratorHelpers"
|
||||
import config from "../config"
|
||||
|
Loading…
Reference in New Issue
Block a user