rainbow-swap-sdk 1.1.14 → 1.1.16

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/README.md +17 -3
  2. package/package.json +1 -1
package/README.md CHANGED
@@ -2,8 +2,15 @@
2
2
 
3
3
  This SDK is designed for building applications on top of [Rainbow Swap 🌈](https://github.com/0xblackbot/rainbow-swap) - The Next Gen DEX Aggregator on the TON blockchain 💎.
4
4
 
5
+ ---
6
+
5
7
  **We have plans to integrate commissions and share them with those who have integrated this SDK into their DApps.**
6
8
 
9
+ ---
10
+
11
+ [![npm version](https://badge.fury.io/js/rainbow-swap-sdk.svg)](https://badge.fury.io/js/rainbow-swap-sdk)
12
+ ![NPM License](https://img.shields.io/npm/l/rainbow-swap-sdk)
13
+
7
14
  ### Installation
8
15
 
9
16
  To install the rainbow-swap-sdk, use the following npm command:
@@ -14,7 +21,14 @@ npm install rainbow-swap-sdk
14
21
  ### Integrate your dApp
15
22
 
16
23
  ```typescript
17
- import {getSwapMessages} from 'rainbow-swap-sdk';
24
+ import {
25
+ getAssetsRecord,
26
+ getIsRainbowWalletActive,
27
+ getBestRoute,
28
+ getIsActivationRequired,
29
+ getRainbowWalletActivationMessages,
30
+ getSwapMessages
31
+ } from 'rainbow-swap-sdk';
18
32
 
19
33
  // 1. On page load: fetch the list of available tokens
20
34
  const assetsRecord = await getAssetsRecord();
@@ -33,7 +47,7 @@ const params = {
33
47
  inputAssetAddress: 'ton', // TON
34
48
  outputAssetAddress: 'EQCxE6mUtQJKFnGfaROTKOt1lZbDiiX1kCixRv7Nw2Id_sDs' // USDT jetton master address
35
49
  };
36
- const bestRouteResponse = getBestRoute(params);
50
+ const bestRouteResponse = await getBestRoute(params);
37
51
 
38
52
  ...
39
53
 
@@ -58,7 +72,7 @@ if (isActivationRequired) {
58
72
 
59
73
  ### Live example
60
74
 
61
- For a live example of using the SDK, visit [Rainbow Swap repository](https://github.com/0xblackbot/rainbow-swap).
75
+ For a live example of using the SDK, visit [Rainbow Swap 🌈 repository](https://github.com/0xblackbot/rainbow-swap).
62
76
 
63
77
  ### Contact
64
78
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rainbow-swap-sdk",
3
- "version": "1.1.14",
3
+ "version": "1.1.16",
4
4
  "description": "An SDK for building applications on top of Rainbow Swap",
5
5
  "repository": "https://github.com/0xblackbot/rainbow-swap-sdk.git",
6
6
  "license": "Apache-2.0",