@medialane/sdk 0.93.0 → 0.95.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 { b8 as ResolvedConfig, bg as TxResult, av as CreatePopCollectionParams, ag as ClaimConditions, ar as CreateDropParams, aA as CreateTicketParams, aV as MintTicketsParams, at as CreateMembershipParams, aU as MintMembershipsParams, ay as CreateSponsorshipOfferParams, b5 as ProposeSponsorshipParams, l as ApiClient, aS as MedialaneConfig, aT as MedialaneErrorCode, a_ as OrderDetails, R as ResolvedFeeConfig } from '../services-D3M9dJZg.cjs';
1
+ import { ba as ResolvedConfig, bi as TxResult, ax as CreatePopCollectionParams, ai as ClaimConditions, at as CreateDropParams, aC as CreateTicketParams, aX as MintTicketsParams, av as CreateMembershipParams, aW as MintMembershipsParams, aA as CreateSponsorshipOfferParams, b7 as ProposeSponsorshipParams, l as ApiClient, aU as MedialaneConfig, aV as MedialaneErrorCode, b0 as OrderDetails, R as ResolvedFeeConfig } from '../services-DbJoYGF0.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';
@@ -162,18 +162,6 @@ interface EkuboLaunchParams {
162
162
  }
163
163
  declare const VALIDATED_EKUBO_PARAMS: EkuboPoolParams;
164
164
  declare function priceToEkuboParams(quoteDecimals: number, price?: number): EkuboPoolParams;
165
- interface CreatorCoinPrice {
166
- quotePerCoin: number;
167
- quoteToken: string;
168
- quoteSymbol: string | null;
169
- quoteDecimals: number;
170
- }
171
- type CreatorCoinMarket = {
172
- status: "live";
173
- price: CreatorCoinPrice;
174
- } | {
175
- status: "pre-launch";
176
- };
177
165
  declare const MAX_TEAM_ALLOCATION_PERCENT = 10;
178
166
  declare const MAX_HOLDERS_AT_LAUNCH = 10;
179
167
  interface CreatorCoinGuarantees {
@@ -184,8 +172,7 @@ interface CreatorCoinGuarantees {
184
172
  teamAllocationPercent: number | null;
185
173
  liquidityPositionId: string | null;
186
174
  }
187
- declare function getCreatorCoinGuarantees(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinGuarantees>;
188
- declare function getCreatorCoinMarket(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinMarket>;
175
+ declare function getCreatorCoinGuarantees(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinGuarantees | null>;
189
176
  declare function buildCreateCreatorCoinCall(params: CreateCreatorCoinParams): Call;
190
177
  declare function buildLaunchOnEkuboCalls(params: EkuboLaunchParams): Call[];
191
178
  interface CreatorCoinReceiptLike {
@@ -204,7 +191,7 @@ declare class CreatorCoinService {
204
191
  createCreatorCoin(account: AccountInterface, params: CreateCreatorCoinParams): Promise<TxResult>;
205
192
  launchOnEkubo(account: AccountInterface, params: EkuboLaunchParams): Promise<TxResult>;
206
193
  isCreatorCoin(address: string, account: AccountInterface): Promise<boolean>;
207
- getMarket(coinAddress: string): Promise<CreatorCoinMarket>;
194
+ getGuarantees(coinAddress: string): Promise<CreatorCoinGuarantees | null>;
208
195
  }
209
196
 
210
197
  interface TicketRecord {
@@ -7918,4 +7905,4 @@ declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [st
7918
7905
 
7919
7906
  type StarknetVenueSigner = VenueSigner<TypedData, Call>;
7920
7907
 
7921
- 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 CreatorCoinMarket, type CreatorCoinPrice, 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, getCreatorCoinMarket, 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 };
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 };
@@ -1,4 +1,4 @@
1
- import { b8 as ResolvedConfig, bg as TxResult, av as CreatePopCollectionParams, ag as ClaimConditions, ar as CreateDropParams, aA as CreateTicketParams, aV as MintTicketsParams, at as CreateMembershipParams, aU as MintMembershipsParams, ay as CreateSponsorshipOfferParams, b5 as ProposeSponsorshipParams, l as ApiClient, aS as MedialaneConfig, aT as MedialaneErrorCode, a_ as OrderDetails, R as ResolvedFeeConfig } from '../services-DTkc0lLx.js';
1
+ import { ba as ResolvedConfig, bi as TxResult, ax as CreatePopCollectionParams, ai as ClaimConditions, at as CreateDropParams, aC as CreateTicketParams, aX as MintTicketsParams, av as CreateMembershipParams, aW as MintMembershipsParams, aA as CreateSponsorshipOfferParams, b7 as ProposeSponsorshipParams, l as ApiClient, aU as MedialaneConfig, aV as MedialaneErrorCode, b0 as OrderDetails, R as ResolvedFeeConfig } from '../services-BllZwNlB.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';
@@ -162,18 +162,6 @@ interface EkuboLaunchParams {
162
162
  }
163
163
  declare const VALIDATED_EKUBO_PARAMS: EkuboPoolParams;
164
164
  declare function priceToEkuboParams(quoteDecimals: number, price?: number): EkuboPoolParams;
165
- interface CreatorCoinPrice {
166
- quotePerCoin: number;
167
- quoteToken: string;
168
- quoteSymbol: string | null;
169
- quoteDecimals: number;
170
- }
171
- type CreatorCoinMarket = {
172
- status: "live";
173
- price: CreatorCoinPrice;
174
- } | {
175
- status: "pre-launch";
176
- };
177
165
  declare const MAX_TEAM_ALLOCATION_PERCENT = 10;
178
166
  declare const MAX_HOLDERS_AT_LAUNCH = 10;
179
167
  interface CreatorCoinGuarantees {
@@ -184,8 +172,7 @@ interface CreatorCoinGuarantees {
184
172
  teamAllocationPercent: number | null;
185
173
  liquidityPositionId: string | null;
186
174
  }
187
- declare function getCreatorCoinGuarantees(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinGuarantees>;
188
- declare function getCreatorCoinMarket(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinMarket>;
175
+ declare function getCreatorCoinGuarantees(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinGuarantees | null>;
189
176
  declare function buildCreateCreatorCoinCall(params: CreateCreatorCoinParams): Call;
190
177
  declare function buildLaunchOnEkuboCalls(params: EkuboLaunchParams): Call[];
191
178
  interface CreatorCoinReceiptLike {
@@ -204,7 +191,7 @@ declare class CreatorCoinService {
204
191
  createCreatorCoin(account: AccountInterface, params: CreateCreatorCoinParams): Promise<TxResult>;
205
192
  launchOnEkubo(account: AccountInterface, params: EkuboLaunchParams): Promise<TxResult>;
206
193
  isCreatorCoin(address: string, account: AccountInterface): Promise<boolean>;
207
- getMarket(coinAddress: string): Promise<CreatorCoinMarket>;
194
+ getGuarantees(coinAddress: string): Promise<CreatorCoinGuarantees | null>;
208
195
  }
209
196
 
210
197
  interface TicketRecord {
@@ -7918,4 +7905,4 @@ declare function signWithPrivateKey(privateKeyHex: string, msgHash: string): [st
7918
7905
 
7919
7906
  type StarknetVenueSigner = VenueSigner<TypedData, Call>;
7920
7907
 
7921
- 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 CreatorCoinMarket, type CreatorCoinPrice, 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, getCreatorCoinMarket, 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 };
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 };
@@ -758,6 +758,9 @@ var ApiClient = class {
758
758
  getCoin(contract) {
759
759
  return this.get(`/v1/coins/${this.addr(contract)}`);
760
760
  }
761
+ getCoinPrices() {
762
+ return this.get("/v1/coins/prices");
763
+ }
761
764
  updateCoinProfile(contract, data, siwsToken) {
762
765
  return this.request(`/v1/coins/${this.addr(contract)}`, {
763
766
  method: "PATCH",
@@ -10250,25 +10253,6 @@ var ERC1155CollectionService = class {
10250
10253
  }
10251
10254
  };
10252
10255
 
10253
- // src/utils/token.ts
10254
- function getTokenByAddress(address) {
10255
- let target = null;
10256
- try {
10257
- target = BigInt(address);
10258
- } catch {
10259
- target = null;
10260
- }
10261
- return SUPPORTED_TOKENS.find((t) => {
10262
- if (target !== null) {
10263
- try {
10264
- return BigInt(t.address) === target;
10265
- } catch {
10266
- }
10267
- }
10268
- return t.address.toLowerCase() === address.toLowerCase();
10269
- });
10270
- }
10271
-
10272
10256
  // src/starknet/services/coinLaunchMath.ts
10273
10257
  var COIN_DECIMALS = 18;
10274
10258
  var LAUNCH_PRICE_QUOTE_PER_COIN = 0.01;
@@ -10337,10 +10321,13 @@ function u256(parts, offset = 0) {
10337
10321
  }
10338
10322
  async function getCreatorCoinGuarantees(coinAddress, provider) {
10339
10323
  const call = (entrypoint) => provider.callContract({ contractAddress: coinAddress, entrypoint, calldata: [] });
10340
- const [launchedRes, supplyRes, allocRes, blockRes, liquidityRes] = await Promise.all([
10341
- call("is_launched"),
10324
+ const [launchedRes, allocRes] = await Promise.all([
10325
+ call("is_launched").catch(() => null),
10326
+ call("get_team_allocation").catch(() => null)
10327
+ ]);
10328
+ if (!launchedRes || !allocRes) return null;
10329
+ const [supplyRes, blockRes, liquidityRes] = await Promise.all([
10342
10330
  call("total_supply"),
10343
- call("get_team_allocation"),
10344
10331
  call("launched_at_block_number").catch(() => null),
10345
10332
  call("liquidity_type").catch(() => null)
10346
10333
  ]);
@@ -10360,36 +10347,6 @@ async function getCreatorCoinGuarantees(coinAddress, provider) {
10360
10347
  };
10361
10348
  }
10362
10349
  var COIN_DECIMALS2 = 18;
10363
- async function getCreatorCoinMarket(coinAddress, provider) {
10364
- const r = await provider.callContract({
10365
- contractAddress: coinAddress,
10366
- entrypoint: "launched_with_liquidity_parameters",
10367
- calldata: []
10368
- });
10369
- if (BigInt(r[0]) !== 0n || BigInt(r[1]) !== 0n) return { status: "pre-launch" };
10370
- const fee = r[2];
10371
- const tickSpacing = r[3];
10372
- const quoteToken = normalizeAddress("STARKNET", "0x" + BigInt(r[7]).toString(16));
10373
- const token = getTokenByAddress(quoteToken);
10374
- const quoteDecimals = token?.decimals ?? 18;
10375
- const ci = BigInt(coinAddress);
10376
- const qi = BigInt(quoteToken);
10377
- const [t0, t1] = ci < qi ? [coinAddress, quoteToken] : [quoteToken, coinAddress];
10378
- const quoteIsToken0 = qi === BigInt(t0);
10379
- const pp = await provider.callContract({
10380
- contractAddress: getStarknetCoordinates("STARKNET").ekuboCore,
10381
- entrypoint: "get_pool_price",
10382
- calldata: [t0, t1, fee, tickSpacing, "0x0"]
10383
- });
10384
- const sqrt = BigInt(pp[0]) + (BigInt(pp[1] ?? "0x0") << 128n);
10385
- const priceT1perT0 = (Number(sqrt) / 2 ** 128) ** 2;
10386
- const decAdj = 10 ** (COIN_DECIMALS2 - quoteDecimals);
10387
- const quotePerCoin = (quoteIsToken0 ? 1 / priceT1perT0 : priceT1perT0) * decAdj;
10388
- return {
10389
- status: "live",
10390
- price: { quotePerCoin, quoteToken, quoteSymbol: token?.symbol ?? null, quoteDecimals }
10391
- };
10392
- }
10393
10350
  var _factoryContract = null;
10394
10351
  function factoryContract() {
10395
10352
  if (!_factoryContract) {
@@ -10477,8 +10434,8 @@ var CreatorCoinService = class {
10477
10434
  const r = await this._factory(account).is_creator_coin(address);
10478
10435
  return BigInt(r) === 1n;
10479
10436
  }
10480
- async getMarket(coinAddress) {
10481
- return getCreatorCoinMarket(coinAddress, new RpcProvider({ nodeUrl: this.config.rpcUrl }));
10437
+ async getGuarantees(coinAddress) {
10438
+ return getCreatorCoinGuarantees(coinAddress, new RpcProvider({ nodeUrl: this.config.rpcUrl }));
10482
10439
  }
10483
10440
  };
10484
10441
  var TicketService = class {
@@ -11734,6 +11691,6 @@ function signWithPrivateKey(privateKeyHex, msgHash) {
11734
11691
  return [num.toHex(sig.r), num.toHex(sig.s)];
11735
11692
  }
11736
11693
 
11737
- 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, getCreatorCoinMarket, 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 };
11694
+ 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 };
11738
11695
  //# sourceMappingURL=index.js.map
11739
11696
  //# sourceMappingURL=index.js.map