@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
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { bG as ResolvedConfig, bO as TxResult, a$ as CreatePopCollectionParams, aM as ClaimConditions, aX as CreateDropParams, b4 as CreateTicketParams, bq as MintTicketsParams, aZ as CreateMembershipParams, bp as MintMembershipsParams, b2 as CreateSponsorshipOfferParams, bD as ProposeSponsorshipParams, k as ApiClient, bn as MedialaneConfig, bo as MedialaneErrorCode, bv as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bW as SealedOwner, bX as ReceiptProviderLike, bY as WalletExecutor, bZ as ExecutedTransaction, b_ as PasskeyOwner } from '../errors-CadmV001.cjs';
|
|
2
|
+
export { b$ as CreatedOwner, c0 as OwnerSigner, by as PasskeyCancelledError, c1 as PasskeyConfig, bQ as UserFacingError, c2 as createPasskeyOwner } from '../errors-CadmV001.cjs';
|
|
3
3
|
import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
|
|
4
4
|
import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.cjs';
|
|
5
5
|
import 'zod';
|
package/dist/starknet/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import {
|
|
2
|
-
export {
|
|
1
|
+
import { bG as ResolvedConfig, bO as TxResult, a$ as CreatePopCollectionParams, aM as ClaimConditions, aX as CreateDropParams, b4 as CreateTicketParams, bq as MintTicketsParams, aZ as CreateMembershipParams, bp as MintMembershipsParams, b2 as CreateSponsorshipOfferParams, bD as ProposeSponsorshipParams, k as ApiClient, bn as MedialaneConfig, bo as MedialaneErrorCode, bv as OrderDetails, R as ResolvedFeeConfig, I as ApiFundingIntent, H as ApiFundingInstructions, L as ApiFundingSubmit, N as ApiIntentCreated, bW as SealedOwner, bX as ReceiptProviderLike, bY as WalletExecutor, bZ as ExecutedTransaction, b_ as PasskeyOwner } from '../errors-DlrNXuXZ.js';
|
|
2
|
+
export { b$ as CreatedOwner, c0 as OwnerSigner, by as PasskeyCancelledError, c1 as PasskeyConfig, bQ as UserFacingError, c2 as createPasskeyOwner } from '../errors-DlrNXuXZ.js';
|
|
3
3
|
import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload, Account } from 'starknet';
|
|
4
4
|
import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-CuSlc_YE.js';
|
|
5
5
|
import 'zod';
|
package/dist/starknet/index.js
CHANGED
|
@@ -821,6 +821,7 @@ var ApiClient = class {
|
|
|
821
821
|
}
|
|
822
822
|
getRemixOffers(query, siwsToken) {
|
|
823
823
|
const params = new URLSearchParams({ role: query.role });
|
|
824
|
+
if (query.status) params.set("status", query.status);
|
|
824
825
|
if (query.page !== void 0) params.set("page", String(query.page));
|
|
825
826
|
if (query.limit !== void 0) params.set("limit", String(query.limit));
|
|
826
827
|
return this.request(`/v1/remix-offers?${params}`, {
|
|
@@ -877,6 +878,7 @@ var ApiClient = class {
|
|
|
877
878
|
if (opts.limit) params.set("limit", String(opts.limit));
|
|
878
879
|
if (opts.service) params.set("service", opts.service);
|
|
879
880
|
if (opts.sort) params.set("sort", opts.sort);
|
|
881
|
+
if (opts.creator) params.set("creator", this.addr(opts.creator));
|
|
880
882
|
if (opts.chain) params.set("chain", opts.chain);
|
|
881
883
|
const qs = params.toString();
|
|
882
884
|
return this.get(`/v1/coins${qs ? `?${qs}` : ""}`);
|
|
@@ -987,12 +989,41 @@ var ApiClient = class {
|
|
|
987
989
|
return res.claim;
|
|
988
990
|
}
|
|
989
991
|
async submitReport(report, siwsToken) {
|
|
992
|
+
const targetContract = report.targetContract ? this.addr(report.targetContract) : void 0;
|
|
993
|
+
const targetAddress = report.targetAddress ? this.addr(report.targetAddress) : void 0;
|
|
994
|
+
let targetKey = null;
|
|
995
|
+
if (report.targetType === "TOKEN" && targetContract && report.targetTokenId) {
|
|
996
|
+
targetKey = `TOKEN:${targetContract}:${report.targetTokenId}`;
|
|
997
|
+
} else if (report.targetType === "COLLECTION" && targetContract) {
|
|
998
|
+
targetKey = `COLLECTION:${targetContract}`;
|
|
999
|
+
} else if (report.targetType === "CREATOR" && targetAddress) {
|
|
1000
|
+
targetKey = `CREATOR:${targetAddress}`;
|
|
1001
|
+
} else if (report.targetType === "COMMENT" && report.targetId) {
|
|
1002
|
+
targetKey = `COMMENT::${report.targetId}`;
|
|
1003
|
+
}
|
|
1004
|
+
if (!targetKey) throw new Error(`A ${report.targetType} report needs its target`);
|
|
990
1005
|
await this.request("/v1/reports", {
|
|
991
1006
|
method: "POST",
|
|
992
1007
|
headers: this.bearer(siwsToken),
|
|
993
|
-
body: JSON.stringify(report)
|
|
1008
|
+
body: JSON.stringify({ ...report, targetKey, targetContract, targetAddress })
|
|
994
1009
|
});
|
|
995
1010
|
}
|
|
1011
|
+
getPricing() {
|
|
1012
|
+
return this.get("/v1/pricing");
|
|
1013
|
+
}
|
|
1014
|
+
listCollections(query = {}) {
|
|
1015
|
+
const params = new URLSearchParams();
|
|
1016
|
+
if (query.page !== void 0) params.set("page", String(query.page));
|
|
1017
|
+
if (query.limit !== void 0) params.set("limit", String(query.limit));
|
|
1018
|
+
if (query.owner) params.set("owner", this.addr(query.owner));
|
|
1019
|
+
if (query.service) params.set("service", query.service);
|
|
1020
|
+
if (query.sort) params.set("sort", query.sort);
|
|
1021
|
+
if (query.isFeatured !== void 0) params.set("isFeatured", String(query.isFeatured));
|
|
1022
|
+
if (query.hideEmpty !== void 0) params.set("hideEmpty", String(query.hideEmpty));
|
|
1023
|
+
if (query.chain) params.set("chain", query.chain);
|
|
1024
|
+
const qs = params.toString();
|
|
1025
|
+
return this.get(`/v1/collections${qs ? `?${qs}` : ""}`);
|
|
1026
|
+
}
|
|
996
1027
|
generateWallet(newWalletSiwsToken, siwsToken) {
|
|
997
1028
|
return this.request("/v1/users/me/generate-wallet", {
|
|
998
1029
|
method: "POST",
|