@pear-protocol/exchanges-sdk 0.10.0 → 0.11.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.
@@ -300,6 +300,80 @@ async function fetchPositionFundingSince(accountIndex, authToken, since, demo =
300
300
  return Array.from(results.values());
301
301
  }
302
302
  __name(fetchPositionFundingSince, "fetchPositionFundingSince");
303
+ async function submitReferralCode(params, demo = false) {
304
+ const body = new URLSearchParams({
305
+ l1_address: params.l1Address,
306
+ referral_code: params.referralCode
307
+ });
308
+ if (params.discord) {
309
+ body.set("discord", params.discord);
310
+ }
311
+ if (params.telegram) {
312
+ body.set("telegram", params.telegram);
313
+ }
314
+ if (params.x) {
315
+ body.set("x", params.x);
316
+ }
317
+ if (params.signature) {
318
+ body.set("signature", params.signature);
319
+ }
320
+ const response = await authenticatedLighterFetch(`${getLighterBaseUrl(demo)}/api/v1/referral/use`, params.authToken, {
321
+ method: "POST",
322
+ headers: {
323
+ "Content-Type": "application/x-www-form-urlencoded"
324
+ },
325
+ body
326
+ });
327
+ await readLighterResponse(response, "/referral/use");
328
+ }
329
+ __name(submitReferralCode, "submitReferralCode");
330
+ async function fetchUserReferrals(params, demo = false) {
331
+ const query = new URLSearchParams({
332
+ l1_address: params.l1Address
333
+ });
334
+ if (params.cursor) {
335
+ query.set("cursor", params.cursor);
336
+ }
337
+ if (params.statsStartTimestamp !== void 0) {
338
+ query.set("stats_start_timestamp", params.statsStartTimestamp.toString());
339
+ }
340
+ if (params.statsEndTimestamp !== void 0) {
341
+ query.set("stats_end_timestamp", params.statsEndTimestamp.toString());
342
+ }
343
+ if (params.limit !== void 0) {
344
+ query.set("limit", params.limit.toString());
345
+ }
346
+ if (params.eligibleOnly) {
347
+ query.set("is_eligible", "true");
348
+ }
349
+ const response = await authenticatedLighterFetch(`${getLighterBaseUrl(demo)}/api/v1/referral/userReferrals?${query.toString()}`, params.authToken);
350
+ const data = await readLighterResponse(response, "/referral/userReferrals");
351
+ const referrals = [];
352
+ for (const referral of data.referrals ?? []) {
353
+ if (typeof referral !== "object" || referral === null) {
354
+ continue;
355
+ }
356
+ if (typeof referral.l1_address !== "string") {
357
+ continue;
358
+ }
359
+ referrals.push({
360
+ l1Address: referral.l1_address,
361
+ referralCode: typeof referral.referral_code === "string" ? referral.referral_code : "",
362
+ usedAt: readReferralCount(referral.used_at),
363
+ tier: typeof referral.tier === "string" ? referral.tier : "",
364
+ tradeStats: readReferralTradeStats(referral.trade_stats)
365
+ });
366
+ }
367
+ return {
368
+ usedCode: typeof data.used_code === "string" && data.used_code.length > 0 ? data.used_code : null,
369
+ referrals,
370
+ totals: readReferralTotals(data.totals),
371
+ // Reuse the funding-history reading: it treats an unparseable cursor as live, so the worst an
372
+ // encoding mismatch costs here is one extra empty page rather than a dropped one.
373
+ nextCursor: readHistoryCursor(data.cursor)
374
+ };
375
+ }
376
+ __name(fetchUserReferrals, "fetchUserReferrals");
303
377
  async function authenticatedLighterFetch(url, authToken, init) {
304
378
  const headers = new Headers(init?.headers);
305
379
  headers.set("authorization", authToken);
@@ -374,5 +448,49 @@ async function readLighterResponse(response, endpoint, acceptedCodes = [
374
448
  return data;
375
449
  }
376
450
  __name(readLighterResponse, "readLighterResponse");
451
+ function readReferralTradeStats(stats) {
452
+ const raw = typeof stats === "object" && stats !== null ? stats : {};
453
+ return {
454
+ count: readReferralCount(raw.count),
455
+ volume: readReferralAmount(raw.volume),
456
+ webCount: readReferralCount(raw.web_count),
457
+ webVolume: readReferralAmount(raw.web_volume),
458
+ mobileAppCount: readReferralCount(raw.mobile_app_count),
459
+ mobileAppVolume: readReferralAmount(raw.mobile_app_volume),
460
+ mobileBrowserCount: readReferralCount(raw.mobile_browser_count),
461
+ mobileBrowserVolume: readReferralAmount(raw.mobile_browser_volume),
462
+ freeMakerVolume: readReferralAmount(raw.free_maker_volume),
463
+ freeTakerVolume: readReferralAmount(raw.free_taker_volume),
464
+ nonFreeMakerVolume: readReferralAmount(raw.non_free_maker_volume),
465
+ nonFreeTakerVolume: readReferralAmount(raw.non_free_taker_volume),
466
+ makerFeesPaid: readReferralAmount(raw.maker_fees_paid),
467
+ takerFeesPaid: readReferralAmount(raw.taker_fees_paid)
468
+ };
469
+ }
470
+ __name(readReferralTradeStats, "readReferralTradeStats");
471
+ function readReferralTotals(totals) {
472
+ const raw = typeof totals === "object" && totals !== null ? totals : {};
473
+ return {
474
+ count: readReferralCount(raw.count),
475
+ volume: readReferralAmount(raw.volume),
476
+ freeMakerVolume: readReferralAmount(raw.free_maker_volume),
477
+ freeTakerVolume: readReferralAmount(raw.free_taker_volume),
478
+ nonFreeMakerVolume: readReferralAmount(raw.non_free_maker_volume),
479
+ nonFreeTakerVolume: readReferralAmount(raw.non_free_taker_volume),
480
+ makerFeesPaid: readReferralAmount(raw.maker_fees_paid),
481
+ takerFeesPaid: readReferralAmount(raw.taker_fees_paid),
482
+ totalReferrals: readReferralCount(raw.total_referrals),
483
+ totalPremiumReferrals: readReferralCount(raw.total_premium_referrals)
484
+ };
485
+ }
486
+ __name(readReferralTotals, "readReferralTotals");
487
+ function readReferralCount(value) {
488
+ return typeof value === "number" && Number.isFinite(value) ? value : 0;
489
+ }
490
+ __name(readReferralCount, "readReferralCount");
491
+ function readReferralAmount(value) {
492
+ return typeof value === "string" && value.length > 0 ? value : "0";
493
+ }
494
+ __name(readReferralAmount, "readReferralAmount");
377
495
 
378
- export { createCctpDepositIntentAddress, fetchAccount, fetchAccountLimits, fetchAccountMetadata, fetchAccountsByL1Address, fetchApiKeys, fetchAssetDetails, fetchDepositHistory, fetchDepositNetworks, fetchOrderBookDetails, fetchPositionFundingSince, fetchPublicAccount, fetchPublicOrderBookDetails, fetchTradesSince, fetchWithdrawHistory };
496
+ export { createCctpDepositIntentAddress, fetchAccount, fetchAccountLimits, fetchAccountMetadata, fetchAccountsByL1Address, fetchApiKeys, fetchAssetDetails, fetchDepositHistory, fetchDepositNetworks, fetchOrderBookDetails, fetchPositionFundingSince, fetchPublicAccount, fetchPublicOrderBookDetails, fetchTradesSince, fetchUserReferrals, fetchWithdrawHistory, submitReferralCode };
@@ -7,6 +7,7 @@ import { createDepositAddressForRoute, depositThroughRoute } from './deposit.hel
7
7
  import { writeWithdraw } from './ethereum';
8
8
  import { readWithdrawHistory, readDepositHistory } from './history.helper';
9
9
  import { LIGHTER_ACCOUNT_NOT_REGISTERED_CODE, readOnboardingStatus } from './onboarding.helper';
10
+ import { readUserReferrals, applyReferralCode } from './referral.helper';
10
11
  import { MIN_LIGHTER_FAST_WITHDRAW_USDC } from './types';
11
12
 
12
13
  var __defProp = Object.defineProperty;
@@ -198,6 +199,18 @@ function createLighterHelper(sdk, demo = false) {
198
199
  /** Reads one page of the account's withdrawal history, newest first. */
199
200
  async getWithdrawHistory(params) {
200
201
  return readWithdrawHistory(sdk, params, demo);
202
+ },
203
+ /** Reads the Fun.xyz bridge deposits Lighter has seen for a wallet. */
204
+ async listUdaDeposits(walletAddress) {
205
+ return sdk.core.misc.lighter.listUdaDeposits(walletAddress);
206
+ },
207
+ /** Applies a referrer's code to the owner. Lighter accepts this at most once per owner. */
208
+ async applyReferralCode(params) {
209
+ return applyReferralCode(sdk, params, demo);
210
+ },
211
+ /** Reads one page of the owner's referral record, including the code that referred them. */
212
+ async getUserReferrals(params) {
213
+ return readUserReferrals(sdk, params, demo);
201
214
  }
202
215
  };
203
216
  return helper;
@@ -0,0 +1,33 @@
1
+ import { submitReferralCode, fetchUserReferrals } from '../../client/lighter/rest';
2
+ import { retrieveLighterAuthToken } from './auth-token.helper';
3
+
4
+ var __defProp = Object.defineProperty;
5
+ var __name = (target, value) => __defProp(target, "name", { value, configurable: true });
6
+ async function applyReferralCode(sdk, params, demo) {
7
+ const authToken = await retrieveLighterAuthToken(sdk, params.credentials, demo);
8
+ await submitReferralCode({
9
+ l1Address: params.l1Address,
10
+ referralCode: params.referralCode,
11
+ authToken,
12
+ discord: params.discord,
13
+ telegram: params.telegram,
14
+ x: params.x,
15
+ signature: params.signature
16
+ }, demo);
17
+ }
18
+ __name(applyReferralCode, "applyReferralCode");
19
+ async function readUserReferrals(sdk, params, demo) {
20
+ const authToken = await retrieveLighterAuthToken(sdk, params.credentials, demo);
21
+ return fetchUserReferrals({
22
+ l1Address: params.l1Address,
23
+ authToken,
24
+ cursor: params.cursor,
25
+ statsStartTimestamp: params.statsStartTimestamp,
26
+ statsEndTimestamp: params.statsEndTimestamp,
27
+ limit: params.limit,
28
+ eligibleOnly: params.eligibleOnly
29
+ }, demo);
30
+ }
31
+ __name(readUserReferrals, "readUserReferrals");
32
+
33
+ export { applyReferralCode, readUserReferrals };
package/dist/index.d.ts CHANGED
@@ -319,6 +319,62 @@ type LighterWithdrawPage = {
319
319
  /** Null once Lighter holds no older page. */
320
320
  nextCursor: string | null;
321
321
  };
322
+ /** What one referred trader has traded, over whatever window the request asked Lighter for. */
323
+ type LighterReferralTradeStats = {
324
+ count: number;
325
+ volume: string;
326
+ webCount: number;
327
+ webVolume: string;
328
+ mobileAppCount: number;
329
+ mobileAppVolume: string;
330
+ mobileBrowserCount: number;
331
+ mobileBrowserVolume: string;
332
+ freeMakerVolume: string;
333
+ freeTakerVolume: string;
334
+ nonFreeMakerVolume: string;
335
+ nonFreeTakerVolume: string;
336
+ makerFeesPaid: string;
337
+ takerFeesPaid: string;
338
+ };
339
+ /** One trader who signed up under the owner's code. */
340
+ type LighterReferral = {
341
+ l1Address: string;
342
+ /** The code that trader used, which is the owner's own code. */
343
+ referralCode: string;
344
+ /** When the code was used. Lighter states no unit; its funding histories send milliseconds. */
345
+ usedAt: number;
346
+ /** Lighter's tier wording for that trader; a kickback accrues only above `standard`. */
347
+ tier: string;
348
+ tradeStats: LighterReferralTradeStats;
349
+ };
350
+ /** The owner's running referral totals, which count every referral rather than only this page. */
351
+ type LighterReferralTotals = {
352
+ count: number;
353
+ volume: string;
354
+ freeMakerVolume: string;
355
+ freeTakerVolume: string;
356
+ nonFreeMakerVolume: string;
357
+ nonFreeTakerVolume: string;
358
+ makerFeesPaid: string;
359
+ takerFeesPaid: string;
360
+ totalReferrals: number;
361
+ /** How many referrals hold a paid tier, which is the only kind that earns a kickback. */
362
+ totalPremiumReferrals: number;
363
+ };
364
+ /**
365
+ * One page of an owner's referral record.
366
+ *
367
+ * `usedCode` is the only place Lighter reports who referred the owner, and it reports the code
368
+ * rather than the referrer. Lighter publishes no endpoint that resolves a code back to its owner.
369
+ */
370
+ type LighterUserReferrals = {
371
+ /** The code the owner signed up under, or null when nobody referred them. */
372
+ usedCode: string | null;
373
+ referrals: LighterReferral[];
374
+ totals: LighterReferralTotals;
375
+ /** Null once Lighter holds no further page. */
376
+ nextCursor: string | null;
377
+ };
322
378
 
323
379
  /** Shares one live Lighter auth token per account without crossing rotated credentials. */
324
380
 
@@ -752,6 +808,38 @@ type LighterOnboardingStatus = {
752
808
  mainAccountIndex: number;
753
809
  subAccountIndexes: number[];
754
810
  };
811
+ type LighterApplyReferralCodeParams = {
812
+ /** Signs the write; the account it names must belong to the address below. */
813
+ credentials: LighterAuthCredentials;
814
+ /** The owner address the referral binds to; Lighter keys its referral record by address. */
815
+ l1Address: string;
816
+ /** The referrer's code, spelled the way Lighter prints it. */
817
+ referralCode: string;
818
+ /** Lighter accepts a Discord handle beside the code but documents no format for it. */
819
+ discord?: string;
820
+ /** Lighter accepts a Telegram handle beside the code but documents no format for it. */
821
+ telegram?: string;
822
+ /** Lighter accepts an X handle beside the code but documents no format for it. */
823
+ x?: string;
824
+ /** Lighter accepts a signature beside the code but documents neither its payload nor its scheme. */
825
+ signature?: string;
826
+ };
827
+ type LighterUserReferralsParams = {
828
+ /** Signs the read; the account it names must belong to the address below. */
829
+ credentials: LighterAuthCredentials;
830
+ /** The owner address whose referral record comes back. */
831
+ l1Address: string;
832
+ /** The `nextCursor` of the page just read; omit to read the first page. */
833
+ cursor?: string;
834
+ /** Opens the `tradeStats` window. Lighter states no unit for it, so pass what its own client passes. */
835
+ statsStartTimestamp?: number;
836
+ /** Closes the `tradeStats` window. Lighter states no unit for it, so pass what its own client passes. */
837
+ statsEndTimestamp?: number;
838
+ /** Rows per page, between 1 and 300; omit to take Lighter's own page size. */
839
+ limit?: number;
840
+ /** Narrows the page to the referrals Lighter counts toward a kickback tier. */
841
+ eligibleOnly?: boolean;
842
+ };
755
843
  interface LighterHelper {
756
844
  checkOnboarding(l1Address: string): Promise<LighterOnboardingStatus>;
757
845
  lookupAccount(l1Address: string): Promise<LighterLookupResult>;
@@ -774,6 +862,12 @@ interface LighterHelper {
774
862
  getDepositHistory(params: LighterDepositHistoryParams): Promise<LighterDepositPage>;
775
863
  /** Reads one page of the account's withdrawal history, newest first. */
776
864
  getWithdrawHistory(params: LighterWithdrawHistoryParams): Promise<LighterWithdrawPage>;
865
+ /** Reads the Fun.xyz bridge deposits Lighter has seen for a wallet. */
866
+ listUdaDeposits(walletAddress: string): Promise<HttpTypes.ListLighterUdaDepositsResult>;
867
+ /** Applies a referrer's code to the owner. Lighter accepts this at most once per owner. */
868
+ applyReferralCode(params: LighterApplyReferralCodeParams): Promise<void>;
869
+ /** Reads one page of the owner's referral record, including the code that referred them. */
870
+ getUserReferrals(params: LighterUserReferralsParams): Promise<LighterUserReferrals>;
777
871
  }
778
872
  type LighterLookupResult = {
779
873
  mainAccountIndex: number;
@@ -2603,4 +2697,4 @@ declare class ExchangesSDK {
2603
2697
  private fetchCredentials;
2604
2698
  }
2605
2699
 
2606
- export { ACCOUNT_MODE_LABELS, ASSET_DECIMALS, AccountBalance, AccountBalanceCore, type AccountHealthStatus, AccountMode, type AccountPosition, type AccountSnapshot, type AccountStatus, type AccountSyncer, type AccountSyncerConfig, type AccountTierCallback, type AccountTracker, type AccountTrackerConfig, type AccountWarningReason, type ApiKey, type ApproveIntegratorParams, type ApproveIntegratorResult, AssetId, type AssetSnapshotMap, type BalanceCallback, BaseAccountSyncer, BaseAccountTracker, BaseWs, BasketLeg, BinanceAccountSyncer, BinanceAccountTracker, type BinanceAccountTrackerConfig, BinanceExchangeWs, BinanceMultiAssetBalance, BinanceSingleAssetBalance, BinanceUserDataWs, type BinanceUserDataWsConfig, BinanceWsApi, type BinanceWsApiConfig, BybitAccountSyncer, BybitAccountTracker, type BybitAccountTrackerConfig, BybitExchangeWs, BybitIsolatedMarginBalance, BybitPortfolioMarginBalance, BybitRegularMarginBalance, BybitWs, type BybitWsConfig, type CappedBasketLeg, type CctpDepositAddressParams, type CctpDepositAddressResult, type CctpDepositHistorySettlement, type CctpDepositParams, type CctpDepositRegistrationSettlement, type CctpDepositResult, type CctpDepositSettlement, type ChangeAccountTierParams, type ChangeAccountTierResult, type CheckApiWalletParams, CollateralBalance, type ConnectOptions, type ConnectWalletParams, type ConnectWalletResult, type CreateAccountTrackerConfig, type CreateExchangeWsConfig, DecimalString, type EthereumDepositParams, type EthereumDepositResult, type ExchangeConnection, type ExchangeHelperExchange, type ExchangeHelperMap, type ExchangeState, ExchangeWs, type ExchangeWsByConnector, ExchangesSDK, type ExchangesSDKConfig, FUNXYZ_DEPOSIT_MINIMUMS_USD, FUNXYZ_ETHEREUM_MAINNET_CHAIN_ID, FUNXYZ_EVM_CHAIN_NAMES, type FastWithdrawParams, type FastWithdrawResult, type FillSyncOutcome, type FundingSyncOutcome, type FunxyzAccountState, type FunxyzAsset, type FunxyzDepositAddressParams, type FunxyzDepositAddressResult, type FunxyzDepositCredit, type FunxyzDepositParams, type FunxyzDepositResult, type FunxyzDepositSettlement, type FunxyzDepositSource, type FunxyzMarket, HyperliquidAccountSyncer, HyperliquidAccountTracker, type HyperliquidAccountTrackerConfig, HyperliquidDexState, HyperliquidExchangeWs, type HyperliquidHelper, HyperliquidPortfolioMarginBalance, HyperliquidPortfolioMarginCollateral, HyperliquidStandardBalance, HyperliquidUnifiedBalance, HyperliquidWs, type IntegratorApprovalRequirements, L2_ASSET_DECIMALS, LIGHTER_NATIVE_USDC_ADDRESSES, LIGHTER_USDC_DECIMALS, LighterAccountSyncer, type LighterAccountTier, LighterAccountTracker, type LighterAccountTrackerConfig, type LighterAuthCredentials, LighterClassicBalance, type LighterDeposit, type LighterDepositAddressParams, type LighterDepositAddressResult, type LighterDepositCredit, type LighterDepositHistoryParams, type LighterDepositNetwork, type LighterDepositPage, type LighterDepositParams, type LighterDepositProgress, type LighterDepositResult, type LighterDepositStatus, type LighterDepositWalletAdapter, LighterExchangeWs, type LighterHelper, type LighterLookupResult, type LighterOnboardingStatus, LighterUnifiedBalance, type LighterWithdraw, type LighterWithdrawHistoryParams, type LighterWithdrawPage, type LighterWithdrawStatus, type LighterWithdrawType, LighterWs, type ListExternalFillsParams, type ListExternalFundingParams, type ListExternalPositionsParams, MAX_API_KEY_INDEX, MIN_LIGHTER_CCTP_DEPOSIT_USDC, MIN_LIGHTER_FAST_WITHDRAW_USDC, MIN_USER_API_KEY_INDEX, MarginMode, type MaxBasketSizeCalculation, MaxBasketSizeInput, MaxBasketSizeResult, type MessageListener, OkxAccountSyncer, OkxAccountTracker, type OkxAccountTrackerConfig, OkxExchangeWs, OkxFuturesBalance, OkxMultiCurrencyMarginBalance, OkxPortfolioMarginBalance, OkxSpotBalance, OkxWs, type OkxWsConfig, type OpenListener, type PositionsCallback, RouteType, Side, SignedDecimalString, type StateUpdate, type SupportedCredentials, type TrackedAssetCallback, type TrackedAssetInfo, type WalletClientWithAccount, type WithdrawParams, type WithdrawResult, type WsMessage, computeMaxBasketSize, createAccountSyncer, createAccountTracker, createExchangeWs, createHyperliquidHelper, createLighterHelper, findAvailableApiKeyIndex, getAssetDecimals, getLighterNativeUsdcAddress, listFunxyzTransferableChains, readFunxyzChainSource, readFunxyzMinimumUsd, retrieveLighterAuthToken, usdcAbi };
2700
+ export { ACCOUNT_MODE_LABELS, ASSET_DECIMALS, AccountBalance, AccountBalanceCore, type AccountHealthStatus, AccountMode, type AccountPosition, type AccountSnapshot, type AccountStatus, type AccountSyncer, type AccountSyncerConfig, type AccountTierCallback, type AccountTracker, type AccountTrackerConfig, type AccountWarningReason, type ApiKey, type ApproveIntegratorParams, type ApproveIntegratorResult, AssetId, type AssetSnapshotMap, type BalanceCallback, BaseAccountSyncer, BaseAccountTracker, BaseWs, BasketLeg, BinanceAccountSyncer, BinanceAccountTracker, type BinanceAccountTrackerConfig, BinanceExchangeWs, BinanceMultiAssetBalance, BinanceSingleAssetBalance, BinanceUserDataWs, type BinanceUserDataWsConfig, BinanceWsApi, type BinanceWsApiConfig, BybitAccountSyncer, BybitAccountTracker, type BybitAccountTrackerConfig, BybitExchangeWs, BybitIsolatedMarginBalance, BybitPortfolioMarginBalance, BybitRegularMarginBalance, BybitWs, type BybitWsConfig, type CappedBasketLeg, type CctpDepositAddressParams, type CctpDepositAddressResult, type CctpDepositHistorySettlement, type CctpDepositParams, type CctpDepositRegistrationSettlement, type CctpDepositResult, type CctpDepositSettlement, type ChangeAccountTierParams, type ChangeAccountTierResult, type CheckApiWalletParams, CollateralBalance, type ConnectOptions, type ConnectWalletParams, type ConnectWalletResult, type CreateAccountTrackerConfig, type CreateExchangeWsConfig, DecimalString, type EthereumDepositParams, type EthereumDepositResult, type ExchangeConnection, type ExchangeHelperExchange, type ExchangeHelperMap, type ExchangeState, ExchangeWs, type ExchangeWsByConnector, ExchangesSDK, type ExchangesSDKConfig, FUNXYZ_DEPOSIT_MINIMUMS_USD, FUNXYZ_ETHEREUM_MAINNET_CHAIN_ID, FUNXYZ_EVM_CHAIN_NAMES, type FastWithdrawParams, type FastWithdrawResult, type FillSyncOutcome, type FundingSyncOutcome, type FunxyzAccountState, type FunxyzAsset, type FunxyzDepositAddressParams, type FunxyzDepositAddressResult, type FunxyzDepositCredit, type FunxyzDepositParams, type FunxyzDepositResult, type FunxyzDepositSettlement, type FunxyzDepositSource, type FunxyzMarket, HyperliquidAccountSyncer, HyperliquidAccountTracker, type HyperliquidAccountTrackerConfig, HyperliquidDexState, HyperliquidExchangeWs, type HyperliquidHelper, HyperliquidPortfolioMarginBalance, HyperliquidPortfolioMarginCollateral, HyperliquidStandardBalance, HyperliquidUnifiedBalance, HyperliquidWs, type IntegratorApprovalRequirements, L2_ASSET_DECIMALS, LIGHTER_NATIVE_USDC_ADDRESSES, LIGHTER_USDC_DECIMALS, LighterAccountSyncer, type LighterAccountTier, LighterAccountTracker, type LighterAccountTrackerConfig, type LighterApplyReferralCodeParams, type LighterAuthCredentials, LighterClassicBalance, type LighterDeposit, type LighterDepositAddressParams, type LighterDepositAddressResult, type LighterDepositCredit, type LighterDepositHistoryParams, type LighterDepositNetwork, type LighterDepositPage, type LighterDepositParams, type LighterDepositProgress, type LighterDepositResult, type LighterDepositStatus, type LighterDepositWalletAdapter, LighterExchangeWs, type LighterHelper, type LighterLookupResult, type LighterOnboardingStatus, type LighterReferral, type LighterReferralTotals, type LighterReferralTradeStats, LighterUnifiedBalance, type LighterUserReferrals, type LighterUserReferralsParams, type LighterWithdraw, type LighterWithdrawHistoryParams, type LighterWithdrawPage, type LighterWithdrawStatus, type LighterWithdrawType, LighterWs, type ListExternalFillsParams, type ListExternalFundingParams, type ListExternalPositionsParams, MAX_API_KEY_INDEX, MIN_LIGHTER_CCTP_DEPOSIT_USDC, MIN_LIGHTER_FAST_WITHDRAW_USDC, MIN_USER_API_KEY_INDEX, MarginMode, type MaxBasketSizeCalculation, MaxBasketSizeInput, MaxBasketSizeResult, type MessageListener, OkxAccountSyncer, OkxAccountTracker, type OkxAccountTrackerConfig, OkxExchangeWs, OkxFuturesBalance, OkxMultiCurrencyMarginBalance, OkxPortfolioMarginBalance, OkxSpotBalance, OkxWs, type OkxWsConfig, type OpenListener, type PositionsCallback, RouteType, Side, SignedDecimalString, type StateUpdate, type SupportedCredentials, type TrackedAssetCallback, type TrackedAssetInfo, type WalletClientWithAccount, type WithdrawParams, type WithdrawResult, type WsMessage, computeMaxBasketSize, createAccountSyncer, createAccountTracker, createExchangeWs, createHyperliquidHelper, createLighterHelper, findAvailableApiKeyIndex, getAssetDecimals, getLighterNativeUsdcAddress, listFunxyzTransferableChains, readFunxyzChainSource, readFunxyzMinimumUsd, retrieveLighterAuthToken, usdcAbi };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pear-protocol/exchanges-sdk",
3
- "version": "0.10.0",
3
+ "version": "0.11.0",
4
4
  "description": "Pear Protocol Exchanges SDK",
5
5
  "private": false,
6
6
  "type": "module",
@@ -28,7 +28,7 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@pear-protocol/core-sdk": "^1.19.0",
31
- "@pear-protocol/types": "^1.30.0",
31
+ "@pear-protocol/types": "^1.30.1",
32
32
  "@pear-protocol/utils": "^0.5.3",
33
33
  "bignumber.js": "^11.1.1",
34
34
  "partysocket": "^1.0.3",