@avail-project/ca-common 2.3.0 → 3.0.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 (95) hide show
  1. package/dist/cjs/index.js +10593 -20
  2. package/dist/esm/index.mjs +10603 -0
  3. package/dist/types/index.d.ts +2608 -13
  4. package/package.json +41 -37
  5. package/dist/cjs/_polyfill.js +0 -147
  6. package/dist/cjs/balances/ub-api.js +0 -25
  7. package/dist/cjs/cosmos/index.js +0 -31
  8. package/dist/cjs/data/chaindata.js +0 -788
  9. package/dist/cjs/data/chainid.js +0 -93
  10. package/dist/cjs/data/currency.js +0 -78
  11. package/dist/cjs/data/index.js +0 -7
  12. package/dist/cjs/data/utils.js +0 -44
  13. package/dist/cjs/evmabi/erc20.abi.js +0 -349
  14. package/dist/cjs/evmabi/fibrousrouter.abi.js +0 -41
  15. package/dist/cjs/evmabi/index.js +0 -7
  16. package/dist/cjs/evmabi/vault.abi.js +0 -1021
  17. package/dist/cjs/evmabi/yakaggregator.abi.js +0 -275
  18. package/dist/cjs/permitutils/index.js +0 -186
  19. package/dist/cjs/proto/client.js +0 -48
  20. package/dist/cjs/proto/definition.js +0 -4131
  21. package/dist/cjs/proto/grpc.js +0 -298
  22. package/dist/cjs/rff/rff.js +0 -42
  23. package/dist/cjs/types/binarytypes.js +0 -2
  24. package/dist/cjs/types/index.js +0 -5
  25. package/dist/cjs/types/msgpack-axios.js +0 -22
  26. package/dist/cjs/vaultcontracts/index.js +0 -4
  27. package/dist/cjs/vaultcontracts/vaultcontracts.js +0 -222
  28. package/dist/cjs/xcs/autochoice.js +0 -575
  29. package/dist/cjs/xcs/bebop-agg.js +0 -156
  30. package/dist/cjs/xcs/fibrous-agg.js +0 -155
  31. package/dist/cjs/xcs/iface.js +0 -13
  32. package/dist/cjs/xcs/index.js +0 -9
  33. package/dist/cjs/xcs/lifi-agg.js +0 -177
  34. package/dist/cjs/xcs/selectsources.js +0 -255
  35. package/dist/esm/_polyfill.js +0 -143
  36. package/dist/esm/balances/ub-api.js +0 -21
  37. package/dist/esm/cosmos/index.js +0 -26
  38. package/dist/esm/data/chaindata.js +0 -785
  39. package/dist/esm/data/chainid.js +0 -87
  40. package/dist/esm/data/currency.js +0 -73
  41. package/dist/esm/data/index.js +0 -4
  42. package/dist/esm/data/utils.js +0 -34
  43. package/dist/esm/evmabi/erc20.abi.js +0 -346
  44. package/dist/esm/evmabi/fibrousrouter.abi.js +0 -38
  45. package/dist/esm/evmabi/index.js +0 -4
  46. package/dist/esm/evmabi/vault.abi.js +0 -1018
  47. package/dist/esm/evmabi/yakaggregator.abi.js +0 -272
  48. package/dist/esm/index.js +0 -13
  49. package/dist/esm/permitutils/index.js +0 -181
  50. package/dist/esm/proto/client.js +0 -11
  51. package/dist/esm/proto/definition.js +0 -4122
  52. package/dist/esm/proto/grpc.js +0 -292
  53. package/dist/esm/rff/rff.js +0 -38
  54. package/dist/esm/types/binarytypes.js +0 -1
  55. package/dist/esm/types/index.js +0 -2
  56. package/dist/esm/types/msgpack-axios.js +0 -18
  57. package/dist/esm/vaultcontracts/index.js +0 -1
  58. package/dist/esm/vaultcontracts/vaultcontracts.js +0 -218
  59. package/dist/esm/xcs/autochoice.js +0 -559
  60. package/dist/esm/xcs/bebop-agg.js +0 -151
  61. package/dist/esm/xcs/fibrous-agg.js +0 -150
  62. package/dist/esm/xcs/iface.js +0 -10
  63. package/dist/esm/xcs/index.js +0 -6
  64. package/dist/esm/xcs/lifi-agg.js +0 -172
  65. package/dist/esm/xcs/selectsources.js +0 -251
  66. package/dist/types/_polyfill.d.ts +0 -1
  67. package/dist/types/balances/ub-api.d.ts +0 -14
  68. package/dist/types/cosmos/index.d.ts +0 -6
  69. package/dist/types/data/chaindata.d.ts +0 -20
  70. package/dist/types/data/chainid.d.ts +0 -31
  71. package/dist/types/data/currency.d.ts +0 -30
  72. package/dist/types/data/index.d.ts +0 -4
  73. package/dist/types/data/utils.d.ts +0 -10
  74. package/dist/types/evmabi/erc20.abi.d.ts +0 -264
  75. package/dist/types/evmabi/fibrousrouter.abi.d.ts +0 -77
  76. package/dist/types/evmabi/index.d.ts +0 -4
  77. package/dist/types/evmabi/vault.abi.d.ts +0 -785
  78. package/dist/types/evmabi/yakaggregator.abi.d.ts +0 -298
  79. package/dist/types/permitutils/index.d.ts +0 -13
  80. package/dist/types/proto/client.d.ts +0 -2
  81. package/dist/types/proto/definition.d.ts +0 -382
  82. package/dist/types/proto/grpc.d.ts +0 -75
  83. package/dist/types/rff/rff.d.ts +0 -9
  84. package/dist/types/types/binarytypes.d.ts +0 -1
  85. package/dist/types/types/index.d.ts +0 -2
  86. package/dist/types/types/msgpack-axios.d.ts +0 -1
  87. package/dist/types/vaultcontracts/index.d.ts +0 -22
  88. package/dist/types/vaultcontracts/vaultcontracts.d.ts +0 -8
  89. package/dist/types/xcs/autochoice.d.ts +0 -104
  90. package/dist/types/xcs/bebop-agg.d.ts +0 -104
  91. package/dist/types/xcs/fibrous-agg.d.ts +0 -56
  92. package/dist/types/xcs/iface.d.ts +0 -69
  93. package/dist/types/xcs/index.d.ts +0 -6
  94. package/dist/types/xcs/lifi-agg.d.ts +0 -42
  95. package/dist/types/xcs/selectsources.d.ts +0 -27
@@ -1,13 +1,2608 @@
1
- import "./_polyfill";
2
- export * from "./proto/definition";
3
- export { QueryClientImpl, Query, GrpcWebError, GrpcWebImpl, } from "./proto/grpc";
4
- export { createGrpcWebImpl } from "./proto/client";
5
- export * from "./data";
6
- export * from "./vaultcontracts";
7
- export * from "./permitutils";
8
- export * from "./xcs";
9
- export * from "./cosmos";
10
- export * from "./rff/rff";
11
- export * from "./types";
12
- export * from "./balances/ub-api";
13
- export * from "./evmabi";
1
+ import { BinaryWriter, BinaryReader } from '@bufbuild/protobuf/wire';
2
+ import Long from 'long';
3
+ import { grpc } from '@improbable-eng/grpc-web';
4
+ import { Hex, WalletClient, Account as Account$1, Address, GetContractReturnType, toHex } from 'viem';
5
+ import Decimal from 'decimal.js';
6
+ import * as axios from 'axios';
7
+
8
+ declare const protobufPackage = "";
9
+ declare enum RFFSourceState {
10
+ WAITING = 0,
11
+ DEPOSITED = 1,
12
+ UNRECOGNIZED = -1
13
+ }
14
+ declare function rFFSourceStateFromJSON(object: any): RFFSourceState;
15
+ declare function rFFSourceStateToJSON(object: RFFSourceState): string;
16
+ declare enum Universe {
17
+ ETHEREUM = 0,
18
+ FUEL = 1,
19
+ SOLANA = 2,
20
+ TRON = 3,
21
+ UNRECOGNIZED = -1
22
+ }
23
+ declare function universeFromJSON(object: any): Universe;
24
+ declare function universeToJSON(object: Universe): string;
25
+ /**
26
+ * PageRequest is to be embedded in gRPC request messages for efficient
27
+ * pagination. Ex:
28
+ *
29
+ * message SomeRequest {
30
+ * Foo some_parameter = 1;
31
+ * PageRequest pagination = 2;
32
+ * }
33
+ */
34
+ interface PageRequest {
35
+ /**
36
+ * key is a value returned in PageResponse.next_key to begin
37
+ * querying the next page most efficiently. Only one of offset or key
38
+ * should be set.
39
+ */
40
+ key: Uint8Array;
41
+ /**
42
+ * offset is a numeric offset that can be used when key is unavailable.
43
+ * It is less efficient than using key. Only one of offset or key should
44
+ * be set.
45
+ */
46
+ offset: Long;
47
+ /**
48
+ * limit is the total number of results to be returned in the result page.
49
+ * If left empty it will default to a value to be set by each app.
50
+ */
51
+ limit: Long;
52
+ /**
53
+ * count_total is set to true to indicate that the result set should include
54
+ * a count of the total number of items available for pagination in UIs.
55
+ * count_total is only respected when offset is used. It is ignored when key
56
+ * is set.
57
+ */
58
+ countTotal: boolean;
59
+ /** reverse is set to true if results are to be returned in the descending order. */
60
+ reverse: boolean;
61
+ }
62
+ declare const PageRequest: MessageFns<PageRequest>;
63
+ /**
64
+ * PageResponse is to be embedded in gRPC response messages where the
65
+ * corresponding request message has used PageRequest.
66
+ *
67
+ * message SomeResponse {
68
+ * repeated Bar results = 1;
69
+ * PageResponse page = 2;
70
+ * }
71
+ */
72
+ interface PageResponse {
73
+ /**
74
+ * next_key is the key to be passed to PageRequest.key to
75
+ * query the next page most efficiently. It will be empty if
76
+ * there are no more results.
77
+ */
78
+ nextKey: Uint8Array;
79
+ /**
80
+ * total is total number of results available if PageRequest.count_total
81
+ * was set, its value is undefined otherwise
82
+ */
83
+ total: Long;
84
+ }
85
+ declare const PageResponse: MessageFns<PageResponse>;
86
+ interface RFFSourcePair {
87
+ universe: Universe;
88
+ chainID: Uint8Array;
89
+ contractAddress: Uint8Array;
90
+ value: Uint8Array;
91
+ status: RFFSourceState;
92
+ }
93
+ declare const RFFSourcePair: MessageFns<RFFSourcePair>;
94
+ interface SignatureDatum {
95
+ universe: Universe;
96
+ address: Uint8Array;
97
+ signature: Uint8Array;
98
+ /** is to be left empty by the creator and is to be filled in during signature verification */
99
+ hash: Uint8Array;
100
+ }
101
+ declare const SignatureDatum: MessageFns<SignatureDatum>;
102
+ interface RFFDestinationPair {
103
+ contractAddress: Uint8Array;
104
+ /** amount */
105
+ value: Uint8Array;
106
+ }
107
+ declare const RFFDestinationPair: MessageFns<RFFDestinationPair>;
108
+ interface RequestForFunds {
109
+ id: Long;
110
+ sources: RFFSourcePair[];
111
+ destinationUniverse: Universe;
112
+ destinationChainID: Uint8Array;
113
+ recipientAddress: Uint8Array;
114
+ destinations: RFFDestinationPair[];
115
+ nonce: Uint8Array;
116
+ expiry: Long;
117
+ signatureData: SignatureDatum[];
118
+ /** Cosmos user (???)/Cosmos internal fields */
119
+ user: string;
120
+ /** the EVM address that fulfilled it on the destination chain */
121
+ fulfilledBy: Uint8Array;
122
+ fulfilledAt: Long;
123
+ deposited: boolean;
124
+ fulfilled: boolean;
125
+ /** todo: remove settled, using solver amount instead */
126
+ settled: boolean;
127
+ refunded: boolean;
128
+ creationBlock: Long;
129
+ }
130
+ declare const RequestForFunds: MessageFns<RequestForFunds>;
131
+ interface MsgCreateRequestForFunds {
132
+ sources: RFFSourcePair[];
133
+ destinationUniverse: Universe;
134
+ destinationChainID: Uint8Array;
135
+ recipientAddress: Uint8Array;
136
+ destinations: RFFDestinationPair[];
137
+ nonce: Uint8Array;
138
+ expiry: Long;
139
+ user: string;
140
+ signatureData: SignatureDatum[];
141
+ }
142
+ declare const MsgCreateRequestForFunds: MessageFns<MsgCreateRequestForFunds>;
143
+ interface MsgCreateRequestForFundsResponse {
144
+ id: Long;
145
+ }
146
+ declare const MsgCreateRequestForFundsResponse: MessageFns<MsgCreateRequestForFundsResponse>;
147
+ interface QueryGetRequestForFundsRequest {
148
+ id: Long;
149
+ }
150
+ declare const QueryGetRequestForFundsRequest: MessageFns<QueryGetRequestForFundsRequest>;
151
+ interface QueryGetRequestForFundsResponse {
152
+ requestForFunds?: RequestForFunds | undefined;
153
+ }
154
+ declare const QueryGetRequestForFundsResponse: MessageFns<QueryGetRequestForFundsResponse>;
155
+ interface QueryAllRequestForFundsRequest {
156
+ pagination?: PageRequest | undefined;
157
+ }
158
+ declare const QueryAllRequestForFundsRequest: MessageFns<QueryAllRequestForFundsRequest>;
159
+ interface QueryAllRequestForFundsResponse {
160
+ requestForFunds: RequestForFunds[];
161
+ pagination?: PageResponse | undefined;
162
+ }
163
+ declare const QueryAllRequestForFundsResponse: MessageFns<QueryAllRequestForFundsResponse>;
164
+ interface RouteFee {
165
+ sourceUniverse: Universe;
166
+ destinationUniverse: Universe;
167
+ sourceChainID: Uint8Array;
168
+ destinationChainID: Uint8Array;
169
+ sourceTokenAddress: Uint8Array;
170
+ destinationTokenAddress: Uint8Array;
171
+ /** 7 ↔ 9 are reserved for new fields */
172
+ feeBP: number;
173
+ }
174
+ declare const RouteFee: MessageFns<RouteFee>;
175
+ interface SolverAddress {
176
+ universe: Universe;
177
+ address: Uint8Array;
178
+ signature: Uint8Array;
179
+ }
180
+ declare const SolverAddress: MessageFns<SolverAddress>;
181
+ interface SolverData {
182
+ cosmosAddress: string;
183
+ advertisedFees: RouteFee[];
184
+ addresses: SolverAddress[];
185
+ }
186
+ declare const SolverData: MessageFns<SolverData>;
187
+ interface QueryGetSolverDataRequest {
188
+ cosmosAddress: string;
189
+ }
190
+ declare const QueryGetSolverDataRequest: MessageFns<QueryGetSolverDataRequest>;
191
+ interface QueryGetSolverDataResponse {
192
+ solverData?: SolverData | undefined;
193
+ }
194
+ declare const QueryGetSolverDataResponse: MessageFns<QueryGetSolverDataResponse>;
195
+ interface QueryAllSolverDataRequest {
196
+ pagination?: PageRequest | undefined;
197
+ }
198
+ declare const QueryAllSolverDataRequest: MessageFns<QueryAllSolverDataRequest>;
199
+ interface QueryAllSolverDataResponse {
200
+ solverData: SolverData[];
201
+ pagination?: PageResponse | undefined;
202
+ }
203
+ declare const QueryAllSolverDataResponse: MessageFns<QueryAllSolverDataResponse>;
204
+ interface MsgCreateSolverData {
205
+ cosmosAddress: string;
206
+ advertisedFees: RouteFee[];
207
+ addresses: SolverAddress[];
208
+ }
209
+ declare const MsgCreateSolverData: MessageFns<MsgCreateSolverData>;
210
+ interface MsgCreateSolverDataResponse {
211
+ }
212
+ declare const MsgCreateSolverDataResponse: MessageFns<MsgCreateSolverDataResponse>;
213
+ interface MsgUpdateSolverData {
214
+ cosmosAddress: string;
215
+ advertisedFees: RouteFee[];
216
+ addresses: SolverAddress[];
217
+ }
218
+ declare const MsgUpdateSolverData: MessageFns<MsgUpdateSolverData>;
219
+ interface MsgUpdateSolverDataResponse {
220
+ }
221
+ declare const MsgUpdateSolverDataResponse: MessageFns<MsgUpdateSolverDataResponse>;
222
+ interface Settlement {
223
+ id: Uint8Array;
224
+ universe: Universe;
225
+ chainId: Uint8Array;
226
+ amounts: Uint8Array[];
227
+ contractAddresses: Uint8Array[];
228
+ filler: Uint8Array[];
229
+ success: boolean;
230
+ }
231
+ declare const Settlement: MessageFns<Settlement>;
232
+ interface QueryGetSettlementRequest {
233
+ id: Long;
234
+ }
235
+ declare const QueryGetSettlementRequest: MessageFns<QueryGetSettlementRequest>;
236
+ interface QueryGetSettlementResponse {
237
+ Settlement?: Settlement | undefined;
238
+ }
239
+ declare const QueryGetSettlementResponse: MessageFns<QueryGetSettlementResponse>;
240
+ interface QueryAllSettlementRequest {
241
+ pagination?: PageRequest | undefined;
242
+ }
243
+ declare const QueryAllSettlementRequest: MessageFns<QueryAllSettlementRequest>;
244
+ interface QueryAllSettlementResponse {
245
+ Settlement: Settlement[];
246
+ pagination?: PageResponse | undefined;
247
+ }
248
+ declare const QueryAllSettlementResponse: MessageFns<QueryAllSettlementResponse>;
249
+ interface QueryRequestForFundsByAddressRequest {
250
+ account: string;
251
+ pagination?: PageRequest | undefined;
252
+ }
253
+ declare const QueryRequestForFundsByAddressRequest: MessageFns<QueryRequestForFundsByAddressRequest>;
254
+ interface FixedFeeTuple {
255
+ universe: Universe;
256
+ chainID: Uint8Array;
257
+ tokenAddress: Uint8Array;
258
+ fee: Uint8Array;
259
+ }
260
+ declare const FixedFeeTuple: MessageFns<FixedFeeTuple>;
261
+ interface AdminFeeRecipient {
262
+ universe: Universe;
263
+ address: Uint8Array;
264
+ }
265
+ declare const AdminFeeRecipient: MessageFns<AdminFeeRecipient>;
266
+ interface PerChainFeeBP {
267
+ universe: Universe;
268
+ chainID: Uint8Array;
269
+ feeBP: Long;
270
+ }
271
+ declare const PerChainFeeBP: MessageFns<PerChainFeeBP>;
272
+ interface ProtocolFees {
273
+ feeBP: Long;
274
+ collectionFees: FixedFeeTuple[];
275
+ fulfilmentFees: FixedFeeTuple[];
276
+ admin: string;
277
+ feeRecipients: AdminFeeRecipient[];
278
+ perChainFeeBP: PerChainFeeBP[];
279
+ }
280
+ declare const ProtocolFees: MessageFns<ProtocolFees>;
281
+ interface QueryGetProtocolFeesRequest {
282
+ }
283
+ declare const QueryGetProtocolFeesRequest: MessageFns<QueryGetProtocolFeesRequest>;
284
+ interface QueryGetProtocolFeesResponse {
285
+ ProtocolFees?: ProtocolFees | undefined;
286
+ }
287
+ declare const QueryGetProtocolFeesResponse: MessageFns<QueryGetProtocolFeesResponse>;
288
+ interface MsgCreateProtocolFees {
289
+ creator: string;
290
+ feeBP: Long;
291
+ collectionFees: FixedFeeTuple[];
292
+ fulfilmentFees: FixedFeeTuple[];
293
+ feeRecipients: AdminFeeRecipient[];
294
+ perChainFeeBP: PerChainFeeBP[];
295
+ }
296
+ declare const MsgCreateProtocolFees: MessageFns<MsgCreateProtocolFees>;
297
+ interface MsgCreateProtocolFeesResponse {
298
+ }
299
+ declare const MsgCreateProtocolFeesResponse: MessageFns<MsgCreateProtocolFeesResponse>;
300
+ interface MsgUpdateProtocolFees {
301
+ creator: string;
302
+ feeBP: Long;
303
+ collectionFees: FixedFeeTuple[];
304
+ fulfilmentFees: FixedFeeTuple[];
305
+ feeRecipients: AdminFeeRecipient[];
306
+ perChainFeeBP: PerChainFeeBP[];
307
+ }
308
+ declare const MsgUpdateProtocolFees: MessageFns<MsgUpdateProtocolFees>;
309
+ interface MsgUpdateProtocolFeesResponse {
310
+ }
311
+ declare const MsgUpdateProtocolFeesResponse: MessageFns<MsgUpdateProtocolFeesResponse>;
312
+ interface PriceOracleDatum {
313
+ universe: Universe;
314
+ chainID: Uint8Array;
315
+ tokenAddress: Uint8Array;
316
+ price: Uint8Array;
317
+ decimals: number;
318
+ }
319
+ declare const PriceOracleDatum: MessageFns<PriceOracleDatum>;
320
+ interface PriceOracleData {
321
+ priceData: PriceOracleDatum[];
322
+ }
323
+ declare const PriceOracleData: MessageFns<PriceOracleData>;
324
+ interface QueryGetPriceOracleDataRequest {
325
+ }
326
+ declare const QueryGetPriceOracleDataRequest: MessageFns<QueryGetPriceOracleDataRequest>;
327
+ interface QueryGetPriceOracleDataResponse {
328
+ PriceOracleData?: PriceOracleData | undefined;
329
+ }
330
+ declare const QueryGetPriceOracleDataResponse: MessageFns<QueryGetPriceOracleDataResponse>;
331
+ interface MsgRefundReq {
332
+ creator: string;
333
+ rffID: Long;
334
+ }
335
+ declare const MsgRefundReq: MessageFns<MsgRefundReq>;
336
+ interface MsgRefundReqResponse {
337
+ }
338
+ declare const MsgRefundReqResponse: MessageFns<MsgRefundReqResponse>;
339
+ interface DepositVEPacket {
340
+ id: Long;
341
+ gasRefunded: boolean;
342
+ }
343
+ declare const DepositVEPacket: MessageFns<DepositVEPacket>;
344
+ interface FillVEPacket {
345
+ id: Long;
346
+ fillerAddress: Uint8Array;
347
+ transactionHash: Uint8Array;
348
+ }
349
+ declare const FillVEPacket: MessageFns<FillVEPacket>;
350
+ interface MsgDoubleCheckTx {
351
+ creator: string;
352
+ txUniverse: Universe;
353
+ txChainID: Uint8Array;
354
+ packet?: {
355
+ $case: "depositPacket";
356
+ value: DepositVEPacket;
357
+ } | {
358
+ $case: "fillPacket";
359
+ value: FillVEPacket;
360
+ } | undefined;
361
+ }
362
+ declare const MsgDoubleCheckTx: MessageFns<MsgDoubleCheckTx>;
363
+ type Builtin$1 = Date | Function | Uint8Array | string | number | boolean | undefined;
364
+ type DeepPartial$1<T> = T extends Builtin$1 ? T : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial$1<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial$1<U>> : T extends {
365
+ $case: string;
366
+ value: unknown;
367
+ } ? {
368
+ $case: T["$case"];
369
+ value?: DeepPartial$1<T["value"]>;
370
+ } : T extends {} ? {
371
+ [K in keyof T]?: DeepPartial$1<T[K]>;
372
+ } : Partial<T>;
373
+ type KeysOfUnion<T> = T extends T ? keyof T : never;
374
+ type Exact<P, I extends P> = P extends Builtin$1 ? P : P & {
375
+ [K in keyof P]: Exact<P[K], I[K]>;
376
+ } & {
377
+ [K in Exclude<keyof I, KeysOfUnion<P>>]: never;
378
+ };
379
+ interface MessageFns<T> {
380
+ encode(message: T, writer?: BinaryWriter): BinaryWriter;
381
+ decode(input: BinaryReader | Uint8Array, length?: number): T;
382
+ fromJSON(object: any): T;
383
+ toJSON(message: T): unknown;
384
+ create<I extends Exact<DeepPartial$1<T>, I>>(base?: I): T;
385
+ fromPartial<I extends Exact<DeepPartial$1<T>, I>>(object: I): T;
386
+ }
387
+
388
+ interface Query {
389
+ RequestForFunds(request: DeepPartial<QueryGetRequestForFundsRequest>, metadata?: grpc.Metadata): Promise<QueryGetRequestForFundsResponse>;
390
+ RequestForFundsAll(request: DeepPartial<QueryAllRequestForFundsRequest>, metadata?: grpc.Metadata): Promise<QueryAllRequestForFundsResponse>;
391
+ RequestForFundsByAddress(request: DeepPartial<QueryRequestForFundsByAddressRequest>, metadata?: grpc.Metadata): Promise<QueryAllRequestForFundsResponse>;
392
+ SolverData(request: DeepPartial<QueryGetSolverDataRequest>, metadata?: grpc.Metadata): Promise<QueryGetSolverDataResponse>;
393
+ SolverDataAll(request: DeepPartial<QueryAllSolverDataRequest>, metadata?: grpc.Metadata): Promise<QueryAllSolverDataResponse>;
394
+ Settlement(request: DeepPartial<QueryGetSettlementRequest>, metadata?: grpc.Metadata): Promise<QueryGetSettlementResponse>;
395
+ SettlementAll(request: DeepPartial<QueryAllSettlementRequest>, metadata?: grpc.Metadata): Promise<QueryAllSettlementResponse>;
396
+ ProtocolFees(request: DeepPartial<QueryGetProtocolFeesRequest>, metadata?: grpc.Metadata): Promise<QueryGetProtocolFeesResponse>;
397
+ PriceOracleData(request: DeepPartial<QueryGetPriceOracleDataRequest>, metadata?: grpc.Metadata): Promise<QueryGetPriceOracleDataResponse>;
398
+ }
399
+ declare class QueryClientImpl implements Query {
400
+ private readonly rpc;
401
+ constructor(rpc: Rpc);
402
+ RequestForFunds(request: DeepPartial<QueryGetRequestForFundsRequest>, metadata?: grpc.Metadata): Promise<QueryGetRequestForFundsResponse>;
403
+ RequestForFundsAll(request: DeepPartial<QueryAllRequestForFundsRequest>, metadata?: grpc.Metadata): Promise<QueryAllRequestForFundsResponse>;
404
+ RequestForFundsByAddress(request: DeepPartial<QueryRequestForFundsByAddressRequest>, metadata?: grpc.Metadata): Promise<QueryAllRequestForFundsResponse>;
405
+ SolverData(request: DeepPartial<QueryGetSolverDataRequest>, metadata?: grpc.Metadata): Promise<QueryGetSolverDataResponse>;
406
+ SolverDataAll(request: DeepPartial<QueryAllSolverDataRequest>, metadata?: grpc.Metadata): Promise<QueryAllSolverDataResponse>;
407
+ Settlement(request: DeepPartial<QueryGetSettlementRequest>, metadata?: grpc.Metadata): Promise<QueryGetSettlementResponse>;
408
+ SettlementAll(request: DeepPartial<QueryAllSettlementRequest>, metadata?: grpc.Metadata): Promise<QueryAllSettlementResponse>;
409
+ ProtocolFees(request: DeepPartial<QueryGetProtocolFeesRequest>, metadata?: grpc.Metadata): Promise<QueryGetProtocolFeesResponse>;
410
+ PriceOracleData(request: DeepPartial<QueryGetPriceOracleDataRequest>, metadata?: grpc.Metadata): Promise<QueryGetPriceOracleDataResponse>;
411
+ }
412
+ interface UnaryMethodDefinitionishR extends grpc.UnaryMethodDefinition<any, any> {
413
+ requestStream: any;
414
+ responseStream: any;
415
+ }
416
+ type UnaryMethodDefinitionish = UnaryMethodDefinitionishR;
417
+ interface Rpc {
418
+ unary<T extends UnaryMethodDefinitionish>(methodDesc: T, request: any, metadata: grpc.Metadata | undefined): Promise<any>;
419
+ }
420
+ declare class GrpcWebImpl {
421
+ private host;
422
+ private options;
423
+ constructor(host: string, options: {
424
+ transport?: grpc.TransportFactory;
425
+ debug?: boolean;
426
+ metadata?: grpc.Metadata;
427
+ upStreamRetryCodes?: number[];
428
+ });
429
+ unary<T extends UnaryMethodDefinitionish>(methodDesc: T, _request: any, metadata: grpc.Metadata | undefined): Promise<any>;
430
+ }
431
+ type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
432
+ type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {
433
+ $case: string;
434
+ value: unknown;
435
+ } ? {
436
+ $case: T["$case"];
437
+ value?: DeepPartial<T["value"]>;
438
+ } : T extends {} ? {
439
+ [K in keyof T]?: DeepPartial<T[K]>;
440
+ } : Partial<T>;
441
+ declare class GrpcWebError extends globalThis.Error {
442
+ code: grpc.Code;
443
+ metadata: grpc.Metadata;
444
+ constructor(message: string, code: grpc.Code, metadata: grpc.Metadata);
445
+ }
446
+
447
+ declare const createGrpcWebImpl: (url: string) => Promise<GrpcWebImpl>;
448
+
449
+ type Bytes = Uint8Array;
450
+
451
+ declare const msgpackableAxios: axios.AxiosInstance;
452
+
453
+ declare function encodeChainID36(universe: Universe, chainID: Bytes | bigint | number): Uint8Array;
454
+ declare class OmniversalChainID {
455
+ readonly universe: Universe;
456
+ readonly chainID: bigint;
457
+ private readonly binaryForm;
458
+ constructor(universe: Universe, chainID: bigint | number | string | Bytes);
459
+ toString(): string;
460
+ toJSON(): {
461
+ universe: string;
462
+ chainID: `0x${string}`;
463
+ };
464
+ static fromJSON(input: {
465
+ universe: string;
466
+ chainID: Hex;
467
+ }): OmniversalChainID;
468
+ static fromChainID36(input: Bytes): OmniversalChainID;
469
+ toBytes(): Uint8Array;
470
+ equals(rhs: OmniversalChainID): boolean;
471
+ static equals(lhs: OmniversalChainID, rhs: OmniversalChainID): boolean;
472
+ }
473
+ declare class ChainIDKeyedMap<V> {
474
+ private readonly map;
475
+ constructor(entries?: readonly [OmniversalChainID, V][] | null);
476
+ get(key: OmniversalChainID): V | undefined;
477
+ set(key: OmniversalChainID, value: V): this;
478
+ getFromChainID36(key: Bytes): V | undefined;
479
+ entries(): Generator<[OmniversalChainID, V]>;
480
+ }
481
+
482
+ declare const ERC20ABI: readonly [{
483
+ readonly constant: true;
484
+ readonly inputs: readonly [];
485
+ readonly name: "name";
486
+ readonly outputs: readonly [{
487
+ readonly name: "";
488
+ readonly type: "string";
489
+ }];
490
+ readonly payable: false;
491
+ readonly stateMutability: "view";
492
+ readonly type: "function";
493
+ }, {
494
+ readonly constant: false;
495
+ readonly inputs: readonly [{
496
+ readonly name: "_spender";
497
+ readonly type: "address";
498
+ }, {
499
+ readonly name: "_value";
500
+ readonly type: "uint256";
501
+ }];
502
+ readonly name: "approve";
503
+ readonly outputs: readonly [{
504
+ readonly name: "";
505
+ readonly type: "bool";
506
+ }];
507
+ readonly payable: false;
508
+ readonly stateMutability: "nonpayable";
509
+ readonly type: "function";
510
+ }, {
511
+ readonly constant: true;
512
+ readonly inputs: readonly [];
513
+ readonly name: "totalSupply";
514
+ readonly outputs: readonly [{
515
+ readonly name: "";
516
+ readonly type: "uint256";
517
+ }];
518
+ readonly payable: false;
519
+ readonly stateMutability: "view";
520
+ readonly type: "function";
521
+ }, {
522
+ readonly constant: false;
523
+ readonly inputs: readonly [{
524
+ readonly name: "_from";
525
+ readonly type: "address";
526
+ }, {
527
+ readonly name: "_to";
528
+ readonly type: "address";
529
+ }, {
530
+ readonly name: "_value";
531
+ readonly type: "uint256";
532
+ }];
533
+ readonly name: "transferFrom";
534
+ readonly outputs: readonly [{
535
+ readonly name: "";
536
+ readonly type: "bool";
537
+ }];
538
+ readonly payable: false;
539
+ readonly stateMutability: "nonpayable";
540
+ readonly type: "function";
541
+ }, {
542
+ readonly constant: true;
543
+ readonly inputs: readonly [];
544
+ readonly name: "decimals";
545
+ readonly outputs: readonly [{
546
+ readonly name: "";
547
+ readonly type: "uint8";
548
+ }];
549
+ readonly payable: false;
550
+ readonly stateMutability: "view";
551
+ readonly type: "function";
552
+ }, {
553
+ readonly constant: true;
554
+ readonly inputs: readonly [{
555
+ readonly name: "_owner";
556
+ readonly type: "address";
557
+ }];
558
+ readonly name: "balanceOf";
559
+ readonly outputs: readonly [{
560
+ readonly name: "balance";
561
+ readonly type: "uint256";
562
+ }];
563
+ readonly payable: false;
564
+ readonly stateMutability: "view";
565
+ readonly type: "function";
566
+ }, {
567
+ readonly constant: true;
568
+ readonly inputs: readonly [];
569
+ readonly name: "symbol";
570
+ readonly outputs: readonly [{
571
+ readonly name: "";
572
+ readonly type: "string";
573
+ }];
574
+ readonly payable: false;
575
+ readonly stateMutability: "view";
576
+ readonly type: "function";
577
+ }, {
578
+ readonly constant: false;
579
+ readonly inputs: readonly [{
580
+ readonly name: "_to";
581
+ readonly type: "address";
582
+ }, {
583
+ readonly name: "_value";
584
+ readonly type: "uint256";
585
+ }];
586
+ readonly name: "transfer";
587
+ readonly outputs: readonly [{
588
+ readonly name: "";
589
+ readonly type: "bool";
590
+ }];
591
+ readonly payable: false;
592
+ readonly stateMutability: "nonpayable";
593
+ readonly type: "function";
594
+ }, {
595
+ readonly constant: true;
596
+ readonly inputs: readonly [{
597
+ readonly name: "_owner";
598
+ readonly type: "address";
599
+ }, {
600
+ readonly name: "_spender";
601
+ readonly type: "address";
602
+ }];
603
+ readonly name: "allowance";
604
+ readonly outputs: readonly [{
605
+ readonly name: "";
606
+ readonly type: "uint256";
607
+ }];
608
+ readonly payable: false;
609
+ readonly stateMutability: "view";
610
+ readonly type: "function";
611
+ }, {
612
+ readonly payable: true;
613
+ readonly stateMutability: "payable";
614
+ readonly type: "fallback";
615
+ }, {
616
+ readonly anonymous: false;
617
+ readonly inputs: readonly [{
618
+ readonly indexed: true;
619
+ readonly name: "owner";
620
+ readonly type: "address";
621
+ }, {
622
+ readonly indexed: true;
623
+ readonly name: "spender";
624
+ readonly type: "address";
625
+ }, {
626
+ readonly indexed: false;
627
+ readonly name: "value";
628
+ readonly type: "uint256";
629
+ }];
630
+ readonly name: "Approval";
631
+ readonly type: "event";
632
+ }, {
633
+ readonly anonymous: false;
634
+ readonly inputs: readonly [{
635
+ readonly indexed: true;
636
+ readonly name: "from";
637
+ readonly type: "address";
638
+ }, {
639
+ readonly indexed: true;
640
+ readonly name: "to";
641
+ readonly type: "address";
642
+ }, {
643
+ readonly indexed: false;
644
+ readonly name: "value";
645
+ readonly type: "uint256";
646
+ }];
647
+ readonly name: "Transfer";
648
+ readonly type: "event";
649
+ }, {
650
+ readonly comment: "From the EIP-2612 spec.";
651
+ readonly inputs: readonly [{
652
+ readonly internalType: "address";
653
+ readonly name: "owner";
654
+ readonly type: "address";
655
+ }];
656
+ readonly name: "nonces";
657
+ readonly outputs: readonly [{
658
+ readonly internalType: "uint256";
659
+ readonly name: "";
660
+ readonly type: "uint256";
661
+ }];
662
+ readonly stateMutability: "view";
663
+ readonly type: "function";
664
+ }, {
665
+ readonly comment: "From the EIP-2612 spec.";
666
+ readonly inputs: readonly [{
667
+ readonly internalType: "address";
668
+ readonly name: "owner";
669
+ readonly type: "address";
670
+ }, {
671
+ readonly internalType: "address";
672
+ readonly name: "spender";
673
+ readonly type: "address";
674
+ }, {
675
+ readonly internalType: "uint256";
676
+ readonly name: "value";
677
+ readonly type: "uint256";
678
+ }, {
679
+ readonly internalType: "uint256";
680
+ readonly name: "deadline";
681
+ readonly type: "uint256";
682
+ }, {
683
+ readonly internalType: "uint8";
684
+ readonly name: "v";
685
+ readonly type: "uint8";
686
+ }, {
687
+ readonly internalType: "bytes32";
688
+ readonly name: "r";
689
+ readonly type: "bytes32";
690
+ }, {
691
+ readonly internalType: "bytes32";
692
+ readonly name: "s";
693
+ readonly type: "bytes32";
694
+ }];
695
+ readonly name: "permit";
696
+ readonly outputs: readonly [];
697
+ readonly stateMutability: "nonpayable";
698
+ readonly type: "function";
699
+ }, {
700
+ readonly comment: "Available on bridged tokens on Polygon.";
701
+ readonly inputs: readonly [{
702
+ readonly internalType: "address";
703
+ readonly name: "userAddress";
704
+ readonly type: "address";
705
+ }, {
706
+ readonly internalType: "bytes";
707
+ readonly name: "functionSignature";
708
+ readonly type: "bytes";
709
+ }, {
710
+ readonly internalType: "bytes32";
711
+ readonly name: "sigR";
712
+ readonly type: "bytes32";
713
+ }, {
714
+ readonly internalType: "bytes32";
715
+ readonly name: "sigS";
716
+ readonly type: "bytes32";
717
+ }, {
718
+ readonly internalType: "uint8";
719
+ readonly name: "sigV";
720
+ readonly type: "uint8";
721
+ }];
722
+ readonly name: "executeMetaTransaction";
723
+ readonly outputs: readonly [{
724
+ readonly internalType: "bytes";
725
+ readonly name: "";
726
+ readonly type: "bytes";
727
+ }];
728
+ readonly stateMutability: "payable";
729
+ readonly type: "function";
730
+ }, {
731
+ readonly comment: "Available on bridged tokens on Polygon.";
732
+ readonly inputs: readonly [{
733
+ readonly internalType: "address";
734
+ readonly name: "user";
735
+ readonly type: "address";
736
+ }];
737
+ readonly name: "getNonce";
738
+ readonly outputs: readonly [{
739
+ readonly internalType: "uint256";
740
+ readonly name: "nonce";
741
+ readonly type: "uint256";
742
+ }];
743
+ readonly stateMutability: "view";
744
+ readonly type: "function";
745
+ }];
746
+
747
+ declare const EVMVaultABI: readonly [{
748
+ readonly inputs: readonly [];
749
+ readonly stateMutability: "nonpayable";
750
+ readonly type: "constructor";
751
+ }, {
752
+ readonly inputs: readonly [];
753
+ readonly name: "AccessControlBadConfirmation";
754
+ readonly type: "error";
755
+ }, {
756
+ readonly inputs: readonly [{
757
+ readonly internalType: "address";
758
+ readonly name: "account";
759
+ readonly type: "address";
760
+ }, {
761
+ readonly internalType: "bytes32";
762
+ readonly name: "neededRole";
763
+ readonly type: "bytes32";
764
+ }];
765
+ readonly name: "AccessControlUnauthorizedAccount";
766
+ readonly type: "error";
767
+ }, {
768
+ readonly inputs: readonly [{
769
+ readonly internalType: "address";
770
+ readonly name: "target";
771
+ readonly type: "address";
772
+ }];
773
+ readonly name: "AddressEmptyCode";
774
+ readonly type: "error";
775
+ }, {
776
+ readonly inputs: readonly [];
777
+ readonly name: "ECDSAInvalidSignature";
778
+ readonly type: "error";
779
+ }, {
780
+ readonly inputs: readonly [{
781
+ readonly internalType: "uint256";
782
+ readonly name: "length";
783
+ readonly type: "uint256";
784
+ }];
785
+ readonly name: "ECDSAInvalidSignatureLength";
786
+ readonly type: "error";
787
+ }, {
788
+ readonly inputs: readonly [{
789
+ readonly internalType: "bytes32";
790
+ readonly name: "s";
791
+ readonly type: "bytes32";
792
+ }];
793
+ readonly name: "ECDSAInvalidSignatureS";
794
+ readonly type: "error";
795
+ }, {
796
+ readonly inputs: readonly [{
797
+ readonly internalType: "address";
798
+ readonly name: "implementation";
799
+ readonly type: "address";
800
+ }];
801
+ readonly name: "ERC1967InvalidImplementation";
802
+ readonly type: "error";
803
+ }, {
804
+ readonly inputs: readonly [];
805
+ readonly name: "ERC1967NonPayable";
806
+ readonly type: "error";
807
+ }, {
808
+ readonly inputs: readonly [];
809
+ readonly name: "FailedCall";
810
+ readonly type: "error";
811
+ }, {
812
+ readonly inputs: readonly [];
813
+ readonly name: "InvalidInitialization";
814
+ readonly type: "error";
815
+ }, {
816
+ readonly inputs: readonly [];
817
+ readonly name: "NotInitializing";
818
+ readonly type: "error";
819
+ }, {
820
+ readonly inputs: readonly [];
821
+ readonly name: "ReentrancyGuardReentrantCall";
822
+ readonly type: "error";
823
+ }, {
824
+ readonly inputs: readonly [{
825
+ readonly internalType: "address";
826
+ readonly name: "token";
827
+ readonly type: "address";
828
+ }];
829
+ readonly name: "SafeERC20FailedOperation";
830
+ readonly type: "error";
831
+ }, {
832
+ readonly inputs: readonly [];
833
+ readonly name: "UUPSUnauthorizedCallContext";
834
+ readonly type: "error";
835
+ }, {
836
+ readonly inputs: readonly [{
837
+ readonly internalType: "bytes32";
838
+ readonly name: "slot";
839
+ readonly type: "bytes32";
840
+ }];
841
+ readonly name: "UUPSUnsupportedProxiableUUID";
842
+ readonly type: "error";
843
+ }, {
844
+ readonly anonymous: false;
845
+ readonly inputs: readonly [{
846
+ readonly indexed: true;
847
+ readonly internalType: "bytes32";
848
+ readonly name: "requestHash";
849
+ readonly type: "bytes32";
850
+ }, {
851
+ readonly indexed: false;
852
+ readonly internalType: "address";
853
+ readonly name: "from";
854
+ readonly type: "address";
855
+ }];
856
+ readonly name: "Deposit";
857
+ readonly type: "event";
858
+ }, {
859
+ readonly anonymous: false;
860
+ readonly inputs: readonly [{
861
+ readonly indexed: true;
862
+ readonly internalType: "bytes32";
863
+ readonly name: "requestHash";
864
+ readonly type: "bytes32";
865
+ }, {
866
+ readonly indexed: false;
867
+ readonly internalType: "address";
868
+ readonly name: "from";
869
+ readonly type: "address";
870
+ }, {
871
+ readonly indexed: false;
872
+ readonly internalType: "address";
873
+ readonly name: "solver";
874
+ readonly type: "address";
875
+ }];
876
+ readonly name: "Fulfilment";
877
+ readonly type: "event";
878
+ }, {
879
+ readonly anonymous: false;
880
+ readonly inputs: readonly [{
881
+ readonly indexed: false;
882
+ readonly internalType: "uint64";
883
+ readonly name: "version";
884
+ readonly type: "uint64";
885
+ }];
886
+ readonly name: "Initialized";
887
+ readonly type: "event";
888
+ }, {
889
+ readonly anonymous: false;
890
+ readonly inputs: readonly [{
891
+ readonly indexed: true;
892
+ readonly internalType: "bytes32";
893
+ readonly name: "role";
894
+ readonly type: "bytes32";
895
+ }, {
896
+ readonly indexed: true;
897
+ readonly internalType: "bytes32";
898
+ readonly name: "previousAdminRole";
899
+ readonly type: "bytes32";
900
+ }, {
901
+ readonly indexed: true;
902
+ readonly internalType: "bytes32";
903
+ readonly name: "newAdminRole";
904
+ readonly type: "bytes32";
905
+ }];
906
+ readonly name: "RoleAdminChanged";
907
+ readonly type: "event";
908
+ }, {
909
+ readonly anonymous: false;
910
+ readonly inputs: readonly [{
911
+ readonly indexed: true;
912
+ readonly internalType: "bytes32";
913
+ readonly name: "role";
914
+ readonly type: "bytes32";
915
+ }, {
916
+ readonly indexed: true;
917
+ readonly internalType: "address";
918
+ readonly name: "account";
919
+ readonly type: "address";
920
+ }, {
921
+ readonly indexed: true;
922
+ readonly internalType: "address";
923
+ readonly name: "sender";
924
+ readonly type: "address";
925
+ }];
926
+ readonly name: "RoleGranted";
927
+ readonly type: "event";
928
+ }, {
929
+ readonly anonymous: false;
930
+ readonly inputs: readonly [{
931
+ readonly indexed: true;
932
+ readonly internalType: "bytes32";
933
+ readonly name: "role";
934
+ readonly type: "bytes32";
935
+ }, {
936
+ readonly indexed: true;
937
+ readonly internalType: "address";
938
+ readonly name: "account";
939
+ readonly type: "address";
940
+ }, {
941
+ readonly indexed: true;
942
+ readonly internalType: "address";
943
+ readonly name: "sender";
944
+ readonly type: "address";
945
+ }];
946
+ readonly name: "RoleRevoked";
947
+ readonly type: "event";
948
+ }, {
949
+ readonly anonymous: false;
950
+ readonly inputs: readonly [{
951
+ readonly indexed: true;
952
+ readonly internalType: "uint256";
953
+ readonly name: "nonce";
954
+ readonly type: "uint256";
955
+ }, {
956
+ readonly indexed: false;
957
+ readonly internalType: "address[]";
958
+ readonly name: "solver";
959
+ readonly type: "address[]";
960
+ }, {
961
+ readonly indexed: false;
962
+ readonly internalType: "address[]";
963
+ readonly name: "token";
964
+ readonly type: "address[]";
965
+ }, {
966
+ readonly indexed: false;
967
+ readonly internalType: "uint256[]";
968
+ readonly name: "amount";
969
+ readonly type: "uint256[]";
970
+ }];
971
+ readonly name: "Settle";
972
+ readonly type: "event";
973
+ }, {
974
+ readonly anonymous: false;
975
+ readonly inputs: readonly [{
976
+ readonly indexed: true;
977
+ readonly internalType: "address";
978
+ readonly name: "implementation";
979
+ readonly type: "address";
980
+ }];
981
+ readonly name: "Upgraded";
982
+ readonly type: "event";
983
+ }, {
984
+ readonly anonymous: false;
985
+ readonly inputs: readonly [{
986
+ readonly indexed: true;
987
+ readonly internalType: "address";
988
+ readonly name: "to";
989
+ readonly type: "address";
990
+ }, {
991
+ readonly indexed: false;
992
+ readonly internalType: "address";
993
+ readonly name: "token";
994
+ readonly type: "address";
995
+ }, {
996
+ readonly indexed: false;
997
+ readonly internalType: "uint256";
998
+ readonly name: "amount";
999
+ readonly type: "uint256";
1000
+ }];
1001
+ readonly name: "Withdraw";
1002
+ readonly type: "event";
1003
+ }, {
1004
+ readonly inputs: readonly [];
1005
+ readonly name: "DEFAULT_ADMIN_ROLE";
1006
+ readonly outputs: readonly [{
1007
+ readonly internalType: "bytes32";
1008
+ readonly name: "";
1009
+ readonly type: "bytes32";
1010
+ }];
1011
+ readonly stateMutability: "view";
1012
+ readonly type: "function";
1013
+ }, {
1014
+ readonly inputs: readonly [];
1015
+ readonly name: "UPGRADE_INTERFACE_VERSION";
1016
+ readonly outputs: readonly [{
1017
+ readonly internalType: "string";
1018
+ readonly name: "";
1019
+ readonly type: "string";
1020
+ }];
1021
+ readonly stateMutability: "view";
1022
+ readonly type: "function";
1023
+ }, {
1024
+ readonly inputs: readonly [{
1025
+ readonly components: readonly [{
1026
+ readonly components: readonly [{
1027
+ readonly internalType: "enum Vault.Universe";
1028
+ readonly name: "universe";
1029
+ readonly type: "uint8";
1030
+ }, {
1031
+ readonly internalType: "uint256";
1032
+ readonly name: "chainID";
1033
+ readonly type: "uint256";
1034
+ }, {
1035
+ readonly internalType: "bytes32";
1036
+ readonly name: "contractAddress";
1037
+ readonly type: "bytes32";
1038
+ }, {
1039
+ readonly internalType: "uint256";
1040
+ readonly name: "value";
1041
+ readonly type: "uint256";
1042
+ }];
1043
+ readonly internalType: "struct Vault.SourcePair[]";
1044
+ readonly name: "sources";
1045
+ readonly type: "tuple[]";
1046
+ }, {
1047
+ readonly internalType: "enum Vault.Universe";
1048
+ readonly name: "destinationUniverse";
1049
+ readonly type: "uint8";
1050
+ }, {
1051
+ readonly internalType: "uint256";
1052
+ readonly name: "destinationChainID";
1053
+ readonly type: "uint256";
1054
+ }, {
1055
+ readonly internalType: "bytes32";
1056
+ readonly name: "recipientAddress";
1057
+ readonly type: "bytes32";
1058
+ }, {
1059
+ readonly components: readonly [{
1060
+ readonly internalType: "bytes32";
1061
+ readonly name: "contractAddress";
1062
+ readonly type: "bytes32";
1063
+ }, {
1064
+ readonly internalType: "uint256";
1065
+ readonly name: "value";
1066
+ readonly type: "uint256";
1067
+ }];
1068
+ readonly internalType: "struct Vault.DestinationPair[]";
1069
+ readonly name: "destinations";
1070
+ readonly type: "tuple[]";
1071
+ }, {
1072
+ readonly internalType: "uint256";
1073
+ readonly name: "nonce";
1074
+ readonly type: "uint256";
1075
+ }, {
1076
+ readonly internalType: "uint256";
1077
+ readonly name: "expiry";
1078
+ readonly type: "uint256";
1079
+ }, {
1080
+ readonly components: readonly [{
1081
+ readonly internalType: "enum Vault.Universe";
1082
+ readonly name: "universe";
1083
+ readonly type: "uint8";
1084
+ }, {
1085
+ readonly internalType: "bytes32";
1086
+ readonly name: "address_";
1087
+ readonly type: "bytes32";
1088
+ }];
1089
+ readonly internalType: "struct Vault.Party[]";
1090
+ readonly name: "parties";
1091
+ readonly type: "tuple[]";
1092
+ }];
1093
+ readonly internalType: "struct Vault.Request";
1094
+ readonly name: "request";
1095
+ readonly type: "tuple";
1096
+ }, {
1097
+ readonly internalType: "bytes";
1098
+ readonly name: "signature";
1099
+ readonly type: "bytes";
1100
+ }, {
1101
+ readonly internalType: "uint256";
1102
+ readonly name: "chainIndex";
1103
+ readonly type: "uint256";
1104
+ }];
1105
+ readonly name: "deposit";
1106
+ readonly outputs: readonly [];
1107
+ readonly stateMutability: "payable";
1108
+ readonly type: "function";
1109
+ }, {
1110
+ readonly inputs: readonly [{
1111
+ readonly internalType: "uint256";
1112
+ readonly name: "";
1113
+ readonly type: "uint256";
1114
+ }];
1115
+ readonly name: "depositNonce";
1116
+ readonly outputs: readonly [{
1117
+ readonly internalType: "bool";
1118
+ readonly name: "";
1119
+ readonly type: "bool";
1120
+ }];
1121
+ readonly stateMutability: "view";
1122
+ readonly type: "function";
1123
+ }, {
1124
+ readonly inputs: readonly [{
1125
+ readonly internalType: "uint256";
1126
+ readonly name: "";
1127
+ readonly type: "uint256";
1128
+ }];
1129
+ readonly name: "fillNonce";
1130
+ readonly outputs: readonly [{
1131
+ readonly internalType: "bool";
1132
+ readonly name: "";
1133
+ readonly type: "bool";
1134
+ }];
1135
+ readonly stateMutability: "view";
1136
+ readonly type: "function";
1137
+ }, {
1138
+ readonly inputs: readonly [{
1139
+ readonly components: readonly [{
1140
+ readonly components: readonly [{
1141
+ readonly internalType: "enum Vault.Universe";
1142
+ readonly name: "universe";
1143
+ readonly type: "uint8";
1144
+ }, {
1145
+ readonly internalType: "uint256";
1146
+ readonly name: "chainID";
1147
+ readonly type: "uint256";
1148
+ }, {
1149
+ readonly internalType: "bytes32";
1150
+ readonly name: "contractAddress";
1151
+ readonly type: "bytes32";
1152
+ }, {
1153
+ readonly internalType: "uint256";
1154
+ readonly name: "value";
1155
+ readonly type: "uint256";
1156
+ }];
1157
+ readonly internalType: "struct Vault.SourcePair[]";
1158
+ readonly name: "sources";
1159
+ readonly type: "tuple[]";
1160
+ }, {
1161
+ readonly internalType: "enum Vault.Universe";
1162
+ readonly name: "destinationUniverse";
1163
+ readonly type: "uint8";
1164
+ }, {
1165
+ readonly internalType: "uint256";
1166
+ readonly name: "destinationChainID";
1167
+ readonly type: "uint256";
1168
+ }, {
1169
+ readonly internalType: "bytes32";
1170
+ readonly name: "recipientAddress";
1171
+ readonly type: "bytes32";
1172
+ }, {
1173
+ readonly components: readonly [{
1174
+ readonly internalType: "bytes32";
1175
+ readonly name: "contractAddress";
1176
+ readonly type: "bytes32";
1177
+ }, {
1178
+ readonly internalType: "uint256";
1179
+ readonly name: "value";
1180
+ readonly type: "uint256";
1181
+ }];
1182
+ readonly internalType: "struct Vault.DestinationPair[]";
1183
+ readonly name: "destinations";
1184
+ readonly type: "tuple[]";
1185
+ }, {
1186
+ readonly internalType: "uint256";
1187
+ readonly name: "nonce";
1188
+ readonly type: "uint256";
1189
+ }, {
1190
+ readonly internalType: "uint256";
1191
+ readonly name: "expiry";
1192
+ readonly type: "uint256";
1193
+ }, {
1194
+ readonly components: readonly [{
1195
+ readonly internalType: "enum Vault.Universe";
1196
+ readonly name: "universe";
1197
+ readonly type: "uint8";
1198
+ }, {
1199
+ readonly internalType: "bytes32";
1200
+ readonly name: "address_";
1201
+ readonly type: "bytes32";
1202
+ }];
1203
+ readonly internalType: "struct Vault.Party[]";
1204
+ readonly name: "parties";
1205
+ readonly type: "tuple[]";
1206
+ }];
1207
+ readonly internalType: "struct Vault.Request";
1208
+ readonly name: "request";
1209
+ readonly type: "tuple";
1210
+ }, {
1211
+ readonly internalType: "bytes";
1212
+ readonly name: "signature";
1213
+ readonly type: "bytes";
1214
+ }];
1215
+ readonly name: "fulfil";
1216
+ readonly outputs: readonly [];
1217
+ readonly stateMutability: "payable";
1218
+ readonly type: "function";
1219
+ }, {
1220
+ readonly inputs: readonly [{
1221
+ readonly internalType: "bytes32";
1222
+ readonly name: "role";
1223
+ readonly type: "bytes32";
1224
+ }];
1225
+ readonly name: "getRoleAdmin";
1226
+ readonly outputs: readonly [{
1227
+ readonly internalType: "bytes32";
1228
+ readonly name: "";
1229
+ readonly type: "bytes32";
1230
+ }];
1231
+ readonly stateMutability: "view";
1232
+ readonly type: "function";
1233
+ }, {
1234
+ readonly inputs: readonly [{
1235
+ readonly internalType: "bytes32";
1236
+ readonly name: "role";
1237
+ readonly type: "bytes32";
1238
+ }, {
1239
+ readonly internalType: "address";
1240
+ readonly name: "account";
1241
+ readonly type: "address";
1242
+ }];
1243
+ readonly name: "grantRole";
1244
+ readonly outputs: readonly [];
1245
+ readonly stateMutability: "nonpayable";
1246
+ readonly type: "function";
1247
+ }, {
1248
+ readonly inputs: readonly [{
1249
+ readonly internalType: "bytes32";
1250
+ readonly name: "role";
1251
+ readonly type: "bytes32";
1252
+ }, {
1253
+ readonly internalType: "address";
1254
+ readonly name: "account";
1255
+ readonly type: "address";
1256
+ }];
1257
+ readonly name: "hasRole";
1258
+ readonly outputs: readonly [{
1259
+ readonly internalType: "bool";
1260
+ readonly name: "";
1261
+ readonly type: "bool";
1262
+ }];
1263
+ readonly stateMutability: "view";
1264
+ readonly type: "function";
1265
+ }, {
1266
+ readonly inputs: readonly [{
1267
+ readonly internalType: "address";
1268
+ readonly name: "admin";
1269
+ readonly type: "address";
1270
+ }];
1271
+ readonly name: "initialize";
1272
+ readonly outputs: readonly [];
1273
+ readonly stateMutability: "nonpayable";
1274
+ readonly type: "function";
1275
+ }, {
1276
+ readonly inputs: readonly [];
1277
+ readonly name: "proxiableUUID";
1278
+ readonly outputs: readonly [{
1279
+ readonly internalType: "bytes32";
1280
+ readonly name: "";
1281
+ readonly type: "bytes32";
1282
+ }];
1283
+ readonly stateMutability: "view";
1284
+ readonly type: "function";
1285
+ }, {
1286
+ readonly inputs: readonly [{
1287
+ readonly internalType: "bytes32";
1288
+ readonly name: "role";
1289
+ readonly type: "bytes32";
1290
+ }, {
1291
+ readonly internalType: "address";
1292
+ readonly name: "callerConfirmation";
1293
+ readonly type: "address";
1294
+ }];
1295
+ readonly name: "renounceRole";
1296
+ readonly outputs: readonly [];
1297
+ readonly stateMutability: "nonpayable";
1298
+ readonly type: "function";
1299
+ }, {
1300
+ readonly inputs: readonly [{
1301
+ readonly internalType: "bytes32";
1302
+ readonly name: "";
1303
+ readonly type: "bytes32";
1304
+ }];
1305
+ readonly name: "requestState";
1306
+ readonly outputs: readonly [{
1307
+ readonly internalType: "enum Vault.RFFState";
1308
+ readonly name: "";
1309
+ readonly type: "uint8";
1310
+ }];
1311
+ readonly stateMutability: "view";
1312
+ readonly type: "function";
1313
+ }, {
1314
+ readonly inputs: readonly [{
1315
+ readonly internalType: "bytes32";
1316
+ readonly name: "role";
1317
+ readonly type: "bytes32";
1318
+ }, {
1319
+ readonly internalType: "address";
1320
+ readonly name: "account";
1321
+ readonly type: "address";
1322
+ }];
1323
+ readonly name: "revokeRole";
1324
+ readonly outputs: readonly [];
1325
+ readonly stateMutability: "nonpayable";
1326
+ readonly type: "function";
1327
+ }, {
1328
+ readonly inputs: readonly [{
1329
+ readonly components: readonly [{
1330
+ readonly internalType: "enum Vault.Universe";
1331
+ readonly name: "universe";
1332
+ readonly type: "uint8";
1333
+ }, {
1334
+ readonly internalType: "uint256";
1335
+ readonly name: "chainID";
1336
+ readonly type: "uint256";
1337
+ }, {
1338
+ readonly internalType: "address[]";
1339
+ readonly name: "solvers";
1340
+ readonly type: "address[]";
1341
+ }, {
1342
+ readonly internalType: "address[]";
1343
+ readonly name: "contractAddresses";
1344
+ readonly type: "address[]";
1345
+ }, {
1346
+ readonly internalType: "uint256[]";
1347
+ readonly name: "amounts";
1348
+ readonly type: "uint256[]";
1349
+ }, {
1350
+ readonly internalType: "uint256";
1351
+ readonly name: "nonce";
1352
+ readonly type: "uint256";
1353
+ }];
1354
+ readonly internalType: "struct Vault.SettleData";
1355
+ readonly name: "settleData";
1356
+ readonly type: "tuple";
1357
+ }, {
1358
+ readonly internalType: "bytes";
1359
+ readonly name: "signature";
1360
+ readonly type: "bytes";
1361
+ }];
1362
+ readonly name: "settle";
1363
+ readonly outputs: readonly [];
1364
+ readonly stateMutability: "nonpayable";
1365
+ readonly type: "function";
1366
+ }, {
1367
+ readonly inputs: readonly [{
1368
+ readonly internalType: "uint256";
1369
+ readonly name: "";
1370
+ readonly type: "uint256";
1371
+ }];
1372
+ readonly name: "settleNonce";
1373
+ readonly outputs: readonly [{
1374
+ readonly internalType: "bool";
1375
+ readonly name: "";
1376
+ readonly type: "bool";
1377
+ }];
1378
+ readonly stateMutability: "view";
1379
+ readonly type: "function";
1380
+ }, {
1381
+ readonly inputs: readonly [{
1382
+ readonly internalType: "bytes4";
1383
+ readonly name: "interfaceId";
1384
+ readonly type: "bytes4";
1385
+ }];
1386
+ readonly name: "supportsInterface";
1387
+ readonly outputs: readonly [{
1388
+ readonly internalType: "bool";
1389
+ readonly name: "";
1390
+ readonly type: "bool";
1391
+ }];
1392
+ readonly stateMutability: "view";
1393
+ readonly type: "function";
1394
+ }, {
1395
+ readonly inputs: readonly [{
1396
+ readonly internalType: "address";
1397
+ readonly name: "newImplementation";
1398
+ readonly type: "address";
1399
+ }, {
1400
+ readonly internalType: "bytes";
1401
+ readonly name: "data";
1402
+ readonly type: "bytes";
1403
+ }];
1404
+ readonly name: "upgradeToAndCall";
1405
+ readonly outputs: readonly [];
1406
+ readonly stateMutability: "payable";
1407
+ readonly type: "function";
1408
+ }, {
1409
+ readonly inputs: readonly [{
1410
+ readonly components: readonly [{
1411
+ readonly components: readonly [{
1412
+ readonly internalType: "enum Vault.Universe";
1413
+ readonly name: "universe";
1414
+ readonly type: "uint8";
1415
+ }, {
1416
+ readonly internalType: "uint256";
1417
+ readonly name: "chainID";
1418
+ readonly type: "uint256";
1419
+ }, {
1420
+ readonly internalType: "bytes32";
1421
+ readonly name: "contractAddress";
1422
+ readonly type: "bytes32";
1423
+ }, {
1424
+ readonly internalType: "uint256";
1425
+ readonly name: "value";
1426
+ readonly type: "uint256";
1427
+ }];
1428
+ readonly internalType: "struct Vault.SourcePair[]";
1429
+ readonly name: "sources";
1430
+ readonly type: "tuple[]";
1431
+ }, {
1432
+ readonly internalType: "enum Vault.Universe";
1433
+ readonly name: "destinationUniverse";
1434
+ readonly type: "uint8";
1435
+ }, {
1436
+ readonly internalType: "uint256";
1437
+ readonly name: "destinationChainID";
1438
+ readonly type: "uint256";
1439
+ }, {
1440
+ readonly internalType: "bytes32";
1441
+ readonly name: "recipientAddress";
1442
+ readonly type: "bytes32";
1443
+ }, {
1444
+ readonly components: readonly [{
1445
+ readonly internalType: "bytes32";
1446
+ readonly name: "contractAddress";
1447
+ readonly type: "bytes32";
1448
+ }, {
1449
+ readonly internalType: "uint256";
1450
+ readonly name: "value";
1451
+ readonly type: "uint256";
1452
+ }];
1453
+ readonly internalType: "struct Vault.DestinationPair[]";
1454
+ readonly name: "destinations";
1455
+ readonly type: "tuple[]";
1456
+ }, {
1457
+ readonly internalType: "uint256";
1458
+ readonly name: "nonce";
1459
+ readonly type: "uint256";
1460
+ }, {
1461
+ readonly internalType: "uint256";
1462
+ readonly name: "expiry";
1463
+ readonly type: "uint256";
1464
+ }, {
1465
+ readonly components: readonly [{
1466
+ readonly internalType: "enum Vault.Universe";
1467
+ readonly name: "universe";
1468
+ readonly type: "uint8";
1469
+ }, {
1470
+ readonly internalType: "bytes32";
1471
+ readonly name: "address_";
1472
+ readonly type: "bytes32";
1473
+ }];
1474
+ readonly internalType: "struct Vault.Party[]";
1475
+ readonly name: "parties";
1476
+ readonly type: "tuple[]";
1477
+ }];
1478
+ readonly internalType: "struct Vault.Request";
1479
+ readonly name: "request";
1480
+ readonly type: "tuple";
1481
+ }, {
1482
+ readonly internalType: "bytes";
1483
+ readonly name: "signature";
1484
+ readonly type: "bytes";
1485
+ }];
1486
+ readonly name: "verifyRequestSignature";
1487
+ readonly outputs: readonly [{
1488
+ readonly internalType: "bool";
1489
+ readonly name: "";
1490
+ readonly type: "bool";
1491
+ }, {
1492
+ readonly internalType: "bytes32";
1493
+ readonly name: "";
1494
+ readonly type: "bytes32";
1495
+ }];
1496
+ readonly stateMutability: "pure";
1497
+ readonly type: "function";
1498
+ }, {
1499
+ readonly inputs: readonly [{
1500
+ readonly internalType: "bytes32";
1501
+ readonly name: "";
1502
+ readonly type: "bytes32";
1503
+ }];
1504
+ readonly name: "winningSolver";
1505
+ readonly outputs: readonly [{
1506
+ readonly internalType: "address";
1507
+ readonly name: "";
1508
+ readonly type: "address";
1509
+ }];
1510
+ readonly stateMutability: "view";
1511
+ readonly type: "function";
1512
+ }, {
1513
+ readonly inputs: readonly [{
1514
+ readonly internalType: "address";
1515
+ readonly name: "to";
1516
+ readonly type: "address";
1517
+ }, {
1518
+ readonly internalType: "address";
1519
+ readonly name: "token";
1520
+ readonly type: "address";
1521
+ }, {
1522
+ readonly internalType: "uint256";
1523
+ readonly name: "amount";
1524
+ readonly type: "uint256";
1525
+ }];
1526
+ readonly name: "withdraw";
1527
+ readonly outputs: readonly [];
1528
+ readonly stateMutability: "nonpayable";
1529
+ readonly type: "function";
1530
+ }];
1531
+ type EVMVaultABIType = typeof EVMVaultABI;
1532
+
1533
+ declare const YakAggregatorABI: readonly [{
1534
+ readonly inputs: readonly [{
1535
+ readonly internalType: "uint256";
1536
+ readonly name: "_amountIn";
1537
+ readonly type: "uint256";
1538
+ }, {
1539
+ readonly internalType: "address";
1540
+ readonly name: "_tokenIn";
1541
+ readonly type: "address";
1542
+ }, {
1543
+ readonly internalType: "address";
1544
+ readonly name: "_tokenOut";
1545
+ readonly type: "address";
1546
+ }, {
1547
+ readonly internalType: "uint256";
1548
+ readonly name: "_maxSteps";
1549
+ readonly type: "uint256";
1550
+ }];
1551
+ readonly name: "findBestPath";
1552
+ readonly outputs: readonly [{
1553
+ readonly components: readonly [{
1554
+ readonly internalType: "uint256[]";
1555
+ readonly name: "amounts";
1556
+ readonly type: "uint256[]";
1557
+ }, {
1558
+ readonly internalType: "address[]";
1559
+ readonly name: "adapters";
1560
+ readonly type: "address[]";
1561
+ }, {
1562
+ readonly internalType: "address[]";
1563
+ readonly name: "path";
1564
+ readonly type: "address[]";
1565
+ }, {
1566
+ readonly internalType: "uint256";
1567
+ readonly name: "gasEstimate";
1568
+ readonly type: "uint256";
1569
+ }];
1570
+ readonly internalType: "struct YakRouter.FormattedOffer";
1571
+ readonly name: "";
1572
+ readonly type: "tuple";
1573
+ }];
1574
+ readonly stateMutability: "view";
1575
+ readonly type: "function";
1576
+ }, {
1577
+ readonly inputs: readonly [{
1578
+ readonly internalType: "uint256";
1579
+ readonly name: "_amountIn";
1580
+ readonly type: "uint256";
1581
+ }, {
1582
+ readonly internalType: "address";
1583
+ readonly name: "_tokenIn";
1584
+ readonly type: "address";
1585
+ }, {
1586
+ readonly internalType: "address";
1587
+ readonly name: "_tokenOut";
1588
+ readonly type: "address";
1589
+ }, {
1590
+ readonly internalType: "uint256";
1591
+ readonly name: "_maxSteps";
1592
+ readonly type: "uint256";
1593
+ }, {
1594
+ readonly internalType: "uint256";
1595
+ readonly name: "_gasPrice";
1596
+ readonly type: "uint256";
1597
+ }];
1598
+ readonly name: "findBestPathWithGas";
1599
+ readonly outputs: readonly [{
1600
+ readonly components: readonly [{
1601
+ readonly internalType: "uint256[]";
1602
+ readonly name: "amounts";
1603
+ readonly type: "uint256[]";
1604
+ }, {
1605
+ readonly internalType: "address[]";
1606
+ readonly name: "adapters";
1607
+ readonly type: "address[]";
1608
+ }, {
1609
+ readonly internalType: "address[]";
1610
+ readonly name: "path";
1611
+ readonly type: "address[]";
1612
+ }, {
1613
+ readonly internalType: "uint256";
1614
+ readonly name: "gasEstimate";
1615
+ readonly type: "uint256";
1616
+ }];
1617
+ readonly internalType: "struct YakRouter.FormattedOffer";
1618
+ readonly name: "";
1619
+ readonly type: "tuple";
1620
+ }];
1621
+ readonly stateMutability: "view";
1622
+ readonly type: "function";
1623
+ }, {
1624
+ readonly inputs: readonly [{
1625
+ readonly components: readonly [{
1626
+ readonly internalType: "uint256";
1627
+ readonly name: "amountIn";
1628
+ readonly type: "uint256";
1629
+ }, {
1630
+ readonly internalType: "uint256";
1631
+ readonly name: "amountOut";
1632
+ readonly type: "uint256";
1633
+ }, {
1634
+ readonly internalType: "address[]";
1635
+ readonly name: "path";
1636
+ readonly type: "address[]";
1637
+ }, {
1638
+ readonly internalType: "address[]";
1639
+ readonly name: "adapters";
1640
+ readonly type: "address[]";
1641
+ }];
1642
+ readonly internalType: "struct YakRouter.Trade";
1643
+ readonly name: "_trade";
1644
+ readonly type: "tuple";
1645
+ }, {
1646
+ readonly internalType: "address";
1647
+ readonly name: "_to";
1648
+ readonly type: "address";
1649
+ }, {
1650
+ readonly internalType: "uint256";
1651
+ readonly name: "_fee";
1652
+ readonly type: "uint256";
1653
+ }];
1654
+ readonly name: "swapNoSplit";
1655
+ readonly outputs: readonly [];
1656
+ readonly stateMutability: "nonpayable";
1657
+ readonly type: "function";
1658
+ }, {
1659
+ readonly inputs: readonly [{
1660
+ readonly components: readonly [{
1661
+ readonly internalType: "uint256";
1662
+ readonly name: "amountIn";
1663
+ readonly type: "uint256";
1664
+ }, {
1665
+ readonly internalType: "uint256";
1666
+ readonly name: "amountOut";
1667
+ readonly type: "uint256";
1668
+ }, {
1669
+ readonly internalType: "address[]";
1670
+ readonly name: "path";
1671
+ readonly type: "address[]";
1672
+ }, {
1673
+ readonly internalType: "address[]";
1674
+ readonly name: "adapters";
1675
+ readonly type: "address[]";
1676
+ }];
1677
+ readonly internalType: "struct YakRouter.Trade";
1678
+ readonly name: "_trade";
1679
+ readonly type: "tuple";
1680
+ }, {
1681
+ readonly internalType: "address";
1682
+ readonly name: "_to";
1683
+ readonly type: "address";
1684
+ }, {
1685
+ readonly internalType: "uint256";
1686
+ readonly name: "_fee";
1687
+ readonly type: "uint256";
1688
+ }];
1689
+ readonly name: "swapNoSplitFromAVAX";
1690
+ readonly outputs: readonly [];
1691
+ readonly stateMutability: "payable";
1692
+ readonly type: "function";
1693
+ }, {
1694
+ readonly inputs: readonly [{
1695
+ readonly components: readonly [{
1696
+ readonly internalType: "uint256";
1697
+ readonly name: "amountIn";
1698
+ readonly type: "uint256";
1699
+ }, {
1700
+ readonly internalType: "uint256";
1701
+ readonly name: "amountOut";
1702
+ readonly type: "uint256";
1703
+ }, {
1704
+ readonly internalType: "address[]";
1705
+ readonly name: "path";
1706
+ readonly type: "address[]";
1707
+ }, {
1708
+ readonly internalType: "address[]";
1709
+ readonly name: "adapters";
1710
+ readonly type: "address[]";
1711
+ }];
1712
+ readonly internalType: "struct YakRouter.Trade";
1713
+ readonly name: "_trade";
1714
+ readonly type: "tuple";
1715
+ }, {
1716
+ readonly internalType: "address";
1717
+ readonly name: "_to";
1718
+ readonly type: "address";
1719
+ }, {
1720
+ readonly internalType: "uint256";
1721
+ readonly name: "_fee";
1722
+ readonly type: "uint256";
1723
+ }];
1724
+ readonly name: "swapNoSplitToAVAX";
1725
+ readonly outputs: readonly [];
1726
+ readonly stateMutability: "nonpayable";
1727
+ readonly type: "function";
1728
+ }, {
1729
+ readonly inputs: readonly [{
1730
+ readonly components: readonly [{
1731
+ readonly internalType: "uint256";
1732
+ readonly name: "amountIn";
1733
+ readonly type: "uint256";
1734
+ }, {
1735
+ readonly internalType: "uint256";
1736
+ readonly name: "amountOut";
1737
+ readonly type: "uint256";
1738
+ }, {
1739
+ readonly internalType: "address[]";
1740
+ readonly name: "path";
1741
+ readonly type: "address[]";
1742
+ }, {
1743
+ readonly internalType: "address[]";
1744
+ readonly name: "adapters";
1745
+ readonly type: "address[]";
1746
+ }];
1747
+ readonly internalType: "struct YakRouter.Trade";
1748
+ readonly name: "_trade";
1749
+ readonly type: "tuple";
1750
+ }, {
1751
+ readonly internalType: "address";
1752
+ readonly name: "_to";
1753
+ readonly type: "address";
1754
+ }, {
1755
+ readonly internalType: "uint256";
1756
+ readonly name: "_fee";
1757
+ readonly type: "uint256";
1758
+ }, {
1759
+ readonly internalType: "uint256";
1760
+ readonly name: "_deadline";
1761
+ readonly type: "uint256";
1762
+ }, {
1763
+ readonly internalType: "uint8";
1764
+ readonly name: "_v";
1765
+ readonly type: "uint8";
1766
+ }, {
1767
+ readonly internalType: "bytes32";
1768
+ readonly name: "_r";
1769
+ readonly type: "bytes32";
1770
+ }, {
1771
+ readonly internalType: "bytes32";
1772
+ readonly name: "_s";
1773
+ readonly type: "bytes32";
1774
+ }];
1775
+ readonly name: "swapNoSplitToAVAXWithPermit";
1776
+ readonly outputs: readonly [];
1777
+ readonly stateMutability: "nonpayable";
1778
+ readonly type: "function";
1779
+ }, {
1780
+ readonly inputs: readonly [{
1781
+ readonly components: readonly [{
1782
+ readonly internalType: "uint256";
1783
+ readonly name: "amountIn";
1784
+ readonly type: "uint256";
1785
+ }, {
1786
+ readonly internalType: "uint256";
1787
+ readonly name: "amountOut";
1788
+ readonly type: "uint256";
1789
+ }, {
1790
+ readonly internalType: "address[]";
1791
+ readonly name: "path";
1792
+ readonly type: "address[]";
1793
+ }, {
1794
+ readonly internalType: "address[]";
1795
+ readonly name: "adapters";
1796
+ readonly type: "address[]";
1797
+ }];
1798
+ readonly internalType: "struct YakRouter.Trade";
1799
+ readonly name: "_trade";
1800
+ readonly type: "tuple";
1801
+ }, {
1802
+ readonly internalType: "address";
1803
+ readonly name: "_to";
1804
+ readonly type: "address";
1805
+ }, {
1806
+ readonly internalType: "uint256";
1807
+ readonly name: "_fee";
1808
+ readonly type: "uint256";
1809
+ }, {
1810
+ readonly internalType: "uint256";
1811
+ readonly name: "_deadline";
1812
+ readonly type: "uint256";
1813
+ }, {
1814
+ readonly internalType: "uint8";
1815
+ readonly name: "_v";
1816
+ readonly type: "uint8";
1817
+ }, {
1818
+ readonly internalType: "bytes32";
1819
+ readonly name: "_r";
1820
+ readonly type: "bytes32";
1821
+ }, {
1822
+ readonly internalType: "bytes32";
1823
+ readonly name: "_s";
1824
+ readonly type: "bytes32";
1825
+ }];
1826
+ readonly name: "swapNoSplitWithPermit";
1827
+ readonly outputs: readonly [];
1828
+ readonly stateMutability: "nonpayable";
1829
+ readonly type: "function";
1830
+ }];
1831
+
1832
+ declare const FibrousRouterABI: readonly [{
1833
+ readonly inputs: readonly [{
1834
+ readonly components: readonly [{
1835
+ readonly internalType: "address";
1836
+ readonly name: "token_in";
1837
+ readonly type: "address";
1838
+ }, {
1839
+ readonly internalType: "address";
1840
+ readonly name: "token_out";
1841
+ readonly type: "address";
1842
+ }, {
1843
+ readonly internalType: "uint256";
1844
+ readonly name: "amount_in";
1845
+ readonly type: "uint256";
1846
+ }, {
1847
+ readonly internalType: "uint256";
1848
+ readonly name: "amount_out";
1849
+ readonly type: "uint256";
1850
+ }, {
1851
+ readonly internalType: "uint256";
1852
+ readonly name: "min_received";
1853
+ readonly type: "uint256";
1854
+ }, {
1855
+ readonly internalType: "address";
1856
+ readonly name: "destination";
1857
+ readonly type: "address";
1858
+ }, {
1859
+ readonly internalType: "uint8";
1860
+ readonly name: "swap_type";
1861
+ readonly type: "uint8";
1862
+ }];
1863
+ readonly internalType: "struct IFibrousRouter.RouteParam";
1864
+ readonly name: "route";
1865
+ readonly type: "tuple";
1866
+ }, {
1867
+ readonly components: readonly [{
1868
+ readonly internalType: "address";
1869
+ readonly name: "token_in";
1870
+ readonly type: "address";
1871
+ }, {
1872
+ readonly internalType: "address";
1873
+ readonly name: "token_out";
1874
+ readonly type: "address";
1875
+ }, {
1876
+ readonly internalType: "uint32";
1877
+ readonly name: "rate";
1878
+ readonly type: "uint32";
1879
+ }, {
1880
+ readonly internalType: "int24";
1881
+ readonly name: "protocol_id";
1882
+ readonly type: "int24";
1883
+ }, {
1884
+ readonly internalType: "address";
1885
+ readonly name: "pool_address";
1886
+ readonly type: "address";
1887
+ }, {
1888
+ readonly internalType: "uint8";
1889
+ readonly name: "swap_type";
1890
+ readonly type: "uint8";
1891
+ }, {
1892
+ readonly internalType: "bytes";
1893
+ readonly name: "extra_data";
1894
+ readonly type: "bytes";
1895
+ }];
1896
+ readonly internalType: "struct IFibrousRouter.SwapParams[]";
1897
+ readonly name: "swap_parameters";
1898
+ readonly type: "tuple[]";
1899
+ }];
1900
+ readonly name: "swap";
1901
+ readonly outputs: readonly [{
1902
+ readonly internalType: "uint256";
1903
+ readonly name: "";
1904
+ readonly type: "uint256";
1905
+ }];
1906
+ readonly stateMutability: "payable";
1907
+ readonly type: "function";
1908
+ }];
1909
+
1910
+ declare enum PermitVariant {
1911
+ Unsupported = 0,
1912
+ EIP2612Canonical = 1,
1913
+ DAI = 2,
1914
+ Polygon2612 = 3,
1915
+ PolygonEMT = 4
1916
+ }
1917
+ declare class PermitCreationError extends Error {
1918
+ }
1919
+ declare function signPermitForAddressAndValue(cur: Currency, client: WalletClient, account: Account$1, spender: Address, value: bigint, contract?: GetContractReturnType<typeof ERC20ABI, WalletClient, Hex>, deadline?: bigint): Promise<`0x${string}`>;
1920
+
1921
+ declare enum CurrencyID {
1922
+ USDC = 1,
1923
+ USDT = 2,
1924
+ ETH = 3,
1925
+ POL = 4,
1926
+ AVAX = 5,
1927
+ BNB = 6,
1928
+ HYPE = 16,
1929
+ KAIA = 17,
1930
+ SOPH = 18,
1931
+ TRX = 19,
1932
+ MON = 20,
1933
+ CBTC = 21
1934
+ }
1935
+ declare class Currency {
1936
+ readonly currencyID: CurrencyID;
1937
+ readonly decimals: number;
1938
+ readonly permitVariant: PermitVariant;
1939
+ readonly permitContractVersion: number;
1940
+ readonly isGasToken: boolean;
1941
+ readonly tokenAddress: Uint8Array;
1942
+ private readonly oneUnitToAtomicUnitRatio;
1943
+ constructor(currencyID: CurrencyID, tokenAddress: string | Bytes | number[], decimals: number, permitVariant: PermitVariant, permitContractVersion: number | undefined, isGasToken: boolean);
1944
+ convertUnitsToAmountDecimal(input: bigint | number | Hex | Bytes): Decimal;
1945
+ convertAmountToUnitsInBinary(input: Decimal): Uint8Array;
1946
+ }
1947
+
1948
+ declare function zeroExtendBufToGivenSize(buf: Bytes, size?: number): Uint8Array;
1949
+ declare function bytesEqual(a: Bytes, b: Bytes): boolean;
1950
+ declare function ezPadTo32Hex(input: Hex | Parameters<typeof toHex>[0]): Hex;
1951
+ declare function convertDecimalToBigInt(dec: Decimal): bigint;
1952
+ declare function convertBigIntToDecimal(big: bigint): Decimal;
1953
+ declare function maxByBigInt<T>(items: readonly T[], getValue: (element: T) => bigint): T;
1954
+ declare function minByBigInt<T>(items: readonly T[], getValue: (element: T) => bigint): T;
1955
+
1956
+ declare class CurrencyMap {
1957
+ private readonly map;
1958
+ constructor(currencies: Currency[]);
1959
+ get(input: Parameters<typeof ezPadTo32Hex>[0]): Currency | undefined;
1960
+ }
1961
+ type ChainDatum = {
1962
+ ChainID: OmniversalChainID;
1963
+ Universe: Universe;
1964
+ ChainID32: Uint8Array;
1965
+ Currencies: Currency[];
1966
+ CurrencyMap: CurrencyMap;
1967
+ };
1968
+ declare const Chaindata: ChainDatum[];
1969
+ declare const ChaindataMap: ChainIDKeyedMap<ChainDatum>;
1970
+ declare const RPCURLMap: ChainIDKeyedMap<string>;
1971
+
1972
+ declare enum Environment {
1973
+ FOLLY = 0,// Dev with test-net tokens
1974
+ CERISE = 1,// Dev with main-net tokens
1975
+ CORAL = 2,// Test-net with main-net tokens
1976
+ JADE = 3
1977
+ }
1978
+ declare function getVaultContractMap(environment: Environment): ChainIDKeyedMap<Uint8Array<ArrayBufferLike>>;
1979
+
1980
+ type EVMRFF = {
1981
+ sources: readonly {
1982
+ universe: number;
1983
+ chainID: bigint;
1984
+ contractAddress: `0x${string}`;
1985
+ value: bigint;
1986
+ }[];
1987
+ destinationUniverse: number;
1988
+ destinationChainID: bigint;
1989
+ recipientAddress: `0x${string}`;
1990
+ destinations: readonly {
1991
+ contractAddress: `0x${string}`;
1992
+ value: bigint;
1993
+ }[];
1994
+ nonce: bigint;
1995
+ expiry: bigint;
1996
+ parties: readonly {
1997
+ universe: number;
1998
+ address_: `0x${string}`;
1999
+ }[];
2000
+ };
2001
+
2002
+ declare enum QuoteType {
2003
+ EXACT_IN = 0,
2004
+ EXACT_OUT = 1
2005
+ }
2006
+ declare enum QuoteSeriousness {
2007
+ PRICE_SURVEY = 0,
2008
+ SERIOUS = 1
2009
+ }
2010
+ type QuoteResponse = {
2011
+ chainID: number;
2012
+ quote: Quote;
2013
+ holding: Holding;
2014
+ aggregator: Aggregator;
2015
+ };
2016
+ type Holding = {
2017
+ chainID: OmniversalChainID;
2018
+ tokenAddress: Bytes;
2019
+ amountRaw: bigint;
2020
+ };
2021
+ interface Quote {
2022
+ expiry?: number;
2023
+ input: {
2024
+ contractAddress: Hex;
2025
+ amount: string;
2026
+ amountRaw: bigint;
2027
+ decimals: number;
2028
+ value: number;
2029
+ symbol: string;
2030
+ };
2031
+ output: {
2032
+ contractAddress: Hex;
2033
+ amount: string;
2034
+ amountRaw: bigint;
2035
+ decimals: number;
2036
+ value: number;
2037
+ symbol: string;
2038
+ };
2039
+ txData: {
2040
+ approvalAddress: Hex;
2041
+ tx: {
2042
+ to: Hex;
2043
+ data: Hex;
2044
+ value: Hex;
2045
+ };
2046
+ };
2047
+ }
2048
+ type CommonQuoteParameters = {
2049
+ userAddress: Bytes;
2050
+ receiverAddress?: Bytes;
2051
+ chain: OmniversalChainID;
2052
+ inputToken: Bytes;
2053
+ outputToken: Bytes;
2054
+ seriousness: QuoteSeriousness;
2055
+ };
2056
+ type QuoteRequestExactInput = CommonQuoteParameters & {
2057
+ type: QuoteType.EXACT_IN;
2058
+ inputAmount: bigint;
2059
+ };
2060
+ type QuoteRequestExactOutput = CommonQuoteParameters & {
2061
+ type: QuoteType.EXACT_OUT;
2062
+ outputAmount: bigint;
2063
+ };
2064
+ interface Aggregator {
2065
+ getQuotes(requests: (QuoteRequestExactInput | QuoteRequestExactOutput)[]): Promise<(Quote | null)[]>;
2066
+ }
2067
+
2068
+ type LiFiResponse = {
2069
+ type: string;
2070
+ id: string;
2071
+ estimate: {
2072
+ tool: string;
2073
+ approvalAddress: Hex;
2074
+ toAmountMin: string;
2075
+ toAmount: string;
2076
+ fromAmount: string;
2077
+ executionDuration: number;
2078
+ };
2079
+ action: {
2080
+ fromToken: {
2081
+ symbol: string;
2082
+ decimals: number;
2083
+ priceUSD: string;
2084
+ };
2085
+ toToken: {
2086
+ symbol: string;
2087
+ decimals: number;
2088
+ priceUSD: string;
2089
+ };
2090
+ };
2091
+ integrator: string;
2092
+ transactionRequest: {
2093
+ value: Hex;
2094
+ to: Hex;
2095
+ data: Hex;
2096
+ };
2097
+ };
2098
+ declare class LiFiAggregator implements Aggregator {
2099
+ private static readonly BASE_URL_V1;
2100
+ private static readonly COMMON_OPTIONS;
2101
+ private static readonly GLOBAL_DENY;
2102
+ private static readonly PER_CHAIN_DENY;
2103
+ private denyExchangesFor;
2104
+ private readonly axios;
2105
+ constructor(apiKey: string);
2106
+ getQuotes(requests: (QuoteRequestExactInput | QuoteRequestExactOutput)[]): Promise<(Quote | null)[]>;
2107
+ }
2108
+
2109
+ type BebopCommonQuote = {
2110
+ type: string;
2111
+ status: string;
2112
+ quoteId: string;
2113
+ chainId: number;
2114
+ approvalType: string;
2115
+ nativeToken: string;
2116
+ taker: string;
2117
+ receiver: string;
2118
+ expiry: number;
2119
+ slippage: number;
2120
+ gasFee: {
2121
+ native: string;
2122
+ usd: number;
2123
+ };
2124
+ buyTokens: Record<Hex, {
2125
+ amount: string;
2126
+ decimals: number;
2127
+ priceUsd?: number;
2128
+ symbol: string;
2129
+ minimumAmount: string;
2130
+ price?: number;
2131
+ priceBeforeFee?: number;
2132
+ amountBeforeFee: string;
2133
+ deltaFromExpected: number;
2134
+ }>;
2135
+ sellTokens: Record<Hex, {
2136
+ amount: string;
2137
+ decimals: number;
2138
+ priceUsd?: number;
2139
+ symbol: string;
2140
+ price?: number;
2141
+ priceBeforeFee?: number;
2142
+ }>;
2143
+ settlementAddress: string;
2144
+ approvalTarget: Hex;
2145
+ requiredSignatures: Array<never>;
2146
+ priceImpact: number;
2147
+ warnings: Array<never>;
2148
+ tx: {
2149
+ from: Hex;
2150
+ to: Hex;
2151
+ value: Hex;
2152
+ data: Hex;
2153
+ gas: number;
2154
+ };
2155
+ };
2156
+ type BebopPMMv3Quote = {
2157
+ type: "PMMv3";
2158
+ quote: BebopCommonQuote & {
2159
+ makers: Array<string>;
2160
+ toSign: {
2161
+ partner_id: number;
2162
+ expiry: number;
2163
+ taker_address: string;
2164
+ maker_address: string;
2165
+ maker_nonce: string;
2166
+ taker_token: string;
2167
+ maker_token: string;
2168
+ taker_amount: string;
2169
+ maker_amount: string;
2170
+ receiver: string;
2171
+ packed_commands: string;
2172
+ };
2173
+ onchainOrderType: string;
2174
+ tx: BebopCommonQuote["tx"] & {
2175
+ gasPrice: number;
2176
+ chainId: number;
2177
+ };
2178
+ };
2179
+ };
2180
+ type BebopJAMv2Quote = {
2181
+ type: "JAMv2";
2182
+ quote: BebopCommonQuote & {
2183
+ hooksHash: string;
2184
+ toSign: {
2185
+ taker: string;
2186
+ receiver: string;
2187
+ expiry: number;
2188
+ exclusivityDeadline: number;
2189
+ nonce: string;
2190
+ executor: string;
2191
+ partnerInfo: string;
2192
+ sellTokens: Array<string>;
2193
+ buyTokens: Array<string>;
2194
+ sellAmounts: Array<string>;
2195
+ buyAmounts: Array<string>;
2196
+ hooksHash: string;
2197
+ };
2198
+ solver: string;
2199
+ };
2200
+ };
2201
+ type BebopQuote = Quote & {
2202
+ originalResponse: BebopPMMv3Quote | BebopJAMv2Quote;
2203
+ };
2204
+ declare class BebopAggregator implements Aggregator {
2205
+ private static readonly BASE_URL;
2206
+ private static readonly COMMON_OPTIONS;
2207
+ private readonly axios;
2208
+ constructor(apiKey: string);
2209
+ getQuotes(requests: (QuoteRequestExactInput | QuoteRequestExactOutput)[]): Promise<(Quote | null)[]>;
2210
+ }
2211
+
2212
+ type FibrousToken = {
2213
+ name: string;
2214
+ symbol?: string;
2215
+ address: Hex;
2216
+ decimals: number;
2217
+ price: number | string | null;
2218
+ };
2219
+ type FibrousResponse = {
2220
+ route: {
2221
+ success: boolean;
2222
+ routeSwapType: number;
2223
+ inputToken: FibrousToken;
2224
+ inputAmount: string;
2225
+ outputToken: FibrousToken;
2226
+ outputAmount: string;
2227
+ };
2228
+ calldata: {
2229
+ route: {
2230
+ token_in: Hex;
2231
+ token_out: Hex;
2232
+ amount_in: string;
2233
+ amount_out: string;
2234
+ min_received: string;
2235
+ destination: Hex;
2236
+ swap_type: number;
2237
+ };
2238
+ swap_parameters: Array<{
2239
+ token_in: Hex;
2240
+ token_out: Hex;
2241
+ rate: string;
2242
+ protocol_id: string;
2243
+ pool_address: Hex;
2244
+ swap_type: number;
2245
+ extra_data: Hex;
2246
+ }>;
2247
+ };
2248
+ router_address: Hex;
2249
+ };
2250
+ type FibrousQuote = Quote & {
2251
+ originalResponse: FibrousResponse;
2252
+ };
2253
+ type FibrousAggregatorOptions = {
2254
+ apiKey?: string;
2255
+ slippage?: number;
2256
+ excludeProtocols?: string;
2257
+ };
2258
+ declare class FibrousAggregator implements Aggregator {
2259
+ private static readonly BASE_URL;
2260
+ private readonly axios;
2261
+ private readonly slippage;
2262
+ private readonly excludeProtocols;
2263
+ constructor(options?: FibrousAggregatorOptions);
2264
+ getQuotes(requests: (QuoteRequestExactInput | QuoteRequestExactOutput)[]): Promise<(Quote | null)[]>;
2265
+ }
2266
+
2267
+ type HoldingWithRecipient = Holding & {
2268
+ recipient: Bytes;
2269
+ receiverAddress?: Bytes;
2270
+ };
2271
+ type HoldingWithSwapAddresses = Holding & {
2272
+ takerAddress: Bytes;
2273
+ receiverAddress: Bytes;
2274
+ };
2275
+ declare class AutoSelectionError extends Error {
2276
+ }
2277
+ declare enum AggregateAggregatorsMode {
2278
+ MaximizeOutput = 0,
2279
+ MinimizeInput = 1
2280
+ }
2281
+ declare function aggregateAggregators(requests: (QuoteRequestExactInput | QuoteRequestExactOutput)[], aggregators: Aggregator[], mode: AggregateAggregatorsMode): Promise<{
2282
+ quote: Quote | null;
2283
+ aggregator: Aggregator;
2284
+ }[]>;
2285
+ type QuoteCandidate = {
2286
+ quote: Quote;
2287
+ aggregator: Aggregator;
2288
+ label?: string;
2289
+ };
2290
+ declare function decimalAmountForLog(amount: Decimal): string;
2291
+ declare function rawAmountForLog(args: {
2292
+ amountRaw: Decimal | bigint;
2293
+ decimals: number;
2294
+ symbol: string;
2295
+ }): {
2296
+ amount: string;
2297
+ symbol: string;
2298
+ decimals: number;
2299
+ };
2300
+ declare function quoteAmountForLog(amount: Quote["input"]): {
2301
+ amount: string;
2302
+ symbol: string;
2303
+ decimals: number;
2304
+ value: number;
2305
+ token: string;
2306
+ };
2307
+ declare function quoteCandidateForLog(candidate: QuoteCandidate): {
2308
+ aggregator: string;
2309
+ input: ReturnType<typeof quoteAmountForLog>;
2310
+ output: ReturnType<typeof quoteAmountForLog>;
2311
+ };
2312
+ declare function rawAmountForCurrencyValue(currency: Currency, value?: Decimal): Decimal;
2313
+ declare function inputRawForOutputRaw(quote: Quote, outputAmountRaw: Decimal): Decimal;
2314
+ declare function applyCappedSafetyMargin(args: {
2315
+ baseInputAmountRaw: Decimal;
2316
+ inputAmountRaw: Decimal;
2317
+ maxExtraInputAmountRaw: Decimal;
2318
+ maxInputAmountRaw?: Decimal;
2319
+ }): Decimal;
2320
+ declare function firstSuccessfulQuoteCandidate(candidates: Promise<QuoteCandidate | null>[], noQuoteMessage: string): Promise<QuoteCandidate>;
2321
+ declare function quoteCandidateOrNull(label: string, quotePromise: Promise<QuoteCandidate>): Promise<QuoteCandidate | null>;
2322
+ declare function getExactOutQuoteCandidate(args: {
2323
+ request: QuoteRequestExactOutput;
2324
+ aggregators: Aggregator[];
2325
+ maxInputAmountRaw?: bigint;
2326
+ requiredOutputAmountRaw?: bigint;
2327
+ }): Promise<QuoteCandidate>;
2328
+ declare function convergeExactInQuote(args: {
2329
+ makeRequest: (inputAmountRaw: bigint) => QuoteRequestExactInput;
2330
+ initialInputAmountRaw: Decimal;
2331
+ maxExtraInputAmountRaw: Decimal;
2332
+ requiredOutputAmountRaw: bigint;
2333
+ aggregators: Aggregator[];
2334
+ maxInputAmountRaw?: Decimal;
2335
+ maxAttempts?: number;
2336
+ didNotConvergeMessage: string;
2337
+ maxInputReachedMessage: string;
2338
+ }): Promise<QuoteCandidate>;
2339
+ /**
2340
+ * @deprecated Use {@link autoSelectSources} (object args; per-holding `takerAddress` and
2341
+ * `receiverAddress` on each `HoldingWithSwapAddresses`).
2342
+ */
2343
+ declare function autoSelectSourcesV2(userAddress: Bytes, holdings: Holding[], outputRequired: Decimal, aggregators: Aggregator[], commonCurrencyID?: CurrencyID): Promise<{
2344
+ quoteResponses: QuoteResponse[];
2345
+ usedCOTs: {
2346
+ originalHolding: Holding;
2347
+ amountUsed: Decimal;
2348
+ idx: number;
2349
+ cur: Currency;
2350
+ }[];
2351
+ }>;
2352
+ /**
2353
+ * @deprecated Use {@link autoSelectSources} (object args; per-holding `takerAddress` and
2354
+ * `receiverAddress` on each `HoldingWithSwapAddresses`).
2355
+ */
2356
+ declare function autoSelectSourcesV2ByRecipient(holdings: HoldingWithRecipient[], outputRequired: Decimal, aggregators: Aggregator[], commonCurrencyID?: CurrencyID): Promise<{
2357
+ quoteResponses: QuoteResponse[];
2358
+ usedCOTs: {
2359
+ originalHolding: Holding;
2360
+ amountUsed: Decimal;
2361
+ idx: number;
2362
+ cur: Currency;
2363
+ }[];
2364
+ }>;
2365
+ /**
2366
+ * @deprecated Use {@link getDestinationExactOutSwap} (object args; explicit `takerAddress` and
2367
+ * `receiverAddress`, both required).
2368
+ */
2369
+ declare function determineDestinationSwaps(userAddress: Bytes, requirement: Holding, aggregators: Aggregator[], commonCurrencyID?: CurrencyID, receiverAddress?: Bytes): Promise<QuoteResponse>;
2370
+ /**
2371
+ * @deprecated Use {@link liquidateSourceHoldings} (object args; per-holding `takerAddress`
2372
+ * and `receiverAddress` on each `HoldingWithSwapAddresses`).
2373
+ */
2374
+ declare function liquidateInputHoldings(userAddress: Bytes, holdings: Holding[], aggregators: Aggregator[], commonCurrencyID?: CurrencyID, receiverAddress?: Bytes): Promise<QuoteResponse[]>;
2375
+ /**
2376
+ * @deprecated Use {@link liquidateSourceHoldings} (object args; per-holding `takerAddress`
2377
+ * and `receiverAddress` on each `HoldingWithSwapAddresses`).
2378
+ */
2379
+ declare function liquidateInputHoldingsByRecipient(holdings: HoldingWithRecipient[], aggregators: Aggregator[], commonCurrencyID?: CurrencyID, receiverAddress?: Bytes): Promise<QuoteResponse[]>;
2380
+ /**
2381
+ * @deprecated Use {@link getDestinationExactInSwap} (object args; explicit `takerAddress`
2382
+ * and `receiverAddress`, both required).
2383
+ */
2384
+ declare function destinationSwapWithExactIn(userAddress: Bytes, omniChainID: OmniversalChainID, inputAmount: bigint, outputToken: Bytes, aggregators: Aggregator[], inputCurrency?: CurrencyID, receiverAddress?: Bytes): Promise<QuoteResponse>;
2385
+ declare function getDestinationExactOutSwap(args: {
2386
+ takerAddress: Bytes;
2387
+ receiverAddress: Bytes;
2388
+ requirement: Holding;
2389
+ aggregators: Aggregator[];
2390
+ commonCurrencyID?: CurrencyID;
2391
+ }): Promise<QuoteResponse>;
2392
+ declare function getDestinationExactInSwap(args: {
2393
+ takerAddress: Bytes;
2394
+ receiverAddress: Bytes;
2395
+ chain: OmniversalChainID;
2396
+ inputAmount: bigint;
2397
+ outputToken: Bytes;
2398
+ aggregators: Aggregator[];
2399
+ inputCurrency?: CurrencyID;
2400
+ }): Promise<QuoteResponse>;
2401
+ declare function liquidateSourceHoldings(args: {
2402
+ holdings: HoldingWithSwapAddresses[];
2403
+ aggregators: Aggregator[];
2404
+ commonCurrencyID?: CurrencyID;
2405
+ }): Promise<QuoteResponse[]>;
2406
+ declare function autoSelectSources(args: {
2407
+ holdings: HoldingWithSwapAddresses[];
2408
+ outputRequired: Decimal;
2409
+ aggregators: Aggregator[];
2410
+ commonCurrencyID?: CurrencyID;
2411
+ }): Promise<{
2412
+ quoteResponses: QuoteResponse[];
2413
+ usedCOTs: {
2414
+ originalHolding: Holding;
2415
+ amountUsed: Decimal;
2416
+ idx: number;
2417
+ cur: Currency;
2418
+ }[];
2419
+ }>;
2420
+
2421
+ type SourceWithValue = {
2422
+ chainID: OmniversalChainID;
2423
+ tokenAddress: Bytes;
2424
+ amountRaw: bigint;
2425
+ takerAddress: Bytes;
2426
+ receiverAddress: Bytes;
2427
+ value: number;
2428
+ };
2429
+ declare function selectSources(args: {
2430
+ sources: SourceWithValue[];
2431
+ outputRequired: Decimal;
2432
+ aggregators: Aggregator[];
2433
+ commonCurrencyID?: CurrencyID;
2434
+ prefixHeadroom?: Decimal;
2435
+ }): Promise<{
2436
+ quoteResponses: QuoteResponse[];
2437
+ usedCOTs: {
2438
+ originalHolding: Holding;
2439
+ amountUsed: Decimal;
2440
+ idx: number;
2441
+ cur: Currency;
2442
+ }[];
2443
+ }>;
2444
+
2445
+ type MessageCodec = {
2446
+ encode(message: unknown, writer?: BinaryWriter): BinaryWriter;
2447
+ decode?(input: BinaryReader | Uint8Array, length?: number): unknown;
2448
+ create?(base?: unknown): unknown;
2449
+ fromPartial?(object: unknown): unknown;
2450
+ };
2451
+ type AccountData = {
2452
+ readonly address: string;
2453
+ readonly algo: "secp256k1";
2454
+ readonly pubkey: Uint8Array;
2455
+ };
2456
+ type Coin = {
2457
+ readonly denom: string;
2458
+ readonly amount: string;
2459
+ };
2460
+ type StdFee = {
2461
+ readonly amount: readonly Coin[];
2462
+ readonly gas: string;
2463
+ readonly granter?: string;
2464
+ readonly payer?: string;
2465
+ };
2466
+ type EncodeObject<T = unknown> = {
2467
+ readonly typeUrl: string;
2468
+ readonly value: T;
2469
+ };
2470
+ type DirectSignDoc = {
2471
+ readonly bodyBytes: Uint8Array;
2472
+ readonly authInfoBytes: Uint8Array;
2473
+ readonly chainId: string;
2474
+ readonly accountNumber: bigint;
2475
+ };
2476
+ type StdSignature = {
2477
+ readonly pub_key: {
2478
+ readonly type: "tendermint/PubKeySecp256k1";
2479
+ readonly value: string;
2480
+ };
2481
+ readonly signature: string;
2482
+ };
2483
+ type DirectSignResponse = {
2484
+ readonly signed: DirectSignDoc;
2485
+ readonly signature: StdSignature;
2486
+ };
2487
+ type OfflineDirectSigner = {
2488
+ getAccounts(): Promise<readonly AccountData[]>;
2489
+ signDirect(address: string, signDoc: DirectSignDoc): Promise<DirectSignResponse>;
2490
+ };
2491
+ type HttpEndpoint = {
2492
+ readonly url: string;
2493
+ readonly headers?: Record<string, string>;
2494
+ };
2495
+ type SigningStargateClientOptions = {
2496
+ readonly registry?: CosmosRegistry;
2497
+ readonly broadcastTimeoutMs?: number;
2498
+ readonly broadcastPollIntervalMs?: number;
2499
+ };
2500
+ type Any = {
2501
+ readonly typeUrl: string;
2502
+ readonly value: Uint8Array;
2503
+ };
2504
+ type DeliverTxResponse = {
2505
+ readonly code: number;
2506
+ readonly height: number;
2507
+ readonly txIndex: number;
2508
+ readonly events: readonly TendermintEvent[];
2509
+ readonly rawLog: string;
2510
+ readonly transactionHash: string;
2511
+ readonly msgResponses: readonly Any[];
2512
+ readonly gasUsed: bigint;
2513
+ readonly gasWanted: bigint;
2514
+ };
2515
+ type IndexedTx = Omit<DeliverTxResponse, "transactionHash"> & {
2516
+ readonly hash: string;
2517
+ readonly tx: Uint8Array;
2518
+ };
2519
+ type TendermintEvent = {
2520
+ readonly type: string;
2521
+ readonly attributes: readonly {
2522
+ readonly key: string;
2523
+ readonly value: string;
2524
+ }[];
2525
+ };
2526
+ type TxRawValue = {
2527
+ readonly bodyBytes: Uint8Array;
2528
+ readonly authInfoBytes: Uint8Array;
2529
+ readonly signatures: readonly Uint8Array[];
2530
+ };
2531
+ type Account = {
2532
+ readonly accountNumber: number;
2533
+ readonly sequence: number;
2534
+ };
2535
+ declare class TimeoutError extends Error {
2536
+ readonly txId: string;
2537
+ constructor(message: string, txId: string);
2538
+ }
2539
+ declare class BroadcastTxError extends Error {
2540
+ readonly code: number;
2541
+ readonly codespace: string;
2542
+ readonly log: string;
2543
+ constructor(code: number, codespace: string, log: string);
2544
+ }
2545
+ declare function isDeliverTxFailure(result: Pick<DeliverTxResponse, "code">): boolean;
2546
+ declare function isDeliverTxSuccess(result: Pick<DeliverTxResponse, "code">): boolean;
2547
+ declare function assertIsDeliverTxSuccess(result: DeliverTxResponse): void;
2548
+ declare function assertIsDeliverTxFailure(result: DeliverTxResponse): void;
2549
+ declare class CosmosRegistry {
2550
+ #private;
2551
+ constructor(customTypes?: readonly (readonly [string, MessageCodec])[]);
2552
+ register(typeUrl: string, type: MessageCodec): void;
2553
+ lookupType(typeUrl: string): MessageCodec | undefined;
2554
+ encode(encodeObject: EncodeObject): Uint8Array;
2555
+ encodeAsAny(encodeObject: EncodeObject): Any;
2556
+ decode({ typeUrl, value }: Any): unknown;
2557
+ }
2558
+ declare const Registry: CosmosRegistry;
2559
+ declare class DirectSecp256k1Wallet implements OfflineDirectSigner {
2560
+ private readonly privkey;
2561
+ private readonly pubkey;
2562
+ private readonly prefix;
2563
+ static fromKey(privkey: Uint8Array, prefix?: string): Promise<DirectSecp256k1Wallet>;
2564
+ private constructor();
2565
+ get address(): string;
2566
+ getAccounts(): Promise<readonly AccountData[]>;
2567
+ signDirect(address: string, signDoc: DirectSignDoc): Promise<DirectSignResponse>;
2568
+ }
2569
+ declare class SigningStargateClient {
2570
+ #private;
2571
+ static connectWithSigner(endpoint: string | HttpEndpoint, signer: OfflineDirectSigner, options?: SigningStargateClientOptions): Promise<SigningStargateClient>;
2572
+ private constructor();
2573
+ disconnect(): void;
2574
+ getChainId(): Promise<string>;
2575
+ getSequence(address: string): Promise<Account>;
2576
+ signAndBroadcast(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee, memo?: string, timeoutHeight?: bigint | number | string): Promise<DeliverTxResponse>;
2577
+ sign(signerAddress: string, messages: readonly EncodeObject[], fee: StdFee, memo: string, explicitSignerData?: {
2578
+ readonly accountNumber: number;
2579
+ readonly sequence: number;
2580
+ readonly chainId: string;
2581
+ }, timeoutHeight?: bigint | number | string): Promise<TxRawValue>;
2582
+ broadcastTx(tx: Uint8Array, timeoutMs?: number, pollIntervalMs?: number): Promise<DeliverTxResponse>;
2583
+ broadcastTxSync(tx: Uint8Array): Promise<string>;
2584
+ getTx(id: string): Promise<IndexedTx | null>;
2585
+ }
2586
+ declare function createCosmosWallet(privateKey: string | Bytes): Promise<DirectSecp256k1Wallet>;
2587
+ declare function createCosmosClient(signer: OfflineDirectSigner, endpoint: string | HttpEndpoint, options?: SigningStargateClientOptions): Promise<SigningStargateClient>;
2588
+
2589
+ declare class OmniversalRFF {
2590
+ readonly protobufRFF: RequestForFunds;
2591
+ private evmRFF;
2592
+ constructor(protobufRFF: RequestForFunds);
2593
+ asEVMRFF(): EVMRFF;
2594
+ asProtobufRFF(): RequestForFunds;
2595
+ }
2596
+
2597
+ type BalanceOnChain = {
2598
+ chainID: OmniversalChainID;
2599
+ totalValue: Decimal;
2600
+ currencywise: {
2601
+ tokenAddress: Uint8Array;
2602
+ amount: Decimal;
2603
+ value: Decimal;
2604
+ }[];
2605
+ };
2606
+ declare function getBalances(vscURL: string, universe: Universe, address: Bytes): Promise<BalanceOnChain[]>;
2607
+
2608
+ export { type AccountData, AdminFeeRecipient, AggregateAggregatorsMode, type Aggregator, type Any, AutoSelectionError, type BalanceOnChain, BebopAggregator, type BebopCommonQuote, type BebopJAMv2Quote, type BebopPMMv3Quote, type BebopQuote, BroadcastTxError, type Bytes, type ChainDatum, ChainIDKeyedMap, Chaindata, ChaindataMap, type Coin, CosmosRegistry, Currency, CurrencyID, type DeepPartial$1 as DeepPartial, type DeliverTxResponse, DepositVEPacket, DirectSecp256k1Wallet, type DirectSignDoc, type DirectSignResponse, ERC20ABI, type EVMRFF, EVMVaultABI, type EVMVaultABIType, type EncodeObject, Environment, type Exact, FibrousAggregator, type FibrousAggregatorOptions, type FibrousQuote, type FibrousResponse, FibrousRouterABI, type FibrousToken, FillVEPacket, FixedFeeTuple, GrpcWebError, GrpcWebImpl, type Holding, type HoldingWithRecipient, type HoldingWithSwapAddresses, type HttpEndpoint, type IndexedTx, LiFiAggregator, type LiFiResponse, type MessageFns, MsgCreateProtocolFees, MsgCreateProtocolFeesResponse, MsgCreateRequestForFunds, MsgCreateRequestForFundsResponse, MsgCreateSolverData, MsgCreateSolverDataResponse, MsgDoubleCheckTx, MsgRefundReq, MsgRefundReqResponse, MsgUpdateProtocolFees, MsgUpdateProtocolFeesResponse, MsgUpdateSolverData, MsgUpdateSolverDataResponse, type OfflineDirectSigner, OmniversalChainID, OmniversalRFF, PageRequest, PageResponse, PerChainFeeBP, PermitCreationError, PermitVariant, PriceOracleData, PriceOracleDatum, ProtocolFees, type Query, QueryAllRequestForFundsRequest, QueryAllRequestForFundsResponse, QueryAllSettlementRequest, QueryAllSettlementResponse, QueryAllSolverDataRequest, QueryAllSolverDataResponse, QueryClientImpl, QueryGetPriceOracleDataRequest, QueryGetPriceOracleDataResponse, QueryGetProtocolFeesRequest, QueryGetProtocolFeesResponse, QueryGetRequestForFundsRequest, QueryGetRequestForFundsResponse, QueryGetSettlementRequest, QueryGetSettlementResponse, QueryGetSolverDataRequest, QueryGetSolverDataResponse, QueryRequestForFundsByAddressRequest, type Quote, type QuoteCandidate, type QuoteRequestExactInput, type QuoteRequestExactOutput, type QuoteResponse, QuoteSeriousness, QuoteType, RFFDestinationPair, RFFSourcePair, RFFSourceState, RPCURLMap, Registry, RequestForFunds, RouteFee, Settlement, SignatureDatum, SigningStargateClient, type SigningStargateClientOptions, SolverAddress, SolverData, type SourceWithValue, type StdFee, type StdSignature, type TendermintEvent, TimeoutError, Universe, YakAggregatorABI, aggregateAggregators, applyCappedSafetyMargin, assertIsDeliverTxFailure, assertIsDeliverTxSuccess, autoSelectSources, autoSelectSourcesV2, autoSelectSourcesV2ByRecipient, bytesEqual, convergeExactInQuote, convertBigIntToDecimal, convertDecimalToBigInt, createCosmosClient, createCosmosWallet, createGrpcWebImpl, decimalAmountForLog, destinationSwapWithExactIn, determineDestinationSwaps, encodeChainID36, ezPadTo32Hex, firstSuccessfulQuoteCandidate, getBalances, getDestinationExactInSwap, getDestinationExactOutSwap, getExactOutQuoteCandidate, getVaultContractMap, inputRawForOutputRaw, isDeliverTxFailure, isDeliverTxSuccess, liquidateInputHoldings, liquidateInputHoldingsByRecipient, liquidateSourceHoldings, maxByBigInt, minByBigInt, msgpackableAxios, protobufPackage, quoteAmountForLog, quoteCandidateForLog, quoteCandidateOrNull, rFFSourceStateFromJSON, rFFSourceStateToJSON, rawAmountForCurrencyValue, rawAmountForLog, selectSources, signPermitForAddressAndValue, universeFromJSON, universeToJSON, zeroExtendBufToGivenSize };