# Constants

Public mainnet identities, signing-domain inputs and gateway timing that the SDK exports. Every value here is a literal or is computed once when the module loads. Nothing reads the environment, an RPC or a key.


## Summary

| Name | Value | Type |
| --- | --- | --- |
| [`PROGRAM_ID`](#program_id) | `8ZpbTPnDECPTDGN5VHHKH5gfer6EUTnRHcFwfUAbkJDg` | `string` |
| [`DEPLOYMENT_ID`](#deployment_id) | `0x13a01f9d69929d8b65db7e9a6cc0805075876a8a66664e4ef30dd26f635527e2` | `string` |
| [`GENESIS_HASH`](#genesis_hash) | `5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d` | `string` |
| [`USDC_MINT`](#usdc_mint) | `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v` | `string` |
| [`USDC_DECIMALS`](#usdc_decimals) | `6` | `number` |
| [`JITOSOL_MINT`](#jitosol_mint) | `J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn` | `string` |
| [`JITO_STAKE_POOL`](#jito_stake_pool) | `Jito4APyf642JPZPx3hGc6WWJ8zPKtRbRs4P815Awbb` | `string` |
| [`TOKEN_PROGRAM`](#token_program) | `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA` | `string` |
| [`TOKEN_2022_PROGRAM`](#token_2022_program) | `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb` | literal type |
| [`CHAIN_ID`](#chain_id) | `2000000001` | `number` |
| [`MAINNET`](#mainnet) | `{ programAddress, deploymentId, genesisHash }` | `Deployment` |
| [`EIP712_DOMAIN_BASE`](#eip712_domain_base) | `{ name: 'SOL Covered Calls', version: '1', chainId: 2000000001 }` | `Readonly<{...}>` |
| [`ORDINARY_TERMS_ID`](#ordinary_terms_id) | `0xddae69a8d6ba258eb6501331627a583ee6951df68af6a50760d0a038c0a8379d` | `string` |
| [`RESTRICTED_TERMS_ID`](#restricted_terms_id) | `0xeedfb6068a9b748d45b3341000c743a4b758460d05a852c8473e9fa0469bd7e1` | `string` |
| [`RESTRICTED_CANCELLATION_TIMEOUT_SECONDS`](#restricted_cancellation_timeout_seconds) | `604800n` | `bigint` |
| [`REGISTRATION_SCOPE`](#registration_scope) | `'registration-v3'` | `string` |
| [`assetAlias`](#assetalias) | function | `(mint: string) => string` |
| [`JITOSOL_ALIAS`](#jitosol_alias) | `0x43127405c3191a0b63a5f3d845f616ffea348c68` | `string` |
| [`USDC_ALIAS`](#usdc_alias) | `0x5ce3bf3a31af18be40ba30f721101b4341690186` | `string` |
| [`GATEWAY_MAX_FRAME_BYTES`](#gateway_max_frame_bytes) | `16384` | `16384` |
| [`COLLECT_MS`](#collect_ms) | `3000` | `3000` |
| [`AWARD_MS`](#award_ms) | `3000` | `3000` |
| [`TOTAL_MS`](#total_ms) | `6000` | `6000` |
| [`REVIEW_SECONDS`](#review_seconds) | `60` | `60` |


## PROGRAM_ID

The covered-call program on Solana mainnet. Every builder targets it unless you pass another [`Deployment`](https://docs.covr.markets/reference/sdk/types.md#deployment).

```ts
export declare const PROGRAM_ID: string;
```

- **Value:** `8ZpbTPnDECPTDGN5VHHKH5gfer6EUTnRHcFwfUAbkJDg`
- **Meaning:** owner of every Maker, MakerOriginV1, MarketV3, PositionV3, Exposure, PremiumBudget, MintPolicyV1 and MintUsageV1 account the SDK derives. Vaults are different: your USDC vault, each position's collateral vault and its strike escrow are SPL token accounts owned by their token program, with a program-derived address as token authority (your Maker account for the USDC vault).
- **Where it matters:** check that every account you read (Maker, MarketV3, PositionV3) is owned by this address before you decode it. The decoders do not see the account owner.

> [!WARNING]
> The program is upgradeable. Read its upgrade authority from the program's ProgramData account before you fund a maker vault.


```ts
import { PROGRAM_ID } from '@covrfun/maker-sdk';

declare const account: { owner: string; data: Uint8Array } | null;

if (!account || account.owner !== PROGRAM_ID) throw new Error('not a covr program account');
```

## DEPLOYMENT_ID

The 32-byte deployment identity bound into every EIP-712 `verifyingContract` and stored in every MarketV3 account (bytes 237 to 269).

```ts
export declare const DEPLOYMENT_ID: string;
```

- **Value:** `0x13a01f9d69929d8b65db7e9a6cc0805075876a8a66664e4ef30dd26f635527e2`
- **Meaning:** separates this deployment's signatures from any other deployment of the same code. A grant or quote signed for one deployment never verifies on another.
- **Where it matters:** [`registrationGrantDomain`](https://docs.covr.markets/reference/sdk/setup.md#registrationgrantdomain), [`quoteDomain`](https://docs.covr.markets/reference/sdk/markets.md#quotedomain) and [`decodeMarketV3`](https://docs.covr.markets/reference/sdk/markets.md#decodemarketv3), which refuses a market whose stored deployment id differs.


## GENESIS_HASH

Solana mainnet's genesis hash.

```ts
export declare const GENESIS_HASH: string;
```

- **Value:** `5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d`
- **Meaning:** every MarketV3 and PositionV3 account stores it. The decoders require it.
- **Where it matters:** [`decodeMarketV3`](https://docs.covr.markets/reference/sdk/markets.md#decodemarketv3) refuses any market whose stored genesis is not this value, even if you pass a [`Deployment`](https://docs.covr.markets/reference/sdk/types.md#deployment) with another `genesisHash`. The program pins the same value.


## USDC_MINT

The payment mint of every covered-call market, and the only one this SDK version handles. Premiums, fees and strikes of calls are all paid in it. Put markets, which 0.1.1 does not support, name their own payment mint.

```ts
export declare const USDC_MINT: string;
```

- **Value:** `EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v`
- **Where it matters:** your maker vault holds this mint. [`deposit`](https://docs.covr.markets/reference/sdk/setup.md#deposit) moves it from your own token account.


## USDC_DECIMALS

Decimals of [`USDC_MINT`](#usdc_mint). One USDC is `1_000_000` atoms.

```ts
export declare const USDC_DECIMALS: number;
```

- **Value:** `6`
- **Where it matters:** every `...Usdc` amount in the SDK is in USDC atoms (10^-6 USDC).


## JITOSOL_MINT

The JitoSOL mint, the collateral desks quote today.

```ts
export declare const JITOSOL_MINT: string;
```

- **Value:** `J1toso1uCk3RLmjorhTtrVwY9HJ7X8V9yYac6Y7kGCPn`
- **Decimals:** 9 (one JitoSOL is `1_000_000_000` atoms).
- **Where it matters:** [`GatewayClient.connect`](https://docs.covr.markets/reference/sdk/gateway-client.md#gatewayclientconnect) subscribes to this asset when you pass no `assets`.


## JITO_STAKE_POOL

The Jito stake pool account. The program requires it as a read-only extra account on every fill whose collateral is JitoSOL.

```ts
export declare const JITO_STAKE_POOL: string;
```

- **Value:** `Jito4APyf642JPZPx3hGc6WWJ8zPKtRbRs4P815Awbb`
- **Where it matters:** [`fillV3`](https://docs.covr.markets/reference/sdk/settlement.md#fillv3) appends it for JitoSOL markets and refuses any other pool address.


## TOKEN_PROGRAM

The SPL Token program. It owns the USDC mint and your vault.

```ts
export declare const TOKEN_PROGRAM: string;
```

- **Value:** `TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA`
- **Where it matters:** the `program` field of a [`CollateralIdentity`](https://docs.covr.markets/reference/sdk/types.md#collateralidentity) for a classic SPL mint such as JitoSOL.


## TOKEN_2022_PROGRAM

The Token-2022 program. Markets accept collateral owned by either token program.

```ts
export declare const TOKEN_2022_PROGRAM = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
```

- **Value:** `TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb`
- **Type:** the string literal itself, not `string` (unlike [`TOKEN_PROGRAM`](#token_program)).


## CHAIN_ID

The EIP-712 `chainId` used in every covr signing domain and in every RFQ, intent and quote.

```ts
export declare const CHAIN_ID: number;
```

- **Value:** `2000000001`
- **Meaning:** a private venue discriminator. It is not an EVM chain id and not a Solana cluster id.
- **Where it matters:** wallets and KMS policies that whitelist chain ids must allow this value.


## MAINNET

The default [`Deployment`](https://docs.covr.markets/reference/sdk/types.md#deployment): mainnet program, deployment id and genesis hash. The object is frozen.

```ts
export declare const MAINNET: Deployment;
```

- **Value:**

```json
{
  "programAddress": "8ZpbTPnDECPTDGN5VHHKH5gfer6EUTnRHcFwfUAbkJDg",
  "deploymentId": "0x13a01f9d69929d8b65db7e9a6cc0805075876a8a66664e4ef30dd26f635527e2",
  "genesisHash": "5eykt4UsFv8P8NJdTREpY1vzqKqZKvdpKuc147dw2N9d"
}
```

- **Where it matters:** it is the default last argument of every function that takes a `Deployment`. See [the convention](https://docs.covr.markets/reference/sdk/overview.md#the-deployment-argument).


## EIP712_DOMAIN_BASE

The `name`, `version` and `chainId` shared by every covr EIP-712 domain. Each real domain adds its own `verifyingContract`: one for the registration grant, one per market. The object is frozen.

```ts
export declare const EIP712_DOMAIN_BASE: Readonly<{
    name: string;
    version: string;
    chainId: number;
}>;
```

- **Value:** `{ name: 'SOL Covered Calls', version: '1', chainId: 2000000001 }`
- **Where it matters:** you never sign with this object alone. Use [`registrationGrantDomain`](https://docs.covr.markets/reference/sdk/setup.md#registrationgrantdomain) or [`quoteDomain`](https://docs.covr.markets/reference/sdk/markets.md#quotedomain). See [Signing](https://docs.covr.markets/reference/sdk/signing.md#how-covr-domains-are-built).


## ORDINARY_TERMS_ID

The `termsId` of every ordinary market (settlement mode 0, atomic exercise): `sha256("COVR:ORDINARY-ATOMIC:1\0")`, as 0x-hex.

```ts
export declare const ORDINARY_TERMS_ID: string;
```

- **Value:** `0xddae69a8d6ba258eb6501331627a583ee6951df68af6a50760d0a038c0a8379d`
- **Where it matters:** a mint policy holds one terms id. A policy built from an ordinary market (with [`mintPolicySettingsFor`](https://docs.covr.markets/reference/sdk/setup.md#mintpolicysettingsfor)) carries this value and admits fills only in ordinary markets.


## RESTRICTED_TERMS_ID

The `termsId` of restricted markets (settlement mode 1, fund then deliver) with the approved 7-day cancellation timeout: `sha256("COVR:RESTRICTED-PENDING:1\0" || 0x01 || u64_le(604800))`, as 0x-hex.

```ts
export declare const RESTRICTED_TERMS_ID: string;
```

- **Value:** `0xeedfb6068a9b748d45b3341000c743a4b758460d05a852c8473e9fa0469bd7e1`

> [!NOTE]
> Restricted (tokenized-stock) markets are covr-only today. Desks quote ordinary JitoSOL markets.


## RESTRICTED_CANCELLATION_TIMEOUT_SECONDS

The only cancellation timeout a restricted market may carry: 7 days.

```ts
export declare const RESTRICTED_CANCELLATION_TIMEOUT_SECONDS: bigint;
```

- **Value:** `604800n` (seconds)
- **Where it matters:** [`createRestrictedMarketV3`](https://docs.covr.markets/reference/sdk/markets.md#createrestrictedmarketv3) defaults to it and refuses any other value. [`decodeMarketV3`](https://docs.covr.markets/reference/sdk/markets.md#decodemarketv3) decodes restricted markets against it.


## REGISTRATION_SCOPE

The scope string hashed into the registration grant's `verifyingContract`.

```ts
export declare const REGISTRATION_SCOPE: string;
```

- **Value:** `'registration-v3'`
- **Where it matters:** [`registrationGrantDomain`](https://docs.covr.markets/reference/sdk/setup.md#registrationgrantdomain) derives `verifyingContract = last20(keccak256("deployment-v2" || deploymentId || programId || "registration-v3"))`. For mainnet that is `0xd2d2b887d02b01d3a4371c7b77f96c3880513b4e`.


## assetAlias

Computes the 20-byte wire alias of a mint. Use it to match an RFQ's `asset` to a mint, or to subscribe to a feed by mint.

RFQs, intents and quotes name tokens by this alias, not by the Solana mint. The alias is the last 20 bytes of `keccak256` over the mint's 32 public-key bytes, as lowercase 0x-hex. It is an identifier only, never an EVM contract.

```ts
export declare function assetAlias(mint: string): string;
```

| Name | Type | Description |
| --- | --- | --- |
| `mint` | `string` | Base58 mint address. |

**Returns:** `string`. `0x` plus 40 lowercase hex characters.

**Throws:** `SolanaError` from `@solana/kit` when `mint` is not a valid base58 address.

```ts
import { assetAlias, JITOSOL_MINT, JITOSOL_ALIAS } from '@covrfun/maker-sdk';

console.log(assetAlias(JITOSOL_MINT) === JITOSOL_ALIAS); // true
```


## JITOSOL_ALIAS

The wire alias of [`JITOSOL_MINT`](#jitosol_mint).

```ts
export declare const JITOSOL_ALIAS: string;
```

- **Value:** `0x43127405c3191a0b63a5f3d845f616ffea348c68`
- **Where it matters:** `asset`, `collateralAsset` and `assetAddress` of every JitoSOL RFQ, intent and quote. The JitoSOL feed path is `/rfqs/0x43127405c3191a0b63a5f3d845f616ffea348c68`.


## USDC_ALIAS

The wire alias of [`USDC_MINT`](#usdc_mint).

```ts
export declare const USDC_ALIAS: string;
```

- **Value:** `0x5ce3bf3a31af18be40ba30f721101b4341690186`
- **Where it matters:** the `usd` field of every RFQ, intent and quote.


## GATEWAY_MAX_FRAME_BYTES

The largest WebSocket frame the gateway accepts, in bytes. The client also uses it as its own inbound limit.

```ts
export declare const GATEWAY_MAX_FRAME_BYTES = 16384;
```

- **Value:** `16384` (16 KiB)
- **Where it matters:** [`GatewayClient`](https://docs.covr.markets/reference/sdk/gateway-client.md) refuses to send a request whose JSON frame is larger, and closes a socket that receives a larger frame. A signed bid intent or quote frame is under 1 KiB (844 and 931 bytes in the golden vectors).


## COLLECT_MS

How long an opening auction collects sealed bid intents, in milliseconds from RFQ creation.

```ts
export declare const COLLECT_MS = 3000;
```

- **Value:** `3000` ms
- **Meaning:** `closesAt = createdAt + 3000`. A bid intent's `validUntil` must be later than `ceil(closesAt / 1000)`.


## AWARD_MS

How long the winning maker has to answer an award with a signed quote, in milliseconds.

```ts
export declare const AWARD_MS = 3000;
```

- **Value:** `3000` ms
- **Meaning:** each award's `awardUntil = min(award time + 3000, hardDeadline)`, rounded down to a whole millisecond. A decline, a disconnect or a failed answer passes the award to the next bidder at once.


## TOTAL_MS

The auction's hard deadline, in milliseconds from RFQ creation.

```ts
export declare const TOTAL_MS = 6000;
```

- **Value:** `6000` ms
- **Meaning:** `hardDeadline = createdAt + 6000`. No award is made and no quote is admitted after it.


## REVIEW_SECONDS

The longest life a quote may have, in seconds, measured on the gateway's clock when it admits the quote.

```ts
export declare const REVIEW_SECONDS = 60;
```

- **Value:** `60` s
- **Meaning:** the gateway admits a quote only if `now < validUntil <= now + 60`. [`defaultIntentValidUntil`](https://docs.covr.markets/reference/sdk/quoting.md#defaultintentvaliduntil) also uses it: `min(option expiry, ceil(hardDeadline / 1000) + 60)`.

---

Source: https://docs.covr.markets/reference/sdk/constants · Part of covr Docs, https://docs.covr.markets/llms.txt
