3.3.10 • Published 23 days ago

symbiosis-js-sdk v3.3.10

Weekly downloads
-
License
MIT
Repository
github
Last release
23 days 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

23 days ago

3.3.10

23 days ago

3.3.8

24 days ago

3.3.7

26 days ago

3.3.6

30 days ago

3.3.5

1 month ago

3.3.4

1 month ago

3.3.3

1 month ago

3.3.2

1 month ago

3.2.2

2 months ago

3.2.1

2 months ago

3.2.0

2 months ago

3.2.6

2 months ago

3.2.5

2 months ago

3.2.4

2 months ago

3.2.3

2 months ago

3.1.161-btc

3 months ago

3.2.9

1 month ago

3.2.8

1 month ago

3.2.7

1 month ago

3.1.156-no-btc

3 months ago

3.1.157

3 months ago

3.1.156

3 months ago

3.1.155

3 months ago

3.1.158

3 months ago

3.1.168

2 months ago

3.1.167

2 months ago

3.1.166

2 months ago

3.1.165

2 months ago

3.1.169

2 months ago

3.1.164

2 months ago

3.1.163

2 months ago

3.1.162

2 months ago

3.1.159-btc

3 months ago

3.1.167-no-btc

2 months ago

3.1.160-btc

3 months ago

3.3.1

1 month ago

3.3.0

1 month ago

3.1.177

2 months ago

3.1.176

2 months ago

3.1.171

2 months ago

3.1.170

2 months ago

3.1.175

2 months ago

3.1.174

2 months ago

3.1.173

2 months ago

3.1.172

2 months ago

3.1.158-btc

3 months ago

3.1.99

6 months ago

3.1.98

6 months ago

3.1.97

6 months ago

3.1.154

3 months ago

3.1.153

3 months ago

3.1.152

3 months ago

3.1.151

3 months ago

3.1.150

3 months ago

3.1.135

4 months ago

3.1.134

4 months ago

3.1.133

4 months ago

3.1.132

4 months ago

3.1.139

4 months ago

3.1.138

4 months ago

3.1.137

4 months ago

3.1.136

4 months ago

3.1.131

4 months ago

3.1.130

5 months ago

3.1.129

5 months ago

3.1.146

3 months ago

3.1.145

3 months ago

3.1.144

3 months ago

3.1.143

3 months ago

3.1.149

3 months ago

3.1.148

3 months ago

3.1.147

3 months ago

3.1.142

4 months ago

3.1.141

4 months ago

3.1.140

4 months ago

3.1.113

5 months ago

3.1.112

5 months ago

3.1.111

5 months ago

3.1.110

5 months ago

3.1.117

5 months ago

3.1.116

5 months ago

3.1.115

5 months ago

3.1.114

5 months ago

3.1.109

5 months ago

3.1.108

6 months ago

3.1.107

6 months ago

3.1.124

5 months ago

3.1.123

5 months ago

3.1.122

5 months ago

3.1.121

5 months ago

3.1.128

5 months ago

3.1.127

5 months ago

3.1.126

5 months ago

3.1.125

5 months ago

3.1.120

5 months ago

3.1.119

5 months ago

3.1.118

5 months ago

3.1.101

6 months ago

3.1.100

6 months ago

3.1.106

6 months ago

3.1.105

6 months ago

3.1.104

6 months ago

3.1.103

6 months ago

3.1.96-ton.0

6 months ago

3.1.96

6 months ago

3.1.94

6 months ago

3.1.95

6 months ago

3.1.90-fee.3

6 months ago

3.1.93-btc.1

7 months ago

3.1.93

7 months ago

3.1.90-fee.2

7 months ago

3.1.93-btc.0

7 months ago

3.1.92

7 months ago

3.1.91

7 months ago

3.1.90-fee.1

7 months ago

3.1.90

7 months ago

3.1.89

7 months ago

3.1.88

7 months ago

3.1.87

7 months ago

3.1.86

7 months ago

3.1.83

7 months ago

3.1.85

7 months ago

3.1.84

7 months ago

3.1.82

7 months ago

3.1.81

7 months ago

3.1.80

7 months ago

3.1.78

7 months ago

3.1.77

7 months ago

3.1.74

8 months ago

3.1.76

8 months ago

3.1.75

8 months ago

3.1.73

8 months ago

3.1.72

8 months ago

3.1.71

8 months ago

3.1.70

8 months ago

3.1.69

8 months ago

3.1.67

8 months ago

3.1.68

8 months ago

3.1.67-dev3

8 months ago

3.1.67-dev2

8 months ago

3.1.67-dev

8 months ago

3.1.66

8 months ago

3.1.65

8 months ago

3.1.63

8 months ago

3.1.64

8 months ago

3.1.62

8 months ago

3.1.56

9 months ago

3.1.58

9 months ago

3.1.57

9 months ago

3.1.59

9 months ago

3.1.61

8 months ago

3.1.60

9 months ago

3.1.55

9 months ago

3.1.54

9 months ago

3.1.53

9 months ago

3.1.52

9 months ago

3.1.50

9 months ago

3.1.51

9 months ago

3.1.49

9 months ago

3.1.48

9 months ago

3.1.47

9 months ago

3.1.45

9 months ago

3.1.44

9 months ago

3.1.46

9 months ago

3.1.43

9 months ago

3.1.41

9 months ago

3.1.42

9 months ago

3.1.40

9 months ago

3.1.39-dev.2

9 months ago

3.1.39-dev.1

9 months ago

3.1.39-dev

9 months ago

3.1.39

9 months ago

3.1.38

9 months ago

3.1.37

9 months ago

3.1.36-off.3

10 months ago

3.1.36-off.1

10 months ago

3.1.36-off.2

10 months ago

3.1.36

10 months ago

3.1.35

10 months ago

3.1.34-off.0

10 months ago

3.1.36-off.0

10 months ago

3.1.34

10 months ago

3.1.33

10 months ago

3.1.32

10 months ago

3.1.31

10 months ago

3.1.30

10 months ago

3.1.27-btc.0.3

10 months ago

3.1.29

10 months ago

3.1.28

10 months ago

3.1.27-btc.0.1

10 months ago

3.1.27-btc.0.2

10 months ago

3.1.27

10 months ago

3.1.26

10 months ago

3.1.23-btc.0.1

10 months ago

3.1.25-btc.0.1

10 months ago

3.1.25

10 months ago

3.1.23

10 months ago

3.1.22

11 months ago

3.1.20

11 months ago

3.1.19

11 months ago

3.1.18

11 months ago

3.1.17

11 months ago

3.1.16

11 months ago

3.1.14

11 months ago

3.1.13

11 months ago

3.1.15

11 months ago

3.1.12

11 months ago

3.1.11

11 months ago

3.1.10

11 months ago

3.1.7-uid.1

11 months ago

3.1.8-usdc

11 months ago

3.1.9

11 months ago

3.1.8

11 months ago

3.1.7-uid.0

12 months ago

3.1.7-zksync.1

12 months ago

3.1.7-zksync

12 months ago

3.1.3

12 months ago

3.1.7

12 months ago

3.1.6

12 months ago

3.1.4

12 months ago

3.1.2

12 months ago

3.1.1

12 months 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

12 months ago

3.1.0-beta.3

12 months ago

3.1.0-beta.5

12 months ago

3.1.0-beta.6

12 months 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

12 months 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

1 year ago

2.9.54

2 years ago

2.9.55

2 years ago

2.9.58

1 year ago

2.9.59

1 year ago

2.9.60

1 year 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

1 year 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

1 year ago

3.0.0-tron.2

1 year ago

3.0.0-tron.1

1 year 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

1 year 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

2 years ago

2.6.0

2 years ago

2.8.1

2 years ago

2.6.3

2 years ago

2.8.0

2 years ago

2.6.2

2 years ago

2.7.4

2 years ago

2.7.3

2 years ago

2.7.6

2 years ago

2.5.8

3 years ago

2.7.5

2 years ago

2.5.7

3 years ago

2.7.8

2 years ago

2.7.7

2 years ago

2.5.9

3 years ago

2.7.9

2 years ago

2.5.10

3 years ago

2.7.0

2 years ago

2.7.2

2 years ago

2.7.1

2 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

2 years ago

2.8.2

2 years ago

2.6.4

2 years ago

2.8.5

2 years ago

2.6.6

2 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