open-index/open-npm huggingface dataset:
npm package: @polymarket/fpmm-factory-sdk
Description: Lightweight SDK around the Polymarket FPMM Factory
Latest version: 0.0.2

# fpmm-factory-sdk
Lightweight wrapper around the Polymarket FPMM Factory contracts


### Usage

```ts
import { FpmmFactory } from "@polymarket/fpmm-factory-sdk";
import { ethers } from "ethers";

const signer = new Wallet("0x" + process.env.KEY);
const factory = new FpmmFactory(signer, 137);

// Deploy fpmm
await factory.deployFPMM(
    conditionalTokensAddress, 
    usdc,
    [conditionId], 
    ethers.BigNumber.from("200")
);
```
npm package: @polymarket/liquidity-requests-sdk
Description: Polymarket Liquidity Request Log SDK
Author: Dylan Golow
Latest version: 1.0.2

# Liquidity Requests SDK ![npm](https://img.shields.io/npm/v/@polymarket/liquidity-requests-sdk)

The Polymarket Liquidity Requests sdk (`@polymarket/liquidity-requests-sdk`) provides an easy-to-use, lightweight wrapper around the `LiquidityRequestLog` contract.

## Installation

The sdk can be easily installed using yarn with the following command:

```bash
yarn add @polymarket/liquidity-requests-sdk
```

## Usage

The sdk provides importable types.

```typescript
import { LiquidityRequest } from "@polymarket/liquidity-requests-sdk";
```

Primarily though, the sdk allows a `LiquidityRequestLog` object to be initialized with a `signer` (`JsonRpcSigner`) and a `chainID` (`number`). This object provides a simple interface to various registry contract functions and utilities.

```typescript
import { LiquidityRequestLog, LiquidityRequest } from "@polymarket/liquidity-requests-sdk";

const liquidityRequestLog = new LiquidityRequestLog(signer, 137); // deployed to Polygon and Mumbai

const liquidityRequest: LiquidityRequest = {
    marketMakerAddress: "0x0000000000000000000000000000000000000001",
    reason: "trade",
    tradeAmount: 2000000000000000000000,
};

await liquidityRequestLog.submitLiquidityRequest(liquidityRequest);
```

## Interpreting Events

Client implementations of this sdk will vary, and direct interaction with the contracts themselves could result in other values for `reason` and `tradeAmount`, however the [polymarket.com](https://polymarket.com/) site uses the following client implementation of reasons and trade amounts for each liquidity request submitted.

The event to subscribe to with the relevant struct are listed below, see the complete contract here: [`LiquidityRequestLog.sol`](../contracts/contracts/LiquidityRequestLog.sol)

```solidity
interface LiquidityRequestLog {
    
    struct LiquidityRequest {
        address requesterAddress;
        uint256 requestDate;
        string reason;
        address marketMakerAddress;
        uint256 tradeAmount;
    }

    event LiquidityRequestAdded(address indexed requesterAddress, LiquidityRequest liquidityRequest);
}
```

### Reasons  
  
| Option | Description |  
| --- | --- |   
| `"TRADE"` | User indicating they want to place a large trade (liquidity is low) |
| `"INFO"` | User has information to trade on |
| `"OTHER"` | Other reason (text box allows user to submit reason, maximum 100 characters, will show custom reason and not `"OTHER"`) |

### Trade Amounts (USDC)

| Option | USDC BigNumber Value |
| --- | --- |
| < 500 | `500000000` |
| 501 - 1,000 | `1000000000` |
| 1,001 - 10,000 | `10000000000` |
| 10,000+ | `10001000000` |
| I prefer not to say | `0` |

You can refer to the liquidity requests sdk source code for available [functions](https://github.com/Polymarket/polymarket-liquidity-requests/blob/main/packages/sdk/src/liquidityRequestLog.ts) and [types](https://github.com/Polymarket/polymarket-liquidity-requests/blob/main/packages/sdk/src/types.ts).
npm package: @polymarket/multi-endpoint-provider
Description: ethers.js Providers that try backup rpc endpoints when requests fail
Author: Sam Hatem
Latest version: 0.1.5

# @polymarket/multi-endpoint-provider

ethers.js JsonRpcProvider and Web3Provider that try backup rpc endpoints when requests fail.

This package is expects ethers.js as a peer dependency so that different versions of ethers don't conflict.


```typescript
import { JsonRpcMultiProvider } from "@polymarket/multi-endpoint-provider";

const provider = new JsonRpcMultiProvider([
    "https://polygon-mainnet.infura.io/v3/<infura_key>",
    "https://rpc-mainnet.maticvigil.com/v1/<matic_vigil_key>",
], {
  network: 137,
}
```
npm package: @polymarket/order-utils
Description: Typescript utility for creating orders for Polymarket's CLOB
Author: Liam Kovatch
Latest version: 3.0.1

## Polymarket CLOB order-utils

<a href='https://www.npmjs.com/package/@polymarket/order-utils'>
    <img src='https://img.shields.io/npm/v/@polymarket/order-utils.svg' alt='NPM'/>
</a>

Typescript utilities used to generate and sign orders from Polymarket's Exchange

### Installation

`yarn add @polymarket/order-utils`
npm package: @polymarket/polymarket-fe-sdk
Description: This is a simple wrapper around the markets sdk. The markets-sdk doesn't directly interact with the onchain contracts(for flexibility), it generates transactions which can be executed by others.
Author: JonathanAmenechi, MattWalker
Latest version: 0.1.0

# Markets SDK Client

This is a simple wrapper around the markets sdk. The markets-sdk doesn't directly interact with the onchain contracts(for flexibility), it generates transactions which can be executed by others.

This client takes in:

* The address where the MarketsRegistry contract is deployed

* An ethers provider/signer that populates and executes the transactions that are generated by the sdk.

### Usage

`const sdkClient = MarketsSdkClient(kovanMarketsRegistryAddress, provider); //Initialize the client`

`await sdkClient.getMarkets();`

`await sdkClient.getPendingProposals();`
npm package: @polymarket/registry-v0-sdk
Description: Polymarket Market Registry Version Zero SDK
Author: Liam Kovatch
Latest version: 1.0.15

# Registry SDK ![npm](https://img.shields.io/npm/v/@polymarket/registry-v0-sdk)

The Polymarket registry sdk (`@polymarket/registry-v0-sdk`) provides an easy-to-use, lightweight wrapper around the `MarketRegistryVZero` contract.

## Installation

The sdk can be easily installed using yarn with the following command:

```bash
yarn add @polymarket/registry-v0-sdk
```

## Usage

The sdk provides importable types.

```typescript
import { Market } from "@polymarket/registry-v0-sdk";
```

Primarily though, the sdk allows a `Registry` object to be initialized with a `signer` (`JsonRpcSigner`) and a `chainID` (`number`). This object provides a simple interface to various registry contract functions and utilities.

```typescript
import { Registry } from "@polymarket/registry-v0-sdk";

registry = new Registry(signer, 1);

const markets = await registry.getMarkets();
```

You can refer to the registry sdk source code for available [functions](https://github.com/Polymarket/registry-v0/blob/main/packages/sdk/src/registry.ts) and [types](https://github.com/Polymarket/registry-v0/blob/main/packages/sdk/src/types.ts).