npm.io
1.0.15 • Published 4 years ago

@polymarket/registry-v0-sdk

Licence
MIT
Version
1.0.15
Deps
2
Size
110 kB
Vulns
0
Weekly
0

Registry SDK npm

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.