@sudobility/heavymath_types 0.0.9 → 0.0.11
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/README.md +77 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/types/api.d.ts +2 -2
- package/dist/types/api.d.ts.map +1 -1
- package/dist/types/entities.d.ts +1 -1
- package/dist/types/entities.d.ts.map +1 -1
- package/dist/types/index.d.ts +7 -7
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js +3 -3
- package/dist/types/index.js.map +1 -1
- package/package.json +5 -9
- package/dist/api.cjs +0 -11
- package/dist/common.cjs +0 -95
- package/dist/entities.cjs +0 -65
- package/dist/events.cjs +0 -25
- package/dist/index.cjs +0 -27
package/README.md
ADDED
|
@@ -0,0 +1,77 @@
|
|
|
1
|
+
# @sudobility/heavymath_types
|
|
2
|
+
|
|
3
|
+
Zero-dependency TypeScript types for the Heavymath prediction market platform.
|
|
4
|
+
|
|
5
|
+
## Installation
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
bun add @sudobility/heavymath_types
|
|
9
|
+
```
|
|
10
|
+
|
|
11
|
+
## Usage
|
|
12
|
+
|
|
13
|
+
```typescript
|
|
14
|
+
import type {
|
|
15
|
+
MarketEntity, PredictionEntity, ClaimEntity,
|
|
16
|
+
MarketData, PredictionData, DealerNftData,
|
|
17
|
+
MarketStatus, ClaimType, WithdrawalType,
|
|
18
|
+
} from '@sudobility/heavymath_types';
|
|
19
|
+
|
|
20
|
+
import { OracleType } from '@sudobility/heavymath_types';
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Types
|
|
24
|
+
|
|
25
|
+
### Entity Types (`entities.ts`)
|
|
26
|
+
|
|
27
|
+
Database-level types using `bigint` fields:
|
|
28
|
+
|
|
29
|
+
- `MarketEntity`, `PredictionEntity`, `ClaimEntity`
|
|
30
|
+
- `OracleEntity`, `DealerNftEntity`, `DealerPermissionEntity`
|
|
31
|
+
- `WalletFavoriteEntity`, `FeeWithdrawalEntity`, `OracleRequestEntity`
|
|
32
|
+
- `MarketStateHistoryEntity`
|
|
33
|
+
|
|
34
|
+
**Enums:** `MarketStatus` (Active/Cancelled/Resolved/Abandoned), `ClaimType` (winnings/refund), `WithdrawalType` (dealer/system)
|
|
35
|
+
|
|
36
|
+
### API Types (`api.ts`)
|
|
37
|
+
|
|
38
|
+
Serialized types for API responses (strings instead of bigints):
|
|
39
|
+
|
|
40
|
+
- `MarketData`, `PredictionData`, `DealerNftData`, `DealerPermissionData`
|
|
41
|
+
- `FeeWithdrawalData`, `OracleRequestData`, `MarketStateHistoryData`
|
|
42
|
+
- `MarketStatsData`, `HealthData`, `SSEStatsData`
|
|
43
|
+
- `WalletFavoriteData`, `CreateFavoriteRequest`, `PaginationMeta`
|
|
44
|
+
|
|
45
|
+
### Event Types (`events.ts`)
|
|
46
|
+
|
|
47
|
+
Blockchain event argument interfaces for PredictionMarket, DealerNFT, and OracleResolver contracts. Includes `OracleType` constant (`Manual: 0`, `PriceFeed: 1`, `CustomData: 2`).
|
|
48
|
+
|
|
49
|
+
### Common Types (`common.ts`)
|
|
50
|
+
|
|
51
|
+
- `Optional<T>`, `ChainPrefixedId`, `PredictionId`, `TxLogId`
|
|
52
|
+
|
|
53
|
+
### Key Distinction
|
|
54
|
+
|
|
55
|
+
- **Entity types** use `bigint` -- for indexer/database code
|
|
56
|
+
- **Data types** use `string` -- for API responses and client code
|
|
57
|
+
|
|
58
|
+
## Development
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
bun run build # Build ESM + CJS to dist/
|
|
62
|
+
bun run test # Run Vitest
|
|
63
|
+
bun run typecheck # TypeScript validation
|
|
64
|
+
bun run lint # ESLint check
|
|
65
|
+
bun run verify # Typecheck + lint + build
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Related Packages
|
|
69
|
+
|
|
70
|
+
- `@sudobility/heavymath_contracts` -- smart contracts and TypeScript SDK
|
|
71
|
+
- `@sudobility/heavymath_indexer_client` -- indexer API client
|
|
72
|
+
- `@sudobility/heavymath_lib` -- business logic hooks
|
|
73
|
+
- `heavymath_app` -- frontend web application
|
|
74
|
+
|
|
75
|
+
## License
|
|
76
|
+
|
|
77
|
+
BUSL-1.1
|
package/dist/index.d.ts
CHANGED
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAGH,cAAc,kBAAkB,CAAC"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+CAA+C;AAC/C,cAAc,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,+CAA+C;AAC/C,cAAc,kBAAkB,CAAC"}
|
package/dist/types/api.d.ts
CHANGED
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* Note: API responses use ApiResponse from @sudobility/types
|
|
7
7
|
* This file defines the data payload types used within those responses
|
|
8
8
|
*/
|
|
9
|
-
import { Optional } from './common';
|
|
10
|
-
import { MarketStatus, WithdrawalType, WalletFavoriteEntity } from './entities';
|
|
9
|
+
import { Optional } from './common.js';
|
|
10
|
+
import { MarketStatus, WithdrawalType, WalletFavoriteEntity } from './entities.js';
|
|
11
11
|
/**
|
|
12
12
|
* Market data returned by API endpoints.
|
|
13
13
|
* Serialised form of {@link import('./entities').MarketEntity} where `bigint`
|
package/dist/types/api.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"api.d.ts","sourceRoot":"","sources":["../../src/types/api.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EACL,YAAY,EACZ,cAAc,EACd,oBAAoB,EACrB,MAAM,eAAe,CAAC;AAMvB;;;;GAIG;AACH,MAAM,WAAW,UAAU;IACzB,gFAAgF;IAChF,EAAE,EAAE,MAAM,CAAC;IACX,2EAA2E;IAC3E,OAAO,EAAE,MAAM,CAAC;IAChB,iCAAiC;IACjC,QAAQ,EAAE,MAAM,CAAC;IACjB,kFAAkF;IAClF,gBAAgB,EAAE,MAAM,CAAC;IACzB,4DAA4D;IAC5D,aAAa,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,KAAK,EAAE,MAAM,CAAC;IACd,sEAAsE;IACtE,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC9B,+DAA+D;IAC/D,QAAQ,EAAE,MAAM,CAAC;IACjB,mCAAmC;IACnC,MAAM,EAAE,YAAY,CAAC;IACrB;;;OAGG;IACH,OAAO,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1B,qDAAqD;IACrD,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,UAAU,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC7B,6EAA6E;IAC7E,WAAW,EAAE,MAAM,CAAC;IACpB,0DAA0D;IAC1D,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;GAIG;AACH,MAAM,WAAW,cAAc;IAC7B,6EAA6E;IAC7E,EAAE,EAAE,MAAM,CAAC;IACX,gDAAgD;IAChD,OAAO,E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C;AAMtD;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,kEAAkE;IAClE,QAAQ,EAAE,MAAM,CAAC;IACjB,yEAAyE;IACzE,WAAW,EAAE,MAAM,CAAC;IACpB,8DAA8D;IAC9D,IAAI,EAAE,MAAM,CAAC;IACb,iCAAiC;IACjC,EAAE,EAAE,MAAM,CAAC;CACZ;AAMD;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,+CAA+C;IAC/C,KAAK,EAAE,MAAM,CAAC;IACd,gDAAgD;IAChD,KAAK,EAAE,MAAM,CAAC;IACd,4DAA4D;IAC5D,MAAM,EAAE,MAAM,CAAC;CAChB"}
|
package/dist/types/entities.d.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* @description Centralized type definitions for all database entities
|
|
4
4
|
* @version 1.0.0
|
|
5
5
|
*/
|
|
6
|
-
import { Optional } from './common';
|
|
6
|
+
import { Optional } from './common.js';
|
|
7
7
|
/**
|
|
8
8
|
* All possible values for {@link MarketStatus}, exposed as a runtime constant
|
|
9
9
|
* so consumers can iterate over them or perform runtime validation.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/types/entities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"entities.d.ts","sourceRoot":"","sources":["../../src/types/entities.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAMvC;;;GAGG;AACH,eAAO,MAAM,kBAAkB,2DAKrB,CAAC;AAEX;;;;;;GAMG;AACH,MAAM,MAAM,YAAY,GAAG,CAAC,OAAO,kBAAkB,CAAC,CAAC,MAAM,CAAC,CAAC;AAE/D;;;GAGG;AACH,eAAO,MAAM,eAAe,iCAAkC,CAAC;AAE/D;;;;GAIG;AACH,MAAM,MAAM,SAAS,GAAG,C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CAAC;IAC3B,kDAAkD;IAClD,sBAAsB,EAAE,MAAM,CAAC;IAC/B;;;OAGG;IACH,WAAW,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC9B;;;OAGG;IACH,mBAAmB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IACtC;;;OAGG;IACH,uBAAuB,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC1C;;;OAGG;IACH,MAAM,EAAE,QAAQ,CAAC,OAAO,CAAC,CAAC;IAC1B,gEAAgE;IAChE,QAAQ,EAAE,OAAO,CAAC;CACnB;AAED;;;GAGG;AACH,MAAM,WAAW,wBAAwB;IACvC,wBAAwB;IACxB,EAAE,EAAE,MAAM,CAAC;IACX,wDAAwD;IACxD,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,QAAQ,EAAE,MAAM,CAAC;IACjB;;;OAGG;IACH,SAAS,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;IAC5B,2CAA2C;IAC3C,OAAO,EAAE,MAAM,CAAC;IAChB,uEAAuE;IACvE,SAAS,EAAE,MAAM,CAAC;IAClB,mEAAmE;IACnE,WAAW,EAAE,MAAM,CAAC;IACpB,uDAAuD;IACvD,eAAe,EAAE,MAAM,CAAC;IACxB;;;OAGG;IACH,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC1B"}
|
package/dist/types/index.d.ts
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/**
|
|
2
2
|
* @fileoverview Type exports for @heavymath/types
|
|
3
3
|
*/
|
|
4
|
-
export type { Optional, ChainPrefixedId, PredictionId, TxLogId, ParsedChainPrefixedId, } from './common';
|
|
5
|
-
export { isChainPrefixedId, isPredictionId, isTxLogId, parseChainPrefixedId, } from './common';
|
|
6
|
-
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';
|
|
7
|
-
export { OracleType } from './events';
|
|
8
|
-
export type { MarketStatus, ClaimType, WithdrawalType, MarketEntity, PredictionEntity, ClaimEntity, OracleEntity, DealerNftEntity, DealerPermissionEntity, WalletFavoriteEntity, FeeWithdrawalEntity, OracleRequestEntity, MarketStateHistoryEntity, } from './entities';
|
|
9
|
-
export { MarketStatusValues, ClaimTypeValues, WithdrawalTypeValues, isMarketStatus, isClaimType, isWithdrawalType, } from './entities';
|
|
10
|
-
export type { MarketData, PredictionData, DealerNftData, DealerPermissionData, FeeWithdrawalData, OracleRequestData, MarketStateHistoryData, MarketStatsData, HealthData, SSEStatsData, WalletFavoriteData, CreateFavoriteRequest, PaginationMeta, } from './api';
|
|
4
|
+
export type { Optional, ChainPrefixedId, PredictionId, TxLogId, ParsedChainPrefixedId, } from './common.js';
|
|
5
|
+
export { isChainPrefixedId, isPredictionId, isTxLogId, parseChainPrefixedId, } from './common.js';
|
|
6
|
+
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.js';
|
|
7
|
+
export { OracleType } from './events.js';
|
|
8
|
+
export type { MarketStatus, ClaimType, WithdrawalType, MarketEntity, PredictionEntity, ClaimEntity, OracleEntity, DealerNftEntity, DealerPermissionEntity, WalletFavoriteEntity, FeeWithdrawalEntity, OracleRequestEntity, MarketStateHistoryEntity, } from './entities.js';
|
|
9
|
+
export { MarketStatusValues, ClaimTypeValues, WithdrawalTypeValues, isMarketStatus, isClaimType, isWithdrawalType, } from './entities.js';
|
|
10
|
+
export type { MarketData, PredictionData, DealerNftData, DealerPermissionData, FeeWithdrawalData, OracleRequestData, MarketStateHistoryData, MarketStatsData, HealthData, SSEStatsData, WalletFavoriteData, CreateFavoriteRequest, PaginationMeta, } from './api.js';
|
|
11
11
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +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,EACP,qBAAqB,GACtB,MAAM,
|
|
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,EACP,qBAAqB,GACtB,MAAM,aAAa,CAAC;AAGrB,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,oBAAoB,GACrB,MAAM,aAAa,CAAC;AAGrB,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,aAAa,CAAC;AAGrB,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAGzC,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,eAAe,CAAC;AAGvB,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC;AAGvB,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,UAAU,CAAC"}
|
package/dist/types/index.js
CHANGED
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
* @fileoverview Type exports for @heavymath/types
|
|
3
3
|
*/
|
|
4
4
|
// Common validation utilities
|
|
5
|
-
export { isChainPrefixedId, isPredictionId, isTxLogId, parseChainPrefixedId, } from './common';
|
|
5
|
+
export { isChainPrefixedId, isPredictionId, isTxLogId, parseChainPrefixedId, } from './common.js';
|
|
6
6
|
// Export const values separately
|
|
7
|
-
export { OracleType } from './events';
|
|
7
|
+
export { OracleType } from './events.js';
|
|
8
8
|
// Entity runtime const arrays and type guards
|
|
9
|
-
export { MarketStatusValues, ClaimTypeValues, WithdrawalTypeValues, isMarketStatus, isClaimType, isWithdrawalType, } from './entities';
|
|
9
|
+
export { MarketStatusValues, ClaimTypeValues, WithdrawalTypeValues, isMarketStatus, isClaimType, isWithdrawalType, } from './entities.js';
|
|
10
10
|
//# sourceMappingURL=index.js.map
|
package/dist/types/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,8BAA8B;AAC9B,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,oBAAoB,GACrB,MAAM,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/types/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAWH,8BAA8B;AAC9B,OAAO,EACL,iBAAiB,EACjB,cAAc,EACd,SAAS,EACT,oBAAoB,GACrB,MAAM,aAAa,CAAC;AA2BrB,iCAAiC;AACjC,OAAO,EAAE,UAAU,EAAE,MAAM,aAAa,CAAC;AAmBzC,8CAA8C;AAC9C,OAAO,EACL,kBAAkB,EAClB,eAAe,EACf,oBAAoB,EACpB,cAAc,EACd,WAAW,EACX,gBAAgB,GACjB,MAAM,eAAe,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,22 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sudobility/heavymath_types",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.11",
|
|
4
4
|
"description": "Comprehensive TypeScript types, interfaces, and utilities for Heavymath prediction market applications",
|
|
5
|
-
"
|
|
6
|
-
"
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.js",
|
|
7
7
|
"types": "./dist/index.d.ts",
|
|
8
8
|
"exports": {
|
|
9
9
|
".": {
|
|
10
10
|
"types": "./dist/index.d.ts",
|
|
11
|
-
"import": "./dist/index.js"
|
|
12
|
-
"require": "./dist/index.cjs"
|
|
11
|
+
"import": "./dist/index.js"
|
|
13
12
|
}
|
|
14
13
|
},
|
|
15
14
|
"scripts": {
|
|
16
|
-
"build": "
|
|
17
|
-
"build:esm": "bunx tsc -p tsconfig.esm.json",
|
|
18
|
-
"build:cjs": "bunx tsc -p tsconfig.cjs.json && bun run build:cjs-rename && rm -rf dist-cjs",
|
|
19
|
-
"build:cjs-rename": "find dist-cjs -name '*.js' -exec sh -c 'cp \"$1\" \"dist/$(basename \"${1%.js}.cjs\")\"' _ {} \\;",
|
|
15
|
+
"build": "tsc -p tsconfig.esm.json",
|
|
20
16
|
"clean": "rm -rf dist",
|
|
21
17
|
"dev": "bunx tsc --watch",
|
|
22
18
|
"typecheck": "bunx tsc --noEmit",
|
package/dist/api.cjs
DELETED
|
@@ -1,11 +0,0 @@
|
|
|
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
|
package/dist/common.cjs
DELETED
|
@@ -1,95 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
/**
|
|
3
|
-
* Common utility types used throughout the Heavymath application
|
|
4
|
-
*/
|
|
5
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.isChainPrefixedId = isChainPrefixedId;
|
|
7
|
-
exports.isPredictionId = isPredictionId;
|
|
8
|
-
exports.isTxLogId = isTxLogId;
|
|
9
|
-
exports.parseChainPrefixedId = parseChainPrefixedId;
|
|
10
|
-
// ============================================================================
|
|
11
|
-
// Validation Utilities
|
|
12
|
-
// ============================================================================
|
|
13
|
-
/**
|
|
14
|
-
* Regex pattern for ChainPrefixedId: one or more digits, a dash, then one or more characters.
|
|
15
|
-
*/
|
|
16
|
-
const CHAIN_PREFIXED_ID_RE = /^\d+-[^-].*/;
|
|
17
|
-
/**
|
|
18
|
-
* Regex pattern for PredictionId: digits-string-string with at least two dashes.
|
|
19
|
-
*/
|
|
20
|
-
const PREDICTION_ID_RE = /^\d+-[^-]+-[^-]+/;
|
|
21
|
-
/**
|
|
22
|
-
* Regex pattern for TxLogId: non-empty string, a dash, then a numeric string
|
|
23
|
-
* (bigint serialises to digits, optionally with a leading minus).
|
|
24
|
-
*/
|
|
25
|
-
const TX_LOG_ID_RE = /^.+-(-?\d+)$/;
|
|
26
|
-
/**
|
|
27
|
-
* Type guard that checks whether a string conforms to the {@link ChainPrefixedId}
|
|
28
|
-
* template literal format (`{number}-{string}`).
|
|
29
|
-
*
|
|
30
|
-
* @param value - The string to validate
|
|
31
|
-
* @returns `true` (narrowed to `ChainPrefixedId`) when the value matches
|
|
32
|
-
* @example
|
|
33
|
-
* ```ts
|
|
34
|
-
* if (isChainPrefixedId(input)) {
|
|
35
|
-
* // input is now typed as ChainPrefixedId
|
|
36
|
-
* }
|
|
37
|
-
* ```
|
|
38
|
-
*/
|
|
39
|
-
function isChainPrefixedId(value) {
|
|
40
|
-
return CHAIN_PREFIXED_ID_RE.test(value);
|
|
41
|
-
}
|
|
42
|
-
/**
|
|
43
|
-
* Type guard that checks whether a string conforms to the {@link PredictionId}
|
|
44
|
-
* template literal format (`{number}-{string}-{string}`).
|
|
45
|
-
*
|
|
46
|
-
* @param value - The string to validate
|
|
47
|
-
* @returns `true` (narrowed to `PredictionId`) when the value matches
|
|
48
|
-
* @example
|
|
49
|
-
* ```ts
|
|
50
|
-
* if (isPredictionId(input)) {
|
|
51
|
-
* // input is now typed as PredictionId
|
|
52
|
-
* }
|
|
53
|
-
* ```
|
|
54
|
-
*/
|
|
55
|
-
function isPredictionId(value) {
|
|
56
|
-
return PREDICTION_ID_RE.test(value);
|
|
57
|
-
}
|
|
58
|
-
/**
|
|
59
|
-
* Type guard that checks whether a string conforms to the {@link TxLogId}
|
|
60
|
-
* template literal format (`{string}-{bigint}`).
|
|
61
|
-
*
|
|
62
|
-
* The trailing segment must be a valid integer (the serialised form of a
|
|
63
|
-
* bigint). Empty strings are rejected.
|
|
64
|
-
*
|
|
65
|
-
* @param value - The string to validate
|
|
66
|
-
* @returns `true` (narrowed to `TxLogId`) when the value matches
|
|
67
|
-
* @example
|
|
68
|
-
* ```ts
|
|
69
|
-
* if (isTxLogId(input)) {
|
|
70
|
-
* // input is now typed as TxLogId
|
|
71
|
-
* }
|
|
72
|
-
* ```
|
|
73
|
-
*/
|
|
74
|
-
function isTxLogId(value) {
|
|
75
|
-
return TX_LOG_ID_RE.test(value);
|
|
76
|
-
}
|
|
77
|
-
/**
|
|
78
|
-
* Parses a {@link ChainPrefixedId} into its constituent parts.
|
|
79
|
-
*
|
|
80
|
-
* @param id - A valid ChainPrefixedId string
|
|
81
|
-
* @returns An object containing the numeric `chainId` and the `identifier`
|
|
82
|
-
* @example
|
|
83
|
-
* ```ts
|
|
84
|
-
* const { chainId, identifier } = parseChainPrefixedId('137-0xabc');
|
|
85
|
-
* // chainId === 137, identifier === '0xabc'
|
|
86
|
-
* ```
|
|
87
|
-
*/
|
|
88
|
-
function parseChainPrefixedId(id) {
|
|
89
|
-
const dashIndex = id.indexOf('-');
|
|
90
|
-
return {
|
|
91
|
-
chainId: Number(id.slice(0, dashIndex)),
|
|
92
|
-
identifier: id.slice(dashIndex + 1),
|
|
93
|
-
};
|
|
94
|
-
}
|
|
95
|
-
//# sourceMappingURL=common.js.map
|
package/dist/entities.cjs
DELETED
|
@@ -1,65 +0,0 @@
|
|
|
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
|
-
exports.WithdrawalTypeValues = exports.ClaimTypeValues = exports.MarketStatusValues = void 0;
|
|
9
|
-
exports.isMarketStatus = isMarketStatus;
|
|
10
|
-
exports.isClaimType = isClaimType;
|
|
11
|
-
exports.isWithdrawalType = isWithdrawalType;
|
|
12
|
-
// ============================================================================
|
|
13
|
-
// Enums and Constants
|
|
14
|
-
// ============================================================================
|
|
15
|
-
/**
|
|
16
|
-
* All possible values for {@link MarketStatus}, exposed as a runtime constant
|
|
17
|
-
* so consumers can iterate over them or perform runtime validation.
|
|
18
|
-
*/
|
|
19
|
-
exports.MarketStatusValues = [
|
|
20
|
-
'Active',
|
|
21
|
-
'Cancelled',
|
|
22
|
-
'Resolved',
|
|
23
|
-
'Abandoned',
|
|
24
|
-
];
|
|
25
|
-
/**
|
|
26
|
-
* All possible values for {@link ClaimType}, exposed as a runtime constant
|
|
27
|
-
* so consumers can iterate over them or perform runtime validation.
|
|
28
|
-
*/
|
|
29
|
-
exports.ClaimTypeValues = ['winnings', 'refund'];
|
|
30
|
-
/**
|
|
31
|
-
* All possible values for {@link WithdrawalType}, exposed as a runtime constant
|
|
32
|
-
* so consumers can iterate over them or perform runtime validation.
|
|
33
|
-
*/
|
|
34
|
-
exports.WithdrawalTypeValues = ['dealer', 'system'];
|
|
35
|
-
// ============================================================================
|
|
36
|
-
// Type Guards
|
|
37
|
-
// ============================================================================
|
|
38
|
-
/**
|
|
39
|
-
* Runtime type guard for {@link MarketStatus}.
|
|
40
|
-
*
|
|
41
|
-
* @param value - The string to validate
|
|
42
|
-
* @returns `true` (narrowed to `MarketStatus`) when the value is a valid market status
|
|
43
|
-
*/
|
|
44
|
-
function isMarketStatus(value) {
|
|
45
|
-
return exports.MarketStatusValues.includes(value);
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Runtime type guard for {@link ClaimType}.
|
|
49
|
-
*
|
|
50
|
-
* @param value - The string to validate
|
|
51
|
-
* @returns `true` (narrowed to `ClaimType`) when the value is a valid claim type
|
|
52
|
-
*/
|
|
53
|
-
function isClaimType(value) {
|
|
54
|
-
return exports.ClaimTypeValues.includes(value);
|
|
55
|
-
}
|
|
56
|
-
/**
|
|
57
|
-
* Runtime type guard for {@link WithdrawalType}.
|
|
58
|
-
*
|
|
59
|
-
* @param value - The string to validate
|
|
60
|
-
* @returns `true` (narrowed to `WithdrawalType`) when the value is a valid withdrawal type
|
|
61
|
-
*/
|
|
62
|
-
function isWithdrawalType(value) {
|
|
63
|
-
return exports.WithdrawalTypeValues.includes(value);
|
|
64
|
-
}
|
|
65
|
-
//# sourceMappingURL=entities.js.map
|
package/dist/events.cjs
DELETED
|
@@ -1,25 +0,0 @@
|
|
|
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
|
package/dist/index.cjs
DELETED
|
@@ -1,27 +0,0 @@
|
|
|
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
|