@medialane/sdk 0.82.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 +31 -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 +31 -2
- package/dist/index.js.map +1 -1
- package/dist/{services-BrLuUB_Z.d.ts → services-BggxMBlL.d.ts} +87 -1
- package/dist/{services-B5tH-bth.d.cts → services-CRWVGLDq.d.cts} +87 -1
- package/dist/starknet/index.cjs +32 -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 +32 -3
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
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 {
|
|
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
|
|
|
@@ -455,6 +457,33 @@ var ApiClient = class {
|
|
|
455
457
|
createTierIntent(params) {
|
|
456
458
|
return this.post("/v1/intents/create-tier", params);
|
|
457
459
|
}
|
|
460
|
+
createSponsorshipOfferIntent(params) {
|
|
461
|
+
return this.post("/v1/intents/sponsorship-offer", params);
|
|
462
|
+
}
|
|
463
|
+
setSponsorshipOfferOpenIntent(params) {
|
|
464
|
+
return this.post("/v1/intents/sponsorship-offer-open", params);
|
|
465
|
+
}
|
|
466
|
+
placeSponsorshipBidIntent(params) {
|
|
467
|
+
return this.post("/v1/intents/sponsorship-bid", params);
|
|
468
|
+
}
|
|
469
|
+
retractSponsorshipBidIntent(params) {
|
|
470
|
+
return this.post("/v1/intents/sponsorship-bid-retract", params);
|
|
471
|
+
}
|
|
472
|
+
acceptSponsorshipBidIntent(params) {
|
|
473
|
+
return this.post("/v1/intents/sponsorship-bid-accept", params);
|
|
474
|
+
}
|
|
475
|
+
createSponsorshipProposalIntent(params) {
|
|
476
|
+
return this.post("/v1/intents/sponsorship-proposal", params);
|
|
477
|
+
}
|
|
478
|
+
withdrawSponsorshipProposalIntent(params) {
|
|
479
|
+
return this.post("/v1/intents/sponsorship-proposal-withdraw", params);
|
|
480
|
+
}
|
|
481
|
+
acceptSponsorshipProposalIntent(params) {
|
|
482
|
+
return this.post("/v1/intents/sponsorship-proposal-accept", params);
|
|
483
|
+
}
|
|
484
|
+
rejectSponsorshipProposalIntent(params) {
|
|
485
|
+
return this.post("/v1/intents/sponsorship-proposal-reject", params);
|
|
486
|
+
}
|
|
458
487
|
/**
|
|
459
488
|
* Create a counter-offer intent. The seller proposes a new price in response
|
|
460
489
|
* to a buyer's active bid. clerkToken is optional — the endpoint authenticates
|
|
@@ -10129,7 +10158,7 @@ var PopService = class {
|
|
|
10129
10158
|
};
|
|
10130
10159
|
function buildFeeCall(p, cfg) {
|
|
10131
10160
|
if (!cfg.enabled || !cfg.fundAddress) return null;
|
|
10132
|
-
const bps = p.surface === "marketplace" ? cfg.marketplaceBps : cfg.launchpadBps;
|
|
10161
|
+
const bps = p.surface === "marketplace" ? cfg.marketplaceBps : p.surface === "launchpad" ? cfg.launchpadBps : cfg.sponsorshipBps;
|
|
10133
10162
|
if (bps <= 0) return null;
|
|
10134
10163
|
const fee = p.grossAmount * BigInt(bps) / 10000n;
|
|
10135
10164
|
if (fee <= 0n) return null;
|