Skip to content

Commit 868fcdc

Browse files
committed
refactor: remove RPC infrastructure types from shared data-models
These types (RpcProviderRole, RpcProviderType, RpcEndpointConfig, ChainRpcConfig, RpcProviderConfig, CircuitBreakerConfig, RetryConfig, HealthCheckConfig, UserRpcEndpoint, UserRpcConfig, PrivacyConfig) belong in @cygnus-wealth/rpc-infrastructure per en-1mg1 analysis. Removes 11 type files, their exports, tests, and API report entries. Bumps version to 1.4.0. All 400 remaining tests pass.
1 parent 419a1f0 commit 868fcdc

16 files changed

Lines changed: 3 additions & 1360 deletions

etc/data-models.api.md

Lines changed: 0 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -226,23 +226,6 @@ export enum Chain {
226226
SUI = "SUI"
227227
}
228228

229-
// @public
230-
export interface ChainRpcConfig {
231-
cacheStaleAcceptanceMs: number;
232-
chainId: number;
233-
chainName: string;
234-
endpoints: RpcEndpointConfig[];
235-
totalOperationTimeoutMs: number;
236-
}
237-
238-
// @public
239-
export interface CircuitBreakerConfig {
240-
failureThreshold: number;
241-
halfOpenMaxAttempts: number;
242-
monitorWindowMs: number;
243-
openDurationMs: number;
244-
}
245-
246229
// @public
247230
export interface ConnectedAccount {
248231
accountId: AccountId;
@@ -331,13 +314,6 @@ export interface GroupPortfolio {
331314
totalValue: Price;
332315
}
333316

334-
// @public
335-
export interface HealthCheckConfig {
336-
intervalMs: number;
337-
method: string;
338-
timeoutMs: number;
339-
}
340-
341317
// @public
342318
export interface IntegrationCredentials {
343319
accountId?: AccountId;
@@ -510,59 +486,6 @@ export interface Price {
510486
value?: number;
511487
}
512488

513-
// @public
514-
export interface PrivacyConfig {
515-
privacyMode: boolean;
516-
queryJitterMs: number;
517-
rotateWithinTier: boolean;
518-
}
519-
520-
// @public
521-
export interface RetryConfig {
522-
baseDelayMs: number;
523-
maxAttempts: number;
524-
maxDelayMs: number;
525-
}
526-
527-
// @public
528-
export interface RpcEndpointConfig {
529-
provider: string;
530-
rateLimitRps: number;
531-
role: RpcProviderRole;
532-
timeoutMs: number;
533-
type: RpcProviderType;
534-
url: string;
535-
weight?: number;
536-
wsUrl?: string;
537-
}
538-
539-
// @public
540-
export interface RpcProviderConfig {
541-
chains: Record<string, ChainRpcConfig>;
542-
circuitBreaker: CircuitBreakerConfig;
543-
healthCheck: HealthCheckConfig;
544-
privacy: PrivacyConfig;
545-
retry: RetryConfig;
546-
userOverrides?: UserRpcConfig;
547-
}
548-
549-
// @public
550-
export enum RpcProviderRole {
551-
EMERGENCY = "EMERGENCY",
552-
PRIMARY = "PRIMARY",
553-
SECONDARY = "SECONDARY",
554-
TERTIARY = "TERTIARY"
555-
}
556-
557-
// @public
558-
export enum RpcProviderType {
559-
COMMUNITY = "COMMUNITY",
560-
DECENTRALIZED = "DECENTRALIZED",
561-
MANAGED = "MANAGED",
562-
PUBLIC = "PUBLIC",
563-
USER = "USER"
564-
}
565-
566489
// @public
567490
export type SortOrder = 'ASC' | 'DESC';
568491

@@ -667,20 +590,6 @@ export enum TransactionType {
667590
UNSTAKE = "UNSTAKE"
668591
}
669592

670-
// @public
671-
export interface UserRpcConfig {
672-
endpoints: UserRpcEndpoint[];
673-
mode: 'override' | 'prepend';
674-
}
675-
676-
// @public
677-
export interface UserRpcEndpoint {
678-
chainId: string;
679-
label?: string;
680-
url: string;
681-
wsUrl?: string;
682-
}
683-
684593
// @public
685594
export interface VaultPosition {
686595
apy?: number;

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@cygnus-wealth/data-models",
3-
"version": "1.3.0",
3+
"version": "1.4.0",
44
"description": "Shared TypeScript data models for CygnusWealth project",
55
"main": "dist/cjs/index.js",
66
"module": "dist/index.js",
@@ -61,16 +61,6 @@
6161
"import": "./dist/enums/DeFiDiscoverySource.js",
6262
"require": "./dist/cjs/enums/DeFiDiscoverySource.js"
6363
},
64-
"./enums/RpcProviderRole": {
65-
"types": "./dist/enums/RpcProviderRole.d.ts",
66-
"import": "./dist/enums/RpcProviderRole.js",
67-
"require": "./dist/cjs/enums/RpcProviderRole.js"
68-
},
69-
"./enums/RpcProviderType": {
70-
"types": "./dist/enums/RpcProviderType.d.ts",
71-
"import": "./dist/enums/RpcProviderType.js",
72-
"require": "./dist/cjs/enums/RpcProviderType.js"
73-
},
7464
"./interfaces/*": {
7565
"types": "./dist/interfaces/*.d.ts",
7666
"import": "./dist/interfaces/*.js",

src/enums/RpcProviderRole.ts

Lines changed: 0 additions & 36 deletions
This file was deleted.

src/enums/RpcProviderType.ts

Lines changed: 0 additions & 38 deletions
This file was deleted.

src/index.ts

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -9,9 +9,6 @@ export { VaultStrategyType } from './enums/VaultStrategyType';
99
export { DeFiPositionType } from './enums/DeFiPositionType';
1010
export { DeFiProtocol } from './enums/DeFiProtocol';
1111
export { DeFiDiscoverySource } from './enums/DeFiDiscoverySource';
12-
export { RpcProviderRole } from './enums/RpcProviderRole';
13-
export { RpcProviderType } from './enums/RpcProviderType';
14-
1512
// Base Interfaces
1613
export { BaseEntity } from './interfaces/BaseEntity';
1714
export { Metadata } from './interfaces/Metadata';
@@ -80,17 +77,6 @@ export { TimeRange } from './types/TimeRange';
8077
export { SortOrder } from './types/SortOrder';
8178
export { FilterOptions } from './interfaces/FilterOptions';
8279

83-
// RPC Provider Configuration
84-
export { RpcEndpointConfig } from './interfaces/RpcEndpointConfig';
85-
export { ChainRpcConfig } from './interfaces/ChainRpcConfig';
86-
export { CircuitBreakerConfig } from './interfaces/CircuitBreakerConfig';
87-
export { RetryConfig } from './interfaces/RetryConfig';
88-
export { HealthCheckConfig } from './interfaces/HealthCheckConfig';
89-
export { RpcProviderConfig } from './interfaces/RpcProviderConfig';
90-
export type { UserRpcEndpoint } from './interfaces/UserRpcEndpoint';
91-
export type { UserRpcConfig } from './interfaces/UserRpcConfig';
92-
export type { PrivacyConfig } from './interfaces/PrivacyConfig';
93-
9480
// Network Environment
9581
export { NetworkEnvironment, EnvironmentConfig } from './types/NetworkEnvironment';
9682

src/interfaces/ChainRpcConfig.ts

Lines changed: 0 additions & 53 deletions
This file was deleted.

src/interfaces/CircuitBreakerConfig.ts

Lines changed: 0 additions & 37 deletions
This file was deleted.

src/interfaces/HealthCheckConfig.ts

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)