# @elysia-dev/elyfi-v1-sdk

> The latest version of the SDK is used in production in the Elyfi web interface

Latest version **1.0.0-alpha.9** (published 2022-07-22) · MIT license · 0 weekly downloads

## Install

```sh
npm install @elysia-dev/elyfi-v1-sdk
pnpm add @elysia-dev/elyfi-v1-sdk
yarn add @elysia-dev/elyfi-v1-sdk
bun add @elysia-dev/elyfi-v1-sdk
```

## Health

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

Positive: has types; no vulnerabilities.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0-alpha.9 |
| Published | 2022-07-22 |
| First published | 2022-04-08 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | CommonJS |
| Dependencies | 1 |
| Unpacked size | 272.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 3 |
| Maintainers | qpzm, donguk.seo, jefflee7 |

## Links

- npm: https://www.npmjs.com/package/@elysia-dev/elyfi-v1-sdk
- Repository: https://github.com/elysia-dev/elyfi-v1-sdk
- npm.io page: https://npm.io/package/@elysia-dev/elyfi-v1-sdk

## Dependencies (1)

- [ethers](https://npm.io/package/ethers.md) ^5.6.2

## Recent versions

- 1.0.0-alpha.9 (latest) — 2022-07-22
- 1.0.0 (beta) — 2022-04-08
- 1.0.0-alpha.8 — 2022-07-22
- 1.0.0-alpha.7 — 2022-07-22
- 1.0.0-alpha.6 — 2022-07-21
- 1.0.0-alpha.5 — 2022-07-12
- 1.0.0-alph.5 — 2022-07-12
- 1.0.0-alpha.4 — 2022-06-15
- 1.0.0-alpha.3 — 2022-06-15
- 1.0.0-alpha.2 — 2022-06-15
- 1.0.0-alpha.1 — 2022-04-08
- 1.0.0-alpha.0 — 2022-04-08
- 0.0.1 — 2022-04-08

## README

# elyfi-v1-sdk
The latest version of the SDK is used in production in the Elyfi web interface


## Quick Start

## Example
### StkaingPool
```
import ethers from 'ethers'
import { StakingPoolFactory } from '@elysia-dev/elyfi-v1-sdk';

// get eth signer from broswer
const signer = (new ethers.providers.Web3Provider(window.ethereum)).getSigner()

// connect(address, signer or provider)
const stakingPool = StakingPoolFactory
	.connect(
		'0xCD668B44C7Cf3B63722D5cE5F655De68dD8f2750',
		signer
	)

stakingPool
	.stake(ethers.utils.parseEther('10'))
	.then((tx) => {
		console.log(tx)
	})

stakingPool
	.stake(ethers.utils.parseEther('10'))
	.then((tx) => {
		console.log(tx)
	})
```

### MoneyPool
```
import ethers from 'ethers'
import { MoneyPoolFactory } from '@elysia-dev/elyfi-v1-sdk';

// get ether signer from broswer
const signer = (new ethers.providers.Web3Provider(window.ethereum)).getSigner()

// BSC moneypool
// 0x0bdFef5f8B75741d33a22d85022244CBE793DA24 is BSC moneypool contract address
const moneyPool = MoneyPoolFactory
	.connect(
		'0x0bdFef5f8B75741d33a22d85022244CBE793DA24',
		signer
	)

// Depost 10 BUSD from signer
// "0xe9e7cea3dedca5984780bafc599bd69add087d56" is BUSD token address
const depositTx = moneyPool
	.deposit(
		"0xe9e7cea3dedca5984780bafc599bd69add087d56",
		signer.address,
		ethers.utils.BigNumber.from("10")
	)
// See https://docs.ethers.io/v5/api/providers/types/#providers-TransactionResponse
await depositTx.wait();

// Withdraw 10 BUSD
// "0xe9e7cea3dedca5984780bafc599bd69add087d56" is BUSD token address
const withdrawTx = moneyPool
	.withdraw(
		"0xe9e7cea3dedca5984780bafc599bd69add087d56",
		signer.address,
		ethers.utils.BigNumber.from("10")
	)
await withdrawTx.wait()
```

## Supported Contract
* Moneypool
* DataPipeline
* IncentivePool
* StakingPool
* StakingPoolV2 (no round)
* Tokeninzer
* AssetBond
* ERC20

Here's a link for contract addresses

https://github.com/elysia-dev/elyfi-web/blob/main/src/core/envs/prod.json

## Contribution
If you have questions about how to use the SDK, please reach out in our Discord. Pull requests welcome!

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