3.3.10 • Published 2 months ago

symbiosis-js-sdk v3.3.10

Weekly downloads
-
License
MIT
Repository
github
Last release
2 months ago

symbiosis-js-sdk

Build Status

Docs

You can find js-sdk docs here - https://docs.symbiosis.finance/developer-tools/symbiosis-js-sdk

Installation

npm i symbiosis-js-sdk

Install dependencies

npm i

Upgrade version

For upgrade versions should be use npm versions command. Version will upgrade automatically.

npm version major|minor|patch

How To Use

The current implementation use ethers to interact with the Ethereum like blockchains.

Init Symbiosis SDK

To work with Symbiosis SDK you should init Symbiosis instance with config (check Config type) and your CLIENT_ID.

import { Symbiosis } from 'symbiosis-js-sdk'

const symbiosis = new Symbiosis('mainnet', 'awesome-app')

Swapping

A combination of uniswap and bridging allowing you to swap any supported tokens between networks.

// Create new Swapping instance
const swapping = symbiosis.bestPoolSwapping()

// Calculates fee for swapping between networks and get execute function
const { transactionRequest } = await swapping.exactIn({
    tokenAmountIn, // TokenAmount object
    tokenOut, // Token object
    from, // from account address
    to, // to account address
    revertableAddress, // account who can revert stucked transaction
    slippage, // slippage
    deadline // deadline date in seconds
})

// Send transactionRequest and get receipt
const receipt = ...

// Wait for transaction to be completed on destination chain
const log = await swapping.waitForComplete(receipt)

// check if transit token was received instead target token
const transitTokenSent = await symbiosis.findTransitTokenSent(
    tokenOut.chainId,
    log.transactionHash
)

// if `transitTokenSent` is not null please show this information to the user

Zapping to Symbiosis

Cross-chain zaps automate liquidity adding to the Symbiosis stable pools, DeFi protocols, NFT, etc.

// Create new Swapping instance
const swapping = symbiosis.newZapping(omniPoolConfig)

// Calculates fee for bridging between networks and get execute function
const { execute, fee, tokenAmountOut, route, priceImpact } = await swapping.exactIn({
    tokenAmountIn, // TokenAmount object
    from, // from account address
    to, // to account address
    revertableAddress, // account who can revert stucked transaction
    slippage, // slippage
    deadline, // deadline date in seconds
})

All next steps as in swapping example

Bridging

Bridging allows you to swap stable tokens between chains.

// Create new Bridging instance
const bridging = symbiosis.newBridging()

// Calculates fee for bridging and get execute function
const { transactionRequest } = await bridging.exactIn({
    tokenAmountIn, // TokenAmount object
    tokenOut, // Token object
    to, // to account address
    revertableAddress // account who can revert stucked transaction
})

// Send transaction or get receipt
const receipt = ...

// Wait for transaction to be completed on recipient chain
const log = await bridging.waitForComplete(receipt)

Revert stucked transaction:

// Create RevertPending instance
const revertPending = symbiosis.newRevertPending(
    request // PendingRequest object
)

// transactionRequest contains everything you need to send a transaction by yourself
const { transactionRequest } = await revertPending.revert()

... // Send transaction

// Wait for transaction to be completed on recipient chain
const log = await revertPending.waitForComplete()
3.3.9

2 months ago

3.3.10

2 months ago

3.3.8

2 months ago

3.3.7

2 months ago

3.3.6

2 months ago

3.3.5

2 months ago

3.3.4

2 months ago

3.3.3

2 months ago

3.3.2

2 months ago

3.2.2

3 months ago

3.2.1

3 months ago

3.2.0

3 months ago

3.2.6

3 months ago

3.2.5

3 months ago

3.2.4

3 months ago

3.2.3

3 months ago

3.1.161-btc

4 months ago

3.2.9

2 months ago

3.2.8

2 months ago

3.2.7

3 months ago

3.1.156-no-btc

4 months ago

3.1.157

4 months ago

3.1.156

4 months ago

3.1.155

4 months ago

3.1.158

4 months ago

3.1.168

3 months ago

3.1.167

3 months ago

3.1.166

3 months ago

3.1.165

3 months ago

3.1.169

3 months ago

3.1.164

3 months ago

3.1.163

3 months ago

3.1.162

4 months ago

3.1.159-btc

4 months ago

3.1.167-no-btc

3 months ago

3.1.160-btc

4 months ago

3.3.1

2 months ago

3.3.0

2 months ago

3.1.177

3 months ago

3.1.176

3 months ago

3.1.171

3 months ago

3.1.170

3 months ago

3.1.175

3 months ago

3.1.174

3 months ago

3.1.173

3 months ago

3.1.172

3 months ago

3.1.158-btc

4 months ago

3.1.99

7 months ago

3.1.98

7 months ago

3.1.97

7 months ago

3.1.154

4 months ago

3.1.153

4 months ago

3.1.152

4 months ago

3.1.151

4 months ago

3.1.150

4 months ago

3.1.135

5 months ago

3.1.134

5 months ago

3.1.133

5 months ago

3.1.132

5 months ago

3.1.139

5 months ago

3.1.138

5 months ago

3.1.137

5 months ago

3.1.136

5 months ago

3.1.131

5 months ago

3.1.130

6 months ago

3.1.129

6 months ago

3.1.146

4 months ago

3.1.145

4 months ago

3.1.144

4 months ago

3.1.143

4 months ago

3.1.149

4 months ago

3.1.148

4 months ago

3.1.147

4 months ago

3.1.142

5 months ago

3.1.141

5 months ago

3.1.140

5 months ago

3.1.113

6 months ago

3.1.112

6 months ago

3.1.111

6 months ago

3.1.110

6 months ago

3.1.117

6 months ago

3.1.116

6 months ago

3.1.115

6 months ago

3.1.114

6 months ago

3.1.109

6 months ago

3.1.108

7 months ago

3.1.107

7 months ago

3.1.124

6 months ago

3.1.123

6 months ago

3.1.122

6 months ago

3.1.121

6 months ago

3.1.128

6 months ago

3.1.127

6 months ago

3.1.126

6 months ago

3.1.125

6 months ago

3.1.120

6 months ago

3.1.119

6 months ago

3.1.118

6 months ago

3.1.101

7 months ago

3.1.100

7 months ago

3.1.106

7 months ago

3.1.105

7 months ago

3.1.104

7 months ago

3.1.103

7 months ago

3.1.96-ton.0

7 months ago

3.1.96

7 months ago

3.1.94

7 months ago

3.1.95

7 months ago

3.1.90-fee.3

7 months ago

3.1.93-btc.1

8 months ago

3.1.93

8 months ago

3.1.90-fee.2

8 months ago

3.1.93-btc.0

8 months ago

3.1.92

8 months ago

3.1.91

8 months ago

3.1.90-fee.1

8 months ago

3.1.90

8 months ago

3.1.89

8 months ago

3.1.88

8 months ago

3.1.87

8 months ago

3.1.86

8 months ago

3.1.83

8 months ago

3.1.85

8 months ago

3.1.84

8 months ago

3.1.82

8 months ago

3.1.81

8 months ago

3.1.80

8 months ago

3.1.78

8 months ago

3.1.77

8 months ago

3.1.74

9 months ago

3.1.76

9 months ago

3.1.75

9 months ago

3.1.73

9 months ago

3.1.72

9 months ago

3.1.71

9 months ago

3.1.70

9 months ago

3.1.69

9 months ago

3.1.67

9 months ago

3.1.68

9 months ago

3.1.67-dev3

9 months ago

3.1.67-dev2

9 months ago

3.1.67-dev

9 months ago

3.1.66

9 months ago

3.1.65

9 months ago

3.1.63

9 months ago

3.1.64

9 months ago

3.1.62

9 months ago

3.1.56

10 months ago

3.1.58

10 months ago

3.1.57

10 months ago

3.1.59

10 months ago

3.1.61

10 months ago

3.1.60

10 months ago

3.1.55

10 months ago

3.1.54

10 months ago

3.1.53

10 months ago

3.1.52

10 months ago

3.1.50

10 months ago

3.1.51

10 months ago

3.1.49

10 months ago

3.1.48

10 months ago

3.1.47

10 months ago

3.1.45

10 months ago

3.1.44

10 months ago

3.1.46

10 months ago

3.1.43

10 months ago

3.1.41

10 months ago

3.1.42

10 months ago

3.1.40

10 months ago

3.1.39-dev.2

10 months ago

3.1.39-dev.1

10 months ago

3.1.39-dev

10 months ago

3.1.39

10 months ago

3.1.38

10 months ago

3.1.37

10 months ago

3.1.36-off.3

11 months ago

3.1.36-off.1

11 months ago

3.1.36-off.2

11 months ago

3.1.36

11 months ago

3.1.35

11 months ago

3.1.34-off.0

11 months ago

3.1.36-off.0

11 months ago

3.1.34

11 months ago

3.1.33

11 months ago

3.1.32

11 months ago

3.1.31

11 months ago

3.1.30

11 months ago

3.1.27-btc.0.3

11 months ago

3.1.29

11 months ago

3.1.28

11 months ago

3.1.27-btc.0.1

11 months ago

3.1.27-btc.0.2

11 months ago

3.1.27

11 months ago

3.1.26

11 months ago

3.1.23-btc.0.1

11 months ago

3.1.25-btc.0.1

11 months ago

3.1.25

11 months ago

3.1.23

11 months ago

3.1.22

12 months ago

3.1.20

12 months ago

3.1.19

12 months ago

3.1.18

12 months ago

3.1.17

12 months ago

3.1.16

12 months ago

3.1.14

1 year ago

3.1.13

1 year ago

3.1.15

12 months ago

3.1.12

1 year ago

3.1.11

1 year ago

3.1.10

1 year ago

3.1.7-uid.1

1 year ago

3.1.8-usdc

1 year ago

3.1.9

1 year ago

3.1.8

1 year ago

3.1.7-uid.0

1 year ago

3.1.7-zksync.1

1 year ago

3.1.7-zksync

1 year ago

3.1.3

1 year ago

3.1.7

1 year ago

3.1.6

1 year ago

3.1.4

1 year ago

3.1.2

1 year ago

3.1.1

1 year ago

3.0.16

1 year ago

3.0.17

1 year ago

3.0.15

1 year ago

3.0.23

1 year ago

3.0.24

1 year ago

3.0.21

1 year ago

3.0.22

1 year ago

3.0.27

1 year ago

3.0.28

1 year ago

3.0.25

1 year ago

3.0.26

1 year ago

3.0.20

1 year ago

3.1.0-beta.1

1 year ago

3.1.0-beta.3

1 year ago

3.1.0-beta.5

1 year ago

3.1.0-beta.6

1 year ago

3.0.18

1 year ago

3.0.19

1 year ago

3.1.0-beta.0

1 year ago

3.0.34

1 year ago

3.0.35

1 year ago

3.0.32

1 year ago

3.0.33

1 year ago

3.0.30

1 year ago

3.0.31

1 year ago

3.0.29

1 year ago

3.0.4

1 year ago

3.0.3

1 year ago

3.0.8

1 year ago

3.0.7

1 year ago

3.0.6

1 year ago

3.0.5

1 year ago

3.0.9

1 year ago

3.0.12

1 year ago

3.0.13

1 year ago

3.0.10

1 year ago

3.0.11

1 year ago

3.0.14

1 year ago

3.0.2

1 year ago

3.0.1

1 year ago

3.0.0

1 year ago

3.0.0-tron.11

1 year ago

3.0.0-tron.12

1 year ago

3.0.0-tron.13

1 year ago

2.10.5-beta.3

1 year ago

2.10.30

1 year ago

2.10.31

1 year ago

2.10.32

1 year ago

2.10.33

1 year ago

2.10.34

1 year ago

2.10.35

1 year ago

2.10.36

1 year ago

2.10.37

1 year ago

2.10.38

1 year ago

2.10.39

1 year ago

2.10.40

1 year ago

2.10.41

1 year ago

2.10.42

1 year ago

2.10.43

1 year ago

2.10.44

1 year ago

2.10.45

1 year ago

2.10.46

1 year ago

2.10.47

1 year ago

2.10.48

1 year ago

2.10.49

1 year ago

2.10.2

1 year ago

2.10.10

1 year ago

2.10.11

1 year ago

2.10.0

1 year ago

2.10.12

1 year ago

2.10.13

1 year ago

2.10.14

1 year ago

2.10.15

1 year ago

2.10.16

1 year ago

2.10.17

1 year ago

2.10.18

1 year ago

2.10.19

1 year ago

2.10.9

1 year ago

2.10.7

1 year ago

2.10.8

1 year ago

2.10.5

1 year ago

2.10.6

1 year ago

2.10.3

1 year ago

2.10.4

1 year ago

2.10.20

1 year ago

2.10.21

1 year ago

2.10.22

1 year ago

2.10.23

1 year ago

2.10.24

1 year ago

2.10.25

1 year ago

2.10.26

1 year ago

2.10.27

1 year ago

2.10.28

1 year ago

2.9.56

2 years ago

2.9.57

2 years ago

2.9.54

2 years ago

2.9.55

2 years ago

2.9.58

2 years ago

2.9.59

2 years ago

2.9.60

2 years ago

2.9.63

1 year ago

2.9.61

1 year ago

2.9.62

1 year ago

2.10.5-beta.1

1 year ago

2.10.5-beta.2

1 year ago

2.10.5-beta.0

1 year ago

2.9.60-evm.0

2 years ago

2.9.60-evm.1

1 year ago

2.9.60-evm.2

1 year ago

2.9.60-evm.3

1 year ago

3.0.0-tron.0

2 years ago

3.0.0-tron.2

2 years ago

3.0.0-tron.1

2 years ago

3.0.0-tron.8

1 year ago

3.0.0-tron.7

1 year ago

3.0.0-tron.9

1 year ago

3.0.0-tron.3

2 years ago

3.0.0-tron.6

1 year ago

3.0.0-tron.5

1 year ago

2.9.60-evm.4

1 year ago

2.9.60-evm.5

1 year ago

2.9.60-evm.6

1 year ago

2.10.46-beta

1 year ago

2.10.50

1 year ago

2.10.51

1 year ago

3.0.0-tron.10

1 year ago

2.9.9

2 years ago

2.9.18

2 years ago

2.9.19

2 years ago

2.9.12

2 years ago

2.9.13

2 years ago

2.9.10

2 years ago

2.9.11

2 years ago

2.9.16

2 years ago

2.9.17

2 years ago

2.9.14

2 years ago

2.9.15

2 years ago

2.9.20

2 years ago

2.9.29

2 years ago

2.9.23

2 years ago

2.9.24

2 years ago

2.9.21

2 years ago

2.9.22

2 years ago

2.9.27

2 years ago

2.9.28

2 years ago

2.9.25

2 years ago

2.9.26

2 years ago

2.9.30

2 years ago

2.9.31

2 years ago

2.9.34

2 years ago

2.9.35

2 years ago

2.9.32

2 years ago

2.9.33

2 years ago

2.9.38

2 years ago

2.9.39

2 years ago

2.9.36

2 years ago

2.9.37

2 years ago

2.9.41

2 years ago

2.9.42

2 years ago

2.9.40

2 years ago

2.9.45

2 years ago

2.9.46

2 years ago

2.9.43

2 years ago

2.9.44

2 years ago

2.9.49

2 years ago

2.9.47

2 years ago

2.9.48

2 years ago

2.9.52

2 years ago

2.9.53

2 years ago

2.9.50

2 years ago

2.9.51

2 years ago

2.8.13-v2.10

2 years ago

2.8.13-v2.12

2 years ago

2.9.2

2 years ago

2.9.1

2 years ago

2.9.4

2 years ago

2.9.3

2 years ago

2.9.6

2 years ago

2.9.5

2 years ago

2.9.8

2 years ago

2.9.7

2 years ago

2.8.13-v2.9

2 years ago

2.8.13-v2.8

2 years ago

2.8.13-v2.7

2 years ago

2.8.13-v2.6

2 years ago

2.8.19

2 years ago

2.8.17

2 years ago

2.9.0

2 years ago

2.8.16

2 years ago

2.8.23

2 years ago

2.8.22

2 years ago

2.8.21

2 years ago

2.8.20

2 years ago

3.0.0-near.20

2 years ago

3.0.0-near.9

2 years ago

3.0.0-near.8

2 years ago

3.0.0-near.7

2 years ago

3.0.0-near.6

2 years ago

3.0.0-near.10

2 years ago

3.0.0-near.19

2 years ago

3.0.0-near.13

2 years ago

3.0.0-near.14

2 years ago

3.0.0-near.11

2 years ago

3.0.0-near.12

2 years ago

3.0.0-near.17

2 years ago

3.0.0-near.18

2 years ago

3.0.0-near.16

2 years ago

2.8.15

2 years ago

2.8.14

2 years ago

2.8.13

2 years ago

2.8.13-v2.4

2 years ago

2.8.13-v2.1

2 years ago

2.8.13-v2.5

2 years ago

2.8.13-v2.0

2 years ago

3.0.0-near.5

2 years ago

3.0.0-near.3

2 years ago

3.0.0-near.2

2 years ago

3.0.0-near.1

2 years ago

2.6.1

3 years ago

2.6.0

3 years ago

2.8.1

2 years ago

2.6.3

3 years ago

2.8.0

2 years ago

2.6.2

3 years ago

2.7.4

3 years ago

2.7.3

3 years ago

2.7.6

3 years ago

2.5.8

3 years ago

2.7.5

3 years ago

2.5.7

3 years ago

2.7.8

3 years ago

2.7.7

3 years ago

2.5.9

3 years ago

2.7.9

2 years ago

2.5.10

3 years ago

2.7.0

3 years ago

2.7.2

3 years ago

2.7.1

3 years ago

2.8.12

2 years ago

2.8.11

2 years ago

2.8.10

2 years ago

2.8.3

2 years ago

2.6.5

3 years ago

2.8.2

2 years ago

2.6.4

3 years ago

2.8.5

2 years ago

2.6.6

3 years ago

2.8.7

2 years ago

2.8.6

2 years ago

2.8.9

2 years ago

2.8.8

2 years ago

2.7.11

2 years ago

2.7.10

2 years ago

2.7.13

2 years ago

2.7.12

2 years ago

3.0.3-terra

3 years ago

3.0.0-terra

3 years ago

2.5.2

3 years ago

2.5.1

3 years ago

2.5.4

3 years ago

2.5.3

3 years ago

3.0.2-terra

3 years ago

2.5.6

3 years ago

2.5.5

3 years ago

3.0.1-terra

3 years ago

2.5.0

3 years ago

2.4.3

3 years ago

2.3.12

3 years ago

2.4.2

3 years ago

2.4.1

3 years ago

2.3.11

3 years ago

2.3.10

3 years ago

2.3.9

3 years ago

2.3.8

3 years ago

2.3.7

3 years ago

2.3.6

3 years ago

2.3.5

3 years ago

2.4.0

3 years ago

2.3.4

3 years ago

2.3.2

3 years ago

2.3.1

3 years ago