Skip to content

Commit

Permalink
more cleanup and jsdoc updates
Browse files Browse the repository at this point in the history
  • Loading branch information
bogdanfazakas committed Apr 5, 2023
1 parent e5bfd3e commit 967f664
Show file tree
Hide file tree
Showing 14 changed files with 273 additions and 211 deletions.
4 changes: 2 additions & 2 deletions src/@types/DDO/Metadata.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
export interface MetadataAlgorithm {
/**
* Language used to implement the software.
* Programming language used to implement the software.
* @type {string}
*/
language?: string
Expand Down Expand Up @@ -125,7 +125,7 @@ export interface Metadata {
contentLanguage?: string

/**
* Information about asset of typealgorithm
* Information about asset of type algorithm. Required for algorithm assets.
* @type {MetadataAlgorithm}
*/
algorithm?: MetadataAlgorithm
Expand Down
2 changes: 1 addition & 1 deletion src/@types/File.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AbiItem } from 'web3-utils'
import { AbiItem } from './Contracts'

interface FileTypeHeaders {
[key: string]: string
Expand Down
3 changes: 2 additions & 1 deletion src/config/Config.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { AbiItem } from 'web3-utils/types'
import { AbiItem } from '../@types'
import { LogLevel } from '../utils'

export class Config {
Expand Down Expand Up @@ -26,6 +26,7 @@ export class Config {
*/
public providerUri?: string

// TODO: check if this is still necesary
/**
* Web3 Provider.
* @type {any}
Expand Down
6 changes: 6 additions & 0 deletions src/config/ConfigHelper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -205,6 +205,12 @@ export class ConfigHelper {
return configAddresses
}

/**
* Returns the config object for a specific network supported by the oceanprotocol stack
* @param {string | number} network the network's chainId or name
* @param {string} infuraProjectId optional infura project id that will replace the configs node URI
* @return {Config} Config obhjedct
*/
public getConfig(network: string | number, infuraProjectId?: string): Config {
const filterBy = typeof network === 'string' ? 'network' : 'chainId'
let config = configHelperNetworks.find((c) => c[filterBy] === network)
Expand Down
Loading

0 comments on commit 967f664

Please sign in to comment.