@medialane/sdk 0.129.1 → 0.130.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.
@@ -822,6 +822,31 @@ interface ApiCreditPayment {
822
822
  status: string;
823
823
  createdAt: string;
824
824
  }
825
+ interface ApiFundingMethod {
826
+ id: string;
827
+ [detail: string]: unknown;
828
+ }
829
+ type ApiFundingStatus = "PENDING" | "SETTLED" | "FAILED" | "EXPIRED";
830
+ interface ApiFundingIntent {
831
+ id: string;
832
+ method: string;
833
+ status: ApiFundingStatus;
834
+ expiresAt: string;
835
+ payer?: string | null;
836
+ }
837
+ interface ApiFundingInstructions {
838
+ chain: string;
839
+ payTo: string;
840
+ asset: string;
841
+ amountAtomic: string;
842
+ }
843
+ type ApiFundingSubmit = {
844
+ status: "SETTLED";
845
+ credited?: number;
846
+ } | {
847
+ status: "PENDING";
848
+ reason: string;
849
+ };
825
850
  interface ApiSpendByAction {
826
851
  actionKey: string;
827
852
  credits: number;
@@ -1138,9 +1163,29 @@ declare class ApiClient {
1138
1163
  }>>;
1139
1164
  getCreditHistory(siwsToken?: string): Promise<ApiResponse<ApiCreditPayment[]>>;
1140
1165
  getSpend(siwsToken?: string): Promise<ApiResponse<ApiPortalSpend>>;
1166
+ /** @deprecated Use the funding methods (`createFunding`, or `fundWithChainTransfer` from `@medialane/sdk/starknet`). This call only nudges a legacy scanner and never credits anything itself. */
1141
1167
  checkDeposit(txHash: string, siwsToken?: string): Promise<ApiResponse<{
1142
1168
  deposits: number;
1143
1169
  }>>;
1170
+ getFundingMethods(siwsToken?: string): Promise<ApiResponse<ApiFundingMethod[]>>;
1171
+ createFunding(input: {
1172
+ method: string;
1173
+ params: Record<string, unknown>;
1174
+ }, siwsToken?: string): Promise<ApiResponse<ApiFundingIntent>>;
1175
+ getFunding(id: string, siwsToken?: string): Promise<ApiResponse<ApiFundingIntent>>;
1176
+ getFundingChallenge(id: string, payer: string, siwsToken?: string): Promise<ApiResponse<{
1177
+ typedData: unknown;
1178
+ }>>;
1179
+ authorizeFunding(id: string, input: {
1180
+ payer: string;
1181
+ signature: string[];
1182
+ }, siwsToken?: string): Promise<ApiResponse<{
1183
+ instructions: ApiFundingInstructions;
1184
+ }>>;
1185
+ submitFunding(id: string, txHash: string, siwsToken?: string): Promise<ApiResponse<ApiFundingSubmit>>;
1186
+ cancelFunding(id: string, siwsToken?: string): Promise<ApiResponse<{
1187
+ status: string;
1188
+ }>>;
1144
1189
  getWebhooks(): Promise<ApiResponse<ApiWebhookEndpoint[]>>;
1145
1190
  createWebhook(params: CreateWebhookParams): Promise<ApiResponse<ApiWebhookCreated>>;
1146
1191
  deleteWebhook(id: string): Promise<ApiResponse<{
@@ -1439,4 +1484,4 @@ declare class UserFacingError extends Error {
1439
1484
  constructor(message: string);
1440
1485
  }
1441
1486
 
1442
- export { type ApiRemixOffersQuery as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiEmissionCall as C, type ApiEmissionResult as D, type ApiIntent as E, type ApiIntentCreated as F, type ApiKeyStatus as G, type ApiMeta as H, type ApiMetadataSignedUrl as I, type ApiMetadataUpload 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 MedialaneConfig 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 CreateListingIntentParams as aA, type CreateMembershipParams as aB, type CreateMintIntentParams as aC, type CreatePopCollectionParams as aD, type CreateRemixOfferParams as aE, type CreateSponsorshipOfferIntentParams as aF, type CreateSponsorshipOfferParams as aG, type CreateSponsorshipProposalIntentParams as aH, type CreateTicketParams as aI, type CreateTierIntentParams as aJ, type CreateWebhookParams as aK, type DropMintStatus as aL, type EmissionParams as aM, type EnforcementDeclaration as aN, type FactoryFamilyServiceId as aO, type FeeConfig as aP, FeeConfigSchema as aQ, type FulfillOrderIntentParams as aR, type IPType as aS, type IntentCall as aT, type IntentStatus as aU, type IntentType as aV, type IpAttribute as aW, type IpNftMetadata as aX, type LaunchCoinIntentParams as aY, type MakeOfferIntentParams as aZ, MedialaneApiError as a_, type ApiSpendByAction as aa, type ApiToken as ab, type ApiTokenBalance as ac, type ApiTokenMetadata as ad, type ApiTxSyncResult as ae, type ApiUserRewards as af, type ApiUserWallet as ag, type ApiWalletActivity as ah, type ApiWebhookCreated as ai, type ApiWebhookEndpoint as aj, type AutoRemixOfferParams as ak, type CancelOrderIntentParams as al, type ChainFilter as am, type CheckoutIntentItem as an, type ClaimConditions as ao, type CollectionServiceId as ap, type CollectionSort as aq, type CollectionTokensSort as ar, type ConfirmRemixOfferParams as as, type ConfirmSelfRemixParams as at, type ConsiderationItem as au, type CreateCheckoutIntentParams as av, type CreateCoinIntentParams as aw, type CreateCollectionIntentParams as ax, type CreateCounterOfferIntentParams as ay, type CreateDropParams as az, type AcceptSponsorshipProposalIntentParams as b, type MedialaneErrorCode as b0, type MintMembershipsParams as b1, type MintTicketsParams as b2, OPEN_LICENSES as b3, type OfferItem as b4, type OpenLicense as b5, type Order as b6, type OrderDetails as b7, type OrderParameters as b8, type OrderStatus as b9, type WalletExecutor as bA, type ExecutedTransaction as bB, type PasskeyOwner as bC, type CreatedOwner as bD, type OwnerSigner as bE, type PasskeyConfig as bF, createPasskeyOwner as bG, PasskeyCancelledError as ba, type PlaceSponsorshipBidIntentParams as bb, type PopBatchEligibilityItem as bc, type PopClaimStatus as bd, type PopEventType as be, type ProposeSponsorshipParams as bf, type RejectSponsorshipProposalIntentParams as bg, type RemixOfferStatus as bh, type ResolvedConfig as bi, type RetractSponsorshipBidIntentParams as bj, type RetryOptions as bk, type ServiceEventDeclaration as bl, type SetSponsorshipOfferOpenIntentParams as bm, type SortOrder as bn, type TenantPlan as bo, type TierServiceId as bp, type TxResult as bq, type UpdateCollectionProfileInput as br, UserFacingError as bs, type WebhookEventType as bt, type WebhookStatus as bu, type WithdrawSponsorshipProposalIntentParams as bv, resolveConfig as bw, resolveFeeConfig as bx, type SealedOwner as by, type ReceiptProviderLike as bz, 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 };
1487
+ export { type ApiPortalMe as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiEmissionCall as C, type ApiEmissionResult as D, type ApiFundingInstructions as E, type ApiFundingIntent as F, type ApiFundingMethod as G, type ApiFundingStatus as H, type ApiFundingSubmit as I, type ApiIntent as J, type ApiIntentCreated as K, type ApiKeyStatus as L, type ApiMeta as M, type ApiMetadataSignedUrl as N, type ApiMetadataUpload as O, type ApiOrder as P, type ApiOrderConsideration as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiOrderOffer as T, type ApiOrderPrice as U, type ApiOrderTokenMeta as V, type ApiOrderTxHash as W, type ApiOrdersQuery as X, type ApiPointEvent as Y, type ApiPortalKey as Z, type ApiPortalKeyCreated as _, type ServiceCapability as a, type IpAttribute as a$, type ApiPortalSpend as a0, type ApiPublicRemix as a1, type ApiRemixOffer as a2, type ApiRemixOfferPrice as a3, type ApiRemixOffersQuery as a4, type ApiResponse as a5, type ApiRewardsBadge as a6, type ApiRewardsBatchEntry as a7, type ApiRewardsConfig as a8, type ApiRewardsLeaderboardEntry as a9, type CreateCheckoutIntentParams as aA, type CreateCoinIntentParams as aB, type CreateCollectionIntentParams as aC, type CreateCounterOfferIntentParams as aD, type CreateDropParams as aE, type CreateListingIntentParams as aF, type CreateMembershipParams as aG, type CreateMintIntentParams as aH, type CreatePopCollectionParams as aI, type CreateRemixOfferParams as aJ, type CreateSponsorshipOfferIntentParams as aK, type CreateSponsorshipOfferParams as aL, type CreateSponsorshipProposalIntentParams as aM, type CreateTicketParams as aN, type CreateTierIntentParams as aO, type CreateWebhookParams as aP, type DropMintStatus as aQ, type EmissionParams as aR, type EnforcementDeclaration as aS, type FactoryFamilyServiceId as aT, type FeeConfig as aU, FeeConfigSchema as aV, type FulfillOrderIntentParams as aW, type IPType as aX, type IntentCall as aY, type IntentStatus as aZ, type IntentType as a_, type ApiRewardsLevel as aa, type ApiSearchCollectionResult as ab, type ApiSearchCreatorResult as ac, type ApiSearchResult as ad, type ApiSearchTokenResult as ae, type ApiSpendByAction as af, type ApiToken as ag, type ApiTokenBalance as ah, type ApiTokenMetadata as ai, type ApiTxSyncResult as aj, type ApiUserRewards as ak, type ApiUserWallet as al, type ApiWalletActivity as am, type ApiWebhookCreated as an, type ApiWebhookEndpoint as ao, type AutoRemixOfferParams as ap, type CancelOrderIntentParams as aq, type ChainFilter as ar, type CheckoutIntentItem as as, type ClaimConditions as at, type CollectionServiceId as au, type CollectionSort as av, type CollectionTokensSort as aw, type ConfirmRemixOfferParams as ax, type ConfirmSelfRemixParams as ay, type ConsiderationItem as az, type AcceptSponsorshipProposalIntentParams as b, type IpNftMetadata as b0, type LaunchCoinIntentParams as b1, type MakeOfferIntentParams as b2, MedialaneApiError as b3, type MedialaneConfig as b4, type MedialaneErrorCode as b5, type MintMembershipsParams as b6, type MintTicketsParams as b7, OPEN_LICENSES as b8, type OfferItem as b9, type WithdrawSponsorshipProposalIntentParams as bA, resolveConfig as bB, resolveFeeConfig as bC, type SealedOwner as bD, type ReceiptProviderLike as bE, type WalletExecutor as bF, type ExecutedTransaction as bG, type PasskeyOwner as bH, type CreatedOwner as bI, type OwnerSigner as bJ, type PasskeyConfig as bK, createPasskeyOwner as bL, type OpenLicense as ba, type Order as bb, type OrderDetails as bc, type OrderParameters as bd, type OrderStatus as be, PasskeyCancelledError as bf, type PlaceSponsorshipBidIntentParams as bg, type PopBatchEligibilityItem as bh, type PopClaimStatus as bi, type PopEventType as bj, type ProposeSponsorshipParams as bk, type RejectSponsorshipProposalIntentParams as bl, type RemixOfferStatus as bm, type ResolvedConfig as bn, type RetractSponsorshipBidIntentParams as bo, type RetryOptions as bp, type ServiceEventDeclaration as bq, type SetSponsorshipOfferOpenIntentParams as br, type SortOrder as bs, type TenantPlan as bt, type TierServiceId as bu, type TxResult as bv, type UpdateCollectionProfileInput as bw, UserFacingError as bx, type WebhookEventType as by, type WebhookStatus as bz, 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 };
@@ -822,6 +822,31 @@ interface ApiCreditPayment {
822
822
  status: string;
823
823
  createdAt: string;
824
824
  }
825
+ interface ApiFundingMethod {
826
+ id: string;
827
+ [detail: string]: unknown;
828
+ }
829
+ type ApiFundingStatus = "PENDING" | "SETTLED" | "FAILED" | "EXPIRED";
830
+ interface ApiFundingIntent {
831
+ id: string;
832
+ method: string;
833
+ status: ApiFundingStatus;
834
+ expiresAt: string;
835
+ payer?: string | null;
836
+ }
837
+ interface ApiFundingInstructions {
838
+ chain: string;
839
+ payTo: string;
840
+ asset: string;
841
+ amountAtomic: string;
842
+ }
843
+ type ApiFundingSubmit = {
844
+ status: "SETTLED";
845
+ credited?: number;
846
+ } | {
847
+ status: "PENDING";
848
+ reason: string;
849
+ };
825
850
  interface ApiSpendByAction {
826
851
  actionKey: string;
827
852
  credits: number;
@@ -1138,9 +1163,29 @@ declare class ApiClient {
1138
1163
  }>>;
1139
1164
  getCreditHistory(siwsToken?: string): Promise<ApiResponse<ApiCreditPayment[]>>;
1140
1165
  getSpend(siwsToken?: string): Promise<ApiResponse<ApiPortalSpend>>;
1166
+ /** @deprecated Use the funding methods (`createFunding`, or `fundWithChainTransfer` from `@medialane/sdk/starknet`). This call only nudges a legacy scanner and never credits anything itself. */
1141
1167
  checkDeposit(txHash: string, siwsToken?: string): Promise<ApiResponse<{
1142
1168
  deposits: number;
1143
1169
  }>>;
1170
+ getFundingMethods(siwsToken?: string): Promise<ApiResponse<ApiFundingMethod[]>>;
1171
+ createFunding(input: {
1172
+ method: string;
1173
+ params: Record<string, unknown>;
1174
+ }, siwsToken?: string): Promise<ApiResponse<ApiFundingIntent>>;
1175
+ getFunding(id: string, siwsToken?: string): Promise<ApiResponse<ApiFundingIntent>>;
1176
+ getFundingChallenge(id: string, payer: string, siwsToken?: string): Promise<ApiResponse<{
1177
+ typedData: unknown;
1178
+ }>>;
1179
+ authorizeFunding(id: string, input: {
1180
+ payer: string;
1181
+ signature: string[];
1182
+ }, siwsToken?: string): Promise<ApiResponse<{
1183
+ instructions: ApiFundingInstructions;
1184
+ }>>;
1185
+ submitFunding(id: string, txHash: string, siwsToken?: string): Promise<ApiResponse<ApiFundingSubmit>>;
1186
+ cancelFunding(id: string, siwsToken?: string): Promise<ApiResponse<{
1187
+ status: string;
1188
+ }>>;
1144
1189
  getWebhooks(): Promise<ApiResponse<ApiWebhookEndpoint[]>>;
1145
1190
  createWebhook(params: CreateWebhookParams): Promise<ApiResponse<ApiWebhookCreated>>;
1146
1191
  deleteWebhook(id: string): Promise<ApiResponse<{
@@ -1439,4 +1484,4 @@ declare class UserFacingError extends Error {
1439
1484
  constructor(message: string);
1440
1485
  }
1441
1486
 
1442
- export { type ApiRemixOffersQuery as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiEmissionCall as C, type ApiEmissionResult as D, type ApiIntent as E, type ApiIntentCreated as F, type ApiKeyStatus as G, type ApiMeta as H, type ApiMetadataSignedUrl as I, type ApiMetadataUpload 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 MedialaneConfig 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 CreateListingIntentParams as aA, type CreateMembershipParams as aB, type CreateMintIntentParams as aC, type CreatePopCollectionParams as aD, type CreateRemixOfferParams as aE, type CreateSponsorshipOfferIntentParams as aF, type CreateSponsorshipOfferParams as aG, type CreateSponsorshipProposalIntentParams as aH, type CreateTicketParams as aI, type CreateTierIntentParams as aJ, type CreateWebhookParams as aK, type DropMintStatus as aL, type EmissionParams as aM, type EnforcementDeclaration as aN, type FactoryFamilyServiceId as aO, type FeeConfig as aP, FeeConfigSchema as aQ, type FulfillOrderIntentParams as aR, type IPType as aS, type IntentCall as aT, type IntentStatus as aU, type IntentType as aV, type IpAttribute as aW, type IpNftMetadata as aX, type LaunchCoinIntentParams as aY, type MakeOfferIntentParams as aZ, MedialaneApiError as a_, type ApiSpendByAction as aa, type ApiToken as ab, type ApiTokenBalance as ac, type ApiTokenMetadata as ad, type ApiTxSyncResult as ae, type ApiUserRewards as af, type ApiUserWallet as ag, type ApiWalletActivity as ah, type ApiWebhookCreated as ai, type ApiWebhookEndpoint as aj, type AutoRemixOfferParams as ak, type CancelOrderIntentParams as al, type ChainFilter as am, type CheckoutIntentItem as an, type ClaimConditions as ao, type CollectionServiceId as ap, type CollectionSort as aq, type CollectionTokensSort as ar, type ConfirmRemixOfferParams as as, type ConfirmSelfRemixParams as at, type ConsiderationItem as au, type CreateCheckoutIntentParams as av, type CreateCoinIntentParams as aw, type CreateCollectionIntentParams as ax, type CreateCounterOfferIntentParams as ay, type CreateDropParams as az, type AcceptSponsorshipProposalIntentParams as b, type MedialaneErrorCode as b0, type MintMembershipsParams as b1, type MintTicketsParams as b2, OPEN_LICENSES as b3, type OfferItem as b4, type OpenLicense as b5, type Order as b6, type OrderDetails as b7, type OrderParameters as b8, type OrderStatus as b9, type WalletExecutor as bA, type ExecutedTransaction as bB, type PasskeyOwner as bC, type CreatedOwner as bD, type OwnerSigner as bE, type PasskeyConfig as bF, createPasskeyOwner as bG, PasskeyCancelledError as ba, type PlaceSponsorshipBidIntentParams as bb, type PopBatchEligibilityItem as bc, type PopClaimStatus as bd, type PopEventType as be, type ProposeSponsorshipParams as bf, type RejectSponsorshipProposalIntentParams as bg, type RemixOfferStatus as bh, type ResolvedConfig as bi, type RetractSponsorshipBidIntentParams as bj, type RetryOptions as bk, type ServiceEventDeclaration as bl, type SetSponsorshipOfferOpenIntentParams as bm, type SortOrder as bn, type TenantPlan as bo, type TierServiceId as bp, type TxResult as bq, type UpdateCollectionProfileInput as br, UserFacingError as bs, type WebhookEventType as bt, type WebhookStatus as bu, type WithdrawSponsorshipProposalIntentParams as bv, resolveConfig as bw, resolveFeeConfig as bx, type SealedOwner as by, type ReceiptProviderLike as bz, 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 };
1487
+ export { type ApiPortalMe as $, type AcceptSponsorshipBidIntentParams as A, type ApiCreditPayment as B, type ApiEmissionCall as C, type ApiEmissionResult as D, type ApiFundingInstructions as E, type ApiFundingIntent as F, type ApiFundingMethod as G, type ApiFundingStatus as H, type ApiFundingSubmit as I, type ApiIntent as J, type ApiIntentCreated as K, type ApiKeyStatus as L, type ApiMeta as M, type ApiMetadataSignedUrl as N, type ApiMetadataUpload as O, type ApiOrder as P, type ApiOrderConsideration as Q, type ResolvedFeeConfig as R, type ServiceDefinition as S, type ApiOrderOffer as T, type ApiOrderPrice as U, type ApiOrderTokenMeta as V, type ApiOrderTxHash as W, type ApiOrdersQuery as X, type ApiPointEvent as Y, type ApiPortalKey as Z, type ApiPortalKeyCreated as _, type ServiceCapability as a, type IpAttribute as a$, type ApiPortalSpend as a0, type ApiPublicRemix as a1, type ApiRemixOffer as a2, type ApiRemixOfferPrice as a3, type ApiRemixOffersQuery as a4, type ApiResponse as a5, type ApiRewardsBadge as a6, type ApiRewardsBatchEntry as a7, type ApiRewardsConfig as a8, type ApiRewardsLeaderboardEntry as a9, type CreateCheckoutIntentParams as aA, type CreateCoinIntentParams as aB, type CreateCollectionIntentParams as aC, type CreateCounterOfferIntentParams as aD, type CreateDropParams as aE, type CreateListingIntentParams as aF, type CreateMembershipParams as aG, type CreateMintIntentParams as aH, type CreatePopCollectionParams as aI, type CreateRemixOfferParams as aJ, type CreateSponsorshipOfferIntentParams as aK, type CreateSponsorshipOfferParams as aL, type CreateSponsorshipProposalIntentParams as aM, type CreateTicketParams as aN, type CreateTierIntentParams as aO, type CreateWebhookParams as aP, type DropMintStatus as aQ, type EmissionParams as aR, type EnforcementDeclaration as aS, type FactoryFamilyServiceId as aT, type FeeConfig as aU, FeeConfigSchema as aV, type FulfillOrderIntentParams as aW, type IPType as aX, type IntentCall as aY, type IntentStatus as aZ, type IntentType as a_, type ApiRewardsLevel as aa, type ApiSearchCollectionResult as ab, type ApiSearchCreatorResult as ac, type ApiSearchResult as ad, type ApiSearchTokenResult as ae, type ApiSpendByAction as af, type ApiToken as ag, type ApiTokenBalance as ah, type ApiTokenMetadata as ai, type ApiTxSyncResult as aj, type ApiUserRewards as ak, type ApiUserWallet as al, type ApiWalletActivity as am, type ApiWebhookCreated as an, type ApiWebhookEndpoint as ao, type AutoRemixOfferParams as ap, type CancelOrderIntentParams as aq, type ChainFilter as ar, type CheckoutIntentItem as as, type ClaimConditions as at, type CollectionServiceId as au, type CollectionSort as av, type CollectionTokensSort as aw, type ConfirmRemixOfferParams as ax, type ConfirmSelfRemixParams as ay, type ConsiderationItem as az, type AcceptSponsorshipProposalIntentParams as b, type IpNftMetadata as b0, type LaunchCoinIntentParams as b1, type MakeOfferIntentParams as b2, MedialaneApiError as b3, type MedialaneConfig as b4, type MedialaneErrorCode as b5, type MintMembershipsParams as b6, type MintTicketsParams as b7, OPEN_LICENSES as b8, type OfferItem as b9, type WithdrawSponsorshipProposalIntentParams as bA, resolveConfig as bB, resolveFeeConfig as bC, type SealedOwner as bD, type ReceiptProviderLike as bE, type WalletExecutor as bF, type ExecutedTransaction as bG, type PasskeyOwner as bH, type CreatedOwner as bI, type OwnerSigner as bJ, type PasskeyConfig as bK, createPasskeyOwner as bL, type OpenLicense as ba, type Order as bb, type OrderDetails as bc, type OrderParameters as bd, type OrderStatus as be, PasskeyCancelledError as bf, type PlaceSponsorshipBidIntentParams as bg, type PopBatchEligibilityItem as bh, type PopClaimStatus as bi, type PopEventType as bj, type ProposeSponsorshipParams as bk, type RejectSponsorshipProposalIntentParams as bl, type RemixOfferStatus as bm, type ResolvedConfig as bn, type RetractSponsorshipBidIntentParams as bo, type RetryOptions as bp, type ServiceEventDeclaration as bq, type SetSponsorshipOfferOpenIntentParams as br, type SortOrder as bs, type TenantPlan as bt, type TierServiceId as bu, type TxResult as bv, type UpdateCollectionProfileInput as bw, UserFacingError as bx, type WebhookEventType as by, type WebhookStatus as bz, 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/index.cjs CHANGED
@@ -593,6 +593,7 @@ var ApiClient = class {
593
593
  headers: this.asSubject(siwsToken)
594
594
  });
595
595
  }
596
+ /** @deprecated Use the funding methods (`createFunding`, or `fundWithChainTransfer` from `@medialane/sdk/starknet`). This call only nudges a legacy scanner and never credits anything itself. */
596
597
  checkDeposit(txHash, siwsToken) {
597
598
  return this.request("/v1/portal/credits/check", {
598
599
  method: "POST",
@@ -600,6 +601,52 @@ var ApiClient = class {
600
601
  headers: this.asSubject(siwsToken)
601
602
  });
602
603
  }
604
+ getFundingMethods(siwsToken) {
605
+ return this.request("/v1/portal/funding/methods", {
606
+ method: "GET",
607
+ headers: this.asSubject(siwsToken)
608
+ });
609
+ }
610
+ createFunding(input, siwsToken) {
611
+ return this.request("/v1/portal/funding", {
612
+ method: "POST",
613
+ body: JSON.stringify({ method: input.method, params: input.params }),
614
+ headers: this.asSubject(siwsToken)
615
+ });
616
+ }
617
+ getFunding(id, siwsToken) {
618
+ return this.request(`/v1/portal/funding/${encodeURIComponent(id)}`, {
619
+ method: "GET",
620
+ headers: this.asSubject(siwsToken)
621
+ });
622
+ }
623
+ getFundingChallenge(id, payer, siwsToken) {
624
+ return this.request(`/v1/portal/funding/${encodeURIComponent(id)}/challenge`, {
625
+ method: "POST",
626
+ body: JSON.stringify({ payer }),
627
+ headers: this.asSubject(siwsToken)
628
+ });
629
+ }
630
+ authorizeFunding(id, input, siwsToken) {
631
+ return this.request(
632
+ `/v1/portal/funding/${encodeURIComponent(id)}/authorize`,
633
+ { method: "POST", body: JSON.stringify({ payer: input.payer, signature: input.signature }), headers: this.asSubject(siwsToken) }
634
+ );
635
+ }
636
+ submitFunding(id, txHash, siwsToken) {
637
+ return this.request(`/v1/portal/funding/${encodeURIComponent(id)}/submit`, {
638
+ method: "POST",
639
+ body: JSON.stringify({ txHash }),
640
+ headers: this.asSubject(siwsToken)
641
+ });
642
+ }
643
+ cancelFunding(id, siwsToken) {
644
+ return this.request(`/v1/portal/funding/${encodeURIComponent(id)}/cancel`, {
645
+ method: "POST",
646
+ body: JSON.stringify({}),
647
+ headers: this.asSubject(siwsToken)
648
+ });
649
+ }
603
650
  getWebhooks() {
604
651
  return this.get("/v1/portal/webhooks");
605
652
  }
@@ -1896,8 +1943,7 @@ function toHex(bytes) {
1896
1943
  return out;
1897
1944
  }
1898
1945
  function sign(secret, domain, payload) {
1899
- const message = domain === null ? payload : `${domain}.${payload}`;
1900
- return toHex(hmac_js.hmac(sha2_js.sha256, encoder.encode(secret), encoder.encode(message)));
1946
+ return toHex(hmac_js.hmac(sha2_js.sha256, encoder.encode(secret), encoder.encode(`${domain}.${payload}`)));
1901
1947
  }
1902
1948
  function constantTimeEquals(a, b) {
1903
1949
  if (a.length !== b.length) return false;
@@ -1906,7 +1952,7 @@ function constantTimeEquals(a, b) {
1906
1952
  return diff === 0;
1907
1953
  }
1908
1954
  function signatureMatches(secret, domain, payload, provided) {
1909
- return constantTimeEquals(provided, sign(secret, domain, payload)) || constantTimeEquals(provided, sign(secret, null, payload));
1955
+ return constantTimeEquals(provided, sign(secret, domain, payload));
1910
1956
  }
1911
1957
  function encodePayload(value) {
1912
1958
  return base.base64urlnopad.encode(encoder.encode(JSON.stringify(value)));