@medialane/sdk 0.97.0 → 0.98.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 { bb as ResolvedConfig, bj as TxResult, ay as CreatePopCollectionParams, aj as ClaimConditions, au as CreateDropParams, aD as CreateTicketParams, aY as MintTicketsParams, aw as CreateMembershipParams, aX as MintMembershipsParams, aB as CreateSponsorshipOfferParams, b8 as ProposeSponsorshipParams, l as ApiClient, aV as MedialaneConfig, aW as MedialaneErrorCode, b1 as OrderDetails, R as ResolvedFeeConfig } from '../services-CRckcKEc.cjs';
1
+ import { bb as ResolvedConfig, bj as TxResult, ay as CreatePopCollectionParams, aj as ClaimConditions, au as CreateDropParams, aD as CreateTicketParams, aY as MintTicketsParams, aw as CreateMembershipParams, aX as MintMembershipsParams, aB as CreateSponsorshipOfferParams, b8 as ProposeSponsorshipParams, l as ApiClient, aV as MedialaneConfig, aW as MedialaneErrorCode, b1 as OrderDetails, R as ResolvedFeeConfig } from '../services-DkdQoHIr.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-nPIXtCF5.cjs';
4
4
  import 'zod';
@@ -157,11 +157,12 @@ interface EkuboLaunchParams {
157
157
  initialHoldersAmounts: (bigint | string)[];
158
158
  transferRestrictionDelay?: number;
159
159
  maxPercentageBuyLaunch?: number;
160
- ekubo?: EkuboPoolParams;
160
+ ekubo: EkuboPoolParams;
161
161
  quoteFundAmount?: bigint | string;
162
162
  }
163
163
  declare const VALIDATED_EKUBO_PARAMS: EkuboPoolParams;
164
164
  declare function priceToEkuboParams(quoteDecimals: number, price?: number): EkuboPoolParams;
165
+ declare function validatePrice(quoteDecimals: number, price: number): string | null;
165
166
  declare const MAX_TEAM_ALLOCATION_PERCENT = 10;
166
167
  declare const MAX_HOLDERS_AT_LAUNCH = 10;
167
168
  interface CreatorCoinGuarantees {
@@ -7829,7 +7830,7 @@ declare const IPGenesisABI: readonly [{
7829
7830
  }];
7830
7831
  }];
7831
7832
 
7832
- declare const LAUNCH_PRICE_QUOTE_PER_COIN = 0.01;
7833
+ declare const SUGGESTED_DEFAULT_PRICE = 0.01;
7833
7834
  declare const MIN_SUPPLY = 1000n;
7834
7835
  declare const MAX_SUPPLY = 1000000000000n;
7835
7836
  declare function validateName(s: string): string | null;
@@ -7837,8 +7838,8 @@ declare function validateSymbol(s: string): string | null;
7837
7838
  declare function validateSupply(human: string): string | null;
7838
7839
  declare function toRaw(human: bigint, decimals?: number): bigint;
7839
7840
  declare function teamCoinsRaw(supplyRaw: bigint, pct: number): bigint;
7840
- declare function buybackQuoteRaw(teamCoinsRawValue: bigint, quoteDecimals: number): bigint;
7841
- declare function fdvHuman(supplyHuman: number): number;
7841
+ declare function buybackQuoteRaw(teamCoinsRawValue: bigint, price: number, quoteDecimals: number): bigint;
7842
+ declare function fdvHuman(supplyHuman: number, price: number): number;
7842
7843
 
7843
7844
  declare function encodeByteArray(str: string): string[];
7844
7845
 
@@ -7905,4 +7906,4 @@ declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [st
7905
7906
 
7906
7907
  type StarknetVenueSigner = VenueSigner<TypedData, Call>;
7907
7908
 
7908
- 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 CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, 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, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
7909
+ 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 CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, type SiwsSigner, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
@@ -1,4 +1,4 @@
1
- import { bb as ResolvedConfig, bj as TxResult, ay as CreatePopCollectionParams, aj as ClaimConditions, au as CreateDropParams, aD as CreateTicketParams, aY as MintTicketsParams, aw as CreateMembershipParams, aX as MintMembershipsParams, aB as CreateSponsorshipOfferParams, b8 as ProposeSponsorshipParams, l as ApiClient, aV as MedialaneConfig, aW as MedialaneErrorCode, b1 as OrderDetails, R as ResolvedFeeConfig } from '../services-6lZz3hUV.js';
1
+ import { bb as ResolvedConfig, bj as TxResult, ay as CreatePopCollectionParams, aj as ClaimConditions, au as CreateDropParams, aD as CreateTicketParams, aY as MintTicketsParams, aw as CreateMembershipParams, aX as MintMembershipsParams, aB as CreateSponsorshipOfferParams, b8 as ProposeSponsorshipParams, l as ApiClient, aV as MedialaneConfig, aW as MedialaneErrorCode, b1 as OrderDetails, R as ResolvedFeeConfig } from '../services-BcckoQHb.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-nPIXtCF5.js';
4
4
  import 'zod';
@@ -157,11 +157,12 @@ interface EkuboLaunchParams {
157
157
  initialHoldersAmounts: (bigint | string)[];
158
158
  transferRestrictionDelay?: number;
159
159
  maxPercentageBuyLaunch?: number;
160
- ekubo?: EkuboPoolParams;
160
+ ekubo: EkuboPoolParams;
161
161
  quoteFundAmount?: bigint | string;
162
162
  }
163
163
  declare const VALIDATED_EKUBO_PARAMS: EkuboPoolParams;
164
164
  declare function priceToEkuboParams(quoteDecimals: number, price?: number): EkuboPoolParams;
165
+ declare function validatePrice(quoteDecimals: number, price: number): string | null;
165
166
  declare const MAX_TEAM_ALLOCATION_PERCENT = 10;
166
167
  declare const MAX_HOLDERS_AT_LAUNCH = 10;
167
168
  interface CreatorCoinGuarantees {
@@ -7829,7 +7830,7 @@ declare const IPGenesisABI: readonly [{
7829
7830
  }];
7830
7831
  }];
7831
7832
 
7832
- declare const LAUNCH_PRICE_QUOTE_PER_COIN = 0.01;
7833
+ declare const SUGGESTED_DEFAULT_PRICE = 0.01;
7833
7834
  declare const MIN_SUPPLY = 1000n;
7834
7835
  declare const MAX_SUPPLY = 1000000000000n;
7835
7836
  declare function validateName(s: string): string | null;
@@ -7837,8 +7838,8 @@ declare function validateSymbol(s: string): string | null;
7837
7838
  declare function validateSupply(human: string): string | null;
7838
7839
  declare function toRaw(human: bigint, decimals?: number): bigint;
7839
7840
  declare function teamCoinsRaw(supplyRaw: bigint, pct: number): bigint;
7840
- declare function buybackQuoteRaw(teamCoinsRawValue: bigint, quoteDecimals: number): bigint;
7841
- declare function fdvHuman(supplyHuman: number): number;
7841
+ declare function buybackQuoteRaw(teamCoinsRawValue: bigint, price: number, quoteDecimals: number): bigint;
7842
+ declare function fdvHuman(supplyHuman: number, price: number): number;
7842
7843
 
7843
7844
  declare function encodeByteArray(str: string): string[];
7844
7845
 
@@ -7905,4 +7906,4 @@ declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [st
7905
7906
 
7906
7907
  type StarknetVenueSigner = VenueSigner<TypedData, Call>;
7907
7908
 
7908
- 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 CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, LAUNCH_PRICE_QUOTE_PER_COIN, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, 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, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
7909
+ 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 CreatorCoinGuarantees, type CreatorCoinReceiptLike, CreatorCoinService, type DeployCollectionParams, DropCollectionABI, DropFactoryABI, DropService, ERC1155CollectionService, type EkuboLaunchParams, type EkuboPoolParams, type EscapeInfo, type EscapeStatusName, type EscapeTypeName, type FeeSurface, type GuardianInfo, IPClubCollectionABI, IPClubFactoryABI, IPCollection1155ABI, IPCollection1155FactoryABI, IPCollectionABI, IPGenesisABI, IPMarketplaceABI, IPNftABI, IPSponsorshipABI, IPTicketCollectionABI, IPTicketCollectionFactoryABI, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, type MintEditionParams, POPCollectionABI, POPFactoryABI, type ParsedAdminHeaders, PopService, type RequestSiwsTokenArgs, type ResolvedOrder, SUGGESTED_DEFAULT_PRICE, type SiwsSigner, SponsorshipService, StarknetVenue, type StarknetVenueDeps, type StarknetVenueSigner, TicketService, VALIDATED_EKUBO_PARAMS, VenueSigner, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
@@ -10267,7 +10267,7 @@ var ERC1155CollectionService = class {
10267
10267
 
10268
10268
  // src/starknet/services/coinLaunchMath.ts
10269
10269
  var COIN_DECIMALS = 18;
10270
- var LAUNCH_PRICE_QUOTE_PER_COIN = 0.01;
10270
+ var SUGGESTED_DEFAULT_PRICE = 0.01;
10271
10271
  var MIN_SUPPLY = 1000n;
10272
10272
  var MAX_SUPPLY = 1000000000000n;
10273
10273
  var MAX_FELT_BYTES = 31;
@@ -10298,11 +10298,13 @@ function teamCoinsRaw(supplyRaw, pct) {
10298
10298
  const bps = BigInt(Math.round(pct * 100));
10299
10299
  return supplyRaw * bps / 10000n;
10300
10300
  }
10301
- function buybackQuoteRaw(teamCoinsRawValue, quoteDecimals) {
10302
- return teamCoinsRawValue * 10n ** BigInt(quoteDecimals) / (100n * 10n ** BigInt(COIN_DECIMALS));
10301
+ var PRICE_SCALE = 1000000000000n;
10302
+ function buybackQuoteRaw(teamCoinsRawValue, price, quoteDecimals) {
10303
+ const priceScaled = BigInt(Math.round(price * Number(PRICE_SCALE)));
10304
+ return teamCoinsRawValue * priceScaled * 10n ** BigInt(quoteDecimals) / (PRICE_SCALE * 10n ** BigInt(COIN_DECIMALS));
10303
10305
  }
10304
- function fdvHuman(supplyHuman) {
10305
- return supplyHuman * LAUNCH_PRICE_QUOTE_PER_COIN;
10306
+ function fdvHuman(supplyHuman, price) {
10307
+ return supplyHuman * price;
10306
10308
  }
10307
10309
 
10308
10310
  // src/starknet/services/creatorCoin.ts
@@ -10313,8 +10315,8 @@ var VALIDATED_EKUBO_PARAMS = {
10313
10315
  bound: 88719042n
10314
10316
  };
10315
10317
  var TICK_BASE = 1.000001;
10316
- function priceToEkuboParams(quoteDecimals, price = LAUNCH_PRICE_QUOTE_PER_COIN) {
10317
- const decAdj = 10 ** (COIN_DECIMALS2 - quoteDecimals);
10318
+ function priceToEkuboParams(quoteDecimals, price = SUGGESTED_DEFAULT_PRICE) {
10319
+ const decAdj = 10 ** (COIN_DECIMALS - quoteDecimals);
10318
10320
  const rawRatio = price / decAdj;
10319
10321
  const tickSpacing = Number(VALIDATED_EKUBO_PARAMS.tickSpacing);
10320
10322
  const rawTick = Math.log(rawRatio) / Math.log(TICK_BASE);
@@ -10326,6 +10328,17 @@ function priceToEkuboParams(quoteDecimals, price = LAUNCH_PRICE_QUOTE_PER_COIN)
10326
10328
  bound: VALIDATED_EKUBO_PARAMS.bound
10327
10329
  };
10328
10330
  }
10331
+ function validatePrice(quoteDecimals, price) {
10332
+ if (!isFinite(price) || price <= 0) return "Price must be a positive number";
10333
+ const decAdj = 10 ** (COIN_DECIMALS - quoteDecimals);
10334
+ const rawRatio = price / decAdj;
10335
+ if (!isFinite(rawRatio) || rawRatio <= 0) return "Price must be a positive number";
10336
+ const rawTick = Math.log(rawRatio) / Math.log(TICK_BASE);
10337
+ if (!isFinite(rawTick)) return "Price is outside the supported range";
10338
+ const bound = Number(VALIDATED_EKUBO_PARAMS.bound);
10339
+ if (Math.abs(rawTick) >= bound) return "Price is outside the supported range";
10340
+ return null;
10341
+ }
10329
10342
  var MAX_TEAM_ALLOCATION_PERCENT = 10;
10330
10343
  var MAX_HOLDERS_AT_LAUNCH = 10;
10331
10344
  function u256(parts, offset = 0) {
@@ -10358,7 +10371,6 @@ async function getCreatorCoinGuarantees(coinAddress, provider) {
10358
10371
  liquidityPositionId
10359
10372
  };
10360
10373
  }
10361
- var COIN_DECIMALS2 = 18;
10362
10374
  var _factoryContract = null;
10363
10375
  function factoryContract() {
10364
10376
  if (!_factoryContract) {
@@ -10380,7 +10392,7 @@ function buildCreateCreatorCoinCall(params) {
10380
10392
  ]);
10381
10393
  }
10382
10394
  function buildLaunchOnEkuboCalls(params) {
10383
- const ek = params.ekubo ?? VALIDATED_EKUBO_PARAMS;
10395
+ const ek = params.ekubo;
10384
10396
  const launchParameters = {
10385
10397
  creator_coin_address: params.creatorCoin,
10386
10398
  transfer_restriction_delay: params.transferRestrictionDelay ?? 0,
@@ -11703,6 +11715,6 @@ function signWithPrivateKey(privateKeyHex, msgHash) {
11703
11715
  return [num.toHex(sig.r), num.toHex(sig.s)];
11704
11716
  }
11705
11717
 
11706
- 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, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PopService, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, verifyAdminRequestSig };
11718
+ 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, MAX_HOLDERS_AT_LAUNCH, MAX_TEAM_ALLOCATION_PERCENT, Medialane1155ABI, MedialaneClient, MedialaneError, POPCollectionABI, POPFactoryABI, PopService, SUGGESTED_DEFAULT_PRICE, SponsorshipService, StarknetVenue, TicketService, VALIDATED_EKUBO_PARAMS, adminRequestDigest, build1155CancellationTypedData, build1155OrderTypedData, buildAdminSessionTypedData, buildCancelEscapeCall, buildCancellationTypedData, buildChangeOwnersCall, buildCompleteEscapeOwnerCall, buildCreateCreatorCoinCall, buildDeployAccountParams, buildFeeCall, buildLaunchOnEkuboCalls, buildOrderTypedData, buildSetFirstGuardianCall, buildTriggerEscapeOwnerCall, buybackQuoteRaw, toRaw as coinToRaw, computeAccountAddress, computeOwnerGuid, createAdminSessionGrant, decodeEscapeAndStatus, decodeGuardiansInfo, deriveAesKey, deriveOwnerKeyPair, encodeAdminHeaders, encodeByteArray, fdvHuman, generateStarkKeyPair, getCounter, getCounter1155, getCreatorCoinGuarantees, getEscape, getEscapeSecurityPeriod, getGuardians, getOrderDetails, getOrderDetails1155, getSiwsStorageKey, getStoredSiwsToken, isSiwsTokenValid, normalizeSiwsSignature, ownerConstructorCalldata, parseAdminHeaders, parseCreatorCoinCreated, priceToEkuboParams, randomNonce, requestSiwsToken, sealPrivateKey, sessionKeyHashOf, signAdminRequest, signWithPrivateKey, storeSiwsToken, teamCoinsRaw, toContractConditions as toDropContractConditions, unsealPrivateKey, validateName as validateCoinName, validateSupply as validateCoinSupply, validateSymbol as validateCoinSymbol, validatePrice, verifyAdminRequestSig };
11707
11719
  //# sourceMappingURL=index.js.map
11708
11720
  //# sourceMappingURL=index.js.map