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.
signerOrProviderProvider | SignerThe signer or provider object.

Defined in

packages/sdk-ethers-v6/src/Client.ts:23

Properties

chainName

chainName: string

The name of the chain.

Defined in

packages/sdk-ethers-v6/src/Client.ts:23

Accessors

provider

get provider(): Provider

The provider associated with the client.

Returns

Provider

Defined in

packages/sdk-ethers-v6/src/Client.ts:37


signer

get signer(): Signer

The signer associated with the client.

Returns

Signer

Defined in

packages/sdk-ethers-v6/src/Client.ts:30

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-v6/src/Client.ts:99


lens

lens(): ChromaticLens

Creates a new instance of the ChromaticLens class.

Returns

ChromaticLens

An instance of the ChromaticLens class.

Defined in

packages/sdk-ethers-v6/src/Client.ts:59


market

market(): ChromaticMarket

Creates a new instance of the ChromaticMarket class.

Returns

ChromaticMarket

An instance of the ChromaticMarket class.

Defined in

packages/sdk-ethers-v6/src/Client.ts:75


marketFactory

marketFactory(): ChromaticMarketFactory

Creates a new instance of the ChromaticMarketFactory class.

Returns

ChromaticMarketFactory

An instance of the ChromaticMarketFactory class.

Defined in

packages/sdk-ethers-v6/src/Client.ts:67


position

position(): ChromaticPosition

Creates a new instance of the ChromaticPosition class.

Returns

ChromaticPosition

An instance of the ChromaticPosition class.

Defined in

packages/sdk-ethers-v6/src/Client.ts:83


router

router(): ChromaticRouter

Creates a new instance of the ChromaticRouter class.

Returns

ChromaticRouter

An instance of the ChromaticRouter class.

Defined in

packages/sdk-ethers-v6/src/Client.ts:91


setSignerOrProvider

setSignerOrProvider(signerOrProvider): void

Sets the signer or provider for the client.

Parameters

NameTypeDescription
signerOrProviderProvider | SignerThe signer or provider object.

Returns

void

Defined in

packages/sdk-ethers-v6/src/Client.ts:45