Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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>(GraphQL.QuoteToken.Token0);
```

**After**
```tsx
import { Codex, QuoteToken } from "@codex-data/sdk";

const [quoteToken, setQuoteToken] = useState<QuoteToken>(QuoteToken.Token0);
```

### `onLaunchpadTokenEventBatch`

**Before**
```tsx
const unsubscribeFn = codex.subscriptions.onLaunchpadTokenEventBatch(
{
networkId: networkId
}
)
```

**After**
```tsx
const unsubscribeFn = codex.subscriptions.onLaunchpadTokenEventBatch(
{
input: {
networkId: networkId
}
}
)
```
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@codex-data/sdk",
"version": "1.1.0-beta.1",
"version": "2.0.0",
"engines": {
"node": ">=17.5.0"
},
Expand Down Expand Up @@ -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",
Expand Down
12 changes: 7 additions & 5 deletions src/sdk/generated/graphql.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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. */
Expand Down Expand Up @@ -5198,9 +5200,9 @@ export type OnEventsCreatedByMakerInput = {
export type OnLaunchpadTokenEventBatchInput = {
/** The type of event. */
eventType?: InputMaybe<LaunchpadTokenEventType>;
/** 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<Scalars['String']['input']>;
/** 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<Array<Scalars['String']['input']>>;
/** The network ID that the token is deployed on. */
networkId?: InputMaybe<Scalars['Int']['input']>;
Expand All @@ -5216,9 +5218,9 @@ export type OnLaunchpadTokenEventInput = {
address?: InputMaybe<Scalars['String']['input']>;
/** The type of event. */
eventType?: InputMaybe<LaunchpadTokenEventType>;
/** 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<Scalars['String']['input']>;
/** 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<Array<Scalars['String']['input']>>;
/** The network ID that the token is deployed on. */
networkId?: InputMaybe<Scalars['Int']['input']>;
Expand Down Expand Up @@ -8470,7 +8472,7 @@ export type TokenFilters = {
launchpadMigrated?: InputMaybe<Scalars['Boolean']['input']>;
/** The timestamp when the launchpad was migrated */
launchpadMigratedAt?: InputMaybe<NumberFilter>;
/** 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<Array<Scalars['String']['input']>>;
/** A list of launchpad protocols. */
launchpadProtocol?: InputMaybe<Array<Scalars['String']['input']>>;
Expand Down
Loading