flipmeme-sdk 1.2.52 → 1.2.54

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
@@ -50,6 +50,18 @@ interface NftInfo {
50
50
  nftId: string;
51
51
  nftOnwer: string;
52
52
  }
53
+ interface NetworkAddress {
54
+ LOOKUP_TABLE: PublicKey;
55
+ STATE_ID: PublicKey;
56
+ TREASURY_ID: PublicKey;
57
+ SELL_OUT_ID: PublicKey;
58
+ LP_PROVISIONER_ID: PublicKey;
59
+ ROYALITY_ID: PublicKey;
60
+ MPL_CORE: PublicKey;
61
+ ADMIN_FOR_CREDIT_BUY: PublicKey;
62
+ RENT_TOKEN_ID: PublicKey;
63
+ SYSTEM_PROGRAM_ID: PublicKey;
64
+ }
53
65
  interface BuyResponse {
54
66
  buyer: string;
55
67
  collectionAddress: string;
@@ -130,8 +142,8 @@ declare class FlipmemeSDK {
130
142
  private blockchainType;
131
143
  private ethereum;
132
144
  private solana;
133
- constructor(chainType: BlockchainType, config: EthereumConfig | SolanaConfig);
134
- updateConfig(chainType: BlockchainType, config: EthereumConfig | SolanaConfig): void;
145
+ constructor(chainType: BlockchainType, isMain: boolean, config: EthereumConfig | SolanaConfig);
146
+ updateConfig(chainType: BlockchainType, isMain: boolean, config: EthereumConfig | SolanaConfig): void;
135
147
  createCollection(params: CollectionParams): Promise<CreateCollectionResponse>;
136
148
  buy(params: BuyParams): Promise<BuyResponse[]>;
137
149
  flipSell(params: SellParams): Promise<SellResponse[]>;
@@ -186,21 +198,23 @@ declare class FlipmemeSDK {
186
198
  getInstructionData(instruction: string): Promise<void>;
187
199
  }
188
200
 
189
- declare const SOLANA: {
201
+ declare const SOLANA_MAIN: {
202
+ LOOKUP_TABLE_STR: string;
190
203
  STATE_ID_STR: string;
191
- TREASURY_ID_STR: string;
192
- SELL_OUT_ID_STR: string;
193
- LP_PROVISIONER_ID_STR: string;
194
- ROYALTY_ID_STR: string;
195
- TOKEN_METADATA_PROGRAM_ID_STR: string;
196
- MPL_CORE_STR: string;
197
- ADMIN_FOR_CREDIT_BUY_STR: string;
198
- MPL_BUBBLEGUM_STR: string;
199
- SPL_ACCOUNT_COMPRESSION_STR: string;
200
- SPL_NOOP_STR: string;
201
- SPL_TOKEN_STR: string;
202
- SPL_ATA_TOKEN_STR: string;
203
- RENT_TOKEN_STR: string;
204
+ };
205
+ declare const SOLANA_DEV: {
206
+ LOOKUP_TABLE_STR: string;
207
+ STATE_ID_STR: string;
208
+ };
209
+ declare const SOLANA_COMMON: {
210
+ TREASURY_ID: PublicKey;
211
+ SELL_OUT_ID: PublicKey;
212
+ LP_PROVISIONER_ID: PublicKey;
213
+ ROYALITY_ID: PublicKey;
214
+ MPL_CORE: PublicKey;
215
+ ADMIN_FOR_CREDIT_BUY: PublicKey;
216
+ RENT_TOKEN_ID: PublicKey;
217
+ SYSTEM_PROGRAM_ID: PublicKey;
204
218
  };
205
219
  declare enum ENV {
206
220
  Devnet = "Devnet",
@@ -211,22 +225,28 @@ declare const RPC: {
211
225
  Mainnet: string;
212
226
  };
213
227
  declare const SOLANA_PUBKEYS: {
228
+ TREASURY_ID: PublicKey;
229
+ SELL_OUT_ID: PublicKey;
230
+ LP_PROVISIONER_ID: PublicKey;
231
+ ROYALITY_ID: PublicKey;
232
+ MPL_CORE: PublicKey;
233
+ ADMIN_FOR_CREDIT_BUY: PublicKey;
234
+ RENT_TOKEN_ID: PublicKey;
235
+ SYSTEM_PROGRAM_ID: PublicKey;
214
236
  LOOKUP_TABLE: PublicKey;
215
237
  STATE_ID: PublicKey;
238
+ };
239
+ declare const SOLANA_PUBKEYS_DEV: {
216
240
  TREASURY_ID: PublicKey;
217
241
  SELL_OUT_ID: PublicKey;
218
242
  LP_PROVISIONER_ID: PublicKey;
219
243
  ROYALITY_ID: PublicKey;
220
- TOKEN_METADATA_PROGRAM_ID: PublicKey;
221
- ADMIN_FOR_CREDIT_BUY: PublicKey;
222
244
  MPL_CORE: PublicKey;
223
- MPL_BUBBLEGUM_ID: PublicKey;
224
- SPL_ACCOUNT_COMPRESSION_ID: PublicKey;
225
- SPL_NOOP_ID: PublicKey;
226
- SPL_TOKEN_ID: PublicKey;
227
- SPL_ATA_TOKEN_ID: PublicKey;
245
+ ADMIN_FOR_CREDIT_BUY: PublicKey;
228
246
  RENT_TOKEN_ID: PublicKey;
229
247
  SYSTEM_PROGRAM_ID: PublicKey;
248
+ LOOKUP_TABLE: PublicKey;
249
+ STATE_ID: PublicKey;
230
250
  };
231
251
  declare const SDK_SOLANA_CONFIG: {
232
252
  MINT_CHUNK_SIZE: number;
@@ -330,4 +350,4 @@ declare const VALID_SIZE_PAIR: {
330
350
  */
331
351
  declare function placeTensorCollectionBid(price: number, quantity: number, collectionMint: string, privateKey: string): Promise<void>;
332
352
 
333
- export { type AssetData, type AssetInfo, BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type Compression, type CreateCollectionResponse, ENV, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NftInfo, type Ownership, type ProfileSellParams, PurcahseType, RPC, type ReserveToken, SDK_SOLANA_CONFIG, SOLANA, SOLANA_PUBKEYS, type SellData, type SellParams, type SellResponse, type SolanaConfig, VALID_SIZE_PAIR, isEthereumConfig, isSolanaConfig, placeTensorCollectionBid };
353
+ export { type AssetData, type AssetInfo, BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type Compression, type CreateCollectionResponse, ENV, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NetworkAddress, type NftInfo, type Ownership, type ProfileSellParams, PurcahseType, RPC, type ReserveToken, 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, isEthereumConfig, isSolanaConfig, placeTensorCollectionBid };
package/dist/index.d.ts CHANGED
@@ -50,6 +50,18 @@ interface NftInfo {
50
50
  nftId: string;
51
51
  nftOnwer: string;
52
52
  }
53
+ interface NetworkAddress {
54
+ LOOKUP_TABLE: PublicKey;
55
+ STATE_ID: PublicKey;
56
+ TREASURY_ID: PublicKey;
57
+ SELL_OUT_ID: PublicKey;
58
+ LP_PROVISIONER_ID: PublicKey;
59
+ ROYALITY_ID: PublicKey;
60
+ MPL_CORE: PublicKey;
61
+ ADMIN_FOR_CREDIT_BUY: PublicKey;
62
+ RENT_TOKEN_ID: PublicKey;
63
+ SYSTEM_PROGRAM_ID: PublicKey;
64
+ }
53
65
  interface BuyResponse {
54
66
  buyer: string;
55
67
  collectionAddress: string;
@@ -130,8 +142,8 @@ declare class FlipmemeSDK {
130
142
  private blockchainType;
131
143
  private ethereum;
132
144
  private solana;
133
- constructor(chainType: BlockchainType, config: EthereumConfig | SolanaConfig);
134
- updateConfig(chainType: BlockchainType, config: EthereumConfig | SolanaConfig): void;
145
+ constructor(chainType: BlockchainType, isMain: boolean, config: EthereumConfig | SolanaConfig);
146
+ updateConfig(chainType: BlockchainType, isMain: boolean, config: EthereumConfig | SolanaConfig): void;
135
147
  createCollection(params: CollectionParams): Promise<CreateCollectionResponse>;
136
148
  buy(params: BuyParams): Promise<BuyResponse[]>;
137
149
  flipSell(params: SellParams): Promise<SellResponse[]>;
@@ -186,21 +198,23 @@ declare class FlipmemeSDK {
186
198
  getInstructionData(instruction: string): Promise<void>;
187
199
  }
188
200
 
189
- declare const SOLANA: {
201
+ declare const SOLANA_MAIN: {
202
+ LOOKUP_TABLE_STR: string;
190
203
  STATE_ID_STR: string;
191
- TREASURY_ID_STR: string;
192
- SELL_OUT_ID_STR: string;
193
- LP_PROVISIONER_ID_STR: string;
194
- ROYALTY_ID_STR: string;
195
- TOKEN_METADATA_PROGRAM_ID_STR: string;
196
- MPL_CORE_STR: string;
197
- ADMIN_FOR_CREDIT_BUY_STR: string;
198
- MPL_BUBBLEGUM_STR: string;
199
- SPL_ACCOUNT_COMPRESSION_STR: string;
200
- SPL_NOOP_STR: string;
201
- SPL_TOKEN_STR: string;
202
- SPL_ATA_TOKEN_STR: string;
203
- RENT_TOKEN_STR: string;
204
+ };
205
+ declare const SOLANA_DEV: {
206
+ LOOKUP_TABLE_STR: string;
207
+ STATE_ID_STR: string;
208
+ };
209
+ declare const SOLANA_COMMON: {
210
+ TREASURY_ID: PublicKey;
211
+ SELL_OUT_ID: PublicKey;
212
+ LP_PROVISIONER_ID: PublicKey;
213
+ ROYALITY_ID: PublicKey;
214
+ MPL_CORE: PublicKey;
215
+ ADMIN_FOR_CREDIT_BUY: PublicKey;
216
+ RENT_TOKEN_ID: PublicKey;
217
+ SYSTEM_PROGRAM_ID: PublicKey;
204
218
  };
205
219
  declare enum ENV {
206
220
  Devnet = "Devnet",
@@ -211,22 +225,28 @@ declare const RPC: {
211
225
  Mainnet: string;
212
226
  };
213
227
  declare const SOLANA_PUBKEYS: {
228
+ TREASURY_ID: PublicKey;
229
+ SELL_OUT_ID: PublicKey;
230
+ LP_PROVISIONER_ID: PublicKey;
231
+ ROYALITY_ID: PublicKey;
232
+ MPL_CORE: PublicKey;
233
+ ADMIN_FOR_CREDIT_BUY: PublicKey;
234
+ RENT_TOKEN_ID: PublicKey;
235
+ SYSTEM_PROGRAM_ID: PublicKey;
214
236
  LOOKUP_TABLE: PublicKey;
215
237
  STATE_ID: PublicKey;
238
+ };
239
+ declare const SOLANA_PUBKEYS_DEV: {
216
240
  TREASURY_ID: PublicKey;
217
241
  SELL_OUT_ID: PublicKey;
218
242
  LP_PROVISIONER_ID: PublicKey;
219
243
  ROYALITY_ID: PublicKey;
220
- TOKEN_METADATA_PROGRAM_ID: PublicKey;
221
- ADMIN_FOR_CREDIT_BUY: PublicKey;
222
244
  MPL_CORE: PublicKey;
223
- MPL_BUBBLEGUM_ID: PublicKey;
224
- SPL_ACCOUNT_COMPRESSION_ID: PublicKey;
225
- SPL_NOOP_ID: PublicKey;
226
- SPL_TOKEN_ID: PublicKey;
227
- SPL_ATA_TOKEN_ID: PublicKey;
245
+ ADMIN_FOR_CREDIT_BUY: PublicKey;
228
246
  RENT_TOKEN_ID: PublicKey;
229
247
  SYSTEM_PROGRAM_ID: PublicKey;
248
+ LOOKUP_TABLE: PublicKey;
249
+ STATE_ID: PublicKey;
230
250
  };
231
251
  declare const SDK_SOLANA_CONFIG: {
232
252
  MINT_CHUNK_SIZE: number;
@@ -330,4 +350,4 @@ declare const VALID_SIZE_PAIR: {
330
350
  */
331
351
  declare function placeTensorCollectionBid(price: number, quantity: number, collectionMint: string, privateKey: string): Promise<void>;
332
352
 
333
- export { type AssetData, type AssetInfo, BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type Compression, type CreateCollectionResponse, ENV, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NftInfo, type Ownership, type ProfileSellParams, PurcahseType, RPC, type ReserveToken, SDK_SOLANA_CONFIG, SOLANA, SOLANA_PUBKEYS, type SellData, type SellParams, type SellResponse, type SolanaConfig, VALID_SIZE_PAIR, isEthereumConfig, isSolanaConfig, placeTensorCollectionBid };
353
+ export { type AssetData, type AssetInfo, BlockchainType, type BuyCreditParams, type BuyParams, type BuyResponse, type CollectionInfo, type CollectionParams, type Compression, type CreateCollectionResponse, ENV, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NetworkAddress, type NftInfo, type Ownership, type ProfileSellParams, PurcahseType, RPC, type ReserveToken, 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, isEthereumConfig, isSolanaConfig, placeTensorCollectionBid };
package/dist/index.js CHANGED
@@ -3,8 +3,22 @@ var __create = Object.create;
3
3
  var __defProp = Object.defineProperty;
4
4
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
6
7
  var __getProtoOf = Object.getPrototypeOf;
7
8
  var __hasOwnProp = Object.prototype.hasOwnProperty;
9
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
10
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
11
+ var __spreadValues = (a, b) => {
12
+ for (var prop in b || (b = {}))
13
+ if (__hasOwnProp.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ if (__getOwnPropSymbols)
16
+ for (var prop of __getOwnPropSymbols(b)) {
17
+ if (__propIsEnum.call(b, prop))
18
+ __defNormalProp(a, prop, b[prop]);
19
+ }
20
+ return a;
21
+ };
8
22
  var __export = (target, all) => {
9
23
  for (var name in all)
10
24
  __defProp(target, name, { get: all[name], enumerable: true });
@@ -56,8 +70,11 @@ __export(index_exports, {
56
70
  PurcahseType: () => PurcahseType,
57
71
  RPC: () => RPC,
58
72
  SDK_SOLANA_CONFIG: () => SDK_SOLANA_CONFIG,
59
- SOLANA: () => SOLANA,
73
+ SOLANA_COMMON: () => SOLANA_COMMON,
74
+ SOLANA_DEV: () => SOLANA_DEV,
75
+ SOLANA_MAIN: () => SOLANA_MAIN,
60
76
  SOLANA_PUBKEYS: () => SOLANA_PUBKEYS,
77
+ SOLANA_PUBKEYS_DEV: () => SOLANA_PUBKEYS_DEV,
61
78
  VALID_SIZE_PAIR: () => VALID_SIZE_PAIR,
62
79
  isEthereumConfig: () => isEthereumConfig,
63
80
  isSolanaConfig: () => isSolanaConfig,
@@ -1980,21 +1997,27 @@ var flipmeme_default = {
1980
1997
 
1981
1998
  // src/constants.ts
1982
1999
  var import_web3 = require("@solana/web3.js");
1983
- var SOLANA = {
1984
- STATE_ID_STR: "EkSWmSmfmoLYmcsNgXtc1HZrfS59nD335kzPSytxwVS2",
1985
- TREASURY_ID_STR: "4kU2KESm5MaJSgieVAoAbUGMzGkm7WC4dPYjeCHQn5R6",
1986
- SELL_OUT_ID_STR: "5s7D5tQKjAa9au5VdpfZK7Zbwe4fQ87P25r312V2QKgr",
1987
- LP_PROVISIONER_ID_STR: "EXdeo9aKzzYUU9txeuRDkYdaPQZmhywDJFzkXpoSCW2S",
1988
- ROYALTY_ID_STR: "6oYqWqe23Ff1pnP2qPGhtYAgC7zD3fdWCUfvafaoTJEX",
1989
- TOKEN_METADATA_PROGRAM_ID_STR: "metaqbxxUerdq28cj1RbAWkYQm3ybzjb6a8bt518x1s",
1990
- MPL_CORE_STR: "CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d",
1991
- ADMIN_FOR_CREDIT_BUY_STR: "ELaia39FeuTV1EttanpKMy6jbWViJAmjUurnZCB7VxBg",
1992
- MPL_BUBBLEGUM_STR: "BGUMAp9Gq7iTEuizy4pqaxsTyUCBK68MDfK752saRPUY",
1993
- SPL_ACCOUNT_COMPRESSION_STR: "cmtDvXumGCrqC1Age74AVPhSRVXJMd8PJS91L8KbNCK",
1994
- SPL_NOOP_STR: "noopb9bkMVfRPU8AsbpTUg8AQkHtKwMYZiFUjNRtMmV",
1995
- SPL_TOKEN_STR: "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
1996
- SPL_ATA_TOKEN_STR: "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL",
1997
- RENT_TOKEN_STR: "SysvarRent111111111111111111111111111111111"
2000
+ var SOLANA_MAIN = {
2001
+ LOOKUP_TABLE_STR: "ChQ5u6P6Cfcgr75kdbewBVtHLziVbNAWFMA1vBrMVXtB",
2002
+ STATE_ID_STR: "EkSWmSmfmoLYmcsNgXtc1HZrfS59nD335kzPSytxwVS2"
2003
+ };
2004
+ var SOLANA_DEV = {
2005
+ LOOKUP_TABLE_STR: "7HEasJQWAuA3TAPP6KcxvsPaYaS38csWdaxSkYxWq43h",
2006
+ STATE_ID_STR: "H876G8i7bdkmEDngWQJCKTFXgwU9c5cao2BdCdnqVFw7"
2007
+ };
2008
+ var SOLANA_COMMON = {
2009
+ TREASURY_ID: new import_web3.PublicKey("4kU2KESm5MaJSgieVAoAbUGMzGkm7WC4dPYjeCHQn5R6"),
2010
+ SELL_OUT_ID: new import_web3.PublicKey("5s7D5tQKjAa9au5VdpfZK7Zbwe4fQ87P25r312V2QKgr"),
2011
+ LP_PROVISIONER_ID: new import_web3.PublicKey(
2012
+ "EXdeo9aKzzYUU9txeuRDkYdaPQZmhywDJFzkXpoSCW2S"
2013
+ ),
2014
+ ROYALITY_ID: new import_web3.PublicKey("6oYqWqe23Ff1pnP2qPGhtYAgC7zD3fdWCUfvafaoTJEX"),
2015
+ MPL_CORE: new import_web3.PublicKey("CoREENxT6tW1HoK8ypY1SxRMZTcVPm7R94rH4PZNhX7d"),
2016
+ ADMIN_FOR_CREDIT_BUY: new import_web3.PublicKey(
2017
+ "ELaia39FeuTV1EttanpKMy6jbWViJAmjUurnZCB7VxBg"
2018
+ ),
2019
+ RENT_TOKEN_ID: new import_web3.PublicKey("SysvarRent111111111111111111111111111111111"),
2020
+ SYSTEM_PROGRAM_ID: new import_web3.PublicKey("11111111111111111111111111111111")
1998
2021
  };
1999
2022
  var ENV = /* @__PURE__ */ ((ENV2) => {
2000
2023
  ENV2["Devnet"] = "Devnet";
@@ -2005,26 +2028,14 @@ var RPC = {
2005
2028
  Devnet: "https://capable-winter-daylight.solana-devnet.quiknode.pro/210364de274e46329afad68d1db4f09ef715933f/",
2006
2029
  Mainnet: "https://fabled-stylish-silence.solana-mainnet.quiknode.pro/73afcd7516c2dc108e89ee947646f6fbadcd156b/"
2007
2030
  };
2008
- var SOLANA_PUBKEYS = {
2009
- LOOKUP_TABLE: new import_web3.PublicKey("ChQ5u6P6Cfcgr75kdbewBVtHLziVbNAWFMA1vBrMVXtB"),
2010
- STATE_ID: new import_web3.PublicKey(SOLANA.STATE_ID_STR),
2011
- TREASURY_ID: new import_web3.PublicKey(SOLANA.TREASURY_ID_STR),
2012
- SELL_OUT_ID: new import_web3.PublicKey(SOLANA.SELL_OUT_ID_STR),
2013
- LP_PROVISIONER_ID: new import_web3.PublicKey(SOLANA.LP_PROVISIONER_ID_STR),
2014
- ROYALITY_ID: new import_web3.PublicKey(SOLANA.ROYALTY_ID_STR),
2015
- TOKEN_METADATA_PROGRAM_ID: new import_web3.PublicKey(
2016
- SOLANA.TOKEN_METADATA_PROGRAM_ID_STR
2017
- ),
2018
- ADMIN_FOR_CREDIT_BUY: new import_web3.PublicKey(SOLANA.ADMIN_FOR_CREDIT_BUY_STR),
2019
- MPL_CORE: new import_web3.PublicKey(SOLANA.MPL_CORE_STR),
2020
- MPL_BUBBLEGUM_ID: new import_web3.PublicKey(SOLANA.MPL_BUBBLEGUM_STR),
2021
- SPL_ACCOUNT_COMPRESSION_ID: new import_web3.PublicKey(SOLANA.SPL_ACCOUNT_COMPRESSION_STR),
2022
- SPL_NOOP_ID: new import_web3.PublicKey(SOLANA.SPL_NOOP_STR),
2023
- SPL_TOKEN_ID: new import_web3.PublicKey(SOLANA.SPL_TOKEN_STR),
2024
- SPL_ATA_TOKEN_ID: new import_web3.PublicKey(SOLANA.SPL_ATA_TOKEN_STR),
2025
- RENT_TOKEN_ID: new import_web3.PublicKey(SOLANA.RENT_TOKEN_STR),
2026
- SYSTEM_PROGRAM_ID: new import_web3.PublicKey("11111111111111111111111111111111")
2027
- };
2031
+ var SOLANA_PUBKEYS = __spreadValues({
2032
+ LOOKUP_TABLE: new import_web3.PublicKey(SOLANA_MAIN.LOOKUP_TABLE_STR),
2033
+ STATE_ID: new import_web3.PublicKey(SOLANA_MAIN.STATE_ID_STR)
2034
+ }, SOLANA_COMMON);
2035
+ var SOLANA_PUBKEYS_DEV = __spreadValues({
2036
+ LOOKUP_TABLE: new import_web3.PublicKey(SOLANA_DEV.LOOKUP_TABLE_STR),
2037
+ STATE_ID: new import_web3.PublicKey(SOLANA_DEV.STATE_ID_STR)
2038
+ }, SOLANA_COMMON);
2028
2039
  var SDK_SOLANA_CONFIG = {
2029
2040
  MINT_CHUNK_SIZE: 3,
2030
2041
  BUY_CHUNK_SIZE: 6,
@@ -2070,10 +2081,10 @@ var eventAuthority = (programId) => import_web32.PublicKey.findProgramAddressSyn
2070
2081
  [Buffer.from("__event_authority")],
2071
2082
  programId
2072
2083
  )[0];
2073
- var collectionPda = (collectionId, programId) => import_web32.PublicKey.findProgramAddressSync(
2084
+ var collectionPda = (configAddresses, collectionId, programId) => import_web32.PublicKey.findProgramAddressSync(
2074
2085
  [
2075
2086
  Buffer.from("collection"),
2076
- SOLANA_PUBKEYS.STATE_ID.toBuffer(),
2087
+ configAddresses.STATE_ID.toBuffer(),
2077
2088
  Buffer.from(collectionId)
2078
2089
  ],
2079
2090
  programId
@@ -2082,21 +2093,21 @@ var collectionNftPda = (collectionPda2, programId) => import_web32.PublicKey.fin
2082
2093
  [Buffer.from("collection_nft"), collectionPda2.toBuffer()],
2083
2094
  programId
2084
2095
  )[0];
2085
- var nftPda = (collectionPda2, nft, programId) => {
2096
+ var nftPda = (configAddresses, collectionPda2, nft, programId) => {
2086
2097
  return import_web32.PublicKey.findProgramAddressSync(
2087
2098
  [
2088
2099
  Buffer.from("nft"),
2089
- SOLANA_PUBKEYS.STATE_ID.toBuffer(),
2100
+ configAddresses.STATE_ID.toBuffer(),
2090
2101
  collectionPda2.toBuffer(),
2091
2102
  nft.toBuffer()
2092
2103
  ],
2093
2104
  programId
2094
2105
  )[0];
2095
2106
  };
2096
- var nftHolderPda = (buyerPublicKey, programId) => import_web32.PublicKey.findProgramAddressSync(
2107
+ var nftHolderPda = (configAddresses, buyerPublicKey, programId) => import_web32.PublicKey.findProgramAddressSync(
2097
2108
  [
2098
2109
  Buffer.from("nft_holder"),
2099
- SOLANA_PUBKEYS.STATE_ID.toBuffer(),
2110
+ configAddresses.STATE_ID.toBuffer(),
2100
2111
  buyerPublicKey.toBuffer()
2101
2112
  ],
2102
2113
  programId
@@ -2111,12 +2122,12 @@ var getTokenChunks = (items, chunkSize) => {
2111
2122
  }
2112
2123
  return tokenChunks;
2113
2124
  };
2114
- var getTradingAccounts = (programId, collectionId, userPublicKey, creatorAddress, nftSeed) => __async(void 0, null, function* () {
2115
- const collectionPda2 = collectionPda(collectionId, programId);
2125
+ var getTradingAccounts = (configAddresses, programId, collectionId, userPublicKey, creatorAddress, nftSeed) => __async(void 0, null, function* () {
2126
+ const collectionPda2 = collectionPda(configAddresses, collectionId, programId);
2116
2127
  const collectionNftPda2 = collectionNftPda(collectionPda2, programId);
2117
- const nftHolderPda2 = userPublicKey ? nftHolderPda(userPublicKey, programId) : void 0;
2128
+ const nftHolderPda2 = userPublicKey ? nftHolderPda(configAddresses, userPublicKey, programId) : void 0;
2118
2129
  const collectionCreator = creatorAddress && new import_web33.PublicKey(creatorAddress);
2119
- const nftPda2 = nftSeed != void 0 ? nftPda(collectionPda2, nftSeed, programId) : void 0;
2130
+ const nftPda2 = nftSeed != void 0 ? nftPda(configAddresses, collectionPda2, nftSeed, programId) : void 0;
2120
2131
  return {
2121
2132
  collectionPda: collectionPda2,
2122
2133
  collectionNftPda: collectionNftPda2,
@@ -2237,17 +2248,23 @@ function getPrice(_mintCount, _nftCount, _steepness, _midPoint, _startPrice, _en
2237
2248
 
2238
2249
  // src/solana/index.ts
2239
2250
  var SolanaConnector = class {
2240
- constructor(config) {
2251
+ constructor(config, isMain) {
2241
2252
  this.program = null;
2242
2253
  this.lookupTableAccounts = null;
2254
+ this.configAddresses = null;
2243
2255
  this.config = config;
2256
+ if (isMain == true) {
2257
+ this.configAddresses = SOLANA_PUBKEYS;
2258
+ } else {
2259
+ this.configAddresses = SOLANA_PUBKEYS_DEV;
2260
+ }
2244
2261
  this.setFlipmemeProgram();
2245
2262
  this.setLookupTableAccounts();
2246
2263
  }
2247
2264
  setLookupTableAccounts() {
2248
2265
  return __async(this, null, function* () {
2249
2266
  const lookupTableAccount = yield this.getLookupTableAccounts(
2250
- SOLANA_PUBKEYS.LOOKUP_TABLE
2267
+ this.configAddresses.LOOKUP_TABLE
2251
2268
  );
2252
2269
  this.lookupTableAccounts = lookupTableAccount;
2253
2270
  });
@@ -2268,11 +2285,13 @@ var SolanaConnector = class {
2268
2285
  throw new Error("Program not initialized");
2269
2286
  }
2270
2287
  const state = yield this.program.account.state.fetch(
2271
- SOLANA_PUBKEYS.STATE_ID
2288
+ this.configAddresses.STATE_ID
2272
2289
  );
2290
+ console.log("===state===", state);
2273
2291
  const collectionID = state.collectionCount;
2274
2292
  const { sessionId, name, tokenUri, totalSupply } = params;
2275
2293
  const { collectionPda: collectionPda2, collectionNftPda: collectionNftPda2 } = yield getTradingAccounts(
2294
+ this.configAddresses,
2276
2295
  this.program.programId,
2277
2296
  collectionID.toString(),
2278
2297
  this.config.wallet,
@@ -2287,11 +2306,11 @@ var SolanaConnector = class {
2287
2306
  new import_bn.default(1e5),
2288
2307
  new import_bn.default(5e5)
2289
2308
  ).accountsStrict({
2290
- state: SOLANA_PUBKEYS.STATE_ID,
2309
+ state: this.configAddresses.STATE_ID,
2291
2310
  collection: collectionPda2,
2292
2311
  collectionNft: collectionNftPda2,
2293
2312
  creator: this.config.wallet,
2294
- mplCore: SOLANA.MPL_CORE_STR,
2313
+ mplCore: this.configAddresses.MPL_CORE,
2295
2314
  systemProgram: import_web34.SystemProgram.programId,
2296
2315
  eventAuthority: eventAuthority(this.program.programId),
2297
2316
  program: this.program.programId
@@ -2457,7 +2476,7 @@ var SolanaConnector = class {
2457
2476
  const transaction = new import_web34.Transaction().add(
2458
2477
  import_web34.SystemProgram.transfer({
2459
2478
  fromPubkey: params.userPubkey,
2460
- toPubkey: SOLANA_PUBKEYS.ADMIN_FOR_CREDIT_BUY,
2479
+ toPubkey: this.configAddresses.ADMIN_FOR_CREDIT_BUY,
2461
2480
  lamports: new import_decimal2.default(params.amount).mul(10 ** 9).toNumber()
2462
2481
  })
2463
2482
  );
@@ -2473,6 +2492,7 @@ var SolanaConnector = class {
2473
2492
  throw new Error("Program not initialized");
2474
2493
  }
2475
2494
  const collectionAddress = yield collectionPda(
2495
+ this.configAddresses,
2476
2496
  collectionId,
2477
2497
  this.program.programId
2478
2498
  );
@@ -2518,12 +2538,12 @@ var SolanaConnector = class {
2518
2538
  const latestBlockhash = yield this.config.provider.connection.getLatestBlockhash("confirmed");
2519
2539
  if (isInitial == true) {
2520
2540
  let constants_pubkeys = [
2521
- SOLANA_PUBKEYS.STATE_ID,
2522
- SOLANA_PUBKEYS.TREASURY_ID,
2523
- SOLANA_PUBKEYS.MPL_CORE,
2524
- SOLANA_PUBKEYS.RENT_TOKEN_ID,
2525
- SOLANA_PUBKEYS.LP_PROVISIONER_ID,
2526
- SOLANA_PUBKEYS.SYSTEM_PROGRAM_ID
2541
+ this.configAddresses.STATE_ID,
2542
+ this.configAddresses.TREASURY_ID,
2543
+ this.configAddresses.MPL_CORE,
2544
+ this.configAddresses.RENT_TOKEN_ID,
2545
+ this.configAddresses.LP_PROVISIONER_ID,
2546
+ this.configAddresses.SYSTEM_PROGRAM_ID
2527
2547
  ];
2528
2548
  addressesToAdd.push(...constants_pubkeys);
2529
2549
  }
@@ -2627,6 +2647,7 @@ var SolanaConnector = class {
2627
2647
  collectionInfo: { creator }
2628
2648
  } = yield this.getCollectionInfo(collectionId);
2629
2649
  const { collectionPda: collectionPda2 } = yield getTradingAccounts(
2650
+ this.configAddresses,
2630
2651
  this.program.programId,
2631
2652
  collectionId,
2632
2653
  this.config.wallet,
@@ -2634,11 +2655,11 @@ var SolanaConnector = class {
2634
2655
  void 0
2635
2656
  );
2636
2657
  const instruction = yield (_a = this.program) == null ? void 0 : _a.methods.moveLiquidity().accountsStrict({
2637
- state: SOLANA_PUBKEYS.STATE_ID,
2658
+ state: this.configAddresses.STATE_ID,
2638
2659
  collection: collectionPda2,
2639
- lpSellout: SOLANA_PUBKEYS.SELL_OUT_ID,
2660
+ lpSellout: this.configAddresses.SELL_OUT_ID,
2640
2661
  collectionCreator: creator,
2641
- lpProvisioner: SOLANA_PUBKEYS.LP_PROVISIONER_ID,
2662
+ lpProvisioner: this.configAddresses.LP_PROVISIONER_ID,
2642
2663
  eventAuthority: eventAuthority(this.program.programId),
2643
2664
  program: this.program.programId
2644
2665
  }).instruction();
@@ -2674,6 +2695,7 @@ var SolanaConnector = class {
2674
2695
  let transaction = yield this.setUpInstructions(14e5);
2675
2696
  for (const token of chunk) {
2676
2697
  const { collectionPda: collectionPda2, collectionNftPda: collectionNftPda2, nftHolderPda: nftHolderPda2, nftPda: nftPda2 } = yield getTradingAccounts(
2698
+ this.configAddresses,
2677
2699
  this.program.programId,
2678
2700
  collectionId,
2679
2701
  new import_web34.PublicKey(token.nftOnwer),
@@ -2681,14 +2703,14 @@ var SolanaConnector = class {
2681
2703
  new import_web34.PublicKey(token.nftId)
2682
2704
  );
2683
2705
  const instruction = yield this.program.methods.ejectNft(new import_web34.PublicKey(token.nftId)).accountsStrict({
2684
- state: SOLANA_PUBKEYS.STATE_ID,
2706
+ state: this.configAddresses.STATE_ID,
2685
2707
  collection: collectionPda2,
2686
2708
  collectionNft: collectionNftPda2,
2687
2709
  nftOwner: new import_web34.PublicKey(token.nftOnwer),
2688
2710
  nftHolder: nftHolderPda2,
2689
2711
  nft: nftPda2,
2690
2712
  operator: this.config.wallet,
2691
- mplCore: SOLANA_PUBKEYS.MPL_CORE,
2713
+ mplCore: this.configAddresses.MPL_CORE,
2692
2714
  systemProgram: import_web34.SystemProgram.programId,
2693
2715
  eventAuthority: eventAuthority(this.program.programId),
2694
2716
  program: this.program.programId
@@ -2723,7 +2745,7 @@ var SolanaConnector = class {
2723
2745
  throw new Error("Program not initialized");
2724
2746
  }
2725
2747
  const state = yield this.program.account.state.fetch(
2726
- SOLANA_PUBKEYS.STATE_ID
2748
+ this.configAddresses.STATE_ID
2727
2749
  );
2728
2750
  return state;
2729
2751
  });
@@ -2810,6 +2832,7 @@ var SolanaConnector = class {
2810
2832
  );
2811
2833
  const transactions = [];
2812
2834
  const { collectionPda: collectionPda2, collectionNftPda: collectionNftPda2, nftHolderPda: nftHolderPda2 } = yield getTradingAccounts(
2835
+ this.configAddresses,
2813
2836
  this.program.programId,
2814
2837
  collectionId,
2815
2838
  userPublicKey,
@@ -2821,19 +2844,20 @@ var SolanaConnector = class {
2821
2844
  let transaction = yield this.setUpInstructions(14e5);
2822
2845
  for (const nft of chunk) {
2823
2846
  const nftPda2 = nftPda(
2847
+ this.configAddresses,
2824
2848
  collectionPda2,
2825
2849
  new import_web34.PublicKey(nft),
2826
2850
  this.program.programId
2827
2851
  );
2828
2852
  const instruction = yield this.program.methods.buy(new import_web34.PublicKey(nft)).accountsStrict({
2829
- state: SOLANA_PUBKEYS.STATE_ID,
2853
+ state: this.configAddresses.STATE_ID,
2830
2854
  collection: collectionPda2,
2831
2855
  collectionNft: collectionNftPda2,
2832
- treasury: SOLANA_PUBKEYS.TREASURY_ID,
2856
+ treasury: this.configAddresses.TREASURY_ID,
2833
2857
  nftHolder: nftHolderPda2,
2834
2858
  nft: nftPda2,
2835
2859
  buyer: userPublicKey,
2836
- mplCore: SOLANA_PUBKEYS.MPL_CORE,
2860
+ mplCore: this.configAddresses.MPL_CORE,
2837
2861
  systemProgram: import_web34.SystemProgram.programId,
2838
2862
  program: this.program.programId,
2839
2863
  eventAuthority: eventAuthority(this.program.programId)
@@ -2860,6 +2884,7 @@ var SolanaConnector = class {
2860
2884
  );
2861
2885
  const transactions = [];
2862
2886
  const { collectionPda: collectionPda2, collectionNftPda: collectionNftPda2, nftHolderPda: nftHolderPda2 } = yield getTradingAccounts(
2887
+ this.configAddresses,
2863
2888
  this.program.programId,
2864
2889
  collectionId,
2865
2890
  userPublicKey,
@@ -2871,19 +2896,20 @@ var SolanaConnector = class {
2871
2896
  let transaction = yield this.setUpInstructions(14e5);
2872
2897
  for (const nft of chunk) {
2873
2898
  const nftPda2 = nftPda(
2899
+ this.configAddresses,
2874
2900
  collectionPda2,
2875
2901
  new import_web34.PublicKey(nft),
2876
2902
  this.program.programId
2877
2903
  );
2878
2904
  const instruction = yield this.program.methods.sell(new import_web34.PublicKey(nft)).accountsStrict({
2879
- state: SOLANA_PUBKEYS.STATE_ID,
2905
+ state: this.configAddresses.STATE_ID,
2880
2906
  collection: collectionPda2,
2881
2907
  collectionNft: collectionNftPda2,
2882
- treasury: SOLANA_PUBKEYS.TREASURY_ID,
2908
+ treasury: this.configAddresses.TREASURY_ID,
2883
2909
  nftHolder: nftHolderPda2,
2884
2910
  nft: nftPda2,
2885
2911
  seller: userPublicKey,
2886
- mplCore: SOLANA_PUBKEYS.MPL_CORE,
2912
+ mplCore: this.configAddresses.MPL_CORE,
2887
2913
  systemProgram: import_web34.SystemProgram.programId,
2888
2914
  program: this.program.programId,
2889
2915
  eventAuthority: eventAuthority(this.program.programId)
@@ -2914,6 +2940,7 @@ var SolanaConnector = class {
2914
2940
  const tokenChunks = getTokenChunks(tokens, chunkSize);
2915
2941
  const transactions = [];
2916
2942
  const { nftHolderPda: nftHolderPda2, collectionPda: collectionPda2, collectionNftPda: collectionNftPda2 } = yield getTradingAccounts(
2943
+ this.configAddresses,
2917
2944
  this.program.programId,
2918
2945
  collectionId,
2919
2946
  userPublicKey,
@@ -2926,20 +2953,21 @@ var SolanaConnector = class {
2926
2953
  for (const nftName of chunks) {
2927
2954
  const nftSeedKeypair = import_web34.Keypair.generate();
2928
2955
  const nftPda2 = nftPda(
2956
+ this.configAddresses,
2929
2957
  collectionPda2,
2930
2958
  nftSeedKeypair.publicKey,
2931
2959
  this.program.programId
2932
2960
  );
2933
2961
  console.log("=======nft seed==========", nftSeedKeypair.publicKey);
2934
2962
  const instruction = yield this.program.methods.mintAndBuy(nftSeedKeypair.publicKey, nftName, baseUri).accountsStrict({
2935
- state: SOLANA_PUBKEYS.STATE_ID,
2963
+ state: this.configAddresses.STATE_ID,
2936
2964
  collection: collectionPda2,
2937
2965
  collectionNft: collectionNftPda2,
2938
- treasury: SOLANA_PUBKEYS.TREASURY_ID,
2966
+ treasury: this.configAddresses.TREASURY_ID,
2939
2967
  nftHolder: nftHolderPda2,
2940
2968
  nft: nftPda2,
2941
2969
  buyer: userPublicKey,
2942
- mplCore: SOLANA_PUBKEYS.MPL_CORE,
2970
+ mplCore: this.configAddresses.MPL_CORE,
2943
2971
  systemProgram: import_web34.SystemProgram.programId,
2944
2972
  eventAuthority: eventAuthority(this.program.programId),
2945
2973
  program: this.program.programId
@@ -3016,23 +3044,23 @@ var SolanaConnector = class {
3016
3044
 
3017
3045
  // src/main_sdk.ts
3018
3046
  var FlipmemeSDK = class {
3019
- constructor(chainType, config) {
3047
+ constructor(chainType, isMain, config) {
3020
3048
  this.ethereum = null;
3021
3049
  this.solana = null;
3022
3050
  this.blockchainType = chainType;
3023
3051
  if (chainType === "ethereum" /* ETHEREUM */ && isEthereumConfig(config)) {
3024
3052
  this.ethereum = new EthereumConnector(config);
3025
3053
  } else if (chainType === "solana" /* SOLANA */ && isSolanaConfig(config)) {
3026
- this.solana = new SolanaConnector(config);
3054
+ this.solana = new SolanaConnector(config, isMain);
3027
3055
  } else {
3028
3056
  throw new Error("Invalid config for the given blockchain type");
3029
3057
  }
3030
3058
  }
3031
- updateConfig(chainType, config) {
3059
+ updateConfig(chainType, isMain, config) {
3032
3060
  if (chainType === "ethereum" /* ETHEREUM */ && isEthereumConfig(config)) {
3033
3061
  this.ethereum = new EthereumConnector(config);
3034
3062
  } else if (chainType === "solana" /* SOLANA */ && isSolanaConfig(config)) {
3035
- this.solana = new SolanaConnector(config);
3063
+ this.solana = new SolanaConnector(config, isMain);
3036
3064
  } else {
3037
3065
  throw new Error("Cannot update config for the given blockchain type");
3038
3066
  }
@@ -3243,8 +3271,11 @@ function placeTensorCollectionBid(price, quantity, collectionMint, privateKey) {
3243
3271
  PurcahseType,
3244
3272
  RPC,
3245
3273
  SDK_SOLANA_CONFIG,
3246
- SOLANA,
3274
+ SOLANA_COMMON,
3275
+ SOLANA_DEV,
3276
+ SOLANA_MAIN,
3247
3277
  SOLANA_PUBKEYS,
3278
+ SOLANA_PUBKEYS_DEV,
3248
3279
  VALID_SIZE_PAIR,
3249
3280
  isEthereumConfig,
3250
3281
  isSolanaConfig,