@medialane/sdk 0.93.0 → 0.94.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 +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +11 -2
- package/dist/index.d.ts +11 -2
- package/dist/index.js +11 -2
- package/dist/index.js.map +1 -1
- package/dist/starknet/index.cjs +6 -3
- package/dist/starknet/index.cjs.map +1 -1
- package/dist/starknet/index.d.cts +1 -1
- package/dist/starknet/index.d.ts +1 -1
- package/dist/starknet/index.js +6 -3
- package/dist/starknet/index.js.map +1 -1
- package/package.json +1 -1
|
@@ -184,7 +184,7 @@ interface CreatorCoinGuarantees {
|
|
|
184
184
|
teamAllocationPercent: number | null;
|
|
185
185
|
liquidityPositionId: string | null;
|
|
186
186
|
}
|
|
187
|
-
declare function getCreatorCoinGuarantees(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinGuarantees>;
|
|
187
|
+
declare function getCreatorCoinGuarantees(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinGuarantees | null>;
|
|
188
188
|
declare function getCreatorCoinMarket(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinMarket>;
|
|
189
189
|
declare function buildCreateCreatorCoinCall(params: CreateCreatorCoinParams): Call;
|
|
190
190
|
declare function buildLaunchOnEkuboCalls(params: EkuboLaunchParams): Call[];
|
package/dist/starknet/index.d.ts
CHANGED
|
@@ -184,7 +184,7 @@ interface CreatorCoinGuarantees {
|
|
|
184
184
|
teamAllocationPercent: number | null;
|
|
185
185
|
liquidityPositionId: string | null;
|
|
186
186
|
}
|
|
187
|
-
declare function getCreatorCoinGuarantees(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinGuarantees>;
|
|
187
|
+
declare function getCreatorCoinGuarantees(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinGuarantees | null>;
|
|
188
188
|
declare function getCreatorCoinMarket(coinAddress: string, provider: ProviderInterface): Promise<CreatorCoinMarket>;
|
|
189
189
|
declare function buildCreateCreatorCoinCall(params: CreateCreatorCoinParams): Call;
|
|
190
190
|
declare function buildLaunchOnEkuboCalls(params: EkuboLaunchParams): Call[];
|
package/dist/starknet/index.js
CHANGED
|
@@ -10337,10 +10337,13 @@ function u256(parts, offset = 0) {
|
|
|
10337
10337
|
}
|
|
10338
10338
|
async function getCreatorCoinGuarantees(coinAddress, provider) {
|
|
10339
10339
|
const call = (entrypoint) => provider.callContract({ contractAddress: coinAddress, entrypoint, calldata: [] });
|
|
10340
|
-
const [launchedRes,
|
|
10341
|
-
call("is_launched"),
|
|
10340
|
+
const [launchedRes, allocRes] = await Promise.all([
|
|
10341
|
+
call("is_launched").catch(() => null),
|
|
10342
|
+
call("get_team_allocation").catch(() => null)
|
|
10343
|
+
]);
|
|
10344
|
+
if (!launchedRes || !allocRes) return null;
|
|
10345
|
+
const [supplyRes, blockRes, liquidityRes] = await Promise.all([
|
|
10342
10346
|
call("total_supply"),
|
|
10343
|
-
call("get_team_allocation"),
|
|
10344
10347
|
call("launched_at_block_number").catch(() => null),
|
|
10345
10348
|
call("liquidity_type").catch(() => null)
|
|
10346
10349
|
]);
|