mirror of
https://github.com/oceanprotocol/commons.git
synced 2023-03-15 18:03:00 +01:00
44 lines
1018 B
TypeScript
44 lines
1018 B
TypeScript
import { Ocean } from '@oceanprotocol/squid'
|
|
|
|
import {
|
|
aquariusHost,
|
|
aquariusPort,
|
|
aquariusScheme,
|
|
brizoHost,
|
|
brizoPort,
|
|
brizoScheme,
|
|
brizoAddress,
|
|
nodeHost,
|
|
nodePort,
|
|
nodeScheme,
|
|
parityHost,
|
|
parityPort,
|
|
parityScheme,
|
|
secretStoreHost,
|
|
secretStorePort,
|
|
secretStoreScheme,
|
|
verbose
|
|
} from './config/config'
|
|
|
|
export async function provideOcean() {
|
|
const nodeUri = `${nodeScheme}://${nodeHost}:${nodePort}`
|
|
const aquariusUri = `${aquariusScheme}://${aquariusHost}:${aquariusPort}`
|
|
const brizoUri = `${brizoScheme}://${brizoHost}:${brizoPort}`
|
|
const parityUri = `${parityScheme}://${parityHost}:${parityPort}`
|
|
const secretStoreUri = `${secretStoreScheme}://${secretStoreHost}:${secretStorePort}`
|
|
|
|
const config = {
|
|
nodeUri,
|
|
aquariusUri,
|
|
brizoUri,
|
|
brizoAddress,
|
|
parityUri,
|
|
secretStoreUri,
|
|
verbose
|
|
}
|
|
|
|
const ocean = await Ocean.getInstance(config)
|
|
|
|
return { ocean }
|
|
}
|