@basedone/core 0.1.6 → 0.1.8
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.d.mts +6 -2
- package/dist/index.d.ts +6 -2
- package/dist/index.js +2980 -260
- package/dist/index.mjs +36 -17
- package/dist/{meta-CDVVRMMG.mjs → meta-57AY44US.mjs} +66 -29
- package/dist/{meta-HEOHBPHS.mjs → meta-RSZFFH63.mjs} +102 -72
- package/dist/perpDexs-PBKWKKQU.mjs +201 -0
- package/dist/perpDexs-XSB4Y2BP.mjs +2298 -0
- package/dist/{spotMeta-NK626IKQ.mjs → spotMeta-WQ4PXRNY.mjs} +290 -4
- package/dist/{spotMeta-4LMKHJUT.mjs → spotMeta-Y7G2GI7B.mjs} +551 -3
- package/lib/fee.ts +30 -3
- package/lib/hip3/utils.ts +8 -0
- package/lib/meta/data/mainnet/meta.json +102 -72
- package/lib/meta/data/mainnet/perpDexs.json +183 -4
- package/lib/meta/data/mainnet/spotMeta.json +290 -4
- package/lib/meta/data/testnet/meta.json +66 -29
- package/lib/meta/data/testnet/perpDexs.json +1755 -136
- package/lib/meta/data/testnet/spotMeta.json +551 -3
- package/package.json +1 -1
- package/dist/perpDexs-G5YWV3II.mjs +0 -22
- package/dist/perpDexs-PGY6VMYS.mjs +0 -679
package/dist/index.d.mts
CHANGED
|
@@ -84,15 +84,17 @@ declare const TARGET_APPROVED_MAX_BUILDER_FEE_PERCENT = "0.1%";
|
|
|
84
84
|
* Get the amount of builder fee to approve for
|
|
85
85
|
* @param perpetualTradingFee - Perp fee in percentage
|
|
86
86
|
* @param spotTradingFee - Spot fee in percentage
|
|
87
|
+
* @param feeDiscount - Discount fee in percentage (0.9 means 90% discount)
|
|
87
88
|
* @returns {
|
|
88
89
|
* amount: number; - The amount of builder fee to approve in 1/10 of a basis point
|
|
89
90
|
* percent: string; - eg. String input to approve fee, "0.1%"
|
|
90
91
|
* }
|
|
91
92
|
*/
|
|
92
|
-
declare const getApprovalAmount: ({ customFeeEnabled, perpetualTradingFee, spotTradingFee, }: {
|
|
93
|
+
declare const getApprovalAmount: ({ customFeeEnabled, perpetualTradingFee, spotTradingFee, feeDiscount, }: {
|
|
93
94
|
customFeeEnabled: boolean;
|
|
94
95
|
perpetualTradingFee?: number;
|
|
95
96
|
spotTradingFee?: number;
|
|
97
|
+
feeDiscount?: number;
|
|
96
98
|
}) => {
|
|
97
99
|
approvalAmount: number;
|
|
98
100
|
approvalPercent: `${string}%`;
|
|
@@ -552,6 +554,8 @@ declare function getStaticCollateralTokenByDex(dex: string): string;
|
|
|
552
554
|
* @returns The collateral token symbol for the given coin
|
|
553
555
|
*/
|
|
554
556
|
declare function getStaticCollateralTokenSymbol(coin: string | undefined): string;
|
|
557
|
+
declare const stableQuoteTokens: string[];
|
|
558
|
+
declare function isStableQuoteToken(coin: string): boolean;
|
|
555
559
|
/**
|
|
556
560
|
* Get display market symbol for a given coin
|
|
557
561
|
* @param coin - The coin symbol to get the display market symbol for eg. xyz:XYZ100
|
|
@@ -564,4 +568,4 @@ declare function getStaticCollateralTokenSymbol(coin: string | undefined): strin
|
|
|
564
568
|
declare function getDisplayMarketSymbol(coin: string | undefined, showCollateralTokenSymbol?: boolean, collateralTokenSymbol?: string): string | undefined;
|
|
565
569
|
declare function getDexFromCollateralTokenSymbol(collateralTokenSymbol: string): string | undefined;
|
|
566
570
|
|
|
567
|
-
export { type AirdropAllocationData, CloidClientCode, type CloidClientCodeId, CloidClientCodeNameById, type CloidData, type DexInfo, type ExtendedPerpsMeta, type MarketInfo, MetadataClient, PUP_TOKEN_ADDRESS, PUP_TOKEN_THRESHOLDS, type PerpDex, type PupEligibilityResult, ROOT_DEX, TARGET_APPROVED_MAX_BUILDER_FEE, TARGET_APPROVED_MAX_BUILDER_FEE_PERCENT, TESTNET_USDC_SPOT_TOKEN, type TokenInfo, USDC_SPOT_TOKEN, type UpheavalApiResponse, type UpheavalPosition, type UpheavalSnapshot, UserDexAbstractionTypes, type V3LPTokenInfo, WidgetType, WidgetTypeById, type WidgetTypeId, XP_BOOST_PERCENTAGES, buildCloid, calculateBoostPercentage, calculateTotalPupAmount, decodeSlug, enableHip3DexAbstractionWithAgent, encodeSlug, formatPriceAndSize, formatPriceForDisplay, formatPriceForOrder, formatSizeForDisplay, formatSizeForOrder, getApprovalAmount, getClientCodeNameById, getCloid, getDexFromCollateralTokenSymbol, getDisplayMarketSymbol, getHip3Dex, getHip3DexAbstraction, getNextTierInfo, getPriceDecimals, getStaticCollateralTokenByDex, getStaticCollateralTokenSymbol, getWidgetTypeById, isBasedCloid, isClientCode, isHip3Symbol, isMiniAppCloid, isMiniAppTriggeredCloid, isSpotSymbol, isTenantCloid, isTrackingIdCloid, isWidgetType, normaliseSlug, normaliseTrackingId, normalizeAirdropAmount, parseCloid, setHip3DexAbstraction };
|
|
571
|
+
export { type AirdropAllocationData, CloidClientCode, type CloidClientCodeId, CloidClientCodeNameById, type CloidData, type DexInfo, type ExtendedPerpsMeta, type MarketInfo, MetadataClient, PUP_TOKEN_ADDRESS, PUP_TOKEN_THRESHOLDS, type PerpDex, type PupEligibilityResult, ROOT_DEX, TARGET_APPROVED_MAX_BUILDER_FEE, TARGET_APPROVED_MAX_BUILDER_FEE_PERCENT, TESTNET_USDC_SPOT_TOKEN, type TokenInfo, USDC_SPOT_TOKEN, type UpheavalApiResponse, type UpheavalPosition, type UpheavalSnapshot, UserDexAbstractionTypes, type V3LPTokenInfo, WidgetType, WidgetTypeById, type WidgetTypeId, XP_BOOST_PERCENTAGES, buildCloid, calculateBoostPercentage, calculateTotalPupAmount, decodeSlug, enableHip3DexAbstractionWithAgent, encodeSlug, formatPriceAndSize, formatPriceForDisplay, formatPriceForOrder, formatSizeForDisplay, formatSizeForOrder, getApprovalAmount, getClientCodeNameById, getCloid, getDexFromCollateralTokenSymbol, getDisplayMarketSymbol, getHip3Dex, getHip3DexAbstraction, getNextTierInfo, getPriceDecimals, getStaticCollateralTokenByDex, getStaticCollateralTokenSymbol, getWidgetTypeById, isBasedCloid, isClientCode, isHip3Symbol, isMiniAppCloid, isMiniAppTriggeredCloid, isSpotSymbol, isStableQuoteToken, isTenantCloid, isTrackingIdCloid, isWidgetType, normaliseSlug, normaliseTrackingId, normalizeAirdropAmount, parseCloid, setHip3DexAbstraction, stableQuoteTokens };
|
package/dist/index.d.ts
CHANGED
|
@@ -84,15 +84,17 @@ declare const TARGET_APPROVED_MAX_BUILDER_FEE_PERCENT = "0.1%";
|
|
|
84
84
|
* Get the amount of builder fee to approve for
|
|
85
85
|
* @param perpetualTradingFee - Perp fee in percentage
|
|
86
86
|
* @param spotTradingFee - Spot fee in percentage
|
|
87
|
+
* @param feeDiscount - Discount fee in percentage (0.9 means 90% discount)
|
|
87
88
|
* @returns {
|
|
88
89
|
* amount: number; - The amount of builder fee to approve in 1/10 of a basis point
|
|
89
90
|
* percent: string; - eg. String input to approve fee, "0.1%"
|
|
90
91
|
* }
|
|
91
92
|
*/
|
|
92
|
-
declare const getApprovalAmount: ({ customFeeEnabled, perpetualTradingFee, spotTradingFee, }: {
|
|
93
|
+
declare const getApprovalAmount: ({ customFeeEnabled, perpetualTradingFee, spotTradingFee, feeDiscount, }: {
|
|
93
94
|
customFeeEnabled: boolean;
|
|
94
95
|
perpetualTradingFee?: number;
|
|
95
96
|
spotTradingFee?: number;
|
|
97
|
+
feeDiscount?: number;
|
|
96
98
|
}) => {
|
|
97
99
|
approvalAmount: number;
|
|
98
100
|
approvalPercent: `${string}%`;
|
|
@@ -552,6 +554,8 @@ declare function getStaticCollateralTokenByDex(dex: string): string;
|
|
|
552
554
|
* @returns The collateral token symbol for the given coin
|
|
553
555
|
*/
|
|
554
556
|
declare function getStaticCollateralTokenSymbol(coin: string | undefined): string;
|
|
557
|
+
declare const stableQuoteTokens: string[];
|
|
558
|
+
declare function isStableQuoteToken(coin: string): boolean;
|
|
555
559
|
/**
|
|
556
560
|
* Get display market symbol for a given coin
|
|
557
561
|
* @param coin - The coin symbol to get the display market symbol for eg. xyz:XYZ100
|
|
@@ -564,4 +568,4 @@ declare function getStaticCollateralTokenSymbol(coin: string | undefined): strin
|
|
|
564
568
|
declare function getDisplayMarketSymbol(coin: string | undefined, showCollateralTokenSymbol?: boolean, collateralTokenSymbol?: string): string | undefined;
|
|
565
569
|
declare function getDexFromCollateralTokenSymbol(collateralTokenSymbol: string): string | undefined;
|
|
566
570
|
|
|
567
|
-
export { type AirdropAllocationData, CloidClientCode, type CloidClientCodeId, CloidClientCodeNameById, type CloidData, type DexInfo, type ExtendedPerpsMeta, type MarketInfo, MetadataClient, PUP_TOKEN_ADDRESS, PUP_TOKEN_THRESHOLDS, type PerpDex, type PupEligibilityResult, ROOT_DEX, TARGET_APPROVED_MAX_BUILDER_FEE, TARGET_APPROVED_MAX_BUILDER_FEE_PERCENT, TESTNET_USDC_SPOT_TOKEN, type TokenInfo, USDC_SPOT_TOKEN, type UpheavalApiResponse, type UpheavalPosition, type UpheavalSnapshot, UserDexAbstractionTypes, type V3LPTokenInfo, WidgetType, WidgetTypeById, type WidgetTypeId, XP_BOOST_PERCENTAGES, buildCloid, calculateBoostPercentage, calculateTotalPupAmount, decodeSlug, enableHip3DexAbstractionWithAgent, encodeSlug, formatPriceAndSize, formatPriceForDisplay, formatPriceForOrder, formatSizeForDisplay, formatSizeForOrder, getApprovalAmount, getClientCodeNameById, getCloid, getDexFromCollateralTokenSymbol, getDisplayMarketSymbol, getHip3Dex, getHip3DexAbstraction, getNextTierInfo, getPriceDecimals, getStaticCollateralTokenByDex, getStaticCollateralTokenSymbol, getWidgetTypeById, isBasedCloid, isClientCode, isHip3Symbol, isMiniAppCloid, isMiniAppTriggeredCloid, isSpotSymbol, isTenantCloid, isTrackingIdCloid, isWidgetType, normaliseSlug, normaliseTrackingId, normalizeAirdropAmount, parseCloid, setHip3DexAbstraction };
|
|
571
|
+
export { type AirdropAllocationData, CloidClientCode, type CloidClientCodeId, CloidClientCodeNameById, type CloidData, type DexInfo, type ExtendedPerpsMeta, type MarketInfo, MetadataClient, PUP_TOKEN_ADDRESS, PUP_TOKEN_THRESHOLDS, type PerpDex, type PupEligibilityResult, ROOT_DEX, TARGET_APPROVED_MAX_BUILDER_FEE, TARGET_APPROVED_MAX_BUILDER_FEE_PERCENT, TESTNET_USDC_SPOT_TOKEN, type TokenInfo, USDC_SPOT_TOKEN, type UpheavalApiResponse, type UpheavalPosition, type UpheavalSnapshot, UserDexAbstractionTypes, type V3LPTokenInfo, WidgetType, WidgetTypeById, type WidgetTypeId, XP_BOOST_PERCENTAGES, buildCloid, calculateBoostPercentage, calculateTotalPupAmount, decodeSlug, enableHip3DexAbstractionWithAgent, encodeSlug, formatPriceAndSize, formatPriceForDisplay, formatPriceForOrder, formatSizeForDisplay, formatSizeForOrder, getApprovalAmount, getClientCodeNameById, getCloid, getDexFromCollateralTokenSymbol, getDisplayMarketSymbol, getHip3Dex, getHip3DexAbstraction, getNextTierInfo, getPriceDecimals, getStaticCollateralTokenByDex, getStaticCollateralTokenSymbol, getWidgetTypeById, isBasedCloid, isClientCode, isHip3Symbol, isMiniAppCloid, isMiniAppTriggeredCloid, isSpotSymbol, isStableQuoteToken, isTenantCloid, isTrackingIdCloid, isWidgetType, normaliseSlug, normaliseTrackingId, normalizeAirdropAmount, parseCloid, setHip3DexAbstraction, stableQuoteTokens };
|