@sudobility/heavymath_indexer_client 0.0.34 → 0.0.35

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/types.d.ts CHANGED
@@ -51,6 +51,8 @@ export interface WalletFavoritesFilters {
51
51
  offset?: number;
52
52
  }
53
53
  export type { SetMarketOracleConfigRequest, MarketOracleConfigData, MarketResolutionCheckSuccess, MarketResolutionCheckError, } from '@sudobility/heavymath_types';
54
+ export type { ConditionTypeValue, ScoreTypeValue, TeamSideValue, ComparisonOperatorValue, WinLossCondition, MatchScoreCondition, TournamentCondition, ConditionData, } from '@sudobility/heavymath_types';
55
+ export { ConditionType, ScoreType, TeamSide, ComparisonOperator, encodeConditionData, decodeConditionData, formatConditionDescription, } from '@sudobility/heavymath_types';
54
56
  import type { MarketResolutionCheckSuccess, MarketResolutionCheckError } from '@sudobility/heavymath_types';
55
57
  export type MarketResolutionCheck = {
56
58
  ok: true;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAWA,YAAY,EAEV,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,QAAQ,EAER,aAAa,EACb,eAAe,EACf,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAG3B,YAAY,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AAMrD,YAAY,EAEV,eAAe,EACf,YAAY,EACZ,OAAO,EAGP,YAAY,EACZ,SAAS,EACT,cAAc,EAGd,UAAU,EACV,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,qBAAqB,EACrB,cAAc,GACf,MAAM,6BAA6B,CAAC;AASrC,OAAO,KAAK,EACV,UAAU,EACV,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,iBAAi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,UAAU,EAAE,MAAM,CAAC;IACnB,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD,MAAM,WAAW,yBAAyB;IACxC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD,MAAM,WAAW,0BAA0B;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;CACjB;AAKD,MAAM,WAAW,cAAc;IAC7B,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,OAAO,EAAE,MAAM,CAAC;CACjB"}
package/dist/types.js CHANGED
@@ -1,2 +1,3 @@
1
+ export { ConditionType, ScoreType, TeamSide, ComparisonOperator, encodeConditionData, decodeConditionData, formatConditionDescription, } from '@sudobility/heavymath_types';
1
2
  export * from './types/sports';
2
3
  //# sourceMappingURL=types.js.map
package/dist/types.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAkUA,cAAc,gBAAgB,CAAC","sourcesContent":["/**\n * Type definitions for Heavymath Prediction Market Indexer API Client\n *\n * Re-exports types from @sudobility/heavymath_types and @sudobility/types\n * to ensure type consistency between frontend and backend.\n */\n\n// ============================================================================\n// Re-exports from @sudobility/types\n// ============================================================================\n\nexport type {\n // Base response types\n BaseResponse,\n PaginationInfo,\n PaginatedResponse,\n Optional,\n // Network types\n NetworkClient,\n NetworkResponse,\n NetworkRequestOptions,\n} from '@sudobility/types';\n\n// ApiResponse is an alias for BaseResponse\nexport type { ApiResponse } from '@sudobility/types';\n\n// ============================================================================\n// Re-exports from @sudobility/heavymath_types\n// ============================================================================\n\nexport type {\n // Common types\n ChainPrefixedId,\n PredictionId,\n TxLogId,\n\n // Enums\n MarketStatus,\n ClaimType,\n WithdrawalType,\n\n // API Data types (JSON-serializable versions for API responses)\n MarketData,\n PredictionData,\n DealerNftData,\n DealerPermissionData,\n FeeWithdrawalData,\n OracleRequestData,\n MarketStateHistoryData,\n MarketStatsData,\n HealthData,\n SSEStatsData,\n WalletFavoriteData,\n CreateFavoriteRequest,\n FavoriteCountsFilters,\n PaginationMeta,\n} from '@sudobility/heavymath_types';\n\n// ============================================================================\n// Type Aliases for Backward Compatibility\n// ============================================================================\n\n// These aliases map old type names to new ones from @sudobility/heavymath_types\n// This maintains backward compatibility with existing code using the old names\n\nimport type {\n MarketData,\n PredictionData,\n DealerNftData,\n DealerPermissionData,\n FeeWithdrawalData,\n OracleRequestData,\n MarketStateHistoryData,\n MarketStatsData,\n HealthData,\n} from '@sudobility/heavymath_types';\n\n/** @deprecated Use MarketData instead */\nexport type Market = MarketData;\n\n/** @deprecated Use PredictionData instead */\nexport type Prediction = PredictionData;\n\n/** @deprecated Use DealerNftData instead */\nexport type DealerNFT = DealerNftData;\n\n/** @deprecated Use DealerPermissionData instead */\nexport type DealerPermission = DealerPermissionData;\n\n/** @deprecated Use FeeWithdrawalData instead */\nexport type FeeWithdrawal = FeeWithdrawalData;\n\n/** @deprecated Use OracleRequestData instead */\nexport type OracleRequest = OracleRequestData;\n\n/** @deprecated Use MarketStateHistoryData instead */\nexport type StateHistory = MarketStateHistoryData;\n\n/** @deprecated Use MarketStatsData instead */\nexport type MarketStats = MarketStatsData;\n\n/** @deprecated Use HealthData instead */\nexport type HealthStatus = HealthData;\n\n// ============================================================================\n// Client-specific Types (not in shared packages)\n// ============================================================================\n\n/**\n * Query parameters for the markets endpoint (GET /api/markets).\n */\nexport interface MarketFilters {\n /** Filter by market status. Accepts 'Active', 'Resolved', 'Cancelled', or 'Abandoned'. */\n status?: import('@sudobility/heavymath_types').MarketStatus;\n /** Filter by dealer address (the wallet that created the market). */\n dealer?: string;\n /** Filter by market category string (e.g., 'sports', 'crypto'). */\n category?: string;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n/**\n * Query parameters for the predictions endpoint (GET /api/predictions).\n */\nexport interface PredictionFilters {\n /** Filter by predictor wallet address. */\n user?: string;\n /** Filter by chain-prefixed market ID (e.g., '1-market-123'). */\n market?: string;\n /** Filter by claim status. `true` for claimed predictions, `false` for unclaimed. */\n claimed?: boolean;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n/**\n * Query parameters for the dealers endpoint (GET /api/dealers).\n */\nexport interface DealerFilters {\n /** Filter by dealer NFT owner wallet address. */\n owner?: string;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n/**\n * Query parameters for the withdrawals endpoint (GET /api/withdrawals).\n */\nexport interface WithdrawalFilters {\n /** Filter by withdrawer wallet address. */\n withdrawer?: string;\n /** Filter by withdrawal type. Accepts 'dealer' or 'system'. */\n type?: import('@sudobility/heavymath_types').WithdrawalType;\n /** Filter by chain-prefixed market ID. */\n market?: string;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n/**\n * Query parameters for the oracle requests endpoint (GET /api/oracle/requests).\n */\nexport interface OracleFilters {\n /** Filter by chain-prefixed market ID. */\n market?: string;\n /** Filter by timeout status. `true` for timed-out requests, `false` for pending. */\n timedOut?: boolean;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n/**\n * Query parameters for the wallet favorites endpoint (GET /api/wallet/:address/favorites).\n */\nexport interface WalletFavoritesFilters {\n /** Filter by favorite category (e.g., 'sports', 'crypto'). */\n category?: string;\n /** Filter by favorite subcategory (e.g., 'soccer', 'bitcoin'). */\n subcategory?: string;\n /** Filter by favorite item type (e.g., 'team', 'market'). */\n type?: string;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n// FavoriteCountsFilters is re-exported from @sudobility/heavymath_types above\n\n// ============================================================================\n// Oracle Resolution Types (re-exported from @sudobility/heavymath_types)\n// ============================================================================\n\n// Re-export shared oracle types\nexport type {\n SetMarketOracleConfigRequest,\n MarketOracleConfigData,\n MarketResolutionCheckSuccess,\n MarketResolutionCheckError,\n} from '@sudobility/heavymath_types';\n\n// Import for use in the union type below\nimport type {\n MarketResolutionCheckSuccess,\n MarketResolutionCheckError,\n} from '@sudobility/heavymath_types';\n\n/**\n * Union type for the resolve endpoint response.\n * Client-specific discriminated union wrapping the shared response types.\n */\nexport type MarketResolutionCheck =\n | { ok: true; data: MarketResolutionCheckSuccess }\n | { ok: false; error: MarketResolutionCheckError };\n\n// ============================================================================\n// Server-Sent Events (SSE) Types\n// ============================================================================\n\n/**\n * SSE subscription channels\n */\nexport type SubscriptionChannel = 'markets' | 'market' | 'predictions' | 'dealers' | 'oracle';\n\n/**\n * SSE event types\n */\nexport type SSEEventType =\n | 'MarketCreated'\n | 'MarketResolved'\n | 'MarketCancelled'\n | 'MarketAbandoned'\n | 'PredictionPlaced'\n | 'PredictionUpdated'\n | 'WinningsClaimed'\n | 'RefundClaimed'\n | 'DealerFeeSet'\n | 'DealerFeesWithdrawn'\n | 'LicenseIssued'\n | 'LicenseTransferred'\n | 'PermissionsSet'\n | 'OracleRegistered'\n | 'OracleDataUpdated';\n\n/**\n * SSE subscription filters\n */\nexport interface SSEFilters {\n marketId?: string;\n dealer?: string;\n user?: string;\n category?: string;\n}\n\n/**\n * SSE connection message\n */\nexport interface SSEConnectedMessage {\n type: 'connected';\n clientId: string;\n subscriptionId: string;\n channel: SubscriptionChannel;\n timestamp: number;\n}\n\n/**\n * SSE data update message\n */\nexport interface SSEDataUpdateMessage {\n type: 'data_update';\n subscriptionId: string;\n eventType: SSEEventType;\n data: unknown;\n timestamp: number;\n}\n\n/**\n * SSE heartbeat message\n */\nexport interface SSEHeartbeatMessage {\n type: 'heartbeat';\n timestamp: number;\n}\n\n/**\n * SSE subscription confirmed message\n */\nexport interface SSESubscriptionConfirmedMessage {\n type: 'subscription_confirmed';\n subscriptionId: string;\n channel: SubscriptionChannel;\n}\n\n/**\n * Union of all SSE message types\n */\nexport type SSEMessage =\n | SSEConnectedMessage\n | SSEDataUpdateMessage\n | SSEHeartbeatMessage\n | SSESubscriptionConfirmedMessage;\n\n/**\n * SSE connection state\n */\nexport type SSEConnectionState = 'connecting' | 'connected' | 'disconnected' | 'error';\n\n// ============================================================================\n// Sports API Proxy Types\n// ============================================================================\n\nexport * from './types/sports';\n\n/**\n * Market created event data\n */\nexport interface MarketCreatedEventData {\n marketId: string;\n dealer: string;\n category: string;\n chainId: number;\n}\n\n/**\n * Market resolved event data\n */\nexport interface MarketResolvedEventData {\n marketId: string;\n resolution: string;\n equilibrium: string;\n chainId: number;\n}\n\n/**\n * Prediction placed event data\n */\nexport interface PredictionPlacedEventData {\n marketId: string;\n predictor: string;\n amount: string;\n percentage: string;\n chainId: number;\n}\n\n/**\n * Prediction updated event data\n */\nexport interface PredictionUpdatedEventData {\n marketId: string;\n predictor: string;\n newAmount: string;\n newPercentage: string;\n chainId: number;\n}\n\n/**\n * Winnings/refund claimed event data\n */\nexport interface ClaimEventData {\n marketId: string;\n predictor: string;\n amount: string;\n chainId: number;\n}\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAmOA,OAAO,EACL,aAAa,EACb,SAAS,EACT,QAAQ,EACR,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,0BAA0B,GAC3B,MAAM,6BAA6B,CAAC;AAgHrC,cAAc,gBAAgB,CAAC","sourcesContent":["/**\n * Type definitions for Heavymath Prediction Market Indexer API Client\n *\n * Re-exports types from @sudobility/heavymath_types and @sudobility/types\n * to ensure type consistency between frontend and backend.\n */\n\n// ============================================================================\n// Re-exports from @sudobility/types\n// ============================================================================\n\nexport type {\n // Base response types\n BaseResponse,\n PaginationInfo,\n PaginatedResponse,\n Optional,\n // Network types\n NetworkClient,\n NetworkResponse,\n NetworkRequestOptions,\n} from '@sudobility/types';\n\n// ApiResponse is an alias for BaseResponse\nexport type { ApiResponse } from '@sudobility/types';\n\n// ============================================================================\n// Re-exports from @sudobility/heavymath_types\n// ============================================================================\n\nexport type {\n // Common types\n ChainPrefixedId,\n PredictionId,\n TxLogId,\n\n // Enums\n MarketStatus,\n ClaimType,\n WithdrawalType,\n\n // API Data types (JSON-serializable versions for API responses)\n MarketData,\n PredictionData,\n DealerNftData,\n DealerPermissionData,\n FeeWithdrawalData,\n OracleRequestData,\n MarketStateHistoryData,\n MarketStatsData,\n HealthData,\n SSEStatsData,\n WalletFavoriteData,\n CreateFavoriteRequest,\n FavoriteCountsFilters,\n PaginationMeta,\n} from '@sudobility/heavymath_types';\n\n// ============================================================================\n// Type Aliases for Backward Compatibility\n// ============================================================================\n\n// These aliases map old type names to new ones from @sudobility/heavymath_types\n// This maintains backward compatibility with existing code using the old names\n\nimport type {\n MarketData,\n PredictionData,\n DealerNftData,\n DealerPermissionData,\n FeeWithdrawalData,\n OracleRequestData,\n MarketStateHistoryData,\n MarketStatsData,\n HealthData,\n} from '@sudobility/heavymath_types';\n\n/** @deprecated Use MarketData instead */\nexport type Market = MarketData;\n\n/** @deprecated Use PredictionData instead */\nexport type Prediction = PredictionData;\n\n/** @deprecated Use DealerNftData instead */\nexport type DealerNFT = DealerNftData;\n\n/** @deprecated Use DealerPermissionData instead */\nexport type DealerPermission = DealerPermissionData;\n\n/** @deprecated Use FeeWithdrawalData instead */\nexport type FeeWithdrawal = FeeWithdrawalData;\n\n/** @deprecated Use OracleRequestData instead */\nexport type OracleRequest = OracleRequestData;\n\n/** @deprecated Use MarketStateHistoryData instead */\nexport type StateHistory = MarketStateHistoryData;\n\n/** @deprecated Use MarketStatsData instead */\nexport type MarketStats = MarketStatsData;\n\n/** @deprecated Use HealthData instead */\nexport type HealthStatus = HealthData;\n\n// ============================================================================\n// Client-specific Types (not in shared packages)\n// ============================================================================\n\n/**\n * Query parameters for the markets endpoint (GET /api/markets).\n */\nexport interface MarketFilters {\n /** Filter by market status. Accepts 'Active', 'Resolved', 'Cancelled', or 'Abandoned'. */\n status?: import('@sudobility/heavymath_types').MarketStatus;\n /** Filter by dealer address (the wallet that created the market). */\n dealer?: string;\n /** Filter by market category string (e.g., 'sports', 'crypto'). */\n category?: string;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n/**\n * Query parameters for the predictions endpoint (GET /api/predictions).\n */\nexport interface PredictionFilters {\n /** Filter by predictor wallet address. */\n user?: string;\n /** Filter by chain-prefixed market ID (e.g., '1-market-123'). */\n market?: string;\n /** Filter by claim status. `true` for claimed predictions, `false` for unclaimed. */\n claimed?: boolean;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n/**\n * Query parameters for the dealers endpoint (GET /api/dealers).\n */\nexport interface DealerFilters {\n /** Filter by dealer NFT owner wallet address. */\n owner?: string;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n/**\n * Query parameters for the withdrawals endpoint (GET /api/withdrawals).\n */\nexport interface WithdrawalFilters {\n /** Filter by withdrawer wallet address. */\n withdrawer?: string;\n /** Filter by withdrawal type. Accepts 'dealer' or 'system'. */\n type?: import('@sudobility/heavymath_types').WithdrawalType;\n /** Filter by chain-prefixed market ID. */\n market?: string;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n/**\n * Query parameters for the oracle requests endpoint (GET /api/oracle/requests).\n */\nexport interface OracleFilters {\n /** Filter by chain-prefixed market ID. */\n market?: string;\n /** Filter by timeout status. `true` for timed-out requests, `false` for pending. */\n timedOut?: boolean;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n/**\n * Query parameters for the wallet favorites endpoint (GET /api/wallet/:address/favorites).\n */\nexport interface WalletFavoritesFilters {\n /** Filter by favorite category (e.g., 'sports', 'crypto'). */\n category?: string;\n /** Filter by favorite subcategory (e.g., 'soccer', 'bitcoin'). */\n subcategory?: string;\n /** Filter by favorite item type (e.g., 'team', 'market'). */\n type?: string;\n /** Maximum number of results to return. Defaults to 50 on the server. */\n limit?: number;\n /** Number of results to skip for pagination. Defaults to 0. */\n offset?: number;\n}\n\n// FavoriteCountsFilters is re-exported from @sudobility/heavymath_types above\n\n// ============================================================================\n// Oracle Resolution Types (re-exported from @sudobility/heavymath_types)\n// ============================================================================\n\n// Re-export shared oracle types\nexport type {\n SetMarketOracleConfigRequest,\n MarketOracleConfigData,\n MarketResolutionCheckSuccess,\n MarketResolutionCheckError,\n} from '@sudobility/heavymath_types';\n\n// ============================================================================\n// Condition Types (re-exported from @sudobility/heavymath_types)\n// ============================================================================\n\nexport type {\n ConditionTypeValue,\n ScoreTypeValue,\n TeamSideValue,\n ComparisonOperatorValue,\n WinLossCondition,\n MatchScoreCondition,\n TournamentCondition,\n ConditionData,\n} from '@sudobility/heavymath_types';\n\nexport {\n ConditionType,\n ScoreType,\n TeamSide,\n ComparisonOperator,\n encodeConditionData,\n decodeConditionData,\n formatConditionDescription,\n} from '@sudobility/heavymath_types';\n\n// Import for use in the union type below\nimport type {\n MarketResolutionCheckSuccess,\n MarketResolutionCheckError,\n} from '@sudobility/heavymath_types';\n\n/**\n * Union type for the resolve endpoint response.\n * Client-specific discriminated union wrapping the shared response types.\n */\nexport type MarketResolutionCheck =\n | { ok: true; data: MarketResolutionCheckSuccess }\n | { ok: false; error: MarketResolutionCheckError };\n\n// ============================================================================\n// Server-Sent Events (SSE) Types\n// ============================================================================\n\n/**\n * SSE subscription channels\n */\nexport type SubscriptionChannel = 'markets' | 'market' | 'predictions' | 'dealers' | 'oracle';\n\n/**\n * SSE event types\n */\nexport type SSEEventType =\n | 'MarketCreated'\n | 'MarketResolved'\n | 'MarketCancelled'\n | 'MarketAbandoned'\n | 'PredictionPlaced'\n | 'PredictionUpdated'\n | 'WinningsClaimed'\n | 'RefundClaimed'\n | 'DealerFeeSet'\n | 'DealerFeesWithdrawn'\n | 'LicenseIssued'\n | 'LicenseTransferred'\n | 'PermissionsSet'\n | 'OracleRegistered'\n | 'OracleDataUpdated';\n\n/**\n * SSE subscription filters\n */\nexport interface SSEFilters {\n marketId?: string;\n dealer?: string;\n user?: string;\n category?: string;\n}\n\n/**\n * SSE connection message\n */\nexport interface SSEConnectedMessage {\n type: 'connected';\n clientId: string;\n subscriptionId: string;\n channel: SubscriptionChannel;\n timestamp: number;\n}\n\n/**\n * SSE data update message\n */\nexport interface SSEDataUpdateMessage {\n type: 'data_update';\n subscriptionId: string;\n eventType: SSEEventType;\n data: unknown;\n timestamp: number;\n}\n\n/**\n * SSE heartbeat message\n */\nexport interface SSEHeartbeatMessage {\n type: 'heartbeat';\n timestamp: number;\n}\n\n/**\n * SSE subscription confirmed message\n */\nexport interface SSESubscriptionConfirmedMessage {\n type: 'subscription_confirmed';\n subscriptionId: string;\n channel: SubscriptionChannel;\n}\n\n/**\n * Union of all SSE message types\n */\nexport type SSEMessage =\n | SSEConnectedMessage\n | SSEDataUpdateMessage\n | SSEHeartbeatMessage\n | SSESubscriptionConfirmedMessage;\n\n/**\n * SSE connection state\n */\nexport type SSEConnectionState = 'connecting' | 'connected' | 'disconnected' | 'error';\n\n// ============================================================================\n// Sports API Proxy Types\n// ============================================================================\n\nexport * from './types/sports';\n\n/**\n * Market created event data\n */\nexport interface MarketCreatedEventData {\n marketId: string;\n dealer: string;\n category: string;\n chainId: number;\n}\n\n/**\n * Market resolved event data\n */\nexport interface MarketResolvedEventData {\n marketId: string;\n resolution: string;\n equilibrium: string;\n chainId: number;\n}\n\n/**\n * Prediction placed event data\n */\nexport interface PredictionPlacedEventData {\n marketId: string;\n predictor: string;\n amount: string;\n percentage: string;\n chainId: number;\n}\n\n/**\n * Prediction updated event data\n */\nexport interface PredictionUpdatedEventData {\n marketId: string;\n predictor: string;\n newAmount: string;\n newPercentage: string;\n chainId: number;\n}\n\n/**\n * Winnings/refund claimed event data\n */\nexport interface ClaimEventData {\n marketId: string;\n predictor: string;\n amount: string;\n chainId: number;\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sudobility/heavymath_indexer_client",
3
- "version": "0.0.34",
3
+ "version": "0.0.35",
4
4
  "description": "React and React Native compatible client library for Heavymath prediction market indexer API with TypeScript support",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -42,14 +42,14 @@
42
42
  "author": "John Huang",
43
43
  "license": "BUSL-1.1",
44
44
  "peerDependencies": {
45
- "@sudobility/heavymath_types": "^0.0.19",
45
+ "@sudobility/heavymath_types": "^0.0.20",
46
46
  "@sudobility/types": "^1.9.61",
47
47
  "@tanstack/react-query": ">=5.0.0",
48
48
  "react": ">=18.0.0",
49
49
  "zustand": "^5.0.0"
50
50
  },
51
51
  "devDependencies": {
52
- "@sudobility/heavymath_types": "^0.0.19",
52
+ "@sudobility/heavymath_types": "^0.0.20",
53
53
  "@sudobility/types": "^1.9.61",
54
54
  "@tanstack/react-query": "^5.90.5",
55
55
  "@testing-library/dom": "^10.4.1",