@sudobility/heavymath_types 0.0.1

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.cjs ADDED
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * @heavymath/types
4
+ *
5
+ * Comprehensive TypeScript types, interfaces, and utilities
6
+ * for Heavymath prediction market applications.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ // Re-export all types from the types directory
26
+ __exportStar(require("./types"), exports);
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,10 @@
1
+ /**
2
+ * @heavymath/types
3
+ *
4
+ * Comprehensive TypeScript types, interfaces, and utilities
5
+ * for Heavymath prediction market applications.
6
+ *
7
+ * @packageDocumentation
8
+ */
9
+ export * from './types';
10
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,SAAS,CAAC"}
package/dist/index.js ADDED
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+ /**
3
+ * @heavymath/types
4
+ *
5
+ * Comprehensive TypeScript types, interfaces, and utilities
6
+ * for Heavymath prediction market applications.
7
+ *
8
+ * @packageDocumentation
9
+ */
10
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
11
+ if (k2 === undefined) k2 = k;
12
+ var desc = Object.getOwnPropertyDescriptor(m, k);
13
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
14
+ desc = { enumerable: true, get: function() { return m[k]; } };
15
+ }
16
+ Object.defineProperty(o, k2, desc);
17
+ }) : (function(o, m, k, k2) {
18
+ if (k2 === undefined) k2 = k;
19
+ o[k2] = m[k];
20
+ }));
21
+ var __exportStar = (this && this.__exportStar) || function(m, exports) {
22
+ for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p);
23
+ };
24
+ Object.defineProperty(exports, "__esModule", { value: true });
25
+ // Re-export all types from the types directory
26
+ __exportStar(require("./types"), exports);
27
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG;;;;;;;;;;;;;;;;AAEH,+CAA+C;AAC/C,0CAAwB"}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview API Type Definitions for Heavymath Indexer
4
+ * @description Centralized type definitions for API requests/responses
5
+ * @version 1.0.0
6
+ *
7
+ * Note: API responses use ApiResponse from @sudobility/types
8
+ * This file defines the data payload types used within those responses
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1,164 @@
1
+ /**
2
+ * @fileoverview API Type Definitions for Heavymath Indexer
3
+ * @description Centralized type definitions for API requests/responses
4
+ * @version 1.0.0
5
+ *
6
+ * Note: API responses use ApiResponse from @sudobility/types
7
+ * This file defines the data payload types used within those responses
8
+ */
9
+ import { Optional } from './common';
10
+ import { MarketStatus, WithdrawalType, WalletFavoriteEntity } from './entities';
11
+ /**
12
+ * Market data returned by API endpoints
13
+ */
14
+ export interface MarketData {
15
+ id: string;
16
+ chainId: number;
17
+ marketId: string;
18
+ dealerNftTokenId: string;
19
+ dealerAddress: string;
20
+ title: string;
21
+ description: Optional<string>;
22
+ category: string;
23
+ status: MarketStatus;
24
+ outcome: Optional<string>;
25
+ createdAt: string;
26
+ resolvedAt: Optional<string>;
27
+ blockNumber: string;
28
+ transactionHash: string;
29
+ }
30
+ /**
31
+ * Prediction data returned by API endpoints
32
+ */
33
+ export interface PredictionData {
34
+ id: string;
35
+ chainId: number;
36
+ marketId: string;
37
+ userAddress: string;
38
+ amount: string;
39
+ percentage: number;
40
+ outcome: string;
41
+ hasClaimed: boolean;
42
+ claimedAmount: Optional<string>;
43
+ createdAt: string;
44
+ updatedAt: string;
45
+ lastBlockNumber: string;
46
+ lastTransactionHash: string;
47
+ }
48
+ /**
49
+ * Dealer NFT data returned by API endpoints
50
+ */
51
+ export interface DealerNftData {
52
+ id: string;
53
+ chainId: number;
54
+ tokenId: string;
55
+ ownerAddress: string;
56
+ mintedAt: string;
57
+ mintBlockNumber: string;
58
+ mintTransactionHash: string;
59
+ lastTransferAt: Optional<string>;
60
+ lastTransferBlockNumber: Optional<string>;
61
+ lastTransferTransactionHash: Optional<string>;
62
+ }
63
+ /**
64
+ * Dealer permission data returned by API endpoints
65
+ */
66
+ export interface DealerPermissionData {
67
+ id: string;
68
+ chainId: number;
69
+ tokenId: string;
70
+ category: number;
71
+ subCategory: number;
72
+ grantedAt: string;
73
+ blockNumber: string;
74
+ transactionHash: string;
75
+ }
76
+ /**
77
+ * Fee withdrawal data returned by API endpoints
78
+ */
79
+ export interface FeeWithdrawalData {
80
+ id: string;
81
+ chainId: number;
82
+ marketId: Optional<string>;
83
+ withdrawerAddress: string;
84
+ withdrawalType: WithdrawalType;
85
+ amount: string;
86
+ withdrawnAt: string;
87
+ blockNumber: string;
88
+ transactionHash: string;
89
+ }
90
+ /**
91
+ * Oracle request data returned by API endpoints
92
+ */
93
+ export interface OracleRequestData {
94
+ id: string;
95
+ chainId: number;
96
+ marketId: string;
97
+ requestId: string;
98
+ requestedAt: string;
99
+ requestBlockNumber: string;
100
+ requestTransactionHash: string;
101
+ respondedAt: Optional<string>;
102
+ responseBlockNumber: Optional<string>;
103
+ responseTransactionHash: Optional<string>;
104
+ result: Optional<boolean>;
105
+ timedOut: boolean;
106
+ }
107
+ /**
108
+ * Market state history data returned by API endpoints
109
+ */
110
+ export interface MarketStateHistoryData {
111
+ id: string;
112
+ chainId: number;
113
+ marketId: string;
114
+ fromState: Optional<string>;
115
+ toState: string;
116
+ changedAt: string;
117
+ blockNumber: string;
118
+ transactionHash: string;
119
+ reason: Optional<string>;
120
+ }
121
+ /**
122
+ * Market statistics data returned by API endpoints
123
+ */
124
+ export interface MarketStatsData {
125
+ total: number;
126
+ byStatus: Record<string, number>;
127
+ byCategory: Record<string, number>;
128
+ }
129
+ /**
130
+ * Health check data returned by API endpoints
131
+ */
132
+ export interface HealthData {
133
+ status: 'healthy' | 'unhealthy';
134
+ timestamp: number;
135
+ }
136
+ /**
137
+ * SSE connection statistics data
138
+ */
139
+ export interface SSEStatsData {
140
+ clients: number;
141
+ subscriptions: number;
142
+ }
143
+ /**
144
+ * Wallet favorite data (same as entity for API use)
145
+ */
146
+ export type WalletFavoriteData = WalletFavoriteEntity;
147
+ /**
148
+ * Request body for creating a wallet favorite
149
+ */
150
+ export interface CreateFavoriteRequest {
151
+ category: string;
152
+ subcategory: string;
153
+ type: string;
154
+ id: string;
155
+ }
156
+ /**
157
+ * Pagination metadata
158
+ */
159
+ export interface PaginationMeta {
160
+ count: number;
161
+ limit: number;
162
+ offset: number;
163
+ }
164
+ //# sourceMappingURL=api.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CAAC;AACpC,OAAO,EACL,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,0 +1,11 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview API Type Definitions for Heavymath Indexer
4
+ * @description Centralized type definitions for API requests/responses
5
+ * @version 1.0.0
6
+ *
7
+ * Note: API responses use ApiResponse from @sudobility/types
8
+ * This file defines the data payload types used within those responses
9
+ */
10
+ Object.defineProperty(exports, "__esModule", { value: true });
11
+ //# sourceMappingURL=api.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"api.js","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":";AAAA;;;;;;;GAOG"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Common utility types used throughout the Heavymath application
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Common utility types used throughout the Heavymath application
3
+ */
4
+ /**
5
+ * Utility type for values that can be T, undefined, or null
6
+ * Provides a more semantic way to represent optional/nullable values
7
+ */
8
+ export type Optional<T> = T | undefined | null;
9
+ /**
10
+ * Chain-Prefixed ID
11
+ * Format: "{chainId}-{identifier}"
12
+ * Used for creating unique IDs across multiple chains
13
+ */
14
+ export type ChainPrefixedId = `${number}-${string}`;
15
+ /**
16
+ * Composite ID for Predictions
17
+ * Format: "{chainId}-{marketId}-{predictorAddress}"
18
+ */
19
+ export type PredictionId = `${number}-${string}-${string}`;
20
+ /**
21
+ * Transaction-Log ID
22
+ * Format: "{transactionHash}-{logIndex}"
23
+ * Used for unique identification of log entries
24
+ */
25
+ export type TxLogId = `${string}-${bigint}`;
26
+ //# sourceMappingURL=common.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.d.ts","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;GAGG;AACH,MAAM,MAAM,QAAQ,CAAC,CAAC,IAAI,CAAC,GAAG,SAAS,GAAG,IAAI,CAAC;AAE/C;;;;GAIG;AACH,MAAM,MAAM,eAAe,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC;AAEpD;;;GAGG;AACH,MAAM,MAAM,YAAY,GAAG,GAAG,MAAM,IAAI,MAAM,IAAI,MAAM,EAAE,CAAC;AAE3D;;;;GAIG;AACH,MAAM,MAAM,OAAO,GAAG,GAAG,MAAM,IAAI,MAAM,EAAE,CAAC"}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+ /**
3
+ * Common utility types used throughout the Heavymath application
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ //# sourceMappingURL=common.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"common.js","sourceRoot":"","sources":["../../src/types/common.ts"],"names":[],"mappings":";AAAA;;GAEG"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Database Entity Type Definitions
4
+ * @description Centralized type definitions for all database entities
5
+ * @version 1.0.0
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ //# sourceMappingURL=entities.js.map
@@ -0,0 +1,184 @@
1
+ /**
2
+ * @fileoverview Database Entity Type Definitions
3
+ * @description Centralized type definitions for all database entities
4
+ * @version 1.0.0
5
+ */
6
+ import { Optional } from './common';
7
+ /**
8
+ * Market Status Enum
9
+ * Possible states of a prediction market
10
+ */
11
+ export type MarketStatus = 'Active' | 'Cancelled' | 'Resolved' | 'Abandoned';
12
+ /**
13
+ * Claim Type Enum
14
+ * Types of claims that can be made
15
+ */
16
+ export type ClaimType = 'winnings' | 'refund';
17
+ /**
18
+ * Withdrawal Type Enum
19
+ * Types of fee withdrawals
20
+ */
21
+ export type WithdrawalType = 'dealer' | 'system';
22
+ /**
23
+ * Market Entity
24
+ * Database representation of a prediction market
25
+ */
26
+ export interface MarketEntity {
27
+ id: string;
28
+ dealer: string;
29
+ tokenId: bigint;
30
+ category: bigint;
31
+ subCategory: bigint;
32
+ deadline: bigint;
33
+ description: string;
34
+ createdAt: bigint;
35
+ dealerFeeBps: bigint;
36
+ status: MarketStatus;
37
+ resolution: Optional<bigint>;
38
+ equilibrium: Optional<bigint>;
39
+ oracleId: Optional<string>;
40
+ chainId: number;
41
+ blockNumber: bigint;
42
+ txHash: string;
43
+ timestamp: bigint;
44
+ }
45
+ /**
46
+ * Prediction Entity
47
+ * Database representation of a user's prediction
48
+ */
49
+ export interface PredictionEntity {
50
+ id: string;
51
+ marketId: string;
52
+ predictor: string;
53
+ amount: bigint;
54
+ percentage: bigint;
55
+ placedAt: bigint;
56
+ claimed: boolean;
57
+ chainId: number;
58
+ blockNumber: bigint;
59
+ txHash: string;
60
+ timestamp: bigint;
61
+ }
62
+ /**
63
+ * Claim Entity
64
+ * Database representation of a claim (winnings or refund)
65
+ */
66
+ export interface ClaimEntity {
67
+ id: string;
68
+ marketId: string;
69
+ claimer: string;
70
+ amount: bigint;
71
+ claimType: ClaimType;
72
+ chainId: number;
73
+ blockNumber: bigint;
74
+ txHash: string;
75
+ timestamp: bigint;
76
+ }
77
+ /**
78
+ * Oracle Entity
79
+ * Database representation of an oracle
80
+ */
81
+ export interface OracleEntity {
82
+ id: string;
83
+ oracleId: string;
84
+ oracleType: string;
85
+ dataSource: Optional<string>;
86
+ minValue: bigint;
87
+ maxValue: bigint;
88
+ chainId: number;
89
+ blockNumber: bigint;
90
+ txHash: string;
91
+ timestamp: bigint;
92
+ }
93
+ /**
94
+ * Dealer NFT Entity
95
+ * Database representation of a dealer license NFT
96
+ */
97
+ export interface DealerNftEntity {
98
+ id: string;
99
+ chainId: number;
100
+ tokenId: bigint;
101
+ ownerAddress: string;
102
+ mintedAt: bigint;
103
+ mintBlockNumber: bigint;
104
+ mintTransactionHash: string;
105
+ lastTransferAt: Optional<bigint>;
106
+ lastTransferBlockNumber: Optional<bigint>;
107
+ lastTransferTransactionHash: Optional<string>;
108
+ }
109
+ /**
110
+ * Dealer Permission Entity
111
+ * Database representation of dealer category/subcategory permissions
112
+ */
113
+ export interface DealerPermissionEntity {
114
+ id: string;
115
+ chainId: number;
116
+ tokenId: bigint;
117
+ category: number;
118
+ subCategory: number;
119
+ grantedAt: bigint;
120
+ blockNumber: bigint;
121
+ transactionHash: string;
122
+ }
123
+ /**
124
+ * Wallet Favorite Entity
125
+ * Database representation of a user's favorite items
126
+ */
127
+ export interface WalletFavoriteEntity {
128
+ id: number;
129
+ walletAddress: string;
130
+ category: string;
131
+ subcategory: string;
132
+ type: string;
133
+ itemId: string;
134
+ createdAt: bigint;
135
+ }
136
+ /**
137
+ * Fee Withdrawal Entity
138
+ * Database representation of fee withdrawals
139
+ */
140
+ export interface FeeWithdrawalEntity {
141
+ id: string;
142
+ chainId: number;
143
+ marketId: Optional<string>;
144
+ withdrawerAddress: string;
145
+ withdrawalType: WithdrawalType;
146
+ amount: bigint;
147
+ withdrawnAt: bigint;
148
+ blockNumber: bigint;
149
+ transactionHash: string;
150
+ }
151
+ /**
152
+ * Oracle Request Entity
153
+ * Database representation of oracle requests
154
+ */
155
+ export interface OracleRequestEntity {
156
+ id: string;
157
+ chainId: number;
158
+ marketId: string;
159
+ requestId: string;
160
+ requestedAt: bigint;
161
+ requestBlockNumber: bigint;
162
+ requestTransactionHash: string;
163
+ respondedAt: Optional<bigint>;
164
+ responseBlockNumber: Optional<bigint>;
165
+ responseTransactionHash: Optional<string>;
166
+ result: Optional<boolean>;
167
+ timedOut: boolean;
168
+ }
169
+ /**
170
+ * Market State History Entity
171
+ * Database representation of market state transitions
172
+ */
173
+ export interface MarketStateHistoryEntity {
174
+ id: string;
175
+ chainId: number;
176
+ marketId: string;
177
+ fromState: Optional<string>;
178
+ toState: string;
179
+ changedAt: bigint;
180
+ blockNumber: bigint;
181
+ transactionHash: string;
182
+ reason: Optional<string>;
183
+ }
184
+ //# sourceMappingURL=entities.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/types/entities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,UAAU,CA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B;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC5B,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC;IACpB,eAAe,EAAE,MAAM,CAAC;IACxB,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC1B"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Database Entity Type Definitions
4
+ * @description Centralized type definitions for all database entities
5
+ * @version 1.0.0
6
+ */
7
+ Object.defineProperty(exports, "__esModule", { value: true });
8
+ //# sourceMappingURL=entities.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"entities.js","sourceRoot":"","sources":["../../src/types/entities.ts"],"names":[],"mappings":";AAAA;;;;GAIG"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Type Definitions for Blockchain Events
4
+ * @description Centralized type definitions for all contract events and their arguments
5
+ * @version 1.0.0
6
+ *
7
+ * This file provides comprehensive type safety for all event handlers,
8
+ * making it easier for AI assistants to understand event structures and
9
+ * provide accurate code suggestions.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.OracleType = void 0;
13
+ // ============================================================================
14
+ // OracleResolver Event Types
15
+ // ============================================================================
16
+ /**
17
+ * Oracle Type Enum
18
+ * Types of oracles supported by the system
19
+ */
20
+ exports.OracleType = {
21
+ Manual: 0,
22
+ PriceFeed: 1,
23
+ CustomData: 2,
24
+ };
25
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1,192 @@
1
+ /**
2
+ * @fileoverview Type Definitions for Blockchain Events
3
+ * @description Centralized type definitions for all contract events and their arguments
4
+ * @version 1.0.0
5
+ *
6
+ * This file provides comprehensive type safety for all event handlers,
7
+ * making it easier for AI assistants to understand event structures and
8
+ * provide accurate code suggestions.
9
+ */
10
+ /**
11
+ * Hex string type (for use when viem is not available)
12
+ */
13
+ export type Hex = `0x${string}`;
14
+ /**
15
+ * Address type (for use when viem is not available)
16
+ */
17
+ export type Address = `0x${string}`;
18
+ /**
19
+ * Base Event Context
20
+ * Common fields available in all events
21
+ */
22
+ export interface BaseEventContext {
23
+ blockNumber: bigint;
24
+ blockTimestamp: bigint;
25
+ transactionHash: Hex;
26
+ logIndex: bigint;
27
+ chainId: number;
28
+ }
29
+ /**
30
+ * MarketCreated Event Arguments
31
+ * Emitted when a new prediction market is created
32
+ */
33
+ export interface MarketCreatedArgs {
34
+ marketId: string;
35
+ dealer: Address;
36
+ tokenId: bigint;
37
+ category: bigint;
38
+ subCategory: bigint;
39
+ deadline: bigint;
40
+ description: string;
41
+ }
42
+ /**
43
+ * PredictionPlaced Event Arguments
44
+ * Emitted when a user places a prediction on a market
45
+ */
46
+ export interface PredictionPlacedArgs {
47
+ marketId: string;
48
+ predictor: Address;
49
+ amount: bigint;
50
+ percentage: bigint;
51
+ }
52
+ /**
53
+ * PredictionUpdated Event Arguments
54
+ * Emitted when a user updates their prediction within the grace period
55
+ */
56
+ export interface PredictionUpdatedArgs {
57
+ marketId: string;
58
+ predictor: Address;
59
+ newAmount: bigint;
60
+ newPercentage: bigint;
61
+ }
62
+ /**
63
+ * MarketResolved Event Arguments
64
+ * Emitted when a market is resolved with a final outcome
65
+ */
66
+ export interface MarketResolvedArgs {
67
+ marketId: string;
68
+ resolution: bigint;
69
+ equilibrium: bigint;
70
+ }
71
+ /**
72
+ * MarketCancelled Event Arguments
73
+ * Emitted when a market is cancelled before resolution
74
+ */
75
+ export interface MarketCancelledArgs {
76
+ marketId: string;
77
+ }
78
+ /**
79
+ * MarketAbandoned Event Arguments
80
+ * Emitted when a market is abandoned due to no resolution
81
+ */
82
+ export interface MarketAbandonedArgs {
83
+ marketId: string;
84
+ }
85
+ /**
86
+ * DealerFeeSet Event Arguments
87
+ * Emitted when a dealer updates their fee for a market
88
+ */
89
+ export interface DealerFeeSetArgs {
90
+ marketId: string;
91
+ feeBps: bigint;
92
+ }
93
+ /**
94
+ * WinningsClaimed Event Arguments
95
+ * Emitted when a winner claims their payout
96
+ */
97
+ export interface WinningsClaimedArgs {
98
+ marketId: string;
99
+ predictor: Address;
100
+ amount: bigint;
101
+ }
102
+ /**
103
+ * RefundClaimed Event Arguments
104
+ * Emitted when a user claims a refund from a cancelled/abandoned market
105
+ */
106
+ export interface RefundClaimedArgs {
107
+ marketId: string;
108
+ predictor: Address;
109
+ amount: bigint;
110
+ }
111
+ /**
112
+ * DealerFeesWithdrawn Event Arguments
113
+ * Emitted when a dealer withdraws accumulated fees
114
+ */
115
+ export interface DealerFeesWithdrawnArgs {
116
+ marketId: string;
117
+ dealer: Address;
118
+ amount: bigint;
119
+ }
120
+ /**
121
+ * SystemFeesWithdrawn Event Arguments
122
+ * Emitted when system fees are withdrawn to treasury
123
+ */
124
+ export interface SystemFeesWithdrawnArgs {
125
+ recipient: Address;
126
+ amount: bigint;
127
+ }
128
+ /**
129
+ * LicenseIssued Event Arguments
130
+ * Emitted when a new dealer license NFT is minted
131
+ */
132
+ export interface LicenseIssuedArgs {
133
+ tokenId: bigint;
134
+ dealer: Address;
135
+ }
136
+ /**
137
+ * PermissionsSet Event Arguments
138
+ * Emitted when permissions are set for a dealer license
139
+ */
140
+ export interface PermissionsSetArgs {
141
+ tokenId: bigint;
142
+ category: bigint;
143
+ subCategories: readonly bigint[];
144
+ }
145
+ /**
146
+ * LicenseTransferred Event Arguments
147
+ * Emitted when a dealer license is transferred
148
+ */
149
+ export interface LicenseTransferredArgs {
150
+ tokenId: bigint;
151
+ from: Address;
152
+ to: Address;
153
+ }
154
+ /**
155
+ * Oracle Type Enum
156
+ * Types of oracles supported by the system
157
+ */
158
+ export declare const OracleType: {
159
+ readonly Manual: 0;
160
+ readonly PriceFeed: 1;
161
+ readonly CustomData: 2;
162
+ };
163
+ export type OracleTypeValue = (typeof OracleType)[keyof typeof OracleType];
164
+ /**
165
+ * OracleRegistered Event Arguments
166
+ * Emitted when a new oracle is registered
167
+ */
168
+ export interface OracleRegisteredArgs {
169
+ oracleId: string;
170
+ oracleType: number;
171
+ dataSource: Address;
172
+ minValue: bigint;
173
+ maxValue: bigint;
174
+ }
175
+ /**
176
+ * OracleDataUpdated Event Arguments
177
+ * Emitted when oracle data is updated
178
+ */
179
+ export interface OracleDataUpdatedArgs {
180
+ oracleId: string;
181
+ value: bigint;
182
+ percentage: bigint;
183
+ }
184
+ /**
185
+ * UpdaterAuthorized Event Arguments
186
+ * Emitted when an oracle updater's authorization changes
187
+ */
188
+ export interface UpdaterAuthorizedArgs {
189
+ updater: Address;
190
+ authorized: boolean;
191
+ }
192
+ //# sourceMappingURL=events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH;;GAEG;AACH,MAAM,MAAM,GAAG,GAAG,KAAK,MAAM,EAAE,CAAC;AAEhC;;GAEG;AACH,MAAM,MAAM,OAAO,GAAG,KAAK,MAAM,EAAE,CAAC;AAEpC;;;GAGG;AACH,MAAM,WAAW,gBAAgB;IAC/B,WAAW,EAAE,MAAM,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,GAAG,CAAC;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,OAAO,EAAE,MAAM,CAAC;CACjB;AAMD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,OAAO,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,WAAW,EAAE,MAAM,CAAC;CACrB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;CAChB;AAMD;;;GAGG;AACH,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IACjC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,aAAa,EAAE,SAAS,MAAM,EAAE,CAAC;CAClC;AAED;;;GAGG;AACH,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,EAAE,EAAE,OAAO,CAAC;CACb;AAMD;;;GAGG;AACH,eAAO,MAAM,UAAU;;;;CAIb,CAAC;AAEX,MAAM,MAAM,eAAe,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,OAAO,UAAU,CAAC,CAAC;AAE3E;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,QAAQ,EAAE,MAAM,CAAC;IACjB,UAAU,EAAE,MAAM,CAAC;IACnB,UAAU,EAAE,OAAO,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;IACjB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,MAAM,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,MAAM,CAAC;CACpB;AAED;;;GAGG;AACH,MAAM,WAAW,qBAAqB;IACpC,OAAO,EAAE,OAAO,CAAC;IACjB,UAAU,EAAE,OAAO,CAAC;CACrB"}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Type Definitions for Blockchain Events
4
+ * @description Centralized type definitions for all contract events and their arguments
5
+ * @version 1.0.0
6
+ *
7
+ * This file provides comprehensive type safety for all event handlers,
8
+ * making it easier for AI assistants to understand event structures and
9
+ * provide accurate code suggestions.
10
+ */
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.OracleType = void 0;
13
+ // ============================================================================
14
+ // OracleResolver Event Types
15
+ // ============================================================================
16
+ /**
17
+ * Oracle Type Enum
18
+ * Types of oracles supported by the system
19
+ */
20
+ exports.OracleType = {
21
+ Manual: 0,
22
+ PriceFeed: 1,
23
+ CustomData: 2,
24
+ };
25
+ //# sourceMappingURL=events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"events.js","sourceRoot":"","sources":["../../src/types/events.ts"],"names":[],"mappings":";AAAA;;;;;;;;GAQG;;;AA2KH,+EAA+E;AAC/E,6BAA6B;AAC7B,+EAA+E;AAE/E;;;GAGG;AACU,QAAA,UAAU,GAAG;IACxB,MAAM,EAAE,CAAC;IACT,SAAS,EAAE,CAAC;IACZ,UAAU,EAAE,CAAC;CACL,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Type exports for @heavymath/types
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.OracleType = void 0;
7
+ // Export const values separately
8
+ var events_1 = require("./events");
9
+ Object.defineProperty(exports, "OracleType", { enumerable: true, get: function () { return events_1.OracleType; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1,9 @@
1
+ /**
2
+ * @fileoverview Type exports for @heavymath/types
3
+ */
4
+ export type { Optional, ChainPrefixedId, PredictionId, TxLogId, } from './common';
5
+ export type { Hex, Address, BaseEventContext, MarketCreatedArgs, PredictionPlacedArgs, PredictionUpdatedArgs, MarketResolvedArgs, MarketCancelledArgs, MarketAbandonedArgs, DealerFeeSetArgs, WinningsClaimedArgs, RefundClaimedArgs, DealerFeesWithdrawnArgs, SystemFeesWithdrawnArgs, LicenseIssuedArgs, PermissionsSetArgs, LicenseTransferredArgs, OracleTypeValue, OracleRegisteredArgs, OracleDataUpdatedArgs, UpdaterAuthorizedArgs, } from './events';
6
+ export { OracleType } from './events';
7
+ export type { MarketStatus, ClaimType, WithdrawalType, MarketEntity, PredictionEntity, ClaimEntity, OracleEntity, DealerNftEntity, DealerPermissionEntity, WalletFavoriteEntity, FeeWithdrawalEntity, OracleRequestEntity, MarketStateHistoryEntity, } from './entities';
8
+ export type { MarketData, PredictionData, DealerNftData, DealerPermissionData, FeeWithdrawalData, OracleRequestData, MarketStateHistoryData, MarketStatsData, HealthData, SSEStatsData, WalletFavoriteData, CreateFavoriteRequest, PaginationMeta, } from './api';
9
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,YAAY,EACV,QAAQ,EACR,eAAe,EACf,YAAY,EACZ,OAAO,GACR,MAAM,UAAU,CAAC;AAGlB,YAAY,EACV,GAAG,EACH,OAAO,EACP,gBAAgB,EAChB,iBAAiB,EACjB,oBAAoB,EACpB,qBAAqB,EACrB,kBAAkB,EAClB,mBAAmB,EACnB,mBAAmB,EACnB,gBAAgB,EAChB,mBAAmB,EACnB,iBAAiB,EACjB,uBAAuB,EACvB,uBAAuB,EACvB,iBAAiB,EACjB,kBAAkB,EAClB,sBAAsB,EACtB,eAAe,EACf,oBAAoB,EACpB,qBAAqB,EACrB,qBAAqB,GACtB,MAAM,UAAU,CAAC;AAGlB,OAAO,EAAE,UAAU,EAAE,MAAM,UAAU,CAAC;AAGtC,YAAY,EACV,YAAY,EACZ,SAAS,EACT,cAAc,EACd,YAAY,EACZ,gBAAgB,EAChB,WAAW,EACX,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,oBAAoB,EACpB,mBAAmB,EACnB,mBAAmB,EACnB,wBAAwB,GACzB,MAAM,YAAY,CAAC;AAGpB,YAAY,EACV,UAAU,EACV,cAAc,EACd,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,iBAAiB,EACjB,sBAAsB,EACtB,eAAe,EACf,UAAU,EACV,YAAY,EACZ,kBAAkB,EAClB,qBAAqB,EACrB,cAAc,GACf,MAAM,OAAO,CAAC"}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+ /**
3
+ * @fileoverview Type exports for @heavymath/types
4
+ */
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.OracleType = void 0;
7
+ // Export const values separately
8
+ var events_1 = require("./events");
9
+ Object.defineProperty(exports, "OracleType", { enumerable: true, get: function () { return events_1.OracleType; } });
10
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":";AAAA;;GAEG;;;AAmCH,iCAAiC;AACjC,mCAAsC;AAA7B,oGAAA,UAAU,OAAA"}
package/package.json ADDED
@@ -0,0 +1,87 @@
1
+ {
2
+ "name": "@sudobility/heavymath_types",
3
+ "version": "0.0.1",
4
+ "description": "Comprehensive TypeScript types, interfaces, and utilities for Heavymath prediction market applications",
5
+ "main": "./dist/index.cjs",
6
+ "module": "./dist/index.js",
7
+ "types": "./dist/index.d.ts",
8
+ "exports": {
9
+ ".": {
10
+ "types": "./dist/index.d.ts",
11
+ "import": "./dist/index.js",
12
+ "require": "./dist/index.cjs"
13
+ },
14
+ "./api": {
15
+ "types": "./dist/types/api.d.ts",
16
+ "import": "./dist/types/api.js",
17
+ "require": "./dist/types/api.cjs"
18
+ },
19
+ "./events": {
20
+ "types": "./dist/types/events.d.ts",
21
+ "import": "./dist/types/events.js",
22
+ "require": "./dist/types/events.cjs"
23
+ },
24
+ "./entities": {
25
+ "types": "./dist/types/entities.d.ts",
26
+ "import": "./dist/types/entities.js",
27
+ "require": "./dist/types/entities.cjs"
28
+ }
29
+ },
30
+ "scripts": {
31
+ "build": "npm run build:esm && npm run build:cjs",
32
+ "build:esm": "tsc -p tsconfig.esm.json",
33
+ "build:cjs": "tsc -p tsconfig.cjs.json && npm run build:cjs-rename",
34
+ "build:cjs-rename": "find dist -name '*.js' -not -name '*.cjs' -exec sh -c 'cp \"$1\" \"${1%.js}.cjs\"' _ {} \\;",
35
+ "clean": "rimraf dist",
36
+ "dev": "tsc --watch",
37
+ "test": "vitest run",
38
+ "test:watch": "vitest --watch",
39
+ "test:coverage": "vitest --coverage",
40
+ "lint": "eslint src --ext .ts",
41
+ "lint:fix": "eslint src --ext .ts --fix",
42
+ "format": "prettier --write \"src/**/*.{ts,js,json,md}\"",
43
+ "format:check": "prettier --check \"src/**/*.{ts,js,json,md}\"",
44
+ "typecheck": "tsc --noEmit",
45
+ "verify": "npm run typecheck && npm run lint && npm run test && npm run build",
46
+ "prepublishOnly": "npm run clean && npm run verify"
47
+ },
48
+ "files": [
49
+ "dist/**/*",
50
+ "README.md"
51
+ ],
52
+ "keywords": [
53
+ "typescript",
54
+ "types",
55
+ "interfaces",
56
+ "prediction-market",
57
+ "blockchain",
58
+ "heavymath",
59
+ "tree-shakeable",
60
+ "zero-dependencies"
61
+ ],
62
+ "author": "Heavymath",
63
+ "license": "MIT",
64
+ "devDependencies": {
65
+ "@eslint/js": "^9.38.0",
66
+ "@types/node": "^24.9.1",
67
+ "@typescript-eslint/eslint-plugin": "^8.46.2",
68
+ "@typescript-eslint/parser": "^8.46.2",
69
+ "eslint": "^9.38.0",
70
+ "globals": "^16.4.0",
71
+ "prettier": "^3.6.2",
72
+ "rimraf": "^6.0.1",
73
+ "typescript": "^5.9.3",
74
+ "vitest": "^4.0.15"
75
+ },
76
+ "peerDependencies": {
77
+ "viem": "^2.0.0"
78
+ },
79
+ "peerDependenciesMeta": {
80
+ "viem": {
81
+ "optional": true
82
+ }
83
+ },
84
+ "publishConfig": {
85
+ "access": "public"
86
+ }
87
+ }