# classzz-v1-sdk

> classzz swap sdk

Latest version **0.1.2** (published 2021-08-18) · MIT license · 0 weekly downloads

## Install

```sh
npm install classzz-v1-sdk
pnpm add classzz-v1-sdk
yarn add classzz-v1-sdk
bun add classzz-v1-sdk
```

## 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.1.2 |
| Published | 2021-08-18 |
| First published | 2021-07-16 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 191.8 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Author | czz |
| Maintainers | classzz |
| Keywords | classzz, swap, token |

## Links

- npm: https://www.npmjs.com/package/classzz-v1-sdk
- Repository: https://github.com/classzz/classzz-v1-sdk
- Homepage: https://github.com/classzz/classzz-v1-sdk#readme
- Issues: https://github.com/classzz/classzz-v1-sdk/issues
- npm.io page: https://npm.io/package/classzz-v1-sdk

## Recent versions

- 0.1.2 (latest) — 2021-08-18
- 0.1.1 — 2021-08-07
- 0.1.0 — 2021-08-07
- 0.0.9 — 2021-08-05
- 0.0.8 — 2021-08-02
- 0.0.7 — 2021-07-31
- 0.0.6 — 2021-07-26
- 0.0.5 — 2021-07-25
- 0.0.4 — 2021-07-25
- 0.0.3 — 2021-07-16
- 0.0.2 — 2021-07-16
- 0.0.1 — 2021-07-16
- 1.0.1 — 2021-07-16

## README

# classzz-v1-sdk

> Classzz swap sdk

## Install

Using npm:

```sh
npm install --save-dev classzz-v1-sdk
```

or using yarn:

```sh
yarn add classzz-v1-sdk
```
## use 

   import { approveActions, allowanceAction, getTokenValue, getMidPrice ,swapAndBurn}  from 'classzz-v1-sdk'
   
    const isInsurance = true
    const resGetTokenValue = await getTokenValue(from, to, isInsurance)

    const resGetMidPrice = await getMidPrice(from, to, resGetTokenValue)

    const resAllowance = await allowanceAction(from, currentProvider, accounts)

    const resApprove = await approveActions(from, currentProvider, accounts)

    const resSwap = await swapAndBurn(from, to, currentProvider, accounts, swapSetting, resGetTokenValue,resGetMidPrice, isInsurance)

   
    swap step:
    1、swapTokenValue  (must)
    2、fetchPrice     (must)
    3、check account  (must) if  true  continue else end
    4、allowanceAction (must) if  true  continue  else must call 5、approveAction 
    5、approveAction (optional ) if  true  continue  else end
    6、fetchSwap ( include  call allowanceAction)

## dependencies
    "@ethersproject/address": "^5.4.0",
    "@ethersproject/contracts": "^5.4.0",
    "@ethersproject/networks": "^5.4.1",
    "@ethersproject/providers": "^5.4.1",
    "@ethersproject/solidity": "^5.4.0",
    "@uniswap/sdk": "^3.0.3",
    "bignumber.js": "^9.0.1",
    "jsbi": "^3.1.5",
    "web3": "^1.4.0"

---
_Source: https://npm.io/package/classzz-v1-sdk · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
