@medialane/sdk 0.116.0 → 0.118.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/index.cjs +33 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -2
- package/dist/index.d.ts +27 -2
- package/dist/index.js +33 -2
- package/dist/index.js.map +1 -1
- package/dist/{services-D971bAZ2.d.cts → services-BVGQSIjq.d.cts} +31 -5
- package/dist/{services-BezTZ6gM.d.ts → services-Bb_anNPX.d.ts} +31 -5
- package/dist/starknet/index.cjs +13 -2
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +1 -1
- package/dist/starknet/index.d.ts +1 -1
- package/dist/starknet/index.js +13 -2
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -527,9 +527,9 @@ interface CancelOrderIntentParams {
|
|
|
527
527
|
orderHash: string;
|
|
528
528
|
tokenStandard?: string;
|
|
529
529
|
}
|
|
530
|
-
type FactoryFamilyServiceId = "mip-erc1155" | "ip-tickets" | "ip-club";
|
|
531
|
-
type TierServiceId = "ip-tickets" | "ip-club";
|
|
532
|
-
type CollectionServiceId = FactoryFamilyServiceId | "pop-protocol" | "drop-collection";
|
|
530
|
+
type FactoryFamilyServiceId = "mip-erc1155" | "ip-tickets" | "ip-ticketing" | "ip-club";
|
|
531
|
+
type TierServiceId = "ip-tickets" | "ip-ticketing" | "ip-club";
|
|
532
|
+
type CollectionServiceId = FactoryFamilyServiceId | "pop-protocol" | "drop-collection" | "data-tokenization-erc721";
|
|
533
533
|
interface CreateMintIntentParams {
|
|
534
534
|
owner: string;
|
|
535
535
|
recipient: string;
|
|
@@ -588,6 +588,30 @@ interface CreateTierIntentParams {
|
|
|
588
588
|
royaltyBps: number;
|
|
589
589
|
metadataUri: string;
|
|
590
590
|
}
|
|
591
|
+
interface MintCallsParams {
|
|
592
|
+
chain?: "STARKNET";
|
|
593
|
+
service: string;
|
|
594
|
+
owner: string;
|
|
595
|
+
recipientScheme?: string;
|
|
596
|
+
recipients: string[];
|
|
597
|
+
tokenUri?: string;
|
|
598
|
+
collectionId?: string;
|
|
599
|
+
collectionContract?: string;
|
|
600
|
+
tokenId?: string;
|
|
601
|
+
amount?: string;
|
|
602
|
+
batchSize?: number;
|
|
603
|
+
}
|
|
604
|
+
interface ApiMintCallsCall {
|
|
605
|
+
contractAddress: string;
|
|
606
|
+
entrypoint: string;
|
|
607
|
+
calldata: string[];
|
|
608
|
+
}
|
|
609
|
+
interface ApiMintCallsResult {
|
|
610
|
+
service: string;
|
|
611
|
+
recipientCount: number;
|
|
612
|
+
callCount: number;
|
|
613
|
+
batches: ApiMintCallsCall[][];
|
|
614
|
+
}
|
|
591
615
|
interface CreateCoinIntentParams {
|
|
592
616
|
owner: string;
|
|
593
617
|
name: string;
|
|
@@ -1026,8 +1050,9 @@ type MedialaneErrorCode = "TOKEN_NOT_FOUND" | "COLLECTION_NOT_FOUND" | "ORDER_NO
|
|
|
1026
1050
|
declare class MedialaneApiError extends Error {
|
|
1027
1051
|
readonly status: number;
|
|
1028
1052
|
readonly retryAfterMs?: number | undefined;
|
|
1053
|
+
readonly details?: unknown | undefined;
|
|
1029
1054
|
readonly code: MedialaneErrorCode;
|
|
1030
|
-
constructor(status: number, message: string, retryAfterMs?: number | undefined);
|
|
1055
|
+
constructor(status: number, message: string, retryAfterMs?: number | undefined, details?: unknown | undefined);
|
|
1031
1056
|
}
|
|
1032
1057
|
declare class ApiClient {
|
|
1033
1058
|
private readonly baseUrl;
|
|
@@ -1076,6 +1101,7 @@ declare class ApiClient {
|
|
|
1076
1101
|
createMintIntent(params: CreateMintIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
1077
1102
|
createCollectionIntent(params: CreateCollectionIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
1078
1103
|
createTierIntent(params: CreateTierIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
1104
|
+
mintCalls(params: MintCallsParams): Promise<ApiResponse<ApiMintCallsResult>>;
|
|
1079
1105
|
createCoinIntent(params: CreateCoinIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
1080
1106
|
launchCoinIntent(params: LaunchCoinIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
1081
1107
|
createSponsorshipOfferIntent(params: CreateSponsorshipOfferIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
@@ -1346,4 +1372,4 @@ interface ProposeSponsorshipParams {
|
|
|
1346
1372
|
royaltyBps: bigint | string;
|
|
1347
1373
|
}
|
|
1348
1374
|
|
|
1349
|
-
export { type
|
|
1375
|
+
export { type ApiRemixOffersQuery as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiIntent as C, type ApiIntentCreated as D, type ApiKeyStatus as E, type ApiMeta as F, type ApiMetadataSignedUrl as G, type ApiMetadataUpload as H, type ApiMintCallsCall as I, type ApiMintCallsResult as J, type ApiOrder as K, type ApiOrderConsideration as L, type ApiOrderOffer as M, type ApiOrderPrice as N, type ApiOrderTokenMeta as O, type ApiOrderTxHash as P, type ApiOrdersQuery as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiPointEvent as T, type ApiPortalKey as U, type ApiPortalKeyCreated as V, type ApiPortalMe as W, type ApiPortalSpend as X, type ApiPublicRemix as Y, type ApiRemixOffer as Z, type ApiRemixOfferPrice as _, type ServiceCapability as a, type MintCallsParams as a$, type ApiResponse as a0, type ApiRewardsBadge as a1, type ApiRewardsBatchEntry as a2, type ApiRewardsConfig as a3, type ApiRewardsLeaderboardEntry as a4, type ApiRewardsLevel as a5, type ApiSearchCollectionResult as a6, type ApiSearchCreatorResult as a7, type ApiSearchResult as a8, type ApiSearchTokenResult as a9, type CreateMembershipParams as aA, type CreateMintIntentParams as aB, type CreatePopCollectionParams as aC, type CreateRemixOfferParams as aD, type CreateSponsorshipOfferIntentParams as aE, type CreateSponsorshipOfferParams as aF, type CreateSponsorshipProposalIntentParams as aG, type CreateTicketParams as aH, type CreateTierIntentParams as aI, type CreateWebhookParams as aJ, type DropMintStatus as aK, type EnforcementDeclaration as aL, type FactoryFamilyServiceId as aM, type FeeConfig as aN, FeeConfigSchema as aO, type FulfillOrderIntentParams as aP, type IPType as aQ, type IntentCall as aR, type IntentStatus as aS, type IntentType as aT, type IpAttribute as aU, type IpNftMetadata as aV, type LaunchCoinIntentParams as aW, type MakeOfferIntentParams as aX, MedialaneApiError as aY, type MedialaneConfig as aZ, type MedialaneErrorCode as a_, type ApiSpendByAction as aa, type ApiToken as ab, type ApiTokenBalance as ac, type ApiTokenMetadata as ad, type ApiUserRewards as ae, type ApiUserWallet as af, type ApiWalletActivity as ag, type ApiWebhookCreated as ah, type ApiWebhookEndpoint as ai, type AutoRemixOfferParams as aj, type CancelOrderIntentParams as ak, type ChainFilter as al, type CheckoutIntentItem as am, type ClaimConditions as an, type CollectionServiceId as ao, type CollectionSort as ap, type CollectionTokensSort as aq, type ConfirmRemixOfferParams as ar, type ConfirmSelfRemixParams as as, type ConsiderationItem as at, type CreateCheckoutIntentParams as au, type CreateCoinIntentParams as av, type CreateCollectionIntentParams as aw, type CreateCounterOfferIntentParams as ax, type CreateDropParams as ay, type CreateListingIntentParams as az, type AcceptSponsorshipProposalIntentParams as b, type MintMembershipsParams as b0, type MintTicketsParams as b1, OPEN_LICENSES as b2, type OfferItem as b3, type OpenLicense as b4, type Order as b5, type OrderDetails as b6, type OrderParameters as b7, type OrderStatus as b8, type PlaceSponsorshipBidIntentParams 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, type WebhookEventType as bq, type WebhookStatus as br, type WithdrawSponsorshipProposalIntentParams as bs, resolveConfig as bt, resolveFeeConfig as bu, type ActivityType as c, type ApiActivitiesQuery as d, type ApiActivity as e, type ApiActivityPrice as f, type ApiAdminCollectionClaim as g, type ApiAppSource as h, type ApiBusinessProvisioning as i, type ApiChain as j, type ApiCheckoutIntentResult as k, ApiClient as l, type ApiCoin as m, type ApiCoinClaimResult as n, type ApiCoinPrice as o, type ApiCoinPrices as p, type ApiCoinsQuery as q, type ApiCollection as r, type ApiCollectionClaim as s, type ApiCollectionProfile as t, type ApiCollectionSlugClaim as u, type ApiCollectionsQuery as v, type ApiComment as w, type ApiCounterOffersQuery as x, type ApiCreatorListResult as y, type ApiCreatorProfile as z };
|
|
@@ -527,9 +527,9 @@ interface CancelOrderIntentParams {
|
|
|
527
527
|
orderHash: string;
|
|
528
528
|
tokenStandard?: string;
|
|
529
529
|
}
|
|
530
|
-
type FactoryFamilyServiceId = "mip-erc1155" | "ip-tickets" | "ip-club";
|
|
531
|
-
type TierServiceId = "ip-tickets" | "ip-club";
|
|
532
|
-
type CollectionServiceId = FactoryFamilyServiceId | "pop-protocol" | "drop-collection";
|
|
530
|
+
type FactoryFamilyServiceId = "mip-erc1155" | "ip-tickets" | "ip-ticketing" | "ip-club";
|
|
531
|
+
type TierServiceId = "ip-tickets" | "ip-ticketing" | "ip-club";
|
|
532
|
+
type CollectionServiceId = FactoryFamilyServiceId | "pop-protocol" | "drop-collection" | "data-tokenization-erc721";
|
|
533
533
|
interface CreateMintIntentParams {
|
|
534
534
|
owner: string;
|
|
535
535
|
recipient: string;
|
|
@@ -588,6 +588,30 @@ interface CreateTierIntentParams {
|
|
|
588
588
|
royaltyBps: number;
|
|
589
589
|
metadataUri: string;
|
|
590
590
|
}
|
|
591
|
+
interface MintCallsParams {
|
|
592
|
+
chain?: "STARKNET";
|
|
593
|
+
service: string;
|
|
594
|
+
owner: string;
|
|
595
|
+
recipientScheme?: string;
|
|
596
|
+
recipients: string[];
|
|
597
|
+
tokenUri?: string;
|
|
598
|
+
collectionId?: string;
|
|
599
|
+
collectionContract?: string;
|
|
600
|
+
tokenId?: string;
|
|
601
|
+
amount?: string;
|
|
602
|
+
batchSize?: number;
|
|
603
|
+
}
|
|
604
|
+
interface ApiMintCallsCall {
|
|
605
|
+
contractAddress: string;
|
|
606
|
+
entrypoint: string;
|
|
607
|
+
calldata: string[];
|
|
608
|
+
}
|
|
609
|
+
interface ApiMintCallsResult {
|
|
610
|
+
service: string;
|
|
611
|
+
recipientCount: number;
|
|
612
|
+
callCount: number;
|
|
613
|
+
batches: ApiMintCallsCall[][];
|
|
614
|
+
}
|
|
591
615
|
interface CreateCoinIntentParams {
|
|
592
616
|
owner: string;
|
|
593
617
|
name: string;
|
|
@@ -1026,8 +1050,9 @@ type MedialaneErrorCode = "TOKEN_NOT_FOUND" | "COLLECTION_NOT_FOUND" | "ORDER_NO
|
|
|
1026
1050
|
declare class MedialaneApiError extends Error {
|
|
1027
1051
|
readonly status: number;
|
|
1028
1052
|
readonly retryAfterMs?: number | undefined;
|
|
1053
|
+
readonly details?: unknown | undefined;
|
|
1029
1054
|
readonly code: MedialaneErrorCode;
|
|
1030
|
-
constructor(status: number, message: string, retryAfterMs?: number | undefined);
|
|
1055
|
+
constructor(status: number, message: string, retryAfterMs?: number | undefined, details?: unknown | undefined);
|
|
1031
1056
|
}
|
|
1032
1057
|
declare class ApiClient {
|
|
1033
1058
|
private readonly baseUrl;
|
|
@@ -1076,6 +1101,7 @@ declare class ApiClient {
|
|
|
1076
1101
|
createMintIntent(params: CreateMintIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
1077
1102
|
createCollectionIntent(params: CreateCollectionIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
1078
1103
|
createTierIntent(params: CreateTierIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
1104
|
+
mintCalls(params: MintCallsParams): Promise<ApiResponse<ApiMintCallsResult>>;
|
|
1079
1105
|
createCoinIntent(params: CreateCoinIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
1080
1106
|
launchCoinIntent(params: LaunchCoinIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
1081
1107
|
createSponsorshipOfferIntent(params: CreateSponsorshipOfferIntentParams): Promise<ApiResponse<ApiIntentCreated>>;
|
|
@@ -1346,4 +1372,4 @@ interface ProposeSponsorshipParams {
|
|
|
1346
1372
|
royaltyBps: bigint | string;
|
|
1347
1373
|
}
|
|
1348
1374
|
|
|
1349
|
-
export { type
|
|
1375
|
+
export { type ApiRemixOffersQuery as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiIntent as C, type ApiIntentCreated as D, type ApiKeyStatus as E, type ApiMeta as F, type ApiMetadataSignedUrl as G, type ApiMetadataUpload as H, type ApiMintCallsCall as I, type ApiMintCallsResult as J, type ApiOrder as K, type ApiOrderConsideration as L, type ApiOrderOffer as M, type ApiOrderPrice as N, type ApiOrderTokenMeta as O, type ApiOrderTxHash as P, type ApiOrdersQuery as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiPointEvent as T, type ApiPortalKey as U, type ApiPortalKeyCreated as V, type ApiPortalMe as W, type ApiPortalSpend as X, type ApiPublicRemix as Y, type ApiRemixOffer as Z, type ApiRemixOfferPrice as _, type ServiceCapability as a, type MintCallsParams as a$, type ApiResponse as a0, type ApiRewardsBadge as a1, type ApiRewardsBatchEntry as a2, type ApiRewardsConfig as a3, type ApiRewardsLeaderboardEntry as a4, type ApiRewardsLevel as a5, type ApiSearchCollectionResult as a6, type ApiSearchCreatorResult as a7, type ApiSearchResult as a8, type ApiSearchTokenResult as a9, type CreateMembershipParams as aA, type CreateMintIntentParams as aB, type CreatePopCollectionParams as aC, type CreateRemixOfferParams as aD, type CreateSponsorshipOfferIntentParams as aE, type CreateSponsorshipOfferParams as aF, type CreateSponsorshipProposalIntentParams as aG, type CreateTicketParams as aH, type CreateTierIntentParams as aI, type CreateWebhookParams as aJ, type DropMintStatus as aK, type EnforcementDeclaration as aL, type FactoryFamilyServiceId as aM, type FeeConfig as aN, FeeConfigSchema as aO, type FulfillOrderIntentParams as aP, type IPType as aQ, type IntentCall as aR, type IntentStatus as aS, type IntentType as aT, type IpAttribute as aU, type IpNftMetadata as aV, type LaunchCoinIntentParams as aW, type MakeOfferIntentParams as aX, MedialaneApiError as aY, type MedialaneConfig as aZ, type MedialaneErrorCode as a_, type ApiSpendByAction as aa, type ApiToken as ab, type ApiTokenBalance as ac, type ApiTokenMetadata as ad, type ApiUserRewards as ae, type ApiUserWallet as af, type ApiWalletActivity as ag, type ApiWebhookCreated as ah, type ApiWebhookEndpoint as ai, type AutoRemixOfferParams as aj, type CancelOrderIntentParams as ak, type ChainFilter as al, type CheckoutIntentItem as am, type ClaimConditions as an, type CollectionServiceId as ao, type CollectionSort as ap, type CollectionTokensSort as aq, type ConfirmRemixOfferParams as ar, type ConfirmSelfRemixParams as as, type ConsiderationItem as at, type CreateCheckoutIntentParams as au, type CreateCoinIntentParams as av, type CreateCollectionIntentParams as aw, type CreateCounterOfferIntentParams as ax, type CreateDropParams as ay, type CreateListingIntentParams as az, type AcceptSponsorshipProposalIntentParams as b, type MintMembershipsParams as b0, type MintTicketsParams as b1, OPEN_LICENSES as b2, type OfferItem as b3, type OpenLicense as b4, type Order as b5, type OrderDetails as b6, type OrderParameters as b7, type OrderStatus as b8, type PlaceSponsorshipBidIntentParams 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, type WebhookEventType as bq, type WebhookStatus as br, type WithdrawSponsorshipProposalIntentParams as bs, resolveConfig as bt, resolveFeeConfig as bu, type ActivityType as c, type ApiActivitiesQuery as d, type ApiActivity as e, type ApiActivityPrice as f, type ApiAdminCollectionClaim as g, type ApiAppSource as h, type ApiBusinessProvisioning as i, type ApiChain as j, type ApiCheckoutIntentResult as k, ApiClient as l, type ApiCoin as m, type ApiCoinClaimResult as n, type ApiCoinPrice as o, type ApiCoinPrices as p, type ApiCoinsQuery as q, type ApiCollection as r, type ApiCollectionClaim as s, type ApiCollectionProfile as t, type ApiCollectionSlugClaim as u, type ApiCollectionsQuery as v, type ApiComment as w, type ApiCounterOffersQuery as x, type ApiCreatorListResult as y, type ApiCreatorProfile as z };
|
package/dist/starknet/index.cjs
CHANGED
|
@@ -248,10 +248,11 @@ function deriveErrorCode(status) {
|
|
|
248
248
|
return "UNKNOWN";
|
|
249
249
|
}
|
|
250
250
|
var MedialaneApiError = class extends Error {
|
|
251
|
-
constructor(status, message, retryAfterMs) {
|
|
251
|
+
constructor(status, message, retryAfterMs, details) {
|
|
252
252
|
super(message);
|
|
253
253
|
this.status = status;
|
|
254
254
|
this.retryAfterMs = retryAfterMs;
|
|
255
|
+
this.details = details;
|
|
255
256
|
this.name = "MedialaneApiError";
|
|
256
257
|
this.code = deriveErrorCode(status);
|
|
257
258
|
}
|
|
@@ -289,12 +290,19 @@ var ApiClient = class {
|
|
|
289
290
|
if (!response.ok && !allowed(response.status)) {
|
|
290
291
|
const text = await response.text().catch(() => response.statusText);
|
|
291
292
|
let message = text;
|
|
293
|
+
let details;
|
|
292
294
|
try {
|
|
293
295
|
const body = JSON.parse(text);
|
|
294
296
|
if (body.error) message = body.error;
|
|
297
|
+
details = body;
|
|
295
298
|
} catch {
|
|
296
299
|
}
|
|
297
|
-
throw new MedialaneApiError(
|
|
300
|
+
throw new MedialaneApiError(
|
|
301
|
+
response.status,
|
|
302
|
+
message,
|
|
303
|
+
parseRetryAfter(response.headers.get("retry-after")),
|
|
304
|
+
details
|
|
305
|
+
);
|
|
298
306
|
}
|
|
299
307
|
return response;
|
|
300
308
|
}, this.retryOptions);
|
|
@@ -445,6 +453,9 @@ var ApiClient = class {
|
|
|
445
453
|
createTierIntent(params) {
|
|
446
454
|
return this.post("/v1/intents/create-tier", params);
|
|
447
455
|
}
|
|
456
|
+
mintCalls(params) {
|
|
457
|
+
return this.post("/v1/business/issuance/mint-calls", params);
|
|
458
|
+
}
|
|
448
459
|
createCoinIntent(params) {
|
|
449
460
|
return this.post("/v1/intents/create-coin", params);
|
|
450
461
|
}
|