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 +4 -3
- package/dist/index.d.ts +4 -3
- package/dist/index.js +39 -6
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +38 -6
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.mjs
CHANGED
|
@@ -34618,20 +34618,20 @@ var EthereumConnector = class {
|
|
|
34618
34618
|
return { successCount: totalCount, failedCount: 0 };
|
|
34619
34619
|
});
|
|
34620
34620
|
}
|
|
34621
|
-
|
|
34621
|
+
profileSellPrice(params) {
|
|
34622
34622
|
return __async(this, null, function* () {
|
|
34623
34623
|
let factory = new Factory__factory(this.config.signer).attach(
|
|
34624
34624
|
this.configAddresses.FACTORY
|
|
34625
34625
|
);
|
|
34626
34626
|
let collectionIds = [];
|
|
34627
34627
|
let ids = [];
|
|
34628
|
-
for (const collectionId in params
|
|
34629
|
-
let items = params
|
|
34628
|
+
for (const collectionId in params) {
|
|
34629
|
+
let items = params[collectionId];
|
|
34630
34630
|
collectionIds.push(collectionId);
|
|
34631
34631
|
ids.push(items.tokenIds.length);
|
|
34632
34632
|
}
|
|
34633
|
-
const
|
|
34634
|
-
return
|
|
34633
|
+
const price = yield factory.getTotalPriceOfSell(collectionIds, ids);
|
|
34634
|
+
return price.toString();
|
|
34635
34635
|
});
|
|
34636
34636
|
}
|
|
34637
34637
|
getFactoryInfo() {
|
|
@@ -40288,7 +40288,7 @@ var FlipmemeSDK = class {
|
|
|
40288
40288
|
profileSellTotalPrice(data) {
|
|
40289
40289
|
return __async(this, null, function* () {
|
|
40290
40290
|
if (this.blockchainType === "ethereum" /* ETHEREUM */ && this.ethereum) {
|
|
40291
|
-
return this.ethereum.
|
|
40291
|
+
return this.ethereum.profileSellPrice(data);
|
|
40292
40292
|
} else {
|
|
40293
40293
|
throw new Error("Cannot call this function");
|
|
40294
40294
|
}
|
|
@@ -40659,6 +40659,37 @@ function fetchTxData(endpoint, apiKey) {
|
|
|
40659
40659
|
return yield response.json();
|
|
40660
40660
|
});
|
|
40661
40661
|
}
|
|
40662
|
+
|
|
40663
|
+
// src/evm/spaace.ts
|
|
40664
|
+
import axios3 from "axios";
|
|
40665
|
+
function placeSpaaceCollectionBid(price, collection, tokenIdStart, tokenIdEnd, walletAddr, apiKey, source = "spaace.io") {
|
|
40666
|
+
return __async(this, null, function* () {
|
|
40667
|
+
const BASE_SPAACE_URI = "https://api-ethereum.spaace.io/execute/bid/v5";
|
|
40668
|
+
const params = {
|
|
40669
|
+
maker: walletAddr,
|
|
40670
|
+
source,
|
|
40671
|
+
tokenSetId: `range:${collection}:${tokenIdStart}:${tokenIdEnd}`,
|
|
40672
|
+
weiPrice: price
|
|
40673
|
+
};
|
|
40674
|
+
try {
|
|
40675
|
+
let res = yield axios3.post(BASE_SPAACE_URI, params, {
|
|
40676
|
+
headers: {
|
|
40677
|
+
"Content-Type": "application/json",
|
|
40678
|
+
"x-api-key": apiKey
|
|
40679
|
+
}
|
|
40680
|
+
});
|
|
40681
|
+
console.log("res=====", res);
|
|
40682
|
+
if (res.status == 200) {
|
|
40683
|
+
return "Success";
|
|
40684
|
+
} else {
|
|
40685
|
+
return res.statusText;
|
|
40686
|
+
}
|
|
40687
|
+
} catch (e) {
|
|
40688
|
+
console.log("err=====", e);
|
|
40689
|
+
return void 0;
|
|
40690
|
+
}
|
|
40691
|
+
});
|
|
40692
|
+
}
|
|
40662
40693
|
export {
|
|
40663
40694
|
APE_DEV,
|
|
40664
40695
|
BASE_DEV,
|
|
@@ -40692,6 +40723,7 @@ export {
|
|
|
40692
40723
|
isEthereumConfig,
|
|
40693
40724
|
isSolanaConfig,
|
|
40694
40725
|
placeMagicEdenCollectionBid,
|
|
40726
|
+
placeSpaaceCollectionBid,
|
|
40695
40727
|
placeTensorCollectionBid
|
|
40696
40728
|
};
|
|
40697
40729
|
//# sourceMappingURL=index.mjs.map
|