@medialane/sdk 0.129.2 → 0.131.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-DQJIxfVu.d.ts → errors-HTG0DcWa.d.ts} +70 -13
- package/dist/{errors-Fgqpww_8.d.cts → errors-JkeKc3cu.d.cts} +70 -13
- package/dist/index.cjs +68 -7
- 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 +68 -7
- package/dist/index.js.map +1 -1
- package/dist/starknet/index.cjs +135 -7
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +63 -3
- package/dist/starknet/index.d.ts +63 -3
- package/dist/starknet/index.js +132 -8
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
package/dist/index.d.cts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ResolvedFeeConfig, S as ServiceDefinition, a as ServiceCapability } from './errors-
|
|
2
|
-
export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinClaimResult, o as ApiCoinPrice, p as ApiCoinPrices, q as ApiCoinsQuery, r as ApiCollection, s as ApiCollectionClaim, t as ApiCollectionProfile, u as ApiCollectionSlugClaim, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiEmissionCall, D as ApiEmissionResult, E as
|
|
1
|
+
import { R as ResolvedFeeConfig, S as ServiceDefinition, a as ServiceCapability } from './errors-JkeKc3cu.cjs';
|
|
2
|
+
export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinClaimResult, o as ApiCoinPrice, p as ApiCoinPrices, q as ApiCoinsQuery, r as ApiCollection, s as ApiCollectionClaim, t as ApiCollectionProfile, u as ApiCollectionSlugClaim, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiEmissionCall, D as ApiEmissionResult, E as ApiFundingInstructions, F as ApiFundingIntent, G as ApiFundingMethod, H as ApiFundingStatus, I as ApiFundingSubmit, J as ApiIntent, K as ApiIntentCreated, L as ApiKeyStatus, M as ApiMeta, N as ApiMetadataSignedUrl, O as ApiMetadataUpload, P as ApiOrder, Q as ApiOrderConsideration, T as ApiOrderOffer, U as ApiOrderPrice, V as ApiOrderTokenMeta, W as ApiOrderTxHash, X as ApiOrdersQuery, Y as ApiPointEvent, Z as ApiPortalKey, _ as ApiPortalKeyCreated, $ as ApiPortalMe, a0 as ApiPortalSpend, a1 as ApiPublicRemix, a2 as ApiRemixOffer, a3 as ApiRemixOfferPrice, a4 as ApiRemixOffersQuery, a5 as ApiResponse, a6 as ApiRewardsBadge, a7 as ApiRewardsBatchEntry, a8 as ApiRewardsConfig, a9 as ApiRewardsLeaderboardEntry, aa as ApiRewardsLevel, ab as ApiSearchCollectionResult, ac as ApiSearchCreatorResult, ad as ApiSearchResult, ae as ApiSearchTokenResult, af as ApiSpendByAction, ag as ApiToken, ah as ApiTokenBalance, ai as ApiTokenMetadata, aj as ApiTxSyncResult, ak as ApiUserRewards, al as ApiUserWallet, am as ApiWalletActivity, an as ApiWebhookCreated, ao as ApiWebhookEndpoint, ap as AutoRemixOfferParams, aq as CancelOrderIntentParams, ar as ChainFilter, as as CheckoutIntentItem, at as ClaimConditions, au as CollectionServiceId, av as CollectionSort, aw as CollectionTokensSort, ax as ConfirmRemixOfferParams, ay as ConfirmSelfRemixParams, az as ConsiderationItem, aA as CreateCheckoutIntentParams, aB as CreateCoinIntentParams, aC as CreateCollectionIntentParams, aD as CreateCounterOfferIntentParams, aE as CreateDropParams, aF as CreateListingIntentParams, aG as CreateMembershipParams, aH as CreateMintIntentParams, aI as CreatePopCollectionParams, aJ as CreateRemixOfferParams, aK as CreateSponsorshipOfferIntentParams, aL as CreateSponsorshipOfferParams, aM as CreateSponsorshipProposalIntentParams, aN as CreateTicketParams, aO as CreateTierIntentParams, aP as CreateWebhookParams, aQ as DropMintStatus, aR as EmissionParams, aS as EnforcementDeclaration, aT as FactoryFamilyServiceId, aU as FeeConfig, aV as FeeConfigSchema, aW as FulfillOrderIntentParams, aX as IPType, aY as IntentCall, aZ as IntentStatus, a_ as IntentType, a$ as IpAttribute, b0 as IpNftMetadata, b1 as LaunchCoinIntentParams, b2 as MakeOfferIntentParams, b3 as MedialaneApiError, b4 as MedialaneConfig, b5 as MedialaneErrorCode, b6 as MintMembershipsParams, b7 as MintTicketsParams, b8 as OPEN_LICENSES, b9 as OfferItem, ba as OpenLicense, bb as Order, bc as OrderDetails, bd as OrderParameters, be as OrderStatus, bf as PasskeyCancelledError, bg as PlaceSponsorshipBidIntentParams, bh as PopBatchEligibilityItem, bi as PopClaimStatus, bj as PopEventType, bk as ProposeSponsorshipParams, bl as RejectSponsorshipProposalIntentParams, bm as RemixOfferStatus, bn as ResolvedConfig, bo as RetractSponsorshipBidIntentParams, bp as RetryOptions, bq as ServiceEventDeclaration, br as SetSponsorshipOfferOpenIntentParams, bs as SortOrder, bt as TenantPlan, bu as TierServiceId, bv as TxResult, bw as UpdateCollectionProfileInput, bx as UserFacingError, by as WebhookEventType, bz as WebhookStatus, bA as WithdrawSponsorshipProposalIntentParams, bB as resolveConfig, bC as resolveFeeConfig } from './errors-JkeKc3cu.cjs';
|
|
3
3
|
import { C as Chain } from './types-CuSlc_YE.cjs';
|
|
4
4
|
export { A as AdapterTxResult, a as AssetRef, b as CHAINS, c as ChainCoordinates, d as CoordinatesByChain, e as CreateCollectionInput, D as DEFAULT_CHAIN, E as EvmCoordinates, I as IssuanceAdapter, M as MintInput, O as OrderRef, R as RegisterOrderParams, S as SolanaCoordinates, f as StarknetCoordinates, g as StellarCoordinates, V as VenueAdapter, h as getCoordinates, i as getStarknetCoordinates } from './types-CuSlc_YE.cjs';
|
|
5
5
|
import 'zod';
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { R as ResolvedFeeConfig, S as ServiceDefinition, a as ServiceCapability } from './errors-
|
|
2
|
-
export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinClaimResult, o as ApiCoinPrice, p as ApiCoinPrices, q as ApiCoinsQuery, r as ApiCollection, s as ApiCollectionClaim, t as ApiCollectionProfile, u as ApiCollectionSlugClaim, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiEmissionCall, D as ApiEmissionResult, E as
|
|
1
|
+
import { R as ResolvedFeeConfig, S as ServiceDefinition, a as ServiceCapability } from './errors-HTG0DcWa.js';
|
|
2
|
+
export { A as AcceptSponsorshipBidIntentParams, b as AcceptSponsorshipProposalIntentParams, c as ActivityType, d as ApiActivitiesQuery, e as ApiActivity, f as ApiActivityPrice, g as ApiAdminCollectionClaim, h as ApiAppSource, i as ApiBusinessProvisioning, j as ApiChain, k as ApiCheckoutIntentResult, l as ApiClient, m as ApiCoin, n as ApiCoinClaimResult, o as ApiCoinPrice, p as ApiCoinPrices, q as ApiCoinsQuery, r as ApiCollection, s as ApiCollectionClaim, t as ApiCollectionProfile, u as ApiCollectionSlugClaim, v as ApiCollectionsQuery, w as ApiComment, x as ApiCounterOffersQuery, y as ApiCreatorListResult, z as ApiCreatorProfile, B as ApiCreditPayment, C as ApiEmissionCall, D as ApiEmissionResult, E as ApiFundingInstructions, F as ApiFundingIntent, G as ApiFundingMethod, H as ApiFundingStatus, I as ApiFundingSubmit, J as ApiIntent, K as ApiIntentCreated, L as ApiKeyStatus, M as ApiMeta, N as ApiMetadataSignedUrl, O as ApiMetadataUpload, P as ApiOrder, Q as ApiOrderConsideration, T as ApiOrderOffer, U as ApiOrderPrice, V as ApiOrderTokenMeta, W as ApiOrderTxHash, X as ApiOrdersQuery, Y as ApiPointEvent, Z as ApiPortalKey, _ as ApiPortalKeyCreated, $ as ApiPortalMe, a0 as ApiPortalSpend, a1 as ApiPublicRemix, a2 as ApiRemixOffer, a3 as ApiRemixOfferPrice, a4 as ApiRemixOffersQuery, a5 as ApiResponse, a6 as ApiRewardsBadge, a7 as ApiRewardsBatchEntry, a8 as ApiRewardsConfig, a9 as ApiRewardsLeaderboardEntry, aa as ApiRewardsLevel, ab as ApiSearchCollectionResult, ac as ApiSearchCreatorResult, ad as ApiSearchResult, ae as ApiSearchTokenResult, af as ApiSpendByAction, ag as ApiToken, ah as ApiTokenBalance, ai as ApiTokenMetadata, aj as ApiTxSyncResult, ak as ApiUserRewards, al as ApiUserWallet, am as ApiWalletActivity, an as ApiWebhookCreated, ao as ApiWebhookEndpoint, ap as AutoRemixOfferParams, aq as CancelOrderIntentParams, ar as ChainFilter, as as CheckoutIntentItem, at as ClaimConditions, au as CollectionServiceId, av as CollectionSort, aw as CollectionTokensSort, ax as ConfirmRemixOfferParams, ay as ConfirmSelfRemixParams, az as ConsiderationItem, aA as CreateCheckoutIntentParams, aB as CreateCoinIntentParams, aC as CreateCollectionIntentParams, aD as CreateCounterOfferIntentParams, aE as CreateDropParams, aF as CreateListingIntentParams, aG as CreateMembershipParams, aH as CreateMintIntentParams, aI as CreatePopCollectionParams, aJ as CreateRemixOfferParams, aK as CreateSponsorshipOfferIntentParams, aL as CreateSponsorshipOfferParams, aM as CreateSponsorshipProposalIntentParams, aN as CreateTicketParams, aO as CreateTierIntentParams, aP as CreateWebhookParams, aQ as DropMintStatus, aR as EmissionParams, aS as EnforcementDeclaration, aT as FactoryFamilyServiceId, aU as FeeConfig, aV as FeeConfigSchema, aW as FulfillOrderIntentParams, aX as IPType, aY as IntentCall, aZ as IntentStatus, a_ as IntentType, a$ as IpAttribute, b0 as IpNftMetadata, b1 as LaunchCoinIntentParams, b2 as MakeOfferIntentParams, b3 as MedialaneApiError, b4 as MedialaneConfig, b5 as MedialaneErrorCode, b6 as MintMembershipsParams, b7 as MintTicketsParams, b8 as OPEN_LICENSES, b9 as OfferItem, ba as OpenLicense, bb as Order, bc as OrderDetails, bd as OrderParameters, be as OrderStatus, bf as PasskeyCancelledError, bg as PlaceSponsorshipBidIntentParams, bh as PopBatchEligibilityItem, bi as PopClaimStatus, bj as PopEventType, bk as ProposeSponsorshipParams, bl as RejectSponsorshipProposalIntentParams, bm as RemixOfferStatus, bn as ResolvedConfig, bo as RetractSponsorshipBidIntentParams, bp as RetryOptions, bq as ServiceEventDeclaration, br as SetSponsorshipOfferOpenIntentParams, bs as SortOrder, bt as TenantPlan, bu as TierServiceId, bv as TxResult, bw as UpdateCollectionProfileInput, bx as UserFacingError, by as WebhookEventType, bz as WebhookStatus, bA as WithdrawSponsorshipProposalIntentParams, bB as resolveConfig, bC as resolveFeeConfig } from './errors-HTG0DcWa.js';
|
|
3
3
|
import { C as Chain } from './types-CuSlc_YE.js';
|
|
4
4
|
export { A as AdapterTxResult, a as AssetRef, b as CHAINS, c as ChainCoordinates, d as CoordinatesByChain, e as CreateCollectionInput, D as DEFAULT_CHAIN, E as EvmCoordinates, I as IssuanceAdapter, M as MintInput, O as OrderRef, R as RegisterOrderParams, S as SolanaCoordinates, f as StarknetCoordinates, g as StellarCoordinates, V as VenueAdapter, h as getCoordinates, i as getStarknetCoordinates } from './types-CuSlc_YE.js';
|
|
5
5
|
import 'zod';
|
package/dist/index.js
CHANGED
|
@@ -591,6 +591,7 @@ var ApiClient = class {
|
|
|
591
591
|
headers: this.asSubject(siwsToken)
|
|
592
592
|
});
|
|
593
593
|
}
|
|
594
|
+
/** @deprecated Use the funding methods (`createFunding`, or `fundWithChainTransfer` from `@medialane/sdk/starknet`). This call only nudges a legacy scanner and never credits anything itself. */
|
|
594
595
|
checkDeposit(txHash, siwsToken) {
|
|
595
596
|
return this.request("/v1/portal/credits/check", {
|
|
596
597
|
method: "POST",
|
|
@@ -598,6 +599,52 @@ var ApiClient = class {
|
|
|
598
599
|
headers: this.asSubject(siwsToken)
|
|
599
600
|
});
|
|
600
601
|
}
|
|
602
|
+
getFundingMethods(siwsToken) {
|
|
603
|
+
return this.request("/v1/portal/funding/methods", {
|
|
604
|
+
method: "GET",
|
|
605
|
+
headers: this.asSubject(siwsToken)
|
|
606
|
+
});
|
|
607
|
+
}
|
|
608
|
+
createFunding(input, siwsToken) {
|
|
609
|
+
return this.request("/v1/portal/funding", {
|
|
610
|
+
method: "POST",
|
|
611
|
+
body: JSON.stringify({ method: input.method, params: input.params }),
|
|
612
|
+
headers: this.asSubject(siwsToken)
|
|
613
|
+
});
|
|
614
|
+
}
|
|
615
|
+
getFunding(id, siwsToken) {
|
|
616
|
+
return this.request(`/v1/portal/funding/${encodeURIComponent(id)}`, {
|
|
617
|
+
method: "GET",
|
|
618
|
+
headers: this.asSubject(siwsToken)
|
|
619
|
+
});
|
|
620
|
+
}
|
|
621
|
+
getFundingChallenge(id, payer, siwsToken) {
|
|
622
|
+
return this.request(`/v1/portal/funding/${encodeURIComponent(id)}/challenge`, {
|
|
623
|
+
method: "POST",
|
|
624
|
+
body: JSON.stringify({ payer }),
|
|
625
|
+
headers: this.asSubject(siwsToken)
|
|
626
|
+
});
|
|
627
|
+
}
|
|
628
|
+
authorizeFunding(id, input, siwsToken) {
|
|
629
|
+
return this.request(
|
|
630
|
+
`/v1/portal/funding/${encodeURIComponent(id)}/authorize`,
|
|
631
|
+
{ method: "POST", body: JSON.stringify({ payer: input.payer, signature: input.signature }), headers: this.asSubject(siwsToken) }
|
|
632
|
+
);
|
|
633
|
+
}
|
|
634
|
+
submitFunding(id, txHash, siwsToken) {
|
|
635
|
+
return this.request(`/v1/portal/funding/${encodeURIComponent(id)}/submit`, {
|
|
636
|
+
method: "POST",
|
|
637
|
+
body: JSON.stringify({ txHash }),
|
|
638
|
+
headers: this.asSubject(siwsToken)
|
|
639
|
+
});
|
|
640
|
+
}
|
|
641
|
+
cancelFunding(id, siwsToken) {
|
|
642
|
+
return this.request(`/v1/portal/funding/${encodeURIComponent(id)}/cancel`, {
|
|
643
|
+
method: "POST",
|
|
644
|
+
body: JSON.stringify({}),
|
|
645
|
+
headers: this.asSubject(siwsToken)
|
|
646
|
+
});
|
|
647
|
+
}
|
|
601
648
|
getWebhooks() {
|
|
602
649
|
return this.get("/v1/portal/webhooks");
|
|
603
650
|
}
|
|
@@ -625,12 +672,9 @@ var ApiClient = class {
|
|
|
625
672
|
registerBusinessProvisioning(params) {
|
|
626
673
|
return this.post(
|
|
627
674
|
"/v1/business/provisioning",
|
|
628
|
-
params
|
|
675
|
+
{ chain: params.chain ?? "STARKNET", recipientScheme: params.recipientScheme, recipientValue: params.recipientValue }
|
|
629
676
|
);
|
|
630
677
|
}
|
|
631
|
-
completeBusinessProvisioning(id) {
|
|
632
|
-
return this.post(`/v1/business/provisioning/${id}/complete`, {});
|
|
633
|
-
}
|
|
634
678
|
getCollectionProfile(contractAddress) {
|
|
635
679
|
return this.request(
|
|
636
680
|
`/v1/collections/${this.addr(contractAddress)}/profile`,
|
|
@@ -727,11 +771,28 @@ var ApiClient = class {
|
|
|
727
771
|
headers: this.bearer(siwsToken)
|
|
728
772
|
});
|
|
729
773
|
}
|
|
730
|
-
async
|
|
731
|
-
const
|
|
774
|
+
async checkEmail(email) {
|
|
775
|
+
const body = await this.get(
|
|
732
776
|
`/v1/auth/email/exists?email=${encodeURIComponent(email)}`
|
|
733
777
|
);
|
|
734
|
-
return exists;
|
|
778
|
+
return { exists: body.exists, walletWaiting: body.walletWaiting === true };
|
|
779
|
+
}
|
|
780
|
+
async requestEmailCode(email) {
|
|
781
|
+
await this.post("/v1/auth/email/request-code", { email });
|
|
782
|
+
}
|
|
783
|
+
async registerEmailAccount(email) {
|
|
784
|
+
await this.post("/v1/auth/email/register-account", { email });
|
|
785
|
+
}
|
|
786
|
+
async verifyEmailCode(email, code) {
|
|
787
|
+
const body = await this.post("/v1/auth/email/verify-code", { email, code });
|
|
788
|
+
return { token: body.token, waitingWallets: body.waitingWallets ?? [] };
|
|
789
|
+
}
|
|
790
|
+
claimWallet(params) {
|
|
791
|
+
return this.post("/v1/users/me/claim-wallet", params);
|
|
792
|
+
}
|
|
793
|
+
async getSessionWallet() {
|
|
794
|
+
const body = await this.post("/v1/users/me/wallet", {});
|
|
795
|
+
return body.walletAddress ?? null;
|
|
735
796
|
}
|
|
736
797
|
getMyWallet(siwsToken) {
|
|
737
798
|
return this.request(
|