@tcswap/helpers 4.5.15

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 (139) hide show
  1. package/dist/api/index.cjs +4 -0
  2. package/dist/api/index.cjs.map +16 -0
  3. package/dist/api/index.js +4 -0
  4. package/dist/api/index.js.map +16 -0
  5. package/dist/chunk-pfmeq01a.js +5 -0
  6. package/dist/chunk-pfmeq01a.js.map +9 -0
  7. package/dist/chunk-vb4wtm2w.js +4 -0
  8. package/dist/chunk-vb4wtm2w.js.map +9 -0
  9. package/dist/contracts.cjs +4 -0
  10. package/dist/contracts.cjs.map +10 -0
  11. package/dist/contracts.js +4 -0
  12. package/dist/contracts.js.map +10 -0
  13. package/dist/index.cjs +7 -0
  14. package/dist/index.cjs.map +30 -0
  15. package/dist/index.js +7 -0
  16. package/dist/index.js.map +30 -0
  17. package/dist/tokens.cjs +4 -0
  18. package/dist/tokens.cjs.map +10 -0
  19. package/dist/tokens.js +4 -0
  20. package/dist/tokens.js.map +10 -0
  21. package/dist/types/api/index.d.ts +502 -0
  22. package/dist/types/api/index.d.ts.map +1 -0
  23. package/dist/types/api/memoless/endpoints.d.ts +56 -0
  24. package/dist/types/api/memoless/endpoints.d.ts.map +1 -0
  25. package/dist/types/api/memoless/types.d.ts +85 -0
  26. package/dist/types/api/memoless/types.d.ts.map +1 -0
  27. package/dist/types/api/midgard/endpoints.d.ts +80 -0
  28. package/dist/types/api/midgard/endpoints.d.ts.map +1 -0
  29. package/dist/types/api/midgard/types.d.ts +543 -0
  30. package/dist/types/api/midgard/types.d.ts.map +1 -0
  31. package/dist/types/api/thornode/endpoints.d.ts +34 -0
  32. package/dist/types/api/thornode/endpoints.d.ts.map +1 -0
  33. package/dist/types/api/thornode/types.d.ts +264 -0
  34. package/dist/types/api/thornode/types.d.ts.map +1 -0
  35. package/dist/types/api/uswap/endpoints.d.ts +372 -0
  36. package/dist/types/api/uswap/endpoints.d.ts.map +1 -0
  37. package/dist/types/api/uswap/types.d.ts +1487 -0
  38. package/dist/types/api/uswap/types.d.ts.map +1 -0
  39. package/dist/types/contracts.d.ts +2 -0
  40. package/dist/types/contracts.d.ts.map +1 -0
  41. package/dist/types/index.d.ts +32 -0
  42. package/dist/types/index.d.ts.map +1 -0
  43. package/dist/types/modules/assetValue.d.ts +82 -0
  44. package/dist/types/modules/assetValue.d.ts.map +1 -0
  45. package/dist/types/modules/bigIntArithmetics.d.ts +60 -0
  46. package/dist/types/modules/bigIntArithmetics.d.ts.map +1 -0
  47. package/dist/types/modules/feeMultiplier.d.ts +48 -0
  48. package/dist/types/modules/feeMultiplier.d.ts.map +1 -0
  49. package/dist/types/modules/requestClient.d.ts +33 -0
  50. package/dist/types/modules/requestClient.d.ts.map +1 -0
  51. package/dist/types/modules/uSwapConfig.d.ts +249 -0
  52. package/dist/types/modules/uSwapConfig.d.ts.map +1 -0
  53. package/dist/types/modules/uSwapError.d.ts +879 -0
  54. package/dist/types/modules/uSwapError.d.ts.map +1 -0
  55. package/dist/types/modules/uSwapNumber.d.ts +10 -0
  56. package/dist/types/modules/uSwapNumber.d.ts.map +1 -0
  57. package/dist/types/tokens.d.ts +2 -0
  58. package/dist/types/tokens.d.ts.map +1 -0
  59. package/dist/types/types/commonTypes.d.ts +16 -0
  60. package/dist/types/types/commonTypes.d.ts.map +1 -0
  61. package/dist/types/types/derivationPath.d.ts +4 -0
  62. package/dist/types/types/derivationPath.d.ts.map +1 -0
  63. package/dist/types/types/errors/apiV1.d.ts +2 -0
  64. package/dist/types/types/errors/apiV1.d.ts.map +1 -0
  65. package/dist/types/types/index.d.ts +6 -0
  66. package/dist/types/types/index.d.ts.map +1 -0
  67. package/dist/types/types/quotes.d.ts +180 -0
  68. package/dist/types/types/quotes.d.ts.map +1 -0
  69. package/dist/types/types/sdk.d.ts +35 -0
  70. package/dist/types/types/sdk.d.ts.map +1 -0
  71. package/dist/types/types/wallet.d.ts +130 -0
  72. package/dist/types/types/wallet.d.ts.map +1 -0
  73. package/dist/types/utils/asset.d.ts +37 -0
  74. package/dist/types/utils/asset.d.ts.map +1 -0
  75. package/dist/types/utils/chains.d.ts +13 -0
  76. package/dist/types/utils/chains.d.ts.map +1 -0
  77. package/dist/types/utils/derivationPath.d.ts +21 -0
  78. package/dist/types/utils/derivationPath.d.ts.map +1 -0
  79. package/dist/types/utils/explorerUrls.d.ts +10 -0
  80. package/dist/types/utils/explorerUrls.d.ts.map +1 -0
  81. package/dist/types/utils/liquidity.d.ts +62 -0
  82. package/dist/types/utils/liquidity.d.ts.map +1 -0
  83. package/dist/types/utils/memo.d.ts +65 -0
  84. package/dist/types/utils/memo.d.ts.map +1 -0
  85. package/dist/types/utils/others.d.ts +15 -0
  86. package/dist/types/utils/others.d.ts.map +1 -0
  87. package/dist/types/utils/validators.d.ts +6 -0
  88. package/dist/types/utils/validators.d.ts.map +1 -0
  89. package/dist/types/utils/wallets.d.ts +36 -0
  90. package/dist/types/utils/wallets.d.ts.map +1 -0
  91. package/package.json +67 -0
  92. package/src/api/index.ts +15 -0
  93. package/src/api/memoless/endpoints.ts +62 -0
  94. package/src/api/memoless/types.ts +83 -0
  95. package/src/api/midgard/endpoints.ts +352 -0
  96. package/src/api/midgard/types.ts +515 -0
  97. package/src/api/thornode/endpoints.ts +109 -0
  98. package/src/api/thornode/types.ts +247 -0
  99. package/src/api/uswap/endpoints.ts +252 -0
  100. package/src/api/uswap/types.ts +626 -0
  101. package/src/contracts.ts +1 -0
  102. package/src/index.ts +32 -0
  103. package/src/modules/__tests__/assetValue.test.ts +2452 -0
  104. package/src/modules/__tests__/bigIntArithmetics.test.ts +410 -0
  105. package/src/modules/__tests__/feeMultiplier.test.ts +131 -0
  106. package/src/modules/__tests__/uSwapConfig.test.ts +429 -0
  107. package/src/modules/__tests__/uSwapNumber.test.ts +439 -0
  108. package/src/modules/assetValue.ts +536 -0
  109. package/src/modules/bigIntArithmetics.ts +366 -0
  110. package/src/modules/feeMultiplier.ts +84 -0
  111. package/src/modules/requestClient.ts +116 -0
  112. package/src/modules/uSwapConfig.ts +189 -0
  113. package/src/modules/uSwapError.ts +474 -0
  114. package/src/modules/uSwapNumber.ts +17 -0
  115. package/src/tokens.ts +1 -0
  116. package/src/types/commonTypes.ts +10 -0
  117. package/src/types/derivationPath.ts +11 -0
  118. package/src/types/errors/apiV1.ts +0 -0
  119. package/src/types/index.ts +5 -0
  120. package/src/types/quotes.ts +182 -0
  121. package/src/types/sdk.ts +38 -0
  122. package/src/types/wallet.ts +124 -0
  123. package/src/utils/__tests__/asset.test.ts +186 -0
  124. package/src/utils/__tests__/derivationPath.test.ts +142 -0
  125. package/src/utils/__tests__/explorerUrls.test.ts +59 -0
  126. package/src/utils/__tests__/liquidity.test.ts +302 -0
  127. package/src/utils/__tests__/memo.test.ts +99 -0
  128. package/src/utils/__tests__/others.test.ts +169 -0
  129. package/src/utils/__tests__/validators.test.ts +84 -0
  130. package/src/utils/__tests__/wallets.test.ts +625 -0
  131. package/src/utils/asset.ts +399 -0
  132. package/src/utils/chains.ts +104 -0
  133. package/src/utils/derivationPath.ts +101 -0
  134. package/src/utils/explorerUrls.ts +32 -0
  135. package/src/utils/liquidity.ts +154 -0
  136. package/src/utils/memo.ts +102 -0
  137. package/src/utils/others.ts +64 -0
  138. package/src/utils/validators.ts +36 -0
  139. package/src/utils/wallets.ts +238 -0
@@ -0,0 +1,502 @@
1
+ /**
2
+ * Modifications © 2025 Horizontal Systems.
3
+ */
4
+ import * as thornode from "./thornode/endpoints";
5
+ export * from "./memoless/types";
6
+ export * from "./midgard/types";
7
+ export * from "./thornode/types";
8
+ export * from "./uswap/types";
9
+ export declare const USwapApi: {
10
+ mayachainMidgard: {
11
+ getActions: (query?: import(".").ActionQuery) => Promise<import(".").PagedResponse<import(".").Action>>;
12
+ getBalance: (address: string) => Promise<import(".").Balance[]>;
13
+ getConstants: () => Promise<import(".").Constants>;
14
+ getEarningsHistory: (query?: import(".").HistoryQuery) => Promise<import(".").EarningsHistory>;
15
+ getHealth: () => Promise<import(".").HealthInfo>;
16
+ getLiquidityPosition: (address: string) => Promise<{
17
+ [x: string]: string | import("..").AssetValue | import("..").USwapNumber;
18
+ asset: import("..").AssetValue;
19
+ assetPending: import("..").AssetValue;
20
+ assetRegisteredAddress: string;
21
+ assetWithdrawn: import("..").AssetValue;
22
+ dateFirstAdded: string;
23
+ dateLastAdded: string;
24
+ poolShare: import("..").USwapNumber;
25
+ }[]>;
26
+ getLiquidityPositionRaw: (address: string) => Promise<import(".").MemberDetailsMayachain>;
27
+ getMembers: (pool?: string) => Promise<string[]>;
28
+ getMimir: () => Promise<Record<string, string>>;
29
+ getMimirVotes: () => Promise<import(".").MimirVote[]>;
30
+ getNameDetails: (name: string) => Promise<import(".").THORNameDetails>;
31
+ getNamesByAddress: (address: string) => Promise<string[]>;
32
+ getNamesByOwner: (address: string) => Promise<string[]>;
33
+ getNetworkInfo: () => Promise<import(".").NetworkInfo>;
34
+ getNode: (address: string) => Promise<import(".").Node>;
35
+ getNodes: () => Promise<import(".").Node[]>;
36
+ getPool: (asset: string) => Promise<import(".").Pool>;
37
+ getPoolDepthHistory: (asset: string, query?: import(".").HistoryQuery) => Promise<import(".").DepthHistory>;
38
+ getPoolStats: (asset: string, period?: string) => Promise<import(".").PoolStats>;
39
+ getPools: (status?: string) => Promise<import(".").Pool[]>;
40
+ getSaverDetails: (address: string, pool?: string) => Promise<import(".").SaverDetails[]>;
41
+ getSavers: (pool: string) => Promise<string[]>;
42
+ getSaversHistory: (pool?: string, query?: import(".").HistoryQuery) => Promise<import(".").SaversHistory>;
43
+ getStats: () => Promise<import(".").Stats>;
44
+ getSwapHistory: (pool?: string, query?: import(".").HistoryQuery) => Promise<import(".").SwapHistory>;
45
+ getTVLHistory: (query?: import(".").HistoryQuery) => Promise<import(".").TVLHistory>;
46
+ };
47
+ thorchainMidgard: {
48
+ getActions: (query?: import(".").ActionQuery) => Promise<import(".").PagedResponse<import(".").Action>>;
49
+ getBalance: (address: string) => Promise<import(".").Balance[]>;
50
+ getConstants: () => Promise<import(".").Constants>;
51
+ getEarningsHistory: (query?: import(".").HistoryQuery) => Promise<import(".").EarningsHistory>;
52
+ getHealth: () => Promise<import(".").HealthInfo>;
53
+ getLiquidityPosition: (address: string) => Promise<{
54
+ [x: string]: string | import("..").AssetValue | import("..").USwapNumber;
55
+ asset: import("..").AssetValue;
56
+ assetPending: import("..").AssetValue;
57
+ assetRegisteredAddress: string;
58
+ assetWithdrawn: import("..").AssetValue;
59
+ dateFirstAdded: string;
60
+ dateLastAdded: string;
61
+ poolShare: import("..").USwapNumber;
62
+ }[]>;
63
+ getLiquidityPositionRaw: (address: string) => Promise<import(".").MemberDetailsThorchain>;
64
+ getMembers: (pool?: string) => Promise<string[]>;
65
+ getMimir: () => Promise<Record<string, string>>;
66
+ getMimirVotes: () => Promise<import(".").MimirVote[]>;
67
+ getNameDetails: (name: string) => Promise<import(".").THORNameDetails>;
68
+ getNamesByAddress: (address: string) => Promise<string[]>;
69
+ getNamesByOwner: (address: string) => Promise<string[]>;
70
+ getNetworkInfo: () => Promise<import(".").NetworkInfo>;
71
+ getNode: (address: string) => Promise<import(".").Node>;
72
+ getNodes: () => Promise<import(".").Node[]>;
73
+ getPool: (asset: string) => Promise<import(".").Pool>;
74
+ getPoolDepthHistory: (asset: string, query?: import(".").HistoryQuery) => Promise<import(".").DepthHistory>;
75
+ getPoolStats: (asset: string, period?: string) => Promise<import(".").PoolStats>;
76
+ getPools: (status?: string) => Promise<import(".").Pool[]>;
77
+ getSaverDetails: (address: string, pool?: string) => Promise<import(".").SaverDetails[]>;
78
+ getSavers: (pool: string) => Promise<string[]>;
79
+ getSaversHistory: (pool?: string, query?: import(".").HistoryQuery) => Promise<import(".").SaversHistory>;
80
+ getStats: () => Promise<import(".").Stats>;
81
+ getSwapHistory: (pool?: string, query?: import(".").HistoryQuery) => Promise<import(".").SwapHistory>;
82
+ getTVLHistory: (query?: import(".").HistoryQuery) => Promise<import(".").TVLHistory>;
83
+ };
84
+ thornode: typeof thornode;
85
+ getMemolessAssets(options?: import("..").RequestOptions): Promise<{
86
+ assets: {
87
+ asset: string;
88
+ balanceRune: number;
89
+ decimals: number;
90
+ isToken: boolean;
91
+ priceUSD: number;
92
+ status: string;
93
+ }[];
94
+ success: boolean;
95
+ error?: {
96
+ code: string;
97
+ details: string;
98
+ message: string;
99
+ } | undefined;
100
+ }>;
101
+ registerMemoless(json: import(".").RegistrationRequest, options?: import("..").RequestOptions): Promise<{
102
+ asset: string;
103
+ decimals: number;
104
+ height: string;
105
+ internal_api_id: string;
106
+ memo: string;
107
+ minimum_amount_to_send: string;
108
+ reference: string;
109
+ reference_length: number;
110
+ registered_by: string;
111
+ registration_hash: string;
112
+ success: boolean;
113
+ txHash: string;
114
+ suggested_in_asset_amount?: string | undefined;
115
+ }>;
116
+ preflightMemoless(json: import(".").PreflightRequest, options?: import("..").RequestOptions): Promise<{
117
+ data: {
118
+ blocks_remaining: number;
119
+ current_uses: number;
120
+ max_uses: number;
121
+ seconds_remaining: number;
122
+ time_remaining: string;
123
+ inbound_address?: string | undefined;
124
+ memo?: string | undefined;
125
+ qr_code?: string | undefined;
126
+ qr_code_data_url?: string | undefined;
127
+ };
128
+ message: string;
129
+ success: boolean;
130
+ error?: {
131
+ code: string;
132
+ message: string;
133
+ } | undefined;
134
+ }>;
135
+ getTrackerDetails(json: import(".").TrackingRequest, options?: import("..").RequestOptions): Promise<import(".").TransactionDTO>;
136
+ getSwapQuote(json: import(".").QuoteRequest, options?: import("..").RequestOptions): Promise<{
137
+ routes: {
138
+ buyAsset: string;
139
+ expectedBuyAmount: string;
140
+ fees: {
141
+ amount: string;
142
+ asset: string;
143
+ chain: string;
144
+ protocol: import("..").ProviderName;
145
+ type: import("..").FeeTypeEnum;
146
+ }[];
147
+ providers: import("..").ProviderName[];
148
+ sellAmount: string;
149
+ sellAsset: string;
150
+ destinationAddress?: string | undefined;
151
+ estimatedTime?: {
152
+ total: number;
153
+ inbound?: number | undefined;
154
+ outbound?: number | undefined;
155
+ swap?: number | undefined;
156
+ } | undefined;
157
+ expectedBuyAmountMaxSlippage?: string | undefined;
158
+ expiration?: string | undefined;
159
+ inboundAddress?: string | undefined;
160
+ legs?: {
161
+ buyAmount: string;
162
+ buyAmountMaxSlippage: string;
163
+ buyAsset: string;
164
+ provider: import("..").ProviderName;
165
+ sellAmount: string;
166
+ sellAsset: string;
167
+ fees?: {
168
+ amount: string;
169
+ asset: string;
170
+ chain: string;
171
+ protocol: import("..").ProviderName;
172
+ type: import("..").FeeTypeEnum;
173
+ }[] | undefined;
174
+ }[] | undefined;
175
+ memo?: string | undefined;
176
+ meta?: {
177
+ assets?: {
178
+ asset: string;
179
+ image: string;
180
+ price: number;
181
+ }[] | undefined;
182
+ maxStreamingQuantity?: number | undefined;
183
+ streamingInterval?: number | undefined;
184
+ tags?: import(".").PriorityLabel[] | undefined;
185
+ affiliate?: string | undefined;
186
+ affiliateFee?: string | undefined;
187
+ approvalAddress?: string | undefined;
188
+ chainflip?: {
189
+ destinationAddress: string;
190
+ buyAsset: {
191
+ asset: string;
192
+ chain: string;
193
+ };
194
+ sellAsset: {
195
+ asset: string;
196
+ chain: string;
197
+ };
198
+ affiliateFees?: {
199
+ brokerAddress: string;
200
+ feeBps: number;
201
+ }[] | undefined;
202
+ brokerCommissionBps?: number | undefined;
203
+ channelMetadata?: {
204
+ cfParameters?: string | undefined;
205
+ gasBudget?: string | undefined;
206
+ message?: string | undefined;
207
+ } | undefined;
208
+ dcaParameters?: {
209
+ chunkInterval?: number | undefined;
210
+ numberOfChunks?: number | undefined;
211
+ } | undefined;
212
+ maxBoostFeeBps?: number | undefined;
213
+ refundParameters?: {
214
+ minPrice?: string | undefined;
215
+ refundAddress?: string | undefined;
216
+ retryDuration?: number | undefined;
217
+ } | undefined;
218
+ } | undefined;
219
+ garden?: {
220
+ destinationAddress: string;
221
+ buyAsset: string;
222
+ sellAmount: string;
223
+ sellAsset: string;
224
+ slippage: number;
225
+ sourceAddress: string;
226
+ affiliateFees?: {
227
+ feeBps: number;
228
+ nearId: string;
229
+ } | undefined;
230
+ } | undefined;
231
+ near?: {
232
+ destinationAddress: string;
233
+ buyAsset: string;
234
+ sellAmount: string;
235
+ sellAsset: string;
236
+ slippage: number;
237
+ sourceAddress: string;
238
+ affiliateFees?: {
239
+ feeBps: number;
240
+ nearId: string;
241
+ } | undefined;
242
+ } | undefined;
243
+ priceImpact?: number | undefined;
244
+ referrer?: string | undefined;
245
+ txType?: import(".").RouteQuoteTxType | undefined;
246
+ } | undefined;
247
+ refundAddress?: string | undefined;
248
+ sourceAddress?: string | undefined;
249
+ targetAddress?: string | undefined;
250
+ tx?: string | {
251
+ data: string;
252
+ from: string;
253
+ to: string;
254
+ value: string;
255
+ } | {
256
+ accountNumber: number;
257
+ chainId: import("@tcswap/types").ChainId;
258
+ fee: {
259
+ amount: {
260
+ amount: string;
261
+ denom: string;
262
+ }[];
263
+ gas: string;
264
+ };
265
+ memo: string;
266
+ msgs: {
267
+ typeUrl: string;
268
+ value: unknown;
269
+ }[];
270
+ sequence: number;
271
+ } | undefined;
272
+ txType?: import(".").RouteQuoteTxType | undefined;
273
+ warnings?: {
274
+ code: import("..").WarningCodeEnum;
275
+ display: string;
276
+ tooltip?: string | undefined;
277
+ }[] | undefined;
278
+ }[];
279
+ error?: string | undefined;
280
+ providerErrors?: {
281
+ errorCode?: import("..").ErrorCode | undefined;
282
+ message?: string | undefined;
283
+ provider?: import("..").ProviderName | undefined;
284
+ }[] | undefined;
285
+ }>;
286
+ getRouteWithTx(json: {
287
+ routeId: string;
288
+ sourceAddress: string;
289
+ destinationAddress: string;
290
+ }): Promise<{
291
+ buyAsset: string;
292
+ expectedBuyAmount: string;
293
+ fees: {
294
+ amount: string;
295
+ asset: string;
296
+ chain: string;
297
+ protocol: import("..").ProviderName;
298
+ type: import("..").FeeTypeEnum;
299
+ }[];
300
+ providers: import("..").ProviderName[];
301
+ sellAmount: string;
302
+ sellAsset: string;
303
+ destinationAddress?: string | undefined;
304
+ estimatedTime?: {
305
+ total: number;
306
+ inbound?: number | undefined;
307
+ outbound?: number | undefined;
308
+ swap?: number | undefined;
309
+ } | undefined;
310
+ expectedBuyAmountMaxSlippage?: string | undefined;
311
+ expiration?: string | undefined;
312
+ inboundAddress?: string | undefined;
313
+ legs?: {
314
+ buyAmount: string;
315
+ buyAmountMaxSlippage: string;
316
+ buyAsset: string;
317
+ provider: import("..").ProviderName;
318
+ sellAmount: string;
319
+ sellAsset: string;
320
+ fees?: {
321
+ amount: string;
322
+ asset: string;
323
+ chain: string;
324
+ protocol: import("..").ProviderName;
325
+ type: import("..").FeeTypeEnum;
326
+ }[] | undefined;
327
+ }[] | undefined;
328
+ memo?: string | undefined;
329
+ meta?: {
330
+ assets?: {
331
+ asset: string;
332
+ image: string;
333
+ price: number;
334
+ }[] | undefined;
335
+ maxStreamingQuantity?: number | undefined;
336
+ streamingInterval?: number | undefined;
337
+ tags?: import(".").PriorityLabel[] | undefined;
338
+ affiliate?: string | undefined;
339
+ affiliateFee?: string | undefined;
340
+ approvalAddress?: string | undefined;
341
+ chainflip?: {
342
+ destinationAddress: string;
343
+ buyAsset: {
344
+ asset: string;
345
+ chain: string;
346
+ };
347
+ sellAsset: {
348
+ asset: string;
349
+ chain: string;
350
+ };
351
+ affiliateFees?: {
352
+ brokerAddress: string;
353
+ feeBps: number;
354
+ }[] | undefined;
355
+ brokerCommissionBps?: number | undefined;
356
+ channelMetadata?: {
357
+ cfParameters?: string | undefined;
358
+ gasBudget?: string | undefined;
359
+ message?: string | undefined;
360
+ } | undefined;
361
+ dcaParameters?: {
362
+ chunkInterval?: number | undefined;
363
+ numberOfChunks?: number | undefined;
364
+ } | undefined;
365
+ maxBoostFeeBps?: number | undefined;
366
+ refundParameters?: {
367
+ minPrice?: string | undefined;
368
+ refundAddress?: string | undefined;
369
+ retryDuration?: number | undefined;
370
+ } | undefined;
371
+ } | undefined;
372
+ garden?: {
373
+ destinationAddress: string;
374
+ buyAsset: string;
375
+ sellAmount: string;
376
+ sellAsset: string;
377
+ slippage: number;
378
+ sourceAddress: string;
379
+ affiliateFees?: {
380
+ feeBps: number;
381
+ nearId: string;
382
+ } | undefined;
383
+ } | undefined;
384
+ near?: {
385
+ destinationAddress: string;
386
+ buyAsset: string;
387
+ sellAmount: string;
388
+ sellAsset: string;
389
+ slippage: number;
390
+ sourceAddress: string;
391
+ affiliateFees?: {
392
+ feeBps: number;
393
+ nearId: string;
394
+ } | undefined;
395
+ } | undefined;
396
+ priceImpact?: number | undefined;
397
+ referrer?: string | undefined;
398
+ txType?: import(".").RouteQuoteTxType | undefined;
399
+ } | undefined;
400
+ refundAddress?: string | undefined;
401
+ sourceAddress?: string | undefined;
402
+ targetAddress?: string | undefined;
403
+ tx?: string | {
404
+ data: string;
405
+ from: string;
406
+ to: string;
407
+ value: string;
408
+ } | {
409
+ accountNumber: number;
410
+ chainId: import("@tcswap/types").ChainId;
411
+ fee: {
412
+ amount: {
413
+ amount: string;
414
+ denom: string;
415
+ }[];
416
+ gas: string;
417
+ };
418
+ memo: string;
419
+ msgs: {
420
+ typeUrl: string;
421
+ value: unknown;
422
+ }[];
423
+ sequence: number;
424
+ } | undefined;
425
+ txType?: import(".").RouteQuoteTxType | undefined;
426
+ warnings?: {
427
+ code: import("..").WarningCodeEnum;
428
+ display: string;
429
+ tooltip?: string | undefined;
430
+ }[] | undefined;
431
+ }>;
432
+ getChainBalance<T extends import("@tcswap/types").Chain>({ chain, address, scamFilter, }: {
433
+ chain: T;
434
+ address: string;
435
+ scamFilter?: boolean;
436
+ }): Promise<{
437
+ chain: import("@tcswap/types").Chain;
438
+ decimal: number;
439
+ identifier: string;
440
+ symbol: string;
441
+ ticker: string;
442
+ value: string;
443
+ }[]>;
444
+ getTokenListProviders(): Promise<import(".").TokenListProvidersResponse>;
445
+ getTokenList(provider: import("..").ProviderName): Promise<import(".").TokensResponseV2>;
446
+ getPrice(body: import(".").PriceRequest): Promise<{
447
+ cg?: {
448
+ id: string;
449
+ market_cap: number;
450
+ name: string;
451
+ price_change_24h_usd: number;
452
+ price_change_percentage_24h_usd: number;
453
+ sparkline_in_7d: number[];
454
+ timestamp: string;
455
+ total_volume: number;
456
+ } | undefined;
457
+ identifier?: string | undefined;
458
+ price_usd?: number | undefined;
459
+ provider?: string | undefined;
460
+ timestamp?: number | undefined;
461
+ }[]>;
462
+ getGasRate(): Promise<(import("zod/v4").ZodSafeParseSuccess<{
463
+ chainId: import("@tcswap/types").ChainId;
464
+ createdAt: Date;
465
+ id: number;
466
+ unit: string;
467
+ value: string;
468
+ } | {
469
+ chainId: import("@tcswap/types").ChainId;
470
+ createdAt: Date;
471
+ id: number;
472
+ unit: string;
473
+ value: string;
474
+ }[]> & any[]) | import("zod/v4").ZodSafeParseSuccess<{
475
+ chainId: import("@tcswap/types").ChainId;
476
+ createdAt: Date;
477
+ id: number;
478
+ unit: string;
479
+ value: string;
480
+ } | {
481
+ chainId: import("@tcswap/types").ChainId;
482
+ createdAt: Date;
483
+ id: number;
484
+ unit: string;
485
+ value: string;
486
+ }[]>[]>;
487
+ getChainflipDepositChannel(body: import(".").BrokerDepositChannelParams): Promise<{
488
+ channelId: string;
489
+ depositAddress: string;
490
+ }>;
491
+ getNearDepositChannel(body: import(".").NearDepositChannelParams): Promise<{
492
+ buyAsset: string;
493
+ buyAssetAmount: string;
494
+ buyAssetAmountMaxSlippage: string;
495
+ depositAddress: string;
496
+ depositAmount: string;
497
+ depositAsset: string;
498
+ tx: unknown;
499
+ deadline?: string | undefined;
500
+ }>;
501
+ };
502
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/api/index.ts"],"names":[],"mappings":"AAAA;;GAEG;AAIH,OAAO,KAAK,QAAQ,MAAM,sBAAsB,CAAC;AAGjD,cAAc,kBAAkB,CAAC;AACjC,cAAc,iBAAiB,CAAC;AAChC,cAAc,kBAAkB,CAAC;AACjC,cAAc,eAAe,CAAC;AAE9B,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;kBAC4jF,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CADn/E,CAAC"}
@@ -0,0 +1,56 @@
1
+ /**
2
+ * Modifications © 2025 Horizontal Systems.
3
+ */
4
+ import { type RequestOptions } from "@tcswap/helpers";
5
+ import { type PreflightRequest, type RegistrationRequest } from "./types";
6
+ export declare function getMemolessAssets(options?: RequestOptions): Promise<{
7
+ assets: {
8
+ asset: string;
9
+ balanceRune: number;
10
+ decimals: number;
11
+ isToken: boolean;
12
+ priceUSD: number;
13
+ status: string;
14
+ }[];
15
+ success: boolean;
16
+ error?: {
17
+ code: string;
18
+ details: string;
19
+ message: string;
20
+ } | undefined;
21
+ }>;
22
+ export declare function registerMemoless(json: RegistrationRequest, options?: RequestOptions): Promise<{
23
+ asset: string;
24
+ decimals: number;
25
+ height: string;
26
+ internal_api_id: string;
27
+ memo: string;
28
+ minimum_amount_to_send: string;
29
+ reference: string;
30
+ reference_length: number;
31
+ registered_by: string;
32
+ registration_hash: string;
33
+ success: boolean;
34
+ txHash: string;
35
+ suggested_in_asset_amount?: string | undefined;
36
+ }>;
37
+ export declare function preflightMemoless(json: PreflightRequest, options?: RequestOptions): Promise<{
38
+ data: {
39
+ blocks_remaining: number;
40
+ current_uses: number;
41
+ max_uses: number;
42
+ seconds_remaining: number;
43
+ time_remaining: string;
44
+ inbound_address?: string | undefined;
45
+ memo?: string | undefined;
46
+ qr_code?: string | undefined;
47
+ qr_code_data_url?: string | undefined;
48
+ };
49
+ message: string;
50
+ success: boolean;
51
+ error?: {
52
+ code: string;
53
+ message: string;
54
+ } | undefined;
55
+ }>;
56
+ //# sourceMappingURL=endpoints.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"endpoints.d.ts","sourceRoot":"","sources":["../../../../src/api/memoless/endpoints.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAiB,KAAK,cAAc,EAA2B,MAAM,iBAAiB,CAAC;AAC9F,OAAO,EAEL,KAAK,gBAAgB,EAGrB,KAAK,mBAAmB,EAGzB,MAAM,SAAS,CAAC;AASjB,wBAAgB,iBAAiB,CAAC,OAAO,CAAC,EAAE,cAAc;;;;;;;;;;;;;;;GAEzD;AAED,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,mBAAmB,EAAE,OAAO,CAAC,EAAE,cAAc;;;;;;;;;;;;;;GAczF;AAED,wBAAsB,iBAAiB,CAAC,IAAI,EAAE,gBAAgB,EAAE,OAAO,CAAC,EAAE,cAAc;;;;;;;;;;;;;;;;;;GAcvF"}
@@ -0,0 +1,85 @@
1
+ /**
2
+ * Modifications © 2025 Horizontal Systems.
3
+ */
4
+ import { coerce, z } from "zod/v4";
5
+ export declare const MemolessAssetItem: z.ZodObject<{
6
+ asset: z.ZodString;
7
+ balanceRune: z.ZodNumber;
8
+ decimals: coerce.ZodCoercedNumber<unknown>;
9
+ isToken: z.ZodBoolean;
10
+ priceUSD: z.ZodNumber;
11
+ status: z.ZodString;
12
+ }, z.core.$strip>;
13
+ export declare const MemolessAssetsSchema: z.ZodObject<{
14
+ assets: z.ZodArray<z.ZodObject<{
15
+ asset: z.ZodString;
16
+ balanceRune: z.ZodNumber;
17
+ decimals: coerce.ZodCoercedNumber<unknown>;
18
+ isToken: z.ZodBoolean;
19
+ priceUSD: z.ZodNumber;
20
+ status: z.ZodString;
21
+ }, z.core.$strip>>;
22
+ error: z.ZodOptional<z.ZodObject<{
23
+ code: z.ZodString;
24
+ details: z.ZodString;
25
+ message: z.ZodString;
26
+ }, z.core.$strip>>;
27
+ success: z.ZodBoolean;
28
+ }, z.core.$strip>;
29
+ export type MemolessAsset = z.infer<typeof MemolessAssetItem>;
30
+ export type MemolessAssetsResponse = z.infer<typeof MemolessAssetsSchema>;
31
+ export declare const RegistrationRequestSchema: z.ZodObject<{
32
+ asset: z.ZodString;
33
+ memo: z.ZodString;
34
+ requested_in_asset_amount: z.ZodUnion<[z.ZodOptional<z.ZodString>, z.ZodNumber]>;
35
+ }, z.core.$strip>;
36
+ export type RegistrationRequest = z.infer<typeof RegistrationRequestSchema>;
37
+ export declare const RegistrationResponseSchema: z.ZodObject<{
38
+ asset: z.ZodString;
39
+ decimals: z.ZodNumber;
40
+ height: z.ZodString;
41
+ internal_api_id: z.ZodString;
42
+ memo: z.ZodString;
43
+ minimum_amount_to_send: z.ZodString;
44
+ reference: z.ZodString;
45
+ reference_length: z.ZodNumber;
46
+ registered_by: z.ZodString;
47
+ registration_hash: z.ZodString;
48
+ success: z.ZodBoolean;
49
+ suggested_in_asset_amount: z.ZodOptional<z.ZodString>;
50
+ txHash: z.ZodString;
51
+ }, z.core.$strip>;
52
+ export type RegistrationResponse = z.infer<typeof RegistrationResponseSchema>;
53
+ export declare enum PreflightInputType {
54
+ asset = "asset",
55
+ usd = "usd"
56
+ }
57
+ export declare const PreflightRequestSchema: z.ZodObject<{
58
+ amount: z.ZodString;
59
+ asset: z.ZodOptional<z.ZodString>;
60
+ inputType: z.ZodOptional<z.ZodEnum<typeof PreflightInputType>>;
61
+ internal_api_id: z.ZodOptional<z.ZodString>;
62
+ reference: z.ZodOptional<z.ZodString>;
63
+ }, z.core.$strip>;
64
+ export type PreflightRequest = z.infer<typeof PreflightRequestSchema>;
65
+ export declare const PreflightResultSchema: z.ZodObject<{
66
+ data: z.ZodObject<{
67
+ blocks_remaining: z.ZodNumber;
68
+ current_uses: z.ZodNumber;
69
+ inbound_address: z.ZodOptional<z.ZodString>;
70
+ max_uses: z.ZodNumber;
71
+ memo: z.ZodOptional<z.ZodString>;
72
+ qr_code: z.ZodOptional<z.ZodString>;
73
+ qr_code_data_url: z.ZodOptional<z.ZodString>;
74
+ seconds_remaining: z.ZodNumber;
75
+ time_remaining: z.ZodString;
76
+ }, z.core.$strip>;
77
+ error: z.ZodOptional<z.ZodObject<{
78
+ code: z.ZodString;
79
+ message: z.ZodString;
80
+ }, z.core.$strip>>;
81
+ message: z.ZodString;
82
+ success: z.ZodBoolean;
83
+ }, z.core.$strip>;
84
+ export type PreflightResult = z.infer<typeof PreflightResultSchema>;
85
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../src/api/memoless/types.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,OAAO,EAAS,MAAM,EAAoB,CAAC,EAAE,MAAM,QAAQ,CAAC;AAE5D,eAAO,MAAM,iBAAiB;;;;;;;iBAO5B,CAAC;AAEH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;iBAI/B,CAAC;AAEH,MAAM,MAAM,aAAa,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,iBAAiB,CAAC,CAAC;AAC9D,MAAM,MAAM,sBAAsB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,oBAAoB,CAAC,CAAC;AAE1E,eAAO,MAAM,yBAAyB;;;;iBAIpC,CAAC;AAEH,MAAM,MAAM,mBAAmB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,yBAAyB,CAAC,CAAC;AAE5E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;iBAcrC,CAAC;AAEH,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,0BAA0B,CAAC,CAAC;AAE9E,oBAAY,kBAAkB;IAC5B,KAAK,UAAU;IACf,GAAG,QAAQ;CACZ;AAED,eAAO,MAAM,sBAAsB;;;;;;iBAMjC,CAAC;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,sBAAsB,CAAC,CAAC;AAEtE,eAAO,MAAM,qBAAqB;;;;;;;;;;;;;;;;;;iBAehC,CAAC;AAEH,MAAM,MAAM,eAAe,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,qBAAqB,CAAC,CAAC"}