@0xmonaco/types 0.0.0-develop-20260120180031

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.
Files changed (134) hide show
  1. package/README.md +391 -0
  2. package/dist/api/index.d.ts +19 -0
  3. package/dist/api/index.d.ts.map +1 -0
  4. package/dist/api/index.js +8 -0
  5. package/dist/api/index.js.map +1 -0
  6. package/dist/applications/index.d.ts +24 -0
  7. package/dist/applications/index.d.ts.map +1 -0
  8. package/dist/applications/index.js +7 -0
  9. package/dist/applications/index.js.map +1 -0
  10. package/dist/applications/responses.d.ts +21 -0
  11. package/dist/applications/responses.d.ts.map +1 -0
  12. package/dist/applications/responses.js +7 -0
  13. package/dist/applications/responses.js.map +1 -0
  14. package/dist/auth/index.d.ts +76 -0
  15. package/dist/auth/index.d.ts.map +1 -0
  16. package/dist/auth/index.js +8 -0
  17. package/dist/auth/index.js.map +1 -0
  18. package/dist/auth/responses.d.ts +68 -0
  19. package/dist/auth/responses.d.ts.map +1 -0
  20. package/dist/auth/responses.js +7 -0
  21. package/dist/auth/responses.js.map +1 -0
  22. package/dist/contracts/balances.d.ts +44 -0
  23. package/dist/contracts/balances.d.ts.map +1 -0
  24. package/dist/contracts/balances.js +7 -0
  25. package/dist/contracts/balances.js.map +1 -0
  26. package/dist/contracts/index.d.ts +28 -0
  27. package/dist/contracts/index.d.ts.map +1 -0
  28. package/dist/contracts/index.js +7 -0
  29. package/dist/contracts/index.js.map +1 -0
  30. package/dist/fees/index.d.ts +40 -0
  31. package/dist/fees/index.d.ts.map +1 -0
  32. package/dist/fees/index.js +7 -0
  33. package/dist/fees/index.js.map +1 -0
  34. package/dist/fees/responses.d.ts +47 -0
  35. package/dist/fees/responses.d.ts.map +1 -0
  36. package/dist/fees/responses.js +62 -0
  37. package/dist/fees/responses.js.map +1 -0
  38. package/dist/index.d.ts +19 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +20 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/market/index.d.ts +224 -0
  43. package/dist/market/index.d.ts.map +1 -0
  44. package/dist/market/index.js +7 -0
  45. package/dist/market/index.js.map +1 -0
  46. package/dist/profile/index.d.ts +228 -0
  47. package/dist/profile/index.d.ts.map +1 -0
  48. package/dist/profile/index.js +7 -0
  49. package/dist/profile/index.js.map +1 -0
  50. package/dist/sdk/index.d.ts +122 -0
  51. package/dist/sdk/index.d.ts.map +1 -0
  52. package/dist/sdk/index.js +2 -0
  53. package/dist/sdk/index.js.map +1 -0
  54. package/dist/sdk/network.d.ts +31 -0
  55. package/dist/sdk/network.d.ts.map +1 -0
  56. package/dist/sdk/network.js +7 -0
  57. package/dist/sdk/network.js.map +1 -0
  58. package/dist/trading/index.d.ts +88 -0
  59. package/dist/trading/index.d.ts.map +1 -0
  60. package/dist/trading/index.js +7 -0
  61. package/dist/trading/index.js.map +1 -0
  62. package/dist/trading/orders.d.ts +108 -0
  63. package/dist/trading/orders.d.ts.map +1 -0
  64. package/dist/trading/orders.js +7 -0
  65. package/dist/trading/orders.js.map +1 -0
  66. package/dist/trading/responses.d.ts +130 -0
  67. package/dist/trading/responses.d.ts.map +1 -0
  68. package/dist/trading/responses.js +7 -0
  69. package/dist/trading/responses.js.map +1 -0
  70. package/dist/validation/common.d.ts +181 -0
  71. package/dist/validation/common.d.ts.map +1 -0
  72. package/dist/validation/common.js +196 -0
  73. package/dist/validation/common.js.map +1 -0
  74. package/dist/validation/index.d.ts +20 -0
  75. package/dist/validation/index.d.ts.map +1 -0
  76. package/dist/validation/index.js +22 -0
  77. package/dist/validation/index.js.map +1 -0
  78. package/dist/validation/market.d.ts +215 -0
  79. package/dist/validation/market.d.ts.map +1 -0
  80. package/dist/validation/market.js +226 -0
  81. package/dist/validation/market.js.map +1 -0
  82. package/dist/validation/trading.d.ts +148 -0
  83. package/dist/validation/trading.d.ts.map +1 -0
  84. package/dist/validation/trading.js +139 -0
  85. package/dist/validation/trading.js.map +1 -0
  86. package/dist/validation/vault.d.ts +62 -0
  87. package/dist/validation/vault.d.ts.map +1 -0
  88. package/dist/validation/vault.js +75 -0
  89. package/dist/validation/vault.js.map +1 -0
  90. package/dist/vault/index.d.ts +64 -0
  91. package/dist/vault/index.d.ts.map +1 -0
  92. package/dist/vault/index.js +7 -0
  93. package/dist/vault/index.js.map +1 -0
  94. package/dist/vault/responses.d.ts +34 -0
  95. package/dist/vault/responses.d.ts.map +1 -0
  96. package/dist/vault/responses.js +7 -0
  97. package/dist/vault/responses.js.map +1 -0
  98. package/dist/websocket/base.d.ts +32 -0
  99. package/dist/websocket/base.d.ts.map +1 -0
  100. package/dist/websocket/base.js +7 -0
  101. package/dist/websocket/base.js.map +1 -0
  102. package/dist/websocket/clients/orderbook-client.d.ts +15 -0
  103. package/dist/websocket/clients/orderbook-client.d.ts.map +1 -0
  104. package/dist/websocket/clients/orderbook-client.js +5 -0
  105. package/dist/websocket/clients/orderbook-client.js.map +1 -0
  106. package/dist/websocket/events/index.d.ts +6 -0
  107. package/dist/websocket/events/index.d.ts.map +1 -0
  108. package/dist/websocket/events/index.js +6 -0
  109. package/dist/websocket/events/index.js.map +1 -0
  110. package/dist/websocket/events/movement-events.d.ts +53 -0
  111. package/dist/websocket/events/movement-events.d.ts.map +1 -0
  112. package/dist/websocket/events/movement-events.js +8 -0
  113. package/dist/websocket/events/movement-events.js.map +1 -0
  114. package/dist/websocket/events/ohlcv-events.d.ts +32 -0
  115. package/dist/websocket/events/ohlcv-events.d.ts.map +1 -0
  116. package/dist/websocket/events/ohlcv-events.js +7 -0
  117. package/dist/websocket/events/ohlcv-events.js.map +1 -0
  118. package/dist/websocket/events/orderbook-events.d.ts +73 -0
  119. package/dist/websocket/events/orderbook-events.d.ts.map +1 -0
  120. package/dist/websocket/events/orderbook-events.js +7 -0
  121. package/dist/websocket/events/orderbook-events.js.map +1 -0
  122. package/dist/websocket/events/orders-events.d.ts +285 -0
  123. package/dist/websocket/events/orders-events.d.ts.map +1 -0
  124. package/dist/websocket/events/orders-events.js +2 -0
  125. package/dist/websocket/events/orders-events.js.map +1 -0
  126. package/dist/websocket/events/trade-events.d.ts +35 -0
  127. package/dist/websocket/events/trade-events.d.ts.map +1 -0
  128. package/dist/websocket/events/trade-events.js +7 -0
  129. package/dist/websocket/events/trade-events.js.map +1 -0
  130. package/dist/websocket/index.d.ts +9 -0
  131. package/dist/websocket/index.d.ts.map +1 -0
  132. package/dist/websocket/index.js +9 -0
  133. package/dist/websocket/index.js.map +1 -0
  134. package/package.json +31 -0
@@ -0,0 +1,139 @@
1
+ /**
2
+ * Trading API Validation Schemas
3
+ *
4
+ * Zod schemas for validating trading API inputs before making requests.
5
+ * Provides clear, actionable error messages for invalid parameters.
6
+ */
7
+ import { z } from "zod";
8
+ /**
9
+ * Order side validation
10
+ */
11
+ export const OrderSideSchema = z.enum(["BUY", "SELL"], {
12
+ message: 'Order side must be "BUY" or "SELL"',
13
+ });
14
+ /**
15
+ * Trading mode validation
16
+ */
17
+ export const TradingModeSchema = z.enum(["SPOT", "MARGIN"], {
18
+ message: 'Trading mode must be "SPOT" or "MARGIN"',
19
+ });
20
+ /**
21
+ * Time in force validation
22
+ */
23
+ export const TimeInForceSchema = z.enum(["GTC", "IOC", "FOK"], {
24
+ message: 'Time in force must be "GTC", "IOC", or "FOK"',
25
+ });
26
+ /**
27
+ * Positive decimal string validation (for quantities and prices)
28
+ */
29
+ export const PositiveDecimalStringSchema = z
30
+ .string()
31
+ .trim()
32
+ .min(1, "Value cannot be empty")
33
+ .regex(/^\d+(\.\d+)?$/, "Value must be a positive decimal number (e.g., '1.5', '100')")
34
+ .refine((val) => Number.parseFloat(val) > 0, {
35
+ message: "Value must be greater than 0",
36
+ });
37
+ /**
38
+ * Non-negative decimal string validation (allows 0)
39
+ */
40
+ export const NonNegativeDecimalStringSchema = z
41
+ .string()
42
+ .trim()
43
+ .min(1, "Value cannot be empty")
44
+ .regex(/^\d+(\.\d+)?$/, "Value must be a non-negative decimal number")
45
+ .refine((val) => Number.parseFloat(val) >= 0, {
46
+ message: "Value must be greater than or equal to 0",
47
+ });
48
+ /**
49
+ * UUID validation
50
+ */
51
+ export const UUIDSchema = z.string().uuid({
52
+ message: "Must be a valid UUID (e.g., '123e4567-e89b-12d3-a456-426614174000')",
53
+ });
54
+ /**
55
+ * ISO 8601 date string validation
56
+ */
57
+ export const ISO8601DateSchema = z.string().datetime({
58
+ message: "Must be a valid ISO 8601 date string (e.g., '2024-12-31T23:59:59Z')",
59
+ });
60
+ /**
61
+ * Slippage tolerance validation (0 to 1, where 0.01 = 1%)
62
+ */
63
+ export const SlippageToleranceSchema = z
64
+ .number()
65
+ .min(0, "Slippage tolerance must be at least 0 (no slippage)")
66
+ .max(1, "Slippage tolerance cannot exceed 1 (100%)")
67
+ .optional();
68
+ /**
69
+ * Place Limit Order validation schema
70
+ */
71
+ export const PlaceLimitOrderSchema = z.object({
72
+ tradingPairId: UUIDSchema,
73
+ side: OrderSideSchema,
74
+ quantity: PositiveDecimalStringSchema,
75
+ price: PositiveDecimalStringSchema,
76
+ options: z
77
+ .object({
78
+ tradingMode: TradingModeSchema.optional(),
79
+ useMasterBalance: z.boolean().optional(),
80
+ expirationDate: ISO8601DateSchema.optional(),
81
+ timeInForce: TimeInForceSchema.optional(),
82
+ })
83
+ .optional(),
84
+ });
85
+ /**
86
+ * Place Market Order validation schema
87
+ */
88
+ export const PlaceMarketOrderSchema = z.object({
89
+ tradingPairId: UUIDSchema,
90
+ side: OrderSideSchema,
91
+ quantity: PositiveDecimalStringSchema,
92
+ options: z
93
+ .object({
94
+ tradingMode: TradingModeSchema.optional(),
95
+ slippageTolerance: SlippageToleranceSchema,
96
+ timeInForce: TimeInForceSchema.optional(),
97
+ })
98
+ .optional(),
99
+ });
100
+ /**
101
+ * Cancel Order validation schema
102
+ */
103
+ export const CancelOrderSchema = z.object({
104
+ orderId: UUIDSchema,
105
+ });
106
+ /**
107
+ * Replace Order validation schema
108
+ *
109
+ * Validates parameters for replacing an existing order.
110
+ * Matches the replaceOrder method signature which accepts:
111
+ * - orderId: string (UUID)
112
+ * - newOrder: { price?: string, quantity?: string, useMasterBalance?: boolean }
113
+ */
114
+ export const ReplaceOrderSchema = z.object({
115
+ orderId: UUIDSchema,
116
+ newOrder: z.object({
117
+ price: PositiveDecimalStringSchema.optional(),
118
+ quantity: PositiveDecimalStringSchema.optional(),
119
+ useMasterBalance: z.boolean().optional(),
120
+ }),
121
+ });
122
+ /**
123
+ * Get Paginated Orders validation schema
124
+ *
125
+ * Validates parameters for fetching paginated orders.
126
+ * Status field accepts all valid OrderStatus values for comprehensive filtering.
127
+ */
128
+ export const GetOrdersSchema = z.object({
129
+ tradingPairId: UUIDSchema.optional(),
130
+ options: z
131
+ .object({
132
+ status: z.enum(["PENDING", "SUBMITTED", "ACKNOWLEDGED", "PARTIALLY_FILLED", "FILLED", "SETTLED", "CANCELLED", "REJECTED", "EXPIRED"]).optional(),
133
+ side: OrderSideSchema.optional(),
134
+ limit: z.number().int().min(1).max(100).optional(),
135
+ offset: z.number().int().min(0).optional(),
136
+ })
137
+ .optional(),
138
+ });
139
+ //# sourceMappingURL=trading.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"trading.js","sourceRoot":"","sources":["../../src/validation/trading.ts"],"names":[],"mappings":"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"}
@@ -0,0 +1,62 @@
1
+ /**
2
+ * Vault API Validation Schemas
3
+ */
4
+ import { z } from "zod";
5
+ /**
6
+ * Ethereum address validation
7
+ */
8
+ export declare const AddressSchema: z.ZodString;
9
+ /**
10
+ * Positive BigInt validation
11
+ *
12
+ * Accepts either:
13
+ * - A positive integer string (e.g., "1000000000000000000" for 1 token with 18 decimals)
14
+ * - A positive bigint value (e.g., 1000000000000000000n)
15
+ *
16
+ * This flexibility allows validation of:
17
+ * - User input (strings from forms)
18
+ * - Parsed amounts (bigint from parseUnits())
19
+ *
20
+ * @example
21
+ * ```typescript
22
+ * // String input (from user)
23
+ * validate(PositiveBigIntStringSchema, "1000000");
24
+ *
25
+ * // BigInt input (from parseUnits)
26
+ * import { parseUnits } from 'viem';
27
+ * const amount = parseUnits("1.0", 18); // 1000000000000000000n
28
+ * validate(PositiveBigIntStringSchema, amount);
29
+ * ```
30
+ */
31
+ export declare const PositiveBigIntStringSchema: z.ZodUnion<readonly [z.ZodString, z.ZodBigInt]>;
32
+ /**
33
+ * Approve Token validation schema
34
+ */
35
+ export declare const ApproveTokenSchema: z.ZodObject<{
36
+ assetId: z.ZodString;
37
+ amount: z.ZodUnion<readonly [z.ZodString, z.ZodBigInt]>;
38
+ autoWait: z.ZodOptional<z.ZodBoolean>;
39
+ }, z.core.$strip>;
40
+ /**
41
+ * Deposit validation schema
42
+ */
43
+ export declare const DepositSchema: z.ZodObject<{
44
+ assetId: z.ZodString;
45
+ amount: z.ZodUnion<readonly [z.ZodString, z.ZodBigInt]>;
46
+ autoWait: z.ZodOptional<z.ZodBoolean>;
47
+ }, z.core.$strip>;
48
+ /**
49
+ * Withdraw validation schema
50
+ */
51
+ export declare const WithdrawSchema: z.ZodObject<{
52
+ assetId: z.ZodString;
53
+ amount: z.ZodUnion<readonly [z.ZodString, z.ZodBigInt]>;
54
+ autoWait: z.ZodOptional<z.ZodBoolean>;
55
+ }, z.core.$strip>;
56
+ /**
57
+ * Get Balance validation schema
58
+ */
59
+ export declare const GetBalanceSchema: z.ZodObject<{
60
+ assetId: z.ZodString;
61
+ }, z.core.$strip>;
62
+ //# sourceMappingURL=vault.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault.d.ts","sourceRoot":"","sources":["../../src/validation/vault.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB;;GAEG;AACH,eAAO,MAAM,aAAa,aAExB,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,eAAO,MAAM,0BAA0B,iDAUrC,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,kBAAkB;;;;iBAI7B,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,aAAa;;;;iBAIxB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,cAAc;;;;iBAIzB,CAAC;AAEH;;GAEG;AACH,eAAO,MAAM,gBAAgB;;iBAE3B,CAAC"}
@@ -0,0 +1,75 @@
1
+ /**
2
+ * Vault API Validation Schemas
3
+ */
4
+ import { z } from "zod";
5
+ import { UUIDSchema } from "./trading";
6
+ /**
7
+ * Ethereum address validation
8
+ */
9
+ export const AddressSchema = z.string().regex(/^0x[a-fA-F0-9]{40}$/, {
10
+ message: "Must be a valid Ethereum address (e.g., '0x1234...5678')",
11
+ });
12
+ /**
13
+ * Positive BigInt validation
14
+ *
15
+ * Accepts either:
16
+ * - A positive integer string (e.g., "1000000000000000000" for 1 token with 18 decimals)
17
+ * - A positive bigint value (e.g., 1000000000000000000n)
18
+ *
19
+ * This flexibility allows validation of:
20
+ * - User input (strings from forms)
21
+ * - Parsed amounts (bigint from parseUnits())
22
+ *
23
+ * @example
24
+ * ```typescript
25
+ * // String input (from user)
26
+ * validate(PositiveBigIntStringSchema, "1000000");
27
+ *
28
+ * // BigInt input (from parseUnits)
29
+ * import { parseUnits } from 'viem';
30
+ * const amount = parseUnits("1.0", 18); // 1000000000000000000n
31
+ * validate(PositiveBigIntStringSchema, amount);
32
+ * ```
33
+ */
34
+ export const PositiveBigIntStringSchema = z.union([
35
+ z
36
+ .string()
37
+ .regex(/^\d+$/, "Must be a positive integer string")
38
+ .refine((val) => BigInt(val) > 0n, {
39
+ message: "Amount must be greater than 0",
40
+ }),
41
+ z.bigint().refine((val) => val > 0n, {
42
+ message: "Amount must be greater than 0",
43
+ }),
44
+ ]);
45
+ /**
46
+ * Approve Token validation schema
47
+ */
48
+ export const ApproveTokenSchema = z.object({
49
+ assetId: UUIDSchema,
50
+ amount: PositiveBigIntStringSchema,
51
+ autoWait: z.boolean().optional(),
52
+ });
53
+ /**
54
+ * Deposit validation schema
55
+ */
56
+ export const DepositSchema = z.object({
57
+ assetId: UUIDSchema,
58
+ amount: PositiveBigIntStringSchema,
59
+ autoWait: z.boolean().optional(),
60
+ });
61
+ /**
62
+ * Withdraw validation schema
63
+ */
64
+ export const WithdrawSchema = z.object({
65
+ assetId: UUIDSchema,
66
+ amount: PositiveBigIntStringSchema,
67
+ autoWait: z.boolean().optional(),
68
+ });
69
+ /**
70
+ * Get Balance validation schema
71
+ */
72
+ export const GetBalanceSchema = z.object({
73
+ assetId: UUIDSchema,
74
+ });
75
+ //# sourceMappingURL=vault.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"vault.js","sourceRoot":"","sources":["../../src/validation/vault.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AACxB,OAAO,EAAE,UAAU,EAAE,MAAM,WAAW,CAAC;AAEvC;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,EAAE,CAAC,KAAK,CAAC,qBAAqB,EAAE;IACnE,OAAO,EAAE,0DAA0D;CACpE,CAAC,CAAC;AAEH;;;;;;;;;;;;;;;;;;;;;GAqBG;AACH,MAAM,CAAC,MAAM,0BAA0B,GAAG,CAAC,CAAC,KAAK,CAAC;IAChD,CAAC;SACE,MAAM,EAAE;SACR,KAAK,CAAC,OAAO,EAAE,mCAAmC,CAAC;SACnD,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,MAAM,CAAC,GAAG,CAAC,GAAG,EAAE,EAAE;QACjC,OAAO,EAAE,+BAA+B;KACzC,CAAC;IACJ,CAAC,CAAC,MAAM,EAAE,CAAC,MAAM,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,GAAG,GAAG,EAAE,EAAE;QACnC,OAAO,EAAE,+BAA+B;KACzC,CAAC;CACH,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAAG,CAAC,CAAC,MAAM,CAAC;IACzC,OAAO,EAAE,UAAU;IACnB,MAAM,EAAE,0BAA0B;IAClC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,CAAC,MAAM,CAAC;IACpC,OAAO,EAAE,UAAU;IACnB,MAAM,EAAE,0BAA0B;IAClC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,cAAc,GAAG,CAAC,CAAC,MAAM,CAAC;IACrC,OAAO,EAAE,UAAU;IACnB,MAAM,EAAE,0BAA0B;IAClC,QAAQ,EAAE,CAAC,CAAC,OAAO,EAAE,CAAC,QAAQ,EAAE;CACjC,CAAC,CAAC;AAEH;;GAEG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAAC,CAAC,MAAM,CAAC;IACvC,OAAO,EAAE,UAAU;CACpB,CAAC,CAAC"}
@@ -0,0 +1,64 @@
1
+ /**
2
+ * Vault Types
3
+ *
4
+ * Types for vault operations including deposits, withdrawals, and balance management.
5
+ */
6
+ import type { BaseAPI } from "../api/index";
7
+ import type { Balance, TransactionResult } from "./responses";
8
+ /**
9
+ * Vault API interface.
10
+ * Provides methods for managing token deposits and withdrawals.
11
+ * Handles token approvals and balance management.
12
+ */
13
+ export interface VaultAPI extends BaseAPI {
14
+ /**
15
+ * Approves the vault to spend tokens.
16
+ * @param assetId - Asset identifier (UUID) to approve
17
+ * @param amount - Amount to approve
18
+ * @param autoWait - Whether to automatically wait for transaction confirmation (defaults to true)
19
+ * @returns Promise resolving to the transaction result
20
+ */
21
+ approve(assetId: string, amount: bigint, autoWait?: boolean): Promise<TransactionResult>;
22
+ /**
23
+ * Deposits tokens into the vault.
24
+ * @param assetId - Asset identifier (UUID) to deposit
25
+ * @param amount - Amount to deposit
26
+ * @param autoWait - Whether to automatically wait for transaction confirmation (defaults to true)
27
+ * @returns Promise resolving to the transaction result
28
+ */
29
+ deposit(assetId: string, amount: bigint, autoWait?: boolean): Promise<TransactionResult>;
30
+ /**
31
+ * Withdraws tokens from the vault.
32
+ * @param assetId - Asset identifier (UUID) to withdraw
33
+ * @param amount - Amount to withdraw
34
+ * @param autoWait - Whether to automatically wait for transaction confirmation (defaults to true)
35
+ * @returns Promise resolving to the transaction result
36
+ */
37
+ withdraw(assetId: string, amount: bigint, autoWait?: boolean): Promise<TransactionResult>;
38
+ /**
39
+ * Gets the balance of a token in the vault.
40
+ * @param assetId - Asset identifier (UUID) to check
41
+ * @returns Promise resolving to the balance
42
+ */
43
+ getBalance(assetId: string): Promise<Balance>;
44
+ /**
45
+ * Gets the allowance for a token.
46
+ * @param assetId - Asset identifier (UUID) to check
47
+ * @returns Promise resolving to the allowance
48
+ */
49
+ getAllowance(assetId: string): Promise<bigint>;
50
+ /**
51
+ * Checks if a token needs approval for an amount.
52
+ * @param assetId - Asset identifier (UUID) to check
53
+ * @param amount - Amount to check
54
+ * @returns Promise resolving to whether approval is needed
55
+ */
56
+ needsApproval(assetId: string, amount: bigint): Promise<boolean>;
57
+ /**
58
+ * Gets the address of the vault.
59
+ * @returns Promise resolving to the address of the vault
60
+ */
61
+ getVaultAddress(): Promise<string>;
62
+ }
63
+ export type { Balance, TransactionResult } from "./responses";
64
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/vault/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAC5C,OAAO,KAAK,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAE9D;;;;GAIG;AACH,MAAM,WAAW,QAAS,SAAQ,OAAO;IACvC;;;;;;OAMG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEzF;;;;;;OAMG;IACH,OAAO,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAEzF;;;;;;OAMG;IACH,QAAQ,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,OAAO,GAAG,OAAO,CAAC,iBAAiB,CAAC,CAAC;IAE1F;;;;OAIG;IACH,UAAU,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAE9C;;;;OAIG;IACH,YAAY,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC;IAE/C;;;;;OAKG;IACH,aAAa,CAAC,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC;IAEjE;;;OAGG;IACH,eAAe,IAAI,OAAO,CAAC,MAAM,CAAC,CAAC;CACpC;AAGD,YAAY,EAAE,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Vault Types
3
+ *
4
+ * Types for vault operations including deposits, withdrawals, and balance management.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/vault/index.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,34 @@
1
+ /**
2
+ * Vault Response Types
3
+ *
4
+ * Response types for vault operations.
5
+ */
6
+ /**
7
+ * Response from a transaction.
8
+ */
9
+ export interface TransactionResult {
10
+ /** Transaction hash */
11
+ hash: string;
12
+ /** Transaction status */
13
+ status: "pending" | "confirmed" | "failed";
14
+ /** Nonce used for this operation */
15
+ nonce: bigint;
16
+ /** Transaction receipt (only available when autoWait is enabled) */
17
+ receipt?: import("viem").TransactionReceipt;
18
+ }
19
+ /**
20
+ * Token balance information.
21
+ */
22
+ export interface Balance {
23
+ /** Token address */
24
+ token: string;
25
+ /** Balance amount */
26
+ amount: bigint;
27
+ /** Formatted balance string */
28
+ formatted: string;
29
+ /** Token symbol */
30
+ symbol: string;
31
+ /** Token decimals */
32
+ decimals: number;
33
+ }
34
+ //# sourceMappingURL=responses.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.d.ts","sourceRoot":"","sources":["../../src/vault/responses.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,uBAAuB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,yBAAyB;IACzB,MAAM,EAAE,SAAS,GAAG,WAAW,GAAG,QAAQ,CAAC;IAC3C,oCAAoC;IACpC,KAAK,EAAE,MAAM,CAAC;IACd,oEAAoE;IACpE,OAAO,CAAC,EAAE,OAAO,MAAM,EAAE,kBAAkB,CAAC;CAC7C;AAED;;GAEG;AACH,MAAM,WAAW,OAAO;IACtB,oBAAoB;IACpB,KAAK,EAAE,MAAM,CAAC;IACd,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,+BAA+B;IAC/B,SAAS,EAAE,MAAM,CAAC;IAClB,mBAAmB;IACnB,MAAM,EAAE,MAAM,CAAC;IACf,qBAAqB;IACrB,QAAQ,EAAE,MAAM,CAAC;CAClB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * Vault Response Types
3
+ *
4
+ * Response types for vault operations.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=responses.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"responses.js","sourceRoot":"","sources":["../../src/vault/responses.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * WebSocket Types
3
+ *
4
+ * Types for the functional Monaco WebSocket client.
5
+ */
6
+ /**
7
+ * WebSocket connection status
8
+ */
9
+ export type WebSocketStatus = "connected" | "connecting" | "disconnected" | "reconnecting";
10
+ /**
11
+ * Raw event message interface
12
+ * This is the raw message received from the backend
13
+ */
14
+ export interface RawEventMessage {
15
+ /** Channel name */
16
+ channel: string;
17
+ /** Event data */
18
+ data: unknown;
19
+ /** Event type */
20
+ type: string;
21
+ }
22
+ /**
23
+ * Base error event that can be used across different components
24
+ */
25
+ export interface BaseErrorEvent {
26
+ type: string;
27
+ message: string;
28
+ timestamp: number;
29
+ code?: string | number;
30
+ details?: unknown;
31
+ }
32
+ //# sourceMappingURL=base.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.d.ts","sourceRoot":"","sources":["../../src/websocket/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH;;GAEG;AACH,MAAM,MAAM,eAAe,GAAG,WAAW,GAAG,YAAY,GAAG,cAAc,GAAG,cAAc,CAAC;AAE3F;;;GAGG;AACH,MAAM,WAAW,eAAe;IAC9B,mBAAmB;IACnB,OAAO,EAAE,MAAM,CAAC;IAChB,iBAAiB;IACjB,IAAI,EAAE,OAAO,CAAC;IACd,iBAAiB;IACjB,IAAI,EAAE,MAAM,CAAC;CACd;AAED;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;IACvB,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * WebSocket Types
3
+ *
4
+ * Types for the functional Monaco WebSocket client.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=base.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"base.js","sourceRoot":"","sources":["../../src/websocket/base.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Orderbook Types
3
+ */
4
+ /**
5
+ * Quotation mode for orderbook subscription.
6
+ *
7
+ * - "BASE": Prices are displayed in the quote currency per unit of the base currency.
8
+ * For example, for the BTC/USD market, prices are shown as USD per BTC.
9
+ * - "QUOTE": Prices are displayed in the base currency per unit of the quote currency.
10
+ * For example, for the BTC/USD market, prices are shown as BTC per USD.
11
+ *
12
+ * Choose the mode based on how you want to interpret price levels in the orderbook.
13
+ */
14
+ export type OrderbookQuotationMode = "BASE" | "QUOTE";
15
+ //# sourceMappingURL=orderbook-client.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orderbook-client.d.ts","sourceRoot":"","sources":["../../../src/websocket/clients/orderbook-client.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH;;;;;;;;;GASG;AACH,MAAM,MAAM,sBAAsB,GAAG,MAAM,GAAG,OAAO,CAAC"}
@@ -0,0 +1,5 @@
1
+ /**
2
+ * Orderbook Types
3
+ */
4
+ export {};
5
+ //# sourceMappingURL=orderbook-client.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"orderbook-client.js","sourceRoot":"","sources":["../../../src/websocket/clients/orderbook-client.ts"],"names":[],"mappings":"AAAA;;GAEG"}
@@ -0,0 +1,6 @@
1
+ export * from "./movement-events";
2
+ export * from "./ohlcv-events";
3
+ export * from "./orderbook-events";
4
+ export * from "./orders-events";
5
+ export * from "./trade-events";
6
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/websocket/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,6 @@
1
+ export * from "./movement-events";
2
+ export * from "./ohlcv-events";
3
+ export * from "./orderbook-events";
4
+ export * from "./orders-events";
5
+ export * from "./trade-events";
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/websocket/events/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,gBAAgB,CAAC;AAC/B,cAAc,oBAAoB,CAAC;AACnC,cAAc,iBAAiB,CAAC;AAChC,cAAc,gBAAgB,CAAC"}
@@ -0,0 +1,53 @@
1
+ /**
2
+ * User Movement WebSocket Event Types
3
+ *
4
+ * Types for real-time user ledger movement events (deposits, withdrawals, transfers).
5
+ * This is an authenticated channel - requires JWT token.
6
+ */
7
+ /**
8
+ * User movement event data containing ledger entry details
9
+ */
10
+ export interface UserMovementEventData {
11
+ /** Unique movement identifier (UUID) */
12
+ id: string;
13
+ /** Entry type (e.g., "credit", "debit") */
14
+ entryType: string;
15
+ /** Transaction type (e.g., "deposit", "withdrawal", "trade") */
16
+ transactionType: string;
17
+ /** Token contract address */
18
+ tokenAddress: string;
19
+ /** Movement amount (decimal string) */
20
+ amount: string;
21
+ /** Raw amount (integer string, no decimals) - only available from WebSocket events */
22
+ amountRaw?: string;
23
+ /** Balance before this movement */
24
+ balanceBefore?: string;
25
+ /** Balance after this movement */
26
+ balanceAfter?: string;
27
+ /** Locked balance before this movement */
28
+ lockedBefore?: string;
29
+ /** Locked balance after this movement */
30
+ lockedAfter?: string;
31
+ /** Reference ID for related entity (UUID) */
32
+ referenceId?: string;
33
+ /** Reference type (e.g., "order", "deposit") */
34
+ referenceType?: string;
35
+ /** Human-readable description */
36
+ description?: string;
37
+ /** Transaction hash (if applicable) */
38
+ txHash?: string;
39
+ /** Timestamp when the movement was created (ISO 8601) */
40
+ createdAt?: string;
41
+ }
42
+ /**
43
+ * User movement event emitted when a user's ledger entry changes
44
+ */
45
+ export interface UserMovementEvent {
46
+ /** Event type identifier */
47
+ eventType: "movement";
48
+ /** User ID (UUID) */
49
+ userId: string;
50
+ /** Movement data */
51
+ data: UserMovementEventData;
52
+ }
53
+ //# sourceMappingURL=movement-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"movement-events.d.ts","sourceRoot":"","sources":["../../../src/websocket/events/movement-events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,WAAW,qBAAqB;IACpC,wCAAwC;IACxC,EAAE,EAAE,MAAM,CAAC;IACX,2CAA2C;IAC3C,SAAS,EAAE,MAAM,CAAC;IAClB,gEAAgE;IAChE,eAAe,EAAE,MAAM,CAAC;IACxB,6BAA6B;IAC7B,YAAY,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,MAAM,EAAE,MAAM,CAAC;IACf,sFAAsF;IACtF,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,mCAAmC;IACnC,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,kCAAkC;IAClC,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,0CAA0C;IAC1C,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,yCAAyC;IACzC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,6CAA6C;IAC7C,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,gDAAgD;IAChD,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,iCAAiC;IACjC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,uCAAuC;IACvC,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,yDAAyD;IACzD,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IAChC,4BAA4B;IAC5B,SAAS,EAAE,UAAU,CAAC;IACtB,qBAAqB;IACrB,MAAM,EAAE,MAAM,CAAC;IACf,oBAAoB;IACpB,IAAI,EAAE,qBAAqB,CAAC;CAC7B"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * User Movement WebSocket Event Types
3
+ *
4
+ * Types for real-time user ledger movement events (deposits, withdrawals, transfers).
5
+ * This is an authenticated channel - requires JWT token.
6
+ */
7
+ export {};
8
+ //# sourceMappingURL=movement-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"movement-events.js","sourceRoot":"","sources":["../../../src/websocket/events/movement-events.ts"],"names":[],"mappings":"AAAA;;;;;GAKG"}
@@ -0,0 +1,32 @@
1
+ /**
2
+ * OHLCV WebSocket Event Types
3
+ *
4
+ * Types for OHLCV (Open, High, Low, Close, Volume) candlestick data events.
5
+ */
6
+ import type { Candlestick, Interval } from "../../market";
7
+ import type { TradingMode } from "../../trading";
8
+ /**
9
+ * OHLCV update event
10
+ */
11
+ export interface OHLCVEvent {
12
+ /** Trading pair ID (UUID) */
13
+ tradingPairId: string;
14
+ /** Candlestick interval */
15
+ interval: Interval;
16
+ /** Trading mode */
17
+ tradingMode: TradingMode;
18
+ /** OHLCV candlestick data */
19
+ candlestick: Candlestick;
20
+ }
21
+ /**
22
+ * OHLCV subscription configuration
23
+ */
24
+ export interface OHLCVSubscriptionConfig {
25
+ /** Trading pair ID (UUID) */
26
+ tradingPairId: string;
27
+ /** Trading mode */
28
+ tradingMode: TradingMode;
29
+ /** Candlestick interval */
30
+ interval: Interval;
31
+ }
32
+ //# sourceMappingURL=ohlcv-events.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ohlcv-events.d.ts","sourceRoot":"","sources":["../../../src/websocket/events/ohlcv-events.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,KAAK,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAC1D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;GAEG;AACH,MAAM,WAAW,UAAU;IACzB,6BAA6B;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,2BAA2B;IAC3B,QAAQ,EAAE,QAAQ,CAAC;IACnB,mBAAmB;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,6BAA6B;IAC7B,WAAW,EAAE,WAAW,CAAC;CAC1B;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACtC,6BAA6B;IAC7B,aAAa,EAAE,MAAM,CAAC;IACtB,mBAAmB;IACnB,WAAW,EAAE,WAAW,CAAC;IACzB,2BAA2B;IAC3B,QAAQ,EAAE,QAAQ,CAAC;CACpB"}
@@ -0,0 +1,7 @@
1
+ /**
2
+ * OHLCV WebSocket Event Types
3
+ *
4
+ * Types for OHLCV (Open, High, Low, Close, Volume) candlestick data events.
5
+ */
6
+ export {};
7
+ //# sourceMappingURL=ohlcv-events.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ohlcv-events.js","sourceRoot":"","sources":["../../../src/websocket/events/ohlcv-events.ts"],"names":[],"mappings":"AAAA;;;;GAIG"}