Skip to main content

Class: Client

A client for interacting with the Chromatic protocol on a specific chain.

Constructors

constructor

new Client(chainName, signerOrProvider)

Creates a new instance of the Client class.

Parameters

NameTypeDescription
chainNamestringThe name of the chain.
signerOrProviderSigner | ProviderThe signer or provider object.

Defined in

packages/sdk-ethers-v5/src/Client.ts:24

Properties

chainName

chainName: string

The name of the chain.

Defined in

packages/sdk-ethers-v5/src/Client.ts:24

Accessors

provider

get provider(): Provider

The provider associated with the client.

Returns

Provider

Defined in

packages/sdk-ethers-v5/src/Client.ts:38


signer

get signer(): Signer

The signer associated with the client.

Returns

Signer

Defined in

packages/sdk-ethers-v5/src/Client.ts:31

Methods

account

account(): ChromaticAccount

Creates a new instance of the ChromaticAccount class.

Returns

ChromaticAccount

An instance of the ChromaticAccount class.

Defined in

packages/sdk-ethers-v5/src/Client.ts:101


lens

lens(): ChromaticLens

Creates a new instance of the ChromaticLens class.

Returns

ChromaticLens

An instance of the ChromaticLens class.

Defined in

packages/sdk-ethers-v5/src/Client.ts:61


market

market(): ChromaticMarket

Creates a new instance of the ChromaticMarket class.

Returns

ChromaticMarket

An instance of the ChromaticMarket class.

Defined in

packages/sdk-ethers-v5/src/Client.ts:77


marketFactory

marketFactory(): ChromaticMarketFactory

Creates a new instance of the ChromaticMarketFactory class.

Returns

ChromaticMarketFactory

An instance of the ChromaticMarketFactory class.

Defined in

packages/sdk-ethers-v5/src/Client.ts:69


position

position(): ChromaticPosition

Creates a new instance of the ChromaticPosition class.

Returns

ChromaticPosition

An instance of the ChromaticPosition class.

Defined in

packages/sdk-ethers-v5/src/Client.ts:85


router

router(): ChromaticRouter

Creates a new instance of the ChromaticRouter class.

Returns

ChromaticRouter

An instance of the ChromaticRouter class.

Defined in

packages/sdk-ethers-v5/src/Client.ts:93


setSignerOrProvider

setSignerOrProvider(signerOrProvider): void

Sets the signer or provider for the client.

Parameters

NameTypeDescription
signerOrProviderSigner | ProviderThe signer or provider object.

Returns

void

Defined in

packages/sdk-ethers-v5/src/Client.ts:46