@medialane/sdk 0.135.0 → 0.136.0
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/{errors-BQGalSIU.d.cts → errors-CadmV001.d.cts} +38 -4
- package/dist/{errors-BsNfDL85.d.ts → errors-DlrNXuXZ.d.ts} +38 -4
- package/dist/index.cjs +32 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +32 -1
- package/dist/index.js.map +1 -1
- package/dist/starknet/index.cjs +32 -1
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +2 -2
- package/dist/starknet/index.d.ts +2 -2
- package/dist/starknet/index.js +32 -1
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
package/dist/starknet/index.cjs
CHANGED
|
@@ -823,6 +823,7 @@ var ApiClient = class {
|
|
|
823
823
|
}
|
|
824
824
|
getRemixOffers(query, siwsToken) {
|
|
825
825
|
const params = new URLSearchParams({ role: query.role });
|
|
826
|
+
if (query.status) params.set("status", query.status);
|
|
826
827
|
if (query.page !== void 0) params.set("page", String(query.page));
|
|
827
828
|
if (query.limit !== void 0) params.set("limit", String(query.limit));
|
|
828
829
|
return this.request(`/v1/remix-offers?${params}`, {
|
|
@@ -879,6 +880,7 @@ var ApiClient = class {
|
|
|
879
880
|
if (opts.limit) params.set("limit", String(opts.limit));
|
|
880
881
|
if (opts.service) params.set("service", opts.service);
|
|
881
882
|
if (opts.sort) params.set("sort", opts.sort);
|
|
883
|
+
if (opts.creator) params.set("creator", this.addr(opts.creator));
|
|
882
884
|
if (opts.chain) params.set("chain", opts.chain);
|
|
883
885
|
const qs = params.toString();
|
|
884
886
|
return this.get(`/v1/coins${qs ? `?${qs}` : ""}`);
|
|
@@ -989,12 +991,41 @@ var ApiClient = class {
|
|
|
989
991
|
return res.claim;
|
|
990
992
|
}
|
|
991
993
|
async submitReport(report, siwsToken) {
|
|
994
|
+
const targetContract = report.targetContract ? this.addr(report.targetContract) : void 0;
|
|
995
|
+
const targetAddress = report.targetAddress ? this.addr(report.targetAddress) : void 0;
|
|
996
|
+
let targetKey = null;
|
|
997
|
+
if (report.targetType === "TOKEN" && targetContract && report.targetTokenId) {
|
|
998
|
+
targetKey = `TOKEN:${targetContract}:${report.targetTokenId}`;
|
|
999
|
+
} else if (report.targetType === "COLLECTION" && targetContract) {
|
|
1000
|
+
targetKey = `COLLECTION:${targetContract}`;
|
|
1001
|
+
} else if (report.targetType === "CREATOR" && targetAddress) {
|
|
1002
|
+
targetKey = `CREATOR:${targetAddress}`;
|
|
1003
|
+
} else if (report.targetType === "COMMENT" && report.targetId) {
|
|
1004
|
+
targetKey = `COMMENT::${report.targetId}`;
|
|
1005
|
+
}
|
|
1006
|
+
if (!targetKey) throw new Error(`A ${report.targetType} report needs its target`);
|
|
992
1007
|
await this.request("/v1/reports", {
|
|
993
1008
|
method: "POST",
|
|
994
1009
|
headers: this.bearer(siwsToken),
|
|
995
|
-
body: JSON.stringify(report)
|
|
1010
|
+
body: JSON.stringify({ ...report, targetKey, targetContract, targetAddress })
|
|
996
1011
|
});
|
|
997
1012
|
}
|
|
1013
|
+
getPricing() {
|
|
1014
|
+
return this.get("/v1/pricing");
|
|
1015
|
+
}
|
|
1016
|
+
listCollections(query = {}) {
|
|
1017
|
+
const params = new URLSearchParams();
|
|
1018
|
+
if (query.page !== void 0) params.set("page", String(query.page));
|
|
1019
|
+
if (query.limit !== void 0) params.set("limit", String(query.limit));
|
|
1020
|
+
if (query.owner) params.set("owner", this.addr(query.owner));
|
|
1021
|
+
if (query.service) params.set("service", query.service);
|
|
1022
|
+
if (query.sort) params.set("sort", query.sort);
|
|
1023
|
+
if (query.isFeatured !== void 0) params.set("isFeatured", String(query.isFeatured));
|
|
1024
|
+
if (query.hideEmpty !== void 0) params.set("hideEmpty", String(query.hideEmpty));
|
|
1025
|
+
if (query.chain) params.set("chain", query.chain);
|
|
1026
|
+
const qs = params.toString();
|
|
1027
|
+
return this.get(`/v1/collections${qs ? `?${qs}` : ""}`);
|
|
1028
|
+
}
|
|
998
1029
|
generateWallet(newWalletSiwsToken, siwsToken) {
|
|
999
1030
|
return this.request("/v1/users/me/generate-wallet", {
|
|
1000
1031
|
method: "POST",
|