@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 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 };