sol-trade-sdk 0.1.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/README.md +390 -0
- package/dist/chunk-MMQAMIKR.mjs +3735 -0
- package/dist/chunk-NEZDFAYA.mjs +7744 -0
- package/dist/clients-VITWK7B6.mjs +1370 -0
- package/dist/index-1BK_FXsW.d.mts +2327 -0
- package/dist/index-1BK_FXsW.d.ts +2327 -0
- package/dist/index.d.mts +2659 -0
- package/dist/index.d.ts +2659 -0
- package/dist/index.js +13265 -0
- package/dist/index.mjs +562 -0
- package/dist/perf/index.d.mts +2 -0
- package/dist/perf/index.d.ts +2 -0
- package/dist/perf/index.js +3742 -0
- package/dist/perf/index.mjs +214 -0
- package/package.json +101 -0
- package/src/__tests__/complete_sdk.test.ts +354 -0
- package/src/__tests__/hotpath.test.ts +486 -0
- package/src/__tests__/nonce.test.ts +45 -0
- package/src/__tests__/sdk.test.ts +425 -0
- package/src/address-lookup/index.ts +197 -0
- package/src/cache/cache.ts +308 -0
- package/src/calc/index.ts +1058 -0
- package/src/calc/pumpfun.ts +124 -0
- package/src/common/bonding_curve.ts +272 -0
- package/src/common/compute-budget.ts +148 -0
- package/src/common/confirm-any-signature.ts +184 -0
- package/src/common/fast-timing.ts +481 -0
- package/src/common/fast_fn.ts +150 -0
- package/src/common/gas-fee-strategy.ts +253 -0
- package/src/common/map-pool.ts +23 -0
- package/src/common/nonce.ts +40 -0
- package/src/common/sdk-log.ts +460 -0
- package/src/common/seed.ts +381 -0
- package/src/common/spl-token.ts +578 -0
- package/src/common/subscription-handle.ts +644 -0
- package/src/common/trading-utils.ts +239 -0
- package/src/common/wsol-manager.ts +325 -0
- package/src/compute/compute_budget_manager.ts +187 -0
- package/src/compute/index.ts +21 -0
- package/src/constants/index.ts +96 -0
- package/src/execution/execution.ts +532 -0
- package/src/execution/index.ts +42 -0
- package/src/hotpath/executor.ts +464 -0
- package/src/hotpath/index.ts +64 -0
- package/src/hotpath/state.ts +435 -0
- package/src/index.ts +2117 -0
- package/src/instruction/bonk_builder.ts +730 -0
- package/src/instruction/index.ts +24 -0
- package/src/instruction/meteora_damm_v2_builder.ts +509 -0
- package/src/instruction/pumpfun_builder.ts +1183 -0
- package/src/instruction/pumpswap.ts +1123 -0
- package/src/instruction/raydium_amm_v4_builder.ts +692 -0
- package/src/instruction/raydium_cpmm_builder.ts +795 -0
- package/src/middleware/traits.ts +407 -0
- package/src/params/index.ts +483 -0
- package/src/perf/compiler-optimization.ts +529 -0
- package/src/perf/hardware.ts +631 -0
- package/src/perf/index.ts +9 -0
- package/src/perf/kernel-bypass.ts +656 -0
- package/src/perf/protocol.ts +682 -0
- package/src/perf/realtime.ts +592 -0
- package/src/perf/simd.ts +668 -0
- package/src/perf/syscall-bypass.ts +331 -0
- package/src/perf/ultra-low-latency.ts +505 -0
- package/src/perf/zero-copy.ts +589 -0
- package/src/pool/pool.ts +294 -0
- package/src/rpc/client.ts +345 -0
- package/src/sdk-errors.ts +13 -0
- package/src/security/index.ts +26 -0
- package/src/security/secure-key.ts +303 -0
- package/src/security/validators.ts +281 -0
- package/src/seed/pda.ts +262 -0
- package/src/serialization/index.ts +28 -0
- package/src/serialization/serialization.ts +288 -0
- package/src/swqos/clients.ts +1754 -0
- package/src/swqos/index.ts +50 -0
- package/src/swqos/providers.ts +1707 -0
- package/src/trading/core/async-executor.ts +702 -0
- package/src/trading/core/confirmation-monitor.ts +711 -0
- package/src/trading/core/index.ts +82 -0
- package/src/trading/core/retry-handler.ts +683 -0
- package/src/trading/core/transaction-pool.ts +780 -0
- package/src/trading/executor.ts +385 -0
- package/src/trading/factory.ts +282 -0
- package/src/trading/index.ts +30 -0
- package/src/types.ts +8 -0
- package/src/utils/index.ts +155 -0
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Trading Core Module for Sol Trade SDK
|
|
3
|
+
* Core trading infrastructure with async execution, transaction pooling,
|
|
4
|
+
* confirmation monitoring, and retry handling.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
// ===== Async Executor =====
|
|
8
|
+
export {
|
|
9
|
+
AsyncTradeExecutor,
|
|
10
|
+
SubmitMode,
|
|
11
|
+
ExecutionStatus,
|
|
12
|
+
defaultExecutionConfig,
|
|
13
|
+
hftExecutionConfig,
|
|
14
|
+
reliableExecutionConfig,
|
|
15
|
+
createAsyncExecutor,
|
|
16
|
+
executeTrade,
|
|
17
|
+
} from './async-executor';
|
|
18
|
+
export type {
|
|
19
|
+
ExecutionConfig,
|
|
20
|
+
ExecutionProgress,
|
|
21
|
+
ExecutionResult,
|
|
22
|
+
} from './async-executor';
|
|
23
|
+
|
|
24
|
+
// ===== Transaction Pool =====
|
|
25
|
+
export {
|
|
26
|
+
TransactionPool,
|
|
27
|
+
TransactionStatus,
|
|
28
|
+
PriorityLevel,
|
|
29
|
+
PriorityCalculator,
|
|
30
|
+
defaultPoolConfig,
|
|
31
|
+
highThroughputPoolConfig,
|
|
32
|
+
conservativePoolConfig,
|
|
33
|
+
createTransactionPool,
|
|
34
|
+
submitToPool,
|
|
35
|
+
} from './transaction-pool';
|
|
36
|
+
export type {
|
|
37
|
+
PoolConfig,
|
|
38
|
+
PoolStats,
|
|
39
|
+
PendingTransaction,
|
|
40
|
+
PriorityScore,
|
|
41
|
+
} from './transaction-pool';
|
|
42
|
+
|
|
43
|
+
// ===== Confirmation Monitor =====
|
|
44
|
+
export {
|
|
45
|
+
ConfirmationMonitor,
|
|
46
|
+
ConfirmationStatus,
|
|
47
|
+
defaultConfirmationConfig,
|
|
48
|
+
fastConfirmationConfig,
|
|
49
|
+
reliableConfirmationConfig,
|
|
50
|
+
createConfirmationMonitor,
|
|
51
|
+
waitForConfirmation,
|
|
52
|
+
isConfirmed,
|
|
53
|
+
} from './confirmation-monitor';
|
|
54
|
+
export type {
|
|
55
|
+
ConfirmationConfig,
|
|
56
|
+
ConfirmationProgress,
|
|
57
|
+
ConfirmationResult,
|
|
58
|
+
TransactionError,
|
|
59
|
+
} from './confirmation-monitor';
|
|
60
|
+
|
|
61
|
+
// ===== Retry Handler =====
|
|
62
|
+
export {
|
|
63
|
+
RetryHandler,
|
|
64
|
+
RetryStrategy,
|
|
65
|
+
CircuitBreaker,
|
|
66
|
+
CircuitState,
|
|
67
|
+
ExponentialBackoff,
|
|
68
|
+
defaultRetryConfig,
|
|
69
|
+
aggressiveRetryConfig,
|
|
70
|
+
conservativeRetryConfig,
|
|
71
|
+
defaultCircuitBreakerConfig,
|
|
72
|
+
createRetryHandler,
|
|
73
|
+
withRetry,
|
|
74
|
+
withCircuitBreaker,
|
|
75
|
+
calculateBackoff,
|
|
76
|
+
} from './retry-handler';
|
|
77
|
+
export type {
|
|
78
|
+
RetryConfig,
|
|
79
|
+
RetryResult,
|
|
80
|
+
CircuitBreakerConfig,
|
|
81
|
+
CircuitStats,
|
|
82
|
+
} from './retry-handler';
|