# @kyoko-finance/kyoko-js

> JavaScript library for kyoko.finance

Latest version **0.0.4** (published 2023-11-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install @kyoko-finance/kyoko-js
pnpm add @kyoko-finance/kyoko-js
yarn add @kyoko-finance/kyoko-js
bun add @kyoko-finance/kyoko-js
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.0.4 |
| Published | 2023-11-27 |
| First published | 2023-11-24 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 2 |
| Unpacked size | 37.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 0 |
| Author | matt |
| Maintainers | kyoko-matt |

## Links

- npm: https://www.npmjs.com/package/@kyoko-finance/kyoko-js
- Repository: https://github.com/kyoko-finance/kyoko-js
- Homepage: https://github.com/kyoko-finance/kyoko-js#readme
- Issues: https://github.com/kyoko-finance/kyoko-js/issues
- npm.io page: https://npm.io/package/@kyoko-finance/kyoko-js

## Dependencies (2)

- [ethers](https://npm.io/package/ethers.md) ^6.8.1
- [bignumber.js](https://npm.io/package/bignumber.js.md) ^9.1.2

## Recent versions

- 0.0.4 (latest) — 2023-11-27
- 0.0.3 — 2023-11-27
- 0.0.2 — 2023-11-27
- 0.0.1 — 2023-11-24

## README

# kyoko JS

## Setup

Install from npm:

`npm install @kyoko-finance/kyoko-js`

## Init
```ts
const kyokoJS = require("@kyoko-finance/kyoko-js");

const kyoko = kyokoJS.default;

(async () => {
    // 1. Dev
    await kyoko.init('JsonRpc', {url: 'http://localhost:8545/', privateKey: ''}, { chainId: 1 });
    // OR
    await kyoko.init('JsonRpc', {}, {}); // In this case JsonRpc url, privateKey, fee data and chainId will be specified automatically

    // 2. Infura
    await kyoko.init("Infura", { network: "homestead", apiKey: <INFURA_KEY> }, { chainId: 1 });
    
    // 3. Web3 provider
    await kyoko.init('Web3', { externalProvider: <WEB3_PROVIDER> }, { chainId: 1 });
    
    // get marketId
    const marketId = await kyoko.getMarketId();
    
    // get pool
    const kyokoPool = await kyoko.getKyokoPool();
})()
```

---
_Source: https://npm.io/package/@kyoko-finance/kyoko-js · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
