flipmeme-sdk 1.2.52 → 1.2.53

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
@@ -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,7 +2285,7 @@ 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
  );
2273
2290
  const collectionID = state.collectionCount;
2274
2291
  const { sessionId, name, tokenUri, totalSupply } = params;
@@ -2287,11 +2304,11 @@ var SolanaConnector = class {
2287
2304
  new import_bn.default(1e5),
2288
2305
  new import_bn.default(5e5)
2289
2306
  ).accountsStrict({
2290
- state: SOLANA_PUBKEYS.STATE_ID,
2307
+ state: this.configAddresses.STATE_ID,
2291
2308
  collection: collectionPda2,
2292
2309
  collectionNft: collectionNftPda2,
2293
2310
  creator: this.config.wallet,
2294
- mplCore: SOLANA.MPL_CORE_STR,
2311
+ mplCore: this.configAddresses.MPL_CORE,
2295
2312
  systemProgram: import_web34.SystemProgram.programId,
2296
2313
  eventAuthority: eventAuthority(this.program.programId),
2297
2314
  program: this.program.programId
@@ -2457,7 +2474,7 @@ var SolanaConnector = class {
2457
2474
  const transaction = new import_web34.Transaction().add(
2458
2475
  import_web34.SystemProgram.transfer({
2459
2476
  fromPubkey: params.userPubkey,
2460
- toPubkey: SOLANA_PUBKEYS.ADMIN_FOR_CREDIT_BUY,
2477
+ toPubkey: this.configAddresses.ADMIN_FOR_CREDIT_BUY,
2461
2478
  lamports: new import_decimal2.default(params.amount).mul(10 ** 9).toNumber()
2462
2479
  })
2463
2480
  );
@@ -2473,6 +2490,7 @@ var SolanaConnector = class {
2473
2490
  throw new Error("Program not initialized");
2474
2491
  }
2475
2492
  const collectionAddress = yield collectionPda(
2493
+ this.configAddresses,
2476
2494
  collectionId,
2477
2495
  this.program.programId
2478
2496
  );
@@ -2518,12 +2536,12 @@ var SolanaConnector = class {
2518
2536
  const latestBlockhash = yield this.config.provider.connection.getLatestBlockhash("confirmed");
2519
2537
  if (isInitial == true) {
2520
2538
  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
2539
+ this.configAddresses.STATE_ID,
2540
+ this.configAddresses.TREASURY_ID,
2541
+ this.configAddresses.MPL_CORE,
2542
+ this.configAddresses.RENT_TOKEN_ID,
2543
+ this.configAddresses.LP_PROVISIONER_ID,
2544
+ this.configAddresses.SYSTEM_PROGRAM_ID
2527
2545
  ];
2528
2546
  addressesToAdd.push(...constants_pubkeys);
2529
2547
  }
@@ -2634,11 +2652,11 @@ var SolanaConnector = class {
2634
2652
  void 0
2635
2653
  );
2636
2654
  const instruction = yield (_a = this.program) == null ? void 0 : _a.methods.moveLiquidity().accountsStrict({
2637
- state: SOLANA_PUBKEYS.STATE_ID,
2655
+ state: this.configAddresses.STATE_ID,
2638
2656
  collection: collectionPda2,
2639
- lpSellout: SOLANA_PUBKEYS.SELL_OUT_ID,
2657
+ lpSellout: this.configAddresses.SELL_OUT_ID,
2640
2658
  collectionCreator: creator,
2641
- lpProvisioner: SOLANA_PUBKEYS.LP_PROVISIONER_ID,
2659
+ lpProvisioner: this.configAddresses.LP_PROVISIONER_ID,
2642
2660
  eventAuthority: eventAuthority(this.program.programId),
2643
2661
  program: this.program.programId
2644
2662
  }).instruction();
@@ -2681,14 +2699,14 @@ var SolanaConnector = class {
2681
2699
  new import_web34.PublicKey(token.nftId)
2682
2700
  );
2683
2701
  const instruction = yield this.program.methods.ejectNft(new import_web34.PublicKey(token.nftId)).accountsStrict({
2684
- state: SOLANA_PUBKEYS.STATE_ID,
2702
+ state: this.configAddresses.STATE_ID,
2685
2703
  collection: collectionPda2,
2686
2704
  collectionNft: collectionNftPda2,
2687
2705
  nftOwner: new import_web34.PublicKey(token.nftOnwer),
2688
2706
  nftHolder: nftHolderPda2,
2689
2707
  nft: nftPda2,
2690
2708
  operator: this.config.wallet,
2691
- mplCore: SOLANA_PUBKEYS.MPL_CORE,
2709
+ mplCore: this.configAddresses.MPL_CORE,
2692
2710
  systemProgram: import_web34.SystemProgram.programId,
2693
2711
  eventAuthority: eventAuthority(this.program.programId),
2694
2712
  program: this.program.programId
@@ -2723,7 +2741,7 @@ var SolanaConnector = class {
2723
2741
  throw new Error("Program not initialized");
2724
2742
  }
2725
2743
  const state = yield this.program.account.state.fetch(
2726
- SOLANA_PUBKEYS.STATE_ID
2744
+ this.configAddresses.STATE_ID
2727
2745
  );
2728
2746
  return state;
2729
2747
  });
@@ -2821,19 +2839,20 @@ var SolanaConnector = class {
2821
2839
  let transaction = yield this.setUpInstructions(14e5);
2822
2840
  for (const nft of chunk) {
2823
2841
  const nftPda2 = nftPda(
2842
+ this.configAddresses,
2824
2843
  collectionPda2,
2825
2844
  new import_web34.PublicKey(nft),
2826
2845
  this.program.programId
2827
2846
  );
2828
2847
  const instruction = yield this.program.methods.buy(new import_web34.PublicKey(nft)).accountsStrict({
2829
- state: SOLANA_PUBKEYS.STATE_ID,
2848
+ state: this.configAddresses.STATE_ID,
2830
2849
  collection: collectionPda2,
2831
2850
  collectionNft: collectionNftPda2,
2832
- treasury: SOLANA_PUBKEYS.TREASURY_ID,
2851
+ treasury: this.configAddresses.TREASURY_ID,
2833
2852
  nftHolder: nftHolderPda2,
2834
2853
  nft: nftPda2,
2835
2854
  buyer: userPublicKey,
2836
- mplCore: SOLANA_PUBKEYS.MPL_CORE,
2855
+ mplCore: this.configAddresses.MPL_CORE,
2837
2856
  systemProgram: import_web34.SystemProgram.programId,
2838
2857
  program: this.program.programId,
2839
2858
  eventAuthority: eventAuthority(this.program.programId)
@@ -2871,19 +2890,20 @@ var SolanaConnector = class {
2871
2890
  let transaction = yield this.setUpInstructions(14e5);
2872
2891
  for (const nft of chunk) {
2873
2892
  const nftPda2 = nftPda(
2893
+ this.configAddresses,
2874
2894
  collectionPda2,
2875
2895
  new import_web34.PublicKey(nft),
2876
2896
  this.program.programId
2877
2897
  );
2878
2898
  const instruction = yield this.program.methods.sell(new import_web34.PublicKey(nft)).accountsStrict({
2879
- state: SOLANA_PUBKEYS.STATE_ID,
2899
+ state: this.configAddresses.STATE_ID,
2880
2900
  collection: collectionPda2,
2881
2901
  collectionNft: collectionNftPda2,
2882
- treasury: SOLANA_PUBKEYS.TREASURY_ID,
2902
+ treasury: this.configAddresses.TREASURY_ID,
2883
2903
  nftHolder: nftHolderPda2,
2884
2904
  nft: nftPda2,
2885
2905
  seller: userPublicKey,
2886
- mplCore: SOLANA_PUBKEYS.MPL_CORE,
2906
+ mplCore: this.configAddresses.MPL_CORE,
2887
2907
  systemProgram: import_web34.SystemProgram.programId,
2888
2908
  program: this.program.programId,
2889
2909
  eventAuthority: eventAuthority(this.program.programId)
@@ -2926,20 +2946,21 @@ var SolanaConnector = class {
2926
2946
  for (const nftName of chunks) {
2927
2947
  const nftSeedKeypair = import_web34.Keypair.generate();
2928
2948
  const nftPda2 = nftPda(
2949
+ this.configAddresses,
2929
2950
  collectionPda2,
2930
2951
  nftSeedKeypair.publicKey,
2931
2952
  this.program.programId
2932
2953
  );
2933
2954
  console.log("=======nft seed==========", nftSeedKeypair.publicKey);
2934
2955
  const instruction = yield this.program.methods.mintAndBuy(nftSeedKeypair.publicKey, nftName, baseUri).accountsStrict({
2935
- state: SOLANA_PUBKEYS.STATE_ID,
2956
+ state: this.configAddresses.STATE_ID,
2936
2957
  collection: collectionPda2,
2937
2958
  collectionNft: collectionNftPda2,
2938
- treasury: SOLANA_PUBKEYS.TREASURY_ID,
2959
+ treasury: this.configAddresses.TREASURY_ID,
2939
2960
  nftHolder: nftHolderPda2,
2940
2961
  nft: nftPda2,
2941
2962
  buyer: userPublicKey,
2942
- mplCore: SOLANA_PUBKEYS.MPL_CORE,
2963
+ mplCore: this.configAddresses.MPL_CORE,
2943
2964
  systemProgram: import_web34.SystemProgram.programId,
2944
2965
  eventAuthority: eventAuthority(this.program.programId),
2945
2966
  program: this.program.programId
@@ -3016,23 +3037,23 @@ var SolanaConnector = class {
3016
3037
 
3017
3038
  // src/main_sdk.ts
3018
3039
  var FlipmemeSDK = class {
3019
- constructor(chainType, config) {
3040
+ constructor(chainType, isMain, config) {
3020
3041
  this.ethereum = null;
3021
3042
  this.solana = null;
3022
3043
  this.blockchainType = chainType;
3023
3044
  if (chainType === "ethereum" /* ETHEREUM */ && isEthereumConfig(config)) {
3024
3045
  this.ethereum = new EthereumConnector(config);
3025
3046
  } else if (chainType === "solana" /* SOLANA */ && isSolanaConfig(config)) {
3026
- this.solana = new SolanaConnector(config);
3047
+ this.solana = new SolanaConnector(config, isMain);
3027
3048
  } else {
3028
3049
  throw new Error("Invalid config for the given blockchain type");
3029
3050
  }
3030
3051
  }
3031
- updateConfig(chainType, config) {
3052
+ updateConfig(chainType, isMain, config) {
3032
3053
  if (chainType === "ethereum" /* ETHEREUM */ && isEthereumConfig(config)) {
3033
3054
  this.ethereum = new EthereumConnector(config);
3034
3055
  } else if (chainType === "solana" /* SOLANA */ && isSolanaConfig(config)) {
3035
- this.solana = new SolanaConnector(config);
3056
+ this.solana = new SolanaConnector(config, isMain);
3036
3057
  } else {
3037
3058
  throw new Error("Cannot update config for the given blockchain type");
3038
3059
  }
@@ -3243,8 +3264,11 @@ function placeTensorCollectionBid(price, quantity, collectionMint, privateKey) {
3243
3264
  PurcahseType,
3244
3265
  RPC,
3245
3266
  SDK_SOLANA_CONFIG,
3246
- SOLANA,
3267
+ SOLANA_COMMON,
3268
+ SOLANA_DEV,
3269
+ SOLANA_MAIN,
3247
3270
  SOLANA_PUBKEYS,
3271
+ SOLANA_PUBKEYS_DEV,
3248
3272
  VALID_SIZE_PAIR,
3249
3273
  isEthereumConfig,
3250
3274
  isSolanaConfig,