open-index/open-npm huggingface dataset:
npm package: @0x-klaytn/assert
Description: Provides a standard way of performing type and schema validation across 0x projects
Latest version: 3.0.7

## @0x-klaytn/assert

Standard type and schema assertions to be used across all 0x projects and packages

## Installation

```bash
yarn add @0x-klaytn/assert
```

## Usage

```typescript
import { assert } from '@0x-klaytn/assert';

assert.isValidBaseUnitAmount('baseUnitAmount', baseUnitAmount);
```

If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:

```json
"compilerOptions": {
    "typeRoots": ["node_modules/@0x-klaytn/typescript-typings/types", "node_modules/@types"],
}
```

## Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.

### Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

```bash
yarn config set workspaces-experimental true
```

Then install dependencies

```bash
yarn install
```

### Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

```bash
PKG=@0x-klaytn/assert yarn build
```

Or continuously rebuild on change:

```bash
PKG=@0x-klaytn/assert yarn watch
```

### Clean

```bash
yarn clean
```

### Lint

```bash
yarn lint
```

### Run Tests

```bash
yarn test
```
npm package: @0x-klaytn/asset-swapper
Description: Convenience package for discovering and buying assets on-chain and off-chain.
Author: David Sun
Latest version: 4.2.5

## @0x-klaytn/asset-swapper

Convenience package for swapping assets represented on the Ethereum blockchain using 0x. The package helps to perform all the off-chain computations to execute a marketBuy or marketSell function execution with 0x exchange contracts, or 0x extension contracts. Given some liquidity (0x signed orders), it helps estimate the cost of buying or selling a certain asset (giving a range) and then provide varying consumable outputs to execute the buy or sell.

Asset-swapper integrates with the [Standard Relayer API](https://github.com/0xProject/standard-relayer-api)(in the future Mesh as well) and takes care of sourcing liquidity, order-pruning, and order-validation. The final result is a library that tells you what assets are available, provides a quote based on specified assets, and provide varying consumable metadata that can be used both on-chain in smart contracts or off-chain through web3 to swap a desired amount of ERC20 for another ERC20 asset.

## Installation

```bash
yarn add @0x-klaytn/asset-swapper
```

**Import**

```typescript
import { SwapQuoter } from '@0x-klaytn/asset-swapper';
```

or

```javascript
var SwapQuoter = require('@0x-klaytn/asset-swapper').SwapQuoter;
var SwapQuoteConsumer = require('@0x-klaytn/asset-swapper').SwapQuoteConsumer;
```

If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:

```json
"compilerOptions": {
    "typeRoots": ["node_modules/@0x/typescript-typings/types", "node_modules/@types"],
}
```

## Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.

### Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

```bash
yarn config set workspaces-experimental true
```

Then install dependencies

```bash
yarn install
```

### Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

```bash
PKG=@0x-klaytn/asset-swapper yarn build
```

Or continuously rebuild on change:

```bash
PKG=@0x-klaytn/asset-swapper yarn watch
```

### Clean

```bash
yarn clean
```

### Lint

```bash
yarn lint
```

### Run Tests

```bash
yarn test
```
npm package: @0x-klaytn/contract-addresses
Description: Used to get known addresses of deployed 0x contracts on Klaytn network
Latest version: 4.6.7

## @0x-klaytn/contract-addresses

A tiny utility library for getting known deployed contract addresses for a
particular network.

## Installation

```bash
yarn add @0x-klaytn/contract-addresses
```

**Import**

```typescript
import { getContractAddressesForChainOrThrow } from '@0x-klaytn/contract-addresses';
```

or

```javascript
var getContractAddressesForChainOrThrow = require('@0x-klaytn/contract-addresses').getContractAddressesForChainOrThrow;
```

## Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.

### Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

```bash
yarn config set workspaces-experimental true
```

Then install dependencies

```bash
yarn install
```

### Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

```bash
PKG=@0x-klaytn/contract-addresses yarn build
```

### Clean

```bash
yarn clean
```

### Lint

```bash
yarn lint
```

### Run Tests

```bash
yarn test
```
npm package: @0x-klaytn/contract-wrappers
Description: Wrappers for 0x smart contract wrappers generated using @0x/abi-gen
Latest version: 13.7.2

## @0x-klaytn/contract-wrappers

Wrappers for 0x smart contracts, generated using @0x/abi-gen.

## Installation

**Install**

```bash
npm install @0x-klaytn/contract-wrappers --save
```

**Import**

```typescript
import { ContractWrappers } from '@0x-klaytn/contract-wrappers';
```

If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:

```json
"compilerOptions": {
    "typeRoots": ["node_modules/@0x-klaytn/typescript-typings/types", "node_modules/@types"],
}
```

## Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.

### Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

```bash
yarn config set workspaces-experimental true
```

Then install dependencies

```bash
yarn install
```

### Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

```bash
PKG=@0x-klaytn/contract-wrappers yarn build
```

### Clean

```bash
yarn clean
```

### Lint

```bash
yarn lint
```

### Run Tests

```bash
yarn test
```

### Documentation

Documentation for this package is generated by TypeDoc, using the Solidity source code for 0x contracts. Each contract corresponds to one global-level module, which contains relevant enums and interfaces for its events and structs. Most significantly, each module exports a class, `<ContractName>Contract`, e.g. `ExchangeContract`, which implements helper methods for all the functions defined in the corresponding contract.

A convention to note is that these contract-specific helper methods are defined as _object literals_, which are separated from methods in the generated documentation. Each contract method has a number of sub-methods, e.g. `sendTransactionAsync`, or `estimateGasAsync`, which are documented separately. This is an example of an expected method call signature: `exchangeContractInstance.fillOrder.sendTransactionAsync(...arguments)`.

### Development

This package contains generated code. We use the `abi-gen` utility to generate wrappers from compiler artifacts in `@0x/contract-artifacts`. To re-generate wrappers, e.g. when `@0x/contract-artifacts` has been updated, run `yarn wrappers:generate && yarn wrappers:prettier`.
npm package: @0x-klaytn/json-schemas
Description: 0x-related json schemas
Latest version: 5.0.8

## @0x-klaytn/json-schemas

Contains 0x-related json schemas

### Read the [Documentation](https://0x.org/docs/tools/json-schemas).

## Installation

```bash
yarn add @0x-klaytn/json-schemas
```

**Import**

```typescript
import { SchemaValidator, ValidatorResult, schemas } from '@0x-klaytn/json-schemas';
```

or

```javascript
var schemas = require('@0x-klaytn/json-schemas').schemas;
```

If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:

```json
"compilerOptions": {
    "typeRoots": ["node_modules/@0x-klaytn/typescript-typings/types", "node_modules/@types"],
}
```

## Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.

### Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

```bash
yarn config set workspaces-experimental true
```

Then install dependencies

```bash
yarn install
```

### Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

```bash
PKG=@0x-klaytn/json-schemas yarn build
```

Or continuously rebuild on change:

```bash
PKG=@0x-klaytn/json-schemas yarn watch
```

### Clean

```bash
yarn clean
```

### Lint

```bash
yarn lint
```

### Run Tests

```bash
yarn test
```
npm package: @0x-klaytn/subproviders
Description: A few useful web3 subproviders, private key wallet adapter for use with Caver.js for Klaytn.
Latest version: 6.5.0

## @0x-klaytn/subproviders

A few useful web3 subproviders, private key wallet adapter for use with Caver.js for Klaytn.

## Installation

```
yarn add @0x-klaytn/subproviders
```

If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:

```json
"compilerOptions": {
    "typeRoots": ["node_modules/@0x-klaytn/typescript-typings/types", "node_modules/@types"],
}
```

## Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.

### Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

```bash
yarn config set workspaces-experimental true
```

Then install dependencies

```bash
yarn install
```

### Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

```bash
PKG=@0x-klaytn/subproviders yarn build
```

Or continuously rebuild on change:

```bash
PKG=@0x-klaytn/subproviders yarn watch
```

### Clean

```bash
yarn clean
```

### Lint

```bash
yarn lint
```

### Run tests

#### Unit tests

```bash
yarn run test:unit
```

#### Integration tests

In order to run the integration tests, make sure you have a Ledger Nano S available.

-   Setup your Ledger with the development mnemonic seed: `concert load couple harbor equip island argue ramp clarify fence smart topic`
-   Plug it into your computer
-   Unlock the device
-   Open the on-device Ethereum app
-   Make sure "browser support" and "contract data" are disabled
-   Start [TestRPC](https://github.com/trufflesuite/ganache-cli) locally at port `8545`

Then run:

```
yarn test:integration
```

**Note:** We assume a derivation path of `m/44'/60'/0'/0` which is already configured in the tests. With this setup and derivation path, your first account should be `0x5409ed021d9299bf6814279a6a1411a7e866a631`, exactly like TestRPC.

#### All tests

```bash
yarn run test:all
```
npm package: @0x-klaytn/utils
Description: 0x TS utils, with changes for Klaytn
Latest version: 5.4.5

## @0x-klaytn/utils

Utils to be shared across 0x projects and packages, with changes for Klaytn.

## Installation

```bash
yarn add @0x-klaytn/utils
```

If your project is in [TypeScript](https://www.typescriptlang.org/), add the following to your `tsconfig.json`:

```json
"compilerOptions": {
    "typeRoots": ["node_modules/@0x-klaytn/typescript-typings/types", "node_modules/@types"],
}
```

## Usage

```javascript
import { addressUtils, bigNumberConfigs, classUtils, intervalUtils, promisify } from '@0x-klaytn/utils';
```

## Troubleshooting

If you are still seeing TS type errors complaining about missing DOM types such as `Response`:

```
error TS2304: Cannot find name 'Response'.
```

Then you need to explicitly add the `dom` lib to your compiler options in `tsconfig.json`. The `dom` library is included by default, but customizing the `lib` option can cause it to be dropped.

```
"compilerOptions": {
    "lib": [..., "dom"],
```

## Contributing

We welcome improvements and fixes from the wider community! To report bugs within this package, please create an issue in this repository.

Please read our [contribution guidelines](../../CONTRIBUTING.md) before getting started.

### Install dependencies

If you don't have yarn workspaces enabled (Yarn < v1.0) - enable them:

```bash
yarn config set workspaces-experimental true
```

Then install dependencies

```bash
yarn install
```

### Build

To build this package and all other monorepo packages that it depends on, run the following from the monorepo root directory:

```bash
PKG=@0x-klaytn/utils yarn build
```

Or continuously rebuild on change:

```bash
PKG=@0x-klaytn/utils yarn watch
```

### Clean

```bash
yarn clean
```

### Lint

```bash
yarn lint
```