@codex-data/sdk 1.1.0-beta.1 → 2.0.0
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.
- package/README.md +53 -0
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -206,3 +206,56 @@ Users installing without the `@beta` tag will continue to receive the latest sta
|
|
|
206
206
|
```
|
|
207
207
|
|
|
208
208
|
> **Note:** The `prepublishOnly` script automatically runs the full build before publishing, ensuring the package is always built before release.
|
|
209
|
+
|
|
210
|
+
# Upgrading to 2.0.0+
|
|
211
|
+
|
|
212
|
+
There are a few breaking changes in 2.0.0 that you need to be aware of.
|
|
213
|
+
|
|
214
|
+
### Imports
|
|
215
|
+
|
|
216
|
+
**Before**
|
|
217
|
+
```
|
|
218
|
+
import { Codex } from "@codex-data/sdk";
|
|
219
|
+
import { TokenRankingAttribute, RankingDirection } from "@codex-data/sdk/dist/sdk/generated/graphql";
|
|
220
|
+
```
|
|
221
|
+
|
|
222
|
+
**After**
|
|
223
|
+
```
|
|
224
|
+
import { Codex, TokenRankingAttribute, RankingDirection } from "@codex-data/sdk";
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
**Before**
|
|
228
|
+
```tsx
|
|
229
|
+
import { Codex, GraphQL } from "@codex-data/sdk";
|
|
230
|
+
|
|
231
|
+
const [quoteToken, setQuoteToken] = useState<GraphQL.QuoteToken>(GraphQL.QuoteToken.Token0);
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
**After**
|
|
235
|
+
```tsx
|
|
236
|
+
import { Codex, QuoteToken } from "@codex-data/sdk";
|
|
237
|
+
|
|
238
|
+
const [quoteToken, setQuoteToken] = useState<QuoteToken>(QuoteToken.Token0);
|
|
239
|
+
```
|
|
240
|
+
|
|
241
|
+
### `onLaunchpadTokenEventBatch`
|
|
242
|
+
|
|
243
|
+
**Before**
|
|
244
|
+
```tsx
|
|
245
|
+
const unsubscribeFn = codex.subscriptions.onLaunchpadTokenEventBatch(
|
|
246
|
+
{
|
|
247
|
+
networkId: networkId
|
|
248
|
+
}
|
|
249
|
+
)
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**After**
|
|
253
|
+
```tsx
|
|
254
|
+
const unsubscribeFn = codex.subscriptions.onLaunchpadTokenEventBatch(
|
|
255
|
+
{
|
|
256
|
+
input: {
|
|
257
|
+
networkId: networkId
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
)
|
|
261
|
+
```
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codex-data/sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=17.5.0"
|
|
6
6
|
},
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"blockchain",
|
|
31
31
|
"api"
|
|
32
32
|
],
|
|
33
|
-
"repository": "github:
|
|
33
|
+
"repository": "github:Codex-Data/sdk",
|
|
34
34
|
"author": "Codex",
|
|
35
35
|
"license": "MIT",
|
|
36
36
|
"homepage": "https://docs.codex.io",
|