@polymarket/registry-v0-sdk
v1.0.15
Published
Polymarket Market Registry Version Zero SDK
Downloads
40
Maintainers
Keywords
Readme
Registry 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:
yarn add @polymarket/registry-v0-sdk
Usage
The sdk provides importable types.
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.
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 and types.