@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
|
@@ -12,16 +12,19 @@ declare const FeeConfigSchema: z.ZodObject<{
|
|
|
12
12
|
fundAddress: z.ZodOptional<z.ZodString>;
|
|
13
13
|
marketplaceBps: z.ZodDefault<z.ZodNumber>;
|
|
14
14
|
launchpadBps: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
sponsorshipBps: z.ZodDefault<z.ZodNumber>;
|
|
15
16
|
}, "strip", z.ZodTypeAny, {
|
|
16
17
|
enabled: boolean;
|
|
17
18
|
marketplaceBps: number;
|
|
18
19
|
launchpadBps: number;
|
|
20
|
+
sponsorshipBps: number;
|
|
19
21
|
fundAddress?: string | undefined;
|
|
20
22
|
}, {
|
|
21
23
|
enabled?: boolean | undefined;
|
|
22
24
|
fundAddress?: string | undefined;
|
|
23
25
|
marketplaceBps?: number | undefined;
|
|
24
26
|
launchpadBps?: number | undefined;
|
|
27
|
+
sponsorshipBps?: number | undefined;
|
|
25
28
|
}>;
|
|
26
29
|
type FeeConfig = z.input<typeof FeeConfigSchema>;
|
|
27
30
|
interface ResolvedFeeConfig {
|
|
@@ -29,6 +32,7 @@ interface ResolvedFeeConfig {
|
|
|
29
32
|
fundAddress: string | undefined;
|
|
30
33
|
marketplaceBps: number;
|
|
31
34
|
launchpadBps: number;
|
|
35
|
+
sponsorshipBps: number;
|
|
32
36
|
}
|
|
33
37
|
declare function resolveFeeConfig(raw: FeeConfig | undefined): ResolvedFeeConfig;
|
|
34
38
|
|
|
@@ -61,16 +65,19 @@ declare const MedialaneConfigSchema: z.ZodObject<{
|
|
|
61
65
|
fundAddress: z.ZodOptional<z.ZodString>;
|
|
62
66
|
marketplaceBps: z.ZodDefault<z.ZodNumber>;
|
|
63
67
|
launchpadBps: z.ZodDefault<z.ZodNumber>;
|
|
68
|
+
sponsorshipBps: z.ZodDefault<z.ZodNumber>;
|
|
64
69
|
}, "strip", z.ZodTypeAny, {
|
|
65
70
|
enabled: boolean;
|
|
66
71
|
marketplaceBps: number;
|
|
67
72
|
launchpadBps: number;
|
|
73
|
+
sponsorshipBps: number;
|
|
68
74
|
fundAddress?: string | undefined;
|
|
69
75
|
}, {
|
|
70
76
|
enabled?: boolean | undefined;
|
|
71
77
|
fundAddress?: string | undefined;
|
|
72
78
|
marketplaceBps?: number | undefined;
|
|
73
79
|
launchpadBps?: number | undefined;
|
|
80
|
+
sponsorshipBps?: number | undefined;
|
|
74
81
|
}>>;
|
|
75
82
|
}, "strip", z.ZodTypeAny, {
|
|
76
83
|
chain: "STARKNET" | "ETHEREUM" | "SOLANA" | "BASE" | "STELLAR" | "BITCOIN";
|
|
@@ -92,6 +99,7 @@ declare const MedialaneConfigSchema: z.ZodObject<{
|
|
|
92
99
|
enabled: boolean;
|
|
93
100
|
marketplaceBps: number;
|
|
94
101
|
launchpadBps: number;
|
|
102
|
+
sponsorshipBps: number;
|
|
95
103
|
fundAddress?: string | undefined;
|
|
96
104
|
} | undefined;
|
|
97
105
|
}, {
|
|
@@ -115,6 +123,7 @@ declare const MedialaneConfigSchema: z.ZodObject<{
|
|
|
115
123
|
fundAddress?: string | undefined;
|
|
116
124
|
marketplaceBps?: number | undefined;
|
|
117
125
|
launchpadBps?: number | undefined;
|
|
126
|
+
sponsorshipBps?: number | undefined;
|
|
118
127
|
} | undefined;
|
|
119
128
|
}>;
|
|
120
129
|
type MedialaneConfig = z.input<typeof MedialaneConfigSchema>;
|
|
@@ -12,16 +12,19 @@ declare const FeeConfigSchema: z.ZodObject<{
|
|
|
12
12
|
fundAddress: z.ZodOptional<z.ZodString>;
|
|
13
13
|
marketplaceBps: z.ZodDefault<z.ZodNumber>;
|
|
14
14
|
launchpadBps: z.ZodDefault<z.ZodNumber>;
|
|
15
|
+
sponsorshipBps: z.ZodDefault<z.ZodNumber>;
|
|
15
16
|
}, "strip", z.ZodTypeAny, {
|
|
16
17
|
enabled: boolean;
|
|
17
18
|
marketplaceBps: number;
|
|
18
19
|
launchpadBps: number;
|
|
20
|
+
sponsorshipBps: number;
|
|
19
21
|
fundAddress?: string | undefined;
|
|
20
22
|
}, {
|
|
21
23
|
enabled?: boolean | undefined;
|
|
22
24
|
fundAddress?: string | undefined;
|
|
23
25
|
marketplaceBps?: number | undefined;
|
|
24
26
|
launchpadBps?: number | undefined;
|
|
27
|
+
sponsorshipBps?: number | undefined;
|
|
25
28
|
}>;
|
|
26
29
|
type FeeConfig = z.input<typeof FeeConfigSchema>;
|
|
27
30
|
interface ResolvedFeeConfig {
|
|
@@ -29,6 +32,7 @@ interface ResolvedFeeConfig {
|
|
|
29
32
|
fundAddress: string | undefined;
|
|
30
33
|
marketplaceBps: number;
|
|
31
34
|
launchpadBps: number;
|
|
35
|
+
sponsorshipBps: number;
|
|
32
36
|
}
|
|
33
37
|
declare function resolveFeeConfig(raw: FeeConfig | undefined): ResolvedFeeConfig;
|
|
34
38
|
|
|
@@ -61,16 +65,19 @@ declare const MedialaneConfigSchema: z.ZodObject<{
|
|
|
61
65
|
fundAddress: z.ZodOptional<z.ZodString>;
|
|
62
66
|
marketplaceBps: z.ZodDefault<z.ZodNumber>;
|
|
63
67
|
launchpadBps: z.ZodDefault<z.ZodNumber>;
|
|
68
|
+
sponsorshipBps: z.ZodDefault<z.ZodNumber>;
|
|
64
69
|
}, "strip", z.ZodTypeAny, {
|
|
65
70
|
enabled: boolean;
|
|
66
71
|
marketplaceBps: number;
|
|
67
72
|
launchpadBps: number;
|
|
73
|
+
sponsorshipBps: number;
|
|
68
74
|
fundAddress?: string | undefined;
|
|
69
75
|
}, {
|
|
70
76
|
enabled?: boolean | undefined;
|
|
71
77
|
fundAddress?: string | undefined;
|
|
72
78
|
marketplaceBps?: number | undefined;
|
|
73
79
|
launchpadBps?: number | undefined;
|
|
80
|
+
sponsorshipBps?: number | undefined;
|
|
74
81
|
}>>;
|
|
75
82
|
}, "strip", z.ZodTypeAny, {
|
|
76
83
|
chain: "STARKNET" | "ETHEREUM" | "SOLANA" | "BASE" | "STELLAR" | "BITCOIN";
|
|
@@ -92,6 +99,7 @@ declare const MedialaneConfigSchema: z.ZodObject<{
|
|
|
92
99
|
enabled: boolean;
|
|
93
100
|
marketplaceBps: number;
|
|
94
101
|
launchpadBps: number;
|
|
102
|
+
sponsorshipBps: number;
|
|
95
103
|
fundAddress?: string | undefined;
|
|
96
104
|
} | undefined;
|
|
97
105
|
}, {
|
|
@@ -115,6 +123,7 @@ declare const MedialaneConfigSchema: z.ZodObject<{
|
|
|
115
123
|
fundAddress?: string | undefined;
|
|
116
124
|
marketplaceBps?: number | undefined;
|
|
117
125
|
launchpadBps?: number | undefined;
|
|
126
|
+
sponsorshipBps?: number | undefined;
|
|
118
127
|
} | undefined;
|
|
119
128
|
}>;
|
|
120
129
|
type MedialaneConfig = z.input<typeof MedialaneConfigSchema>;
|
package/dist/starknet/index.cjs
CHANGED
|
@@ -74,7 +74,8 @@ var FeeConfigSchema = zod.z.object({
|
|
|
74
74
|
enabled: zod.z.boolean().default(true),
|
|
75
75
|
fundAddress: zod.z.string().min(1).optional(),
|
|
76
76
|
marketplaceBps: zod.z.number().int().min(0).max(1e4).default(100),
|
|
77
|
-
launchpadBps: zod.z.number().int().min(0).max(1e4).default(100)
|
|
77
|
+
launchpadBps: zod.z.number().int().min(0).max(1e4).default(100),
|
|
78
|
+
sponsorshipBps: zod.z.number().int().min(0).max(1e4).default(100)
|
|
78
79
|
});
|
|
79
80
|
function resolveFeeConfig(raw) {
|
|
80
81
|
const p = FeeConfigSchema.parse(raw ?? {});
|
|
@@ -82,7 +83,8 @@ function resolveFeeConfig(raw) {
|
|
|
82
83
|
enabled: p.enabled,
|
|
83
84
|
fundAddress: p.fundAddress,
|
|
84
85
|
marketplaceBps: p.marketplaceBps,
|
|
85
|
-
launchpadBps: p.launchpadBps
|
|
86
|
+
launchpadBps: p.launchpadBps,
|
|
87
|
+
sponsorshipBps: p.sponsorshipBps
|
|
86
88
|
};
|
|
87
89
|
}
|
|
88
90
|
|
|
@@ -10158,7 +10160,7 @@ var PopService = class {
|
|
|
10158
10160
|
};
|
|
10159
10161
|
function buildFeeCall(p, cfg) {
|
|
10160
10162
|
if (!cfg.enabled || !cfg.fundAddress) return null;
|
|
10161
|
-
const bps = p.surface === "marketplace" ? cfg.marketplaceBps : cfg.launchpadBps;
|
|
10163
|
+
const bps = p.surface === "marketplace" ? cfg.marketplaceBps : p.surface === "launchpad" ? cfg.launchpadBps : cfg.sponsorshipBps;
|
|
10162
10164
|
if (bps <= 0) return null;
|
|
10163
10165
|
const fee = p.grossAmount * BigInt(bps) / 10000n;
|
|
10164
10166
|
if (fee <= 0n) return null;
|