Types

This page describes the data types shared that are shared between the different Connect packages.

Networkish

Networkish can be a number, a string or an object.

As a number

TypeDescription

number

Chain ID of a network.

As a string

TypeDescription

`"ethereum"

"rinkeby"

As an object

NameTypeDescription

chainId

number

Chain ID of a network.

ensAddress

string

Address of the ENS resolver (optional). If not provided, Connect will attempt to find one that correspond to the chainID.

name

string

Name of the network. It will be passed to ethers.js internally.

IpfsResolverDeclaration

IpfsResolverDeclaration can be a string, an object, or a IpfsResolver instance.

As a string

TypeDescription

string

URL template containing the {cid} and {path} parameters.

As an object

NameTypeDescription

urlTemplate

string

URL template containing the {cid} and {path} parameters (optional).

cache

number

The number of query results to cache. Set to 0 to disable the cache (optional).

Last updated