Constructor
new ChainList(list)
Create a ChainList - Keep chains containing at least one explorer on the EIP-3091 standard
Parameters:
Name | Type | Description |
---|---|---|
list |
Array.<object> | An array of unknown objects representing chains data |
- Source:
Methods
(async) fetch() → {ChainList}
Return a ChainList object
- Source:
Returns:
- Type
- ChainList
getByChainId(chainId) → {Chain}
Return a chain found by chainId
Parameters:
Name | Type | Description |
---|---|---|
chainId |
number | The chain unique id |
- Source:
Returns:
- Type
- Chain
getList() → {Array.<Chain>}
Return all chains
- Source:
Returns:
- All the chains
- Type
- Array.<Chain>
searchByName(name) → {Array.<Chain>|null}
Return a list of chains filtered by name
Parameters:
Name | Type | Description |
---|---|---|
name |
string | The name to filter |
- Source:
Returns:
- Type
- Array.<Chain> | null