@ryanrfox/sdk 0.0.2 → 2.0.3

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 (153) hide show
  1. package/README.md +145 -29
  2. package/package.json +84 -8
  3. package/src/_esm/actions/index.d.ts +8 -0
  4. package/src/_esm/actions/index.d.ts.map +1 -0
  5. package/src/_esm/actions/index.js +8 -0
  6. package/src/_esm/actions/index.js.map +1 -0
  7. package/src/_esm/actions/sendTransactionBatch.d.ts +77 -0
  8. package/src/_esm/actions/sendTransactionBatch.d.ts.map +1 -0
  9. package/src/_esm/actions/sendTransactionBatch.js +245 -0
  10. package/src/_esm/actions/sendTransactionBatch.js.map +1 -0
  11. package/src/_esm/chains/chainConfig.d.ts +30 -0
  12. package/src/_esm/chains/chainConfig.d.ts.map +1 -0
  13. package/src/_esm/chains/chainConfig.js +30 -0
  14. package/src/_esm/chains/chainConfig.js.map +1 -0
  15. package/src/_esm/chains/index.d.ts +4 -0
  16. package/src/_esm/chains/index.d.ts.map +1 -0
  17. package/src/_esm/chains/index.js +4 -0
  18. package/src/_esm/chains/index.js.map +1 -0
  19. package/src/_esm/chains/radius.d.ts +64 -0
  20. package/src/_esm/chains/radius.d.ts.map +1 -0
  21. package/src/_esm/chains/radius.js +39 -0
  22. package/src/_esm/chains/radius.js.map +1 -0
  23. package/src/_esm/chains/radiusTestnet.d.ts +61 -0
  24. package/src/_esm/chains/radiusTestnet.d.ts.map +1 -0
  25. package/src/_esm/chains/radiusTestnet.js +45 -0
  26. package/src/_esm/chains/radiusTestnet.js.map +1 -0
  27. package/src/_esm/decorators/index.d.ts +8 -0
  28. package/src/_esm/decorators/index.d.ts.map +1 -0
  29. package/src/_esm/decorators/index.js +8 -0
  30. package/src/_esm/decorators/index.js.map +1 -0
  31. package/src/_esm/decorators/radius.d.ts +66 -0
  32. package/src/_esm/decorators/radius.d.ts.map +1 -0
  33. package/src/_esm/decorators/radius.js +36 -0
  34. package/src/_esm/decorators/radius.js.map +1 -0
  35. package/src/_esm/errors/account.d.ts +78 -0
  36. package/src/_esm/errors/account.d.ts.map +1 -0
  37. package/src/_esm/errors/account.js +97 -0
  38. package/src/_esm/errors/account.js.map +1 -0
  39. package/src/_esm/errors/base.d.ts +56 -0
  40. package/src/_esm/errors/base.d.ts.map +1 -0
  41. package/src/_esm/errors/base.js +51 -0
  42. package/src/_esm/errors/base.js.map +1 -0
  43. package/src/_esm/errors/contract.d.ts +51 -0
  44. package/src/_esm/errors/contract.d.ts.map +1 -0
  45. package/src/_esm/errors/contract.js +65 -0
  46. package/src/_esm/errors/contract.js.map +1 -0
  47. package/src/_esm/errors/index.d.ts +63 -0
  48. package/src/_esm/errors/index.d.ts.map +1 -0
  49. package/src/_esm/errors/index.js +40 -0
  50. package/src/_esm/errors/index.js.map +1 -0
  51. package/src/_esm/errors/transaction.d.ts +132 -0
  52. package/src/_esm/errors/transaction.d.ts.map +1 -0
  53. package/src/_esm/errors/transaction.js +143 -0
  54. package/src/_esm/errors/transaction.js.map +1 -0
  55. package/src/_esm/events/decodeEventLogs.d.ts +136 -0
  56. package/src/_esm/events/decodeEventLogs.d.ts.map +1 -0
  57. package/src/_esm/events/decodeEventLogs.js +93 -0
  58. package/src/_esm/events/decodeEventLogs.js.map +1 -0
  59. package/src/_esm/events/getLogs.d.ts +137 -0
  60. package/src/_esm/events/getLogs.d.ts.map +1 -0
  61. package/src/_esm/events/getLogs.js +171 -0
  62. package/src/_esm/events/getLogs.js.map +1 -0
  63. package/src/_esm/events/index.d.ts +17 -0
  64. package/src/_esm/events/index.d.ts.map +1 -0
  65. package/src/_esm/events/index.js +24 -0
  66. package/src/_esm/events/index.js.map +1 -0
  67. package/src/_esm/events/watchApproval.d.ts +184 -0
  68. package/src/_esm/events/watchApproval.d.ts.map +1 -0
  69. package/src/_esm/events/watchApproval.js +254 -0
  70. package/src/_esm/events/watchApproval.js.map +1 -0
  71. package/src/_esm/events/watchBlock.d.ts +192 -0
  72. package/src/_esm/events/watchBlock.d.ts.map +1 -0
  73. package/src/_esm/events/watchBlock.js +162 -0
  74. package/src/_esm/events/watchBlock.js.map +1 -0
  75. package/src/_esm/events/watchLogs.d.ts +128 -0
  76. package/src/_esm/events/watchLogs.d.ts.map +1 -0
  77. package/src/_esm/events/watchLogs.js +100 -0
  78. package/src/_esm/events/watchLogs.js.map +1 -0
  79. package/src/_esm/events/watchTransfer.d.ts +164 -0
  80. package/src/_esm/events/watchTransfer.d.ts.map +1 -0
  81. package/src/_esm/events/watchTransfer.js +234 -0
  82. package/src/_esm/events/watchTransfer.js.map +1 -0
  83. package/src/_esm/index.d.ts +16 -0
  84. package/src/_esm/index.d.ts.map +1 -0
  85. package/src/_esm/index.js +22 -0
  86. package/src/_esm/index.js.map +1 -0
  87. package/src/_esm/package.json +1 -0
  88. package/src/_esm/transport/index.d.ts +9 -0
  89. package/src/_esm/transport/index.d.ts.map +1 -0
  90. package/src/_esm/transport/index.js +9 -0
  91. package/src/_esm/transport/index.js.map +1 -0
  92. package/src/_esm/transport/interceptor.d.ts +48 -0
  93. package/src/_esm/transport/interceptor.d.ts.map +1 -0
  94. package/src/_esm/transport/interceptor.js +209 -0
  95. package/src/_esm/transport/interceptor.js.map +1 -0
  96. package/src/_esm/transport/types.d.ts +29 -0
  97. package/src/_esm/transport/types.d.ts.map +1 -0
  98. package/src/_esm/transport/types.js +2 -0
  99. package/src/_esm/transport/types.js.map +1 -0
  100. package/src/_esm/transport/websocket.d.ts +51 -0
  101. package/src/_esm/transport/websocket.d.ts.map +1 -0
  102. package/src/_esm/transport/websocket.js +70 -0
  103. package/src/_esm/transport/websocket.js.map +1 -0
  104. package/src/_types/actions/index.d.ts +8 -0
  105. package/src/_types/actions/index.d.ts.map +1 -0
  106. package/src/_types/actions/sendTransactionBatch.d.ts +77 -0
  107. package/src/_types/actions/sendTransactionBatch.d.ts.map +1 -0
  108. package/src/_types/chains/chainConfig.d.ts +30 -0
  109. package/src/_types/chains/chainConfig.d.ts.map +1 -0
  110. package/src/_types/chains/index.d.ts +4 -0
  111. package/src/_types/chains/index.d.ts.map +1 -0
  112. package/src/_types/chains/radius.d.ts +64 -0
  113. package/src/_types/chains/radius.d.ts.map +1 -0
  114. package/src/_types/chains/radiusTestnet.d.ts +61 -0
  115. package/src/_types/chains/radiusTestnet.d.ts.map +1 -0
  116. package/src/_types/decorators/index.d.ts +8 -0
  117. package/src/_types/decorators/index.d.ts.map +1 -0
  118. package/src/_types/decorators/radius.d.ts +66 -0
  119. package/src/_types/decorators/radius.d.ts.map +1 -0
  120. package/src/_types/errors/account.d.ts +78 -0
  121. package/src/_types/errors/account.d.ts.map +1 -0
  122. package/src/_types/errors/base.d.ts +56 -0
  123. package/src/_types/errors/base.d.ts.map +1 -0
  124. package/src/_types/errors/contract.d.ts +51 -0
  125. package/src/_types/errors/contract.d.ts.map +1 -0
  126. package/src/_types/errors/index.d.ts +63 -0
  127. package/src/_types/errors/index.d.ts.map +1 -0
  128. package/src/_types/errors/transaction.d.ts +132 -0
  129. package/src/_types/errors/transaction.d.ts.map +1 -0
  130. package/src/_types/events/decodeEventLogs.d.ts +136 -0
  131. package/src/_types/events/decodeEventLogs.d.ts.map +1 -0
  132. package/src/_types/events/getLogs.d.ts +137 -0
  133. package/src/_types/events/getLogs.d.ts.map +1 -0
  134. package/src/_types/events/index.d.ts +17 -0
  135. package/src/_types/events/index.d.ts.map +1 -0
  136. package/src/_types/events/watchApproval.d.ts +184 -0
  137. package/src/_types/events/watchApproval.d.ts.map +1 -0
  138. package/src/_types/events/watchBlock.d.ts +192 -0
  139. package/src/_types/events/watchBlock.d.ts.map +1 -0
  140. package/src/_types/events/watchLogs.d.ts +128 -0
  141. package/src/_types/events/watchLogs.d.ts.map +1 -0
  142. package/src/_types/events/watchTransfer.d.ts +164 -0
  143. package/src/_types/events/watchTransfer.d.ts.map +1 -0
  144. package/src/_types/index.d.ts +16 -0
  145. package/src/_types/index.d.ts.map +1 -0
  146. package/src/_types/transport/index.d.ts +9 -0
  147. package/src/_types/transport/index.d.ts.map +1 -0
  148. package/src/_types/transport/interceptor.d.ts +48 -0
  149. package/src/_types/transport/interceptor.d.ts.map +1 -0
  150. package/src/_types/transport/types.d.ts +29 -0
  151. package/src/_types/transport/types.d.ts.map +1 -0
  152. package/src/_types/transport/websocket.d.ts +51 -0
  153. package/src/_types/transport/websocket.d.ts.map +1 -0
@@ -0,0 +1,184 @@
1
+ /**
2
+ * ERC-20 Approval event watching utilities for Radius SDK.
3
+ * Provides convenient wrappers for watching Approval events in real-time.
4
+ */
5
+ import type { Address, Log, PublicClient, WatchContractEventReturnType } from 'viem';
6
+ /**
7
+ * Decoded Approval event data.
8
+ */
9
+ export interface ApprovalEvent {
10
+ /** The address that owns the tokens */
11
+ owner: Address;
12
+ /** The address that is approved to spend the tokens */
13
+ spender: Address;
14
+ /** The amount of tokens approved (in smallest unit) */
15
+ value: bigint;
16
+ /** The raw log data */
17
+ log: Log;
18
+ }
19
+ /**
20
+ * Parameters for watching Approval events.
21
+ */
22
+ export interface WatchApprovalParameters {
23
+ /** The ERC-20 token contract address to watch */
24
+ address: Address;
25
+ /** Optional: Filter by owner address */
26
+ owner?: Address;
27
+ /** Optional: Filter by spender address */
28
+ spender?: Address;
29
+ /** Callback function invoked when Approval events are received */
30
+ onApproval: (events: ApprovalEvent[]) => void;
31
+ /** Callback function invoked when an error occurs */
32
+ onError?: (error: Error) => void;
33
+ /** Whether to emit logs from the latest block on subscription start */
34
+ sync?: boolean;
35
+ /** Polling interval in milliseconds (for HTTP transport fallback) */
36
+ pollingInterval?: number;
37
+ }
38
+ /**
39
+ * Watches for ERC-20 Approval events in real-time.
40
+ * Automatically decodes Approval events and provides type-safe callbacks.
41
+ *
42
+ * @param client - The PublicClient to use (WebSocket transport recommended)
43
+ * @param params - Approval event watching parameters
44
+ * @returns An unwatch function to stop the subscription
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * import { createPublicClient } from 'viem';
49
+ * import { createWebSocketTransport, watchApproval } from '@radiustechsystems/sdk/events';
50
+ * import { radiusTestnet } from '@radiustechsystems/sdk/chains';
51
+ *
52
+ * const client = createPublicClient({
53
+ * chain: radiusTestnet,
54
+ * transport: createWebSocketTransport(radiusTestnet),
55
+ * });
56
+ *
57
+ * // Watch all approvals for a token
58
+ * const unwatch = watchApproval(client, {
59
+ * address: '0x...', // Token address
60
+ * onApproval: (events) => {
61
+ * events.forEach(event => {
62
+ * console.log(`Approval: ${event.owner} approved ${event.spender} for ${event.value}`);
63
+ * });
64
+ * },
65
+ * });
66
+ *
67
+ * // Watch approvals from a specific owner
68
+ * const unwatchOwner = watchApproval(client, {
69
+ * address: '0x...', // Token address
70
+ * owner: '0x...', // Owner address
71
+ * onApproval: (events) => {
72
+ * console.log(`Owner granted ${events.length} approvals`);
73
+ * },
74
+ * });
75
+ *
76
+ * // Watch approvals for a specific spender
77
+ * const unwatchSpender = watchApproval(client, {
78
+ * address: '0x...', // Token address
79
+ * spender: '0x...', // Spender address
80
+ * onApproval: (events) => {
81
+ * console.log(`Spender received ${events.length} approvals`);
82
+ * },
83
+ * });
84
+ *
85
+ * // Stop watching
86
+ * unwatch();
87
+ * ```
88
+ *
89
+ * @remarks
90
+ * - Requires WebSocket transport for real-time subscriptions
91
+ * - Automatically decodes Approval events using ERC-20 ABI
92
+ * - Filters by owner/spender addresses if provided
93
+ * - Event signature: Approval(address indexed owner, address indexed spender, uint256 value)
94
+ * - Subscriptions consume gas from your RPC key on Radius (10 GAS/sec)
95
+ * - An approval value of 0 revokes the approval
96
+ */
97
+ export declare function watchApproval(client: PublicClient, params: WatchApprovalParameters): WatchContractEventReturnType;
98
+ /**
99
+ * Parameters for watching Approval events for a specific address (as owner or spender).
100
+ */
101
+ export interface WatchApprovalForAddressParameters {
102
+ /** The ERC-20 token contract address to watch */
103
+ tokenAddress: Address;
104
+ /** The address to watch (as owner or spender) */
105
+ watchAddress: Address;
106
+ /** Whether to watch as owner only (default: false, watches both owner and spender) */
107
+ ownerOnly?: boolean;
108
+ /** Whether to watch as spender only (default: false, watches both owner and spender) */
109
+ spenderOnly?: boolean;
110
+ /** Callback function invoked when Approval events are received */
111
+ onApproval: (events: ApprovalEvent[]) => void;
112
+ /** Callback function invoked when an error occurs */
113
+ onError?: (error: Error) => void;
114
+ /** Whether to emit logs from the latest block on subscription start */
115
+ sync?: boolean;
116
+ /** Polling interval in milliseconds (for HTTP transport fallback) */
117
+ pollingInterval?: number;
118
+ }
119
+ /**
120
+ * Watches for Approval events involving a specific address (as owner or spender).
121
+ * Convenience wrapper around watchApproval for monitoring a single address.
122
+ *
123
+ * @param client - The PublicClient to use (WebSocket transport recommended)
124
+ * @param params - Approval watching parameters for specific address
125
+ * @returns An unwatch function to stop the subscription
126
+ *
127
+ * @example
128
+ * ```typescript
129
+ * import { createPublicClient } from 'viem';
130
+ * import { createWebSocketTransport, watchApprovalForAddress } from '@radiustechsystems/sdk/events';
131
+ * import { radiusTestnet } from '@radiustechsystems/sdk/chains';
132
+ *
133
+ * const client = createPublicClient({
134
+ * chain: radiusTestnet,
135
+ * transport: createWebSocketTransport(radiusTestnet),
136
+ * });
137
+ *
138
+ * // Watch all approvals involving an address (as owner or spender)
139
+ * const unwatch = watchApprovalForAddress(client, {
140
+ * tokenAddress: '0x...', // Token address
141
+ * watchAddress: '0x...', // Address to monitor
142
+ * onApproval: (events) => {
143
+ * events.forEach(event => {
144
+ * if (event.owner === watchAddress) {
145
+ * console.log(`Approved ${event.spender} for ${event.value}`);
146
+ * } else {
147
+ * console.log(`Received approval from ${event.owner} for ${event.value}`);
148
+ * }
149
+ * });
150
+ * },
151
+ * });
152
+ *
153
+ * // Watch only approvals granted by an address (as owner)
154
+ * const unwatchAsOwner = watchApprovalForAddress(client, {
155
+ * tokenAddress: '0x...',
156
+ * watchAddress: '0x...',
157
+ * ownerOnly: true,
158
+ * onApproval: (events) => {
159
+ * console.log(`Granted ${events.length} approvals`);
160
+ * },
161
+ * });
162
+ *
163
+ * // Watch only approvals received by an address (as spender)
164
+ * const unwatchAsSpender = watchApprovalForAddress(client, {
165
+ * tokenAddress: '0x...',
166
+ * watchAddress: '0x...',
167
+ * spenderOnly: true,
168
+ * onApproval: (events) => {
169
+ * console.log(`Received ${events.length} approvals`);
170
+ * },
171
+ * });
172
+ *
173
+ * // Stop watching
174
+ * unwatch();
175
+ * ```
176
+ *
177
+ * @remarks
178
+ * - If neither ownerOnly nor spenderOnly is set, watches both roles
179
+ * - Cannot set both ownerOnly and spenderOnly to true
180
+ * - More efficient than watching all approvals and filtering client-side
181
+ * - Server-side filtering reduces network traffic and processing
182
+ */
183
+ export declare function watchApprovalForAddress(client: PublicClient, params: WatchApprovalForAddressParameters): WatchContractEventReturnType;
184
+ //# sourceMappingURL=watchApproval.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchApproval.d.ts","sourceRoot":"","sources":["../../events/watchApproval.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,4BAA4B,EAAE,MAAM,MAAM,CAAC;AAGrF;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,uCAAuC;IACvC,KAAK,EAAE,OAAO,CAAC;IACf,uDAAuD;IACvD,OAAO,EAAE,OAAO,CAAC;IACjB,uDAAuD;IACvD,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,GAAG,EAAE,GAAG,CAAC;CACT;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC,iDAAiD;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,wCAAwC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,0CAA0C;IAC1C,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kEAAkE;IAClE,UAAU,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAC9C,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0DG;AACH,wBAAgB,aAAa,CAC5B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,uBAAuB,GAC7B,4BAA4B,CA+C9B;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD,iDAAiD;IACjD,YAAY,EAAE,OAAO,CAAC;IACtB,iDAAiD;IACjD,YAAY,EAAE,OAAO,CAAC;IACtB,sFAAsF;IACtF,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,wFAAwF;IACxF,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kEAAkE;IAClE,UAAU,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAC9C,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA+DG;AACH,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,iCAAiC,GACvC,4BAA4B,CAyF9B"}
@@ -0,0 +1,192 @@
1
+ /**
2
+ * Block watching utilities for Radius SDK.
3
+ * Provides wrappers for watching new blocks in real-time.
4
+ *
5
+ * @remarks Radius-Specific Limitations
6
+ *
7
+ * **HTTP Polling (Current Implementation)**:
8
+ * - Radius does NOT support `newHeads` WebSocket subscriptions
9
+ * - `eth_subscribe` only supports "logs" type subscriptions (not newHeads, not newPendingTransactions)
10
+ * - WebSocket is NOT currently enabled on Radius testnet
11
+ * - Default polling interval: 1000ms (1 second)
12
+ * - Uses HTTP-based polling to detect new blocks as a fallback mechanism
13
+ *
14
+ * **Future Considerations**:
15
+ * - When WebSocket is enabled on Radius, this module can be updated to use native subscriptions
16
+ * - Review implementation in watchLogs.ts as a reference for WebSocket usage patterns
17
+ */
18
+ import type { Block, PublicClient } from 'viem';
19
+ /**
20
+ * Default polling interval for block watching in milliseconds.
21
+ * Used when polling is required (e.g., HTTP transport fallback).
22
+ * Can be overridden per watch call via pollingInterval parameter.
23
+ */
24
+ export declare const DEFAULT_POLLING_INTERVAL_MS = 1000;
25
+ /**
26
+ * Parameters for watching new block numbers.
27
+ */
28
+ export interface WatchBlockNumberParams {
29
+ /** Callback function invoked when a new block number is detected */
30
+ onBlockNumber: (blockNumber: bigint) => void;
31
+ /** Callback function invoked when an error occurs */
32
+ onError?: (error: Error) => void;
33
+ /** Whether to emit the current block number on subscription start */
34
+ emitOnBegin?: boolean;
35
+ /** Polling interval in milliseconds (default: 1000ms for HTTP, real-time for WebSocket) */
36
+ pollingInterval?: number;
37
+ }
38
+ /**
39
+ * Watches for new block numbers.
40
+ * Uses WebSocket subscriptions when available, falls back to polling for HTTP transport.
41
+ *
42
+ * @param client - The PublicClient to use
43
+ * @param params - Block number watching parameters
44
+ * @returns An unwatch function to stop watching
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * import { createPublicClient } from 'viem';
49
+ * import { createWebSocketTransport, watchBlockNumber } from '@radiustechsystems/sdk/events';
50
+ * import { radiusTestnet } from '@radiustechsystems/sdk/chains';
51
+ *
52
+ * const client = createPublicClient({
53
+ * chain: radiusTestnet,
54
+ * transport: createWebSocketTransport(radiusTestnet),
55
+ * });
56
+ *
57
+ * // Watch for new blocks
58
+ * const unwatch = watchBlockNumber(client, {
59
+ * onBlockNumber: (blockNumber) => {
60
+ * console.log('New block:', blockNumber);
61
+ * },
62
+ * onError: (error) => {
63
+ * console.error('Error:', error);
64
+ * },
65
+ * });
66
+ *
67
+ * // Stop watching
68
+ * unwatch();
69
+ * ```
70
+ *
71
+ * @remarks
72
+ * - WebSocket transport provides real-time block notifications
73
+ * - HTTP transport falls back to polling (default 1s interval)
74
+ * - Radius does not support eth_newBlockFilter (traditional filter API)
75
+ * - WebSocket subscriptions are more efficient than polling
76
+ * - For HTTP clients, consider increasing pollingInterval to reduce load
77
+ */
78
+ export declare function watchBlockNumber(client: PublicClient, params: WatchBlockNumberParams): () => void;
79
+ /**
80
+ * Parameters for watching new blocks (full block data).
81
+ */
82
+ export interface WatchBlocksParams {
83
+ /** Callback function invoked when a new block is detected */
84
+ onBlock: (block: Block) => void;
85
+ /** Callback function invoked when an error occurs */
86
+ onError?: (error: Error) => void;
87
+ /** Whether to emit the current block on subscription start */
88
+ emitOnBegin?: boolean;
89
+ /** Whether to include transactions in the block (default: false) */
90
+ includeTransactions?: boolean;
91
+ /** Polling interval in milliseconds (default: 1000ms for HTTP, real-time for WebSocket) */
92
+ pollingInterval?: number;
93
+ }
94
+ /**
95
+ * Watches for new blocks with full block data.
96
+ * Uses WebSocket subscriptions when available, falls back to polling for HTTP transport.
97
+ *
98
+ * @param client - The PublicClient to use
99
+ * @param params - Block watching parameters
100
+ * @returns An unwatch function to stop watching
101
+ *
102
+ * @example
103
+ * ```typescript
104
+ * import { createPublicClient } from 'viem';
105
+ * import { createWebSocketTransport, watchBlocks } from '@radiustechsystems/sdk/events';
106
+ * import { radiusTestnet } from '@radiustechsystems/sdk/chains';
107
+ *
108
+ * const client = createPublicClient({
109
+ * chain: radiusTestnet,
110
+ * transport: createWebSocketTransport(radiusTestnet),
111
+ * });
112
+ *
113
+ * // Watch for new blocks
114
+ * const unwatch = watchBlocks(client, {
115
+ * onBlock: (block) => {
116
+ * console.log('New block:', block.number);
117
+ * console.log('Timestamp:', block.timestamp);
118
+ * console.log('Transactions:', block.transactions.length);
119
+ * },
120
+ * });
121
+ *
122
+ * // Watch blocks with full transaction data
123
+ * const unwatchWithTxs = watchBlocks(client, {
124
+ * includeTransactions: true,
125
+ * onBlock: (block) => {
126
+ * console.log('New block with', block.transactions.length, 'transactions');
127
+ * // block.transactions contains full transaction objects
128
+ * },
129
+ * });
130
+ *
131
+ * // Stop watching
132
+ * unwatch();
133
+ * ```
134
+ *
135
+ * @remarks
136
+ * - WebSocket transport provides real-time block notifications
137
+ * - HTTP transport falls back to polling (default 1s interval)
138
+ * - includeTransactions=true fetches full transaction data (slower)
139
+ * - includeTransactions=false only includes transaction hashes (faster, default)
140
+ * - WebSocket is recommended for real-time block monitoring
141
+ * - Polling with includeTransactions=true can be expensive
142
+ */
143
+ export declare function watchBlocks(client: PublicClient, params: WatchBlocksParams): () => void;
144
+ /**
145
+ * Parameters for watching pending transactions.
146
+ */
147
+ export interface WatchPendingTransactionsParams {
148
+ /** Callback function invoked when new pending transactions are detected */
149
+ onTransactions: (hashes: `0x${string}`[]) => void;
150
+ /** Callback function invoked when an error occurs */
151
+ onError?: (error: Error) => void;
152
+ /** Polling interval in milliseconds (required for HTTP transport) */
153
+ pollingInterval?: number;
154
+ }
155
+ /**
156
+ * Watches for pending transactions in the mempool.
157
+ *
158
+ * @param client - The PublicClient to use
159
+ * @param params - Pending transaction watching parameters
160
+ * @returns An unwatch function to stop watching
161
+ *
162
+ * @example
163
+ * ```typescript
164
+ * import { createPublicClient } from 'viem';
165
+ * import { createWebSocketTransport, watchPendingTransactions } from '@radiustechsystems/sdk/events';
166
+ * import { radiusTestnet } from '@radiustechsystems/sdk/chains';
167
+ *
168
+ * const client = createPublicClient({
169
+ * chain: radiusTestnet,
170
+ * transport: createWebSocketTransport(radiusTestnet),
171
+ * });
172
+ *
173
+ * // Watch for pending transactions
174
+ * const unwatch = watchPendingTransactions(client, {
175
+ * onTransactions: (hashes) => {
176
+ * console.log('New pending transactions:', hashes);
177
+ * },
178
+ * });
179
+ *
180
+ * // Stop watching
181
+ * unwatch();
182
+ * ```
183
+ *
184
+ * @remarks
185
+ * - LIMITATION: Radius does not support eth_newPendingTransactionFilter
186
+ * - This function may not work as expected on Radius
187
+ * - WebSocket transport with "pendingTransactions" subscription is not supported
188
+ * - Consider using block watching and filtering confirmed transactions instead
189
+ * - This is provided for API completeness but may have limited functionality
190
+ */
191
+ export declare function watchPendingTransactions(client: PublicClient, params: WatchPendingTransactionsParams): () => void;
192
+ //# sourceMappingURL=watchBlock.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchBlock.d.ts","sourceRoot":"","sources":["../../events/watchBlock.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;GAgBG;AACH,OAAO,KAAK,EAAE,KAAK,EAAE,YAAY,EAAqD,MAAM,MAAM,CAAC;AAEnG;;;;GAIG;AACH,eAAO,MAAM,2BAA2B,OAAO,CAAC;AAEhD;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,oEAAoE;IACpE,aAAa,EAAE,CAAC,WAAW,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,qEAAqE;IACrE,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,2FAA2F;IAC3F,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAuCG;AACH,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,sBAAsB,GAAG,MAAM,IAAI,CASjG;AAED;;GAEG;AACH,MAAM,WAAW,iBAAiB;IACjC,6DAA6D;IAC7D,OAAO,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAChC,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,8DAA8D;IAC9D,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,oEAAoE;IACpE,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,2FAA2F;IAC3F,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,WAAW,CAAC,MAAM,EAAE,YAAY,EAAE,MAAM,EAAE,iBAAiB,GAAG,MAAM,IAAI,CAevF;AAED;;GAEG;AACH,MAAM,WAAW,8BAA8B;IAC9C,2EAA2E;IAC3E,cAAc,EAAE,CAAC,MAAM,EAAE,KAAK,MAAM,EAAE,EAAE,KAAK,IAAI,CAAC;IAClD,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAmCG;AACH,wBAAgB,wBAAwB,CACvC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,8BAA8B,GACpC,MAAM,IAAI,CAMZ"}
@@ -0,0 +1,128 @@
1
+ /**
2
+ * Generic log watching utilities for Radius SDK.
3
+ * Provides real-time event subscription capabilities using WebSocket.
4
+ *
5
+ * @remarks Radius-Specific Limitations and Requirements
6
+ *
7
+ * **WebSocket Subscriptions (eth_subscribe)**:
8
+ * - BOTH address AND topics are mandatory when using `eth_subscribe` with "logs" type
9
+ * - Partial filtering (address-only or topics-only) may not work as expected
10
+ * - Currently supported only via WebSocket transport (not HTTP)
11
+ * - WebSocket is NOT currently enabled on Radius testnet
12
+ *
13
+ * **Recommended Approach**:
14
+ * - For now, use HTTP polling with eth_getLogs (see watchLogs and watchRawLogs functions)
15
+ * - HTTP polling is the most reliable approach until WebSocket is enabled
16
+ * - When WebSocket becomes available on testnet, these functions can leverage native subscriptions
17
+ *
18
+ * **Important Note**:
19
+ * - The address parameter is mandatory in all log filters on Radius
20
+ * - Filters without address will fail with error "Filters without addresses are not supported"
21
+ */
22
+ import type { Address, Hash, Log, PublicClient, WatchContractEventReturnType } from 'viem';
23
+ import { watchContractEvent } from 'viem/actions';
24
+ /**
25
+ * Watches for contract events in real-time using WebSocket subscriptions.
26
+ * Uses viem's watchContractEvent under the hood, which leverages eth_subscribe for "logs".
27
+ *
28
+ * @param client - The PublicClient to use (must be configured with WebSocket transport)
29
+ * @param params - Event watching parameters including address, ABI, event name, and callback
30
+ * @returns An unwatch function to stop the subscription
31
+ *
32
+ * @example
33
+ * ```typescript
34
+ * import { createPublicClient } from 'viem';
35
+ * import { createWebSocketTransport, watchLogs } from '@radiustechsystems/sdk/events';
36
+ * import { radiusTestnet } from '@radiustechsystems/sdk/chains';
37
+ *
38
+ * // Create client with WebSocket transport
39
+ * const client = createPublicClient({
40
+ * chain: radiusTestnet,
41
+ * transport: createWebSocketTransport(radiusTestnet),
42
+ * });
43
+ *
44
+ * // Watch for events
45
+ * const unwatch = watchLogs(client, {
46
+ * address: '0x...',
47
+ * abi: contractAbi,
48
+ * eventName: 'Transfer',
49
+ * onLogs: (logs) => {
50
+ * console.log('Transfer events:', logs);
51
+ * },
52
+ * });
53
+ *
54
+ * // Stop watching
55
+ * unwatch();
56
+ * ```
57
+ *
58
+ * @remarks
59
+ * - Requires WebSocket transport for real-time subscriptions
60
+ * - Radius supports eth_subscribe with type "logs" only
61
+ * - Address parameter is mandatory on Radius
62
+ * - Subscriptions consume gas from your RPC key (10 GAS/sec)
63
+ * - Automatically cleaned up on disconnect
64
+ * - For HTTP transport, consider using getLogs with polling instead
65
+ */
66
+ export declare function watchLogs(client: PublicClient, params: Parameters<typeof watchContractEvent>[1]): WatchContractEventReturnType;
67
+ /**
68
+ * Parameters for watching raw logs without ABI decoding.
69
+ */
70
+ export interface WatchRawLogsParameters {
71
+ /** The contract address to watch */
72
+ address: Address | Address[];
73
+ /** Optional event signature hashes to filter by */
74
+ topics?: Hash[][];
75
+ /** Callback function invoked when logs are received */
76
+ onLogs: (logs: Log[]) => void;
77
+ /** Callback function invoked when an error occurs */
78
+ onError?: (error: Error) => void;
79
+ /** Whether to emit logs from the latest block on subscription start */
80
+ sync?: boolean;
81
+ /** Polling interval in milliseconds (for HTTP transport fallback) */
82
+ pollingInterval?: number;
83
+ }
84
+ /**
85
+ * Watches for raw logs without ABI decoding.
86
+ * Useful when you want to receive raw log data or watch multiple event types.
87
+ *
88
+ * @param client - The PublicClient to use (WebSocket transport recommended)
89
+ * @param params - Raw log watching parameters
90
+ * @returns An unwatch function to stop the subscription
91
+ *
92
+ * @example
93
+ * ```typescript
94
+ * import { createPublicClient } from 'viem';
95
+ * import { createWebSocketTransport, watchRawLogs } from '@radiustechsystems/sdk/events';
96
+ * import { radiusTestnet } from '@radiustechsystems/sdk/chains';
97
+ *
98
+ * const client = createPublicClient({
99
+ * chain: radiusTestnet,
100
+ * transport: createWebSocketTransport(radiusTestnet),
101
+ * });
102
+ *
103
+ * // Watch for all events from a contract
104
+ * const unwatch = watchRawLogs(client, {
105
+ * address: '0x...',
106
+ * onLogs: (logs) => {
107
+ * logs.forEach(log => {
108
+ * console.log('Log:', log.topics, log.data);
109
+ * });
110
+ * },
111
+ * onError: (error) => {
112
+ * console.error('Subscription error:', error);
113
+ * },
114
+ * });
115
+ *
116
+ * // Stop watching
117
+ * unwatch();
118
+ * ```
119
+ *
120
+ * @remarks
121
+ * - Does not decode log data; returns raw topics and data
122
+ * - Useful for monitoring multiple event types from same contract
123
+ * - Requires address parameter (mandatory on Radius)
124
+ * - WebSocket transport provides real-time updates
125
+ * - HTTP transport falls back to polling (less efficient)
126
+ */
127
+ export declare function watchRawLogs(client: PublicClient, params: WatchRawLogsParameters): WatchContractEventReturnType;
128
+ //# sourceMappingURL=watchLogs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchLogs.d.ts","sourceRoot":"","sources":["../../events/watchLogs.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,GAAG,EAAE,YAAY,EAAE,4BAA4B,EAAE,MAAM,MAAM,CAAC;AAC3F,OAAO,EAAE,kBAAkB,EAAE,MAAM,cAAc,CAAC;AAElD;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAyCG;AACH,wBAAgB,SAAS,CACxB,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAC9C,4BAA4B,CAE9B;AAED;;GAEG;AACH,MAAM,WAAW,sBAAsB;IACtC,oCAAoC;IACpC,OAAO,EAAE,OAAO,GAAG,OAAO,EAAE,CAAC;IAC7B,mDAAmD;IACnD,MAAM,CAAC,EAAE,IAAI,EAAE,EAAE,CAAC;IAClB,uDAAuD;IACvD,MAAM,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,KAAK,IAAI,CAAC;IAC9B,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AACH,wBAAgB,YAAY,CAC3B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,sBAAsB,GAC5B,4BAA4B,CAS9B"}
@@ -0,0 +1,164 @@
1
+ /**
2
+ * ERC-20 Transfer event watching utilities for Radius SDK.
3
+ * Provides convenient wrappers for watching Transfer events in real-time.
4
+ */
5
+ import type { Address, Log, PublicClient, WatchContractEventReturnType } from 'viem';
6
+ /**
7
+ * Decoded Transfer event data.
8
+ */
9
+ export interface TransferEvent {
10
+ /** The address that sent the tokens */
11
+ from: Address;
12
+ /** The address that received the tokens */
13
+ to: Address;
14
+ /** The amount of tokens transferred (in smallest unit) */
15
+ value: bigint;
16
+ /** The raw log data */
17
+ log: Log;
18
+ }
19
+ /**
20
+ * Parameters for watching Transfer events.
21
+ */
22
+ export interface WatchTransferParameters {
23
+ /** The ERC-20 token contract address to watch */
24
+ address: Address;
25
+ /** Optional: Filter by sender address */
26
+ from?: Address;
27
+ /** Optional: Filter by recipient address */
28
+ to?: Address;
29
+ /** Callback function invoked when Transfer events are received */
30
+ onTransfer: (events: TransferEvent[]) => void;
31
+ /** Callback function invoked when an error occurs */
32
+ onError?: (error: Error) => void;
33
+ /** Whether to emit logs from the latest block on subscription start */
34
+ sync?: boolean;
35
+ /** Polling interval in milliseconds (for HTTP transport fallback) */
36
+ pollingInterval?: number;
37
+ }
38
+ /**
39
+ * Watches for ERC-20 Transfer events in real-time.
40
+ * Automatically decodes Transfer events and provides type-safe callbacks.
41
+ *
42
+ * @param client - The PublicClient to use (WebSocket transport recommended)
43
+ * @param params - Transfer event watching parameters
44
+ * @returns An unwatch function to stop the subscription
45
+ *
46
+ * @example
47
+ * ```typescript
48
+ * import { createPublicClient } from 'viem';
49
+ * import { createWebSocketTransport, watchTransfer } from '@radiustechsystems/sdk/events';
50
+ * import { radiusTestnet } from '@radiustechsystems/sdk/chains';
51
+ *
52
+ * const client = createPublicClient({
53
+ * chain: radiusTestnet,
54
+ * transport: createWebSocketTransport(radiusTestnet),
55
+ * });
56
+ *
57
+ * // Watch all transfers for a token
58
+ * const unwatch = watchTransfer(client, {
59
+ * address: '0x...', // Token address
60
+ * onTransfer: (events) => {
61
+ * events.forEach(event => {
62
+ * console.log(`Transfer: ${event.value} from ${event.from} to ${event.to}`);
63
+ * });
64
+ * },
65
+ * });
66
+ *
67
+ * // Watch transfers to a specific address
68
+ * const unwatchToAddress = watchTransfer(client, {
69
+ * address: '0x...', // Token address
70
+ * to: '0x...', // Recipient address
71
+ * onTransfer: (events) => {
72
+ * console.log(`Received ${events.length} transfers`);
73
+ * },
74
+ * });
75
+ *
76
+ * // Stop watching
77
+ * unwatch();
78
+ * ```
79
+ *
80
+ * @remarks
81
+ * - Requires WebSocket transport for real-time subscriptions
82
+ * - Automatically decodes Transfer events using ERC-20 ABI
83
+ * - Filters by from/to addresses if provided
84
+ * - Event signature: Transfer(address indexed from, address indexed to, uint256 value)
85
+ * - Subscriptions consume gas from your RPC key on Radius (10 GAS/sec)
86
+ */
87
+ export declare function watchTransfer(client: PublicClient, params: WatchTransferParameters): WatchContractEventReturnType;
88
+ /**
89
+ * Parameters for watching Transfer events for a specific address (as sender or receiver).
90
+ */
91
+ export interface WatchTransferForAddressParameters {
92
+ /** The ERC-20 token contract address to watch */
93
+ tokenAddress: Address;
94
+ /** The address to watch (as sender or receiver) */
95
+ watchAddress: Address;
96
+ /** Whether to watch as sender only (default: false, watches both sender and receiver) */
97
+ senderOnly?: boolean;
98
+ /** Whether to watch as receiver only (default: false, watches both sender and receiver) */
99
+ receiverOnly?: boolean;
100
+ /** Callback function invoked when Transfer events are received */
101
+ onTransfer: (events: TransferEvent[]) => void;
102
+ /** Callback function invoked when an error occurs */
103
+ onError?: (error: Error) => void;
104
+ /** Whether to emit logs from the latest block on subscription start */
105
+ sync?: boolean;
106
+ /** Polling interval in milliseconds (for HTTP transport fallback) */
107
+ pollingInterval?: number;
108
+ }
109
+ /**
110
+ * Watches for Transfer events involving a specific address (as sender or receiver).
111
+ * Convenience wrapper around watchTransfer for monitoring a single address.
112
+ *
113
+ * @param client - The PublicClient to use (WebSocket transport recommended)
114
+ * @param params - Transfer watching parameters for specific address
115
+ * @returns An unwatch function to stop the subscription
116
+ *
117
+ * @example
118
+ * ```typescript
119
+ * import { createPublicClient } from 'viem';
120
+ * import { createWebSocketTransport, watchTransferForAddress } from '@radiustechsystems/sdk/events';
121
+ * import { radiusTestnet } from '@radiustechsystems/sdk/chains';
122
+ *
123
+ * const client = createPublicClient({
124
+ * chain: radiusTestnet,
125
+ * transport: createWebSocketTransport(radiusTestnet),
126
+ * });
127
+ *
128
+ * // Watch all transfers involving an address (sent or received)
129
+ * const unwatch = watchTransferForAddress(client, {
130
+ * tokenAddress: '0x...', // Token address
131
+ * watchAddress: '0x...', // Address to monitor
132
+ * onTransfer: (events) => {
133
+ * events.forEach(event => {
134
+ * if (event.from === watchAddress) {
135
+ * console.log(`Sent ${event.value} to ${event.to}`);
136
+ * } else {
137
+ * console.log(`Received ${event.value} from ${event.from}`);
138
+ * }
139
+ * });
140
+ * },
141
+ * });
142
+ *
143
+ * // Watch only transfers sent from an address
144
+ * const unwatchSent = watchTransferForAddress(client, {
145
+ * tokenAddress: '0x...',
146
+ * watchAddress: '0x...',
147
+ * senderOnly: true,
148
+ * onTransfer: (events) => {
149
+ * console.log(`Sent ${events.length} transfers`);
150
+ * },
151
+ * });
152
+ *
153
+ * // Stop watching
154
+ * unwatch();
155
+ * ```
156
+ *
157
+ * @remarks
158
+ * - If neither senderOnly nor receiverOnly is set, watches both directions
159
+ * - Cannot set both senderOnly and receiverOnly to true
160
+ * - More efficient than watching all transfers and filtering client-side
161
+ * - Server-side filtering reduces network traffic and processing
162
+ */
163
+ export declare function watchTransferForAddress(client: PublicClient, params: WatchTransferForAddressParameters): WatchContractEventReturnType;
164
+ //# sourceMappingURL=watchTransfer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"watchTransfer.d.ts","sourceRoot":"","sources":["../../events/watchTransfer.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,OAAO,KAAK,EAAE,OAAO,EAAE,GAAG,EAAE,YAAY,EAAE,4BAA4B,EAAE,MAAM,MAAM,CAAC;AAGrF;;GAEG;AACH,MAAM,WAAW,aAAa;IAC7B,uCAAuC;IACvC,IAAI,EAAE,OAAO,CAAC;IACd,2CAA2C;IAC3C,EAAE,EAAE,OAAO,CAAC;IACZ,0DAA0D;IAC1D,KAAK,EAAE,MAAM,CAAC;IACd,uBAAuB;IACvB,GAAG,EAAE,GAAG,CAAC;CACT;AAED;;GAEG;AACH,MAAM,WAAW,uBAAuB;IACvC,iDAAiD;IACjD,OAAO,EAAE,OAAO,CAAC;IACjB,yCAAyC;IACzC,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,4CAA4C;IAC5C,EAAE,CAAC,EAAE,OAAO,CAAC;IACb,kEAAkE;IAClE,UAAU,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAC9C,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAgDG;AACH,wBAAgB,aAAa,CAC5B,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,uBAAuB,GAC7B,4BAA4B,CA+C9B;AAED;;GAEG;AACH,MAAM,WAAW,iCAAiC;IACjD,iDAAiD;IACjD,YAAY,EAAE,OAAO,CAAC;IACtB,mDAAmD;IACnD,YAAY,EAAE,OAAO,CAAC;IACtB,yFAAyF;IACzF,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,2FAA2F;IAC3F,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,kEAAkE;IAClE,UAAU,EAAE,CAAC,MAAM,EAAE,aAAa,EAAE,KAAK,IAAI,CAAC;IAC9C,qDAAqD;IACrD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IACjC,uEAAuE;IACvE,IAAI,CAAC,EAAE,OAAO,CAAC;IACf,qEAAqE;IACrE,eAAe,CAAC,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAqDG;AACH,wBAAgB,uBAAuB,CACtC,MAAM,EAAE,YAAY,EACpB,MAAM,EAAE,iCAAiC,GACvC,4BAA4B,CAyF9B"}