diff --git a/README.md b/README.md index c6f2138..7d27080 100644 --- a/README.md +++ b/README.md @@ -206,3 +206,56 @@ Users installing without the `@beta` tag will continue to receive the latest sta ``` > **Note:** The `prepublishOnly` script automatically runs the full build before publishing, ensuring the package is always built before release. + +# Upgrading to 2.0.0+ + +There are a few breaking changes in 2.0.0 that you need to be aware of. + +### Imports + +**Before** +``` +import { Codex } from "@codex-data/sdk"; +import { TokenRankingAttribute, RankingDirection } from "@codex-data/sdk/dist/sdk/generated/graphql"; +``` + +**After** +``` +import { Codex, TokenRankingAttribute, RankingDirection } from "@codex-data/sdk"; +``` + +**Before** +```tsx +import { Codex, GraphQL } from "@codex-data/sdk"; + +const [quoteToken, setQuoteToken] = useState(GraphQL.QuoteToken.Token0); +``` + +**After** +```tsx +import { Codex, QuoteToken } from "@codex-data/sdk"; + +const [quoteToken, setQuoteToken] = useState(QuoteToken.Token0); +``` + +### `onLaunchpadTokenEventBatch` + +**Before** +```tsx +const unsubscribeFn = codex.subscriptions.onLaunchpadTokenEventBatch( + { + networkId: networkId + } +) +``` + +**After** +```tsx +const unsubscribeFn = codex.subscriptions.onLaunchpadTokenEventBatch( + { + input: { + networkId: networkId + } + } +) +``` diff --git a/package.json b/package.json index ed906d0..1b0eacb 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@codex-data/sdk", - "version": "1.1.0-beta.1", + "version": "2.0.0", "engines": { "node": ">=17.5.0" }, @@ -50,7 +50,7 @@ "blockchain", "api" ], - "repository": "github:codex-data/sdk", + "repository": "github:Codex-Data/sdk", "author": "Codex", "license": "MIT", "homepage": "https://docs.codex.io", diff --git a/src/sdk/generated/graphql.ts b/src/sdk/generated/graphql.ts index 4ee493a..74c9e11 100644 --- a/src/sdk/generated/graphql.ts +++ b/src/sdk/generated/graphql.ts @@ -2054,6 +2054,8 @@ export enum LaunchpadTokenProtocol { MeteoraDbc = 'MeteoraDBC', /** Protocol name for Moonit (formerly Moonshot). */ Moonit = 'Moonit', + /** Protocol name for NadFun. */ + NadFun = 'NadFun', /** Protocol name for Printr (EVM only - Printr tokens on Solana should be queried with launchpadName as Printr uses MeteoraDBC on Solana). */ Printr = 'Printr', /** Protocol name for Pump.fun. */ @@ -5198,9 +5200,9 @@ export type OnEventsCreatedByMakerInput = { export type OnLaunchpadTokenEventBatchInput = { /** The type of event. */ eventType?: InputMaybe; - /** The name of the launchpad. One of the following: Pump.fun, Pump Mayhem, Bonk, BONAD.fun, Baseapp, Baseapp Creator, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr. */ + /** The name of the launchpad. One of the following: Pump.fun, Pump Mayhem, Bonk, BONAD.fun, Nad.fun, Baseapp, Baseapp Creator, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr. */ launchpadName?: InputMaybe; - /** A list of launchpad names. Any of the following: Pump.fun, Pump Mayhem, Bonk, BONAD.fun, Baseapp, Baseapp Creator, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr. */ + /** A list of launchpad names. Any of the following: Pump.fun, Pump Mayhem, Bonk, BONAD.fun, Nad.fun, Baseapp, Baseapp Creator, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr. */ launchpadNames?: InputMaybe>; /** The network ID that the token is deployed on. */ networkId?: InputMaybe; @@ -5216,9 +5218,9 @@ export type OnLaunchpadTokenEventInput = { address?: InputMaybe; /** The type of event. */ eventType?: InputMaybe; - /** The name of the launchpad. One of the following: Pump.fun, Pump Mayhem, Bonk, BONAD.fun, Baseapp, Baseapp Creator, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr. */ + /** The name of the launchpad. One of the following: Pump.fun, Pump Mayhem, Bonk, BONAD.fun, Nad.fun, Baseapp, Baseapp Creator, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr. */ launchpadName?: InputMaybe; - /** A list of launchpad names. Any of the following: Pump.fun, Pump Mayhem, Bonk, BONAD.fun, Baseapp, Baseapp Creator, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr. */ + /** A list of launchpad names. Any of the following: Pump.fun, Pump Mayhem, Bonk, BONAD.fun, Nad.fun, Baseapp, Baseapp Creator, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr. */ launchpadNames?: InputMaybe>; /** The network ID that the token is deployed on. */ networkId?: InputMaybe; @@ -8470,7 +8472,7 @@ export type TokenFilters = { launchpadMigrated?: InputMaybe; /** The timestamp when the launchpad was migrated */ launchpadMigratedAt?: InputMaybe; - /** A list of launchpad names. Any of the following: Pump.fun, Pump Mayhem, Bonk, BONAD.fun, Baseapp, Baseapp Creator, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr. */ + /** A list of launchpad names. Any of the following: Pump.fun, Pump Mayhem, Bonk, BONAD.fun, Nad.fun, Baseapp, Baseapp Creator, Zora, Zora Creator, Four.meme, Four.meme Fair, Believe, Moonshot, Jupiter Studio, boop, Heaven, TokenMill V2, Virtuals, Clanker, Clanker V4, ArenaTrade, Moonit, LaunchLab, MeteoraDBC, Vertigo, Cooking.City, time.fun, BAGS, Circus, Dealr, OhFuckFun, PrintFun, Trend, shout.fun, xApple, Sendshot, DubDub, cults, OpenGameProtocol, Printr. */ launchpadName?: InputMaybe>; /** A list of launchpad protocols. */ launchpadProtocol?: InputMaybe>;