flipmeme-sdk 1.3.9 → 1.3.11

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -56,6 +56,7 @@ interface NetworkAddress {
56
56
  ROYALITY_ID: PublicKey;
57
57
  MPL_CORE: PublicKey;
58
58
  ADMIN_FOR_CREDIT_BUY: PublicKey;
59
+ REFERRAL_ID: PublicKey;
59
60
  RENT_TOKEN_ID: PublicKey;
60
61
  SYSTEM_PROGRAM_ID: PublicKey;
61
62
  }
@@ -110,7 +111,7 @@ interface ProfileSellParams {
110
111
  }
111
112
  declare function isEthereumConfig(config: EthereumConfig | SolanaConfig): config is EthereumConfig;
112
113
  declare function isSolanaConfig(config: EthereumConfig | SolanaConfig): config is SolanaConfig;
113
- interface BuyCreditParams {
114
+ interface TransferParams {
114
115
  userPubkey: PublicKey;
115
116
  amount: number;
116
117
  }
@@ -175,42 +176,6 @@ interface AssetInfo {
175
176
  assetProof: MerkleProof;
176
177
  }
177
178
 
178
- declare class FlipmemeSDK {
179
- private blockchainType;
180
- private ethereum;
181
- private solana;
182
- constructor(chainType: BlockchainType, isMain: boolean, config: EthereumConfig | SolanaConfig);
183
- updateConfig(chainType: BlockchainType, isMain: boolean, config: EthereumConfig | SolanaConfig): void;
184
- createCollection(params: CollectionParams): Promise<CreateCollectionResponse>;
185
- buy(params: BuyParams): Promise<ConfirmResult>;
186
- flipSell(params: SellParams): Promise<ConfirmResult>;
187
- profileSell(data: ProfileSellParams): Promise<ConfirmResult>;
188
- buyCredit(params: BuyCreditParams): Promise<string>;
189
- getTotalPrice(type: PurcahseType, collectionId: string, amount: number): Promise<string>;
190
- /**
191
- * create lookup table account with lookuptable addresses and return lookup table account
192
- * @param lookupTableAddresses addresses to add lookup table
193
- */
194
- createLookupTableAndExtend(addressesToAdd: PublicKey[]): Promise<PublicKey>;
195
- extendLookupTable(lookupTableAddress: PublicKey, addressesToAdd: PublicKey[], isInitial?: boolean): Promise<void>;
196
- finalizeSale(collectionId: string): Promise<void>;
197
- ejectNfts(collectionId: string, nftInfos: NftInfo[]): Promise<void>;
198
- /**For testing */
199
- getStateInfo(): Promise<{
200
- admin: PublicKey;
201
- treasury: PublicKey;
202
- lpSellout: PublicKey;
203
- lpProvisioner: PublicKey;
204
- royalty: PublicKey;
205
- collectionCount: number;
206
- protocolFeeBps: number;
207
- sellerFeeBasisPoints: number;
208
- }>;
209
- getCollectionInfo(collectionId: string): Promise<CollectionInfo>;
210
- getTransactionTest(signature: string, transactionType?: string): Promise<BuyResponse[] | SellResponse[]>;
211
- getInstructionData(instruction: string): Promise<void>;
212
- }
213
-
214
179
  declare const SOLANA_MAIN: {
215
180
  LOOKUP_TABLE_STR: string;
216
181
  STATE_ID_STR: string;
@@ -219,6 +184,10 @@ declare const SOLANA_DEV: {
219
184
  LOOKUP_TABLE_STR: string;
220
185
  STATE_ID_STR: string;
221
186
  };
187
+ declare const SOLANA_STAGE: {
188
+ LOOKUP_TABLE_STR: string;
189
+ STATE_ID_STR: string;
190
+ };
222
191
  declare const SOLANA_COMMON: {
223
192
  UPDATE_AUTHORITY_ID: PublicKey;
224
193
  TREASURY_ID: PublicKey;
@@ -226,10 +195,16 @@ declare const SOLANA_COMMON: {
226
195
  LP_PROVISIONER_ID: PublicKey;
227
196
  ROYALITY_ID: PublicKey;
228
197
  MPL_CORE: PublicKey;
198
+ REFERRAL_ID: PublicKey;
229
199
  ADMIN_FOR_CREDIT_BUY: PublicKey;
230
200
  RENT_TOKEN_ID: PublicKey;
231
201
  SYSTEM_PROGRAM_ID: PublicKey;
232
202
  };
203
+ declare enum PLATFORM {
204
+ DEV = "Dev",
205
+ STAGE = "Stage",
206
+ PROD = "Prod"
207
+ }
233
208
  declare enum ENV {
234
209
  Devnet = "Devnet",
235
210
  Mainnet = "Mainnet"
@@ -245,6 +220,7 @@ declare const SOLANA_PUBKEYS: {
245
220
  LP_PROVISIONER_ID: PublicKey;
246
221
  ROYALITY_ID: PublicKey;
247
222
  MPL_CORE: PublicKey;
223
+ REFERRAL_ID: PublicKey;
248
224
  ADMIN_FOR_CREDIT_BUY: PublicKey;
249
225
  RENT_TOKEN_ID: PublicKey;
250
226
  SYSTEM_PROGRAM_ID: PublicKey;
@@ -258,6 +234,21 @@ declare const SOLANA_PUBKEYS_DEV: {
258
234
  LP_PROVISIONER_ID: PublicKey;
259
235
  ROYALITY_ID: PublicKey;
260
236
  MPL_CORE: PublicKey;
237
+ REFERRAL_ID: PublicKey;
238
+ ADMIN_FOR_CREDIT_BUY: PublicKey;
239
+ RENT_TOKEN_ID: PublicKey;
240
+ SYSTEM_PROGRAM_ID: PublicKey;
241
+ LOOKUP_TABLE: PublicKey;
242
+ STATE_ID: PublicKey;
243
+ };
244
+ declare const SOLANA_PUBKEYS_STAGE: {
245
+ UPDATE_AUTHORITY_ID: PublicKey;
246
+ TREASURY_ID: PublicKey;
247
+ SELL_OUT_ID: PublicKey;
248
+ LP_PROVISIONER_ID: PublicKey;
249
+ ROYALITY_ID: PublicKey;
250
+ MPL_CORE: PublicKey;
251
+ REFERRAL_ID: PublicKey;
261
252
  ADMIN_FOR_CREDIT_BUY: PublicKey;
262
253
  RENT_TOKEN_ID: PublicKey;
263
254
  SYSTEM_PROGRAM_ID: PublicKey;
@@ -362,6 +353,42 @@ declare const VALID_SIZE_PAIR: {
362
353
  };
363
354
  };
364
355
 
356
+ declare class FlipmemeSDK {
357
+ private blockchainType;
358
+ private ethereum;
359
+ private solana;
360
+ constructor(chainType: BlockchainType, plateform: PLATFORM, config: EthereumConfig | SolanaConfig);
361
+ updateConfig(chainType: BlockchainType, plateform: PLATFORM, config: EthereumConfig | SolanaConfig): void;
362
+ createCollection(params: CollectionParams): Promise<CreateCollectionResponse>;
363
+ buy(params: BuyParams): Promise<ConfirmResult>;
364
+ flipSell(params: SellParams): Promise<ConfirmResult>;
365
+ profileSell(data: ProfileSellParams): Promise<ConfirmResult>;
366
+ buyCredit(params: TransferParams): Promise<string>;
367
+ getTotalPrice(type: PurcahseType, collectionId: string, amount: number): Promise<string>;
368
+ /**
369
+ * create lookup table account with lookuptable addresses and return lookup table account
370
+ * @param lookupTableAddresses addresses to add lookup table
371
+ */
372
+ createLookupTableAndExtend(addressesToAdd: PublicKey[]): Promise<PublicKey>;
373
+ extendLookupTable(lookupTableAddress: PublicKey, addressesToAdd: PublicKey[], isInitial?: boolean): Promise<void>;
374
+ finalizeSale(collectionId: string): Promise<void>;
375
+ ejectNfts(collectionId: string, nftInfos: NftInfo[]): Promise<void>;
376
+ /**For testing */
377
+ getStateInfo(): Promise<{
378
+ admin: PublicKey;
379
+ treasury: PublicKey;
380
+ lpSellout: PublicKey;
381
+ lpProvisioner: PublicKey;
382
+ royalty: PublicKey;
383
+ collectionCount: number;
384
+ protocolFeeBps: number;
385
+ sellerFeeBasisPoints: number;
386
+ }>;
387
+ getCollectionInfo(collectionId: string): Promise<CollectionInfo>;
388
+ getTransactionTest(signature: string, transactionType?: string): Promise<BuyResponse[] | SellResponse[]>;
389
+ getInstructionData(instruction: string): Promise<void>;
390
+ }
391
+
365
392
  /**
366
393
  * this function only works for solana mainnet. So don't need to get connection as parameter
367
394
  */
@@ -369,4 +396,4 @@ declare function placeTensorCollectionBid(price: number, quantity: number, colle
369
396
 
370
397
  declare function decodeStr(str: string): string;
371
398
 
372
- export { type AssetData, type AssetInfo, BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, COLLECTION_BID_PRICE, type CollectionInfo, type CollectionParams, type Compression, type ConfirmResult, type CreateCollectionResponse, ENV, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NetworkAddress, type NftInfo, type Ownership, type ProfileSellParams, PurcahseType, RPC, type ReserveToken, type SDKSignature, type SDKTransaction, SDK_SOLANA_CONFIG, SOLANA_COMMON, SOLANA_DEV, SOLANA_MAIN, SOLANA_PUBKEYS, SOLANA_PUBKEYS_DEV, type SellData, type SellParams, type SellResponse, type SolanaConfig, VALID_SIZE_PAIR, decodeStr, isEthereumConfig, isSolanaConfig, placeTensorCollectionBid };
399
+ export { type AssetData, type AssetInfo, BlockchainType, type BuyParams, type BuyResponse, COLLECTION_BID_PRICE, type CollectionInfo, type CollectionParams, type Compression, type ConfirmResult, type CreateCollectionResponse, ENV, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NetworkAddress, type NftInfo, type Ownership, PLATFORM, type ProfileSellParams, PurcahseType, RPC, type ReserveToken, type SDKSignature, type SDKTransaction, SDK_SOLANA_CONFIG, SOLANA_COMMON, SOLANA_DEV, SOLANA_MAIN, SOLANA_PUBKEYS, SOLANA_PUBKEYS_DEV, SOLANA_PUBKEYS_STAGE, SOLANA_STAGE, type SellData, type SellParams, type SellResponse, type SolanaConfig, type TransferParams, VALID_SIZE_PAIR, decodeStr, isEthereumConfig, isSolanaConfig, placeTensorCollectionBid };
package/dist/index.d.ts CHANGED
@@ -56,6 +56,7 @@ interface NetworkAddress {
56
56
  ROYALITY_ID: PublicKey;
57
57
  MPL_CORE: PublicKey;
58
58
  ADMIN_FOR_CREDIT_BUY: PublicKey;
59
+ REFERRAL_ID: PublicKey;
59
60
  RENT_TOKEN_ID: PublicKey;
60
61
  SYSTEM_PROGRAM_ID: PublicKey;
61
62
  }
@@ -110,7 +111,7 @@ interface ProfileSellParams {
110
111
  }
111
112
  declare function isEthereumConfig(config: EthereumConfig | SolanaConfig): config is EthereumConfig;
112
113
  declare function isSolanaConfig(config: EthereumConfig | SolanaConfig): config is SolanaConfig;
113
- interface BuyCreditParams {
114
+ interface TransferParams {
114
115
  userPubkey: PublicKey;
115
116
  amount: number;
116
117
  }
@@ -175,42 +176,6 @@ interface AssetInfo {
175
176
  assetProof: MerkleProof;
176
177
  }
177
178
 
178
- declare class FlipmemeSDK {
179
- private blockchainType;
180
- private ethereum;
181
- private solana;
182
- constructor(chainType: BlockchainType, isMain: boolean, config: EthereumConfig | SolanaConfig);
183
- updateConfig(chainType: BlockchainType, isMain: boolean, config: EthereumConfig | SolanaConfig): void;
184
- createCollection(params: CollectionParams): Promise<CreateCollectionResponse>;
185
- buy(params: BuyParams): Promise<ConfirmResult>;
186
- flipSell(params: SellParams): Promise<ConfirmResult>;
187
- profileSell(data: ProfileSellParams): Promise<ConfirmResult>;
188
- buyCredit(params: BuyCreditParams): Promise<string>;
189
- getTotalPrice(type: PurcahseType, collectionId: string, amount: number): Promise<string>;
190
- /**
191
- * create lookup table account with lookuptable addresses and return lookup table account
192
- * @param lookupTableAddresses addresses to add lookup table
193
- */
194
- createLookupTableAndExtend(addressesToAdd: PublicKey[]): Promise<PublicKey>;
195
- extendLookupTable(lookupTableAddress: PublicKey, addressesToAdd: PublicKey[], isInitial?: boolean): Promise<void>;
196
- finalizeSale(collectionId: string): Promise<void>;
197
- ejectNfts(collectionId: string, nftInfos: NftInfo[]): Promise<void>;
198
- /**For testing */
199
- getStateInfo(): Promise<{
200
- admin: PublicKey;
201
- treasury: PublicKey;
202
- lpSellout: PublicKey;
203
- lpProvisioner: PublicKey;
204
- royalty: PublicKey;
205
- collectionCount: number;
206
- protocolFeeBps: number;
207
- sellerFeeBasisPoints: number;
208
- }>;
209
- getCollectionInfo(collectionId: string): Promise<CollectionInfo>;
210
- getTransactionTest(signature: string, transactionType?: string): Promise<BuyResponse[] | SellResponse[]>;
211
- getInstructionData(instruction: string): Promise<void>;
212
- }
213
-
214
179
  declare const SOLANA_MAIN: {
215
180
  LOOKUP_TABLE_STR: string;
216
181
  STATE_ID_STR: string;
@@ -219,6 +184,10 @@ declare const SOLANA_DEV: {
219
184
  LOOKUP_TABLE_STR: string;
220
185
  STATE_ID_STR: string;
221
186
  };
187
+ declare const SOLANA_STAGE: {
188
+ LOOKUP_TABLE_STR: string;
189
+ STATE_ID_STR: string;
190
+ };
222
191
  declare const SOLANA_COMMON: {
223
192
  UPDATE_AUTHORITY_ID: PublicKey;
224
193
  TREASURY_ID: PublicKey;
@@ -226,10 +195,16 @@ declare const SOLANA_COMMON: {
226
195
  LP_PROVISIONER_ID: PublicKey;
227
196
  ROYALITY_ID: PublicKey;
228
197
  MPL_CORE: PublicKey;
198
+ REFERRAL_ID: PublicKey;
229
199
  ADMIN_FOR_CREDIT_BUY: PublicKey;
230
200
  RENT_TOKEN_ID: PublicKey;
231
201
  SYSTEM_PROGRAM_ID: PublicKey;
232
202
  };
203
+ declare enum PLATFORM {
204
+ DEV = "Dev",
205
+ STAGE = "Stage",
206
+ PROD = "Prod"
207
+ }
233
208
  declare enum ENV {
234
209
  Devnet = "Devnet",
235
210
  Mainnet = "Mainnet"
@@ -245,6 +220,7 @@ declare const SOLANA_PUBKEYS: {
245
220
  LP_PROVISIONER_ID: PublicKey;
246
221
  ROYALITY_ID: PublicKey;
247
222
  MPL_CORE: PublicKey;
223
+ REFERRAL_ID: PublicKey;
248
224
  ADMIN_FOR_CREDIT_BUY: PublicKey;
249
225
  RENT_TOKEN_ID: PublicKey;
250
226
  SYSTEM_PROGRAM_ID: PublicKey;
@@ -258,6 +234,21 @@ declare const SOLANA_PUBKEYS_DEV: {
258
234
  LP_PROVISIONER_ID: PublicKey;
259
235
  ROYALITY_ID: PublicKey;
260
236
  MPL_CORE: PublicKey;
237
+ REFERRAL_ID: PublicKey;
238
+ ADMIN_FOR_CREDIT_BUY: PublicKey;
239
+ RENT_TOKEN_ID: PublicKey;
240
+ SYSTEM_PROGRAM_ID: PublicKey;
241
+ LOOKUP_TABLE: PublicKey;
242
+ STATE_ID: PublicKey;
243
+ };
244
+ declare const SOLANA_PUBKEYS_STAGE: {
245
+ UPDATE_AUTHORITY_ID: PublicKey;
246
+ TREASURY_ID: PublicKey;
247
+ SELL_OUT_ID: PublicKey;
248
+ LP_PROVISIONER_ID: PublicKey;
249
+ ROYALITY_ID: PublicKey;
250
+ MPL_CORE: PublicKey;
251
+ REFERRAL_ID: PublicKey;
261
252
  ADMIN_FOR_CREDIT_BUY: PublicKey;
262
253
  RENT_TOKEN_ID: PublicKey;
263
254
  SYSTEM_PROGRAM_ID: PublicKey;
@@ -362,6 +353,42 @@ declare const VALID_SIZE_PAIR: {
362
353
  };
363
354
  };
364
355
 
356
+ declare class FlipmemeSDK {
357
+ private blockchainType;
358
+ private ethereum;
359
+ private solana;
360
+ constructor(chainType: BlockchainType, plateform: PLATFORM, config: EthereumConfig | SolanaConfig);
361
+ updateConfig(chainType: BlockchainType, plateform: PLATFORM, config: EthereumConfig | SolanaConfig): void;
362
+ createCollection(params: CollectionParams): Promise<CreateCollectionResponse>;
363
+ buy(params: BuyParams): Promise<ConfirmResult>;
364
+ flipSell(params: SellParams): Promise<ConfirmResult>;
365
+ profileSell(data: ProfileSellParams): Promise<ConfirmResult>;
366
+ buyCredit(params: TransferParams): Promise<string>;
367
+ getTotalPrice(type: PurcahseType, collectionId: string, amount: number): Promise<string>;
368
+ /**
369
+ * create lookup table account with lookuptable addresses and return lookup table account
370
+ * @param lookupTableAddresses addresses to add lookup table
371
+ */
372
+ createLookupTableAndExtend(addressesToAdd: PublicKey[]): Promise<PublicKey>;
373
+ extendLookupTable(lookupTableAddress: PublicKey, addressesToAdd: PublicKey[], isInitial?: boolean): Promise<void>;
374
+ finalizeSale(collectionId: string): Promise<void>;
375
+ ejectNfts(collectionId: string, nftInfos: NftInfo[]): Promise<void>;
376
+ /**For testing */
377
+ getStateInfo(): Promise<{
378
+ admin: PublicKey;
379
+ treasury: PublicKey;
380
+ lpSellout: PublicKey;
381
+ lpProvisioner: PublicKey;
382
+ royalty: PublicKey;
383
+ collectionCount: number;
384
+ protocolFeeBps: number;
385
+ sellerFeeBasisPoints: number;
386
+ }>;
387
+ getCollectionInfo(collectionId: string): Promise<CollectionInfo>;
388
+ getTransactionTest(signature: string, transactionType?: string): Promise<BuyResponse[] | SellResponse[]>;
389
+ getInstructionData(instruction: string): Promise<void>;
390
+ }
391
+
365
392
  /**
366
393
  * this function only works for solana mainnet. So don't need to get connection as parameter
367
394
  */
@@ -369,4 +396,4 @@ declare function placeTensorCollectionBid(price: number, quantity: number, colle
369
396
 
370
397
  declare function decodeStr(str: string): string;
371
398
 
372
- export { type AssetData, type AssetInfo, BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, COLLECTION_BID_PRICE, type CollectionInfo, type CollectionParams, type Compression, type ConfirmResult, type CreateCollectionResponse, ENV, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NetworkAddress, type NftInfo, type Ownership, type ProfileSellParams, PurcahseType, RPC, type ReserveToken, type SDKSignature, type SDKTransaction, SDK_SOLANA_CONFIG, SOLANA_COMMON, SOLANA_DEV, SOLANA_MAIN, SOLANA_PUBKEYS, SOLANA_PUBKEYS_DEV, type SellData, type SellParams, type SellResponse, type SolanaConfig, VALID_SIZE_PAIR, decodeStr, isEthereumConfig, isSolanaConfig, placeTensorCollectionBid };
399
+ export { type AssetData, type AssetInfo, BlockchainType, type BuyParams, type BuyResponse, COLLECTION_BID_PRICE, type CollectionInfo, type CollectionParams, type Compression, type ConfirmResult, type CreateCollectionResponse, ENV, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NetworkAddress, type NftInfo, type Ownership, PLATFORM, type ProfileSellParams, PurcahseType, RPC, type ReserveToken, type SDKSignature, type SDKTransaction, SDK_SOLANA_CONFIG, SOLANA_COMMON, SOLANA_DEV, SOLANA_MAIN, SOLANA_PUBKEYS, SOLANA_PUBKEYS_DEV, SOLANA_PUBKEYS_STAGE, SOLANA_STAGE, type SellData, type SellParams, type SellResponse, type SolanaConfig, type TransferParams, VALID_SIZE_PAIR, decodeStr, isEthereumConfig, isSolanaConfig, placeTensorCollectionBid };
package/dist/index.js CHANGED
@@ -68,6 +68,7 @@ __export(index_exports, {
68
68
  COLLECTION_BID_PRICE: () => COLLECTION_BID_PRICE,
69
69
  ENV: () => ENV,
70
70
  FlipmemeSDK: () => FlipmemeSDK,
71
+ PLATFORM: () => PLATFORM,
71
72
  PurcahseType: () => PurcahseType,
72
73
  RPC: () => RPC,
73
74
  SDK_SOLANA_CONFIG: () => SDK_SOLANA_CONFIG,
@@ -76,6 +77,8 @@ __export(index_exports, {
76
77
  SOLANA_MAIN: () => SOLANA_MAIN,
77
78
  SOLANA_PUBKEYS: () => SOLANA_PUBKEYS,
78
79
  SOLANA_PUBKEYS_DEV: () => SOLANA_PUBKEYS_DEV,
80
+ SOLANA_PUBKEYS_STAGE: () => SOLANA_PUBKEYS_STAGE,
81
+ SOLANA_STAGE: () => SOLANA_STAGE,
79
82
  VALID_SIZE_PAIR: () => VALID_SIZE_PAIR,
80
83
  decodeStr: () => decodeStr,
81
84
  isEthereumConfig: () => isEthereumConfig,
@@ -2045,6 +2048,10 @@ var SOLANA_DEV = {
2045
2048
  LOOKUP_TABLE_STR: "7HEasJQWAuA3TAPP6KcxvsPaYaS38csWdaxSkYxWq43h",
2046
2049
  STATE_ID_STR: "H876G8i7bdkmEDngWQJCKTFXgwU9c5cao2BdCdnqVFw7"
2047
2050
  };
2051
+ var SOLANA_STAGE = {
2052
+ LOOKUP_TABLE_STR: "7EgdJgVSGDVL8k7FaoguvdE78GeDTLJRjVKsBSohk3oq",
2053
+ STATE_ID_STR: "BDa2MDMdqoc2GExUiwagRxC11PMZF9oZGwzXRtnqnSro"
2054
+ };
2048
2055
  var SOLANA_COMMON = {
2049
2056
  UPDATE_AUTHORITY_ID: new import_web3.PublicKey("CQGym7VBydfKuFacUy5hV2LqyRx3rv8gJWs9aZ7CAnGq"),
2050
2057
  TREASURY_ID: new import_web3.PublicKey("4kU2KESm5MaJSgieVAoAbUGMzGkm7WC4dPYjeCHQn5R6"),
@@ -2054,12 +2061,20 @@ var SOLANA_COMMON = {
2054
2061
  ),
2055
2062
  ROYALITY_ID: new import_web3.PublicKey("6oYqWqe23Ff1pnP2qPGhtYAgC7zD3fdWCUfvafaoTJEX"),
2056
2063
  MPL_CORE: new import_web3.PublicKey("CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d"),
2064
+ REFERRAL_ID: new import_web3.PublicKey("8jMvRkeiV7ge5k8X5swCdtbR9h4DrM1SgGPbhDCgPexy"),
2065
+ //my wallet
2057
2066
  ADMIN_FOR_CREDIT_BUY: new import_web3.PublicKey(
2058
2067
  "ELaia39FeuTV1EttanpKMy6jbWViJAmjUurnZCB7VxBg"
2059
2068
  ),
2060
2069
  RENT_TOKEN_ID: new import_web3.PublicKey("SysvarRent111111111111111111111111111111111"),
2061
2070
  SYSTEM_PROGRAM_ID: new import_web3.PublicKey("11111111111111111111111111111111")
2062
2071
  };
2072
+ var PLATFORM = /* @__PURE__ */ ((PLATFORM2) => {
2073
+ PLATFORM2["DEV"] = "Dev";
2074
+ PLATFORM2["STAGE"] = "Stage";
2075
+ PLATFORM2["PROD"] = "Prod";
2076
+ return PLATFORM2;
2077
+ })(PLATFORM || {});
2063
2078
  var ENV = /* @__PURE__ */ ((ENV2) => {
2064
2079
  ENV2["Devnet"] = "Devnet";
2065
2080
  ENV2["Mainnet"] = "Mainnet";
@@ -2077,6 +2092,10 @@ var SOLANA_PUBKEYS_DEV = __spreadValues({
2077
2092
  LOOKUP_TABLE: new import_web3.PublicKey(SOLANA_DEV.LOOKUP_TABLE_STR),
2078
2093
  STATE_ID: new import_web3.PublicKey(SOLANA_DEV.STATE_ID_STR)
2079
2094
  }, SOLANA_COMMON);
2095
+ var SOLANA_PUBKEYS_STAGE = __spreadValues({
2096
+ LOOKUP_TABLE: new import_web3.PublicKey(SOLANA_STAGE.LOOKUP_TABLE_STR),
2097
+ STATE_ID: new import_web3.PublicKey(SOLANA_STAGE.STATE_ID_STR)
2098
+ }, SOLANA_COMMON);
2080
2099
  var SDK_SOLANA_CONFIG = {
2081
2100
  MINT_CHUNK_SIZE: 3,
2082
2101
  BUY_CHUNK_SIZE: 5,
@@ -2291,12 +2310,14 @@ function getPrice(_mintCount, _nftCount, _steepness, _midPoint, _startPrice, _en
2291
2310
 
2292
2311
  // src/solana/index.ts
2293
2312
  var SolanaConnector = class {
2294
- constructor(config, isMain) {
2313
+ constructor(config, platform) {
2295
2314
  this.program = null;
2296
2315
  this.lookupTableAccounts = null;
2297
2316
  this.config = config;
2298
- if (isMain == true) {
2317
+ if (platform == "Prod" /* PROD */) {
2299
2318
  this.configAddresses = SOLANA_PUBKEYS;
2319
+ } else if (platform == "Stage" /* STAGE */) {
2320
+ this.configAddresses = SOLANA_PUBKEYS_STAGE;
2300
2321
  } else {
2301
2322
  this.configAddresses = SOLANA_PUBKEYS_DEV;
2302
2323
  }
@@ -2529,6 +2550,24 @@ var SolanaConnector = class {
2529
2550
  );
2530
2551
  });
2531
2552
  }
2553
+ claimReferralReward(params) {
2554
+ return __async(this, null, function* () {
2555
+ if (!this.program) {
2556
+ throw new Error("Program not initialized");
2557
+ }
2558
+ const transaction = new import_web34.Transaction().add(
2559
+ import_web34.SystemProgram.transfer({
2560
+ fromPubkey: this.configAddresses.ADMIN_FOR_CREDIT_BUY,
2561
+ toPubkey: params.userPubkey,
2562
+ lamports: new import_decimal2.default(params.amount).mul(10 ** 9).toNumber()
2563
+ })
2564
+ );
2565
+ return yield this.config.sendTransaction(
2566
+ transaction,
2567
+ this.config.provider.connection
2568
+ );
2569
+ });
2570
+ }
2532
2571
  getCollectionInfo(collectionId) {
2533
2572
  return __async(this, null, function* () {
2534
2573
  if (!this.program) {
@@ -2581,6 +2620,7 @@ var SolanaConnector = class {
2581
2620
  const latestBlockhash = yield this.config.provider.connection.getLatestBlockhash("confirmed");
2582
2621
  if (isInitial == true) {
2583
2622
  let constants_pubkeys = [
2623
+ this.configAddresses.UPDATE_AUTHORITY_ID,
2584
2624
  this.configAddresses.STATE_ID,
2585
2625
  this.configAddresses.TREASURY_ID,
2586
2626
  this.configAddresses.MPL_CORE,
@@ -3222,23 +3262,23 @@ var SolanaConnector = class {
3222
3262
 
3223
3263
  // src/main_sdk.ts
3224
3264
  var FlipmemeSDK = class {
3225
- constructor(chainType, isMain, config) {
3265
+ constructor(chainType, plateform, config) {
3226
3266
  this.ethereum = null;
3227
3267
  this.solana = null;
3228
3268
  this.blockchainType = chainType;
3229
3269
  if (chainType === "ethereum" /* ETHEREUM */ && isEthereumConfig(config)) {
3230
3270
  this.ethereum = new EthereumConnector(config);
3231
3271
  } else if (chainType === "solana" /* SOLANA */ && isSolanaConfig(config)) {
3232
- this.solana = new SolanaConnector(config, isMain);
3272
+ this.solana = new SolanaConnector(config, plateform);
3233
3273
  } else {
3234
3274
  throw new Error("Invalid config for the given blockchain type");
3235
3275
  }
3236
3276
  }
3237
- updateConfig(chainType, isMain, config) {
3277
+ updateConfig(chainType, plateform, config) {
3238
3278
  if (chainType === "ethereum" /* ETHEREUM */ && isEthereumConfig(config)) {
3239
3279
  this.ethereum = new EthereumConnector(config);
3240
3280
  } else if (chainType === "solana" /* SOLANA */ && isSolanaConfig(config)) {
3241
- this.solana = new SolanaConnector(config, isMain);
3281
+ this.solana = new SolanaConnector(config, plateform);
3242
3282
  } else {
3243
3283
  throw new Error("Cannot update config for the given blockchain type");
3244
3284
  }
@@ -3474,6 +3514,7 @@ function placeTensorCollectionBid(price, quantity, collectionMint, privateKey, t
3474
3514
  COLLECTION_BID_PRICE,
3475
3515
  ENV,
3476
3516
  FlipmemeSDK,
3517
+ PLATFORM,
3477
3518
  PurcahseType,
3478
3519
  RPC,
3479
3520
  SDK_SOLANA_CONFIG,
@@ -3482,6 +3523,8 @@ function placeTensorCollectionBid(price, quantity, collectionMint, privateKey, t
3482
3523
  SOLANA_MAIN,
3483
3524
  SOLANA_PUBKEYS,
3484
3525
  SOLANA_PUBKEYS_DEV,
3526
+ SOLANA_PUBKEYS_STAGE,
3527
+ SOLANA_STAGE,
3485
3528
  VALID_SIZE_PAIR,
3486
3529
  decodeStr,
3487
3530
  isEthereumConfig,