@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.
- package/dist/index.cjs +4 -2
- 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 +4 -2
- package/dist/index.js.map +1 -1
- package/dist/{services-CJorT7zl.d.ts → services-BggxMBlL.d.ts} +9 -0
- package/dist/{services--Zif_ws7.d.cts → services-CRWVGLDq.d.cts} +9 -0
- package/dist/starknet/index.cjs +5 -3
- 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 +5 -3
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -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
|
|
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. */
|
package/dist/starknet/index.d.ts
CHANGED
|
@@ -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-
|
|
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. */
|
package/dist/starknet/index.js
CHANGED
|
@@ -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;
|