@aave/client 0.5.0 → 0.6.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.
Files changed (57) hide show
  1. package/package.json +3 -3
  2. package/dist/actions/index.cjs +0 -2
  3. package/dist/actions/index.cjs.map +0 -1
  4. package/dist/actions/index.d.cts +0 -971
  5. package/dist/actions/index.d.ts +0 -971
  6. package/dist/actions/index.js +0 -2
  7. package/dist/actions/index.js.map +0 -1
  8. package/dist/chunk-FW4363Y4.js +0 -2
  9. package/dist/chunk-FW4363Y4.js.map +0 -1
  10. package/dist/chunk-G5WP6QBY.js +0 -3
  11. package/dist/chunk-G5WP6QBY.js.map +0 -1
  12. package/dist/chunk-IKLPSB3H.js +0 -3
  13. package/dist/chunk-IKLPSB3H.js.map +0 -1
  14. package/dist/chunk-KT47UJBO.js +0 -2
  15. package/dist/chunk-KT47UJBO.js.map +0 -1
  16. package/dist/chunk-QYPBLR6B.js +0 -3
  17. package/dist/chunk-QYPBLR6B.js.map +0 -1
  18. package/dist/ethers.cjs +0 -3
  19. package/dist/ethers.cjs.map +0 -1
  20. package/dist/ethers.d.cts +0 -22
  21. package/dist/ethers.d.ts +0 -22
  22. package/dist/ethers.js +0 -2
  23. package/dist/ethers.js.map +0 -1
  24. package/dist/index.cjs +0 -4
  25. package/dist/index.cjs.map +0 -1
  26. package/dist/index.d.cts +0 -250
  27. package/dist/index.d.ts +0 -250
  28. package/dist/index.js +0 -2
  29. package/dist/index.js.map +0 -1
  30. package/dist/magic-string.es-PTUXR566.js +0 -14
  31. package/dist/magic-string.es-PTUXR566.js.map +0 -1
  32. package/dist/privy.cjs +0 -4
  33. package/dist/privy.cjs.map +0 -1
  34. package/dist/privy.d.cts +0 -18
  35. package/dist/privy.d.ts +0 -18
  36. package/dist/privy.js +0 -2
  37. package/dist/privy.js.map +0 -1
  38. package/dist/test-utils.cjs +0 -450
  39. package/dist/test-utils.cjs.map +0 -1
  40. package/dist/test-utils.d.cts +0 -37
  41. package/dist/test-utils.d.ts +0 -37
  42. package/dist/test-utils.js +0 -438
  43. package/dist/test-utils.js.map +0 -1
  44. package/dist/thirdweb.cjs +0 -3
  45. package/dist/thirdweb.cjs.map +0 -1
  46. package/dist/thirdweb.d.cts +0 -18
  47. package/dist/thirdweb.d.ts +0 -18
  48. package/dist/thirdweb.js +0 -2
  49. package/dist/thirdweb.js.map +0 -1
  50. package/dist/types-DwXCLJq5.d.cts +0 -72
  51. package/dist/types-DwXCLJq5.d.ts +0 -72
  52. package/dist/viem.cjs +0 -4
  53. package/dist/viem.cjs.map +0 -1
  54. package/dist/viem.d.cts +0 -30
  55. package/dist/viem.d.ts +0 -30
  56. package/dist/viem.js +0 -2
  57. package/dist/viem.js.map +0 -1
package/dist/index.d.cts DELETED
@@ -1,250 +0,0 @@
1
- import { StandardData, HasProcessedKnownTransactionRequest } from '@aave/graphql';
2
- export * from '@aave/graphql';
3
- import { ResultAsync, TxHash } from '@aave/types';
4
- export * from '@aave/types';
5
- import { TypedDocumentNode, Client, AnyVariables, Exchange, OperationResultSource, OperationResult } from '@urql/core';
6
- import { U as UnexpectedError, T as TransactionExecutionResult, b as TimeoutError } from './types-DwXCLJq5.cjs';
7
- export { E as ExecutionPlanHandler, G as GraphQLErrorCode, P as PermitHandler, S as SigningError, a as TransactionError, c as TransactionErrorArgs, V as ValidationError, h as hasExtensionCode, i as isHasProcessedKnownTransactionRequest } from './types-DwXCLJq5.cjs';
8
-
9
- /**
10
- * The environment configuration type.
11
- */
12
- type EnvironmentConfig = {
13
- name: string;
14
- backend: string;
15
- indexingTimeout: number;
16
- pollingInterval: number;
17
- };
18
- /**
19
- * The production environment configuration.
20
- */
21
- declare const production: EnvironmentConfig;
22
- /**
23
- * @internal
24
- */
25
- declare const staging: EnvironmentConfig;
26
- /**
27
- * @internal
28
- */
29
- declare const local: EnvironmentConfig;
30
-
31
- /**
32
- * The client configuration.
33
- */
34
- type ClientConfig = {
35
- /**
36
- * @internal
37
- * @defaultValue `production`
38
- */
39
- environment?: EnvironmentConfig;
40
- /**
41
- * @internal
42
- */
43
- headers?: Record<string, string>;
44
- /**
45
- * Whether to enable caching.
46
- *
47
- * @defaultValue `false`
48
- */
49
- cache?: boolean;
50
- /**
51
- * Whether to enable debug mode.
52
- *
53
- * @defaultValue `false`
54
- */
55
- debug?: boolean;
56
- /**
57
- * The custom fragments to use.
58
- *
59
- * @experimental This is an experimental API and may be subject to breaking changes.
60
- */
61
- fragments?: TypedDocumentNode[];
62
- };
63
-
64
- declare class AaveClient {
65
- private readonly context;
66
- /**
67
- * @internal
68
- */
69
- readonly urql: Client;
70
- private readonly logger;
71
- private constructor();
72
- /**
73
- * Create a new instance of the {@link AaveClient}.
74
- *
75
- * ```ts
76
- * const client = AaveClient.create({
77
- * environment: production,
78
- * origin: 'http://example.com',
79
- * });
80
- * ```
81
- *
82
- * @param options - The options to configure the client.
83
- * @returns The new instance of the client.
84
- */
85
- static create(options?: ClientConfig): AaveClient;
86
- /**
87
- * Execute a GraphQL query operation.
88
- *
89
- * @param document - The GraphQL document to execute.
90
- * @param variables - The variables to pass to the operation.
91
- * @returns The result of the operation.
92
- */
93
- query<TValue, TVariables extends AnyVariables>(document: TypedDocumentNode<StandardData<TValue>, TVariables>, variables: TVariables): ResultAsync<TValue, UnexpectedError>;
94
- /**
95
- * Execute a GraphQL mutation operation.
96
- *
97
- * @param document - The GraphQL document to execute.
98
- * @param variables - The variables to pass to the operation.
99
- * @returns The result of the operation.
100
- */
101
- mutation<TValue, TVariables extends AnyVariables>(document: TypedDocumentNode<StandardData<TValue>, TVariables>, variables: TVariables): ResultAsync<TValue, UnexpectedError>;
102
- /**
103
- * Execute a batch of GraphQL query operations.
104
- *
105
- * @alpha This is an alpha API and may be subject to breaking changes.
106
- *
107
- * ```ts
108
- * const result = await client.batch((c) => [
109
- * fetchAccount(c, { address: evmAddress('0x1234…') }).map(nonNullable),
110
- * fetchBalancesBulk(c, {
111
- * includeNative: true,
112
- * tokens: [
113
- * evmAddress("0x5678…"),
114
- * evmAddress("0x9012…"),
115
- * ],
116
- * }),
117
- * ]);
118
- *
119
- * // const result: Result<
120
- * // [
121
- * // Account,
122
- * // AnyAccountBalance[],
123
- * // ],
124
- * // UnauthenticatedError | UnexpectedError
125
- * // >
126
- * ```
127
- *
128
- * @param cb - The callback with the scoped client to execute the actions with.
129
- * @returns The results of all queries in the same order as they were added.
130
- */
131
- batch<T1, T2, E1 extends Error, E2 extends Error>(cb: (client: this) => [ResultAsync<T1, E1>, ResultAsync<T2, E2>]): ResultAsync<[T1, T2], E1 | E2>;
132
- batch<T1, T2, T3, E1 extends Error, E2 extends Error, E3 extends Error>(cb: (client: this) => [ResultAsync<T1, E1>, ResultAsync<T2, E2>, ResultAsync<T3, E3>]): ResultAsync<[T1, T2, T3], E1 | E2 | E3>;
133
- batch<T1, T2, T3, T4, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error>(cb: (client: this) => [
134
- ResultAsync<T1, E1>,
135
- ResultAsync<T2, E2>,
136
- ResultAsync<T3, E3>,
137
- ResultAsync<T4, E4>
138
- ]): ResultAsync<[T1, T2, T3, T4], E1 | E2 | E3 | E4>;
139
- batch<T1, T2, T3, T4, T5, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error>(cb: (client: this) => [
140
- ResultAsync<T1, E1>,
141
- ResultAsync<T2, E2>,
142
- ResultAsync<T3, E3>,
143
- ResultAsync<T4, E4>,
144
- ResultAsync<T5, E5>
145
- ]): ResultAsync<[T1, T2, T3, T4, T5], E1 | E2 | E3 | E4 | E5>;
146
- batch<T1, T2, T3, T4, T5, T6, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error, E6 extends Error>(cb: (client: this) => [
147
- ResultAsync<T1, E1>,
148
- ResultAsync<T2, E2>,
149
- ResultAsync<T3, E3>,
150
- ResultAsync<T4, E4>,
151
- ResultAsync<T5, E5>,
152
- ResultAsync<T6, E6>
153
- ]): ResultAsync<[T1, T2, T3, T4, T5, T6], E1 | E2 | E3 | E4 | E5 | E6>;
154
- batch<T1, T2, T3, T4, T5, T6, T7, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error, E6 extends Error, E7 extends Error>(cb: (client: this) => [
155
- ResultAsync<T1, E1>,
156
- ResultAsync<T2, E2>,
157
- ResultAsync<T3, E3>,
158
- ResultAsync<T4, E4>,
159
- ResultAsync<T5, E5>,
160
- ResultAsync<T6, E6>,
161
- ResultAsync<T7, E7>
162
- ]): ResultAsync<[
163
- T1,
164
- T2,
165
- T3,
166
- T4,
167
- T5,
168
- T6,
169
- T7
170
- ], E1 | E2 | E3 | E4 | E5 | E6 | E7>;
171
- batch<T1, T2, T3, T4, T5, T6, T7, T8, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error, E6 extends Error, E7 extends Error, E8 extends Error>(cb: (client: this) => [
172
- ResultAsync<T1, E1>,
173
- ResultAsync<T2, E2>,
174
- ResultAsync<T3, E3>,
175
- ResultAsync<T4, E4>,
176
- ResultAsync<T5, E5>,
177
- ResultAsync<T6, E6>,
178
- ResultAsync<T7, E7>,
179
- ResultAsync<T8, E8>
180
- ]): ResultAsync<[
181
- T1,
182
- T2,
183
- T3,
184
- T4,
185
- T5,
186
- T6,
187
- T7,
188
- T8
189
- ], E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8>;
190
- batch<T1, T2, T3, T4, T5, T6, T7, T8, T9, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error, E6 extends Error, E7 extends Error, E8 extends Error, E9 extends Error>(cb: (client: this) => [
191
- ResultAsync<T1, E1>,
192
- ResultAsync<T2, E2>,
193
- ResultAsync<T3, E3>,
194
- ResultAsync<T4, E4>,
195
- ResultAsync<T5, E5>,
196
- ResultAsync<T6, E6>,
197
- ResultAsync<T7, E7>,
198
- ResultAsync<T8, E8>,
199
- ResultAsync<T9, E9>
200
- ]): ResultAsync<[
201
- T1,
202
- T2,
203
- T3,
204
- T4,
205
- T5,
206
- T6,
207
- T7,
208
- T8,
209
- T9
210
- ], E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8 | E9>;
211
- batch<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error, E6 extends Error, E7 extends Error, E8 extends Error, E9 extends Error, E10 extends Error>(cb: (client: this) => [
212
- ResultAsync<T1, E1>,
213
- ResultAsync<T2, E2>,
214
- ResultAsync<T3, E3>,
215
- ResultAsync<T4, E4>,
216
- ResultAsync<T5, E5>,
217
- ResultAsync<T6, E6>,
218
- ResultAsync<T7, E7>,
219
- ResultAsync<T8, E8>,
220
- ResultAsync<T9, E9>,
221
- ResultAsync<T10, E10>
222
- ]): ResultAsync<[
223
- T1,
224
- T2,
225
- T3,
226
- T4,
227
- T5,
228
- T6,
229
- T7,
230
- T8,
231
- T9,
232
- T10
233
- ], E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8 | E9 | E10>;
234
- batch<T, E extends Error>(cb: (client: this) => ResultAsync<T, E>[]): ResultAsync<T[], E>;
235
- /**
236
- * Given the transaction hash of an Aave protocol transaction, wait for the transaction to be
237
- * processed by the Aave v3 API.
238
- *
239
- * Returns a {@link TimeoutError} if the transaction is not processed within the expected timeout period.
240
- *
241
- * @param result - The transaction execution result to wait for.
242
- * @returns The transaction hash or a TimeoutError
243
- */
244
- readonly waitForTransaction: (result: TransactionExecutionResult) => ResultAsync<TxHash, TimeoutError | UnexpectedError>;
245
- protected pollTransactionStatus(request: HasProcessedKnownTransactionRequest): Promise<TxHash>;
246
- protected exchanges(): Exchange[];
247
- protected resultFrom<TData, TVariables extends AnyVariables>(source: OperationResultSource<OperationResult<TData, TVariables>>): ResultAsync<OperationResult<TData, TVariables>, UnexpectedError>;
248
- }
249
-
250
- export { AaveClient, type ClientConfig, type EnvironmentConfig, TimeoutError, TransactionExecutionResult, UnexpectedError, local, production, staging };
package/dist/index.d.ts DELETED
@@ -1,250 +0,0 @@
1
- import { StandardData, HasProcessedKnownTransactionRequest } from '@aave/graphql';
2
- export * from '@aave/graphql';
3
- import { ResultAsync, TxHash } from '@aave/types';
4
- export * from '@aave/types';
5
- import { TypedDocumentNode, Client, AnyVariables, Exchange, OperationResultSource, OperationResult } from '@urql/core';
6
- import { U as UnexpectedError, T as TransactionExecutionResult, b as TimeoutError } from './types-DwXCLJq5.js';
7
- export { E as ExecutionPlanHandler, G as GraphQLErrorCode, P as PermitHandler, S as SigningError, a as TransactionError, c as TransactionErrorArgs, V as ValidationError, h as hasExtensionCode, i as isHasProcessedKnownTransactionRequest } from './types-DwXCLJq5.js';
8
-
9
- /**
10
- * The environment configuration type.
11
- */
12
- type EnvironmentConfig = {
13
- name: string;
14
- backend: string;
15
- indexingTimeout: number;
16
- pollingInterval: number;
17
- };
18
- /**
19
- * The production environment configuration.
20
- */
21
- declare const production: EnvironmentConfig;
22
- /**
23
- * @internal
24
- */
25
- declare const staging: EnvironmentConfig;
26
- /**
27
- * @internal
28
- */
29
- declare const local: EnvironmentConfig;
30
-
31
- /**
32
- * The client configuration.
33
- */
34
- type ClientConfig = {
35
- /**
36
- * @internal
37
- * @defaultValue `production`
38
- */
39
- environment?: EnvironmentConfig;
40
- /**
41
- * @internal
42
- */
43
- headers?: Record<string, string>;
44
- /**
45
- * Whether to enable caching.
46
- *
47
- * @defaultValue `false`
48
- */
49
- cache?: boolean;
50
- /**
51
- * Whether to enable debug mode.
52
- *
53
- * @defaultValue `false`
54
- */
55
- debug?: boolean;
56
- /**
57
- * The custom fragments to use.
58
- *
59
- * @experimental This is an experimental API and may be subject to breaking changes.
60
- */
61
- fragments?: TypedDocumentNode[];
62
- };
63
-
64
- declare class AaveClient {
65
- private readonly context;
66
- /**
67
- * @internal
68
- */
69
- readonly urql: Client;
70
- private readonly logger;
71
- private constructor();
72
- /**
73
- * Create a new instance of the {@link AaveClient}.
74
- *
75
- * ```ts
76
- * const client = AaveClient.create({
77
- * environment: production,
78
- * origin: 'http://example.com',
79
- * });
80
- * ```
81
- *
82
- * @param options - The options to configure the client.
83
- * @returns The new instance of the client.
84
- */
85
- static create(options?: ClientConfig): AaveClient;
86
- /**
87
- * Execute a GraphQL query operation.
88
- *
89
- * @param document - The GraphQL document to execute.
90
- * @param variables - The variables to pass to the operation.
91
- * @returns The result of the operation.
92
- */
93
- query<TValue, TVariables extends AnyVariables>(document: TypedDocumentNode<StandardData<TValue>, TVariables>, variables: TVariables): ResultAsync<TValue, UnexpectedError>;
94
- /**
95
- * Execute a GraphQL mutation operation.
96
- *
97
- * @param document - The GraphQL document to execute.
98
- * @param variables - The variables to pass to the operation.
99
- * @returns The result of the operation.
100
- */
101
- mutation<TValue, TVariables extends AnyVariables>(document: TypedDocumentNode<StandardData<TValue>, TVariables>, variables: TVariables): ResultAsync<TValue, UnexpectedError>;
102
- /**
103
- * Execute a batch of GraphQL query operations.
104
- *
105
- * @alpha This is an alpha API and may be subject to breaking changes.
106
- *
107
- * ```ts
108
- * const result = await client.batch((c) => [
109
- * fetchAccount(c, { address: evmAddress('0x1234…') }).map(nonNullable),
110
- * fetchBalancesBulk(c, {
111
- * includeNative: true,
112
- * tokens: [
113
- * evmAddress("0x5678…"),
114
- * evmAddress("0x9012…"),
115
- * ],
116
- * }),
117
- * ]);
118
- *
119
- * // const result: Result<
120
- * // [
121
- * // Account,
122
- * // AnyAccountBalance[],
123
- * // ],
124
- * // UnauthenticatedError | UnexpectedError
125
- * // >
126
- * ```
127
- *
128
- * @param cb - The callback with the scoped client to execute the actions with.
129
- * @returns The results of all queries in the same order as they were added.
130
- */
131
- batch<T1, T2, E1 extends Error, E2 extends Error>(cb: (client: this) => [ResultAsync<T1, E1>, ResultAsync<T2, E2>]): ResultAsync<[T1, T2], E1 | E2>;
132
- batch<T1, T2, T3, E1 extends Error, E2 extends Error, E3 extends Error>(cb: (client: this) => [ResultAsync<T1, E1>, ResultAsync<T2, E2>, ResultAsync<T3, E3>]): ResultAsync<[T1, T2, T3], E1 | E2 | E3>;
133
- batch<T1, T2, T3, T4, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error>(cb: (client: this) => [
134
- ResultAsync<T1, E1>,
135
- ResultAsync<T2, E2>,
136
- ResultAsync<T3, E3>,
137
- ResultAsync<T4, E4>
138
- ]): ResultAsync<[T1, T2, T3, T4], E1 | E2 | E3 | E4>;
139
- batch<T1, T2, T3, T4, T5, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error>(cb: (client: this) => [
140
- ResultAsync<T1, E1>,
141
- ResultAsync<T2, E2>,
142
- ResultAsync<T3, E3>,
143
- ResultAsync<T4, E4>,
144
- ResultAsync<T5, E5>
145
- ]): ResultAsync<[T1, T2, T3, T4, T5], E1 | E2 | E3 | E4 | E5>;
146
- batch<T1, T2, T3, T4, T5, T6, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error, E6 extends Error>(cb: (client: this) => [
147
- ResultAsync<T1, E1>,
148
- ResultAsync<T2, E2>,
149
- ResultAsync<T3, E3>,
150
- ResultAsync<T4, E4>,
151
- ResultAsync<T5, E5>,
152
- ResultAsync<T6, E6>
153
- ]): ResultAsync<[T1, T2, T3, T4, T5, T6], E1 | E2 | E3 | E4 | E5 | E6>;
154
- batch<T1, T2, T3, T4, T5, T6, T7, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error, E6 extends Error, E7 extends Error>(cb: (client: this) => [
155
- ResultAsync<T1, E1>,
156
- ResultAsync<T2, E2>,
157
- ResultAsync<T3, E3>,
158
- ResultAsync<T4, E4>,
159
- ResultAsync<T5, E5>,
160
- ResultAsync<T6, E6>,
161
- ResultAsync<T7, E7>
162
- ]): ResultAsync<[
163
- T1,
164
- T2,
165
- T3,
166
- T4,
167
- T5,
168
- T6,
169
- T7
170
- ], E1 | E2 | E3 | E4 | E5 | E6 | E7>;
171
- batch<T1, T2, T3, T4, T5, T6, T7, T8, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error, E6 extends Error, E7 extends Error, E8 extends Error>(cb: (client: this) => [
172
- ResultAsync<T1, E1>,
173
- ResultAsync<T2, E2>,
174
- ResultAsync<T3, E3>,
175
- ResultAsync<T4, E4>,
176
- ResultAsync<T5, E5>,
177
- ResultAsync<T6, E6>,
178
- ResultAsync<T7, E7>,
179
- ResultAsync<T8, E8>
180
- ]): ResultAsync<[
181
- T1,
182
- T2,
183
- T3,
184
- T4,
185
- T5,
186
- T6,
187
- T7,
188
- T8
189
- ], E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8>;
190
- batch<T1, T2, T3, T4, T5, T6, T7, T8, T9, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error, E6 extends Error, E7 extends Error, E8 extends Error, E9 extends Error>(cb: (client: this) => [
191
- ResultAsync<T1, E1>,
192
- ResultAsync<T2, E2>,
193
- ResultAsync<T3, E3>,
194
- ResultAsync<T4, E4>,
195
- ResultAsync<T5, E5>,
196
- ResultAsync<T6, E6>,
197
- ResultAsync<T7, E7>,
198
- ResultAsync<T8, E8>,
199
- ResultAsync<T9, E9>
200
- ]): ResultAsync<[
201
- T1,
202
- T2,
203
- T3,
204
- T4,
205
- T5,
206
- T6,
207
- T7,
208
- T8,
209
- T9
210
- ], E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8 | E9>;
211
- batch<T1, T2, T3, T4, T5, T6, T7, T8, T9, T10, E1 extends Error, E2 extends Error, E3 extends Error, E4 extends Error, E5 extends Error, E6 extends Error, E7 extends Error, E8 extends Error, E9 extends Error, E10 extends Error>(cb: (client: this) => [
212
- ResultAsync<T1, E1>,
213
- ResultAsync<T2, E2>,
214
- ResultAsync<T3, E3>,
215
- ResultAsync<T4, E4>,
216
- ResultAsync<T5, E5>,
217
- ResultAsync<T6, E6>,
218
- ResultAsync<T7, E7>,
219
- ResultAsync<T8, E8>,
220
- ResultAsync<T9, E9>,
221
- ResultAsync<T10, E10>
222
- ]): ResultAsync<[
223
- T1,
224
- T2,
225
- T3,
226
- T4,
227
- T5,
228
- T6,
229
- T7,
230
- T8,
231
- T9,
232
- T10
233
- ], E1 | E2 | E3 | E4 | E5 | E6 | E7 | E8 | E9 | E10>;
234
- batch<T, E extends Error>(cb: (client: this) => ResultAsync<T, E>[]): ResultAsync<T[], E>;
235
- /**
236
- * Given the transaction hash of an Aave protocol transaction, wait for the transaction to be
237
- * processed by the Aave v3 API.
238
- *
239
- * Returns a {@link TimeoutError} if the transaction is not processed within the expected timeout period.
240
- *
241
- * @param result - The transaction execution result to wait for.
242
- * @returns The transaction hash or a TimeoutError
243
- */
244
- readonly waitForTransaction: (result: TransactionExecutionResult) => ResultAsync<TxHash, TimeoutError | UnexpectedError>;
245
- protected pollTransactionStatus(request: HasProcessedKnownTransactionRequest): Promise<TxHash>;
246
- protected exchanges(): Exchange[];
247
- protected resultFrom<TData, TVariables extends AnyVariables>(source: OperationResultSource<OperationResult<TData, TVariables>>): ResultAsync<OperationResult<TData, TVariables>, UnexpectedError>;
248
- }
249
-
250
- export { AaveClient, type ClientConfig, type EnvironmentConfig, TimeoutError, TransactionExecutionResult, UnexpectedError, local, production, staging };
package/dist/index.js DELETED
@@ -1,2 +0,0 @@
1
- export{d as AaveClient,c as local,a as production,b as staging}from'./chunk-IKLPSB3H.js';export{a as GraphQLErrorCode,d as SigningError,f as TimeoutError,e as TransactionError,c as UnexpectedError,g as ValidationError,b as hasExtensionCode}from'./chunk-QYPBLR6B.js';import'./chunk-KT47UJBO.js';import'./chunk-FW4363Y4.js';export*from'@aave/graphql';export*from'@aave/types';//# sourceMappingURL=index.js.map
2
- //# sourceMappingURL=index.js.map
package/dist/index.js.map DELETED
@@ -1 +0,0 @@
1
- {"version":3,"sources":[],"names":[],"mappings":"","file":"index.js","sourcesContent":[]}
@@ -1,14 +0,0 @@
1
- import'./chunk-FW4363Y4.js';var _=44,N=59,x="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",E=new Uint8Array(64),A=new Uint8Array(128);for(let l=0;l<x.length;l++){let t=x.charCodeAt(l);E[l]=t,A[t]=l;}function d(l,t,e){let n=t-e;n=n<0?-n<<1|1:n<<1;do{let i=n&31;n>>>=5,n>0&&(i|=32),l.write(E[i]);}while(n>0);return t}var v=1024*16,y=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode(l){return Buffer.from(l.buffer,l.byteOffset,l.byteLength).toString()}}:{decode(l){let t="";for(let e=0;e<l.length;e++)t+=String.fromCharCode(l[e]);return t}},j=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(v);}write(l){let{buffer:t}=this;t[this.pos++]=l,this.pos===v&&(this.out+=y.decode(t),this.pos=0);}flush(){let{buffer:l,out:t,pos:e}=this;return e>0?t+y.decode(l.subarray(0,e)):t}};function L(l){let t=new j,e=0,n=0,i=0,r=0;for(let s=0;s<l.length;s++){let h=l[s];if(s>0&&t.write(N),h.length===0)continue;let o=0;for(let u=0;u<h.length;u++){let a=h[u];u>0&&t.write(_),o=d(t,a[0],o),a.length!==1&&(e=d(t,a[1],e),n=d(t,a[2],n),i=d(t,a[3],i),a.length!==4&&(r=d(t,a[4],r)));}}return t.flush()}var p=class l{constructor(t){this.bits=t instanceof l?t.bits.slice():[];}add(t){this.bits[t>>5]|=1<<(t&31);}has(t){return !!(this.bits[t>>5]&1<<(t&31))}},m=class l{constructor(t,e,n){this.start=t,this.end=e,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=false,this.edited=false,this.previous=null,this.next=null;}appendLeft(t){this.outro+=t;}appendRight(t){this.intro=this.intro+t;}clone(){let t=new l(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(t){return this.start<t&&t<this.end}eachNext(t){let e=this;for(;e;)t(e),e=e.next;}eachPrevious(t){let e=this;for(;e;)t(e),e=e.previous;}edit(t,e,n){return this.content=t,n||(this.intro="",this.outro=""),this.storeName=e,this.edited=true,this}prependLeft(t){this.outro=t+this.outro;}prependRight(t){this.intro=t+this.intro;}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=false,this.edited=false);}split(t){let e=t-this.start,n=this.original.slice(0,e),i=this.original.slice(e);this.original=n;let r=new l(t,this.end,i);return r.outro=this.outro,this.outro="",this.end=t,this.edited?(r.edit("",false),this.content=""):this.content=n,r.next=this.next,r.next&&(r.next.previous=r),r.previous=this,this.next=r,r}toString(){return this.intro+this.content+this.outro}trimEnd(t){if(this.outro=this.outro.replace(t,""),this.outro.length)return true;let e=this.content.replace(t,"");if(e.length)return e!==this.content&&(this.split(this.start+e.length).edit("",void 0,true),this.edited&&this.edit(e,this.storeName,true)),true;if(this.edit("",void 0,true),this.intro=this.intro.replace(t,""),this.intro.length)return true}trimStart(t){if(this.intro=this.intro.replace(t,""),this.intro.length)return true;let e=this.content.replace(t,"");if(e.length){if(e!==this.content){let n=this.split(this.end-e.length);this.edited&&n.edit(e,this.storeName,true),this.edit("",void 0,true);}return true}else if(this.edit("",void 0,true),this.outro=this.outro.replace(t,""),this.outro.length)return true}};function $(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?l=>globalThis.btoa(unescape(encodeURIComponent(l))):typeof Buffer=="function"?l=>Buffer.from(l,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}var q=$(),w=class{constructor(t){this.version=3,this.file=t.file,this.sources=t.sources,this.sourcesContent=t.sourcesContent,this.names=t.names,this.mappings=L(t.mappings),typeof t.x_google_ignoreList<"u"&&(this.x_google_ignoreList=t.x_google_ignoreList),typeof t.debugId<"u"&&(this.debugId=t.debugId);}toString(){return JSON.stringify(this)}toUrl(){return "data:application/json;charset=utf-8;base64,"+q(this.toString())}};function T(l){let t=l.split(`
2
- `),e=t.filter(r=>/^\t+/.test(r)),n=t.filter(r=>/^ {2,}/.test(r));if(e.length===0&&n.length===0)return null;if(e.length>=n.length)return " ";let i=n.reduce((r,s)=>{let h=/^ +/.exec(s)[0].length;return Math.min(h,r)},1/0);return new Array(i+1).join(" ")}function I(l,t){let e=l.split(/[/\\]/),n=t.split(/[/\\]/);for(e.pop();e[0]===n[0];)e.shift(),n.shift();if(e.length){let i=e.length;for(;i--;)e[i]="..";}return e.concat(n).join("/")}var B=Object.prototype.toString;function O(l){return B.call(l)==="[object Object]"}function S(l){let t=l.split(`
3
- `),e=[];for(let n=0,i=0;n<t.length;n++)e.push(i),i+=t[n].length+1;return function(i){let r=0,s=e.length;for(;r<s;){let u=r+s>>1;i<e[u]?s=u:r=u+1;}let h=r-1,o=i-e[h];return {line:h,column:o}}}var U=/\w/,b=class{constructor(t){this.hires=t,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null;}addEdit(t,e,n,i){if(e.length){let r=e.length-1,s=e.indexOf(`
4
- `,0),h=-1;for(;s>=0&&r>s;){let u=[this.generatedCodeColumn,t,n.line,n.column];i>=0&&u.push(i),this.rawSegments.push(u),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,h=s,s=e.indexOf(`
5
- `,s+1);}let o=[this.generatedCodeColumn,t,n.line,n.column];i>=0&&o.push(i),this.rawSegments.push(o),this.advance(e.slice(h+1));}else this.pending&&(this.rawSegments.push(this.pending),this.advance(e));this.pending=null;}addUneditedChunk(t,e,n,i,r){let s=e.start,h=true,o=false;for(;s<e.end;){if(n[s]===`
6
- `)i.line+=1,i.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,h=true,o=false;else {if(this.hires||h||r.has(s)){let u=[this.generatedCodeColumn,t,i.line,i.column];this.hires==="boundary"?U.test(n[s])?o||(this.rawSegments.push(u),o=true):(this.rawSegments.push(u),o=false):this.rawSegments.push(u);}i.column+=1,this.generatedCodeColumn+=1,h=false;}s+=1;}this.pending=null;}advance(t){if(!t)return;let e=t.split(`
7
- `);if(e.length>1){for(let n=0;n<e.length-1;n++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0;}this.generatedCodeColumn+=e[e.length-1].length;}},g=`
8
- `,c={insertLeft:false,insertRight:false,storeName:false},C=class l{constructor(t,e={}){let n=new m(0,t.length,t);Object.defineProperties(this,{original:{writable:true,value:t},outro:{writable:true,value:""},intro:{writable:true,value:""},firstChunk:{writable:true,value:n},lastChunk:{writable:true,value:n},lastSearchedChunk:{writable:true,value:n},byStart:{writable:true,value:{}},byEnd:{writable:true,value:{}},filename:{writable:true,value:e.filename},indentExclusionRanges:{writable:true,value:e.indentExclusionRanges},sourcemapLocations:{writable:true,value:new p},storedNames:{writable:true,value:{}},indentStr:{writable:true,value:void 0},ignoreList:{writable:true,value:e.ignoreList},offset:{writable:true,value:e.offset||0}}),this.byStart[0]=n,this.byEnd[t.length]=n;}addSourcemapLocation(t){this.sourcemapLocations.add(t);}append(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.outro+=t,this}appendLeft(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byEnd[t];return n?n.appendLeft(e):this.intro+=e,this}appendRight(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byStart[t];return n?n.appendRight(e):this.outro+=e,this}clone(){let t=new l(this.original,{filename:this.filename,offset:this.offset}),e=this.firstChunk,n=t.firstChunk=t.lastSearchedChunk=e.clone();for(;e;){t.byStart[n.start]=n,t.byEnd[n.end]=n;let i=e.next,r=i&&i.clone();r&&(n.next=r,r.previous=n,n=r),e=i;}return t.lastChunk=n,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new p(this.sourcemapLocations),t.intro=this.intro,t.outro=this.outro,t}generateDecodedMap(t){t=t||{};let e=0,n=Object.keys(this.storedNames),i=new b(t.hires),r=S(this.original);return this.intro&&i.advance(this.intro),this.firstChunk.eachNext(s=>{let h=r(s.start);s.intro.length&&i.advance(s.intro),s.edited?i.addEdit(e,s.content,h,s.storeName?n.indexOf(s.original):-1):i.addUneditedChunk(e,s,this.original,h,this.sourcemapLocations),s.outro.length&&i.advance(s.outro);}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:[t.source?I(t.file||"",t.source):t.file||""],sourcesContent:t.includeContent?[this.original]:void 0,names:n,mappings:i.raw,x_google_ignoreList:this.ignoreList?[e]:void 0}}generateMap(t){return new w(this.generateDecodedMap(t))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=T(this.original));}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(t,e){let n=/^[^\r\n]/gm;if(O(t)&&(e=t,t=void 0),t===void 0&&(this._ensureindentStr(),t=this.indentStr||" "),t==="")return this;e=e||{};let i={};e.exclude&&(typeof e.exclude[0]=="number"?[e.exclude]:e.exclude).forEach(a=>{for(let f=a[0];f<a[1];f+=1)i[f]=true;});let r=e.indentStart!==false,s=u=>r?`${t}${u}`:(r=true,u);this.intro=this.intro.replace(n,s);let h=0,o=this.firstChunk;for(;o;){let u=o.end;if(o.edited)i[h]||(o.content=o.content.replace(n,s),o.content.length&&(r=o.content[o.content.length-1]===`
9
- `));else for(h=o.start;h<u;){if(!i[h]){let a=this.original[h];a===`
10
- `?r=true:a!=="\r"&&r&&(r=false,h===o.start||(this._splitChunk(o,h),o=o.next),o.prependRight(t));}h+=1;}h=o.end,o=o.next;}return this.outro=this.outro.replace(n,s),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(t,e){return c.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),c.insertLeft=true),this.appendLeft(t,e)}insertRight(t,e){return c.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),c.insertRight=true),this.prependRight(t,e)}move(t,e,n){if(t=t+this.offset,e=e+this.offset,n=n+this.offset,n>=t&&n<=e)throw new Error("Cannot move a selection inside itself");this._split(t),this._split(e),this._split(n);let i=this.byStart[t],r=this.byEnd[e],s=i.previous,h=r.next,o=this.byStart[n];if(!o&&r===this.lastChunk)return this;let u=o?o.previous:this.lastChunk;return s&&(s.next=h),h&&(h.previous=s),u&&(u.next=i),o&&(o.previous=r),i.previous||(this.firstChunk=r.next),r.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=u,r.next=o||null,u||(this.firstChunk=i),o||(this.lastChunk=r),this}overwrite(t,e,n,i){return i=i||{},this.update(t,e,n,{...i,overwrite:!i.contentOnly})}update(t,e,n,i){if(t=t+this.offset,e=e+this.offset,typeof n!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length;}if(e>this.original.length)throw new Error("end is out of bounds");if(t===e)throw new Error("Cannot overwrite a zero-length range \u2013 use appendLeft or prependRight instead");this._split(t),this._split(e),i===true&&(c.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),c.storeName=true),i={storeName:true});let r=i!==void 0?i.storeName:false,s=i!==void 0?i.overwrite:false;if(r){let u=this.original.slice(t,e);Object.defineProperty(this.storedNames,u,{writable:true,value:true,enumerable:true});}let h=this.byStart[t],o=this.byEnd[e];if(h){let u=h;for(;u!==o;){if(u.next!==this.byStart[u.end])throw new Error("Cannot overwrite across a split point");u=u.next,u.edit("",false);}h.edit(n,r,!s);}else {let u=new m(t,e,"").edit(n,r);o.next=u,u.previous=o;}return this}prepend(t){if(typeof t!="string")throw new TypeError("outro content must be a string");return this.intro=t+this.intro,this}prependLeft(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byEnd[t];return n?n.prependLeft(e):this.intro=e+this.intro,this}prependRight(t,e){if(t=t+this.offset,typeof e!="string")throw new TypeError("inserted content must be a string");this._split(t);let n=this.byStart[t];return n?n.prependRight(e):this.outro=e+this.outro,this}remove(t,e){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length;}if(t===e)return this;if(t<0||e>this.original.length)throw new Error("Character is out of bounds");if(t>e)throw new Error("end must be greater than start");this._split(t),this._split(e);let n=this.byStart[t];for(;n;)n.intro="",n.outro="",n.edit(""),n=e>n.end?this.byStart[n.end]:null;return this}reset(t,e){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length;}if(t===e)return this;if(t<0||e>this.original.length)throw new Error("Character is out of bounds");if(t>e)throw new Error("end must be greater than start");this._split(t),this._split(e);let n=this.byStart[t];for(;n;)n.reset(),n=e>n.end?this.byStart[n.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let t=this.lastChunk;do{if(t.outro.length)return t.outro[t.outro.length-1];if(t.content.length)return t.content[t.content.length-1];if(t.intro.length)return t.intro[t.intro.length-1]}while(t=t.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let t=this.outro.lastIndexOf(g);if(t!==-1)return this.outro.substr(t+1);let e=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(t=n.outro.lastIndexOf(g),t!==-1)return n.outro.substr(t+1)+e;e=n.outro+e;}if(n.content.length>0){if(t=n.content.lastIndexOf(g),t!==-1)return n.content.substr(t+1)+e;e=n.content+e;}if(n.intro.length>0){if(t=n.intro.lastIndexOf(g),t!==-1)return n.intro.substr(t+1)+e;e=n.intro+e;}}while(n=n.previous);return t=this.intro.lastIndexOf(g),t!==-1?this.intro.substr(t+1)+e:this.intro+e}slice(t=0,e=this.original.length-this.offset){if(t=t+this.offset,e=e+this.offset,this.original.length!==0){for(;t<0;)t+=this.original.length;for(;e<0;)e+=this.original.length;}let n="",i=this.firstChunk;for(;i&&(i.start>t||i.end<=t);){if(i.start<e&&i.end>=e)return n;i=i.next;}if(i&&i.edited&&i.start!==t)throw new Error(`Cannot use replaced character ${t} as slice start anchor.`);let r=i;for(;i;){i.intro&&(r!==i||i.start===t)&&(n+=i.intro);let s=i.start<e&&i.end>=e;if(s&&i.edited&&i.end!==e)throw new Error(`Cannot use replaced character ${e} as slice end anchor.`);let h=r===i?t-i.start:0,o=s?i.content.length+e-i.end:i.content.length;if(n+=i.content.slice(h,o),i.outro&&(!s||i.end===e)&&(n+=i.outro),s)break;i=i.next;}return n}snip(t,e){let n=this.clone();return n.remove(0,t),n.remove(e,n.original.length),n}_split(t){if(this.byStart[t]||this.byEnd[t])return;let e=this.lastSearchedChunk,n=t>e.end;for(;e;){if(e.contains(t))return this._splitChunk(e,t);e=n?this.byStart[e.end]:this.byEnd[e.start];}}_splitChunk(t,e){if(t.edited&&t.content.length){let i=S(this.original)(e);throw new Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} \u2013 "${t.original}")`)}let n=t.split(e);return this.byEnd[e]=t,this.byStart[e]=n,this.byEnd[n.end]=n,t===this.lastChunk&&(this.lastChunk=n),this.lastSearchedChunk=t,true}toString(){let t=this.intro,e=this.firstChunk;for(;e;)t+=e.toString(),e=e.next;return t+this.outro}isEmpty(){let t=this.firstChunk;do if(t.intro.length&&t.intro.trim()||t.content.length&&t.content.trim()||t.outro.length&&t.outro.trim())return false;while(t=t.next);return true}length(){let t=this.firstChunk,e=0;do e+=t.intro.length+t.content.length+t.outro.length;while(t=t.next);return e}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimEndAborted(t){let e=new RegExp((t||"\\s")+"+$");if(this.outro=this.outro.replace(e,""),this.outro.length)return true;let n=this.lastChunk;do{let i=n.end,r=n.trimEnd(e);if(n.end!==i&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),r)return true;n=n.previous;}while(n);return false}trimEnd(t){return this.trimEndAborted(t),this}trimStartAborted(t){let e=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(e,""),this.intro.length)return true;let n=this.firstChunk;do{let i=n.end,r=n.trimStart(e);if(n.end!==i&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),r)return true;n=n.next;}while(n);return false}trimStart(t){return this.trimStartAborted(t),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(t,e){function n(r,s){return typeof e=="string"?e.replace(/\$(\$|&|\d+)/g,(h,o)=>o==="$"?"$":o==="&"?r[0]:+o<r.length?r[+o]:`$${o}`):e(...r,r.index,s,r.groups)}function i(r,s){let h,o=[];for(;h=r.exec(s);)o.push(h);return o}if(t.global)i(t,this.original).forEach(s=>{if(s.index!=null){let h=n(s,this.original);h!==s[0]&&this.overwrite(s.index,s.index+s[0].length,h);}});else {let r=this.original.match(t);if(r&&r.index!=null){let s=n(r,this.original);s!==r[0]&&this.overwrite(r.index,r.index+r[0].length,s);}}return this}_replaceString(t,e){let{original:n}=this,i=n.indexOf(t);return i!==-1&&this.overwrite(i,i+t.length,e),this}replace(t,e){return typeof t=="string"?this._replaceString(t,e):this._replaceRegexp(t,e)}_replaceAllString(t,e){let{original:n}=this,i=t.length;for(let r=n.indexOf(t);r!==-1;r=n.indexOf(t,r+i))n.slice(r,r+i)!==e&&this.overwrite(r,r+i,e);return this}replaceAll(t,e){if(typeof t=="string")return this._replaceAllString(t,e);if(!t.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(t,e)}},k=Object.prototype.hasOwnProperty,R=class l{constructor(t={}){this.intro=t.intro||"",this.separator=t.separator!==void 0?t.separator:`
11
- `,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={};}addSource(t){if(t instanceof C)return this.addSource({content:t,filename:t.filename,separator:this.separator});if(!O(t)||!t.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(e=>{k.call(t,e)||(t[e]=t.content[e]);}),t.separator===void 0&&(t.separator=this.separator),t.filename)if(!k.call(this.uniqueSourceIndexByFilename,t.filename))this.uniqueSourceIndexByFilename[t.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:t.filename,content:t.content.original});else {let e=this.uniqueSources[this.uniqueSourceIndexByFilename[t.filename]];if(t.content.original!==e.content)throw new Error(`Illegal source: same filename (${t.filename}), different contents`)}return this.sources.push(t),this}append(t,e){return this.addSource({content:new C(t),separator:e&&e.separator||""}),this}clone(){let t=new l({intro:this.intro,separator:this.separator});return this.sources.forEach(e=>{t.addSource({filename:e.filename,content:e.content.clone(),separator:e.separator});}),t}generateDecodedMap(t={}){let e=[],n;this.sources.forEach(r=>{Object.keys(r.content.storedNames).forEach(s=>{~e.indexOf(s)||e.push(s);});});let i=new b(t.hires);return this.intro&&i.advance(this.intro),this.sources.forEach((r,s)=>{s>0&&i.advance(this.separator);let h=r.filename?this.uniqueSourceIndexByFilename[r.filename]:-1,o=r.content,u=S(o.original);o.intro&&i.advance(o.intro),o.firstChunk.eachNext(a=>{let f=u(a.start);a.intro.length&&i.advance(a.intro),r.filename?a.edited?i.addEdit(h,a.content,f,a.storeName?e.indexOf(a.original):-1):i.addUneditedChunk(h,a,o.original,f,o.sourcemapLocations):i.advance(a.content),a.outro.length&&i.advance(a.outro);}),o.outro&&i.advance(o.outro),r.ignoreList&&h!==-1&&(n===void 0&&(n=[]),n.push(h));}),{file:t.file?t.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(r=>t.file?I(t.file,r.filename):r.filename),sourcesContent:this.uniqueSources.map(r=>t.includeContent?r.content:null),names:e,mappings:i.raw,x_google_ignoreList:n}}generateMap(t){return new w(this.generateDecodedMap(t))}getIndentString(){let t={};return this.sources.forEach(e=>{let n=e.content._getRawIndentString();n!==null&&(t[n]||(t[n]=0),t[n]+=1);}),Object.keys(t).sort((e,n)=>t[e]-t[n])[0]||" "}indent(t){if(arguments.length||(t=this.getIndentString()),t==="")return this;let e=!this.intro||this.intro.slice(-1)===`
12
- `;return this.sources.forEach((n,i)=>{let r=n.separator!==void 0?n.separator:this.separator,s=e||i>0&&/\r?\n$/.test(r);n.content.indent(t,{exclude:n.indentExclusionRanges,indentStart:s}),e=n.content.lastChar()===`
13
- `;}),this.intro&&(this.intro=t+this.intro.replace(/^[^\n]/gm,(n,i)=>i>0?t+n:n)),this}prepend(t){return this.intro=t+this.intro,this}toString(){let t=this.sources.map((e,n)=>{let i=e.separator!==void 0?e.separator:this.separator;return (n>0?i:"")+e.content.toString()}).join("");return this.intro+t}isEmpty(){return !(this.intro.length&&this.intro.trim()||this.sources.some(t=>!t.content.isEmpty()))}length(){return this.sources.reduce((t,e)=>t+e.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(t){return this.trimStart(t).trimEnd(t)}trimStart(t){let e=new RegExp("^"+(t||"\\s")+"+");if(this.intro=this.intro.replace(e,""),!this.intro){let n,i=0;do if(n=this.sources[i++],!n)break;while(!n.content.trimStartAborted(t))}return this}trimEnd(t){let e=new RegExp((t||"\\s")+"+$"),n,i=this.sources.length-1;do if(n=this.sources[i--],!n){this.intro=this.intro.replace(e,"");break}while(!n.content.trimEndAborted(t));return this}};export{R as Bundle,w as SourceMap,C as default};//# sourceMappingURL=magic-string.es-PTUXR566.js.map
14
- //# sourceMappingURL=magic-string.es-PTUXR566.js.map