@continuumdao/ctm-mpc-defi 0.2.49 → 0.2.50

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.
@@ -0,0 +1,1254 @@
1
+ import { Address, Hex } from 'viem';
2
+
3
+ /** Aligns with app NonEvmChainType + 'evm'. Extend as mpc-auth adds chains. */
4
+ type ChainCategory = 'evm' | 'solana' | 'near' | 'sui' | 'ton' | 'stellar';
5
+ type EvmTokenKind = 'native' | 'erc20' | 'erc721' | 'ctmerc20' | 'ctmrwa1';
6
+ type SolanaTokenKind = 'native' | 'spl' | 'spl2022';
7
+ type NearTokenKind = 'native' | 'nep141';
8
+ type TokenRef = {
9
+ category: 'evm';
10
+ kind: EvmTokenKind;
11
+ address: `0x${string}`;
12
+ } | {
13
+ category: 'solana';
14
+ kind: SolanaTokenKind;
15
+ mint: string;
16
+ } | {
17
+ category: 'near';
18
+ kind: NearTokenKind;
19
+ contractId: string;
20
+ };
21
+ type ParamDoc = {
22
+ type: string;
23
+ required: boolean;
24
+ description: string;
25
+ };
26
+ type ProtocolActionDescriptor = {
27
+ id: string;
28
+ protocolId: string;
29
+ chainCategory: ChainCategory;
30
+ description: string;
31
+ commonParams: Array<'keyGen' | 'purposeText' | 'useCustomGas' | 'useCustomFees'>;
32
+ params: Record<string, ParamDoc>;
33
+ };
34
+ type ChainSupportContext = {
35
+ chainCategory: ChainCategory;
36
+ chainId: string | number;
37
+ };
38
+ interface ProtocolModule {
39
+ id: string;
40
+ chainCategory: ChainCategory;
41
+ isChainSupported(ctx: ChainSupportContext): boolean | Promise<boolean>;
42
+ isTokenSupported(token: TokenRef): boolean | Promise<boolean>;
43
+ actions: ProtocolActionDescriptor[];
44
+ }
45
+ type KeyGenSubset = {
46
+ pubkeyhex?: string;
47
+ keylist?: string[];
48
+ ClientKeys?: Record<string, string>;
49
+ groupId?: string;
50
+ GroupId?: string;
51
+ };
52
+ /** App-compatible alias used by multisign builders and Permit2 helpers. */
53
+ type KeyGenSubsetForPermit = KeyGenSubset;
54
+
55
+ declare const TRUEO_PROTOCOL_ID = "trueo";
56
+ declare const PREDICTION_MARKETS_PROTOCOL_ID = "prediction-markets";
57
+ declare const TRUEO_BASE_CHAIN_ID = 8453;
58
+ declare const TRUEO_CHAIN_IDS: readonly [8453];
59
+ declare const TRUEO_NETWORK: "base-mainnet";
60
+ /** Public JSON API (CORS `*`). The marketing site at trueo.com does not serve these routes. */
61
+ declare const TRUEO_API_ORIGIN = "https://api.trueo.com";
62
+ declare const TRUEO_MARKET_API_PREFIX = "/market";
63
+ declare function trueoMarketApiPath(suffix: string): string;
64
+ declare const TRUEO_TYD: `0x${string}`;
65
+ declare const TRUEO_TRUE: `0x${string}`;
66
+ declare const TRUEO_USDC: `0x${string}`;
67
+ declare const TRUEO_TRUTH_MARKET_MANAGER: `0x${string}`;
68
+ declare const TRUEO_ORDER_MANAGER: `0x${string}`;
69
+ declare const TRUEO_UNIVERSAL_ROUTER_ADAPTER: `0x${string}`;
70
+ declare const TRUEO_TRUTH_MARKET_ADAPTER: `0x${string}`;
71
+ declare const TRUEO_V4_HOOK: `0x${string}`;
72
+ declare const TRUEO_PERMIT2: `0x${string}`;
73
+ declare const TRUEO_TYD_DECIMALS = 6;
74
+ declare const TRUEO_OUTCOME_TOKEN_DECIMALS = 18;
75
+ declare const TRUEO_BET_CLOSE_BUFFER_SECONDS: number;
76
+ declare const TRUEO_PERMIT2_APPROVAL_SECONDS: number;
77
+ declare const TRUEO_BET_ACTIONS: readonly ["swap", "createOrder"];
78
+ type TrueoBetAction = (typeof TRUEO_BET_ACTIONS)[number];
79
+ declare function isTrueoChainSupported(chainId: number): boolean;
80
+ declare function assertTrueoChainId(chainId: number): void;
81
+ declare function isTrueoCoreToken(address: string): boolean;
82
+ declare function normalizeTrueoAddress(address: string): Address;
83
+
84
+ declare const trueoErc20Abi: readonly [{
85
+ readonly name: "allowance";
86
+ readonly type: "function";
87
+ readonly stateMutability: "view";
88
+ readonly inputs: readonly [{
89
+ readonly type: "address";
90
+ readonly name: "owner";
91
+ }, {
92
+ readonly type: "address";
93
+ readonly name: "spender";
94
+ }];
95
+ readonly outputs: readonly [{
96
+ readonly type: "uint256";
97
+ }];
98
+ }, {
99
+ readonly name: "approve";
100
+ readonly type: "function";
101
+ readonly stateMutability: "nonpayable";
102
+ readonly inputs: readonly [{
103
+ readonly type: "address";
104
+ readonly name: "spender";
105
+ }, {
106
+ readonly type: "uint256";
107
+ readonly name: "amount";
108
+ }];
109
+ readonly outputs: readonly [{
110
+ readonly type: "bool";
111
+ }];
112
+ }, {
113
+ readonly name: "balanceOf";
114
+ readonly type: "function";
115
+ readonly stateMutability: "view";
116
+ readonly inputs: readonly [{
117
+ readonly type: "address";
118
+ readonly name: "account";
119
+ }];
120
+ readonly outputs: readonly [{
121
+ readonly type: "uint256";
122
+ }];
123
+ }, {
124
+ readonly name: "decimals";
125
+ readonly type: "function";
126
+ readonly stateMutability: "view";
127
+ readonly inputs: readonly [];
128
+ readonly outputs: readonly [{
129
+ readonly type: "uint8";
130
+ }];
131
+ }, {
132
+ readonly name: "symbol";
133
+ readonly type: "function";
134
+ readonly stateMutability: "view";
135
+ readonly inputs: readonly [];
136
+ readonly outputs: readonly [{
137
+ readonly type: "string";
138
+ }];
139
+ }];
140
+ declare const trueoMarketAbi: readonly [{
141
+ readonly name: "mint";
142
+ readonly type: "function";
143
+ readonly stateMutability: "nonpayable";
144
+ readonly inputs: readonly [{
145
+ readonly type: "uint256";
146
+ readonly name: "paymentTokenAmount";
147
+ }];
148
+ readonly outputs: readonly [];
149
+ }, {
150
+ readonly name: "burn";
151
+ readonly type: "function";
152
+ readonly stateMutability: "nonpayable";
153
+ readonly inputs: readonly [{
154
+ readonly type: "uint256";
155
+ readonly name: "amount";
156
+ }];
157
+ readonly outputs: readonly [];
158
+ }, {
159
+ readonly name: "redeem";
160
+ readonly type: "function";
161
+ readonly stateMutability: "nonpayable";
162
+ readonly inputs: readonly [{
163
+ readonly type: "uint256";
164
+ readonly name: "amount";
165
+ }];
166
+ readonly outputs: readonly [];
167
+ }, {
168
+ readonly name: "paymentToken";
169
+ readonly type: "function";
170
+ readonly stateMutability: "view";
171
+ readonly inputs: readonly [];
172
+ readonly outputs: readonly [{
173
+ readonly type: "address";
174
+ }];
175
+ }, {
176
+ readonly name: "yesToken";
177
+ readonly type: "function";
178
+ readonly stateMutability: "view";
179
+ readonly inputs: readonly [];
180
+ readonly outputs: readonly [{
181
+ readonly type: "address";
182
+ }];
183
+ }, {
184
+ readonly name: "noToken";
185
+ readonly type: "function";
186
+ readonly stateMutability: "view";
187
+ readonly inputs: readonly [];
188
+ readonly outputs: readonly [{
189
+ readonly type: "address";
190
+ }];
191
+ }, {
192
+ readonly name: "getCurrentStatus";
193
+ readonly type: "function";
194
+ readonly stateMutability: "view";
195
+ readonly inputs: readonly [];
196
+ readonly outputs: readonly [{
197
+ readonly type: "uint8";
198
+ }];
199
+ }, {
200
+ readonly name: "winningPosition";
201
+ readonly type: "function";
202
+ readonly stateMutability: "view";
203
+ readonly inputs: readonly [];
204
+ readonly outputs: readonly [{
205
+ readonly type: "uint256";
206
+ }];
207
+ }, {
208
+ readonly name: "paused";
209
+ readonly type: "function";
210
+ readonly stateMutability: "view";
211
+ readonly inputs: readonly [];
212
+ readonly outputs: readonly [{
213
+ readonly type: "bool";
214
+ }];
215
+ }];
216
+ declare const trueoMarketV2Abi: readonly [{
217
+ readonly name: "getPoolKeys";
218
+ readonly type: "function";
219
+ readonly stateMutability: "view";
220
+ readonly inputs: readonly [];
221
+ readonly outputs: readonly [{
222
+ readonly type: "tuple";
223
+ readonly components: readonly [{
224
+ readonly type: "address";
225
+ readonly name: "currency0";
226
+ }, {
227
+ readonly type: "address";
228
+ readonly name: "currency1";
229
+ }, {
230
+ readonly type: "uint24";
231
+ readonly name: "fee";
232
+ }, {
233
+ readonly type: "int24";
234
+ readonly name: "tickSpacing";
235
+ }, {
236
+ readonly type: "address";
237
+ readonly name: "hooks";
238
+ }];
239
+ readonly name: "yesPoolKey";
240
+ }, {
241
+ readonly type: "tuple";
242
+ readonly components: readonly [{
243
+ readonly type: "address";
244
+ readonly name: "currency0";
245
+ }, {
246
+ readonly type: "address";
247
+ readonly name: "currency1";
248
+ }, {
249
+ readonly type: "uint24";
250
+ readonly name: "fee";
251
+ }, {
252
+ readonly type: "int24";
253
+ readonly name: "tickSpacing";
254
+ }, {
255
+ readonly type: "address";
256
+ readonly name: "hooks";
257
+ }];
258
+ readonly name: "noPoolKey";
259
+ }];
260
+ }, {
261
+ readonly name: "getPoolIds";
262
+ readonly type: "function";
263
+ readonly stateMutability: "view";
264
+ readonly inputs: readonly [];
265
+ readonly outputs: readonly [{
266
+ readonly type: "bytes32";
267
+ readonly name: "yesPoolId";
268
+ }, {
269
+ readonly type: "bytes32";
270
+ readonly name: "noPoolId";
271
+ }];
272
+ }];
273
+ declare const trueoAdapterMintAbi: readonly [{
274
+ readonly name: "mint";
275
+ readonly type: "function";
276
+ readonly stateMutability: "nonpayable";
277
+ readonly inputs: readonly [{
278
+ readonly type: "address";
279
+ readonly name: "truthMarket";
280
+ }, {
281
+ readonly type: "uint256";
282
+ readonly name: "assetAmount";
283
+ }];
284
+ readonly outputs: readonly [];
285
+ }, {
286
+ readonly name: "burn";
287
+ readonly type: "function";
288
+ readonly stateMutability: "nonpayable";
289
+ readonly inputs: readonly [{
290
+ readonly type: "address";
291
+ readonly name: "truthMarket";
292
+ }, {
293
+ readonly type: "uint256";
294
+ readonly name: "amount";
295
+ }];
296
+ readonly outputs: readonly [];
297
+ }, {
298
+ readonly name: "redeem";
299
+ readonly type: "function";
300
+ readonly stateMutability: "nonpayable";
301
+ readonly inputs: readonly [{
302
+ readonly type: "address";
303
+ readonly name: "truthMarket";
304
+ }, {
305
+ readonly type: "uint256";
306
+ readonly name: "amount";
307
+ }];
308
+ readonly outputs: readonly [];
309
+ }];
310
+ /** Yearn ERC-4626 TYD vault (USDC in, TYD shares out). */
311
+ declare const trueoTydVaultAbi: readonly [{
312
+ readonly name: "asset";
313
+ readonly type: "function";
314
+ readonly stateMutability: "view";
315
+ readonly inputs: readonly [];
316
+ readonly outputs: readonly [{
317
+ readonly type: "address";
318
+ }];
319
+ }, {
320
+ readonly name: "deposit";
321
+ readonly type: "function";
322
+ readonly stateMutability: "nonpayable";
323
+ readonly inputs: readonly [{
324
+ readonly type: "uint256";
325
+ readonly name: "assets";
326
+ }, {
327
+ readonly type: "address";
328
+ readonly name: "receiver";
329
+ }];
330
+ readonly outputs: readonly [{
331
+ readonly type: "uint256";
332
+ readonly name: "shares";
333
+ }];
334
+ }, {
335
+ readonly name: "redeem";
336
+ readonly type: "function";
337
+ readonly stateMutability: "nonpayable";
338
+ readonly inputs: readonly [{
339
+ readonly type: "uint256";
340
+ readonly name: "shares";
341
+ }, {
342
+ readonly type: "address";
343
+ readonly name: "receiver";
344
+ }, {
345
+ readonly type: "address";
346
+ readonly name: "owner";
347
+ }];
348
+ readonly outputs: readonly [{
349
+ readonly type: "uint256";
350
+ readonly name: "assets";
351
+ }];
352
+ }];
353
+ declare const trueoUniversalRouterAdapterAbi: readonly [{
354
+ readonly name: "execute";
355
+ readonly type: "function";
356
+ readonly stateMutability: "payable";
357
+ readonly inputs: readonly [{
358
+ readonly type: "bytes";
359
+ readonly name: "commands";
360
+ }, {
361
+ readonly type: "bytes[]";
362
+ readonly name: "inputs";
363
+ }, {
364
+ readonly type: "uint256";
365
+ readonly name: "deadline";
366
+ }];
367
+ readonly outputs: readonly [];
368
+ }];
369
+ declare const trueoPermit2ApproveAbi: readonly [{
370
+ readonly name: "approve";
371
+ readonly type: "function";
372
+ readonly stateMutability: "nonpayable";
373
+ readonly inputs: readonly [{
374
+ readonly type: "address";
375
+ readonly name: "token";
376
+ }, {
377
+ readonly type: "address";
378
+ readonly name: "spender";
379
+ }, {
380
+ readonly type: "uint160";
381
+ readonly name: "amount";
382
+ }, {
383
+ readonly type: "uint48";
384
+ readonly name: "expiration";
385
+ }];
386
+ readonly outputs: readonly [];
387
+ }, {
388
+ readonly name: "allowance";
389
+ readonly type: "function";
390
+ readonly stateMutability: "view";
391
+ readonly inputs: readonly [{
392
+ readonly type: "address";
393
+ readonly name: "owner";
394
+ }, {
395
+ readonly type: "address";
396
+ readonly name: "token";
397
+ }, {
398
+ readonly type: "address";
399
+ readonly name: "spender";
400
+ }];
401
+ readonly outputs: readonly [{
402
+ readonly type: "uint160";
403
+ readonly name: "amount";
404
+ }, {
405
+ readonly type: "uint48";
406
+ readonly name: "expiration";
407
+ }, {
408
+ readonly type: "uint48";
409
+ readonly name: "nonce";
410
+ }];
411
+ }];
412
+ declare const trueoOrderManagerAbi: readonly [{
413
+ readonly name: "createOrder";
414
+ readonly type: "function";
415
+ readonly stateMutability: "nonpayable";
416
+ readonly inputs: readonly [{
417
+ readonly type: "tuple";
418
+ readonly components: readonly [{
419
+ readonly type: "address";
420
+ readonly name: "currency0";
421
+ }, {
422
+ readonly type: "address";
423
+ readonly name: "currency1";
424
+ }, {
425
+ readonly type: "uint24";
426
+ readonly name: "fee";
427
+ }, {
428
+ readonly type: "int24";
429
+ readonly name: "tickSpacing";
430
+ }, {
431
+ readonly type: "address";
432
+ readonly name: "hooks";
433
+ }];
434
+ readonly name: "poolKey";
435
+ }, {
436
+ readonly type: "uint128";
437
+ readonly name: "amountIn";
438
+ }, {
439
+ readonly type: "int24";
440
+ readonly name: "tickLower";
441
+ }, {
442
+ readonly type: "int24";
443
+ readonly name: "tickUpper";
444
+ }, {
445
+ readonly type: "bool";
446
+ readonly name: "zeroForOne";
447
+ }, {
448
+ readonly type: "bool";
449
+ readonly name: "enablePartialFill";
450
+ }];
451
+ readonly outputs: readonly [{
452
+ readonly type: "uint32";
453
+ readonly name: "orderId";
454
+ }];
455
+ }, {
456
+ readonly name: "cancelOrder";
457
+ readonly type: "function";
458
+ readonly stateMutability: "nonpayable";
459
+ readonly inputs: readonly [{
460
+ readonly type: "tuple";
461
+ readonly components: readonly [{
462
+ readonly type: "address";
463
+ readonly name: "currency0";
464
+ }, {
465
+ readonly type: "address";
466
+ readonly name: "currency1";
467
+ }, {
468
+ readonly type: "uint24";
469
+ readonly name: "fee";
470
+ }, {
471
+ readonly type: "int24";
472
+ readonly name: "tickSpacing";
473
+ }, {
474
+ readonly type: "address";
475
+ readonly name: "hooks";
476
+ }];
477
+ readonly name: "poolKey";
478
+ }, {
479
+ readonly type: "uint32";
480
+ readonly name: "orderId";
481
+ }, {
482
+ readonly type: "uint128";
483
+ readonly name: "amount0Min";
484
+ }, {
485
+ readonly type: "uint128";
486
+ readonly name: "amount1Min";
487
+ }];
488
+ readonly outputs: readonly [];
489
+ }, {
490
+ readonly name: "pendingOrder";
491
+ readonly type: "function";
492
+ readonly stateMutability: "view";
493
+ readonly inputs: readonly [{
494
+ readonly type: "bytes32";
495
+ readonly name: "poolId";
496
+ }, {
497
+ readonly type: "uint32";
498
+ readonly name: "orderId";
499
+ }];
500
+ readonly outputs: readonly [{
501
+ readonly type: "address";
502
+ readonly name: "owner";
503
+ }, {
504
+ readonly type: "bool";
505
+ readonly name: "zeroForOne";
506
+ }, {
507
+ readonly type: "int24";
508
+ readonly name: "tickLower";
509
+ }, {
510
+ readonly type: "int24";
511
+ readonly name: "tickUpper";
512
+ }, {
513
+ readonly type: "uint256";
514
+ readonly name: "liquidity";
515
+ }, {
516
+ readonly type: "bool";
517
+ readonly name: "enablePartialFill";
518
+ }];
519
+ }];
520
+ /** Alternate createOrder struct encoding used by IOrderManager.CreateOrderParams. */
521
+ declare const trueoOrderManagerStructAbi: readonly [{
522
+ readonly name: "createOrder";
523
+ readonly type: "function";
524
+ readonly stateMutability: "nonpayable";
525
+ readonly inputs: readonly [{
526
+ readonly type: "tuple";
527
+ readonly components: readonly [{
528
+ readonly type: "tuple";
529
+ readonly components: readonly [{
530
+ readonly type: "address";
531
+ readonly name: "currency0";
532
+ }, {
533
+ readonly type: "address";
534
+ readonly name: "currency1";
535
+ }, {
536
+ readonly type: "uint24";
537
+ readonly name: "fee";
538
+ }, {
539
+ readonly type: "int24";
540
+ readonly name: "tickSpacing";
541
+ }, {
542
+ readonly type: "address";
543
+ readonly name: "hooks";
544
+ }];
545
+ readonly name: "poolKey";
546
+ }, {
547
+ readonly type: "uint128";
548
+ readonly name: "amountIn";
549
+ }, {
550
+ readonly type: "int24";
551
+ readonly name: "tickLower";
552
+ }, {
553
+ readonly type: "int24";
554
+ readonly name: "tickUpper";
555
+ }, {
556
+ readonly type: "bool";
557
+ readonly name: "zeroForOne";
558
+ }, {
559
+ readonly type: "bool";
560
+ readonly name: "enablePartialFill";
561
+ }];
562
+ readonly name: "params";
563
+ }];
564
+ readonly outputs: readonly [{
565
+ readonly type: "uint32";
566
+ readonly name: "orderId";
567
+ }];
568
+ }, {
569
+ readonly name: "cancelOrder";
570
+ readonly type: "function";
571
+ readonly stateMutability: "nonpayable";
572
+ readonly inputs: readonly [{
573
+ readonly type: "tuple";
574
+ readonly components: readonly [{
575
+ readonly type: "tuple";
576
+ readonly components: readonly [{
577
+ readonly type: "address";
578
+ readonly name: "currency0";
579
+ }, {
580
+ readonly type: "address";
581
+ readonly name: "currency1";
582
+ }, {
583
+ readonly type: "uint24";
584
+ readonly name: "fee";
585
+ }, {
586
+ readonly type: "int24";
587
+ readonly name: "tickSpacing";
588
+ }, {
589
+ readonly type: "address";
590
+ readonly name: "hooks";
591
+ }];
592
+ readonly name: "poolKey";
593
+ }, {
594
+ readonly type: "uint32";
595
+ readonly name: "orderId";
596
+ }, {
597
+ readonly type: "uint128";
598
+ readonly name: "amount0Min";
599
+ }, {
600
+ readonly type: "uint128";
601
+ readonly name: "amount1Min";
602
+ }];
603
+ readonly name: "params";
604
+ }];
605
+ readonly outputs: readonly [];
606
+ }];
607
+
608
+ /** Uniswap Universal Router command: V4_SWAP */
609
+ declare const UR_COMMAND_V4_SWAP = 16;
610
+ /** Uniswap V4 Actions */
611
+ declare const V4_ACTION_SWAP_EXACT_IN_SINGLE = 6;
612
+ declare const V4_ACTION_SETTLE = 11;
613
+ declare const V4_ACTION_TAKE = 12;
614
+ type TrueoPoolKey = {
615
+ currency0: Address;
616
+ currency1: Address;
617
+ fee: number;
618
+ tickSpacing: number;
619
+ hooks: Address;
620
+ };
621
+ declare function encodeErc20Approve(spender: Address, amount: bigint): Hex;
622
+ declare function encodePermit2Approve(args: {
623
+ token: Address;
624
+ spender: Address;
625
+ amount: bigint;
626
+ expiration: number;
627
+ }): Hex;
628
+ declare function encodeTrueoTydDeposit(assets: bigint, receiver: Address): Hex;
629
+ declare function encodeTrueoTydRedeem(shares: bigint, receiver: Address, owner: Address): Hex;
630
+ declare function encodeTrueoMint(paymentTokenAmount: bigint): Hex;
631
+ declare function encodeTrueoBurn(amount: bigint): Hex;
632
+ declare function encodeTrueoRedeem(amount: bigint): Hex;
633
+ declare function encodeTrueoAdapterMint(market: Address, assetAmount: bigint): Hex;
634
+ declare function encodeTrueoAdapterBurn(market: Address, amount: bigint): Hex;
635
+ declare function encodeTrueoAdapterRedeem(market: Address, amount: bigint): Hex;
636
+ declare function encodeTrueoV4ExactInInput(args: {
637
+ poolKey: TrueoPoolKey;
638
+ zeroForOne: boolean;
639
+ amountIn: bigint;
640
+ amountOutMinimum: bigint;
641
+ recipient: Address;
642
+ }): Hex;
643
+ declare function encodeTrueoUniversalRouterExecute(args: {
644
+ commands: Hex;
645
+ inputs: readonly Hex[];
646
+ deadline: bigint;
647
+ }): Hex;
648
+ declare function encodeTrueoV4ExactInSwap(args: {
649
+ poolKey: TrueoPoolKey;
650
+ zeroForOne: boolean;
651
+ amountIn: bigint;
652
+ amountOutMinimum: bigint;
653
+ recipient: Address;
654
+ deadline: bigint;
655
+ }): {
656
+ commands: Hex;
657
+ inputs: Hex[];
658
+ deadline: bigint;
659
+ data: Hex;
660
+ to: Address;
661
+ };
662
+ declare function encodeTrueoCreateOrder(args: {
663
+ poolKey: TrueoPoolKey;
664
+ amountIn: bigint;
665
+ tickLower: number;
666
+ tickUpper: number;
667
+ zeroForOne: boolean;
668
+ enablePartialFill: boolean;
669
+ }): Hex;
670
+ declare function encodeTrueoCancelOrder(args: {
671
+ poolKey: TrueoPoolKey;
672
+ orderId: number;
673
+ amount0Min?: bigint;
674
+ amount1Min?: bigint;
675
+ }): Hex;
676
+ declare function trueoPermit2Expiration(nowSec?: number): number;
677
+ declare function trueoSwapDeadline(nowSec?: number): bigint;
678
+
679
+ /** Implied TYD-per-outcome from a Uniswap v4 sqrtPriceX96 when token0 is Yes/No (18d) and token1 is TYD (6d). */
680
+ declare function trueoImpliedPriceFromSqrtX96(sqrtPriceX96: string | bigint | null | undefined, token0Decimals?: number, token1Decimals?: number): number | null;
681
+ /** Binary Yes/No implied prices above this are treated as a corrupt pool tick. */
682
+ declare const TRUEO_SANE_IMPLIED_PRICE_MAX = 1.05;
683
+ declare function trueoIsSaneImpliedPrice(price: number | null | undefined): price is number;
684
+ /** Keep a valid side; fill the other as the complement when a tick is corrupt. */
685
+ declare function trueoSanitizeBinaryPrices(yes: number | null, no: number | null): {
686
+ yes: number | null;
687
+ no: number | null;
688
+ };
689
+ declare function trueoPercentLabel(price: number | null): string | null;
690
+ /** Compact size for chat / Telegram (192403.7 → `192k`). */
691
+ declare function trueoCompactVolumeLabel(size: string | number | null | undefined): string;
692
+ declare function trueoExpiresAtIso(endOfTrading: number): string | null;
693
+ declare function trueoExpiresAtLabel(endOfTrading: number): string | null;
694
+ /** Human trading deadline, e.g. `16 Sep 2025, 02:16 UTC`. */
695
+ declare function trueoTradingDeadlineLabel(endOfTrading: number): string | null;
696
+ declare function trueoTimeUntilTradingEndsLabel(endOfTrading: number, nowSec?: number): string | null;
697
+
698
+ type TrueoCategory = {
699
+ id: number;
700
+ name: string;
701
+ };
702
+ type TrueoMarketRow = {
703
+ address: string;
704
+ question: string;
705
+ rules: string;
706
+ source: string;
707
+ categories: string[];
708
+ size: string;
709
+ tvl: number | null;
710
+ yesTokenAddress: string;
711
+ noTokenAddress: string;
712
+ yesPoolAddress: string;
713
+ noPoolAddress: string;
714
+ paymentTokenAddress: string;
715
+ paymentTokenSymbol: string;
716
+ paymentTokenDecimals: number;
717
+ endOfTrading: number;
718
+ status: number;
719
+ /** 0 unknown, 1 Yes, 2 No — set after resolution. */
720
+ outcome: number;
721
+ statusUpdatedAt: string | null;
722
+ imageUrl: string | null;
723
+ yesPoolTick: number | null;
724
+ noPoolTick: number | null;
725
+ yesPoolSqrtPriceX96: string | null;
726
+ noPoolSqrtPriceX96: string | null;
727
+ yesPrice: number | null;
728
+ noPrice: number | null;
729
+ yesPriceLabel: string | null;
730
+ noPriceLabel: string | null;
731
+ expiresAt: string | null;
732
+ expiresAtLabel: string | null;
733
+ chainId: number;
734
+ network: string;
735
+ };
736
+ type TrueoOhlcBar = {
737
+ timestamp: number;
738
+ open: number;
739
+ high: number;
740
+ low: number;
741
+ close: number;
742
+ };
743
+ type TrueoJsonFetchOptions = {
744
+ signal?: AbortSignal;
745
+ };
746
+ declare function trueoJsonFetch<T>(path: string, opts?: TrueoJsonFetchOptions): Promise<T>;
747
+ declare function normalizeTrueoMarketRow(raw: unknown): TrueoMarketRow;
748
+ /** Topic tokens for title search: drop short/stop words so "silver commodities" still hits Silver. */
749
+ declare function trueoQueryTokens(query: string): string[];
750
+ /** Case-insensitive substring match on title (and rules / source / category / addresses). */
751
+ declare function filterTrueoMarkets(rows: TrueoMarketRow[], args: {
752
+ query?: string;
753
+ category?: string;
754
+ }): TrueoMarketRow[];
755
+ declare function fetchTrueoCategories(opts?: TrueoJsonFetchOptions): Promise<TrueoCategory[]>;
756
+ /** Trueo `/trending` 400s above this; omit limit and the API still returns 10. Offset is ignored. */
757
+ declare const TRUEO_TRENDING_MAX_LIMIT = 10;
758
+ declare const TRUEO_MARKET_PAGE_SIZE = 10;
759
+ type TrueoMarketPage = {
760
+ markets: TrueoMarketRow[];
761
+ hasMore: boolean;
762
+ nextOffset: number;
763
+ };
764
+ declare function fetchTrueoTrending(args?: {
765
+ limit?: number;
766
+ includeAll?: boolean;
767
+ opts?: TrueoJsonFetchOptions;
768
+ }): Promise<TrueoMarketRow[]>;
769
+ declare function searchTrueoMarketsPage(args: {
770
+ query?: string;
771
+ category?: string;
772
+ limit?: number;
773
+ offset?: number;
774
+ includeAll?: boolean;
775
+ excludeAddresses?: string[];
776
+ opts?: TrueoJsonFetchOptions;
777
+ }): Promise<TrueoMarketPage>;
778
+ declare function searchTrueoMarkets(args: {
779
+ query?: string;
780
+ category?: string;
781
+ limit?: number;
782
+ offset?: number;
783
+ includeAll?: boolean;
784
+ opts?: TrueoJsonFetchOptions;
785
+ }): Promise<TrueoMarketRow[]>;
786
+ declare function trueoListUsesTrending(args: {
787
+ query?: string;
788
+ category?: string;
789
+ offset?: number;
790
+ trending?: boolean;
791
+ }): boolean;
792
+ declare function listTrueoMarketsPage(args: {
793
+ query?: string;
794
+ category?: string;
795
+ offset?: number;
796
+ includeAll?: boolean;
797
+ trending?: boolean;
798
+ excludeAddresses?: string[];
799
+ opts?: TrueoJsonFetchOptions;
800
+ }): Promise<TrueoMarketPage>;
801
+ declare function fetchTrueoMarket(args: {
802
+ marketAddress: string;
803
+ opts?: TrueoJsonFetchOptions;
804
+ }): Promise<TrueoMarketRow>;
805
+ /**
806
+ * Trueo `/ohlc` `resolution` is a sample step in seconds (`3600` = hourly).
807
+ * Calendar tokens `1D` / `1W` / `All` 400. `1H` is 1-second ticks, not hourly bars.
808
+ */
809
+ declare const TRUEO_CHANCE_SERIES_RESOLUTION = "3600";
810
+ declare const TRUEO_CHANCE_SERIES_LOOKBACK_SECONDS: number;
811
+ declare function normalizeTrueoOhlcResolution(raw?: string): string;
812
+ declare function fetchTrueoOhlc(args: {
813
+ poolId: string;
814
+ from: number;
815
+ to: number;
816
+ resolution?: string;
817
+ opts?: TrueoJsonFetchOptions;
818
+ }): Promise<TrueoOhlcBar[]>;
819
+ declare function fetchTrueoTransactions(args: {
820
+ marketAddress: string;
821
+ limit?: number;
822
+ opts?: TrueoJsonFetchOptions;
823
+ }): Promise<unknown[]>;
824
+ declare function trueoFetchCategoriesSummary(): Promise<{
825
+ categories: TrueoCategory[];
826
+ chainId: number;
827
+ }>;
828
+ declare function trueoFetchTrendingSummary(input?: {
829
+ limit?: number;
830
+ includeAll?: boolean;
831
+ }): Promise<{
832
+ markets: TrueoMarketRow[];
833
+ hasMore: boolean;
834
+ nextOffset: number;
835
+ notes: string;
836
+ }>;
837
+ declare function trueoSearchMarketsSummary(input: {
838
+ query?: string;
839
+ category?: string;
840
+ limit?: number;
841
+ offset?: number;
842
+ includeAll?: boolean;
843
+ excludeAddresses?: string[];
844
+ }): Promise<{
845
+ markets: TrueoMarketRow[];
846
+ hasMore: boolean;
847
+ nextOffset: number;
848
+ notes: string;
849
+ }>;
850
+ declare function trueoFetchMarketSummary(input: {
851
+ marketAddress: string;
852
+ }): Promise<TrueoMarketRow>;
853
+ declare function fetchTrueoChanceSeries(args: {
854
+ poolId: string;
855
+ lookbackSeconds?: number;
856
+ opts?: TrueoJsonFetchOptions;
857
+ }): Promise<TrueoOhlcBar[]>;
858
+ declare function trueoFetchChanceSeriesSummary(input: {
859
+ poolId: string;
860
+ from?: number;
861
+ to?: number;
862
+ resolution?: string;
863
+ lookbackDays?: number;
864
+ }): Promise<{
865
+ poolId: string;
866
+ bars: TrueoOhlcBar[];
867
+ from: number;
868
+ to: number;
869
+ resolution: string;
870
+ notes: string;
871
+ }>;
872
+
873
+ /** Default search/trending keep resolved/voided markets only if they finished in this window. */
874
+ declare const TRUEO_RECENT_MARKET_WINDOW_SECONDS: number;
875
+ type TrueoMarketSearchScopeRow = Pick<TrueoMarketRow, 'status' | 'endOfTrading'> & {
876
+ statusUpdatedAt?: string | null;
877
+ };
878
+ /**
879
+ * Default browse/search: still trading, or finished within 14 days.
880
+ * Stuck resolving / awaiting-resolution rows older than the window stay hidden unless includeAll.
881
+ * Recency uses endOfTrading (not a later statusUpdatedAt bump).
882
+ */
883
+ declare function isTrueoMarketLiveOrRecent(row: TrueoMarketSearchScopeRow, nowSec?: number, recentWindowSec?: number): boolean;
884
+ declare function applyTrueoMarketSearchScope<T extends TrueoMarketSearchScopeRow>(rows: T[], args?: {
885
+ includeAll?: boolean;
886
+ nowSec?: number;
887
+ }): T[];
888
+ /** Still in the trading window (status 0 and endOfTrading in the future). */
889
+ declare function isTrueoMarketTradingOpen(row: TrueoMarketSearchScopeRow, nowSec?: number): boolean;
890
+ /** Title search: if any live match exists, drop recently finished / resolving rows. */
891
+ declare function preferOpenTrueoTitleMatches<T extends TrueoMarketSearchScopeRow>(rows: T[], args?: {
892
+ includeAll?: boolean;
893
+ nowSec?: number;
894
+ }): T[];
895
+ declare function trueoSearchScopeNote(includeAll: boolean): string;
896
+
897
+ declare const TRUEO_BET_CLOSE_ERROR = "Market closes within 5 minutes.";
898
+ declare const TRUEO_BET_EXPIRED_ERROR = "Market expired. Cannot Get Sig or Execute.";
899
+ type TrueoMarketStatusLabel = 'open' | 'resolving' | 'resolved' | 'closed';
900
+ /** Continuum treats `endOfTrading` (and resolved/closed status) as the bet cutoff. */
901
+ declare function trueoMarketStatusLabel(row: Pick<TrueoMarketRow, 'status' | 'endOfTrading'>, nowSec?: number): TrueoMarketStatusLabel;
902
+ /** Trading-window line only. Use `trueoResolutionCopy` for how it ended. */
903
+ declare function trueoTradingEndsCopy(row: Pick<TrueoMarketRow, 'status' | 'endOfTrading'>, nowSec?: number): string;
904
+ type TrueoResolvedSide = 'yes' | 'no' | null;
905
+ declare function trueoResolvedSide(outcome: number | null | undefined): TrueoResolvedSide;
906
+ /**
907
+ * How the market finished (or that it has not). Null while still in the trading window.
908
+ * API: status 7 resolved; outcome 1 Yes / 2 No; status 1–3 resolving; 4–6 closed/void.
909
+ */
910
+ declare function trueoResolutionCopy(row: Pick<TrueoMarketRow, 'status' | 'endOfTrading'> & {
911
+ outcome?: number;
912
+ statusUpdatedAt?: string | null;
913
+ }, nowSec?: number): string | null;
914
+ declare function isTrueoBetAction(action: string): action is TrueoBetAction;
915
+ /** True when new Yes/No votes (mint/swap/limit) are still allowed. */
916
+ declare function trueoMarketVotingOpen(row: Pick<TrueoMarketRow, 'status' | 'endOfTrading'>, nowSec?: number): boolean;
917
+ declare function trueoBetCreateBlockedReason(row: Pick<TrueoMarketRow, 'status' | 'endOfTrading'>, nowSec?: number): string | null;
918
+ declare function trueoBetExecuteBlockedReason(row: Pick<TrueoMarketRow, 'status' | 'endOfTrading'>, nowSec?: number): string | null;
919
+ declare function assertTrueoBetCanCreate(row: Pick<TrueoMarketRow, 'status' | 'endOfTrading'>, nowSec?: number): void;
920
+ declare function assertTrueoBetCanExecute(row: Pick<TrueoMarketRow, 'status' | 'endOfTrading'>, nowSec?: number): void;
921
+ /** Live re-read for Get Sig / Execute. Do not trust a stale extraJSON endOfTrading alone. */
922
+ declare function assertTrueoBetStillOpen(marketAddress: string): Promise<TrueoMarketRow>;
923
+ type TrueoBetExtraJson = {
924
+ protocolId: 'trueo';
925
+ trueoAction: TrueoBetAction;
926
+ marketAddress: string;
927
+ endOfTrading: number;
928
+ };
929
+ declare function buildTrueoBetExtraJson(args: {
930
+ action: TrueoBetAction;
931
+ marketAddress: string;
932
+ endOfTrading: number;
933
+ }): TrueoBetExtraJson;
934
+ declare function parseTrueoBetExtraJson(raw: unknown): TrueoBetExtraJson | null;
935
+ declare function extraJsonFromSignRequest(detail: Record<string, unknown> | null | undefined): unknown;
936
+
937
+ type TrueoOrderbookLevel = {
938
+ tick: number | null;
939
+ price: number | null;
940
+ orderId: number | null;
941
+ owner: string | null;
942
+ zeroForOne: boolean | null;
943
+ };
944
+ type TrueoOrderbook = {
945
+ marketAddress: string;
946
+ side: 'yes' | 'no';
947
+ poolId: string;
948
+ currentTick: number | null;
949
+ impliedPrice: number | null;
950
+ impliedPriceLabel: string | null;
951
+ levels: TrueoOrderbookLevel[];
952
+ recentTrades: Array<{
953
+ timestamp: string | null;
954
+ price: number | null;
955
+ usdValue: string | null;
956
+ poolId: string | null;
957
+ }>;
958
+ notes: string;
959
+ };
960
+ declare function readTrueoPoolKeys(args: {
961
+ rpcUrl: string;
962
+ marketAddress: Address;
963
+ }): Promise<{
964
+ yes: TrueoPoolKey;
965
+ no: TrueoPoolKey;
966
+ } | null>;
967
+ declare function fetchTrueoOrderbook(args: {
968
+ marketAddress: string;
969
+ side?: 'yes' | 'no';
970
+ rpcUrl?: string;
971
+ }): Promise<TrueoOrderbook>;
972
+ declare function trueoFetchOrderbookSummary(input: {
973
+ marketAddress: string;
974
+ side?: 'yes' | 'no';
975
+ rpcUrl?: string;
976
+ }): Promise<TrueoOrderbook>;
977
+ declare function outcomeTokensFromMarkets(markets: TrueoMarketRow[]): string[];
978
+
979
+ declare const PREDICTION_MARKET_V1_KIND: "continuum/prediction-market/v1";
980
+ type PredictionMarketVenue = 'trueo';
981
+ type PredictionMarketRow = {
982
+ venue: PredictionMarketVenue;
983
+ venueMarketId: string;
984
+ question: string;
985
+ categories: string[];
986
+ yesPrice: number | null;
987
+ noPrice: number | null;
988
+ yesPriceLabel: string | null;
989
+ noPriceLabel: string | null;
990
+ volume: string;
991
+ tvl: number | null;
992
+ expiresAt: string | null;
993
+ expiresAtLabel: string | null;
994
+ tradingEndsLabel: string;
995
+ endOfTrading: number;
996
+ status: string;
997
+ outcome: number;
998
+ statusUpdatedAt: string | null;
999
+ resolutionLabel: string | null;
1000
+ chainId: number;
1001
+ paymentSymbol: string;
1002
+ tradable: boolean;
1003
+ rules?: string;
1004
+ source?: string;
1005
+ imageUrl?: string | null;
1006
+ index?: number;
1007
+ };
1008
+ type PredictionMarketEnvelope = {
1009
+ kind: typeof PREDICTION_MARKET_V1_KIND;
1010
+ market: PredictionMarketRow & {
1011
+ yesTokenAddress?: string;
1012
+ noTokenAddress?: string;
1013
+ yesPoolAddress?: string;
1014
+ noPoolAddress?: string;
1015
+ paymentTokenAddress?: string;
1016
+ endOfTrading?: number;
1017
+ ohlc?: TrueoOhlcBar[];
1018
+ orderbook?: TrueoOrderbook | null;
1019
+ };
1020
+ };
1021
+ declare function trueoMarketToPredictionRow(row: TrueoMarketRow): PredictionMarketRow;
1022
+ declare function searchPredictionMarkets(args: {
1023
+ query?: string;
1024
+ category?: string;
1025
+ venues?: string[];
1026
+ trending?: boolean;
1027
+ includeAll?: boolean;
1028
+ limit?: number;
1029
+ offset?: number;
1030
+ indexBase?: number;
1031
+ excludeAddresses?: string[];
1032
+ }): Promise<{
1033
+ markets: PredictionMarketRow[];
1034
+ notes: string;
1035
+ hasMore: boolean;
1036
+ nextOffset: number;
1037
+ nextIndexBase: number;
1038
+ includeAll: boolean;
1039
+ }>;
1040
+ declare function buildPredictionMarketEnvelope(market: PredictionMarketEnvelope['market']): PredictionMarketEnvelope;
1041
+ declare function searchPredictionMarketsSummary(input: {
1042
+ query?: string;
1043
+ category?: string;
1044
+ venues?: string[];
1045
+ trending?: boolean;
1046
+ includeAll?: boolean;
1047
+ limit?: number;
1048
+ offset?: number;
1049
+ indexBase?: number;
1050
+ excludeAddresses?: string[];
1051
+ }): Promise<{
1052
+ markets: PredictionMarketRow[];
1053
+ notes: string;
1054
+ hasMore: boolean;
1055
+ nextOffset: number;
1056
+ nextIndexBase: number;
1057
+ includeAll: boolean;
1058
+ }>;
1059
+ declare function trueoHoldingTokenAddressesFromRegistry(tokens: Array<{
1060
+ contractAddress?: string;
1061
+ symbol?: string;
1062
+ name?: string;
1063
+ }>): string[];
1064
+ declare function listPredictionMarketsForHoldings(args: {
1065
+ tokenAddresses?: string[];
1066
+ marketAddresses?: string[];
1067
+ }): Promise<{
1068
+ markets: PredictionMarketRow[];
1069
+ notes: string;
1070
+ hasMore: boolean;
1071
+ nextOffset: number;
1072
+ nextIndexBase: number;
1073
+ includeAll: boolean;
1074
+ }>;
1075
+ declare function listMyPredictionMarketsSummary(input: {
1076
+ tokenAddresses?: string[];
1077
+ marketAddresses?: string[];
1078
+ }): Promise<{
1079
+ markets: PredictionMarketRow[];
1080
+ notes: string;
1081
+ hasMore: boolean;
1082
+ nextOffset: number;
1083
+ nextIndexBase: number;
1084
+ includeAll: boolean;
1085
+ }>;
1086
+ declare function getPredictionMarketSummary(input: {
1087
+ venue?: string;
1088
+ venueMarketId: string;
1089
+ }): Promise<{
1090
+ envelope: PredictionMarketEnvelope;
1091
+ rules: string;
1092
+ source: string;
1093
+ yesTokenAddress: string;
1094
+ noTokenAddress: string;
1095
+ yesPoolAddress: string;
1096
+ noPoolAddress: string;
1097
+ paymentTokenAddress: string;
1098
+ endOfTrading: number;
1099
+ ohlc: TrueoOhlcBar[];
1100
+ orderbook: TrueoOrderbook | null;
1101
+ venue: PredictionMarketVenue;
1102
+ venueMarketId: string;
1103
+ question: string;
1104
+ categories: string[];
1105
+ yesPrice: number | null;
1106
+ noPrice: number | null;
1107
+ yesPriceLabel: string | null;
1108
+ noPriceLabel: string | null;
1109
+ volume: string;
1110
+ tvl: number | null;
1111
+ expiresAt: string | null;
1112
+ expiresAtLabel: string | null;
1113
+ tradingEndsLabel: string;
1114
+ status: string;
1115
+ outcome: number;
1116
+ statusUpdatedAt: string | null;
1117
+ resolutionLabel: string | null;
1118
+ chainId: number;
1119
+ paymentSymbol: string;
1120
+ tradable: boolean;
1121
+ imageUrl?: string | null;
1122
+ index?: number;
1123
+ kind: "continuum/prediction-market/v1";
1124
+ }>;
1125
+
1126
+ type TrueoPurposeAction = 'wrapTyd' | 'unwrapTyd' | 'mint' | 'burn' | 'redeem' | 'swap' | 'createOrder' | 'cancelOrder';
1127
+ declare function buildTrueoPurposePrefill(args: {
1128
+ action: TrueoPurposeAction;
1129
+ side?: 'yes' | 'no';
1130
+ amountHuman?: string;
1131
+ paymentSymbol?: string;
1132
+ question?: string;
1133
+ chainId?: number;
1134
+ }): string;
1135
+
1136
+ type TrueoSuggestedAddToken = {
1137
+ address: string;
1138
+ name: string;
1139
+ symbol: string;
1140
+ decimals: number;
1141
+ kind: 'tyd' | 'usdc' | 'yes' | 'no';
1142
+ };
1143
+ type TrueoSuggestAddMarket = {
1144
+ question?: string;
1145
+ yesTokenAddress: string;
1146
+ noTokenAddress: string;
1147
+ };
1148
+ /** Node-list YES/NO we suggested (symbol YES/NO or our `Trueo Yes/No —` name). */
1149
+ declare function isTrueoOutcomeTokenLabel(symbol?: string | null, name?: string | null): boolean;
1150
+ /**
1151
+ * Tokens the user will hold after this Trueo action — offer “add to node”.
1152
+ * YES/NO are per-market position tokens (like Pendle PT/YT). TRUE is governance
1153
+ * and is never suggested.
1154
+ */
1155
+ declare function suggestTrueoTokensToAdd(args: {
1156
+ action: TrueoPurposeAction;
1157
+ side: 'yes' | 'no';
1158
+ market?: TrueoSuggestAddMarket | null;
1159
+ }): TrueoSuggestedAddToken[];
1160
+
1161
+ type EvmChainDetail = {
1162
+ legacy?: boolean;
1163
+ gasLimit?: number;
1164
+ gasMultiplier?: number;
1165
+ gasPrice?: number;
1166
+ baseFee?: number;
1167
+ priorityFee?: number;
1168
+ baseFeeMultiplier?: number;
1169
+ };
1170
+
1171
+ declare const TRUEO_APPROVE_FALLBACK_GAS = 80000n;
1172
+ declare const TRUEO_MINT_FALLBACK_GAS = 450000n;
1173
+ declare const TRUEO_TYD_VAULT_FALLBACK_GAS = 350000n;
1174
+ declare const TRUEO_SWAP_FALLBACK_GAS = 650000n;
1175
+ declare const TRUEO_ORDER_FALLBACK_GAS = 520000n;
1176
+ type CommonBuildArgs = {
1177
+ keyGen: KeyGenSubsetForPermit;
1178
+ chainId: number;
1179
+ rpcUrl: string;
1180
+ chainDetail: EvmChainDetail;
1181
+ useCustomGas: boolean;
1182
+ customGasChainDetails?: Record<string, unknown> | null;
1183
+ executorAddress: Address | string;
1184
+ purposeText: string;
1185
+ expiryDate?: number;
1186
+ marketAddress: string;
1187
+ amountHuman: string;
1188
+ };
1189
+ type TydVaultBuildArgs = Omit<CommonBuildArgs, 'marketAddress'>;
1190
+ /** Deposit Base USDC into the Yearn TYD ERC-4626 vault. No market. */
1191
+ declare function buildEvmMultisignBodyTrueoWrapTyd(args: TydVaultBuildArgs): Promise<{
1192
+ bodyForSign: Record<string, unknown>;
1193
+ messageToSign: string;
1194
+ }>;
1195
+ /** Redeem TYD shares back to Base USDC. No market. */
1196
+ declare function buildEvmMultisignBodyTrueoUnwrapTyd(args: TydVaultBuildArgs): Promise<{
1197
+ bodyForSign: Record<string, unknown>;
1198
+ messageToSign: string;
1199
+ }>;
1200
+ declare function buildEvmMultisignBodyTrueoMint(args: CommonBuildArgs & {
1201
+ paymentKind?: 'tyd' | 'usdc';
1202
+ }): Promise<{
1203
+ bodyForSign: Record<string, unknown>;
1204
+ messageToSign: string;
1205
+ }>;
1206
+ declare function buildEvmMultisignBodyTrueoBurn(args: CommonBuildArgs & {
1207
+ paymentKind?: 'tyd' | 'usdc';
1208
+ }): Promise<{
1209
+ bodyForSign: Record<string, unknown>;
1210
+ messageToSign: string;
1211
+ }>;
1212
+ declare function buildEvmMultisignBodyTrueoRedeem(args: CommonBuildArgs & {
1213
+ paymentKind?: 'tyd' | 'usdc';
1214
+ }): Promise<{
1215
+ bodyForSign: Record<string, unknown>;
1216
+ messageToSign: string;
1217
+ }>;
1218
+ declare function buildEvmMultisignBodyTrueoSwap(args: CommonBuildArgs & {
1219
+ side: 'yes' | 'no';
1220
+ amountOutMinimumHuman?: string;
1221
+ }): Promise<{
1222
+ bodyForSign: Record<string, unknown>;
1223
+ messageToSign: string;
1224
+ }>;
1225
+ declare function buildEvmMultisignBodyTrueoCreateOrder(args: CommonBuildArgs & {
1226
+ side: 'yes' | 'no';
1227
+ tickLower: number;
1228
+ tickUpper: number;
1229
+ enablePartialFill?: boolean;
1230
+ }): Promise<{
1231
+ bodyForSign: Record<string, unknown>;
1232
+ messageToSign: string;
1233
+ }>;
1234
+ declare function buildEvmMultisignBodyTrueoCancelOrder(args: {
1235
+ keyGen: KeyGenSubsetForPermit;
1236
+ chainId: number;
1237
+ rpcUrl: string;
1238
+ chainDetail: EvmChainDetail;
1239
+ useCustomGas: boolean;
1240
+ customGasChainDetails?: Record<string, unknown> | null;
1241
+ executorAddress: Address | string;
1242
+ purposeText: string;
1243
+ expiryDate?: number;
1244
+ marketAddress: string;
1245
+ side: 'yes' | 'no';
1246
+ orderId: number;
1247
+ }): Promise<{
1248
+ bodyForSign: Record<string, unknown>;
1249
+ messageToSign: string;
1250
+ }>;
1251
+
1252
+ declare const trueoProtocolModule: ProtocolModule;
1253
+
1254
+ export { PREDICTION_MARKETS_PROTOCOL_ID, PREDICTION_MARKET_V1_KIND, type PredictionMarketEnvelope, type PredictionMarketRow, type PredictionMarketVenue, TRUEO_API_ORIGIN, TRUEO_APPROVE_FALLBACK_GAS, TRUEO_BASE_CHAIN_ID, TRUEO_BET_ACTIONS, TRUEO_BET_CLOSE_BUFFER_SECONDS, TRUEO_BET_CLOSE_ERROR, TRUEO_BET_EXPIRED_ERROR, TRUEO_CHAIN_IDS, TRUEO_CHANCE_SERIES_LOOKBACK_SECONDS, TRUEO_CHANCE_SERIES_RESOLUTION, TRUEO_MARKET_API_PREFIX, TRUEO_MARKET_PAGE_SIZE, TRUEO_MINT_FALLBACK_GAS, TRUEO_NETWORK, TRUEO_ORDER_FALLBACK_GAS, TRUEO_ORDER_MANAGER, TRUEO_OUTCOME_TOKEN_DECIMALS, TRUEO_PERMIT2, TRUEO_PERMIT2_APPROVAL_SECONDS, TRUEO_PROTOCOL_ID, TRUEO_RECENT_MARKET_WINDOW_SECONDS, TRUEO_SANE_IMPLIED_PRICE_MAX, TRUEO_SWAP_FALLBACK_GAS, TRUEO_TRENDING_MAX_LIMIT, TRUEO_TRUE, TRUEO_TRUTH_MARKET_ADAPTER, TRUEO_TRUTH_MARKET_MANAGER, TRUEO_TYD, TRUEO_TYD_DECIMALS, TRUEO_TYD_VAULT_FALLBACK_GAS, TRUEO_UNIVERSAL_ROUTER_ADAPTER, TRUEO_USDC, TRUEO_V4_HOOK, type TrueoBetAction, type TrueoBetExtraJson, type TrueoCategory, type TrueoJsonFetchOptions, type TrueoMarketPage, type TrueoMarketRow, type TrueoMarketSearchScopeRow, type TrueoMarketStatusLabel, type TrueoOhlcBar, type TrueoOrderbook, type TrueoOrderbookLevel, type TrueoPoolKey, type TrueoPurposeAction, type TrueoResolvedSide, type TrueoSuggestAddMarket, type TrueoSuggestedAddToken, UR_COMMAND_V4_SWAP, V4_ACTION_SETTLE, V4_ACTION_SWAP_EXACT_IN_SINGLE, V4_ACTION_TAKE, applyTrueoMarketSearchScope, assertTrueoBetCanCreate, assertTrueoBetCanExecute, assertTrueoBetStillOpen, assertTrueoChainId, buildEvmMultisignBodyTrueoBurn, buildEvmMultisignBodyTrueoCancelOrder, buildEvmMultisignBodyTrueoCreateOrder, buildEvmMultisignBodyTrueoMint, buildEvmMultisignBodyTrueoRedeem, buildEvmMultisignBodyTrueoSwap, buildEvmMultisignBodyTrueoUnwrapTyd, buildEvmMultisignBodyTrueoWrapTyd, buildPredictionMarketEnvelope, buildTrueoBetExtraJson, buildTrueoPurposePrefill, encodeErc20Approve, encodePermit2Approve, encodeTrueoAdapterBurn, encodeTrueoAdapterMint, encodeTrueoAdapterRedeem, encodeTrueoBurn, encodeTrueoCancelOrder, encodeTrueoCreateOrder, encodeTrueoMint, encodeTrueoRedeem, encodeTrueoTydDeposit, encodeTrueoTydRedeem, encodeTrueoUniversalRouterExecute, encodeTrueoV4ExactInInput, encodeTrueoV4ExactInSwap, extraJsonFromSignRequest, fetchTrueoCategories, fetchTrueoChanceSeries, fetchTrueoMarket, fetchTrueoOhlc, fetchTrueoOrderbook, fetchTrueoTransactions, fetchTrueoTrending, filterTrueoMarkets, getPredictionMarketSummary, isTrueoBetAction, isTrueoChainSupported, isTrueoCoreToken, isTrueoMarketLiveOrRecent, isTrueoMarketTradingOpen, isTrueoOutcomeTokenLabel, listMyPredictionMarketsSummary, listPredictionMarketsForHoldings, listTrueoMarketsPage, normalizeTrueoAddress, normalizeTrueoMarketRow, normalizeTrueoOhlcResolution, outcomeTokensFromMarkets, parseTrueoBetExtraJson, preferOpenTrueoTitleMatches, readTrueoPoolKeys, searchPredictionMarkets, searchPredictionMarketsSummary, searchTrueoMarkets, searchTrueoMarketsPage, suggestTrueoTokensToAdd, trueoAdapterMintAbi, trueoBetCreateBlockedReason, trueoBetExecuteBlockedReason, trueoCompactVolumeLabel, trueoErc20Abi, trueoExpiresAtIso, trueoExpiresAtLabel, trueoFetchCategoriesSummary, trueoFetchChanceSeriesSummary, trueoFetchMarketSummary, trueoFetchOrderbookSummary, trueoFetchTrendingSummary, trueoHoldingTokenAddressesFromRegistry, trueoImpliedPriceFromSqrtX96, trueoIsSaneImpliedPrice, trueoJsonFetch, trueoListUsesTrending, trueoMarketAbi, trueoMarketApiPath, trueoMarketStatusLabel, trueoMarketToPredictionRow, trueoMarketV2Abi, trueoMarketVotingOpen, trueoOrderManagerAbi, trueoOrderManagerStructAbi, trueoPercentLabel, trueoPermit2ApproveAbi, trueoPermit2Expiration, trueoProtocolModule, trueoQueryTokens, trueoResolutionCopy, trueoResolvedSide, trueoSanitizeBinaryPrices, trueoSearchMarketsSummary, trueoSearchScopeNote, trueoSwapDeadline, trueoTimeUntilTradingEndsLabel, trueoTradingDeadlineLabel, trueoTradingEndsCopy, trueoTydVaultAbi, trueoUniversalRouterAdapterAbi };