@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
|
@@ -388,6 +388,7 @@ interface ApiCoinsQuery {
|
|
|
388
388
|
limit?: number;
|
|
389
389
|
service?: string;
|
|
390
390
|
sort?: string;
|
|
391
|
+
creator?: string;
|
|
391
392
|
}
|
|
392
393
|
interface ApiActivityPrice {
|
|
393
394
|
raw: string | null;
|
|
@@ -781,6 +782,7 @@ interface ConfirmRemixOfferParams {
|
|
|
781
782
|
}
|
|
782
783
|
interface ApiRemixOffersQuery {
|
|
783
784
|
role: "creator" | "requester";
|
|
785
|
+
status?: string;
|
|
784
786
|
page?: number;
|
|
785
787
|
limit?: number;
|
|
786
788
|
}
|
|
@@ -1131,9 +1133,9 @@ interface ApiUsernameClaim {
|
|
|
1131
1133
|
createdAt: string;
|
|
1132
1134
|
}
|
|
1133
1135
|
type ApiReportTargetType = "COLLECTION" | "TOKEN" | "CREATOR" | "COMMENT";
|
|
1136
|
+
/** `targetKey` is built from the target fields. */
|
|
1134
1137
|
interface ApiSubmitReport {
|
|
1135
1138
|
targetType: ApiReportTargetType;
|
|
1136
|
-
targetKey: string;
|
|
1137
1139
|
targetContract?: string;
|
|
1138
1140
|
targetTokenId?: string;
|
|
1139
1141
|
targetAddress?: string;
|
|
@@ -1228,6 +1230,36 @@ interface ApiSponsorshipLicensesQuery {
|
|
|
1228
1230
|
holder?: string;
|
|
1229
1231
|
author?: string;
|
|
1230
1232
|
}
|
|
1233
|
+
interface ApiCollectionsListQuery {
|
|
1234
|
+
page?: number;
|
|
1235
|
+
limit?: number;
|
|
1236
|
+
owner?: string;
|
|
1237
|
+
service?: string;
|
|
1238
|
+
sort?: CollectionSort;
|
|
1239
|
+
isFeatured?: boolean;
|
|
1240
|
+
hideEmpty?: boolean;
|
|
1241
|
+
chain?: ChainFilter;
|
|
1242
|
+
}
|
|
1243
|
+
interface ApiPricingRule {
|
|
1244
|
+
actionKey: string;
|
|
1245
|
+
chain: string;
|
|
1246
|
+
service: string;
|
|
1247
|
+
credits: number;
|
|
1248
|
+
}
|
|
1249
|
+
interface ApiPricing {
|
|
1250
|
+
creditsPerUsdc: number;
|
|
1251
|
+
mdln?: {
|
|
1252
|
+
contract: string | null;
|
|
1253
|
+
tiers: {
|
|
1254
|
+
minWholeTokens: number;
|
|
1255
|
+
multiplier: number;
|
|
1256
|
+
}[];
|
|
1257
|
+
};
|
|
1258
|
+
pricing: {
|
|
1259
|
+
default: number;
|
|
1260
|
+
rules: ApiPricingRule[];
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1231
1263
|
|
|
1232
1264
|
type MedialaneErrorCode = "TOKEN_NOT_FOUND" | "COLLECTION_NOT_FOUND" | "ORDER_NOT_FOUND" | "INTENT_NOT_FOUND" | "INTENT_EXPIRED" | "RATE_LIMITED" | "NETWORK_NOT_SUPPORTED" | "APPROVAL_FAILED" | "TRANSACTION_FAILED" | "INVALID_PARAMS" | "UNAUTHORIZED" | "UNKNOWN";
|
|
1233
1265
|
|
|
@@ -1474,8 +1506,8 @@ declare class ApiClient {
|
|
|
1474
1506
|
claimCoin(coinAddress: string, siwsToken: string): Promise<ApiCoinClaimResult>;
|
|
1475
1507
|
getCoinClaims(status?: string): Promise<ApiResponse<ApiCollectionClaim[]>>;
|
|
1476
1508
|
updateCoinProfile(contract: string, data: {
|
|
1477
|
-
image?: string;
|
|
1478
|
-
description?: string;
|
|
1509
|
+
image?: string | null;
|
|
1510
|
+
description?: string | null;
|
|
1479
1511
|
}, siwsToken: string): Promise<ApiResponse<ApiCoin>>;
|
|
1480
1512
|
getDropCollections(opts?: {
|
|
1481
1513
|
page?: number;
|
|
@@ -1503,6 +1535,8 @@ declare class ApiClient {
|
|
|
1503
1535
|
}>;
|
|
1504
1536
|
submitUsernameClaim(username: string, siwsToken: string, notifyEmail?: string): Promise<ApiUsernameClaim>;
|
|
1505
1537
|
submitReport(report: ApiSubmitReport, siwsToken: string): Promise<void>;
|
|
1538
|
+
getPricing(): Promise<ApiPricing>;
|
|
1539
|
+
listCollections(query?: ApiCollectionsListQuery): Promise<ApiResponse<ApiCollection[]>>;
|
|
1506
1540
|
generateWallet(newWalletSiwsToken: string, siwsToken: string): Promise<{
|
|
1507
1541
|
walletAddress: string;
|
|
1508
1542
|
}>;
|
|
@@ -1689,4 +1723,4 @@ declare class UserFacingError extends Error {
|
|
|
1689
1723
|
constructor(message: string);
|
|
1690
1724
|
}
|
|
1691
1725
|
|
|
1692
|
-
export { type
|
|
1726
|
+
export { type ApiOrdersQuery as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiDropConditions as C, type ApiDropInfo as D, type ApiDropState as E, type ApiEmissionCall as F, type ApiEmissionResult as G, type ApiFundingInstructions as H, type ApiFundingIntent as I, type ApiFundingMethod as J, type ApiFundingStatus as K, type ApiFundingSubmit as L, type ApiIntent as M, type ApiIntentCreated as N, type ApiIpNftTokenData as O, type ApiKeyStatus as P, type ApiMeta as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiMetadataSignedUrl as T, type ApiMetadataUpload as U, type ApiOrder as V, type ApiOrderConsideration as W, type ApiOrderOffer as X, type ApiOrderPrice as Y, type ApiOrderTokenMeta as Z, type ApiOrderTxHash as _, type ServiceCapability as a, type CreatePopCollectionParams as a$, type ApiPlatformStats as a0, type ApiPointEvent as a1, type ApiPortalKey as a2, type ApiPortalKeyCreated as a3, type ApiPortalMe as a4, type ApiPortalSpend as a5, type ApiPricing as a6, type ApiPricingRule as a7, type ApiPublicRemix as a8, type ApiRemixOffer as a9, type ApiTokensQuery as aA, type ApiTxSyncResult as aB, type ApiUserRewards as aC, type ApiUserWallet as aD, type ApiUsernameClaim as aE, type ApiWalletActivity as aF, type ApiWebhookCreated as aG, type ApiWebhookEndpoint as aH, type AutoRemixOfferParams as aI, type CancelOrderIntentParams as aJ, type ChainFilter as aK, type CheckoutIntentItem as aL, type ClaimConditions as aM, type CollectionServiceId as aN, type CollectionSort as aO, type CollectionTokensSort as aP, type ConfirmRemixOfferParams as aQ, type ConfirmSelfRemixParams as aR, type ConsiderationItem as aS, type CreateCheckoutIntentParams as aT, type CreateCoinIntentParams as aU, type CreateCollectionIntentParams as aV, type CreateCounterOfferIntentParams as aW, type CreateDropParams as aX, type CreateListingIntentParams as aY, type CreateMembershipParams as aZ, type CreateMintIntentParams as a_, type ApiRemixOfferPrice as aa, type ApiRemixOffersQuery as ab, type ApiReportTargetType as ac, type ApiResponse as ad, type ApiRewardsBadge as ae, type ApiRewardsBatchEntry as af, type ApiRewardsConfig as ag, type ApiRewardsLeaderboardEntry as ah, type ApiRewardsLevel as ai, type ApiSearchCollectionResult as aj, type ApiSearchCreatorResult as ak, type ApiSearchResult as al, type ApiSearchTokenResult as am, type ApiSpendByAction as an, type ApiSponsorshipBid as ao, type ApiSponsorshipLicense as ap, type ApiSponsorshipLicensesQuery as aq, type ApiSponsorshipOffer as ar, type ApiSponsorshipOffersQuery as as, type ApiSponsorshipProposal as at, type ApiSponsorshipProposalsQuery as au, type ApiSubmitReport as av, type ApiTierOnchain as aw, type ApiToken as ax, type ApiTokenBalance as ay, type ApiTokenMetadata as az, type AcceptSponsorshipProposalIntentParams as b, type CreatedOwner as b$, type CreateRemixOfferParams as b0, type CreateSponsorshipOfferIntentParams as b1, type CreateSponsorshipOfferParams as b2, type CreateSponsorshipProposalIntentParams as b3, type CreateTicketParams as b4, type CreateTierIntentParams as b5, type CreateWebhookParams as b6, type DropMintStatus as b7, type EmissionParams as b8, type EnforcementDeclaration as b9, type PopBatchEligibilityItem as bA, type PopClaimStatus as bB, type PopEventType as bC, type ProposeSponsorshipParams as bD, type RejectSponsorshipProposalIntentParams as bE, type RemixOfferStatus as bF, type ResolvedConfig as bG, type RetractSponsorshipBidIntentParams as bH, type RetryOptions as bI, type ServiceEventDeclaration as bJ, type SetSponsorshipOfferOpenIntentParams as bK, type SortOrder as bL, type TenantPlan as bM, type TierServiceId as bN, type TxResult as bO, type UpdateCollectionProfileInput as bP, UserFacingError as bQ, type WebhookEventType as bR, type WebhookStatus as bS, type WithdrawSponsorshipProposalIntentParams as bT, resolveConfig as bU, resolveFeeConfig as bV, type SealedOwner as bW, type ReceiptProviderLike as bX, type WalletExecutor as bY, type ExecutedTransaction as bZ, type PasskeyOwner as b_, type FactoryFamilyServiceId as ba, type FeeConfig as bb, FeeConfigSchema as bc, type FulfillOrderIntentParams as bd, type IPType as be, type IntentCall as bf, type IntentStatus as bg, type IntentType as bh, type IpAttribute as bi, type IpNftMetadata as bj, type LaunchCoinIntentParams as bk, type MakeOfferIntentParams as bl, MedialaneApiError as bm, type MedialaneConfig as bn, type MedialaneErrorCode as bo, type MintMembershipsParams as bp, type MintTicketsParams as bq, OPEN_LICENSES as br, type OfferItem as bs, type OpenLicense as bt, type Order as bu, type OrderDetails as bv, type OrderParameters as bw, type OrderStatus as bx, PasskeyCancelledError as by, type PlaceSponsorshipBidIntentParams as bz, type ActivityType as c, type OwnerSigner as c0, type PasskeyConfig as c1, createPasskeyOwner as c2, type ApiActivitiesQuery as d, type ApiActivity as e, type ApiActivityPrice as f, type ApiAdminCollectionClaim as g, type ApiBusinessProvisioning as h, type ApiChain as i, type ApiCheckoutIntentResult as j, ApiClient as k, type ApiCoin as l, type ApiCoinClaimResult as m, type ApiCoinPrice as n, type ApiCoinPrices as o, type ApiCoinsQuery as p, type ApiCollection as q, type ApiCollectionClaim as r, type ApiCollectionProfile as s, type ApiCollectionSlugClaim as t, type ApiCollectionsListQuery as u, type ApiCollectionsQuery as v, type ApiComment as w, type ApiCounterOffersQuery as x, type ApiCreatorListResult as y, type ApiCreatorProfile as z };
|
|
@@ -388,6 +388,7 @@ interface ApiCoinsQuery {
|
|
|
388
388
|
limit?: number;
|
|
389
389
|
service?: string;
|
|
390
390
|
sort?: string;
|
|
391
|
+
creator?: string;
|
|
391
392
|
}
|
|
392
393
|
interface ApiActivityPrice {
|
|
393
394
|
raw: string | null;
|
|
@@ -781,6 +782,7 @@ interface ConfirmRemixOfferParams {
|
|
|
781
782
|
}
|
|
782
783
|
interface ApiRemixOffersQuery {
|
|
783
784
|
role: "creator" | "requester";
|
|
785
|
+
status?: string;
|
|
784
786
|
page?: number;
|
|
785
787
|
limit?: number;
|
|
786
788
|
}
|
|
@@ -1131,9 +1133,9 @@ interface ApiUsernameClaim {
|
|
|
1131
1133
|
createdAt: string;
|
|
1132
1134
|
}
|
|
1133
1135
|
type ApiReportTargetType = "COLLECTION" | "TOKEN" | "CREATOR" | "COMMENT";
|
|
1136
|
+
/** `targetKey` is built from the target fields. */
|
|
1134
1137
|
interface ApiSubmitReport {
|
|
1135
1138
|
targetType: ApiReportTargetType;
|
|
1136
|
-
targetKey: string;
|
|
1137
1139
|
targetContract?: string;
|
|
1138
1140
|
targetTokenId?: string;
|
|
1139
1141
|
targetAddress?: string;
|
|
@@ -1228,6 +1230,36 @@ interface ApiSponsorshipLicensesQuery {
|
|
|
1228
1230
|
holder?: string;
|
|
1229
1231
|
author?: string;
|
|
1230
1232
|
}
|
|
1233
|
+
interface ApiCollectionsListQuery {
|
|
1234
|
+
page?: number;
|
|
1235
|
+
limit?: number;
|
|
1236
|
+
owner?: string;
|
|
1237
|
+
service?: string;
|
|
1238
|
+
sort?: CollectionSort;
|
|
1239
|
+
isFeatured?: boolean;
|
|
1240
|
+
hideEmpty?: boolean;
|
|
1241
|
+
chain?: ChainFilter;
|
|
1242
|
+
}
|
|
1243
|
+
interface ApiPricingRule {
|
|
1244
|
+
actionKey: string;
|
|
1245
|
+
chain: string;
|
|
1246
|
+
service: string;
|
|
1247
|
+
credits: number;
|
|
1248
|
+
}
|
|
1249
|
+
interface ApiPricing {
|
|
1250
|
+
creditsPerUsdc: number;
|
|
1251
|
+
mdln?: {
|
|
1252
|
+
contract: string | null;
|
|
1253
|
+
tiers: {
|
|
1254
|
+
minWholeTokens: number;
|
|
1255
|
+
multiplier: number;
|
|
1256
|
+
}[];
|
|
1257
|
+
};
|
|
1258
|
+
pricing: {
|
|
1259
|
+
default: number;
|
|
1260
|
+
rules: ApiPricingRule[];
|
|
1261
|
+
};
|
|
1262
|
+
}
|
|
1231
1263
|
|
|
1232
1264
|
type MedialaneErrorCode = "TOKEN_NOT_FOUND" | "COLLECTION_NOT_FOUND" | "ORDER_NOT_FOUND" | "INTENT_NOT_FOUND" | "INTENT_EXPIRED" | "RATE_LIMITED" | "NETWORK_NOT_SUPPORTED" | "APPROVAL_FAILED" | "TRANSACTION_FAILED" | "INVALID_PARAMS" | "UNAUTHORIZED" | "UNKNOWN";
|
|
1233
1265
|
|
|
@@ -1474,8 +1506,8 @@ declare class ApiClient {
|
|
|
1474
1506
|
claimCoin(coinAddress: string, siwsToken: string): Promise<ApiCoinClaimResult>;
|
|
1475
1507
|
getCoinClaims(status?: string): Promise<ApiResponse<ApiCollectionClaim[]>>;
|
|
1476
1508
|
updateCoinProfile(contract: string, data: {
|
|
1477
|
-
image?: string;
|
|
1478
|
-
description?: string;
|
|
1509
|
+
image?: string | null;
|
|
1510
|
+
description?: string | null;
|
|
1479
1511
|
}, siwsToken: string): Promise<ApiResponse<ApiCoin>>;
|
|
1480
1512
|
getDropCollections(opts?: {
|
|
1481
1513
|
page?: number;
|
|
@@ -1503,6 +1535,8 @@ declare class ApiClient {
|
|
|
1503
1535
|
}>;
|
|
1504
1536
|
submitUsernameClaim(username: string, siwsToken: string, notifyEmail?: string): Promise<ApiUsernameClaim>;
|
|
1505
1537
|
submitReport(report: ApiSubmitReport, siwsToken: string): Promise<void>;
|
|
1538
|
+
getPricing(): Promise<ApiPricing>;
|
|
1539
|
+
listCollections(query?: ApiCollectionsListQuery): Promise<ApiResponse<ApiCollection[]>>;
|
|
1506
1540
|
generateWallet(newWalletSiwsToken: string, siwsToken: string): Promise<{
|
|
1507
1541
|
walletAddress: string;
|
|
1508
1542
|
}>;
|
|
@@ -1689,4 +1723,4 @@ declare class UserFacingError extends Error {
|
|
|
1689
1723
|
constructor(message: string);
|
|
1690
1724
|
}
|
|
1691
1725
|
|
|
1692
|
-
export { type
|
|
1726
|
+
export { type ApiOrdersQuery as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiDropConditions as C, type ApiDropInfo as D, type ApiDropState as E, type ApiEmissionCall as F, type ApiEmissionResult as G, type ApiFundingInstructions as H, type ApiFundingIntent as I, type ApiFundingMethod as J, type ApiFundingStatus as K, type ApiFundingSubmit as L, type ApiIntent as M, type ApiIntentCreated as N, type ApiIpNftTokenData as O, type ApiKeyStatus as P, type ApiMeta as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiMetadataSignedUrl as T, type ApiMetadataUpload as U, type ApiOrder as V, type ApiOrderConsideration as W, type ApiOrderOffer as X, type ApiOrderPrice as Y, type ApiOrderTokenMeta as Z, type ApiOrderTxHash as _, type ServiceCapability as a, type CreatePopCollectionParams as a$, type ApiPlatformStats as a0, type ApiPointEvent as a1, type ApiPortalKey as a2, type ApiPortalKeyCreated as a3, type ApiPortalMe as a4, type ApiPortalSpend as a5, type ApiPricing as a6, type ApiPricingRule as a7, type ApiPublicRemix as a8, type ApiRemixOffer as a9, type ApiTokensQuery as aA, type ApiTxSyncResult as aB, type ApiUserRewards as aC, type ApiUserWallet as aD, type ApiUsernameClaim as aE, type ApiWalletActivity as aF, type ApiWebhookCreated as aG, type ApiWebhookEndpoint as aH, type AutoRemixOfferParams as aI, type CancelOrderIntentParams as aJ, type ChainFilter as aK, type CheckoutIntentItem as aL, type ClaimConditions as aM, type CollectionServiceId as aN, type CollectionSort as aO, type CollectionTokensSort as aP, type ConfirmRemixOfferParams as aQ, type ConfirmSelfRemixParams as aR, type ConsiderationItem as aS, type CreateCheckoutIntentParams as aT, type CreateCoinIntentParams as aU, type CreateCollectionIntentParams as aV, type CreateCounterOfferIntentParams as aW, type CreateDropParams as aX, type CreateListingIntentParams as aY, type CreateMembershipParams as aZ, type CreateMintIntentParams as a_, type ApiRemixOfferPrice as aa, type ApiRemixOffersQuery as ab, type ApiReportTargetType as ac, type ApiResponse as ad, type ApiRewardsBadge as ae, type ApiRewardsBatchEntry as af, type ApiRewardsConfig as ag, type ApiRewardsLeaderboardEntry as ah, type ApiRewardsLevel as ai, type ApiSearchCollectionResult as aj, type ApiSearchCreatorResult as ak, type ApiSearchResult as al, type ApiSearchTokenResult as am, type ApiSpendByAction as an, type ApiSponsorshipBid as ao, type ApiSponsorshipLicense as ap, type ApiSponsorshipLicensesQuery as aq, type ApiSponsorshipOffer as ar, type ApiSponsorshipOffersQuery as as, type ApiSponsorshipProposal as at, type ApiSponsorshipProposalsQuery as au, type ApiSubmitReport as av, type ApiTierOnchain as aw, type ApiToken as ax, type ApiTokenBalance as ay, type ApiTokenMetadata as az, type AcceptSponsorshipProposalIntentParams as b, type CreatedOwner as b$, type CreateRemixOfferParams as b0, type CreateSponsorshipOfferIntentParams as b1, type CreateSponsorshipOfferParams as b2, type CreateSponsorshipProposalIntentParams as b3, type CreateTicketParams as b4, type CreateTierIntentParams as b5, type CreateWebhookParams as b6, type DropMintStatus as b7, type EmissionParams as b8, type EnforcementDeclaration as b9, type PopBatchEligibilityItem as bA, type PopClaimStatus as bB, type PopEventType as bC, type ProposeSponsorshipParams as bD, type RejectSponsorshipProposalIntentParams as bE, type RemixOfferStatus as bF, type ResolvedConfig as bG, type RetractSponsorshipBidIntentParams as bH, type RetryOptions as bI, type ServiceEventDeclaration as bJ, type SetSponsorshipOfferOpenIntentParams as bK, type SortOrder as bL, type TenantPlan as bM, type TierServiceId as bN, type TxResult as bO, type UpdateCollectionProfileInput as bP, UserFacingError as bQ, type WebhookEventType as bR, type WebhookStatus as bS, type WithdrawSponsorshipProposalIntentParams as bT, resolveConfig as bU, resolveFeeConfig as bV, type SealedOwner as bW, type ReceiptProviderLike as bX, type WalletExecutor as bY, type ExecutedTransaction as bZ, type PasskeyOwner as b_, type FactoryFamilyServiceId as ba, type FeeConfig as bb, FeeConfigSchema as bc, type FulfillOrderIntentParams as bd, type IPType as be, type IntentCall as bf, type IntentStatus as bg, type IntentType as bh, type IpAttribute as bi, type IpNftMetadata as bj, type LaunchCoinIntentParams as bk, type MakeOfferIntentParams as bl, MedialaneApiError as bm, type MedialaneConfig as bn, type MedialaneErrorCode as bo, type MintMembershipsParams as bp, type MintTicketsParams as bq, OPEN_LICENSES as br, type OfferItem as bs, type OpenLicense as bt, type Order as bu, type OrderDetails as bv, type OrderParameters as bw, type OrderStatus as bx, PasskeyCancelledError as by, type PlaceSponsorshipBidIntentParams as bz, type ActivityType as c, type OwnerSigner as c0, type PasskeyConfig as c1, createPasskeyOwner as c2, type ApiActivitiesQuery as d, type ApiActivity as e, type ApiActivityPrice as f, type ApiAdminCollectionClaim as g, type ApiBusinessProvisioning as h, type ApiChain as i, type ApiCheckoutIntentResult as j, ApiClient as k, type ApiCoin as l, type ApiCoinClaimResult as m, type ApiCoinPrice as n, type ApiCoinPrices as o, type ApiCoinsQuery as p, type ApiCollection as q, type ApiCollectionClaim as r, type ApiCollectionProfile as s, type ApiCollectionSlugClaim as t, type ApiCollectionsListQuery as u, type ApiCollectionsQuery as v, type ApiComment as w, type ApiCounterOffersQuery as x, type ApiCreatorListResult as y, type ApiCreatorProfile as z };
|
package/dist/index.cjs
CHANGED
|
@@ -850,6 +850,7 @@ var ApiClient = class {
|
|
|
850
850
|
}
|
|
851
851
|
getRemixOffers(query, siwsToken) {
|
|
852
852
|
const params = new URLSearchParams({ role: query.role });
|
|
853
|
+
if (query.status) params.set("status", query.status);
|
|
853
854
|
if (query.page !== void 0) params.set("page", String(query.page));
|
|
854
855
|
if (query.limit !== void 0) params.set("limit", String(query.limit));
|
|
855
856
|
return this.request(`/v1/remix-offers?${params}`, {
|
|
@@ -906,6 +907,7 @@ var ApiClient = class {
|
|
|
906
907
|
if (opts.limit) params.set("limit", String(opts.limit));
|
|
907
908
|
if (opts.service) params.set("service", opts.service);
|
|
908
909
|
if (opts.sort) params.set("sort", opts.sort);
|
|
910
|
+
if (opts.creator) params.set("creator", this.addr(opts.creator));
|
|
909
911
|
if (opts.chain) params.set("chain", opts.chain);
|
|
910
912
|
const qs = params.toString();
|
|
911
913
|
return this.get(`/v1/coins${qs ? `?${qs}` : ""}`);
|
|
@@ -1016,12 +1018,41 @@ var ApiClient = class {
|
|
|
1016
1018
|
return res.claim;
|
|
1017
1019
|
}
|
|
1018
1020
|
async submitReport(report, siwsToken) {
|
|
1021
|
+
const targetContract = report.targetContract ? this.addr(report.targetContract) : void 0;
|
|
1022
|
+
const targetAddress = report.targetAddress ? this.addr(report.targetAddress) : void 0;
|
|
1023
|
+
let targetKey = null;
|
|
1024
|
+
if (report.targetType === "TOKEN" && targetContract && report.targetTokenId) {
|
|
1025
|
+
targetKey = `TOKEN:${targetContract}:${report.targetTokenId}`;
|
|
1026
|
+
} else if (report.targetType === "COLLECTION" && targetContract) {
|
|
1027
|
+
targetKey = `COLLECTION:${targetContract}`;
|
|
1028
|
+
} else if (report.targetType === "CREATOR" && targetAddress) {
|
|
1029
|
+
targetKey = `CREATOR:${targetAddress}`;
|
|
1030
|
+
} else if (report.targetType === "COMMENT" && report.targetId) {
|
|
1031
|
+
targetKey = `COMMENT::${report.targetId}`;
|
|
1032
|
+
}
|
|
1033
|
+
if (!targetKey) throw new Error(`A ${report.targetType} report needs its target`);
|
|
1019
1034
|
await this.request("/v1/reports", {
|
|
1020
1035
|
method: "POST",
|
|
1021
1036
|
headers: this.bearer(siwsToken),
|
|
1022
|
-
body: JSON.stringify(report)
|
|
1037
|
+
body: JSON.stringify({ ...report, targetKey, targetContract, targetAddress })
|
|
1023
1038
|
});
|
|
1024
1039
|
}
|
|
1040
|
+
getPricing() {
|
|
1041
|
+
return this.get("/v1/pricing");
|
|
1042
|
+
}
|
|
1043
|
+
listCollections(query = {}) {
|
|
1044
|
+
const params = new URLSearchParams();
|
|
1045
|
+
if (query.page !== void 0) params.set("page", String(query.page));
|
|
1046
|
+
if (query.limit !== void 0) params.set("limit", String(query.limit));
|
|
1047
|
+
if (query.owner) params.set("owner", this.addr(query.owner));
|
|
1048
|
+
if (query.service) params.set("service", query.service);
|
|
1049
|
+
if (query.sort) params.set("sort", query.sort);
|
|
1050
|
+
if (query.isFeatured !== void 0) params.set("isFeatured", String(query.isFeatured));
|
|
1051
|
+
if (query.hideEmpty !== void 0) params.set("hideEmpty", String(query.hideEmpty));
|
|
1052
|
+
if (query.chain) params.set("chain", query.chain);
|
|
1053
|
+
const qs = params.toString();
|
|
1054
|
+
return this.get(`/v1/collections${qs ? `?${qs}` : ""}`);
|
|
1055
|
+
}
|
|
1025
1056
|
generateWallet(newWalletSiwsToken, siwsToken) {
|
|
1026
1057
|
return this.request("/v1/users/me/generate-wallet", {
|
|
1027
1058
|
method: "POST",
|