@medialane/sdk 0.83.0 → 0.84.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.
@@ -1,4 +1,4 @@
1
- import { b3 as ResolvedConfig, bc as TxResult, ar as CreatePopCollectionParams, ae as ClaimConditions, an as CreateDropParams, aw as CreateTicketParams, aQ as MintTicketsParams, ap as CreateMembershipParams, aP as MintMembershipsParams, au as CreateSponsorshipOfferParams, b0 as ProposeSponsorshipParams, l as ApiClient, aN as MedialaneConfig, aO as MedialaneErrorCode, aV as OrderDetails, b4 as ResolvedFeeConfig } from '../services--Zif_ws7.cjs';
1
+ import { b3 as ResolvedConfig, bc as TxResult, ar as CreatePopCollectionParams, ae as ClaimConditions, an as CreateDropParams, aw as CreateTicketParams, aQ as MintTicketsParams, ap as CreateMembershipParams, aP as MintMembershipsParams, au as CreateSponsorshipOfferParams, b0 as ProposeSponsorshipParams, l as ApiClient, aN as MedialaneConfig, aO as MedialaneErrorCode, aV as OrderDetails, b4 as ResolvedFeeConfig } from '../services-CRWVGLDq.cjs';
2
2
  import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload } from 'starknet';
3
3
  import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-sIc3OCpo.cjs';
4
4
  import 'zod';
@@ -651,7 +651,7 @@ declare class StarknetVenue implements VenueAdapter<StarknetVenueSigner> {
651
651
  private orderRefFromReceipt;
652
652
  }
653
653
 
654
- type FeeSurface = "marketplace" | "launchpad";
654
+ type FeeSurface = "marketplace" | "launchpad" | "sponsorship";
655
655
  interface BuildFeeCallParams {
656
656
  surface: FeeSurface;
657
657
  /** ERC-20 address the gross amount is denominated in. */
@@ -1,4 +1,4 @@
1
- import { b3 as ResolvedConfig, bc as TxResult, ar as CreatePopCollectionParams, ae as ClaimConditions, an as CreateDropParams, aw as CreateTicketParams, aQ as MintTicketsParams, ap as CreateMembershipParams, aP as MintMembershipsParams, au as CreateSponsorshipOfferParams, b0 as ProposeSponsorshipParams, l as ApiClient, aN as MedialaneConfig, aO as MedialaneErrorCode, aV as OrderDetails, b4 as ResolvedFeeConfig } from '../services-CJorT7zl.js';
1
+ import { b3 as ResolvedConfig, bc as TxResult, ar as CreatePopCollectionParams, ae as ClaimConditions, an as CreateDropParams, aw as CreateTicketParams, aQ as MintTicketsParams, ap as CreateMembershipParams, aP as MintMembershipsParams, au as CreateSponsorshipOfferParams, b0 as ProposeSponsorshipParams, l as ApiClient, aN as MedialaneConfig, aO as MedialaneErrorCode, aV as OrderDetails, b4 as ResolvedFeeConfig } from '../services-BggxMBlL.js';
2
2
  import { AccountInterface, Call, ProviderInterface, TypedData, constants, BigNumberish, DeployAccountContractPayload } from 'starknet';
3
3
  import { V as VenueAdapter, O as OrderRef, A as AdapterTxResult, R as RegisterOrderParams, j as VenueSigner } from '../types-sIc3OCpo.js';
4
4
  import 'zod';
@@ -651,7 +651,7 @@ declare class StarknetVenue implements VenueAdapter<StarknetVenueSigner> {
651
651
  private orderRefFromReceipt;
652
652
  }
653
653
 
654
- type FeeSurface = "marketplace" | "launchpad";
654
+ type FeeSurface = "marketplace" | "launchpad" | "sponsorship";
655
655
  interface BuildFeeCallParams {
656
656
  surface: FeeSurface;
657
657
  /** ERC-20 address the gross amount is denominated in. */
@@ -72,7 +72,8 @@ var FeeConfigSchema = z.object({
72
72
  enabled: z.boolean().default(true),
73
73
  fundAddress: z.string().min(1).optional(),
74
74
  marketplaceBps: z.number().int().min(0).max(1e4).default(100),
75
- launchpadBps: z.number().int().min(0).max(1e4).default(100)
75
+ launchpadBps: z.number().int().min(0).max(1e4).default(100),
76
+ sponsorshipBps: z.number().int().min(0).max(1e4).default(100)
76
77
  });
77
78
  function resolveFeeConfig(raw) {
78
79
  const p = FeeConfigSchema.parse(raw ?? {});
@@ -80,7 +81,8 @@ function resolveFeeConfig(raw) {
80
81
  enabled: p.enabled,
81
82
  fundAddress: p.fundAddress,
82
83
  marketplaceBps: p.marketplaceBps,
83
- launchpadBps: p.launchpadBps
84
+ launchpadBps: p.launchpadBps,
85
+ sponsorshipBps: p.sponsorshipBps
84
86
  };
85
87
  }
86
88
 
@@ -10156,7 +10158,7 @@ var PopService = class {
10156
10158
  };
10157
10159
  function buildFeeCall(p, cfg) {
10158
10160
  if (!cfg.enabled || !cfg.fundAddress) return null;
10159
- const bps = p.surface === "marketplace" ? cfg.marketplaceBps : cfg.launchpadBps;
10161
+ const bps = p.surface === "marketplace" ? cfg.marketplaceBps : p.surface === "launchpad" ? cfg.launchpadBps : cfg.sponsorshipBps;
10160
10162
  if (bps <= 0) return null;
10161
10163
  const fee = p.grossAmount * BigInt(bps) / 10000n;
10162
10164
  if (fee <= 0n) return null;