# SDK overview

`@covrfun/maker-sdk` is the TypeScript toolkit a market-making desk uses to quote covr's covered calls on Solana. It derives and decodes your on-chain accounts, builds every setup and settlement instruction, signs gateway messages with your quote key, does the exact USDC arithmetic the program does, and speaks the gateway's WebSocket protocol.


## Install

```sh
npm install @covrfun/maker-sdk
```

If your own code imports `ethers` or `@solana/kit`, install the exact versions the SDK depends on, so both share one copy:

```sh
npm install ethers@6.17.0 @solana/kit@8.2.0
```

| Package fact | Value |
| --- | --- |
| Version | `0.1.1` |
| License | MIT. The license text ships as `LICENSE`. |
| Module format | ES modules only (`"type": "module"`). Import it from an ES module project. |
| Runtime | Node.js 24 or later (`engines.node: ">=24"`). Node only: it uses `node:crypto`, `node:assert` and `ws`. |
| Types | Bundled. No `@types` package needed. |
| Entry points | `@covrfun/maker-sdk`, `@covrfun/maker-sdk/vectors/golden-vectors.json`, `@covrfun/maker-sdk/package.json` |
| Also shipped | `examples/maker/index.ts` and `examples/maker/README.md` (an example bot); `examples/keeper/index.ts`, `examples/keeper/withdraw.ts` and `examples/keeper/README.md` (an [expiry keeper](https://docs.covr.markets/guides/expiry-keeper.md) and a [vault withdraw](https://docs.covr.markets/guides/withdraw.md) script); `README.md`; `CHANGELOG.md` |
| Dev tooling | None required. To run a `.ts` file directly, use `node file.ts` (Node 24 strips types) or install `tsx` (`npm install -D tsx`) and run `npx tsx file.ts`. Node does not strip types inside `node_modules`, so copy the example bot out before running it. |

Runtime dependencies, pinned to exact versions (the source and the built `package.json` pin the same three):

| Dependency | Version | Used for |
| --- | --- | --- |
| `@solana/kit` | `8.2.0` | Addresses, PDAs, instruction types |
| `ethers` | `6.17.0` | EIP-712 hashing, signature recovery, `TypedDataDomain` |
| `ws` | `8.21.3` | Gateway WebSockets |


> [!NOTE]
> covr turns gateway access on per desk. covr's markets list only covr's own maker today, so your bid intents are verified exactly like real ones and then refused with `Bid intent verified but not entered: this market does not list this maker yet` (practice mode). Listing other desks is planned work. Desks quote JitoSOL ordinary markets; tokenized-stock (restricted) markets stay covr-only. Markets a desk creates are not shown to customers yet.


## Cash-secured puts are not in this package

covr's program has run cash-secured puts since its 4 November 2026 upgrade. Version 0.1.1 has no put support: no builders for put setup or settlement, no put decoders, and no put quote signing. Until a release ships them, a desk cannot build put quotes or put setup with this SDK. covr's gateway does not route put RFQs to desks either, so today only covr's own maker quotes puts. When a release with put helpers ships is to confirm with covr. The on-chain put rules are in [Program > Cash-secured puts](https://docs.covr.markets/reference/program/instructions.md#cash-secured-puts).

Two things in 0.1.1 meet put accounts on chain:

- [`decodeMarketV3`](https://docs.covr.markets/reference/sdk/markets.md#decodemarketv3) throws `maker-sdk: unknown settlement mode 2` on a put market. Skip those markets if you scan every MarketV3 account.
- [`decodePositionV3`](https://docs.covr.markets/reference/sdk/settlement.md#decodepositionv3) throws `PositionV3: timeout anchor` on a put position.

covr's source also has an optional `paymentMint` on [`initializeVault`](https://docs.covr.markets/reference/sdk/setup.md#initializevault), [`setPremiumBudget`](https://docs.covr.markets/reference/sdk/setup.md#setpremiumbudget), [`deposit`](https://docs.covr.markets/reference/sdk/setup.md#deposit), [`withdraw`](https://docs.covr.markets/reference/sdk/setup.md#withdraw) and [`deriveVault`](https://docs.covr.markets/reference/sdk/setup.md#derivevault), for vaults in a payment token other than USDC. It is not in 0.1.1 either. In 0.1.1 these functions handle USDC only.

## Design principles

- **It builds and signs. It never prices.** There is no pricing model and no default price anywhere. Every price is an argument you pass. [`exactPriceAtOrBelow`](https://docs.covr.markets/reference/sdk/settlement.md#exactpriceatorbelow) only rounds your price to one the program can settle exactly.
- **It never holds keys.** Signing functions take a [`TypedDataSigner`](https://docs.covr.markets/reference/sdk/signing.md#typeddatasigner): an ethers `Wallet` or your KMS or HSM adapter. Nothing loads a key from disk or the environment.
- **It never picks an RPC.** No function reads the chain. You read accounts from your own RPC at finalized commitment, check their owner, and pass the bytes to the decoders.
- **It never submits.** Builders return `@solana/kit` instructions. Your pipeline adds them to a transaction, signs with your Solana authority and sends.
- **No environment.** The SDK reads no environment variable. Mainnet identities are literals in [constants](https://docs.covr.markets/reference/sdk/constants.md).
- **Exact or refuse.** Amounts that the program would refuse make the SDK throw. Nothing is rounded except the protocol fee, which rounds down as the program does.
- **covr's own code.** The decoders, the signers and most builders call the same code covr's own maker and gateway use. The vault, premium budget, deposit, withdraw and exposure-limit encoders, and the fresh writer account recipe of the exit helpers, are the SDK's own and are tested byte for byte against covr's.


## The Deployment argument

Every function that derives, decodes or builds against a program address takes an optional **last** argument `d: Deployment`, defaulting to [`MAINNET`](https://docs.covr.markets/reference/sdk/constants.md#mainnet). Pass another [`Deployment`](https://docs.covr.markets/reference/sdk/types.md#deployment) only for a local validator or tests.

```ts
import { deriveMaker, MAINNET, type Deployment } from '@covrfun/maker-sdk';

declare const localProgramId: string; // a program you deployed to a local validator
const local: Deployment = { ...MAINNET, programAddress: localProgramId };

const onMainnet = await deriveMaker('0x7B99e6A7407Fe0058119F4f13494C0b9cec35738');
const onLocal = await deriveMaker('0x7B99e6A7407Fe0058119F4f13494C0b9cec35738', local);
```

| Takes `d` | Uses |
| --- | --- |
| [`deriveMaker`](https://docs.covr.markets/reference/sdk/setup.md#derivemaker), [`decodeMaker`](https://docs.covr.markets/reference/sdk/setup.md#decodemaker), [`deriveVault`](https://docs.covr.markets/reference/sdk/setup.md#derivevault), [`deriveExposure`](https://docs.covr.markets/reference/sdk/setup.md#deriveexposure), [`deriveMintPolicy`](https://docs.covr.markets/reference/sdk/setup.md#derivemintpolicy), [`deriveMarket`](https://docs.covr.markets/reference/sdk/setup.md#derivemarket), [`derivePosition`](https://docs.covr.markets/reference/sdk/setup.md#deriveposition) | `programAddress` |
| [`initializeVault`](https://docs.covr.markets/reference/sdk/setup.md#initializevault), [`setPremiumBudget`](https://docs.covr.markets/reference/sdk/setup.md#setpremiumbudget), [`deposit`](https://docs.covr.markets/reference/sdk/setup.md#deposit), [`withdraw`](https://docs.covr.markets/reference/sdk/setup.md#withdraw), [`initializeExposureV3`](https://docs.covr.markets/reference/sdk/setup.md#initializeexposurev3), [`setExposureLimit`](https://docs.covr.markets/reference/sdk/setup.md#setexposurelimit), [`initializeMintPolicyV1`](https://docs.covr.markets/reference/sdk/setup.md#initializemintpolicyv1), [`updateMintPolicyV1`](https://docs.covr.markets/reference/sdk/setup.md#updatemintpolicyv1), [`pauseMintPolicyV1`](https://docs.covr.markets/reference/sdk/setup.md#pausemintpolicyv1), [`decodeMintPolicy`](https://docs.covr.markets/reference/sdk/setup.md#decodemintpolicy), [`decodeMintUsage`](https://docs.covr.markets/reference/sdk/setup.md#decodemintusage), [`bootstrapMintUsageV1`](https://docs.covr.markets/reference/sdk/setup.md#bootstrapmintusagev1), [`configureMaker`](https://docs.covr.markets/reference/sdk/setup.md#configuremaker), [`createMarketV3`](https://docs.covr.markets/reference/sdk/markets.md#createmarketv3), [`createRestrictedMarketV3`](https://docs.covr.markets/reference/sdk/markets.md#createrestrictedmarketv3) | `programAddress` |
| [`registrationGrantDomain`](https://docs.covr.markets/reference/sdk/setup.md#registrationgrantdomain), [`signRegistrationGrant`](https://docs.covr.markets/reference/sdk/setup.md#signregistrationgrant), [`registerMakerV3`](https://docs.covr.markets/reference/sdk/setup.md#registermakerv3) | `programAddress`, `deploymentId` |
| [`decodeMarketV3`](https://docs.covr.markets/reference/sdk/markets.md#decodemarketv3), [`marketDomain`](https://docs.covr.markets/reference/sdk/markets.md#marketdomain), [`decodePositionV3`](https://docs.covr.markets/reference/sdk/settlement.md#decodepositionv3) | `programAddress`, `deploymentId`, `genesisHash` |

The other program-facing functions take no `d`. [`quoteDomain`](https://docs.covr.markets/reference/sdk/markets.md#quotedomain), [`fillV3`](https://docs.covr.markets/reference/sdk/settlement.md#fillv3), [`exerciseV3`](https://docs.covr.markets/reference/sdk/settlement.md#exercisev3), [`releaseV3`](https://docs.covr.markets/reference/sdk/settlement.md#releasev3), [`fundRestrictedExerciseV3`](https://docs.covr.markets/reference/sdk/settlement.md#fundrestrictedexercisev3), [`completePendingDeliveryV3`](https://docs.covr.markets/reference/sdk/settlement.md#completependingdeliveryv3), [`exerciseV3Instructions`](https://docs.covr.markets/reference/sdk/settlement.md#exercisev3instructions) and [`releaseV3Instructions`](https://docs.covr.markets/reference/sdk/settlement.md#releasev3instructions) read the program and deployment from the decoded market you pass, so they follow the `Deployment` you decoded it with.

> [!NOTE]
> Market decoding always requires the mainnet genesis hash and the mainnet USDC mint, exactly as the program does. A `Deployment` with another `genesisHash` cannot decode any market.


## Every export

The package exports 93 values and 28 types.


### Constants

| Name | Kind | Page | What it is |
| --- | --- | --- | --- |
| `PROGRAM_ID` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#program_id) | Covered-call program id on mainnet |
| `DEPLOYMENT_ID` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#deployment_id) | 32-byte deployment identity in every signing domain |
| `GENESIS_HASH` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#genesis_hash) | Solana mainnet genesis hash |
| `USDC_MINT` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#usdc_mint) | The payment mint |
| `USDC_DECIMALS` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#usdc_decimals) | `6` |
| `JITOSOL_MINT` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#jitosol_mint) | JitoSOL mint, the collateral desks quote |
| `JITO_STAKE_POOL` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#jito_stake_pool) | Extra account every JitoSOL fill passes |
| `TOKEN_PROGRAM` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#token_program) | SPL Token program |
| `TOKEN_2022_PROGRAM` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#token_2022_program) | Token-2022 program |
| `CHAIN_ID` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#chain_id) | EIP-712 chain id `2000000001` |
| `MAINNET` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#mainnet) | Default `Deployment` |
| `EIP712_DOMAIN_BASE` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#eip712_domain_base) | Shared domain name, version, chain id |
| `ORDINARY_TERMS_ID` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#ordinary_terms_id) | Terms id of ordinary markets |
| `RESTRICTED_TERMS_ID` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#restricted_terms_id) | Terms id of restricted markets |
| `RESTRICTED_CANCELLATION_TIMEOUT_SECONDS` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#restricted_cancellation_timeout_seconds) | `604800n`, the only restricted timeout |
| `REGISTRATION_SCOPE` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#registration_scope) | `'registration-v3'` |
| `assetAlias` | function | [constants](https://docs.covr.markets/reference/sdk/constants.md#assetalias) | 20-byte wire alias of a mint |
| `JITOSOL_ALIAS` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#jitosol_alias) | JitoSOL wire alias |
| `USDC_ALIAS` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#usdc_alias) | USDC wire alias |
| `GATEWAY_MAX_FRAME_BYTES` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#gateway_max_frame_bytes) | `16384`, largest gateway frame |
| `COLLECT_MS` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#collect_ms) | `3000`, bid collection window |
| `AWARD_MS` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#award_ms) | `3000`, time to answer an award |
| `TOTAL_MS` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#total_ms) | `6000`, auction hard deadline |
| `REVIEW_SECONDS` | const | [constants](https://docs.covr.markets/reference/sdk/constants.md#review_seconds) | `60`, longest quote life |
| `Deployment` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#deployment) | Program, deployment id and genesis an operation targets |

### Signing

| Name | Kind | Page | What it is |
| --- | --- | --- | --- |
| `assertCanonicalSignature` | function | [signing](https://docs.covr.markets/reference/sdk/signing.md#assertcanonicalsignature) | Throws unless a signature is in the form the program accepts |
| `TypedDataSigner` | interface | [signing](https://docs.covr.markets/reference/sdk/signing.md#typeddatasigner) | Any EIP-712 signer: ethers `Wallet`, KMS or HSM adapter |

### Setup

| Name | Kind | Page | What it is |
| --- | --- | --- | --- |
| `deriveMaker` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#derivemaker) | Maker and MakerOriginV1 addresses of a quote key |
| `decodeMaker` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#decodemaker) | Decode your Maker account: `minNonce`, operator |
| `deriveVault` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#derivevault) | USDC vault and PremiumBudget addresses |
| `deriveExposure` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#deriveexposure) | Exposure address for one collateral |
| `deriveMintPolicy` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#derivemintpolicy) | MintPolicyV1 and MintUsageV1 addresses |
| `deriveMarket` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#derivemarket) | MarketV3 address from creator and salt |
| `derivePosition` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#deriveposition) | PositionV3 address of a quote nonce, plus its vaults |
| `REGISTER_TYPES` | const | [setup](https://docs.covr.markets/reference/sdk/setup.md#register_types) | EIP-712 types of the registration grant |
| `registrationGrantDomain` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#registrationgrantdomain) | EIP-712 domain of the registration grant |
| `registrationGrantMessage` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#registrationgrantmessage) | The grant message for an authority |
| `signRegistrationGrant` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#signregistrationgrant) | Sign the registration grant with your quote key |
| `registerMakerV3` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#registermakerv3) | Build `register_maker_v3` |
| `initializeVault` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#initializevault) | Build `initialize_vault` |
| `setPremiumBudget` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#setpremiumbudget) | Build `set_premium_budget` |
| `deposit` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#deposit) | Build `deposit` (USDC into the vault) |
| `withdraw` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#withdraw) | Build `withdraw` (vault USDC to your account) |
| `initializeExposureV3` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#initializeexposurev3) | Build `initialize_exposure_v3` |
| `setExposureLimit` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#setexposurelimit) | Build `set_exposure_limit` (classic SPL Token collateral) |
| `mintPolicySettingsFor` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#mintpolicysettingsfor) | Mint policy settings from a market and your caps |
| `initializeMintPolicyV1` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#initializemintpolicyv1) | Build `initialize_mint_policy_v1` |
| `updateMintPolicyV1` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#updatemintpolicyv1) | Build `update_mint_policy_v1` |
| `pauseMintPolicyV1` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#pausemintpolicyv1) | Build `pause_mint_policy_v1` (authority or watcher) |
| `decodeMintPolicy` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#decodemintpolicy) | Decode your MintPolicyV1: generation, settings |
| `decodeMintUsage` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#decodemintusage) | Decode your MintUsageV1: open amounts, counters |
| `bootstrapMintUsageV1` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#bootstrapmintusagev1) | Build `bootstrap_mint_usage_v1` |
| `configureMaker` | function | [setup](https://docs.covr.markets/reference/sdk/setup.md#configuremaker) | Build `configure_maker`: operator and nonce floor |
| `RegisterMakerV3Input` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#registermakerv3input) | Input of `registerMakerV3` |
| `CollateralIdentity` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#collateralidentity) | Mint, token program and decimals |
| `MintPolicySettingsV1` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#mintpolicysettingsv1) | Mint policy caps and bindings |
| `MintPolicyV1` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#mintpolicyv1) | Decoded mint policy |
| `MintUsageV1` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#mintusagev1) | Decoded mint usage |
| `SdkInstruction` | type | [types](https://docs.covr.markets/reference/sdk/types.md#sdkinstruction) | Instruction with accounts and data |
| `DecodedMakerAccount` | type | [types](https://docs.covr.markets/reference/sdk/types.md#decodedmakeraccount) | Decoded Maker account |

### Markets

| Name | Kind | Page | What it is |
| --- | --- | --- | --- |
| `decodeMarketV3` | function | [markets](https://docs.covr.markets/reference/sdk/markets.md#decodemarketv3) | Decode and validate a MarketV3 account |
| `quoteDomain` | function | [markets](https://docs.covr.markets/reference/sdk/markets.md#quotedomain) | EIP-712 domain of one decoded market |
| `marketDomain` | function | [markets](https://docs.covr.markets/reference/sdk/markets.md#marketdomain) | Decode then domain, in one call |
| `createMarketV3` | function | [markets](https://docs.covr.markets/reference/sdk/markets.md#createmarketv3) | Build `create_market_v3` |
| `createRestrictedMarketV3` | function | [markets](https://docs.covr.markets/reference/sdk/markets.md#createrestrictedmarketv3) | Build `create_restricted_market_v3` |
| `DecodedMarketV3` | type | [types](https://docs.covr.markets/reference/sdk/types.md#decodedmarketv3) | `MarketV3 \| RestrictedMarketV3` |
| `MarketV3` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#marketv3) | Ordinary market terms |
| `RestrictedMarketV3` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#restrictedmarketv3) | Restricted market terms |
| `CreateMarketInput` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#createmarketinput) | Input of the market builders |

### Quoting

| Name | Kind | Page | What it is |
| --- | --- | --- | --- |
| `BID_INTENT_TYPES` | const | [quoting](https://docs.covr.markets/reference/sdk/quoting.md#bid_intent_types) | EIP-712 types of a bid intent |
| `QUOTE_V2_TYPES` | const | [quoting](https://docs.covr.markets/reference/sdk/quoting.md#quote_v2_types) | EIP-712 types of a quote |
| `WITHDRAW_TYPES` | const | [quoting](https://docs.covr.markets/reference/sdk/quoting.md#withdraw_types) | EIP-712 types of a withdrawal |
| `auctionKey` | function | [quoting](https://docs.covr.markets/reference/sdk/quoting.md#auctionkey) | `keccak256` of an RFQ id |
| `defaultIntentValidUntil` | function | [quoting](https://docs.covr.markets/reference/sdk/quoting.md#defaultintentvaliduntil) | covr's default intent expiry |
| `buildBidIntent` | function | [quoting](https://docs.covr.markets/reference/sdk/quoting.md#buildbidintent) | Unsigned bid intent from an RFQ snapshot |
| `buildQuote` | function | [quoting](https://docs.covr.markets/reference/sdk/quoting.md#buildquote) | Unsigned quote from your awarded intent |
| `signIntent` | function | [quoting](https://docs.covr.markets/reference/sdk/quoting.md#signintent) | Sign a bid intent |
| `signQuote` | function | [quoting](https://docs.covr.markets/reference/sdk/quoting.md#signquote) | Sign a quote |
| `signWithdrawal` | function | [quoting](https://docs.covr.markets/reference/sdk/quoting.md#signwithdrawal) | Sign a quote withdrawal (route not served to desks) |
| `BidIntent` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#bidintent) | Signed bid intent |
| `QuoteV2` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#quotev2) | Signed quote |
| `UnsignedBidIntent` | type | [types](https://docs.covr.markets/reference/sdk/types.md#unsignedbidintent) | Bid intent without signature |
| `UnsignedQuoteV2` | type | [types](https://docs.covr.markets/reference/sdk/types.md#unsignedquotev2) | Quote without signature |
| `RfqRequest` | type | [types](https://docs.covr.markets/reference/sdk/types.md#rfqrequest) | RFQ instrument |
| `RfqSnapshot` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#rfqsnapshot) | `GET /api/rfqs/<id>` body |
| `Award` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#award) | An award you hold |

### Settlement

| Name | Kind | Page | What it is |
| --- | --- | --- | --- |
| `strikePayment` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#strikepayment) | USDC atoms paid on exercise |
| `grossPremium` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#grosspremium) | USDC atoms the vault pays at fill |
| `fee` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#fee) | Protocol fee, rounded down |
| `writerPremium` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#writerpremium) | Gross minus fee |
| `priceForGross` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#priceforgross) | The exact price for a given gross |
| `exactPriceAtOrBelow` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#exactpriceatorbelow) | Round a model price down to an exact one |
| `wireQuantity` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#wirequantity) | Atoms to 18-decimal wire quantity |
| `atomsFromWire` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#atomsfromwire) | Wire quantity to atoms |
| `minimumExactLot` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#minimumexactlot) | Smallest exact size for a strike |
| `settlementAmounts` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#settlementamounts) | Every amount of one fill |
| `decodePositionV3` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#decodepositionv3) | Decode a PositionV3 account |
| `fillV3` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#fillv3) | Build `fill_v3` / `fill_restricted_v3` (audit, simulate) |
| `exerciseV3` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#exercisev3) | Build `exercise_v3` |
| `releaseV3` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#releasev3) | Build `release_v3` / `release_restricted_v3` |
| `fundRestrictedExerciseV3` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#fundrestrictedexercisev3) | Build `fund_restricted_exercise_v3` |
| `completePendingDeliveryV3` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#completependingdeliveryv3) | Build `complete_pending_delivery_v3` |
| `exerciseV3Instructions` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#exercisev3instructions) | Every instruction of one exercise transaction (recommended) |
| `releaseV3Instructions` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#releasev3instructions) | Every instruction of one release transaction (recommended) |
| `WRITER_ACCOUNT_SPACE` | const | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#writer_account_space) | `165`, bytes of a token account without extensions |
| `encodeCancellationRequestV1` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#encodecancellationrequestv1) | Encode a restricted cancellation request |
| `decodeCancellationRequestV1` | function | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#decodecancellationrequestv1) | Decode a restricted cancellation request |
| `ORDINARY_V3_COMPUTE_UNIT_LIMITS` | const | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#ordinary_v3_compute_unit_limits) | Compute limits, ordinary instructions |
| `RESTRICTED_V3_COMPUTE_UNIT_LIMITS` | const | [settlement](https://docs.covr.markets/reference/sdk/settlement.md#restricted_v3_compute_unit_limits) | Compute limits, restricted instructions |
| `PositionV3` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#positionv3) | Decoded position |
| `PositionReadInput` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#positionreadinput) | Input of `decodePositionV3` |
| `FillInput` | type | [types](https://docs.covr.markets/reference/sdk/types.md#fillinput) | Input of `fillV3` |
| `FreshWriterAccount` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#freshwriteraccount) | A writer account an exit helper creates |
| `CancellationRequestV1` | interface | [types](https://docs.covr.markets/reference/sdk/types.md#cancellationrequestv1) | Restricted cancellation request |

### Gateway client

| Name | Kind | Page | What it is |
| --- | --- | --- | --- |
| `GatewayClient` | class | [gateway client](https://docs.covr.markets/reference/sdk/gateway-client.md#gatewayclient) | Feed, `/maker` and RFQ reads |
| `GatewayError` | class | [gateway client](https://docs.covr.markets/reference/sdk/gateway-client.md#gatewayerror) | A refusal from the gateway |
| `OutcomeUnknownError` | class | [gateway client](https://docs.covr.markets/reference/sdk/gateway-client.md#outcomeunknownerror) | A sent request whose reply never came |
| `RFQ_NOTE_REASONS` | const | [gateway client](https://docs.covr.markets/reference/sdk/gateway-client.md#rfq_note_reasons) | Reasons `sendRfqNote` accepts |
| `GatewayEvent` | type | [gateway client](https://docs.covr.markets/reference/sdk/gateway-client.md#gatewayevent) | `rfq`, `award`, `notice`, `closed` |
| `GatewayClientOptions` | interface | [gateway client](https://docs.covr.markets/reference/sdk/gateway-client.md#gatewayclientoptions) | Options of `connect` |
| `RfqNoteReason` | type | [types](https://docs.covr.markets/reference/sdk/types.md#rfqnotereason) | One of `RFQ_NOTE_REASONS` |

---

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