@medialane/sdk 0.83.0 → 0.85.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 { b6 as ResolvedConfig, bf as TxResult, at as CreatePopCollectionParams, ae as ClaimConditions, ap as CreateDropParams, ay as CreateTicketParams, aT as MintTicketsParams, ar as CreateMembershipParams, aS as MintMembershipsParams, aw as CreateSponsorshipOfferParams, b3 as ProposeSponsorshipParams, l as ApiClient, aQ as MedialaneConfig, aR as MedialaneErrorCode, aY as OrderDetails, b7 as ResolvedFeeConfig } from '../services-IzFS_1ge.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';
@@ -37,6 +37,15 @@ declare class PopService {
37
37
  createCollection(account: AccountInterface, params: CreatePopCollectionParams): Promise<TxResult>;
38
38
  }
39
39
 
40
+ /** Exported so the backend orchestrator can build `create_drop`/`set_claim_conditions`
41
+ * calldata with the exact same conversion this service uses client-side. */
42
+ declare function toContractConditions(c: ClaimConditions): {
43
+ start_time: number;
44
+ end_time: number;
45
+ price: bigint;
46
+ payment_token: string;
47
+ max_quantity_per_wallet: bigint;
48
+ };
40
49
  declare class DropService {
41
50
  private readonly factoryAddress;
42
51
  private readonly config;
@@ -651,7 +660,7 @@ declare class StarknetVenue implements VenueAdapter<StarknetVenueSigner> {
651
660
  private orderRefFromReceipt;
652
661
  }
653
662
 
654
- type FeeSurface = "marketplace" | "launchpad";
663
+ type FeeSurface = "marketplace" | "launchpad" | "sponsorship";
655
664
  interface BuildFeeCallParams {
656
665
  surface: FeeSurface;
657
666
  /** ERC-20 address the gross amount is denominated in. */
@@ -8181,4 +8190,4 @@ declare function buildDeployAccountParams(ownerPubkey: BigNumberish, salt?: BigN
8181
8190
 
8182
8191
  type StarknetVenueSigner = VenueSigner<TypedData, Call>;
8183
8192
 
8184
- export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, type CreateCreatorCoinParams, type CreateGrantOpts, CreatorCoinFactoryABI, type CreatorCoinPrice, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type FeeSurface, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type RequestSiwsTokenArgs, type ResolvedOrder, type SiwsSigner, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildChangeOwnersCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, getCounter, getCounter1155, getCreatorCoinPrice, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sessionKeyHashOf, signAdminRequest, storeSiwsToken, teamCoinsRaw, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
8193
+ export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClaimConditions, ClubService, type CreateCreatorCoinParams, CreateDropParams, type CreateGrantOpts, CreatePopCollectionParams, CreatorCoinFactoryABI, type CreatorCoinPrice, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type FeeSurface, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type RequestSiwsTokenArgs, type ResolvedOrder, type SiwsSigner, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildChangeOwnersCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, getCounter, getCounter1155, getCreatorCoinPrice, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sessionKeyHashOf, signAdminRequest, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
@@ -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 { b6 as ResolvedConfig, bf as TxResult, at as CreatePopCollectionParams, ae as ClaimConditions, ap as CreateDropParams, ay as CreateTicketParams, aT as MintTicketsParams, ar as CreateMembershipParams, aS as MintMembershipsParams, aw as CreateSponsorshipOfferParams, b3 as ProposeSponsorshipParams, l as ApiClient, aQ as MedialaneConfig, aR as MedialaneErrorCode, aY as OrderDetails, b7 as ResolvedFeeConfig } from '../services-L8GY_ETW.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';
@@ -37,6 +37,15 @@ declare class PopService {
37
37
  createCollection(account: AccountInterface, params: CreatePopCollectionParams): Promise<TxResult>;
38
38
  }
39
39
 
40
+ /** Exported so the backend orchestrator can build `create_drop`/`set_claim_conditions`
41
+ * calldata with the exact same conversion this service uses client-side. */
42
+ declare function toContractConditions(c: ClaimConditions): {
43
+ start_time: number;
44
+ end_time: number;
45
+ price: bigint;
46
+ payment_token: string;
47
+ max_quantity_per_wallet: bigint;
48
+ };
40
49
  declare class DropService {
41
50
  private readonly factoryAddress;
42
51
  private readonly config;
@@ -651,7 +660,7 @@ declare class StarknetVenue implements VenueAdapter<StarknetVenueSigner> {
651
660
  private orderRefFromReceipt;
652
661
  }
653
662
 
654
- type FeeSurface = "marketplace" | "launchpad";
663
+ type FeeSurface = "marketplace" | "launchpad" | "sponsorship";
655
664
  interface BuildFeeCallParams {
656
665
  surface: FeeSurface;
657
666
  /** ERC-20 address the gross amount is denominated in. */
@@ -8181,4 +8190,4 @@ declare function buildDeployAccountParams(ownerPubkey: BigNumberish, salt?: BigN
8181
8190
 
8182
8191
  type StarknetVenueSigner = VenueSigner<TypedData, Call>;
8183
8192
 
8184
- export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, type CreateCreatorCoinParams, type CreateGrantOpts, CreatorCoinFactoryABI, type CreatorCoinPrice, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type FeeSurface, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type RequestSiwsTokenArgs, type ResolvedOrder, type SiwsSigner, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildChangeOwnersCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, getCounter, getCounter1155, getCreatorCoinPrice, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sessionKeyHashOf, signAdminRequest, storeSiwsToken, teamCoinsRaw, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
8193
+ export { ADMIN_HEADERS, ADMIN_SCOPE, type AddSupplyParams, type AdminGrant, type AdminRequest, type AdminRequestSig, type AdminSession, type AdminSessionTypedDataInput, type BatchMintEditionParams, type BuildFeeCallParams, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClaimConditions, ClubService, type CreateCreatorCoinParams, CreateDropParams, type CreateGrantOpts, CreatePopCollectionParams, CreatorCoinFactoryABI, type CreatorCoinPrice, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type FeeSurface, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type RequestSiwsTokenArgs, type ResolvedOrder, type SiwsSigner, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildChangeOwnersCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, getCounter, getCounter1155, getCreatorCoinPrice, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sessionKeyHashOf, signAdminRequest, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
@@ -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,12 @@ var ApiClient = class {
455
457
  createTierIntent(params) {
456
458
  return this.post("/v1/intents/create-tier", params);
457
459
  }
460
+ createCoinIntent(params) {
461
+ return this.post("/v1/intents/create-coin", params);
462
+ }
463
+ launchCoinIntent(params) {
464
+ return this.post("/v1/intents/launch-coin", params);
465
+ }
458
466
  createSponsorshipOfferIntent(params) {
459
467
  return this.post("/v1/intents/sponsorship-offer", params);
460
468
  }
@@ -10156,7 +10164,7 @@ var PopService = class {
10156
10164
  };
10157
10165
  function buildFeeCall(p, cfg) {
10158
10166
  if (!cfg.enabled || !cfg.fundAddress) return null;
10159
- const bps = p.surface === "marketplace" ? cfg.marketplaceBps : cfg.launchpadBps;
10167
+ const bps = p.surface === "marketplace" ? cfg.marketplaceBps : p.surface === "launchpad" ? cfg.launchpadBps : cfg.sponsorshipBps;
10160
10168
  if (bps <= 0) return null;
10161
10169
  const fee = p.grossAmount * BigInt(bps) / 10000n;
10162
10170
  if (fee <= 0n) return null;
@@ -11791,6 +11799,6 @@ function buildDeployAccountParams(ownerPubkey, salt = 0) {
11791
11799
  };
11792
11800
  }
11793
11801
 
11794
- export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PopService, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildChangeOwnersCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, getCounter, getCounter1155, getCreatorCoinPrice, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sessionKeyHashOf, signAdminRequest, storeSiwsToken, teamCoinsRaw, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
11802
+ export { ADMIN_HEADERS, ADMIN_SCOPE, MAX_SUPPLY as COIN_MAX_SUPPLY, MIN_SUPPLY as COIN_MIN_SUPPLY, ClubService, CreatorCoinFactoryABI, CreatorCoinService, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PopService, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancellationTypedData, buildChangeOwnersCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, getCounter, getCounter1155, getCreatorCoinPrice, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sessionKeyHashOf, signAdminRequest, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
11795
11803
  //# sourceMappingURL=index.js.map
11796
11804
  //# sourceMappingURL=index.js.map