flipmeme-sdk 1.3.70 → 1.3.72

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
@@ -139,7 +139,6 @@ interface ProfileSellParams {
139
139
  }
140
140
  interface EthProfileSellParams {
141
141
  data: Record<string, EthSellData>;
142
- slippage: number;
143
142
  minPrice: string;
144
143
  }
145
144
  declare function isEthereumConfig(config: EthereumConfig | SolanaConfig): config is EthereumConfig;
@@ -490,7 +489,7 @@ declare class FlipmemeSDK {
490
489
  }>;
491
490
  }>;
492
491
  getTotalPrice(type: PurcahseType, collectionId: string, amount: number): Promise<string>;
493
- profileSellTotalPrice(data: EthProfileSellParams): Promise<string>;
492
+ profileSellTotalPrice(data: Record<string, EthSellData>): Promise<string>;
494
493
  /**
495
494
  * create lookup table account with lookuptable addresses and return lookup table account
496
495
  * @param lookupTableAddresses addresses to add lookup table
@@ -558,4 +557,6 @@ declare function getUSDPriceInWETH(): Promise<number>;
558
557
  */
559
558
  declare function placeMagicEdenCollectionBid(price: number, quantity: number, collectionMint: string, privateKey: string, magicApiKey: string): Promise<String | undefined>;
560
559
 
561
- export { APE_DEV, type AssetData, type AssetInfo, BASE_DEV, BlockchainType, type BuyParams, type BuyResponse, COLLECTION_BID_PRICE, type CollectionInfo, type CollectionParams, type Compression, type ConfirmResult, type CreateCollectionResponse, ENV, type ETHAddresses, ETHEREUM_DEV, ETHEREUM_RPC, ETH_ADDR, ETH_COMMON, type EthAddr, type EthBuyParams, type EthProfileSellParams, type EthSellData, type EthSellParams, type EthTransferParams, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NetworkAddress, type NftInfo, type Ownership, PLATFORM, type ProfileSellParams, PurcahseType, ROUTER, 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, TOKENS, type TransactionData, type TransferParams, VALID_SIZE_PAIR, decodeStr, getPrice, getSOLPriceInUSD, getUSDPriceInSOL, getUSDPriceInWETH, isEthereumConfig, isSolanaConfig, placeMagicEdenCollectionBid, placeTensorCollectionBid };
560
+ declare function placeSpaaceCollectionBid(price: number, collection: string, tokenIdStart: string, tokenIdEnd: string, walletAddr: string, apiKey: string, source?: string): Promise<String | undefined>;
561
+
562
+ export { APE_DEV, type AssetData, type AssetInfo, BASE_DEV, BlockchainType, type BuyParams, type BuyResponse, COLLECTION_BID_PRICE, type CollectionInfo, type CollectionParams, type Compression, type ConfirmResult, type CreateCollectionResponse, ENV, type ETHAddresses, ETHEREUM_DEV, ETHEREUM_RPC, ETH_ADDR, ETH_COMMON, type EthAddr, type EthBuyParams, type EthProfileSellParams, type EthSellData, type EthSellParams, type EthTransferParams, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NetworkAddress, type NftInfo, type Ownership, PLATFORM, type ProfileSellParams, PurcahseType, ROUTER, 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, TOKENS, type TransactionData, type TransferParams, VALID_SIZE_PAIR, decodeStr, getPrice, getSOLPriceInUSD, getUSDPriceInSOL, getUSDPriceInWETH, isEthereumConfig, isSolanaConfig, placeMagicEdenCollectionBid, placeSpaaceCollectionBid, placeTensorCollectionBid };
package/dist/index.d.ts CHANGED
@@ -139,7 +139,6 @@ interface ProfileSellParams {
139
139
  }
140
140
  interface EthProfileSellParams {
141
141
  data: Record<string, EthSellData>;
142
- slippage: number;
143
142
  minPrice: string;
144
143
  }
145
144
  declare function isEthereumConfig(config: EthereumConfig | SolanaConfig): config is EthereumConfig;
@@ -490,7 +489,7 @@ declare class FlipmemeSDK {
490
489
  }>;
491
490
  }>;
492
491
  getTotalPrice(type: PurcahseType, collectionId: string, amount: number): Promise<string>;
493
- profileSellTotalPrice(data: EthProfileSellParams): Promise<string>;
492
+ profileSellTotalPrice(data: Record<string, EthSellData>): Promise<string>;
494
493
  /**
495
494
  * create lookup table account with lookuptable addresses and return lookup table account
496
495
  * @param lookupTableAddresses addresses to add lookup table
@@ -558,4 +557,6 @@ declare function getUSDPriceInWETH(): Promise<number>;
558
557
  */
559
558
  declare function placeMagicEdenCollectionBid(price: number, quantity: number, collectionMint: string, privateKey: string, magicApiKey: string): Promise<String | undefined>;
560
559
 
561
- export { APE_DEV, type AssetData, type AssetInfo, BASE_DEV, BlockchainType, type BuyParams, type BuyResponse, COLLECTION_BID_PRICE, type CollectionInfo, type CollectionParams, type Compression, type ConfirmResult, type CreateCollectionResponse, ENV, type ETHAddresses, ETHEREUM_DEV, ETHEREUM_RPC, ETH_ADDR, ETH_COMMON, type EthAddr, type EthBuyParams, type EthProfileSellParams, type EthSellData, type EthSellParams, type EthTransferParams, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NetworkAddress, type NftInfo, type Ownership, PLATFORM, type ProfileSellParams, PurcahseType, ROUTER, 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, TOKENS, type TransactionData, type TransferParams, VALID_SIZE_PAIR, decodeStr, getPrice, getSOLPriceInUSD, getUSDPriceInSOL, getUSDPriceInWETH, isEthereumConfig, isSolanaConfig, placeMagicEdenCollectionBid, placeTensorCollectionBid };
560
+ declare function placeSpaaceCollectionBid(price: number, collection: string, tokenIdStart: string, tokenIdEnd: string, walletAddr: string, apiKey: string, source?: string): Promise<String | undefined>;
561
+
562
+ export { APE_DEV, type AssetData, type AssetInfo, BASE_DEV, BlockchainType, type BuyParams, type BuyResponse, COLLECTION_BID_PRICE, type CollectionInfo, type CollectionParams, type Compression, type ConfirmResult, type CreateCollectionResponse, ENV, type ETHAddresses, ETHEREUM_DEV, ETHEREUM_RPC, ETH_ADDR, ETH_COMMON, type EthAddr, type EthBuyParams, type EthProfileSellParams, type EthSellData, type EthSellParams, type EthTransferParams, type EthereumConfig, FlipmemeSDK, type MerkleProof, type NetworkAddress, type NftInfo, type Ownership, PLATFORM, type ProfileSellParams, PurcahseType, ROUTER, 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, TOKENS, type TransactionData, type TransferParams, VALID_SIZE_PAIR, decodeStr, getPrice, getSOLPriceInUSD, getUSDPriceInSOL, getUSDPriceInWETH, isEthereumConfig, isSolanaConfig, placeMagicEdenCollectionBid, placeSpaaceCollectionBid, placeTensorCollectionBid };
package/dist/index.js CHANGED
@@ -96,6 +96,7 @@ __export(index_exports, {
96
96
  isEthereumConfig: () => isEthereumConfig,
97
97
  isSolanaConfig: () => isSolanaConfig,
98
98
  placeMagicEdenCollectionBid: () => placeMagicEdenCollectionBid,
99
+ placeSpaaceCollectionBid: () => placeSpaaceCollectionBid,
99
100
  placeTensorCollectionBid: () => placeTensorCollectionBid
100
101
  });
101
102
  module.exports = __toCommonJS(index_exports);
@@ -34667,20 +34668,20 @@ var EthereumConnector = class {
34667
34668
  return { successCount: totalCount, failedCount: 0 };
34668
34669
  });
34669
34670
  }
34670
- profileSellMinPrice(params) {
34671
+ profileSellPrice(params) {
34671
34672
  return __async(this, null, function* () {
34672
34673
  let factory = new Factory__factory(this.config.signer).attach(
34673
34674
  this.configAddresses.FACTORY
34674
34675
  );
34675
34676
  let collectionIds = [];
34676
34677
  let ids = [];
34677
- for (const collectionId in params.data) {
34678
- let items = params.data[collectionId];
34678
+ for (const collectionId in params) {
34679
+ let items = params[collectionId];
34679
34680
  collectionIds.push(collectionId);
34680
34681
  ids.push(items.tokenIds.length);
34681
34682
  }
34682
- const minPrice = yield factory.getTotalPriceOfSell(collectionIds, ids);
34683
- return minPrice.toString();
34683
+ const price = yield factory.getTotalPriceOfSell(collectionIds, ids);
34684
+ return price.toString();
34684
34685
  });
34685
34686
  }
34686
34687
  getFactoryInfo() {
@@ -40323,7 +40324,7 @@ var FlipmemeSDK = class {
40323
40324
  profileSellTotalPrice(data) {
40324
40325
  return __async(this, null, function* () {
40325
40326
  if (this.blockchainType === "ethereum" /* ETHEREUM */ && this.ethereum) {
40326
- return this.ethereum.profileSellMinPrice(data);
40327
+ return this.ethereum.profileSellPrice(data);
40327
40328
  } else {
40328
40329
  throw new Error("Cannot call this function");
40329
40330
  }
@@ -40694,6 +40695,37 @@ function fetchTxData(endpoint, apiKey) {
40694
40695
  return yield response.json();
40695
40696
  });
40696
40697
  }
40698
+
40699
+ // src/evm/spaace.ts
40700
+ var import_axios3 = __toESM(require("axios"));
40701
+ function placeSpaaceCollectionBid(price, collection, tokenIdStart, tokenIdEnd, walletAddr, apiKey, source = "spaace.io") {
40702
+ return __async(this, null, function* () {
40703
+ const BASE_SPAACE_URI = "https://api-ethereum.spaace.io/execute/bid/v5";
40704
+ const params = {
40705
+ maker: walletAddr,
40706
+ source,
40707
+ tokenSetId: `range:${collection}:${tokenIdStart}:${tokenIdEnd}`,
40708
+ weiPrice: price
40709
+ };
40710
+ try {
40711
+ let res = yield import_axios3.default.post(BASE_SPAACE_URI, params, {
40712
+ headers: {
40713
+ "Content-Type": "application/json",
40714
+ "x-api-key": apiKey
40715
+ }
40716
+ });
40717
+ console.log("res=====", res);
40718
+ if (res.status == 200) {
40719
+ return "Success";
40720
+ } else {
40721
+ return res.statusText;
40722
+ }
40723
+ } catch (e) {
40724
+ console.log("err=====", e);
40725
+ return void 0;
40726
+ }
40727
+ });
40728
+ }
40697
40729
  // Annotate the CommonJS export names for ESM import in node:
40698
40730
  0 && (module.exports = {
40699
40731
  APE_DEV,
@@ -40728,6 +40760,7 @@ function fetchTxData(endpoint, apiKey) {
40728
40760
  isEthereumConfig,
40729
40761
  isSolanaConfig,
40730
40762
  placeMagicEdenCollectionBid,
40763
+ placeSpaaceCollectionBid,
40731
40764
  placeTensorCollectionBid
40732
40765
  });
40733
40766
  //# sourceMappingURL=index.js.map