@bagsfm/bags-sdk
Version:
TypeScript SDK for Bags
111 lines • 2.84 kB
TypeScript
import { PublicKey, VersionedTransaction } from '@solana/web3.js';
import { BAGS_CONFIG_TYPE, TransactionTipConfig } from './api';
import type { ImageInput } from '../utils/image';
export type GetOrCreateConfigResponse = {
transaction: VersionedTransaction | null;
configKey: PublicKey;
};
export type CreateFeeShareConfigResponse = {
transaction: VersionedTransaction;
configKey: PublicKey;
};
export interface CreateLaunchTransactionParams {
metadataUrl: string;
tokenMint: PublicKey;
launchWallet: PublicKey;
initialBuyLamports: number;
configKey: PublicKey;
tipConfig?: TransactionTipConfig;
}
export type CreateTokenInfoParams = ({
image: ImageInput;
imageUrl?: never;
} | {
image?: never;
imageUrl: string;
}) & {
name: string;
symbol: string;
description: string;
telegram?: string;
twitter?: string;
website?: string;
metadataUrl?: string;
};
export declare enum TokenLaunchStatus {
PRE_LAUNCH = "PRE_LAUNCH",
PRE_GRAD = "PRE_GRAD",
MIGRATING = "MIGRATING",
MIGRATED = "MIGRATED"
}
export interface BagsLaunchPadTokenLaunch {
userId: string | null;
name: string;
symbol: string;
description: string;
telegram: string | null;
twitter: string | null;
website: string | null;
image: string;
tokenMint: string;
status: TokenLaunchStatus;
launchWallet: string | null;
launchSignature: string | null;
uri: string | null;
createdAt: string;
updatedAt: string;
}
export interface CreateTokenInfoResponse {
tokenMint: string;
tokenMetadata: string;
tokenLaunch: BagsLaunchPadTokenLaunch;
}
type FeeShareUser = {
wallet: PublicKey;
bps: number;
};
export type CreateFeeShareConfigParams = {
users: Array<FeeShareUser>;
payer: PublicKey;
baseMint: PublicKey;
quoteMint: PublicKey;
tipConfig?: TransactionTipConfig;
};
export type NormalizedCreateTokenInfoParams = ({
kind: 'file';
image: any;
} & {
name: string;
symbol: string;
description: string;
telegram?: string;
twitter?: string;
website?: string;
metadataUrl?: string;
}) | ({
kind: 'url';
imageUrl: string;
} & {
name: string;
symbol: string;
description: string;
telegram?: string;
twitter?: string;
website?: string;
metadataUrl?: string;
});
export type NormalizedCreateFeeShareConfigParams = {
basisPointsArray: Array<number>;
payer: string;
baseMint: string;
partner?: string;
partnerConfig?: string;
claimersArray: Array<string>;
tipWallet?: string;
tipLamports?: number;
additionalLookupTables?: Array<string>;
admin?: string;
bagsConfigType?: (typeof BAGS_CONFIG_TYPE)[keyof typeof BAGS_CONFIG_TYPE];
};
export {};
//# sourceMappingURL=token-launch.d.ts.map