@gabox-labs/sdk 0.7.1 → 0.9.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.
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","names":[],"sources":["../../src/generated/events/drawResolved.ts","../../src/generated/events/packBought.ts","../../src/generated/events/poolCreated.ts","../../src/generated/events/prizesFunded.ts","../../src/generated/events/randomnessRetried.ts","../../src/generated/events/tokensSold.ts","../../src/generated/errors/gabox.ts","../../src/generated/index.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBooleanDecoder, getBooleanEncoder, getBytesDecoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const DRAW_RESOLVED_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([127, 177, 62, 146, 164, 90, 185, 218]);\n\nexport function getDrawResolvedEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(DRAW_RESOLVED_EVENT_DISCRIMINATOR); }\n\nexport type DrawResolvedEvent = { pool: Address; seq: bigint; purchaser: Address; amount: bigint; randomness: ReadonlyUint8Array; timedOut: boolean; };\n\nexport type DrawResolvedEventArgs = { pool: Address; seq: number | bigint; purchaser: Address; amount: number | bigint; randomness: ReadonlyUint8Array; timedOut: boolean; };\n\n/** Gets the encoder for {@link DrawResolvedEventArgs} event data. */\nexport function getDrawResolvedEventEncoder(): FixedSizeEncoder<DrawResolvedEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['seq', getU64Encoder()], ['purchaser', getAddressEncoder()], ['amount', getU64Encoder()], ['randomness', fixEncoderSize(getBytesEncoder(), 32)], ['timedOut', getBooleanEncoder()]]), [getConstantEncoder(DRAW_RESOLVED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link DrawResolvedEvent} event data. */\nexport function getDrawResolvedEventDecoder(): FixedSizeDecoder<DrawResolvedEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['seq', getU64Decoder()], ['purchaser', getAddressDecoder()], ['amount', getU64Decoder()], ['randomness', fixDecoderSize(getBytesDecoder(), 32)], ['timedOut', getBooleanDecoder()]]), [getConstantDecoder(DRAW_RESOLVED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link DrawResolvedEvent} event data. */\nexport function getDrawResolvedEventCodec(): FixedSizeCodec<DrawResolvedEventArgs, DrawResolvedEvent> {\n return combineCodec(getDrawResolvedEventEncoder(), getDrawResolvedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link DrawResolvedEvent} event data. */\nexport function parseDrawResolvedEvent(data: ReadonlyUint8Array | Uint8Array): DrawResolvedEvent {\n if (containsBytes(data, DRAW_RESOLVED_EVENT_DISCRIMINATOR, 0)) { return getDrawResolvedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"DrawResolvedEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixEncoderSize, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\nimport { getPrizeDecoder, getPrizeEncoder, type Prize, type PrizeArgs } from '../types';\n\nexport const PACK_BOUGHT_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([220, 208, 74, 75, 42, 144, 231, 69]);\n\nexport function getPackBoughtEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(PACK_BOUGHT_EVENT_DISCRIMINATOR); }\n\nexport type PackBoughtEvent = { pool: Address; seq: bigint; purchaser: Address; venue: Address; quoteMint: Address; tokensBought: bigint;\n/** Quote token the venue charged for the pack. */\nquoteDebit: bigint;\n/** Lamports the venue call itself spent, which is venue account rent. */\nnativeDebit: bigint; vrfNativeDebit: bigint; totalNativeDebit: bigint; prizes: Array<Prize>; };\n\nexport type PackBoughtEventArgs = { pool: Address; seq: number | bigint; purchaser: Address; venue: Address; quoteMint: Address; tokensBought: number | bigint;\n/** Quote token the venue charged for the pack. */\nquoteDebit: number | bigint;\n/** Lamports the venue call itself spent, which is venue account rent. */\nnativeDebit: number | bigint; vrfNativeDebit: number | bigint; totalNativeDebit: number | bigint; prizes: Array<PrizeArgs>; };\n\n/** Gets the encoder for {@link PackBoughtEventArgs} event data. */\nexport function getPackBoughtEventEncoder(): FixedSizeEncoder<PackBoughtEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['seq', getU64Encoder()], ['purchaser', getAddressEncoder()], ['venue', getAddressEncoder()], ['quoteMint', getAddressEncoder()], ['tokensBought', getU64Encoder()], ['quoteDebit', getU64Encoder()], ['nativeDebit', getU64Encoder()], ['vrfNativeDebit', getU64Encoder()], ['totalNativeDebit', getU64Encoder()], ['prizes', getArrayEncoder(getPrizeEncoder(), { size: 8 })]]), [getConstantEncoder(PACK_BOUGHT_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link PackBoughtEvent} event data. */\nexport function getPackBoughtEventDecoder(): FixedSizeDecoder<PackBoughtEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['seq', getU64Decoder()], ['purchaser', getAddressDecoder()], ['venue', getAddressDecoder()], ['quoteMint', getAddressDecoder()], ['tokensBought', getU64Decoder()], ['quoteDebit', getU64Decoder()], ['nativeDebit', getU64Decoder()], ['vrfNativeDebit', getU64Decoder()], ['totalNativeDebit', getU64Decoder()], ['prizes', getArrayDecoder(getPrizeDecoder(), { size: 8 })]]), [getConstantDecoder(PACK_BOUGHT_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link PackBoughtEvent} event data. */\nexport function getPackBoughtEventCodec(): FixedSizeCodec<PackBoughtEventArgs, PackBoughtEvent> {\n return combineCodec(getPackBoughtEventEncoder(), getPackBoughtEventDecoder());\n}\n\n/** Parses the provided bytes into {@link PackBoughtEvent} event data. */\nexport function parsePackBoughtEvent(data: ReadonlyUint8Array | Uint8Array): PackBoughtEvent {\n if (containsBytes(data, PACK_BOUGHT_EVENT_DISCRIMINATOR, 0)) { return getPackBoughtEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"PackBoughtEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixEncoderSize, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\nimport { getTierDecoder, getTierEncoder, type Tier, type TierArgs } from '../types';\n\nexport const POOL_CREATED_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([202, 44, 41, 88, 104, 220, 157, 82]);\n\nexport function getPoolCreatedEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(POOL_CREATED_EVENT_DISCRIMINATOR); }\n\nexport type PoolCreatedEvent = { pool: Address; mint: Address; creator: Address; packTokens: bigint; tiers: Array<Tier>; seedTokens: bigint; extraSeedTokens: bigint; quoteMint: Address;\n/** Quote token the seed buy spent. */\nseedQuoteAmount: bigint;\n/** Lamports the seed buy spent, which is venue account rent, not price. */\nseedNativeDebit: bigint; };\n\nexport type PoolCreatedEventArgs = { pool: Address; mint: Address; creator: Address; packTokens: number | bigint; tiers: Array<TierArgs>; seedTokens: number | bigint; extraSeedTokens: number | bigint; quoteMint: Address;\n/** Quote token the seed buy spent. */\nseedQuoteAmount: number | bigint;\n/** Lamports the seed buy spent, which is venue account rent, not price. */\nseedNativeDebit: number | bigint; };\n\n/** Gets the encoder for {@link PoolCreatedEventArgs} event data. */\nexport function getPoolCreatedEventEncoder(): FixedSizeEncoder<PoolCreatedEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['mint', getAddressEncoder()], ['creator', getAddressEncoder()], ['packTokens', getU64Encoder()], ['tiers', getArrayEncoder(getTierEncoder(), { size: 8 })], ['seedTokens', getU64Encoder()], ['extraSeedTokens', getU64Encoder()], ['quoteMint', getAddressEncoder()], ['seedQuoteAmount', getU64Encoder()], ['seedNativeDebit', getU64Encoder()]]), [getConstantEncoder(POOL_CREATED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link PoolCreatedEvent} event data. */\nexport function getPoolCreatedEventDecoder(): FixedSizeDecoder<PoolCreatedEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['mint', getAddressDecoder()], ['creator', getAddressDecoder()], ['packTokens', getU64Decoder()], ['tiers', getArrayDecoder(getTierDecoder(), { size: 8 })], ['seedTokens', getU64Decoder()], ['extraSeedTokens', getU64Decoder()], ['quoteMint', getAddressDecoder()], ['seedQuoteAmount', getU64Decoder()], ['seedNativeDebit', getU64Decoder()]]), [getConstantDecoder(POOL_CREATED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link PoolCreatedEvent} event data. */\nexport function getPoolCreatedEventCodec(): FixedSizeCodec<PoolCreatedEventArgs, PoolCreatedEvent> {\n return combineCodec(getPoolCreatedEventEncoder(), getPoolCreatedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link PoolCreatedEvent} event data. */\nexport function parsePoolCreatedEvent(data: ReadonlyUint8Array | Uint8Array): PoolCreatedEvent {\n if (containsBytes(data, POOL_CREATED_EVENT_DISCRIMINATOR, 0)) { return getPoolCreatedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"PoolCreatedEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const PRIZES_FUNDED_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([188, 129, 185, 44, 234, 71, 53, 60]);\n\nexport function getPrizesFundedEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(PRIZES_FUNDED_EVENT_DISCRIMINATOR); }\n\nexport type PrizesFundedEvent = { pool: Address; funder: Address; amount: bigint; };\n\nexport type PrizesFundedEventArgs = { pool: Address; funder: Address; amount: number | bigint; };\n\n/** Gets the encoder for {@link PrizesFundedEventArgs} event data. */\nexport function getPrizesFundedEventEncoder(): FixedSizeEncoder<PrizesFundedEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['funder', getAddressEncoder()], ['amount', getU64Encoder()]]), [getConstantEncoder(PRIZES_FUNDED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link PrizesFundedEvent} event data. */\nexport function getPrizesFundedEventDecoder(): FixedSizeDecoder<PrizesFundedEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['funder', getAddressDecoder()], ['amount', getU64Decoder()]]), [getConstantDecoder(PRIZES_FUNDED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link PrizesFundedEvent} event data. */\nexport function getPrizesFundedEventCodec(): FixedSizeCodec<PrizesFundedEventArgs, PrizesFundedEvent> {\n return combineCodec(getPrizesFundedEventEncoder(), getPrizesFundedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link PrizesFundedEvent} event data. */\nexport function parsePrizesFundedEvent(data: ReadonlyUint8Array | Uint8Array): PrizesFundedEvent {\n if (containsBytes(data, PRIZES_FUNDED_EVENT_DISCRIMINATOR, 0)) { return getPrizesFundedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"PrizesFundedEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([243, 30, 148, 22, 14, 127, 52, 140]);\n\nexport function getRandomnessRetriedEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR); }\n\nexport type RandomnessRetriedEvent = { pool: Address; seq: bigint; attempt: number; };\n\nexport type RandomnessRetriedEventArgs = { pool: Address; seq: number | bigint; attempt: number; };\n\n/** Gets the encoder for {@link RandomnessRetriedEventArgs} event data. */\nexport function getRandomnessRetriedEventEncoder(): FixedSizeEncoder<RandomnessRetriedEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['seq', getU64Encoder()], ['attempt', getU8Encoder()]]), [getConstantEncoder(RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link RandomnessRetriedEvent} event data. */\nexport function getRandomnessRetriedEventDecoder(): FixedSizeDecoder<RandomnessRetriedEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['seq', getU64Decoder()], ['attempt', getU8Decoder()]]), [getConstantDecoder(RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link RandomnessRetriedEvent} event data. */\nexport function getRandomnessRetriedEventCodec(): FixedSizeCodec<RandomnessRetriedEventArgs, RandomnessRetriedEvent> {\n return combineCodec(getRandomnessRetriedEventEncoder(), getRandomnessRetriedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link RandomnessRetriedEvent} event data. */\nexport function parseRandomnessRetriedEvent(data: ReadonlyUint8Array | Uint8Array): RandomnessRetriedEvent {\n if (containsBytes(data, RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR, 0)) { return getRandomnessRetriedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"RandomnessRetriedEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const TOKENS_SOLD_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([217, 83, 68, 137, 134, 225, 94, 45]);\n\nexport function getTokensSoldEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(TOKENS_SOLD_EVENT_DISCRIMINATOR); }\n\nexport type TokensSoldEvent = { pool: Address; seller: Address; venue: Address; quoteMint: Address; amount: bigint; quoteProceeds: bigint; nativeDebit: bigint; };\n\nexport type TokensSoldEventArgs = { pool: Address; seller: Address; venue: Address; quoteMint: Address; amount: number | bigint; quoteProceeds: number | bigint; nativeDebit: number | bigint; };\n\n/** Gets the encoder for {@link TokensSoldEventArgs} event data. */\nexport function getTokensSoldEventEncoder(): FixedSizeEncoder<TokensSoldEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['seller', getAddressEncoder()], ['venue', getAddressEncoder()], ['quoteMint', getAddressEncoder()], ['amount', getU64Encoder()], ['quoteProceeds', getU64Encoder()], ['nativeDebit', getU64Encoder()]]), [getConstantEncoder(TOKENS_SOLD_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link TokensSoldEvent} event data. */\nexport function getTokensSoldEventDecoder(): FixedSizeDecoder<TokensSoldEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['seller', getAddressDecoder()], ['venue', getAddressDecoder()], ['quoteMint', getAddressDecoder()], ['amount', getU64Decoder()], ['quoteProceeds', getU64Decoder()], ['nativeDebit', getU64Decoder()]]), [getConstantDecoder(TOKENS_SOLD_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link TokensSoldEvent} event data. */\nexport function getTokensSoldEventCodec(): FixedSizeCodec<TokensSoldEventArgs, TokensSoldEvent> {\n return combineCodec(getTokensSoldEventEncoder(), getTokensSoldEventDecoder());\n}\n\n/** Parses the provided bytes into {@link TokensSoldEvent} event data. */\nexport function parseTokensSoldEvent(data: ReadonlyUint8Array | Uint8Array): TokensSoldEvent {\n if (containsBytes(data, TOKENS_SOLD_EVENT_DISCRIMINATOR, 0)) { return getTokensSoldEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"TokensSoldEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { isProgramError, type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from '@solana/kit';\nimport { GABOX_PROGRAM_ADDRESS } from '../programs';\n\n/** Arithmetic: Arithmetic overflow or inconsistent accounting */\nexport const GABOX_ERROR__ARITHMETIC = 0x1770; // 6000\n/** InvalidDistribution: Invalid prize distribution */\nexport const GABOX_ERROR__INVALID_DISTRIBUTION = 0x1771; // 6001\n/** UnfundedExpectation: Expected token award exceeds tokens purchased */\nexport const GABOX_ERROR__UNFUNDED_EXPECTATION = 0x1772; // 6002\n/** UnsupportedMint: Mint must have 6 decimals and no mint or freeze authority */\nexport const GABOX_ERROR__UNSUPPORTED_MINT = 0x1773; // 6003\n/** InsolventInventory: Prize inventory does not cover reservations */\nexport const GABOX_ERROR__INSOLVENT_INVENTORY = 0x1774; // 6004\n/** PrizeCapChanged: Top prize is below the signed minimum; refresh the offer */\nexport const GABOX_ERROR__PRIZE_CAP_CHANGED = 0x1775; // 6005\n/** PackTooSmall: A pack pays zero tokens on some tier */\nexport const GABOX_ERROR__PACK_TOO_SMALL = 0x1776; // 6006\n/** JackpotBelowOnePack: The largest tier must pay at least one pack */\nexport const GABOX_ERROR__JACKPOT_BELOW_ONE_PACK = 0x1777; // 6007\n/** InvalidVenue: Incorrect trade program, account order, or token binding */\nexport const GABOX_ERROR__INVALID_VENUE = 0x1778; // 6008\n/** IncorrectTokenDelta: Trade did not move the exact token amount */\nexport const GABOX_ERROR__INCORRECT_TOKEN_DELTA = 0x1779; // 6009\n/** SlippageExceeded: Spend exceeds the signed limit */\nexport const GABOX_ERROR__SLIPPAGE_EXCEEDED = 0x177a; // 6010\n/** RetryTooSoon: Retry interval has not elapsed */\nexport const GABOX_ERROR__RETRY_TOO_SOON = 0x177b; // 6011\n/** RetryUnavailable: Retry limit reached or draw expired */\nexport const GABOX_ERROR__RETRY_UNAVAILABLE = 0x177c; // 6012\n/** NotExpired: Oracle timeout has not elapsed */\nexport const GABOX_ERROR__NOT_EXPIRED = 0x177d; // 6013\n/** ZeroAmount: Amount must be positive */\nexport const GABOX_ERROR__ZERO_AMOUNT = 0x177e; // 6014\n/** InvalidLaunch: LaunchLab create instruction is malformed or missing before this instruction */\nexport const GABOX_ERROR__INVALID_LAUNCH = 0x177f; // 6015\n/** InvalidQuote: Quote mint or quote token program is unsupported */\nexport const GABOX_ERROR__INVALID_QUOTE = 0x1780; // 6016\n/** WalletActivityMismatch: Wallet activity account belongs to a different wallet */\nexport const GABOX_ERROR__WALLET_ACTIVITY_MISMATCH = 0x1781; // 6017\n\nexport type GaboxError = typeof GABOX_ERROR__ARITHMETIC | typeof GABOX_ERROR__INCORRECT_TOKEN_DELTA | typeof GABOX_ERROR__INSOLVENT_INVENTORY | typeof GABOX_ERROR__INVALID_DISTRIBUTION | typeof GABOX_ERROR__INVALID_LAUNCH | typeof GABOX_ERROR__INVALID_QUOTE | typeof GABOX_ERROR__INVALID_VENUE | typeof GABOX_ERROR__JACKPOT_BELOW_ONE_PACK | typeof GABOX_ERROR__NOT_EXPIRED | typeof GABOX_ERROR__PACK_TOO_SMALL | typeof GABOX_ERROR__PRIZE_CAP_CHANGED | typeof GABOX_ERROR__RETRY_TOO_SOON | typeof GABOX_ERROR__RETRY_UNAVAILABLE | typeof GABOX_ERROR__SLIPPAGE_EXCEEDED | typeof GABOX_ERROR__UNFUNDED_EXPECTATION | typeof GABOX_ERROR__UNSUPPORTED_MINT | typeof GABOX_ERROR__WALLET_ACTIVITY_MISMATCH | typeof GABOX_ERROR__ZERO_AMOUNT;\n\nlet gaboxErrorMessages: Record<GaboxError, string> | undefined;\nif (process.env['NODE_ENV'] !== 'production') {\n gaboxErrorMessages = { [GABOX_ERROR__ARITHMETIC]: `Arithmetic overflow or inconsistent accounting`, [GABOX_ERROR__INCORRECT_TOKEN_DELTA]: `Trade did not move the exact token amount`, [GABOX_ERROR__INSOLVENT_INVENTORY]: `Prize inventory does not cover reservations`, [GABOX_ERROR__INVALID_DISTRIBUTION]: `Invalid prize distribution`, [GABOX_ERROR__INVALID_LAUNCH]: `LaunchLab create instruction is malformed or missing before this instruction`, [GABOX_ERROR__INVALID_QUOTE]: `Quote mint or quote token program is unsupported`, [GABOX_ERROR__INVALID_VENUE]: `Incorrect trade program, account order, or token binding`, [GABOX_ERROR__JACKPOT_BELOW_ONE_PACK]: `The largest tier must pay at least one pack`, [GABOX_ERROR__NOT_EXPIRED]: `Oracle timeout has not elapsed`, [GABOX_ERROR__PACK_TOO_SMALL]: `A pack pays zero tokens on some tier`, [GABOX_ERROR__PRIZE_CAP_CHANGED]: `Top prize is below the signed minimum; refresh the offer`, [GABOX_ERROR__RETRY_TOO_SOON]: `Retry interval has not elapsed`, [GABOX_ERROR__RETRY_UNAVAILABLE]: `Retry limit reached or draw expired`, [GABOX_ERROR__SLIPPAGE_EXCEEDED]: `Spend exceeds the signed limit`, [GABOX_ERROR__UNFUNDED_EXPECTATION]: `Expected token award exceeds tokens purchased`, [GABOX_ERROR__UNSUPPORTED_MINT]: `Mint must have 6 decimals and no mint or freeze authority`, [GABOX_ERROR__WALLET_ACTIVITY_MISMATCH]: `Wallet activity account belongs to a different wallet`, [GABOX_ERROR__ZERO_AMOUNT]: `Amount must be positive` };\n}\n\nexport function getGaboxErrorMessage(code: GaboxError): string {\n if (process.env['NODE_ENV'] !== 'production') {\n return (gaboxErrorMessages as Record<GaboxError, string>)[code];\n }\n\n return 'Error message not available in production bundles.';\n}\n\nexport function isGaboxError<TProgramErrorCode extends GaboxError>(\n error: unknown,\n transactionMessage: { instructions: Record<number, { programAddress: Address }> },\n code?: TProgramErrorCode,\n): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> {\n return isProgramError<TProgramErrorCode>(error, transactionMessage, GABOX_PROGRAM_ADDRESS, code);\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nexport * from './accounts';\nexport * from './errors';\nexport * from './events';\nexport * from './instructions';\nexport * from './pdas';\nexport * from './programs';\nexport * from './types';"],"mappings":";;;;;;;;;;;AAUA,MAAa,oCAAwD,IAAI,WAAW;CAAC;CAAK;CAAK;CAAI;CAAK;CAAK;CAAI;CAAK;AAAG,CAAC;AAE1H,SAAgB,yCAA6D;CAAE,OAAO,eAAe,gBAAgB,GAAG,CAAC,CAAC,CAAC,OAAO,iCAAiC;AAAG;;AAOtK,SAAgB,8BAAuE;CACnF,OAAO,uBAAuB,iBAAiB;EAAC,CAAC,QAAQ,kBAAkB,CAAC;EAAG,CAAC,OAAO,cAAc,CAAC;EAAG,CAAC,aAAa,kBAAkB,CAAC;EAAG,CAAC,UAAU,cAAc,CAAC;EAAG,CAAC,cAAc,eAAe,gBAAgB,GAAG,EAAE,CAAC;EAAG,CAAC,YAAY,kBAAkB,CAAC;CAAC,CAAC,GAAG,CAAC,mBAAmB,iCAAiC,CAAC,CAAC;AACjU;;AAGA,SAAgB,8BAAmE;CAC/E,OAAO,uBAAuB,iBAAiB;EAAC,CAAC,QAAQ,kBAAkB,CAAC;EAAG,CAAC,OAAO,cAA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AEhD,MAAa,iCAAiC;;AAE9C,MAAa,8BAA8B;;AAE3C,MAAa,sCAAsC;;AAEnD,MAAa,6BAA6B;;AAE1C,MAAa,qCAAqC;;AAElD,MAAa,iCAAiC;;AAE9C,MAAa,8BAA8B;;AAE3C,MAAa,iCAAiC;;AAE9C,MAAa,2BAA2B;;AAExC,MAAa,2BAA2B;;AAExC,MAAa,8BAA8B;;AAE3C,MAAa,6BAA6B;;AAE1C,MAAa,wCAAwC;AAIrD,IAAI;AACJ,IAAI,QAAQ,IAAI,gBAAgB,cAC9B,qBAAqB;EAAG,0BAA0B;EAAmD,qCAAqC;EAA8C,mCAAmC;EAAgD,oCAAoC;EAA+B,8BAA8B;EAAiF,6BAA6B;EAAqD,6BAA6B;EAA6D,sCAAsC;EAAgD,2BAA2B;EAAmC,8BAA8B;EAAyC,iCAAiC;EAA6D,8BAA8B;EAAmC,iCAAiC;EAAwC,iCAAiC;EAAmC,oCAAoC;EAAkD,gCAAgC;EAA8D,wCAAwC;EAA0D,2BAA2B;AAA0B;AAG77C,SAAgB,qBAAqB,MAA0B;CAC7D,IAAI,QAAQ,IAAI,gBAAgB,cAC9B,OAAQ,mBAAkD;CAG5D,OAAO;AACT;AAEA,SAAgB,aACZ,OACA,oBACA,MACmI;CACrI,OAAO,eAAkC,OAAO,oBAAoB,uBAAuB,IAAI;AACjG"}
1
+ {"version":3,"file":"index.js","names":[],"sources":["../../src/generated/types/packResult.ts","../../src/generated/types/prize.ts","../../src/generated/events/drawResolved.ts","../../src/generated/events/packsBought.ts","../../src/generated/events/poolCreated.ts","../../src/generated/events/prizeClaimed.ts","../../src/generated/events/prizesFunded.ts","../../src/generated/events/randomnessRetried.ts","../../src/generated/events/tokensSold.ts","../../src/generated/errors/gabox.ts","../../src/generated/index.ts"],"sourcesContent":["/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit';\n\n/**\n * One pack's outcome inside a settled batch: the tier it landed on and the\n * tokens it pays.\n */\nexport type PackResult = { tier: number; amount: bigint; };\n\nexport type PackResultArgs = { tier: number; amount: number | bigint; };\n\nexport function getPackResultEncoder(): FixedSizeEncoder<PackResultArgs> {\n return getStructEncoder([['tier', getU8Encoder()], ['amount', getU64Encoder()]]);\n}\n\nexport function getPackResultDecoder(): FixedSizeDecoder<PackResult> {\n return getStructDecoder([['tier', getU8Decoder()], ['amount', getU64Decoder()]]);\n}\n\nexport function getPackResultCodec(): FixedSizeCodec<PackResultArgs, PackResult> {\n return combineCodec(getPackResultEncoder(), getPackResultDecoder());\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, getStructDecoder, getStructEncoder, getU32Decoder, getU32Encoder, getU64Decoder, getU64Encoder, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder } from '@solana/kit';\n\nexport type Prize = { amount: bigint; tickets: number; };\n\nexport type PrizeArgs = { amount: number | bigint; tickets: number; };\n\nexport function getPrizeEncoder(): FixedSizeEncoder<PrizeArgs> {\n return getStructEncoder([['amount', getU64Encoder()], ['tickets', getU32Encoder()]]);\n}\n\nexport function getPrizeDecoder(): FixedSizeDecoder<Prize> {\n return getStructDecoder([['amount', getU64Decoder()], ['tickets', getU32Decoder()]]);\n}\n\nexport function getPrizeCodec(): FixedSizeCodec<PrizeArgs, Prize> {\n return combineCodec(getPrizeEncoder(), getPrizeDecoder());\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixDecoderSize, fixEncoderSize, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBooleanDecoder, getBooleanEncoder, getBytesDecoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, type Address, type Codec, type Decoder, type Encoder, type ReadonlyUint8Array } from '@solana/kit';\nimport { getPackResultDecoder, getPackResultEncoder, type PackResult, type PackResultArgs } from '../types';\n\nexport const DRAW_RESOLVED_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([127, 177, 62, 146, 164, 90, 185, 218]);\n\nexport function getDrawResolvedEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(DRAW_RESOLVED_EVENT_DISCRIMINATOR); }\n\nexport type DrawResolvedEvent = { pool: Address; draw: Address; purchaser: Address; seqStart: bigint; count: number; total: bigint; randomness: ReadonlyUint8Array; timedOut: boolean;\n/**\n * True when the tokens reached the purchaser in the same instruction.\n * False when they wait in the vault for a claim.\n */\npaid: boolean; results: Array<PackResult>; };\n\nexport type DrawResolvedEventArgs = { pool: Address; draw: Address; purchaser: Address; seqStart: number | bigint; count: number; total: number | bigint; randomness: ReadonlyUint8Array; timedOut: boolean;\n/**\n * True when the tokens reached the purchaser in the same instruction.\n * False when they wait in the vault for a claim.\n */\npaid: boolean; results: Array<PackResultArgs>; };\n\n/** Gets the encoder for {@link DrawResolvedEventArgs} event data. */\nexport function getDrawResolvedEventEncoder(): Encoder<DrawResolvedEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['draw', getAddressEncoder()], ['purchaser', getAddressEncoder()], ['seqStart', getU64Encoder()], ['count', getU8Encoder()], ['total', getU64Encoder()], ['randomness', fixEncoderSize(getBytesEncoder(), 32)], ['timedOut', getBooleanEncoder()], ['paid', getBooleanEncoder()], ['results', getArrayEncoder(getPackResultEncoder())]]), [getConstantEncoder(DRAW_RESOLVED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link DrawResolvedEvent} event data. */\nexport function getDrawResolvedEventDecoder(): Decoder<DrawResolvedEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['draw', getAddressDecoder()], ['purchaser', getAddressDecoder()], ['seqStart', getU64Decoder()], ['count', getU8Decoder()], ['total', getU64Decoder()], ['randomness', fixDecoderSize(getBytesDecoder(), 32)], ['timedOut', getBooleanDecoder()], ['paid', getBooleanDecoder()], ['results', getArrayDecoder(getPackResultDecoder())]]), [getConstantDecoder(DRAW_RESOLVED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link DrawResolvedEvent} event data. */\nexport function getDrawResolvedEventCodec(): Codec<DrawResolvedEventArgs, DrawResolvedEvent> {\n return combineCodec(getDrawResolvedEventEncoder(), getDrawResolvedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link DrawResolvedEvent} event data. */\nexport function parseDrawResolvedEvent(data: ReadonlyUint8Array | Uint8Array): DrawResolvedEvent {\n if (containsBytes(data, DRAW_RESOLVED_EVENT_DISCRIMINATOR, 0)) { return getDrawResolvedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"DrawResolvedEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixEncoderSize, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\nimport { getPrizeDecoder, getPrizeEncoder, type Prize, type PrizeArgs } from '../types';\n\nexport const PACKS_BOUGHT_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([44, 243, 223, 11, 90, 23, 184, 47]);\n\nexport function getPacksBoughtEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(PACKS_BOUGHT_EVENT_DISCRIMINATOR); }\n\nexport type PacksBoughtEvent = { pool: Address; draw: Address; purchaser: Address; seqStart: bigint; count: number; venue: Address; quoteMint: Address; tokensBought: bigint;\n/** Quote token the venue charged for the whole batch. */\nquoteDebit: bigint;\n/** Lamports the venue call itself spent, which is venue account rent. */\nnativeDebit: bigint; vrfNativeDebit: bigint; totalNativeDebit: bigint;\n/** `vault - reserved` before this purchase, the snapshot settlement uses. */\nfreeSnapshot: bigint;\n/** What this purchase added to `pool.reserved`. */\nreserved: bigint;\n/**\n * The first pack's table. Later packs' tables follow from the outcomes\n * before them.\n */\nfirstPrizes: Array<Prize>; };\n\nexport type PacksBoughtEventArgs = { pool: Address; draw: Address; purchaser: Address; seqStart: number | bigint; count: number; venue: Address; quoteMint: Address; tokensBought: number | bigint;\n/** Quote token the venue charged for the whole batch. */\nquoteDebit: number | bigint;\n/** Lamports the venue call itself spent, which is venue account rent. */\nnativeDebit: number | bigint; vrfNativeDebit: number | bigint; totalNativeDebit: number | bigint;\n/** `vault - reserved` before this purchase, the snapshot settlement uses. */\nfreeSnapshot: number | bigint;\n/** What this purchase added to `pool.reserved`. */\nreserved: number | bigint;\n/**\n * The first pack's table. Later packs' tables follow from the outcomes\n * before them.\n */\nfirstPrizes: Array<PrizeArgs>; };\n\n/** Gets the encoder for {@link PacksBoughtEventArgs} event data. */\nexport function getPacksBoughtEventEncoder(): FixedSizeEncoder<PacksBoughtEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['draw', getAddressEncoder()], ['purchaser', getAddressEncoder()], ['seqStart', getU64Encoder()], ['count', getU8Encoder()], ['venue', getAddressEncoder()], ['quoteMint', getAddressEncoder()], ['tokensBought', getU64Encoder()], ['quoteDebit', getU64Encoder()], ['nativeDebit', getU64Encoder()], ['vrfNativeDebit', getU64Encoder()], ['totalNativeDebit', getU64Encoder()], ['freeSnapshot', getU64Encoder()], ['reserved', getU64Encoder()], ['firstPrizes', getArrayEncoder(getPrizeEncoder(), { size: 8 })]]), [getConstantEncoder(PACKS_BOUGHT_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link PacksBoughtEvent} event data. */\nexport function getPacksBoughtEventDecoder(): FixedSizeDecoder<PacksBoughtEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['draw', getAddressDecoder()], ['purchaser', getAddressDecoder()], ['seqStart', getU64Decoder()], ['count', getU8Decoder()], ['venue', getAddressDecoder()], ['quoteMint', getAddressDecoder()], ['tokensBought', getU64Decoder()], ['quoteDebit', getU64Decoder()], ['nativeDebit', getU64Decoder()], ['vrfNativeDebit', getU64Decoder()], ['totalNativeDebit', getU64Decoder()], ['freeSnapshot', getU64Decoder()], ['reserved', getU64Decoder()], ['firstPrizes', getArrayDecoder(getPrizeDecoder(), { size: 8 })]]), [getConstantDecoder(PACKS_BOUGHT_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link PacksBoughtEvent} event data. */\nexport function getPacksBoughtEventCodec(): FixedSizeCodec<PacksBoughtEventArgs, PacksBoughtEvent> {\n return combineCodec(getPacksBoughtEventEncoder(), getPacksBoughtEventDecoder());\n}\n\n/** Parses the provided bytes into {@link PacksBoughtEvent} event data. */\nexport function parsePacksBoughtEvent(data: ReadonlyUint8Array | Uint8Array): PacksBoughtEvent {\n if (containsBytes(data, PACKS_BOUGHT_EVENT_DISCRIMINATOR, 0)) { return getPacksBoughtEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"PacksBoughtEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixEncoderSize, getAddressDecoder, getAddressEncoder, getArrayDecoder, getArrayEncoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\nimport { getTierDecoder, getTierEncoder, type Tier, type TierArgs } from '../types';\n\nexport const POOL_CREATED_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([202, 44, 41, 88, 104, 220, 157, 82]);\n\nexport function getPoolCreatedEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(POOL_CREATED_EVENT_DISCRIMINATOR); }\n\nexport type PoolCreatedEvent = { pool: Address; mint: Address; creator: Address; packTokens: bigint; tiers: Array<Tier>; seedTokens: bigint; extraSeedTokens: bigint; quoteMint: Address;\n/** Quote token the seed buy spent. */\nseedQuoteAmount: bigint;\n/** Lamports the seed buy spent, which is venue account rent, not price. */\nseedNativeDebit: bigint; };\n\nexport type PoolCreatedEventArgs = { pool: Address; mint: Address; creator: Address; packTokens: number | bigint; tiers: Array<TierArgs>; seedTokens: number | bigint; extraSeedTokens: number | bigint; quoteMint: Address;\n/** Quote token the seed buy spent. */\nseedQuoteAmount: number | bigint;\n/** Lamports the seed buy spent, which is venue account rent, not price. */\nseedNativeDebit: number | bigint; };\n\n/** Gets the encoder for {@link PoolCreatedEventArgs} event data. */\nexport function getPoolCreatedEventEncoder(): FixedSizeEncoder<PoolCreatedEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['mint', getAddressEncoder()], ['creator', getAddressEncoder()], ['packTokens', getU64Encoder()], ['tiers', getArrayEncoder(getTierEncoder(), { size: 8 })], ['seedTokens', getU64Encoder()], ['extraSeedTokens', getU64Encoder()], ['quoteMint', getAddressEncoder()], ['seedQuoteAmount', getU64Encoder()], ['seedNativeDebit', getU64Encoder()]]), [getConstantEncoder(POOL_CREATED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link PoolCreatedEvent} event data. */\nexport function getPoolCreatedEventDecoder(): FixedSizeDecoder<PoolCreatedEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['mint', getAddressDecoder()], ['creator', getAddressDecoder()], ['packTokens', getU64Decoder()], ['tiers', getArrayDecoder(getTierDecoder(), { size: 8 })], ['seedTokens', getU64Decoder()], ['extraSeedTokens', getU64Decoder()], ['quoteMint', getAddressDecoder()], ['seedQuoteAmount', getU64Decoder()], ['seedNativeDebit', getU64Decoder()]]), [getConstantDecoder(POOL_CREATED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link PoolCreatedEvent} event data. */\nexport function getPoolCreatedEventCodec(): FixedSizeCodec<PoolCreatedEventArgs, PoolCreatedEvent> {\n return combineCodec(getPoolCreatedEventEncoder(), getPoolCreatedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link PoolCreatedEvent} event data. */\nexport function parsePoolCreatedEvent(data: ReadonlyUint8Array | Uint8Array): PoolCreatedEvent {\n if (containsBytes(data, POOL_CREATED_EVENT_DISCRIMINATOR, 0)) { return getPoolCreatedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"PoolCreatedEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const PRIZE_CLAIMED_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([213, 150, 192, 76, 199, 33, 212, 38]);\n\nexport function getPrizeClaimedEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(PRIZE_CLAIMED_EVENT_DISCRIMINATOR); }\n\nexport type PrizeClaimedEvent = { pool: Address; draw: Address; purchaser: Address; amount: bigint; payer: Address; destination: Address; };\n\nexport type PrizeClaimedEventArgs = { pool: Address; draw: Address; purchaser: Address; amount: number | bigint; payer: Address; destination: Address; };\n\n/** Gets the encoder for {@link PrizeClaimedEventArgs} event data. */\nexport function getPrizeClaimedEventEncoder(): FixedSizeEncoder<PrizeClaimedEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['draw', getAddressEncoder()], ['purchaser', getAddressEncoder()], ['amount', getU64Encoder()], ['payer', getAddressEncoder()], ['destination', getAddressEncoder()]]), [getConstantEncoder(PRIZE_CLAIMED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link PrizeClaimedEvent} event data. */\nexport function getPrizeClaimedEventDecoder(): FixedSizeDecoder<PrizeClaimedEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['draw', getAddressDecoder()], ['purchaser', getAddressDecoder()], ['amount', getU64Decoder()], ['payer', getAddressDecoder()], ['destination', getAddressDecoder()]]), [getConstantDecoder(PRIZE_CLAIMED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link PrizeClaimedEvent} event data. */\nexport function getPrizeClaimedEventCodec(): FixedSizeCodec<PrizeClaimedEventArgs, PrizeClaimedEvent> {\n return combineCodec(getPrizeClaimedEventEncoder(), getPrizeClaimedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link PrizeClaimedEvent} event data. */\nexport function parsePrizeClaimedEvent(data: ReadonlyUint8Array | Uint8Array): PrizeClaimedEvent {\n if (containsBytes(data, PRIZE_CLAIMED_EVENT_DISCRIMINATOR, 0)) { return getPrizeClaimedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"PrizeClaimedEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const PRIZES_FUNDED_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([188, 129, 185, 44, 234, 71, 53, 60]);\n\nexport function getPrizesFundedEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(PRIZES_FUNDED_EVENT_DISCRIMINATOR); }\n\nexport type PrizesFundedEvent = { pool: Address; funder: Address; amount: bigint; };\n\nexport type PrizesFundedEventArgs = { pool: Address; funder: Address; amount: number | bigint; };\n\n/** Gets the encoder for {@link PrizesFundedEventArgs} event data. */\nexport function getPrizesFundedEventEncoder(): FixedSizeEncoder<PrizesFundedEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['funder', getAddressEncoder()], ['amount', getU64Encoder()]]), [getConstantEncoder(PRIZES_FUNDED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link PrizesFundedEvent} event data. */\nexport function getPrizesFundedEventDecoder(): FixedSizeDecoder<PrizesFundedEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['funder', getAddressDecoder()], ['amount', getU64Decoder()]]), [getConstantDecoder(PRIZES_FUNDED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link PrizesFundedEvent} event data. */\nexport function getPrizesFundedEventCodec(): FixedSizeCodec<PrizesFundedEventArgs, PrizesFundedEvent> {\n return combineCodec(getPrizesFundedEventEncoder(), getPrizesFundedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link PrizesFundedEvent} event data. */\nexport function parsePrizesFundedEvent(data: ReadonlyUint8Array | Uint8Array): PrizesFundedEvent {\n if (containsBytes(data, PRIZES_FUNDED_EVENT_DISCRIMINATOR, 0)) { return getPrizesFundedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"PrizesFundedEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, getU8Decoder, getU8Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([243, 30, 148, 22, 14, 127, 52, 140]);\n\nexport function getRandomnessRetriedEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR); }\n\nexport type RandomnessRetriedEvent = { pool: Address; draw: Address; seqStart: bigint; attempt: number; };\n\nexport type RandomnessRetriedEventArgs = { pool: Address; draw: Address; seqStart: number | bigint; attempt: number; };\n\n/** Gets the encoder for {@link RandomnessRetriedEventArgs} event data. */\nexport function getRandomnessRetriedEventEncoder(): FixedSizeEncoder<RandomnessRetriedEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['draw', getAddressEncoder()], ['seqStart', getU64Encoder()], ['attempt', getU8Encoder()]]), [getConstantEncoder(RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link RandomnessRetriedEvent} event data. */\nexport function getRandomnessRetriedEventDecoder(): FixedSizeDecoder<RandomnessRetriedEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['draw', getAddressDecoder()], ['seqStart', getU64Decoder()], ['attempt', getU8Decoder()]]), [getConstantDecoder(RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link RandomnessRetriedEvent} event data. */\nexport function getRandomnessRetriedEventCodec(): FixedSizeCodec<RandomnessRetriedEventArgs, RandomnessRetriedEvent> {\n return combineCodec(getRandomnessRetriedEventEncoder(), getRandomnessRetriedEventDecoder());\n}\n\n/** Parses the provided bytes into {@link RandomnessRetriedEvent} event data. */\nexport function parseRandomnessRetriedEvent(data: ReadonlyUint8Array | Uint8Array): RandomnessRetriedEvent {\n if (containsBytes(data, RANDOMNESS_RETRIED_EVENT_DISCRIMINATOR, 0)) { return getRandomnessRetriedEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"RandomnessRetriedEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { combineCodec, containsBytes, fixEncoderSize, getAddressDecoder, getAddressEncoder, getBytesEncoder, getConstantDecoder, getConstantEncoder, getHiddenPrefixDecoder, getHiddenPrefixEncoder, getStructDecoder, getStructEncoder, getU64Decoder, getU64Encoder, type Address, type FixedSizeCodec, type FixedSizeDecoder, type FixedSizeEncoder, type ReadonlyUint8Array } from '@solana/kit';\n\nexport const TOKENS_SOLD_EVENT_DISCRIMINATOR: ReadonlyUint8Array = new Uint8Array([217, 83, 68, 137, 134, 225, 94, 45]);\n\nexport function getTokensSoldEventDiscriminatorBytes(): ReadonlyUint8Array { return fixEncoderSize(getBytesEncoder(), 8).encode(TOKENS_SOLD_EVENT_DISCRIMINATOR); }\n\nexport type TokensSoldEvent = { pool: Address; seller: Address; venue: Address; quoteMint: Address; amount: bigint; quoteProceeds: bigint; nativeDebit: bigint; };\n\nexport type TokensSoldEventArgs = { pool: Address; seller: Address; venue: Address; quoteMint: Address; amount: number | bigint; quoteProceeds: number | bigint; nativeDebit: number | bigint; };\n\n/** Gets the encoder for {@link TokensSoldEventArgs} event data. */\nexport function getTokensSoldEventEncoder(): FixedSizeEncoder<TokensSoldEventArgs> {\n return getHiddenPrefixEncoder(getStructEncoder([['pool', getAddressEncoder()], ['seller', getAddressEncoder()], ['venue', getAddressEncoder()], ['quoteMint', getAddressEncoder()], ['amount', getU64Encoder()], ['quoteProceeds', getU64Encoder()], ['nativeDebit', getU64Encoder()]]), [getConstantEncoder(TOKENS_SOLD_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the decoder for {@link TokensSoldEvent} event data. */\nexport function getTokensSoldEventDecoder(): FixedSizeDecoder<TokensSoldEvent> {\n return getHiddenPrefixDecoder(getStructDecoder([['pool', getAddressDecoder()], ['seller', getAddressDecoder()], ['venue', getAddressDecoder()], ['quoteMint', getAddressDecoder()], ['amount', getU64Decoder()], ['quoteProceeds', getU64Decoder()], ['nativeDebit', getU64Decoder()]]), [getConstantDecoder(TOKENS_SOLD_EVENT_DISCRIMINATOR)]);\n}\n\n/** Gets the codec for {@link TokensSoldEvent} event data. */\nexport function getTokensSoldEventCodec(): FixedSizeCodec<TokensSoldEventArgs, TokensSoldEvent> {\n return combineCodec(getTokensSoldEventEncoder(), getTokensSoldEventDecoder());\n}\n\n/** Parses the provided bytes into {@link TokensSoldEvent} event data. */\nexport function parseTokensSoldEvent(data: ReadonlyUint8Array | Uint8Array): TokensSoldEvent {\n if (containsBytes(data, TOKENS_SOLD_EVENT_DISCRIMINATOR, 0)) { return getTokensSoldEventDecoder().decode(data); }\n throw new Error('The provided data does not match the \"TokensSoldEvent\" event discriminators.');\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nimport { isProgramError, type Address, type SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM, type SolanaError } from '@solana/kit';\nimport { GABOX_PROGRAM_ADDRESS } from '../programs';\n\n/** Arithmetic: Arithmetic overflow or inconsistent accounting */\nexport const GABOX_ERROR__ARITHMETIC = 0x1770; // 6000\n/** InvalidDistribution: Invalid prize distribution */\nexport const GABOX_ERROR__INVALID_DISTRIBUTION = 0x1771; // 6001\n/** UnfundedExpectation: Expected token award exceeds tokens purchased */\nexport const GABOX_ERROR__UNFUNDED_EXPECTATION = 0x1772; // 6002\n/** UnsupportedMint: Mint must have 6 decimals and no mint or freeze authority */\nexport const GABOX_ERROR__UNSUPPORTED_MINT = 0x1773; // 6003\n/** InsolventInventory: Prize inventory does not cover reservations */\nexport const GABOX_ERROR__INSOLVENT_INVENTORY = 0x1774; // 6004\n/** PrizeCapChanged: Top prize is below the signed minimum; refresh the offer */\nexport const GABOX_ERROR__PRIZE_CAP_CHANGED = 0x1775; // 6005\n/** PackTooSmall: A pack pays zero tokens on some tier */\nexport const GABOX_ERROR__PACK_TOO_SMALL = 0x1776; // 6006\n/** JackpotBelowOnePack: The largest tier must pay at least one pack */\nexport const GABOX_ERROR__JACKPOT_BELOW_ONE_PACK = 0x1777; // 6007\n/** InvalidVenue: Incorrect trade program, account order, or token binding */\nexport const GABOX_ERROR__INVALID_VENUE = 0x1778; // 6008\n/** IncorrectTokenDelta: Trade did not move the exact token amount */\nexport const GABOX_ERROR__INCORRECT_TOKEN_DELTA = 0x1779; // 6009\n/** SlippageExceeded: Spend exceeds the signed limit */\nexport const GABOX_ERROR__SLIPPAGE_EXCEEDED = 0x177a; // 6010\n/** RetryTooSoon: Retry interval has not elapsed */\nexport const GABOX_ERROR__RETRY_TOO_SOON = 0x177b; // 6011\n/** RetryUnavailable: Retry limit reached or draw expired */\nexport const GABOX_ERROR__RETRY_UNAVAILABLE = 0x177c; // 6012\n/** NotExpired: Oracle timeout has not elapsed */\nexport const GABOX_ERROR__NOT_EXPIRED = 0x177d; // 6013\n/** ZeroAmount: Amount must be positive */\nexport const GABOX_ERROR__ZERO_AMOUNT = 0x177e; // 6014\n/** InvalidLaunch: LaunchLab create instruction is malformed or missing before this instruction */\nexport const GABOX_ERROR__INVALID_LAUNCH = 0x177f; // 6015\n/** InvalidQuote: Quote mint or quote token program is unsupported */\nexport const GABOX_ERROR__INVALID_QUOTE = 0x1780; // 6016\n/** WalletActivityMismatch: Wallet activity account belongs to a different wallet */\nexport const GABOX_ERROR__WALLET_ACTIVITY_MISMATCH = 0x1781; // 6017\n/** TooManyPacks: A purchase opens at most MAX_BATCH_SIZE packs */\nexport const GABOX_ERROR__TOO_MANY_PACKS = 0x1782; // 6018\n/** DrawAlreadySettled: The draw's outcome is already fixed */\nexport const GABOX_ERROR__DRAW_ALREADY_SETTLED = 0x1783; // 6019\n/** DrawNotSettled: The draw's outcome is not fixed yet */\nexport const GABOX_ERROR__DRAW_NOT_SETTLED = 0x1784; // 6020\n/** DrawExpired: Delivery is closed for this draw; only expiry remains */\nexport const GABOX_ERROR__DRAW_EXPIRED = 0x1785; // 6021\n/** WrongDraw: The callback's sequence number does not match this draw */\nexport const GABOX_ERROR__WRONG_DRAW = 0x1786; // 6022\n/** WrongTokenAccount: Not the purchaser's coin account */\nexport const GABOX_ERROR__WRONG_TOKEN_ACCOUNT = 0x1787; // 6023\n/** WrongDestination: The destination must be the purchaser's own account for this coin */\nexport const GABOX_ERROR__WRONG_DESTINATION = 0x1788; // 6024\n\nexport type GaboxError = typeof GABOX_ERROR__ARITHMETIC | typeof GABOX_ERROR__DRAW_ALREADY_SETTLED | typeof GABOX_ERROR__DRAW_EXPIRED | typeof GABOX_ERROR__DRAW_NOT_SETTLED | typeof GABOX_ERROR__INCORRECT_TOKEN_DELTA | typeof GABOX_ERROR__INSOLVENT_INVENTORY | typeof GABOX_ERROR__INVALID_DISTRIBUTION | typeof GABOX_ERROR__INVALID_LAUNCH | typeof GABOX_ERROR__INVALID_QUOTE | typeof GABOX_ERROR__INVALID_VENUE | typeof GABOX_ERROR__JACKPOT_BELOW_ONE_PACK | typeof GABOX_ERROR__NOT_EXPIRED | typeof GABOX_ERROR__PACK_TOO_SMALL | typeof GABOX_ERROR__PRIZE_CAP_CHANGED | typeof GABOX_ERROR__RETRY_TOO_SOON | typeof GABOX_ERROR__RETRY_UNAVAILABLE | typeof GABOX_ERROR__SLIPPAGE_EXCEEDED | typeof GABOX_ERROR__TOO_MANY_PACKS | typeof GABOX_ERROR__UNFUNDED_EXPECTATION | typeof GABOX_ERROR__UNSUPPORTED_MINT | typeof GABOX_ERROR__WALLET_ACTIVITY_MISMATCH | typeof GABOX_ERROR__WRONG_DESTINATION | typeof GABOX_ERROR__WRONG_DRAW | typeof GABOX_ERROR__WRONG_TOKEN_ACCOUNT | typeof GABOX_ERROR__ZERO_AMOUNT;\n\nlet gaboxErrorMessages: Record<GaboxError, string> | undefined;\nif (process.env['NODE_ENV'] !== 'production') {\n gaboxErrorMessages = { [GABOX_ERROR__ARITHMETIC]: `Arithmetic overflow or inconsistent accounting`, [GABOX_ERROR__DRAW_ALREADY_SETTLED]: `The draw's outcome is already fixed`, [GABOX_ERROR__DRAW_EXPIRED]: `Delivery is closed for this draw; only expiry remains`, [GABOX_ERROR__DRAW_NOT_SETTLED]: `The draw's outcome is not fixed yet`, [GABOX_ERROR__INCORRECT_TOKEN_DELTA]: `Trade did not move the exact token amount`, [GABOX_ERROR__INSOLVENT_INVENTORY]: `Prize inventory does not cover reservations`, [GABOX_ERROR__INVALID_DISTRIBUTION]: `Invalid prize distribution`, [GABOX_ERROR__INVALID_LAUNCH]: `LaunchLab create instruction is malformed or missing before this instruction`, [GABOX_ERROR__INVALID_QUOTE]: `Quote mint or quote token program is unsupported`, [GABOX_ERROR__INVALID_VENUE]: `Incorrect trade program, account order, or token binding`, [GABOX_ERROR__JACKPOT_BELOW_ONE_PACK]: `The largest tier must pay at least one pack`, [GABOX_ERROR__NOT_EXPIRED]: `Oracle timeout has not elapsed`, [GABOX_ERROR__PACK_TOO_SMALL]: `A pack pays zero tokens on some tier`, [GABOX_ERROR__PRIZE_CAP_CHANGED]: `Top prize is below the signed minimum; refresh the offer`, [GABOX_ERROR__RETRY_TOO_SOON]: `Retry interval has not elapsed`, [GABOX_ERROR__RETRY_UNAVAILABLE]: `Retry limit reached or draw expired`, [GABOX_ERROR__SLIPPAGE_EXCEEDED]: `Spend exceeds the signed limit`, [GABOX_ERROR__TOO_MANY_PACKS]: `A purchase opens at most MAX_BATCH_SIZE packs`, [GABOX_ERROR__UNFUNDED_EXPECTATION]: `Expected token award exceeds tokens purchased`, [GABOX_ERROR__UNSUPPORTED_MINT]: `Mint must have 6 decimals and no mint or freeze authority`, [GABOX_ERROR__WALLET_ACTIVITY_MISMATCH]: `Wallet activity account belongs to a different wallet`, [GABOX_ERROR__WRONG_DESTINATION]: `The destination must be the purchaser's own account for this coin`, [GABOX_ERROR__WRONG_DRAW]: `The callback's sequence number does not match this draw`, [GABOX_ERROR__WRONG_TOKEN_ACCOUNT]: `Not the purchaser's coin account`, [GABOX_ERROR__ZERO_AMOUNT]: `Amount must be positive` };\n}\n\nexport function getGaboxErrorMessage(code: GaboxError): string {\n if (process.env['NODE_ENV'] !== 'production') {\n return (gaboxErrorMessages as Record<GaboxError, string>)[code];\n }\n\n return 'Error message not available in production bundles.';\n}\n\nexport function isGaboxError<TProgramErrorCode extends GaboxError>(\n error: unknown,\n transactionMessage: { instructions: Record<number, { programAddress: Address }> },\n code?: TProgramErrorCode,\n): error is SolanaError<typeof SOLANA_ERROR__INSTRUCTION_ERROR__CUSTOM> & Readonly<{ context: Readonly<{ code: TProgramErrorCode }> }> {\n return isProgramError<TProgramErrorCode>(error, transactionMessage, GABOX_PROGRAM_ADDRESS, code);\n}","/**\n * This code was AUTOGENERATED using the Codama library.\n * Please DO NOT EDIT THIS FILE, instead use visitors\n * to add features, then rerun Codama to update it.\n *\n * @see https://github.com/codama-idl/codama\n */\n\nexport * from './accounts';\nexport * from './errors';\nexport * from './events';\nexport * from './instructions';\nexport * from './pdas';\nexport * from './programs';\nexport * from './types';"],"mappings":";;;;;;;;;;;AAkBA,SAAgB,uBAAyD;CACrE,OAAO,iBAAiB,CAAC,CAAC,QAAQ,aAAa,CAAC,GAAG,CAAC,UAAU,cAAc,CAAC,CAAC,CAAC;AACnF;AAEA,SAAgB,uBAAqD;CACjE,OAAO,iBAAiB,CAAC,CAAC,QAAQ,aAAa,CAAC,GAAG,CAAC,UAAU,cAAc,CAAC,CAAC,CAAC;AACnF;AAEA,SAAgB,qBAAiE;CAC7E,OAAO,aAAa,qBAAqB,GAAG,qBAAqB,CAAC;AACtE;;;;;;;;;;ACdA,SAAgB,kBAA+C;CAC3D,OAAO,iBAAiB,CAAC,CAAC,UAAU,cAAc,CAAC,GAAG,CAAC,WAAW,cAAc,CAAC,CAAC,CAAC;AACvF;AAEA,SAAgB,kBAA2C;CACvD,OAAO,iBAAiB,CAAC,CAAC,UAAU,cAAc,CAAC,GAAG,CAAC,WAAW,cAAc,CAAC,CAAC,CAAC;AACvF;AAEA,SAAgB,gBAAkD;CAC9D,OAAO,aAAa,gBAAgB,GAAG,gBAAgB,CAAC;AAC5D;;;;;;;;;;ACbA,MAAa,oCAAwD,IAAI,WAAW;CAAC;CAAK;CAAK;CAAI;CAAK;CAAK;CAAI;CAAK;AAAG,CAAC;AAE1H,SAAgB,yCAA6D;CAAE,OAAO,eAAe,gBAAgB,GAAG,CAAC,CAAC,CAAC,OAAO,iCAAiC;AAAG;;AAiBtK,SAAgB,8BAA8D;CAC1E,OAAO,uBAAuB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;AAEhD,MAAa,iCAAiC;AAI9C,IAAI;AACJ,IAAI,QAAQ,IAAI,gBAAgB,cAC9B,qBAAqB;EAAG,0BAA0B;EAAmD,oCAAoC;EAAwC,4BAA4B;EAA0D,gCAAgC;EAAwC,qCAAqC;EAA8C,mCAAmC;EAAgD,oCAAoC;EAA+B,8BAA8B;EAAiF,6BAA6B;EAAqD,6BAA6B;EAA6D,sCAAsC;EAAgD,2BAA2B;EAAmC,8BAA8B;EAAyC,iCAAiC;EAA6D,8BAA8B;EAAmC,iCAAiC;EAAwC,iCAAiC;EAAmC,8BAA8B;EAAkD,oCAAoC;EAAkD,gCAAgC;EAA8D,wCAAwC;EAA0D,iCAAiC;EAAsE,0BAA0B;EAA4D,mCAAmC;EAAqC,2BAA2B;AAA0B;AAG5/D,SAAgB,qBAAqB,MAA0B;CAC7D,IAAI,QAAQ,IAAI,gBAAgB,cAC9B,OAAQ,mBAAkD;CAG5D,OAAO;AACT;AAEA,SAAgB,aACZ,OACA,oBACA,MACmI;CACrI,OAAO,eAAkC,OAAO,oBAAoB,uBAAuB,IAAI;AACjG"}
@@ -229,6 +229,10 @@ declare const LAUNCHLAB_SELL_EXACT_IN: VenueInstructionAbi;
229
229
  * `claim_creator_fee` on `LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj` — not in interfaces.json (the program never builds it).
230
230
  */
231
231
  declare const LAUNCHLAB_CLAIM_CREATOR_FEE: VenueInstructionAbi;
232
+ /**
233
+ * `claim_platform_fee_from_vault` on `LanMV9sAd7wArD4vJFi2qDdfnVhFxYSUg6eADduJ3uj` — not in interfaces.json (the program never builds it).
234
+ */
235
+ declare const LAUNCHLAB_CLAIM_PLATFORM_FEE_FROM_VAULT: VenueInstructionAbi;
232
236
  /**
233
237
  * `swap_base_output` on `CPMMoo8L3F4NbTegBCKVNunggL7H1ZpdTHKxQB5qKP1C` — cross-checked against interfaces.json.
234
238
  */
@@ -245,8 +249,22 @@ declare const CPMM_SWAP_BASE_INPUT: VenueInstructionAbi;
245
249
  declare const CPMM_COLLECT_CREATOR_FEE: VenueInstructionAbi;
246
250
  //#endregion
247
251
  //#region src/raydium/ids.d.ts
252
+ /**
253
+ * Raydium's liquidity lock program and its authority, per cluster.
254
+ *
255
+ * LaunchLab locks every graduated pool's LP under this program and mints one fee NFT to the
256
+ * platform NFT wallet. The Gabox program never calls it, so these two addresses are not in the Rust
257
+ * `ids.rs` and are typed here instead. Verified 2026-09-19: the devnet migration of a Gabox coin
258
+ * called the devnet program below, and `test/raydium-pdas.test.ts` derives both authorities.
259
+ */
260
+ type LockIds = {
261
+ /** The lock program. `collect_cp_fees` on it pays the fee NFT holder. */
262
+ lock: Address;
263
+ /** `["lock_cp_authority_seed"]` under `lock`. It owns the vault that holds the locked LP. */
264
+ lockAuthority: Address;
265
+ };
248
266
  /** The name the rest of the SDK uses for one cluster's Raydium deployment. */
249
- type RaydiumIds = RaydiumClusterIds;
267
+ type RaydiumIds = RaydiumClusterIds & LockIds;
250
268
  /**
251
269
  * The decimals every Gabox coin is launched with. `venue/launch.rs` refuses any other value, and
252
270
  * `tokens.rs` refuses a pool mint that does not have exactly this many.
@@ -278,6 +296,8 @@ declare const LAUNCHLAB_SEEDS: {
278
296
  readonly vault: "pool_vault";
279
297
  /** `["creator_fee_vault_auth_seed"]`, the authority over every creator fee vault. */
280
298
  readonly creatorFeeVaultAuthority: "creator_fee_vault_auth_seed";
299
+ /** `["platform_fee_vault_auth_seed"]`, the authority over every platform fee vault. */
300
+ readonly platformFeeVaultAuthority: "platform_fee_vault_auth_seed";
281
301
  };
282
302
  /** CPMM's PDA seeds. */
283
303
  declare const CPMM_SEEDS: {
@@ -292,6 +312,15 @@ declare const CPMM_SEEDS: {
292
312
  /** `["creator_fee_share", creator, amm_config]`. */
293
313
  readonly creatorFeeShare: "creator_fee_share";
294
314
  };
315
+ /** The SPL Memo program. The lock program's `collect_cp_fees` lists it and never writes to it. */
316
+ declare const MEMO_PROGRAM_ADDRESS: Address;
317
+ /** The lock program's PDA seeds. */
318
+ declare const LOCK_SEEDS: {
319
+ /** `["lock_cp_authority_seed"]`. */
320
+ readonly authority: "lock_cp_authority_seed";
321
+ /** `["locked_liquidity", fee_nft_mint]`. One record per locked position. */
322
+ readonly lockedLiquidity: "locked_liquidity";
323
+ };
295
324
  /** Metaplex's metadata PDA seed: `["metadata", metaplex, mint]`. */
296
325
  declare const METADATA_SEED = "metadata";
297
326
  /**
@@ -436,6 +465,8 @@ type CpmmPoolState = {
436
465
  poolCreator: Address;
437
466
  token0Vault: Address;
438
467
  token1Vault: Address;
468
+ /** The LP token. A graduated coin's LP is locked, and its fee NFT holder harvests the fees. */
469
+ lpMint: Address;
439
470
  token0Mint: Address;
440
471
  token1Mint: Address;
441
472
  token0Program: Address;
@@ -443,6 +474,8 @@ type CpmmPoolState = {
443
474
  observationKey: Address;
444
475
  /** Bit flags. Bit 2 set (value 4) means swaps are switched off. */
445
476
  status: number;
477
+ /** LP tokens in circulation. The pool keeps this equal to the LP mint's supply. */
478
+ lpSupply: bigint;
446
479
  mint0Decimals: number;
447
480
  mint1Decimals: number;
448
481
  /** Fees the pool owes and a swap must not spend. Subtract them from the vault balances. */
@@ -491,6 +524,36 @@ type CpmmAmmConfig = {
491
524
  };
492
525
  declare const CPMM_AMM_CONFIG_HEAD_SIZE = 116;
493
526
  declare function decodeCpmmAmmConfig(data: Uint8Array): CpmmAmmConfig;
527
+ /**
528
+ * One locked CPMM position, as Raydium's lock program records it.
529
+ *
530
+ * LaunchLab locks a graduated pool's LP here and mints one fee NFT for it. Whoever holds the NFT
531
+ * harvests the fees. Layout from `LockedCpLiquidityState` in the `pinocchio-raydium-locking-program`
532
+ * crate, checked against a devnet record on 2026-09-19: six numbers, four addresses, then padding.
533
+ */
534
+ type LockedCpLiquidity = {
535
+ /** LP tokens still locked. A harvest withdraws some of them and lowers this. */
536
+ lockedLpAmount: bigint;
537
+ /** LP tokens every past harvest withdrew, in total. */
538
+ claimedLpAmount: bigint;
539
+ unclaimedLpAmount: bigint;
540
+ /** The LP supply at the last checkpoint: the lock itself, or the last harvest. */
541
+ lastLp: bigint;
542
+ /** The pool's `x * y` at that checkpoint, on the balances that belong to LPs. */
543
+ lastK: bigint;
544
+ recentEpoch: bigint;
545
+ /** The CPMM pool the LP belongs to. */
546
+ poolId: Address;
547
+ /** The NFT whose holder may harvest. */
548
+ feeNftMint: Address;
549
+ lockedOwner: Address;
550
+ lockedLpMint: Address;
551
+ };
552
+ /** `sha256("account:LockedCpLiquidityState")[0..8]`. */
553
+ declare const LOCKED_CP_LIQUIDITY_DISCRIMINATOR: Uint8Array<ArrayBuffer>;
554
+ /** Six numbers and four addresses after the discriminator. The account itself is 256 bytes. */
555
+ declare const LOCKED_CP_LIQUIDITY_HEAD_SIZE: number;
556
+ declare function decodeLockedCpLiquidity(data: Uint8Array): LockedCpLiquidity;
494
557
  //#endregion
495
558
  //#region src/raydium/curve.d.ts
496
559
  /**
@@ -1054,6 +1117,11 @@ declare const platformFeeVaultAddress: (launchlab: Address, platformConfig: Addr
1054
1117
  declare const creatorFeeVaultAddress: (launchlab: Address, creator: Address, quoteMint: Address) => Promise<Address>;
1055
1118
  /** `["creator_fee_vault_auth_seed"]`. The authority `claim_creator_fee` signs the payout with. */
1056
1119
  declare const creatorFeeVaultAuthority: (launchlab: Address) => Promise<Address>;
1120
+ /**
1121
+ * `["platform_fee_vault_auth_seed"]`. The authority `claim_platform_fee_from_vault` signs the
1122
+ * payout with.
1123
+ */
1124
+ declare const platformFeeVaultAuthority: (launchlab: Address) => Promise<Address>;
1057
1125
  /** `["metadata", metaplex, mint]` under Metaplex. LaunchLab's create instruction writes it. */
1058
1126
  declare const metadataAddress: (mint: Address) => Promise<Address>;
1059
1127
  /** `["vault_and_lp_mint_auth_seed"]`. */
@@ -1080,9 +1148,126 @@ declare const cpmmPoolAddress: (cpmm: Address, ammConfig: Address, mintA: Addres
1080
1148
  * (3005) when it is missing. One account per creator per fee tier, not one per pool.
1081
1149
  */
1082
1150
  declare const cpmmCreatorFeeShare: (cpmm: Address, creator: Address, ammConfig: Address) => Promise<Address>;
1151
+ /** `["lock_cp_authority_seed"]`. The lock program's authority, which owns every locked LP vault. */
1152
+ declare const lockAuthority: (lock: Address) => Promise<Address>;
1153
+ /**
1154
+ * `["locked_liquidity", fee_nft_mint]`. The record of one locked position: which pool, how much LP,
1155
+ * and the checkpoint the next fee harvest is measured from.
1156
+ */
1157
+ declare const lockedLiquidityAddress: (lock: Address, feeNftMint: Address) => Promise<Address>;
1083
1158
  /** An associated token account. Off-curve owners are allowed: pool PDAs are all off-curve. */
1084
1159
  declare const ata: (owner: Address, mint: Address, tokenProgram?: Address) => Promise<Address>;
1085
1160
  //#endregion
1161
+ //#region src/raydium/platform.d.ts
1162
+ /**
1163
+ * The instructions of a platform fee claim, for one quote asset: create the quote account, claim,
1164
+ * and close it again when the quote is WSOL.
1165
+ *
1166
+ * This sweeps **every** coin launched against that quote, because LaunchLab keeps one platform
1167
+ * vault per quote asset. `feeWallet` must be the wallet the platform config names, or LaunchLab
1168
+ * refuses the claim.
1169
+ */
1170
+ declare function getClaimPlatformFeeInstructions(feeWallet: TransactionSigner, ids: RaydiumIds, quote: {
1171
+ mint: Address;
1172
+ tokenProgram: Address;
1173
+ }): Promise<Instruction[]>;
1174
+ type ClaimPlatformFeeInput = {
1175
+ /** The platform fee wallet. It signs, and it receives the payout. */
1176
+ feeWallet: TransactionSigner;
1177
+ /** The quote asset to claim. Defaults to wrapped SOL. One claim per quote asset. */
1178
+ quoteMint?: Address;
1179
+ } & Partial<BuildOptions>;
1180
+ /**
1181
+ * Claim the curve platform fee for one quote asset.
1182
+ *
1183
+ * A WSOL claim arrives as SOL, because the builder closes the WSOL account. Any other quote arrives
1184
+ * as that token, in the fee wallet's own account.
1185
+ */
1186
+ declare function claimPlatformFee(client: GaboxClient, input: ClaimPlatformFeeInput): Promise<GaboxTransactionMessage>;
1187
+ /**
1188
+ * What the platform can claim from the curve right now, for one quote asset, in base units.
1189
+ *
1190
+ * `quoteMint` defaults to wrapped SOL. One vault per quote asset, so a platform with coins on two
1191
+ * quotes reads this twice. A vault that does not exist yet reads as zero.
1192
+ */
1193
+ declare function fetchPlatformFees(client: GaboxClient, input?: {
1194
+ quoteMint?: Address;
1195
+ }): Promise<{
1196
+ quoteMint: Address;
1197
+ curveQuote: bigint;
1198
+ }>;
1199
+ /**
1200
+ * `collect_cp_fees` on the lock program. There is no public IDL for it. The account list and the
1201
+ * discriminator come from Raydium's own SDK and from the `pinocchio-raydium-locking-program`
1202
+ * client crate, and the devnet harvest in `test/devnet.e2e.test.ts` runs it.
1203
+ */
1204
+ declare const LOCK_COLLECT_CP_FEES: VenueInstructionAbi;
1205
+ /** One locked CPMM position a wallet holds the fee NFT of, with what it can harvest right now. */
1206
+ type LockedPosition = {
1207
+ /** The fee NFT. Holding it is the right to harvest. */
1208
+ feeNftMint: Address;
1209
+ /** The lock program's record for this position. */
1210
+ record: Address;
1211
+ lock: LockedCpLiquidity;
1212
+ /** The CPMM pool the LP belongs to. */
1213
+ poolAddress: Address;
1214
+ pool: CpmmPoolState;
1215
+ /** The pool's balances that belong to LPs: each vault less the fees the pool still owes. */
1216
+ vault0: bigint;
1217
+ vault1: bigint;
1218
+ /** LP tokens the position may withdraw now. Zero until the pool trades. */
1219
+ claimableLp: bigint;
1220
+ /** What those LP tokens are worth in the pool's two tokens, rounded down. */
1221
+ claimableToken0: bigint;
1222
+ claimableToken1: bigint;
1223
+ };
1224
+ /**
1225
+ * The LP tokens a locked position may withdraw as fees.
1226
+ *
1227
+ * Every swap leaves its fee in the vaults, so one LP token buys a little more of the pool after
1228
+ * each trade than before it. The record keeps the pool's `x * y` and LP supply from its last
1229
+ * checkpoint. The LP tokens that still hold exactly the checkpoint's liquidity are
1230
+ * `locked * sqrt(last_k) / last_lp * supply / sqrt(k)`; everything above that is fee growth.
1231
+ *
1232
+ * The division rounds the kept part up, so the answer never claims a unit the pool does not owe.
1233
+ */
1234
+ declare function lockedFeeLp(lock: Pick<LockedCpLiquidity, 'lockedLpAmount' | 'lastLp' | 'lastK'>, pool: {
1235
+ vault0: bigint;
1236
+ vault1: bigint;
1237
+ lpSupply: bigint;
1238
+ }): bigint;
1239
+ /**
1240
+ * Every locked CPMM position `owner` holds a fee NFT for, with what each one can harvest.
1241
+ *
1242
+ * Three reads: the wallet's token accounts, then the lock record behind every NFT-shaped one, then
1243
+ * the pool and the two vaults of every record found. A token account of one unit and zero decimals
1244
+ * is not always a lock NFT, so the record decides: no record, not a position.
1245
+ */
1246
+ declare function fetchLockedPositions(client: GaboxClient, owner: Address, ids?: RaydiumIds): Promise<LockedPosition[]>;
1247
+ /**
1248
+ * The instructions of one harvest: create the two token accounts, collect, and close the WSOL one
1249
+ * when a side is WSOL.
1250
+ *
1251
+ * `feeLp` defaults to everything the position can withdraw now. The lock program refuses more than
1252
+ * that, so a caller that passes its own number keeps it at or below `position.claimableLp`.
1253
+ */
1254
+ declare function getHarvestLockedFeesInstructions(owner: TransactionSigner, ids: RaydiumIds, position: LockedPosition, feeLp?: bigint): Promise<Instruction[]>;
1255
+ type HarvestLockedFeesInput = {
1256
+ /** The wallet holding the fee NFT. It signs, and it receives both tokens. */
1257
+ owner: TransactionSigner;
1258
+ /** The position, as `fetchLockedPositions` returned it. */
1259
+ position: LockedPosition;
1260
+ /** LP tokens to withdraw. Defaults to everything harvestable now. */
1261
+ feeLp?: bigint;
1262
+ } & Partial<BuildOptions>;
1263
+ /**
1264
+ * Harvest one locked position's fees.
1265
+ *
1266
+ * A pool with WSOL on one side pays that side out as SOL, because the builder closes the WSOL
1267
+ * account. The other side arrives as that token, in the owner's own account.
1268
+ */
1269
+ declare function harvestLockedFees(client: GaboxClient, input: HarvestLockedFeesInput): Promise<GaboxTransactionMessage>;
1270
+ //#endregion
1086
1271
  //#region src/raydium/quote.d.ts
1087
1272
  /** LaunchLab's settings for one quote, and the address they were read from. */
1088
1273
  type QuoteConfig = LaunchlabGlobalConfig & {
@@ -1178,8 +1363,8 @@ type CurveBuyExactInInput = {
1178
1363
  */
1179
1364
  declare function getCurveBuyExactInInstruction(client: GaboxClient, input: CurveBuyExactInInput, ids?: RaydiumIds): Promise<Instruction>;
1180
1365
  declare namespace index_d_exports {
1181
- export { ASSOCIATED_TOKEN_PROGRAM_ADDRESS, CONSTANT_CURVE_TAG, CPMM_AMM_CONFIG_DISCRIMINATOR, CPMM_AMM_CONFIG_HEAD_SIZE, CPMM_COLLECT_CREATOR_FEE, CPMM_POOL_OFFSETS, CPMM_POOL_STATE_DISCRIMINATOR, CPMM_POOL_STATE_HEAD_SIZE, CPMM_POOL_STATE_SIZE, CPMM_SEEDS, CPMM_SWAP_BASE_INPUT, CPMM_SWAP_BASE_OUTPUT, CREATOR_FEE_ON_QUOTE, ClaimCreatorFeeInput, CollectCreatorFeeInput, CpmmAmmConfig, CpmmFeeRates, CpmmPoolState, CpmmSwapSides, CpmmTradeAccountsInput, CreatorFees, CurveBuyExactInInput, CurveFeeRates, CurveReserves, CurveSettings, FindCpmmPoolOptions, LAUNCHLAB_BUY_EXACT_IN, LAUNCHLAB_BUY_EXACT_OUT, LAUNCHLAB_CLAIM_CREATOR_FEE, LAUNCHLAB_GLOBAL_CONFIG_DISCRIMINATOR, LAUNCHLAB_GLOBAL_CONFIG_HEAD_SIZE, LAUNCHLAB_INITIALIZE, LAUNCHLAB_PLATFORM_CONFIG_DISCRIMINATOR, LAUNCHLAB_PLATFORM_CONFIG_HEAD_SIZE, LAUNCHLAB_POOL_STATE_DISCRIMINATOR, LAUNCHLAB_POOL_STATE_HEAD_SIZE, LAUNCHLAB_SEEDS, LAUNCHLAB_SELL_EXACT_IN, LAUNCHLAB_STATUS_FUND, LAUNCHLAB_STATUS_MIGRATE, LAUNCHLAB_STATUS_TRADE, LAUNCH_DECIMALS, LAUNCH_SUPPLY, LAUNCH_TOTAL_BASE_SELL, LaunchInput, LaunchParams, LaunchlabGlobalConfig, LaunchlabPlatformConfig, LaunchlabPoolState, LaunchlabTradeAccountsInput, METADATA_LIMITS, METADATA_SEED, METAPLEX_PROGRAM_ADDRESS, MIGRATE_TO_CPMM, MaybeAccount$1 as MaybeAccount, MigratedCpmmPool, PLATFORM_ADMIN, QuoteAsset, QuoteBinding, QuoteConfig, QuoteDisplay, RATE_DENOMINATOR, RAYDIUM_DEVNET_IDS, RAYDIUM_IDS, RAYDIUM_MAINNET_IDS, RENT_SYSVAR_ADDRESS, RaydiumClusterIds, RaydiumIds, ResolveVenueOptions, ResolvedVenue, SHARE_FEE_RATE, SYSTEM_PROGRAM_ADDRESS, TOKEN_2022_PROGRAM_ADDRESS, TOKEN_PROGRAM_ADDRESS, VenueAccountSpec, VenueInstructionAbi, VenueKind, WSOL_MINT, ata, ceilDiv, ceilDivRate, claimCreatorFee, collectCreatorFee, compareAddresses, cpmmAuthority, cpmmBuyAccounts, cpmmCreatorFeeShare, cpmmPoolAddress, cpmmPoolMatches, cpmmSellAccounts, cpmmSwapBaseInput, cpmmSwapBaseOutput, creatorFeeOnInput, creatorFeeVaultAddress, creatorFeeVaultAuthority, curveBuyExactIn, curveBuyExactOut, curveQuote, curveSellExactIn, decodeBase64, decodeCpmmAmmConfig, decodeCpmmPool, decodeLaunchlabGlobalConfig, decodeLaunchlabPlatformConfig, decodeLaunchlabPool, fetchCreatorFees, fetchCurveSettings, fetchQuoteAsset, fetchQuoteBinding, fetchQuoteConfig, fetchQuoteDisplay, findCpmmPool, getClaimCreatorFeeInstructions, getCollectCreatorFeeInstructions, getCurveBuyExactInInstruction, getLaunchInstruction, initialCurve, isQuoteSupported, launchlabAuthority, launchlabBuyAccounts, launchlabBuyExactInAccounts, launchlabEventAuthority, launchlabGlobalConfig, launchlabPlatformConfig, launchlabPoolAddress, launchlabSellAccounts, launchlabVaultAddress, metadataAddress, metaplexSymbol, mintDecimals, newCurveBuyCost, newCurveReserves, order, platformFeeVaultAddress, preFeeAmount, quoteAccountFor, raydiumIds, readAccounts, remainingBase, resolveVenue, sellQuote, sortedMints, token2022Symbol, tokenAccountAmount, tokenAccountOwnerAndMint, totalCurveFeeRate, wsolAccountFor };
1366
+ export { ASSOCIATED_TOKEN_PROGRAM_ADDRESS, CONSTANT_CURVE_TAG, CPMM_AMM_CONFIG_DISCRIMINATOR, CPMM_AMM_CONFIG_HEAD_SIZE, CPMM_COLLECT_CREATOR_FEE, CPMM_POOL_OFFSETS, CPMM_POOL_STATE_DISCRIMINATOR, CPMM_POOL_STATE_HEAD_SIZE, CPMM_POOL_STATE_SIZE, CPMM_SEEDS, CPMM_SWAP_BASE_INPUT, CPMM_SWAP_BASE_OUTPUT, CREATOR_FEE_ON_QUOTE, ClaimCreatorFeeInput, ClaimPlatformFeeInput, CollectCreatorFeeInput, CpmmAmmConfig, CpmmFeeRates, CpmmPoolState, CpmmSwapSides, CpmmTradeAccountsInput, CreatorFees, CurveBuyExactInInput, CurveFeeRates, CurveReserves, CurveSettings, FindCpmmPoolOptions, HarvestLockedFeesInput, LAUNCHLAB_BUY_EXACT_IN, LAUNCHLAB_BUY_EXACT_OUT, LAUNCHLAB_CLAIM_CREATOR_FEE, LAUNCHLAB_CLAIM_PLATFORM_FEE_FROM_VAULT, LAUNCHLAB_GLOBAL_CONFIG_DISCRIMINATOR, LAUNCHLAB_GLOBAL_CONFIG_HEAD_SIZE, LAUNCHLAB_INITIALIZE, LAUNCHLAB_PLATFORM_CONFIG_DISCRIMINATOR, LAUNCHLAB_PLATFORM_CONFIG_HEAD_SIZE, LAUNCHLAB_POOL_STATE_DISCRIMINATOR, LAUNCHLAB_POOL_STATE_HEAD_SIZE, LAUNCHLAB_SEEDS, LAUNCHLAB_SELL_EXACT_IN, LAUNCHLAB_STATUS_FUND, LAUNCHLAB_STATUS_MIGRATE, LAUNCHLAB_STATUS_TRADE, LAUNCH_DECIMALS, LAUNCH_SUPPLY, LAUNCH_TOTAL_BASE_SELL, LOCKED_CP_LIQUIDITY_DISCRIMINATOR, LOCKED_CP_LIQUIDITY_HEAD_SIZE, LOCK_COLLECT_CP_FEES, LOCK_SEEDS, LaunchInput, LaunchParams, LaunchlabGlobalConfig, LaunchlabPlatformConfig, LaunchlabPoolState, LaunchlabTradeAccountsInput, LockIds, LockedCpLiquidity, LockedPosition, MEMO_PROGRAM_ADDRESS, METADATA_LIMITS, METADATA_SEED, METAPLEX_PROGRAM_ADDRESS, MIGRATE_TO_CPMM, MaybeAccount$1 as MaybeAccount, MigratedCpmmPool, PLATFORM_ADMIN, QuoteAsset, QuoteBinding, QuoteConfig, QuoteDisplay, RATE_DENOMINATOR, RAYDIUM_DEVNET_IDS, RAYDIUM_IDS, RAYDIUM_MAINNET_IDS, RENT_SYSVAR_ADDRESS, RaydiumClusterIds, RaydiumIds, ResolveVenueOptions, ResolvedVenue, SHARE_FEE_RATE, SYSTEM_PROGRAM_ADDRESS, TOKEN_2022_PROGRAM_ADDRESS, TOKEN_PROGRAM_ADDRESS, VenueAccountSpec, VenueInstructionAbi, VenueKind, WSOL_MINT, ata, ceilDiv, ceilDivRate, claimCreatorFee, claimPlatformFee, collectCreatorFee, compareAddresses, cpmmAuthority, cpmmBuyAccounts, cpmmCreatorFeeShare, cpmmPoolAddress, cpmmPoolMatches, cpmmSellAccounts, cpmmSwapBaseInput, cpmmSwapBaseOutput, creatorFeeOnInput, creatorFeeVaultAddress, creatorFeeVaultAuthority, curveBuyExactIn, curveBuyExactOut, curveQuote, curveSellExactIn, decodeBase64, decodeCpmmAmmConfig, decodeCpmmPool, decodeLaunchlabGlobalConfig, decodeLaunchlabPlatformConfig, decodeLaunchlabPool, decodeLockedCpLiquidity, fetchCreatorFees, fetchCurveSettings, fetchLockedPositions, fetchPlatformFees, fetchQuoteAsset, fetchQuoteBinding, fetchQuoteConfig, fetchQuoteDisplay, findCpmmPool, getClaimCreatorFeeInstructions, getClaimPlatformFeeInstructions, getCollectCreatorFeeInstructions, getCurveBuyExactInInstruction, getHarvestLockedFeesInstructions, getLaunchInstruction, harvestLockedFees, initialCurve, isQuoteSupported, launchlabAuthority, launchlabBuyAccounts, launchlabBuyExactInAccounts, launchlabEventAuthority, launchlabGlobalConfig, launchlabPlatformConfig, launchlabPoolAddress, launchlabSellAccounts, launchlabVaultAddress, lockAuthority, lockedFeeLp, lockedLiquidityAddress, metadataAddress, metaplexSymbol, mintDecimals, newCurveBuyCost, newCurveReserves, order, platformFeeVaultAddress, platformFeeVaultAuthority, preFeeAmount, quoteAccountFor, raydiumIds, readAccounts, remainingBase, resolveVenue, sellQuote, sortedMints, token2022Symbol, tokenAccountAmount, tokenAccountOwnerAndMint, totalCurveFeeRate, wsolAccountFor };
1182
1367
  }
1183
1368
  //#endregion
1184
- export { QuoteBinding as $, assertClusterUrl as $n, CONSTANT_CURVE_TAG as $t, ClaimCreatorFeeInput as A, LAUNCHLAB_SELL_EXACT_IN as An, totalCurveFeeRate as At, cpmmBuyAccounts as B, TOKEN_2022_PROGRAM_ADDRESS as Bn, LaunchlabGlobalConfig as Bt, launchlabPlatformConfig as C, LAUNCHLAB_BUY_EXACT_IN as Cn, cpmmSwapBaseOutput as Ct, platformFeeVaultAddress as D, LAUNCHLAB_INITIALIZE as Dn, initialCurve as Dt, metadataAddress as E, LAUNCHLAB_GLOBAL_CONFIG_DISCRIMINATOR as En, curveSellExactIn as Et, fetchCreatorFees as F, RAYDIUM_DEVNET_IDS as Fn, CpmmAmmConfig as Ft, order as G, CLUSTER_ENDPOINTS as Gn, decodeLaunchlabGlobalConfig as Gt, launchlabBuyAccounts as H, VenueAccountSpec as Hn, LaunchlabPoolState as Ht, getClaimCreatorFeeInstructions as I, RAYDIUM_MAINNET_IDS as In, CpmmPoolState as It, buildMessage as J, DEVNET_HTTP as Jn, metaplexSymbol as Jt, BuildOptions as K, ClientConfig as Kn, decodeLaunchlabPlatformConfig as Kt, getCollectCreatorFeeInstructions as L, RENT_SYSVAR_ADDRESS as Ln, LAUNCHLAB_GLOBAL_CONFIG_HEAD_SIZE as Lt, CreatorFees as M, LAUNCH_TOTAL_BASE_SELL as Mn, CPMM_POOL_OFFSETS as Mt, claimCreatorFee as N, METAPLEX_PROGRAM_ADDRESS as Nn, CPMM_POOL_STATE_HEAD_SIZE as Nt, LaunchInput as O, LAUNCHLAB_PLATFORM_CONFIG_DISCRIMINATOR as On, preFeeAmount as Ot, collectCreatorFee as P, PLATFORM_ADMIN as Pn, CPMM_POOL_STATE_SIZE as Pt, MigratedCpmmPool as Q, GaboxRpcSubscriptions as Qn, tokenAccountOwnerAndMint as Qt, CpmmTradeAccountsInput as R, RaydiumClusterIds as Rn, LAUNCHLAB_PLATFORM_CONFIG_HEAD_SIZE as Rt, launchlabGlobalConfig as S, CPMM_SWAP_BASE_OUTPUT as Sn, cpmmSwapBaseInput as St, launchlabVaultAddress as T, LAUNCHLAB_CLAIM_CREATOR_FEE as Tn, curveBuyExactOut as Tt, launchlabBuyExactInAccounts as U, VenueInstructionAbi as Un, decodeCpmmAmmConfig as Ut, cpmmSellAccounts as V, TOKEN_PROGRAM_ADDRESS as Vn, LaunchlabPlatformConfig as Vt, launchlabSellAccounts as W, WSOL_MINT as Wn, decodeCpmmPool as Wt, CurveSettings as X, GaboxClient as Xn, token2022Symbol as Xt, withRemainingAccounts as Y, DEVNET_WS as Yn, mintDecimals as Yt, FindCpmmPoolOptions as Z, GaboxRpc as Zn, tokenAccountAmount as Zt, cpmmPoolAddress as _, ASSOCIATED_TOKEN_PROGRAM_ADDRESS as _n, CurveFeeRates as _t, decodeBase64 as a, LAUNCHLAB_STATUS_TRADE as an, RouteMode as ar, curveQuote as at, launchlabAuthority as b, CPMM_POOL_STATE_DISCRIMINATOR as bn, ceilDiv as bt, QuoteConfig as c, METADATA_SEED as cn, findCpmmPool as ct, fetchQuoteConfig as d, RAYDIUM_IDS as dn, quoteAccountFor as dt, CPMM_SEEDS as en, clusterNamedBy as er, ResolveVenueOptions as et, fetchQuoteDisplay as f, RaydiumIds as fn, resolveVenue as ft, cpmmCreatorFeeShare as g, sortedMints as gn, CpmmSwapSides as gt, cpmmAuthority as h, raydiumIds as hn, CpmmFeeRates as ht, MaybeAccount$1 as i, LAUNCHLAB_STATUS_MIGRATE as in, Route as ir, creatorFeeOnInput as it, CollectCreatorFeeInput as j, LAUNCH_SUPPLY as jn, CPMM_AMM_CONFIG_HEAD_SIZE as jt, getLaunchInstruction as k, LAUNCHLAB_POOL_STATE_DISCRIMINATOR as kn, remainingBase as kt, QuoteDisplay as l, MIGRATE_TO_CPMM as ln, newCurveBuyCost as lt, ata as m, compareAddresses as mn, wsolAccountFor as mt, CurveBuyExactInInput as n, LAUNCHLAB_SEEDS as nn, defaultRoute as nr, VenueKind as nt, readAccounts as o, LAUNCH_DECIMALS as on, RouteProvider as or, fetchCurveSettings as ot, isQuoteSupported as p, SHARE_FEE_RATE as pn, sellQuote as pt, GaboxTransactionMessage as q, Cluster as qn, decodeLaunchlabPool as qt, getCurveBuyExactInInstruction as r, LAUNCHLAB_STATUS_FUND as rn, websocketUrlFor as rr, cpmmPoolMatches as rt, QuoteAsset as s, METADATA_LIMITS as sn, fetchQuoteBinding as st, index_d_exports as t, CREATOR_FEE_ON_QUOTE as tn, createClient as tr, ResolvedVenue as tt, fetchQuoteAsset as u, RATE_DENOMINATOR as un, newCurveReserves as ut, creatorFeeVaultAddress as v, CPMM_AMM_CONFIG_DISCRIMINATOR as vn, CurveReserves as vt, launchlabPoolAddress as w, LAUNCHLAB_BUY_EXACT_OUT as wn, curveBuyExactIn as wt, launchlabEventAuthority as x, CPMM_SWAP_BASE_INPUT as xn, ceilDivRate as xt, creatorFeeVaultAuthority as y, CPMM_COLLECT_CREATOR_FEE as yn, LaunchParams as yt, LaunchlabTradeAccountsInput as z, SYSTEM_PROGRAM_ADDRESS as zn, LAUNCHLAB_POOL_STATE_HEAD_SIZE as zt };
1185
- //# sourceMappingURL=index-CA0m7AKk.d.ts.map
1369
+ export { LaunchlabTradeAccountsInput as $, LAUNCH_SUPPLY as $n, LAUNCHLAB_POOL_STATE_HEAD_SIZE as $t, creatorFeeVaultAuthority as A, MIGRATE_TO_CPMM as An, CpmmSwapSides as At, platformFeeVaultAddress as B, CPMM_COLLECT_CREATOR_FEE as Bn, curveSellExactIn as Bt, harvestLockedFees as C, LAUNCHLAB_STATUS_TRADE as Cn, createClient as Cr, newCurveBuyCost as Ct, cpmmCreatorFeeShare as D, MEMO_PROGRAM_ADDRESS as Dn, RouteMode as Dr, sellQuote as Dt, cpmmAuthority as E, LockIds as En, Route as Er, resolveVenue as Et, launchlabPoolAddress as F, compareAddresses as Fn, ceilDivRate as Ft, CollectCreatorFeeInput as G, LAUNCHLAB_BUY_EXACT_OUT as Gn, CPMM_AMM_CONFIG_HEAD_SIZE as Gt, LaunchInput as H, CPMM_SWAP_BASE_INPUT as Hn, preFeeAmount as Ht, launchlabVaultAddress as I, raydiumIds as In, cpmmSwapBaseInput as It, collectCreatorFee as J, LAUNCHLAB_GLOBAL_CONFIG_DISCRIMINATOR as Jn, CPMM_POOL_STATE_SIZE as Jt, CreatorFees as K, LAUNCHLAB_CLAIM_CREATOR_FEE as Kn, CPMM_POOL_OFFSETS as Kt, lockAuthority as L, sortedMints as Ln, cpmmSwapBaseOutput as Lt, launchlabEventAuthority as M, RAYDIUM_IDS as Mn, CurveReserves as Mt, launchlabGlobalConfig as N, RaydiumIds as Nn, LaunchParams as Nt, cpmmPoolAddress as O, METADATA_LIMITS as On, RouteProvider as Or, wsolAccountFor as Ot, launchlabPlatformConfig as P, SHARE_FEE_RATE as Pn, ceilDiv as Pt, CpmmTradeAccountsInput as Q, LAUNCHLAB_SELL_EXACT_IN as Qn, LAUNCHLAB_PLATFORM_CONFIG_HEAD_SIZE as Qt, lockedLiquidityAddress as R, ASSOCIATED_TOKEN_PROGRAM_ADDRESS as Rn, curveBuyExactIn as Rt, getHarvestLockedFeesInstructions as S, LAUNCHLAB_STATUS_MIGRATE as Sn, clusterNamedBy as Sr, findCpmmPool as St, ata as T, LOCK_SEEDS as Tn, websocketUrlFor as Tr, quoteAccountFor as Tt, getLaunchInstruction as U, CPMM_SWAP_BASE_OUTPUT as Un, remainingBase as Ut, platformFeeVaultAuthority as V, CPMM_POOL_STATE_DISCRIMINATOR as Vn, initialCurve as Vt, ClaimCreatorFeeInput as W, LAUNCHLAB_BUY_EXACT_IN as Wn, totalCurveFeeRate as Wt, getClaimCreatorFeeInstructions as X, LAUNCHLAB_PLATFORM_CONFIG_DISCRIMINATOR as Xn, CpmmPoolState as Xt, fetchCreatorFees as Y, LAUNCHLAB_INITIALIZE as Yn, CpmmAmmConfig as Yt, getCollectCreatorFeeInstructions as Z, LAUNCHLAB_POOL_STATE_DISCRIMINATOR as Zn, LAUNCHLAB_GLOBAL_CONFIG_HEAD_SIZE as Zt, LockedPosition as _, CONSTANT_CURVE_TAG as _n, DEVNET_WS as _r, cpmmPoolMatches as _t, decodeBase64 as a, LockedCpLiquidity as an, RENT_SYSVAR_ADDRESS as ar, order as at, fetchPlatformFees as b, LAUNCHLAB_SEEDS as bn, GaboxRpcSubscriptions as br, fetchCurveSettings as bt, QuoteConfig as c, decodeLaunchlabGlobalConfig as cn, TOKEN_2022_PROGRAM_ADDRESS as cr, buildMessage as ct, fetchQuoteConfig as d, decodeLockedCpLiquidity as dn, VenueInstructionAbi as dr, FindCpmmPoolOptions as dt, LOCKED_CP_LIQUIDITY_DISCRIMINATOR as en, LAUNCH_TOTAL_BASE_SELL as er, cpmmBuyAccounts as et, fetchQuoteDisplay as f, metaplexSymbol as fn, WSOL_MINT as fr, MigratedCpmmPool as ft, LOCK_COLLECT_CP_FEES as g, tokenAccountOwnerAndMint as gn, DEVNET_HTTP as gr, VenueKind as gt, HarvestLockedFeesInput as h, tokenAccountAmount as hn, Cluster as hr, ResolvedVenue as ht, MaybeAccount$1 as i, LaunchlabPoolState as in, RAYDIUM_MAINNET_IDS as ir, launchlabSellAccounts as it, launchlabAuthority as j, RATE_DENOMINATOR as jn, CurveFeeRates as jt, creatorFeeVaultAddress as k, METADATA_SEED as kn, CpmmFeeRates as kt, QuoteDisplay as l, decodeLaunchlabPlatformConfig as ln, TOKEN_PROGRAM_ADDRESS as lr, withRemainingAccounts as lt, ClaimPlatformFeeInput as m, token2022Symbol as mn, ClientConfig as mr, ResolveVenueOptions as mt, CurveBuyExactInInput as n, LaunchlabGlobalConfig as nn, PLATFORM_ADMIN as nr, launchlabBuyAccounts as nt, readAccounts as o, decodeCpmmAmmConfig as on, RaydiumClusterIds as or, BuildOptions as ot, isQuoteSupported as p, mintDecimals as pn, CLUSTER_ENDPOINTS as pr, QuoteBinding as pt, claimCreatorFee as q, LAUNCHLAB_CLAIM_PLATFORM_FEE_FROM_VAULT as qn, CPMM_POOL_STATE_HEAD_SIZE as qt, getCurveBuyExactInInstruction as r, LaunchlabPlatformConfig as rn, RAYDIUM_DEVNET_IDS as rr, launchlabBuyExactInAccounts as rt, QuoteAsset as s, decodeCpmmPool as sn, SYSTEM_PROGRAM_ADDRESS as sr, GaboxTransactionMessage as st, index_d_exports as t, LOCKED_CP_LIQUIDITY_HEAD_SIZE as tn, METAPLEX_PROGRAM_ADDRESS as tr, cpmmSellAccounts as tt, fetchQuoteAsset as u, decodeLaunchlabPool as un, VenueAccountSpec as ur, CurveSettings as ut, claimPlatformFee as v, CPMM_SEEDS as vn, GaboxClient as vr, creatorFeeOnInput as vt, lockedFeeLp as w, LAUNCH_DECIMALS as wn, defaultRoute as wr, newCurveReserves as wt, getClaimPlatformFeeInstructions as x, LAUNCHLAB_STATUS_FUND as xn, assertClusterUrl as xr, fetchQuoteBinding as xt, fetchLockedPositions as y, CREATOR_FEE_ON_QUOTE as yn, GaboxRpc as yr, curveQuote as yt, metadataAddress as z, CPMM_AMM_CONFIG_DISCRIMINATOR as zn, curveBuyExactOut as zt };
1370
+ //# sourceMappingURL=index-CQcBMEah.d.ts.map