@v3finance/monitoring-sdk 0.0.0-stage → 0.2.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/CHANGELOG.md +26 -0
- package/LICENSE +21 -0
- package/README.md +322 -2
- package/dist/cjs/client.d.ts +46 -0
- package/dist/cjs/client.d.ts.map +1 -0
- package/dist/cjs/client.js +80 -0
- package/dist/cjs/client.js.map +1 -0
- package/dist/cjs/core/errors.d.ts +64 -0
- package/dist/cjs/core/errors.d.ts.map +1 -0
- package/dist/cjs/core/errors.js +95 -0
- package/dist/cjs/core/errors.js.map +1 -0
- package/dist/cjs/core/http.d.ts +58 -0
- package/dist/cjs/core/http.d.ts.map +1 -0
- package/dist/cjs/core/http.js +143 -0
- package/dist/cjs/core/http.js.map +1 -0
- package/dist/cjs/core/pagination.d.ts +12 -0
- package/dist/cjs/core/pagination.d.ts.map +1 -0
- package/dist/cjs/core/pagination.js +15 -0
- package/dist/cjs/core/pagination.js.map +1 -0
- package/dist/cjs/core/scope.d.ts +8 -0
- package/dist/cjs/core/scope.d.ts.map +1 -0
- package/dist/cjs/core/scope.js +3 -0
- package/dist/cjs/core/scope.js.map +1 -0
- package/dist/cjs/generated/types.d.ts +336 -0
- package/dist/cjs/generated/types.d.ts.map +1 -0
- package/dist/cjs/generated/types.js +5 -0
- package/dist/cjs/generated/types.js.map +1 -0
- package/dist/cjs/index.d.ts +23 -0
- package/dist/cjs/index.d.ts.map +1 -0
- package/dist/cjs/index.js +47 -0
- package/dist/cjs/index.js.map +1 -0
- package/dist/cjs/package.json +1 -0
- package/dist/cjs/resources/account.d.ts +22 -0
- package/dist/cjs/resources/account.d.ts.map +1 -0
- package/dist/cjs/resources/account.js +31 -0
- package/dist/cjs/resources/account.js.map +1 -0
- package/dist/cjs/resources/addresses.d.ts +93 -0
- package/dist/cjs/resources/addresses.d.ts.map +1 -0
- package/dist/cjs/resources/addresses.js +128 -0
- package/dist/cjs/resources/addresses.js.map +1 -0
- package/dist/cjs/resources/catalog.d.ts +37 -0
- package/dist/cjs/resources/catalog.d.ts.map +1 -0
- package/dist/cjs/resources/catalog.js +52 -0
- package/dist/cjs/resources/catalog.js.map +1 -0
- package/dist/cjs/resources/deliveries.d.ts +61 -0
- package/dist/cjs/resources/deliveries.d.ts.map +1 -0
- package/dist/cjs/resources/deliveries.js +53 -0
- package/dist/cjs/resources/deliveries.js.map +1 -0
- package/dist/cjs/resources/transactions.d.ts +28 -0
- package/dist/cjs/resources/transactions.d.ts.map +1 -0
- package/dist/cjs/resources/transactions.js +34 -0
- package/dist/cjs/resources/transactions.js.map +1 -0
- package/dist/cjs/resources/webhooks.d.ts +22 -0
- package/dist/cjs/resources/webhooks.d.ts.map +1 -0
- package/dist/cjs/resources/webhooks.js +35 -0
- package/dist/cjs/resources/webhooks.js.map +1 -0
- package/dist/cjs/units.d.ts +29 -0
- package/dist/cjs/units.d.ts.map +1 -0
- package/dist/cjs/units.js +62 -0
- package/dist/cjs/units.js.map +1 -0
- package/dist/cjs/version.d.ts +5 -0
- package/dist/cjs/version.d.ts.map +1 -0
- package/dist/cjs/version.js +8 -0
- package/dist/cjs/version.js.map +1 -0
- package/dist/cjs/webhooks.d.ts +82 -0
- package/dist/cjs/webhooks.d.ts.map +1 -0
- package/dist/cjs/webhooks.js +133 -0
- package/dist/cjs/webhooks.js.map +1 -0
- package/dist/esm/client.d.ts +46 -0
- package/dist/esm/client.d.ts.map +1 -0
- package/dist/esm/client.js +76 -0
- package/dist/esm/client.js.map +1 -0
- package/dist/esm/core/errors.d.ts +64 -0
- package/dist/esm/core/errors.d.ts.map +1 -0
- package/dist/esm/core/errors.js +86 -0
- package/dist/esm/core/errors.js.map +1 -0
- package/dist/esm/core/http.d.ts +58 -0
- package/dist/esm/core/http.d.ts.map +1 -0
- package/dist/esm/core/http.js +138 -0
- package/dist/esm/core/http.js.map +1 -0
- package/dist/esm/core/pagination.d.ts +12 -0
- package/dist/esm/core/pagination.d.ts.map +1 -0
- package/dist/esm/core/pagination.js +12 -0
- package/dist/esm/core/pagination.js.map +1 -0
- package/dist/esm/core/scope.d.ts +8 -0
- package/dist/esm/core/scope.d.ts.map +1 -0
- package/dist/esm/core/scope.js +2 -0
- package/dist/esm/core/scope.js.map +1 -0
- package/dist/esm/generated/types.d.ts +336 -0
- package/dist/esm/generated/types.d.ts.map +1 -0
- package/dist/esm/generated/types.js +4 -0
- package/dist/esm/generated/types.js.map +1 -0
- package/dist/esm/index.d.ts +23 -0
- package/dist/esm/index.d.ts.map +1 -0
- package/dist/esm/index.js +20 -0
- package/dist/esm/index.js.map +1 -0
- package/dist/esm/resources/account.d.ts +22 -0
- package/dist/esm/resources/account.d.ts.map +1 -0
- package/dist/esm/resources/account.js +27 -0
- package/dist/esm/resources/account.js.map +1 -0
- package/dist/esm/resources/addresses.d.ts +93 -0
- package/dist/esm/resources/addresses.d.ts.map +1 -0
- package/dist/esm/resources/addresses.js +124 -0
- package/dist/esm/resources/addresses.js.map +1 -0
- package/dist/esm/resources/catalog.d.ts +37 -0
- package/dist/esm/resources/catalog.d.ts.map +1 -0
- package/dist/esm/resources/catalog.js +47 -0
- package/dist/esm/resources/catalog.js.map +1 -0
- package/dist/esm/resources/deliveries.d.ts +61 -0
- package/dist/esm/resources/deliveries.d.ts.map +1 -0
- package/dist/esm/resources/deliveries.js +49 -0
- package/dist/esm/resources/deliveries.js.map +1 -0
- package/dist/esm/resources/transactions.d.ts +28 -0
- package/dist/esm/resources/transactions.d.ts.map +1 -0
- package/dist/esm/resources/transactions.js +30 -0
- package/dist/esm/resources/transactions.js.map +1 -0
- package/dist/esm/resources/webhooks.d.ts +22 -0
- package/dist/esm/resources/webhooks.d.ts.map +1 -0
- package/dist/esm/resources/webhooks.js +31 -0
- package/dist/esm/resources/webhooks.js.map +1 -0
- package/dist/esm/units.d.ts +29 -0
- package/dist/esm/units.d.ts.map +1 -0
- package/dist/esm/units.js +58 -0
- package/dist/esm/units.js.map +1 -0
- package/dist/esm/version.d.ts +5 -0
- package/dist/esm/version.d.ts.map +1 -0
- package/dist/esm/version.js +5 -0
- package/dist/esm/version.js.map +1 -0
- package/dist/esm/webhooks.d.ts +82 -0
- package/dist/esm/webhooks.d.ts.map +1 -0
- package/dist/esm/webhooks.js +125 -0
- package/dist/esm/webhooks.js.map +1 -0
- package/package.json +69 -4
- package/src/client.ts +83 -0
- package/src/core/errors.ts +99 -0
- package/src/core/http.ts +183 -0
- package/src/core/pagination.ts +20 -0
- package/src/core/scope.ts +8 -0
- package/src/generated/types.ts +369 -0
- package/src/index.ts +43 -0
- package/src/resources/account.ts +33 -0
- package/src/resources/addresses.ts +165 -0
- package/src/resources/catalog.ts +56 -0
- package/src/resources/deliveries.ts +82 -0
- package/src/resources/transactions.ts +34 -0
- package/src/resources/webhooks.ts +36 -0
- package/src/units.ts +56 -0
- package/src/version.ts +5 -0
- package/src/webhooks.ts +138 -0
|
@@ -0,0 +1,336 @@
|
|
|
1
|
+
export interface ApiErrorBody {
|
|
2
|
+
error: {
|
|
3
|
+
/**
|
|
4
|
+
* Machine-readable error code.
|
|
5
|
+
* @example "invalid_request"
|
|
6
|
+
*/
|
|
7
|
+
code: string;
|
|
8
|
+
/** Human-readable description. */
|
|
9
|
+
message: string;
|
|
10
|
+
/** Per-item problems of a batch request. */
|
|
11
|
+
details?: Array<{
|
|
12
|
+
/** Index of the item in the request. */
|
|
13
|
+
index: number;
|
|
14
|
+
message: string;
|
|
15
|
+
}>;
|
|
16
|
+
};
|
|
17
|
+
}
|
|
18
|
+
export interface User {
|
|
19
|
+
id: string;
|
|
20
|
+
email: string;
|
|
21
|
+
name: string;
|
|
22
|
+
role?: "admin" | "user";
|
|
23
|
+
banned?: boolean;
|
|
24
|
+
createdAt?: string;
|
|
25
|
+
}
|
|
26
|
+
export interface Identity {
|
|
27
|
+
actor: {
|
|
28
|
+
/** `client-key` for a client API key. */
|
|
29
|
+
kind: "client-key" | "user" | "admin";
|
|
30
|
+
/** Your client ID (client API keys). */
|
|
31
|
+
clientId?: string;
|
|
32
|
+
/** ID of the API key (client API keys). */
|
|
33
|
+
keyId?: string;
|
|
34
|
+
userId?: string | null;
|
|
35
|
+
via?: "session" | "api-key" | "token";
|
|
36
|
+
};
|
|
37
|
+
user: User | null;
|
|
38
|
+
memberships: Array<{
|
|
39
|
+
clientId: string;
|
|
40
|
+
role: "owner" | "admin" | "member";
|
|
41
|
+
}>;
|
|
42
|
+
}
|
|
43
|
+
export interface Client {
|
|
44
|
+
/** Client ID. */
|
|
45
|
+
id: string;
|
|
46
|
+
name: string | null;
|
|
47
|
+
/** Where webhooks are sent. */
|
|
48
|
+
webhookUrl: string;
|
|
49
|
+
/** `disabled` — webhooks are not sent. */
|
|
50
|
+
status: "active" | "disabled";
|
|
51
|
+
/** format: date-time */
|
|
52
|
+
createdAt: string;
|
|
53
|
+
}
|
|
54
|
+
export interface Network {
|
|
55
|
+
id: number;
|
|
56
|
+
/**
|
|
57
|
+
* Network identifier used across the API.
|
|
58
|
+
* @example "tron"
|
|
59
|
+
*/
|
|
60
|
+
slug: string;
|
|
61
|
+
/**
|
|
62
|
+
* CAIP-2 chain ID.
|
|
63
|
+
* @example "tron:0x2b6653dc"
|
|
64
|
+
*/
|
|
65
|
+
caip2: string;
|
|
66
|
+
chainId: number;
|
|
67
|
+
name: string;
|
|
68
|
+
shortName: string | null;
|
|
69
|
+
/** 1 for L1 networks, 2 for L2 rollups. */
|
|
70
|
+
layer: 1 | 2;
|
|
71
|
+
parent: string | null;
|
|
72
|
+
l2Type: string | null;
|
|
73
|
+
l2Stack: string | null;
|
|
74
|
+
isTestnet: boolean;
|
|
75
|
+
explorerUrl: string | null;
|
|
76
|
+
/** Transfers on this network are monitored. */
|
|
77
|
+
enabled: boolean;
|
|
78
|
+
}
|
|
79
|
+
export interface NetworkList {
|
|
80
|
+
items: Network[];
|
|
81
|
+
}
|
|
82
|
+
export interface Asset {
|
|
83
|
+
id: number;
|
|
84
|
+
/** Network slug. */
|
|
85
|
+
network: string;
|
|
86
|
+
/** CAIP-19 asset ID. */
|
|
87
|
+
caip19: string;
|
|
88
|
+
standard: "native" | "erc20" | "trc20";
|
|
89
|
+
contract: string | null;
|
|
90
|
+
/** @example "USDT" */
|
|
91
|
+
symbol: string;
|
|
92
|
+
name: string;
|
|
93
|
+
decimals: number;
|
|
94
|
+
/** Smallest transfer you are notified about, in the smallest unit (inclusive). */
|
|
95
|
+
minAmount: string;
|
|
96
|
+
/** Transfers of this asset are monitored. */
|
|
97
|
+
enabled: boolean;
|
|
98
|
+
}
|
|
99
|
+
export interface AssetList {
|
|
100
|
+
items: Asset[];
|
|
101
|
+
}
|
|
102
|
+
/** `in` — the address receives, `out` — the address sends, `both` — either. */
|
|
103
|
+
export type Direction = "in" | "out" | "both";
|
|
104
|
+
/** Asset symbols (`USDT`) or contract addresses. `null` — all assets of the network, including ones added later. */
|
|
105
|
+
export type AssetSelection = string[] | null;
|
|
106
|
+
export interface AddressInput {
|
|
107
|
+
/** Network slug or CAIP-2 ID. */
|
|
108
|
+
network: string;
|
|
109
|
+
address: string;
|
|
110
|
+
/**
|
|
111
|
+
* Your reference, e.g. a user or account ID.
|
|
112
|
+
*
|
|
113
|
+
* length: 0..200
|
|
114
|
+
*/
|
|
115
|
+
label?: string;
|
|
116
|
+
assets?: AssetSelection;
|
|
117
|
+
direction?: Direction;
|
|
118
|
+
}
|
|
119
|
+
export interface AddAddressesRequest {
|
|
120
|
+
/** items: 1..1000 */
|
|
121
|
+
addresses: AddressInput[];
|
|
122
|
+
assets?: AssetSelection;
|
|
123
|
+
direction?: Direction;
|
|
124
|
+
}
|
|
125
|
+
export interface AddAddressesResult {
|
|
126
|
+
/** Addresses that started being monitored. */
|
|
127
|
+
added: number;
|
|
128
|
+
/** Addresses that were already monitored and left unchanged. */
|
|
129
|
+
alreadyWatched: number;
|
|
130
|
+
}
|
|
131
|
+
export interface AddressUpdate {
|
|
132
|
+
network: string;
|
|
133
|
+
address: string;
|
|
134
|
+
assets?: AssetSelection;
|
|
135
|
+
direction?: Direction;
|
|
136
|
+
}
|
|
137
|
+
export interface UpdateAddressesRequest {
|
|
138
|
+
/** items: 1..1000 */
|
|
139
|
+
addresses: AddressUpdate[];
|
|
140
|
+
assets?: AssetSelection;
|
|
141
|
+
direction?: Direction;
|
|
142
|
+
}
|
|
143
|
+
export interface UpdateAddressesResult {
|
|
144
|
+
/** Addresses whose subscription was changed. */
|
|
145
|
+
updated: number;
|
|
146
|
+
/** Addresses that are not monitored. */
|
|
147
|
+
notWatched: number;
|
|
148
|
+
}
|
|
149
|
+
export interface AddressRef {
|
|
150
|
+
/** Network slug or CAIP-2 ID. */
|
|
151
|
+
network: string;
|
|
152
|
+
address: string;
|
|
153
|
+
}
|
|
154
|
+
export interface RemoveAddressesRequest {
|
|
155
|
+
/** items: 1..1000 */
|
|
156
|
+
addresses: AddressRef[];
|
|
157
|
+
}
|
|
158
|
+
export interface RemoveAddressesResult {
|
|
159
|
+
/** Addresses that stopped being monitored. */
|
|
160
|
+
removed: number;
|
|
161
|
+
/** Addresses that were not monitored. */
|
|
162
|
+
notWatched: number;
|
|
163
|
+
}
|
|
164
|
+
export interface Address {
|
|
165
|
+
id: number;
|
|
166
|
+
network: string;
|
|
167
|
+
/** CAIP-10 account ID. */
|
|
168
|
+
caip10: string;
|
|
169
|
+
address: string;
|
|
170
|
+
label: string | null;
|
|
171
|
+
/** Subscribed asset symbols; `null` — all assets. */
|
|
172
|
+
assets: string[] | null;
|
|
173
|
+
direction: Direction;
|
|
174
|
+
/** format: date-time */
|
|
175
|
+
createdAt: string;
|
|
176
|
+
}
|
|
177
|
+
/** A page of addresses. */
|
|
178
|
+
export interface AddressPage {
|
|
179
|
+
items: Address[];
|
|
180
|
+
/** Cursor for the next page — pass it as `after`. `null` when there are no more pages. */
|
|
181
|
+
next: number | null;
|
|
182
|
+
}
|
|
183
|
+
/** `delivered` — you responded with 2xx; `retrying` — the last attempt failed and will be retried; `failed` — all attempts failed. */
|
|
184
|
+
export type DeliveryStatus = "delivered" | "retrying" | "failed";
|
|
185
|
+
export interface Delivery {
|
|
186
|
+
id: number;
|
|
187
|
+
clientId: string;
|
|
188
|
+
network: string;
|
|
189
|
+
asset: string;
|
|
190
|
+
contract: string;
|
|
191
|
+
/** Transaction hash. */
|
|
192
|
+
txId: string;
|
|
193
|
+
logIndex: number | null;
|
|
194
|
+
block: number;
|
|
195
|
+
/** Block time, milliseconds since epoch. */
|
|
196
|
+
blockTime: number;
|
|
197
|
+
from: string;
|
|
198
|
+
to: string;
|
|
199
|
+
/** Amount in the smallest unit. */
|
|
200
|
+
value: string;
|
|
201
|
+
status: DeliveryStatus;
|
|
202
|
+
attempts: number;
|
|
203
|
+
lastHttpStatus: number | null;
|
|
204
|
+
lastError: string | null;
|
|
205
|
+
lastDurationMs: number | null;
|
|
206
|
+
/** format: date-time */
|
|
207
|
+
firstAttemptAt: string;
|
|
208
|
+
/** format: date-time */
|
|
209
|
+
lastAttemptAt: string;
|
|
210
|
+
deliveredAt: string | null;
|
|
211
|
+
}
|
|
212
|
+
export type DeliveryDetail = Delivery & {
|
|
213
|
+
/** URL of the last attempt. */
|
|
214
|
+
url: string;
|
|
215
|
+
/** Exact request body. */
|
|
216
|
+
body: string;
|
|
217
|
+
};
|
|
218
|
+
/** A page of deliveries, newest first. */
|
|
219
|
+
export interface DeliveryPage {
|
|
220
|
+
items: Delivery[];
|
|
221
|
+
/** Cursor for the next page — pass it as `before`. `null` when there are no more pages. */
|
|
222
|
+
next: number | null;
|
|
223
|
+
}
|
|
224
|
+
export interface TxTransfer {
|
|
225
|
+
/** `native` — sent by the transaction itself; `token` — a token Transfer event; `internal` — TRX sent by a contract; `trc10` — a TRC-10 token. */
|
|
226
|
+
kind: "native" | "token" | "internal" | "trc10";
|
|
227
|
+
asset: string | null;
|
|
228
|
+
/** Token contract address, `native`, or the TRC-10 token ID. */
|
|
229
|
+
contract: string;
|
|
230
|
+
from: string;
|
|
231
|
+
to: string;
|
|
232
|
+
/** Amount in the smallest unit. */
|
|
233
|
+
value: string;
|
|
234
|
+
logIndex?: number;
|
|
235
|
+
/** The asset is monitored: transfers of at least its `minAmount` are notified. */
|
|
236
|
+
tracked: boolean;
|
|
237
|
+
}
|
|
238
|
+
export interface Transaction {
|
|
239
|
+
network: string;
|
|
240
|
+
caip2: string;
|
|
241
|
+
txId: string;
|
|
242
|
+
/** `pending` — not yet included in a block. */
|
|
243
|
+
status: "success" | "failed" | "pending";
|
|
244
|
+
failure: string | null;
|
|
245
|
+
block: number | null;
|
|
246
|
+
blockTime: number | null;
|
|
247
|
+
/** Blocks since inclusion, counting the block itself; `0` when pending. */
|
|
248
|
+
confirmations: number;
|
|
249
|
+
/** The transaction can no longer be reverted. */
|
|
250
|
+
final: boolean;
|
|
251
|
+
/** Signer of the transaction. */
|
|
252
|
+
from: string;
|
|
253
|
+
to: string | null;
|
|
254
|
+
/** TRON contract type (`TransferContract`, `TriggerSmartContract`, …) or, on EVM networks, `transfer`, `contract_call` or `contract_creation`. */
|
|
255
|
+
type: string;
|
|
256
|
+
/** Native amount sent by the transaction itself. */
|
|
257
|
+
value: string;
|
|
258
|
+
fee: {
|
|
259
|
+
asset: string;
|
|
260
|
+
value: string;
|
|
261
|
+
} | null;
|
|
262
|
+
transfers: TxTransfer[];
|
|
263
|
+
/** Your monitored addresses involved in the transaction. */
|
|
264
|
+
watched: Array<{
|
|
265
|
+
clientId: string;
|
|
266
|
+
address: string;
|
|
267
|
+
direction: Direction;
|
|
268
|
+
}>;
|
|
269
|
+
/** Webhooks sent to you for this transaction. */
|
|
270
|
+
webhooks: Array<{
|
|
271
|
+
id: number;
|
|
272
|
+
clientId: string;
|
|
273
|
+
asset: string;
|
|
274
|
+
value: string;
|
|
275
|
+
status: DeliveryStatus;
|
|
276
|
+
attempts: number;
|
|
277
|
+
deliveredAt: string | null;
|
|
278
|
+
}>;
|
|
279
|
+
}
|
|
280
|
+
export interface WebhookTx {
|
|
281
|
+
/**
|
|
282
|
+
* Network slug in upper case.
|
|
283
|
+
* @example "TRON"
|
|
284
|
+
* @example "ETHEREUM"
|
|
285
|
+
*/
|
|
286
|
+
network: string;
|
|
287
|
+
/** @example "USDT" */
|
|
288
|
+
asset: string;
|
|
289
|
+
/** Token contract address or `native`. */
|
|
290
|
+
contract: string;
|
|
291
|
+
/** Always `TOPUP`, for both directions: compare `from` and `to` with your addresses. */
|
|
292
|
+
type: "TOPUP";
|
|
293
|
+
/** Transaction hash. */
|
|
294
|
+
id: string;
|
|
295
|
+
block: number;
|
|
296
|
+
/** Block time, milliseconds since epoch. */
|
|
297
|
+
timestamp: number;
|
|
298
|
+
from: string;
|
|
299
|
+
to: string;
|
|
300
|
+
/** Amount in the smallest unit. */
|
|
301
|
+
value: string;
|
|
302
|
+
/** Position of the transfer in the block, for EVM token transfers. */
|
|
303
|
+
logIndex?: number;
|
|
304
|
+
}
|
|
305
|
+
export interface WebhookPayload {
|
|
306
|
+
tx: WebhookTx;
|
|
307
|
+
/** Present on test webhooks only. */
|
|
308
|
+
test?: true;
|
|
309
|
+
}
|
|
310
|
+
export interface TestWebhookRequest {
|
|
311
|
+
/** @defaultValue "USDT" */
|
|
312
|
+
asset?: "USDT" | "A7A5" | "TRX";
|
|
313
|
+
/** TRON address. */
|
|
314
|
+
from?: string;
|
|
315
|
+
/** TRON address. */
|
|
316
|
+
to?: string;
|
|
317
|
+
/** Amount in the smallest unit. */
|
|
318
|
+
value?: string;
|
|
319
|
+
}
|
|
320
|
+
export interface TestDelivery {
|
|
321
|
+
/** Your endpoint responded with 2xx. */
|
|
322
|
+
ok: boolean;
|
|
323
|
+
/** Status code of your response. */
|
|
324
|
+
status?: number;
|
|
325
|
+
/** Connection error. */
|
|
326
|
+
error?: string;
|
|
327
|
+
durationMs: number;
|
|
328
|
+
}
|
|
329
|
+
export interface TestWebhookResult {
|
|
330
|
+
delivery: TestDelivery;
|
|
331
|
+
/** Value of the `x-signature` header. */
|
|
332
|
+
signature: string;
|
|
333
|
+
/** Exact request body. */
|
|
334
|
+
body: string;
|
|
335
|
+
}
|
|
336
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/generated/types.ts"],"names":[],"mappings":"AAGA,MAAM,WAAW,YAAY;IAC3B,KAAK,EAAE;QACL;;;WAGG;QACH,IAAI,EAAE,MAAM,CAAA;QACZ,kCAAkC;QAClC,OAAO,EAAE,MAAM,CAAA;QACf,4CAA4C;QAC5C,OAAO,CAAC,EAAE,KAAK,CAAC;YACd,wCAAwC;YACxC,KAAK,EAAE,MAAM,CAAA;YACb,OAAO,EAAE,MAAM,CAAA;SAChB,CAAC,CAAA;KACH,CAAA;CACF;AAED,MAAM,WAAW,IAAI;IACnB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,MAAM,CAAA;IACZ,IAAI,CAAC,EAAE,OAAO,GAAG,MAAM,CAAA;IACvB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,QAAQ;IACvB,KAAK,EAAE;QACL,yCAAyC;QACzC,IAAI,EAAE,YAAY,GAAG,MAAM,GAAG,OAAO,CAAA;QACrC,wCAAwC;QACxC,QAAQ,CAAC,EAAE,MAAM,CAAA;QACjB,2CAA2C;QAC3C,KAAK,CAAC,EAAE,MAAM,CAAA;QACd,MAAM,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;QACtB,GAAG,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,OAAO,CAAA;KACtC,CAAA;IACD,IAAI,EAAE,IAAI,GAAG,IAAI,CAAA;IACjB,WAAW,EAAE,KAAK,CAAC;QACjB,QAAQ,EAAE,MAAM,CAAA;QAChB,IAAI,EAAE,OAAO,GAAG,OAAO,GAAG,QAAQ,CAAA;KACnC,CAAC,CAAA;CACH;AAED,MAAM,WAAW,MAAM;IACrB,iBAAiB;IACjB,EAA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A4C;IAC5C,SAAS,EAAE,MAAM,CAAA;IACjB,IAAI,EAAE,MAAM,CAAA;IACZ,EAAE,EAAE,MAAM,CAAA;IACV,mCAAmC;IACnC,KAAK,EAAE,MAAM,CAAA;IACb,sEAAsE;IACtE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAClB;AAED,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,SAAS,CAAA;IACb,qCAAqC;IACrC,IAAI,CAAC,EAAE,IAAI,CAAA;CACZ;AAED,MAAM,WAAW,kBAAkB;IACjC,2BAA2B;IAC3B,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,KAAK,CAAA;IAC/B,oBAAoB;IACpB,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oBAAoB;IACpB,EAAE,CAAC,EAAE,MAAM,CAAA;IACX,mCAAmC;IACnC,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAED,MAAM,WAAW,YAAY;IAC3B,wCAAwC;IACxC,EAAE,EAAE,OAAO,CAAA;IACX,oCAAoC;IACpC,MAAM,CAAC,EAAE,MAAM,CAAA;IACf,wBAAwB;IACxB,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,UAAU,EAAE,MAAM,CAAA;CACnB;AAED,MAAM,WAAW,iBAAiB;IAChC,QAAQ,EAAE,YAAY,CAAA;IACtB,yCAAyC;IACzC,SAAS,EAAE,MAAM,CAAA;IACjB,0BAA0B;IAC1B,IAAI,EAAE,MAAM,CAAA;CACb"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.js","sourceRoot":"","sources":["../../../src/generated/types.ts"],"names":[],"mappings":"AAAA,oFAAoF;AACpF,uFAAuF"}
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Official TypeScript SDK for the V3 Finance Monitoring API: monitor addresses on TRON and EVM networks and receive
|
|
3
|
+
* signed webhooks for every incoming and outgoing transfer.
|
|
4
|
+
*
|
|
5
|
+
* API reference: https://monitoring.v3.finance/docs
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export { MonitoringClient } from './client.js';
|
|
10
|
+
export type { ClientOptions, RequestOptions } from './core/http.js';
|
|
11
|
+
export type { Page } from './core/pagination.js';
|
|
12
|
+
export { MonitoringApiError, MonitoringConnectionError, MonitoringError, MonitoringTimeoutError, WebhookSignatureError, type ErrorDetail, } from './core/errors.js';
|
|
13
|
+
export { AccountResource } from './resources/account.js';
|
|
14
|
+
export { ADDRESS_BATCH_SIZE, AddressesResource, type ListAddressesParams, type SubscriptionDefaults } from './resources/addresses.js';
|
|
15
|
+
export { AssetsResource, NetworksResource } from './resources/catalog.js';
|
|
16
|
+
export { DeliveriesResource, type DeliveryFilter, type ListDeliveriesParams } from './resources/deliveries.js';
|
|
17
|
+
export { TransactionsResource } from './resources/transactions.js';
|
|
18
|
+
export { WebhooksResource } from './resources/webhooks.js';
|
|
19
|
+
export { isTestWebhook, parseWebhook, signWebhookBody, verifyWebhookSignature, WEBHOOK_HEADERS, webhookIdempotencyKey, type SignatureSource, type WebhookBody, } from './webhooks.js';
|
|
20
|
+
export { formatUnits, parseUnits } from './units.js';
|
|
21
|
+
export { DEFAULT_BASE_URL, SDK_VERSION } from './version.js';
|
|
22
|
+
export type * from './generated/types.js';
|
|
23
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAC9C,YAAY,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AACnE,YAAY,EAAE,IAAI,EAAE,MAAM,sBAAsB,CAAA;AAChD,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,EACrB,KAAK,WAAW,GACjB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAE,KAAK,mBAAmB,EAAE,KAAK,oBAAoB,EAAE,MAAM,0BAA0B,CAAA;AACrI,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAE,KAAK,cAAc,EAAE,KAAK,oBAAoB,EAAE,MAAM,2BAA2B,CAAA;AAC9G,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,qBAAqB,EACrB,KAAK,eAAe,EACpB,KAAK,WAAW,GACjB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA;AAG5D,mBAAmB,sBAAsB,CAAA"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Official TypeScript SDK for the V3 Finance Monitoring API: monitor addresses on TRON and EVM networks and receive
|
|
3
|
+
* signed webhooks for every incoming and outgoing transfer.
|
|
4
|
+
*
|
|
5
|
+
* API reference: https://monitoring.v3.finance/docs
|
|
6
|
+
*
|
|
7
|
+
* @packageDocumentation
|
|
8
|
+
*/
|
|
9
|
+
export { MonitoringClient } from './client.js';
|
|
10
|
+
export { MonitoringApiError, MonitoringConnectionError, MonitoringError, MonitoringTimeoutError, WebhookSignatureError, } from './core/errors.js';
|
|
11
|
+
export { AccountResource } from './resources/account.js';
|
|
12
|
+
export { ADDRESS_BATCH_SIZE, AddressesResource } from './resources/addresses.js';
|
|
13
|
+
export { AssetsResource, NetworksResource } from './resources/catalog.js';
|
|
14
|
+
export { DeliveriesResource } from './resources/deliveries.js';
|
|
15
|
+
export { TransactionsResource } from './resources/transactions.js';
|
|
16
|
+
export { WebhooksResource } from './resources/webhooks.js';
|
|
17
|
+
export { isTestWebhook, parseWebhook, signWebhookBody, verifyWebhookSignature, WEBHOOK_HEADERS, webhookIdempotencyKey, } from './webhooks.js';
|
|
18
|
+
export { formatUnits, parseUnits } from './units.js';
|
|
19
|
+
export { DEFAULT_BASE_URL, SDK_VERSION } from './version.js';
|
|
20
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;GAOG;AAEH,OAAO,EAAE,gBAAgB,EAAE,MAAM,aAAa,CAAA;AAG9C,OAAO,EACL,kBAAkB,EAClB,yBAAyB,EACzB,eAAe,EACf,sBAAsB,EACtB,qBAAqB,GAEtB,MAAM,kBAAkB,CAAA;AAEzB,OAAO,EAAE,eAAe,EAAE,MAAM,wBAAwB,CAAA;AACxD,OAAO,EAAE,kBAAkB,EAAE,iBAAiB,EAAuD,MAAM,0BAA0B,CAAA;AACrI,OAAO,EAAE,cAAc,EAAE,gBAAgB,EAAE,MAAM,wBAAwB,CAAA;AACzE,OAAO,EAAE,kBAAkB,EAAkD,MAAM,2BAA2B,CAAA;AAC9G,OAAO,EAAE,oBAAoB,EAAE,MAAM,6BAA6B,CAAA;AAClE,OAAO,EAAE,gBAAgB,EAAE,MAAM,yBAAyB,CAAA;AAE1D,OAAO,EACL,aAAa,EACb,YAAY,EACZ,eAAe,EACf,sBAAsB,EACtB,eAAe,EACf,qBAAqB,GAGtB,MAAM,eAAe,CAAA;AACtB,OAAO,EAAE,WAAW,EAAE,UAAU,EAAE,MAAM,YAAY,CAAA;AACpD,OAAO,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,cAAc,CAAA"}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import type { RequestOptions } from '../core/http.js';
|
|
2
|
+
import type { Scope } from '../core/scope.js';
|
|
3
|
+
import type { Client } from '../generated/types.js';
|
|
4
|
+
/** Your client: the account your API key belongs to. */
|
|
5
|
+
export declare class AccountResource {
|
|
6
|
+
#private;
|
|
7
|
+
/** @internal */
|
|
8
|
+
constructor(scope: Scope, resolveId: () => Promise<string>);
|
|
9
|
+
/**
|
|
10
|
+
* Retrieves your client, including its webhook URL and status.
|
|
11
|
+
*
|
|
12
|
+
* @example
|
|
13
|
+
* ```ts
|
|
14
|
+
* const account = await monitoring.account.get()
|
|
15
|
+
* console.log(account.webhookUrl, account.status)
|
|
16
|
+
* ```
|
|
17
|
+
*/
|
|
18
|
+
get(options?: RequestOptions): Promise<Client>;
|
|
19
|
+
/** Returns your client ID — the value of the `x-client-id` header on every webhook. */
|
|
20
|
+
id(): Promise<string>;
|
|
21
|
+
}
|
|
22
|
+
//# sourceMappingURL=account.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.d.ts","sourceRoot":"","sources":["../../../src/resources/account.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AACrD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,uBAAuB,CAAA;AAEnD,wDAAwD;AACxD,qBAAa,eAAe;;IAI1B,gBAAgB;IAChB,YAAY,KAAK,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC,MAAM,CAAC,EAGzD;IAED;;;;;;;;OAQG;IACG,GAAG,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,CAEnD;IAED,uFAAuF;IACvF,EAAE,IAAI,OAAO,CAAC,MAAM,CAAC,CAEpB;CACF"}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
/** Your client: the account your API key belongs to. */
|
|
2
|
+
export class AccountResource {
|
|
3
|
+
#scope;
|
|
4
|
+
#resolveId;
|
|
5
|
+
/** @internal */
|
|
6
|
+
constructor(scope, resolveId) {
|
|
7
|
+
this.#scope = scope;
|
|
8
|
+
this.#resolveId = resolveId;
|
|
9
|
+
}
|
|
10
|
+
/**
|
|
11
|
+
* Retrieves your client, including its webhook URL and status.
|
|
12
|
+
*
|
|
13
|
+
* @example
|
|
14
|
+
* ```ts
|
|
15
|
+
* const account = await monitoring.account.get()
|
|
16
|
+
* console.log(account.webhookUrl, account.status)
|
|
17
|
+
* ```
|
|
18
|
+
*/
|
|
19
|
+
async get(options) {
|
|
20
|
+
return this.#scope.http.request({ method: 'GET', path: await this.#scope.clientPath(), idempotent: true, options });
|
|
21
|
+
}
|
|
22
|
+
/** Returns your client ID — the value of the `x-client-id` header on every webhook. */
|
|
23
|
+
id() {
|
|
24
|
+
return this.#resolveId();
|
|
25
|
+
}
|
|
26
|
+
}
|
|
27
|
+
//# sourceMappingURL=account.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"account.js","sourceRoot":"","sources":["../../../src/resources/account.ts"],"names":[],"mappings":"AAIA,wDAAwD;AACxD,MAAM,OAAO,eAAe;IACjB,MAAM,CAAO;IACb,UAAU,CAAuB;IAE1C,gBAAgB;IAChB,YAAY,KAAY,EAAE,SAAgC;QACxD,IAAI,CAAC,MAAM,GAAG,KAAK,CAAA;QACnB,IAAI,CAAC,UAAU,GAAG,SAAS,CAAA;IAC7B,CAAC;IAED;;;;;;;;OAQG;IACH,KAAK,CAAC,GAAG,CAAC,OAAwB;QAChC,OAAO,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,CAAC,MAAM,CAAC,UAAU,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,OAAO,EAAE,CAAC,CAAA;IACrH,CAAC;IAED,uFAAuF;IACvF,EAAE;QACA,OAAO,IAAI,CAAC,UAAU,EAAE,CAAA;IAC1B,CAAC;CACF"}
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { RequestOptions } from '../core/http.js';
|
|
2
|
+
import type { Scope } from '../core/scope.js';
|
|
3
|
+
import type { AddAddressesResult, Address, AddressInput, AddressPage, AddressRef, AddressUpdate, AssetSelection, Direction, RemoveAddressesResult, UpdateAddressesResult } from '../generated/types.js';
|
|
4
|
+
/** Maximum number of addresses the API accepts per request. Larger lists are split into batches automatically. */
|
|
5
|
+
export declare const ADDRESS_BATCH_SIZE = 1000;
|
|
6
|
+
/**
|
|
7
|
+
* Default subscription for every address in a request that does not set its own. Without it, an address is notified
|
|
8
|
+
* about all assets of its network in both directions.
|
|
9
|
+
*/
|
|
10
|
+
export interface SubscriptionDefaults {
|
|
11
|
+
/** Asset symbols (`USDT`) or contract addresses. `null` — all assets of the network, including ones added later. */
|
|
12
|
+
assets?: AssetSelection;
|
|
13
|
+
/** `in` — incoming only, `out` — outgoing only, `both` — either. */
|
|
14
|
+
direction?: Direction;
|
|
15
|
+
}
|
|
16
|
+
/** Parameters of {@link AddressesResource.list}. */
|
|
17
|
+
export interface ListAddressesParams {
|
|
18
|
+
/** Only addresses on this network. */
|
|
19
|
+
network?: string;
|
|
20
|
+
/** Page size, up to 5000. Defaults to 500. */
|
|
21
|
+
limit?: number;
|
|
22
|
+
/** Cursor: `next` of the previous page. */
|
|
23
|
+
after?: number;
|
|
24
|
+
}
|
|
25
|
+
/** Addresses you monitor and their subscriptions: which assets and which direction you are notified about. */
|
|
26
|
+
export declare class AddressesResource {
|
|
27
|
+
#private;
|
|
28
|
+
/** @internal */
|
|
29
|
+
constructor(scope: Scope);
|
|
30
|
+
/**
|
|
31
|
+
* Lists monitored addresses, one page at a time.
|
|
32
|
+
*
|
|
33
|
+
* @example
|
|
34
|
+
* ```ts
|
|
35
|
+
* const { items, next } = await monitoring.addresses.list({ network: 'tron' })
|
|
36
|
+
* ```
|
|
37
|
+
*/
|
|
38
|
+
list(params?: ListAddressesParams, options?: RequestOptions): Promise<AddressPage>;
|
|
39
|
+
/**
|
|
40
|
+
* Iterates over all monitored addresses, fetching pages as needed.
|
|
41
|
+
*
|
|
42
|
+
* @example
|
|
43
|
+
* ```ts
|
|
44
|
+
* for await (const address of monitoring.addresses.iterate({ network: 'tron' })) {
|
|
45
|
+
* console.log(address.address, address.assets ?? 'all assets', address.direction)
|
|
46
|
+
* }
|
|
47
|
+
* ```
|
|
48
|
+
*/
|
|
49
|
+
iterate(params?: Omit<ListAddressesParams, 'after'>, options?: RequestOptions): AsyncGenerator<Address, void, undefined>;
|
|
50
|
+
/**
|
|
51
|
+
* Starts monitoring addresses. New addresses are picked up within seconds. Addresses that are already monitored are
|
|
52
|
+
* left unchanged — use {@link AddressesResource.update} to change their subscription.
|
|
53
|
+
*
|
|
54
|
+
* Each batch of up to {@link ADDRESS_BATCH_SIZE} addresses is validated as a whole: if any item is invalid, the
|
|
55
|
+
* batch is not applied. Larger lists are sent in batches, in order; if a batch fails, the previous batches have
|
|
56
|
+
* already been applied, and the indexes in `error.details` refer to your original list. Retrying is safe.
|
|
57
|
+
*
|
|
58
|
+
* @param addresses - Addresses to monitor. An EVM address is monitored per network: add it once per network.
|
|
59
|
+
* @param defaults - Subscription for addresses that do not set their own.
|
|
60
|
+
* @throws {@link MonitoringApiError} `400` with `details` when an address is invalid for its network or an asset
|
|
61
|
+
* is unknown.
|
|
62
|
+
*
|
|
63
|
+
* @example
|
|
64
|
+
* ```ts
|
|
65
|
+
* // deposit addresses: incoming USDT only
|
|
66
|
+
* await monitoring.addresses.add([{ network: 'tron', address: 'TA8Hg…', label: 'user-42' }], {
|
|
67
|
+
* assets: ['USDT'],
|
|
68
|
+
* direction: 'in',
|
|
69
|
+
* })
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
add(addresses: AddressInput[], defaults?: SubscriptionDefaults, options?: RequestOptions): Promise<AddAddressesResult>;
|
|
73
|
+
/**
|
|
74
|
+
* Changes the subscription of monitored addresses. Only the fields you pass are changed: omit `assets` to keep the
|
|
75
|
+
* current assets, or pass `null` to subscribe to all assets of the network.
|
|
76
|
+
*
|
|
77
|
+
* @example
|
|
78
|
+
* ```ts
|
|
79
|
+
* await monitoring.addresses.update([{ network: 'tron', address: 'TA8Hg…' }], { direction: 'both' })
|
|
80
|
+
* ```
|
|
81
|
+
*/
|
|
82
|
+
update(addresses: AddressUpdate[], defaults?: SubscriptionDefaults, options?: RequestOptions): Promise<UpdateAddressesResult>;
|
|
83
|
+
/**
|
|
84
|
+
* Stops monitoring addresses.
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* await monitoring.addresses.remove([{ network: 'tron', address: 'TA8Hg…' }])
|
|
89
|
+
* ```
|
|
90
|
+
*/
|
|
91
|
+
remove(addresses: AddressRef[], options?: RequestOptions): Promise<RemoveAddressesResult>;
|
|
92
|
+
}
|
|
93
|
+
//# sourceMappingURL=addresses.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"addresses.d.ts","sourceRoot":"","sources":["../../../src/resources/addresses.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAA;AAErD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAA;AAC7C,OAAO,KAAK,EACV,kBAAkB,EAClB,OAAO,EACP,YAAY,EACZ,WAAW,EACX,UAAU,EACV,aAAa,EACb,cAAc,EACd,SAAS,EACT,qBAAqB,EACrB,qBAAqB,EACtB,MAAM,uBAAuB,CAAA;AAE9B,kHAAkH;AAClH,eAAO,MAAM,kBAAkB,OAAO,CAAA;AAEtC;;;GAGG;AACH,MAAM,WAAW,oBAAoB;IACnC,oHAAoH;IACpH,MAAM,CAAC,EAAE,cAAc,CAAA;IACvB,oEAAoE;IACpE,SAAS,CAAC,EAAE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