@reyaxyz/common 0.261.0 → 0.262.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/src/types.ts CHANGED
@@ -1035,13 +1035,15 @@ export type TransactionExecutionOutput = {
1035
1035
  base?: number;
1036
1036
  };
1037
1037
  positions?: Omit<
1038
- Stringified<TradingApiSource['Positions']['response'][0]>,
1038
+ Stringified<TradingApiSource['wallet/:address/positions']['response'][0]>,
1039
1039
  | 'realized_pnl_latest_snapshot'
1040
1040
  | 'average_entry_price_off_chain_tracker'
1041
1041
  | 'funding_value_off_chain_tracker'
1042
1042
  >[];
1043
1043
  orders?: Omit<
1044
- Stringified<TradingApiSource['MarketOrders']['response']['data'][0]>,
1044
+ Stringified<
1045
+ TradingApiSource['market/:marketId/orders']['response']['data'][0]
1046
+ >,
1045
1047
  | 'r_pnl'
1046
1048
  | 'price_variation_pnl'
1047
1049
  | 'funding_pnl'
@@ -1049,7 +1051,7 @@ export type TransactionExecutionOutput = {
1049
1051
  | 'created_at'
1050
1052
  >[];
1051
1053
  accounts?: Omit<
1052
- Stringified<TradingApiSource['Accounts']['response'][0]>,
1054
+ Stringified<TradingApiSource['wallet/:address/accounts']['response'][0]>,
1053
1055
  'status'
1054
1056
  >[];
1055
1057
  //orderAndPositionUpdate?: Stringified<PassivePerpOrderAndPositionUpdate>[];
@@ -190,5 +190,6 @@ export const marketIdToAssetPairMapper: Record<string, string> = Object.keys(
190
190
  marketAssetPairIdMapper,
191
191
  ).reduce((acc, key) => ({ ...acc, [marketAssetPairIdMapper[key]]: key }), {});
192
192
 
193
+ export const getAllMarketIds = () => Object.keys(marketAssetPairIdMapper);
193
194
  export const SOCKET_BRIDGE_IN_MSG_GAS_LIMIT = BigInt('20000000');
194
195
  export const SOCKET_EMPTY_PAYLOAD_SIZE = 160;