Interface PremiaConfig

Hierarchy

Properties

apiBaseUri?: string

The base URL to use for fetching data from the Premia API.

Default Value

apiBaseUri

See

https://docs.premia.finance/api

apiKey?: string

The API key to use for fetching data from the Premia API.

Default Value

apiKey

See

https://docs.premia.finance/api/authentication

apiWsUri?: string

The base websocket URL to use for streaming data from the Premia API.

Default Value

apiWsUri

See

https://docs.premia.finance/api

chainId?: number

The chain ID to use for interacting with main exchange contracts.

Default Value

chainId

coingeckoBaseUri?: string

The base URL to use for fetching data from the Coingecko API.

Default Value

coingeckoBaseUri

See

https://www.coingecko.com/api/documentations/v3

coingeckoProApiKey?: string

The API Key to use for fetching data from the Coingecko Pro API.

See

https://www.coingecko.com/api/documentations/v3

orderbookAddress?: string

The address of the OrderbookStreamer contract (on Arbitrum Nova).

Default Value

Premia.orderbookAddress

See

https://docs.premia.finance/contracts/orderbook

orderbookChainId?: number

The chain ID to use for interacting with the auxiliary orderbook contract.

Default Value

chainId

orderbookPhrase?: string

A string representing a wallet's secret phrase for use with the orderbookProvider, to instantiate the orderbookSigner. Ignored if orderbookPrivateKey or orderbookSigner is provided.

orderbookPrivateKey?: string

A string representing a wallet's private key for use with the orderbookProvider, to instantiate the orderbookSigner. Ignored if orderbookSigner is provided.

orderbookProvider?: string | Provider

An ethers.js provider instance or a string representing a JSON-RPC URL. This provider is used for interacting with the orderbook contract. If not provided, a default connection string will be used.

Default Value

orderbookProvider

orderbookSigner?: Signer

An ethers.js signer instance for transacting with the orderbook contract. If no orderbookSigner, orderbookPrivateKey, or orderbookPhrase is provided, the orderbookProvider's default signer will be used.

Default Value

Premia.orderbookProvider.getSigner

phrase?: string

A string representing a wallet's secret phrase for use with the provider, to instantiate the signer. Ignored if privateKey or signer is provided.

poolDiamondAddress?: string

The address of the PremiaDiamond contract (on Arbitrum).

Default Value

Premia.poolDiamondAddress

See

https://docs.premia.finance/contracts/pools

poolFactoryAddress?: string

The address of the PoolFactory contract (on Arbitrum).

Default Value

Premia.poolFactoryAddress

See

https://docs.premia.finance/contracts/pools

privateKey?: string

A string representing a wallet's private key for use with the provider, to instantiate the signer. Ignored if signer is provided.

provider?: string | Provider

An ethers.js provider instance or a string representing a JSON-RPC URL. This provider is used for interacting with the main exchange contracts. If not provided, a default connection string will be used.

Default Value

provider

signer?: Signer

An ethers.js signer instance for transacting with the main exchange contracts. If no signer, privateKey, or phrase is provided, the provider's default signer will be used.

Default Value

Premia.provider.getSigner

skipVoidnode?: boolean

A flag to disable usage of the voidnode, and instead use smart contract data where available.

useTestnet?: boolean

The chain ID to use for interacting with main exchange contracts.

Default Value

useTestnet

userSettingsAddress?: string

The address of the UserSettings contract (on Arbitrum).

Default Value

Premia.userSettingsAddress

See

https://docs.premia.finance/contracts/pools

vaultMiningAddress?: string

The address of the VaultMining contract (on Arbitrum).

Default Value

Premia.vaultMiningAddress

vaultRegistryAddress?: string

The address of the VaultRegistry contract (on Arbitrum).

Default Value

Premia.vaultRegistryAddress

See

https://docs.premia.finance/contracts/vaults

voidnodeAuthentication?: {
    apiId?: string;
    apiKey: string;
}

The authentication headers to connect to voidnode with.

See

https://docs.premia.finance/api/voidnode

Type declaration

  • Optional apiId?: string
  • apiKey: string
voidnodeUri?: string

The voidnode URL to use for fetching indexed contract data.

Default Value

Premia.voidnode.uri

See

https://docs.premia.finance/api/voidnode

vxPremiaAddress?: string

The address of the VxPremia contract (on Arbitrum).

Default Value

Premia.vxPremiaAddress

Generated using TypeDoc