@exagent/sdk 0.1.12 → 0.1.13
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.mts +574 -35
- package/dist/index.d.ts +574 -35
- package/dist/index.js +71 -131
- package/dist/index.mjs +71 -132
- package/package.json +1 -1
package/dist/index.d.ts
CHANGED
|
@@ -294,6 +294,481 @@ interface VaultTradeEntry {
|
|
|
294
294
|
txHash: Hash;
|
|
295
295
|
}
|
|
296
296
|
|
|
297
|
+
/**
|
|
298
|
+
* ABI for ExagentRegistry contract
|
|
299
|
+
*/
|
|
300
|
+
declare const EXAGENT_REGISTRY_ABI: readonly [{
|
|
301
|
+
readonly type: "function";
|
|
302
|
+
readonly name: "registerAgent";
|
|
303
|
+
readonly inputs: readonly [{
|
|
304
|
+
readonly name: "name";
|
|
305
|
+
readonly type: "string";
|
|
306
|
+
}, {
|
|
307
|
+
readonly name: "metadataURI";
|
|
308
|
+
readonly type: "string";
|
|
309
|
+
}, {
|
|
310
|
+
readonly name: "riskUniverse";
|
|
311
|
+
readonly type: "uint8";
|
|
312
|
+
}, {
|
|
313
|
+
readonly name: "maxPositionSizeBps";
|
|
314
|
+
readonly type: "uint256";
|
|
315
|
+
}, {
|
|
316
|
+
readonly name: "maxDailyLossBps";
|
|
317
|
+
readonly type: "uint256";
|
|
318
|
+
}];
|
|
319
|
+
readonly outputs: readonly [{
|
|
320
|
+
readonly name: "agentId";
|
|
321
|
+
readonly type: "uint256";
|
|
322
|
+
}];
|
|
323
|
+
readonly stateMutability: "nonpayable";
|
|
324
|
+
}, {
|
|
325
|
+
readonly type: "function";
|
|
326
|
+
readonly name: "isNameAvailable";
|
|
327
|
+
readonly inputs: readonly [{
|
|
328
|
+
readonly name: "name";
|
|
329
|
+
readonly type: "string";
|
|
330
|
+
}];
|
|
331
|
+
readonly outputs: readonly [{
|
|
332
|
+
readonly name: "available";
|
|
333
|
+
readonly type: "bool";
|
|
334
|
+
}];
|
|
335
|
+
readonly stateMutability: "view";
|
|
336
|
+
}, {
|
|
337
|
+
readonly type: "function";
|
|
338
|
+
readonly name: "getAgentByName";
|
|
339
|
+
readonly inputs: readonly [{
|
|
340
|
+
readonly name: "name";
|
|
341
|
+
readonly type: "string";
|
|
342
|
+
}];
|
|
343
|
+
readonly outputs: readonly [{
|
|
344
|
+
readonly name: "agentId";
|
|
345
|
+
readonly type: "uint256";
|
|
346
|
+
}];
|
|
347
|
+
readonly stateMutability: "view";
|
|
348
|
+
}, {
|
|
349
|
+
readonly type: "function";
|
|
350
|
+
readonly name: "linkWallet";
|
|
351
|
+
readonly inputs: readonly [{
|
|
352
|
+
readonly name: "agentId";
|
|
353
|
+
readonly type: "uint256";
|
|
354
|
+
}, {
|
|
355
|
+
readonly name: "wallet";
|
|
356
|
+
readonly type: "address";
|
|
357
|
+
}, {
|
|
358
|
+
readonly name: "signature";
|
|
359
|
+
readonly type: "bytes";
|
|
360
|
+
}];
|
|
361
|
+
readonly outputs: readonly [];
|
|
362
|
+
readonly stateMutability: "nonpayable";
|
|
363
|
+
}, {
|
|
364
|
+
readonly type: "function";
|
|
365
|
+
readonly name: "linkOwnWallet";
|
|
366
|
+
readonly inputs: readonly [{
|
|
367
|
+
readonly name: "agentId";
|
|
368
|
+
readonly type: "uint256";
|
|
369
|
+
}];
|
|
370
|
+
readonly outputs: readonly [];
|
|
371
|
+
readonly stateMutability: "nonpayable";
|
|
372
|
+
}, {
|
|
373
|
+
readonly type: "function";
|
|
374
|
+
readonly name: "unlinkWallet";
|
|
375
|
+
readonly inputs: readonly [{
|
|
376
|
+
readonly name: "agentId";
|
|
377
|
+
readonly type: "uint256";
|
|
378
|
+
}, {
|
|
379
|
+
readonly name: "wallet";
|
|
380
|
+
readonly type: "address";
|
|
381
|
+
}];
|
|
382
|
+
readonly outputs: readonly [];
|
|
383
|
+
readonly stateMutability: "nonpayable";
|
|
384
|
+
}, {
|
|
385
|
+
readonly type: "function";
|
|
386
|
+
readonly name: "updateMetadata";
|
|
387
|
+
readonly inputs: readonly [{
|
|
388
|
+
readonly name: "agentId";
|
|
389
|
+
readonly type: "uint256";
|
|
390
|
+
}, {
|
|
391
|
+
readonly name: "newURI";
|
|
392
|
+
readonly type: "string";
|
|
393
|
+
}];
|
|
394
|
+
readonly outputs: readonly [];
|
|
395
|
+
readonly stateMutability: "nonpayable";
|
|
396
|
+
}, {
|
|
397
|
+
readonly type: "function";
|
|
398
|
+
readonly name: "agents";
|
|
399
|
+
readonly inputs: readonly [{
|
|
400
|
+
readonly name: "agentId";
|
|
401
|
+
readonly type: "uint256";
|
|
402
|
+
}];
|
|
403
|
+
readonly outputs: readonly [{
|
|
404
|
+
readonly name: "owner";
|
|
405
|
+
readonly type: "address";
|
|
406
|
+
}, {
|
|
407
|
+
readonly name: "name";
|
|
408
|
+
readonly type: "string";
|
|
409
|
+
}, {
|
|
410
|
+
readonly name: "metadataURI";
|
|
411
|
+
readonly type: "string";
|
|
412
|
+
}, {
|
|
413
|
+
readonly name: "registrationTime";
|
|
414
|
+
readonly type: "uint256";
|
|
415
|
+
}, {
|
|
416
|
+
readonly name: "verified";
|
|
417
|
+
readonly type: "bool";
|
|
418
|
+
}, {
|
|
419
|
+
readonly name: "linkedWalletCount";
|
|
420
|
+
readonly type: "uint256";
|
|
421
|
+
}];
|
|
422
|
+
readonly stateMutability: "view";
|
|
423
|
+
}, {
|
|
424
|
+
readonly type: "function";
|
|
425
|
+
readonly name: "getLinkedWallets";
|
|
426
|
+
readonly inputs: readonly [{
|
|
427
|
+
readonly name: "agentId";
|
|
428
|
+
readonly type: "uint256";
|
|
429
|
+
}];
|
|
430
|
+
readonly outputs: readonly [{
|
|
431
|
+
readonly name: "";
|
|
432
|
+
readonly type: "address[]";
|
|
433
|
+
}];
|
|
434
|
+
readonly stateMutability: "view";
|
|
435
|
+
}, {
|
|
436
|
+
readonly type: "function";
|
|
437
|
+
readonly name: "getAgentForWallet";
|
|
438
|
+
readonly inputs: readonly [{
|
|
439
|
+
readonly name: "wallet";
|
|
440
|
+
readonly type: "address";
|
|
441
|
+
}];
|
|
442
|
+
readonly outputs: readonly [{
|
|
443
|
+
readonly name: "";
|
|
444
|
+
readonly type: "uint256";
|
|
445
|
+
}];
|
|
446
|
+
readonly stateMutability: "view";
|
|
447
|
+
}, {
|
|
448
|
+
readonly type: "function";
|
|
449
|
+
readonly name: "walletToAgent";
|
|
450
|
+
readonly inputs: readonly [{
|
|
451
|
+
readonly name: "wallet";
|
|
452
|
+
readonly type: "address";
|
|
453
|
+
}];
|
|
454
|
+
readonly outputs: readonly [{
|
|
455
|
+
readonly name: "";
|
|
456
|
+
readonly type: "uint256";
|
|
457
|
+
}];
|
|
458
|
+
readonly stateMutability: "view";
|
|
459
|
+
}, {
|
|
460
|
+
readonly type: "function";
|
|
461
|
+
readonly name: "nonces";
|
|
462
|
+
readonly inputs: readonly [{
|
|
463
|
+
readonly name: "wallet";
|
|
464
|
+
readonly type: "address";
|
|
465
|
+
}];
|
|
466
|
+
readonly outputs: readonly [{
|
|
467
|
+
readonly name: "";
|
|
468
|
+
readonly type: "uint256";
|
|
469
|
+
}];
|
|
470
|
+
readonly stateMutability: "view";
|
|
471
|
+
}, {
|
|
472
|
+
readonly type: "function";
|
|
473
|
+
readonly name: "ownerOf";
|
|
474
|
+
readonly inputs: readonly [{
|
|
475
|
+
readonly name: "tokenId";
|
|
476
|
+
readonly type: "uint256";
|
|
477
|
+
}];
|
|
478
|
+
readonly outputs: readonly [{
|
|
479
|
+
readonly name: "";
|
|
480
|
+
readonly type: "address";
|
|
481
|
+
}];
|
|
482
|
+
readonly stateMutability: "view";
|
|
483
|
+
}, {
|
|
484
|
+
readonly type: "function";
|
|
485
|
+
readonly name: "balanceOf";
|
|
486
|
+
readonly inputs: readonly [{
|
|
487
|
+
readonly name: "owner";
|
|
488
|
+
readonly type: "address";
|
|
489
|
+
}];
|
|
490
|
+
readonly outputs: readonly [{
|
|
491
|
+
readonly name: "";
|
|
492
|
+
readonly type: "uint256";
|
|
493
|
+
}];
|
|
494
|
+
readonly stateMutability: "view";
|
|
495
|
+
}, {
|
|
496
|
+
readonly type: "event";
|
|
497
|
+
readonly name: "AgentRegistered";
|
|
498
|
+
readonly inputs: readonly [{
|
|
499
|
+
readonly name: "agentId";
|
|
500
|
+
readonly type: "uint256";
|
|
501
|
+
readonly indexed: true;
|
|
502
|
+
}, {
|
|
503
|
+
readonly name: "owner";
|
|
504
|
+
readonly type: "address";
|
|
505
|
+
readonly indexed: true;
|
|
506
|
+
}, {
|
|
507
|
+
readonly name: "name";
|
|
508
|
+
readonly type: "string";
|
|
509
|
+
readonly indexed: false;
|
|
510
|
+
}, {
|
|
511
|
+
readonly name: "metadataURI";
|
|
512
|
+
readonly type: "string";
|
|
513
|
+
readonly indexed: false;
|
|
514
|
+
}];
|
|
515
|
+
}, {
|
|
516
|
+
readonly type: "event";
|
|
517
|
+
readonly name: "WalletLinked";
|
|
518
|
+
readonly inputs: readonly [{
|
|
519
|
+
readonly name: "agentId";
|
|
520
|
+
readonly type: "uint256";
|
|
521
|
+
readonly indexed: true;
|
|
522
|
+
}, {
|
|
523
|
+
readonly name: "wallet";
|
|
524
|
+
readonly type: "address";
|
|
525
|
+
readonly indexed: true;
|
|
526
|
+
}];
|
|
527
|
+
}, {
|
|
528
|
+
readonly type: "event";
|
|
529
|
+
readonly name: "WalletUnlinked";
|
|
530
|
+
readonly inputs: readonly [{
|
|
531
|
+
readonly name: "agentId";
|
|
532
|
+
readonly type: "uint256";
|
|
533
|
+
readonly indexed: true;
|
|
534
|
+
}, {
|
|
535
|
+
readonly name: "wallet";
|
|
536
|
+
readonly type: "address";
|
|
537
|
+
readonly indexed: true;
|
|
538
|
+
}];
|
|
539
|
+
}, {
|
|
540
|
+
readonly type: "function";
|
|
541
|
+
readonly name: "ownerToAgentId";
|
|
542
|
+
readonly inputs: readonly [{
|
|
543
|
+
readonly name: "owner";
|
|
544
|
+
readonly type: "address";
|
|
545
|
+
}];
|
|
546
|
+
readonly outputs: readonly [{
|
|
547
|
+
readonly name: "";
|
|
548
|
+
readonly type: "uint256";
|
|
549
|
+
}];
|
|
550
|
+
readonly stateMutability: "view";
|
|
551
|
+
}, {
|
|
552
|
+
readonly type: "function";
|
|
553
|
+
readonly name: "getAgentByOwner";
|
|
554
|
+
readonly inputs: readonly [{
|
|
555
|
+
readonly name: "wallet";
|
|
556
|
+
readonly type: "address";
|
|
557
|
+
}];
|
|
558
|
+
readonly outputs: readonly [{
|
|
559
|
+
readonly name: "agentId";
|
|
560
|
+
readonly type: "uint256";
|
|
561
|
+
}];
|
|
562
|
+
readonly stateMutability: "view";
|
|
563
|
+
}, {
|
|
564
|
+
readonly type: "function";
|
|
565
|
+
readonly name: "canWalletRegister";
|
|
566
|
+
readonly inputs: readonly [{
|
|
567
|
+
readonly name: "wallet";
|
|
568
|
+
readonly type: "address";
|
|
569
|
+
}];
|
|
570
|
+
readonly outputs: readonly [{
|
|
571
|
+
readonly name: "canRegister";
|
|
572
|
+
readonly type: "bool";
|
|
573
|
+
}, {
|
|
574
|
+
readonly name: "existingAgentId";
|
|
575
|
+
readonly type: "uint256";
|
|
576
|
+
}];
|
|
577
|
+
readonly stateMutability: "view";
|
|
578
|
+
}, {
|
|
579
|
+
readonly type: "function";
|
|
580
|
+
readonly name: "setConfig";
|
|
581
|
+
readonly inputs: readonly [{
|
|
582
|
+
readonly name: "agentId";
|
|
583
|
+
readonly type: "uint256";
|
|
584
|
+
}, {
|
|
585
|
+
readonly name: "configHash";
|
|
586
|
+
readonly type: "bytes32";
|
|
587
|
+
}];
|
|
588
|
+
readonly outputs: readonly [];
|
|
589
|
+
readonly stateMutability: "nonpayable";
|
|
590
|
+
}, {
|
|
591
|
+
readonly type: "function";
|
|
592
|
+
readonly name: "getConfigHash";
|
|
593
|
+
readonly inputs: readonly [{
|
|
594
|
+
readonly name: "agentId";
|
|
595
|
+
readonly type: "uint256";
|
|
596
|
+
}];
|
|
597
|
+
readonly outputs: readonly [{
|
|
598
|
+
readonly name: "";
|
|
599
|
+
readonly type: "bytes32";
|
|
600
|
+
}];
|
|
601
|
+
readonly stateMutability: "view";
|
|
602
|
+
}, {
|
|
603
|
+
readonly type: "function";
|
|
604
|
+
readonly name: "retireAgent";
|
|
605
|
+
readonly inputs: readonly [{
|
|
606
|
+
readonly name: "agentId";
|
|
607
|
+
readonly type: "uint256";
|
|
608
|
+
}];
|
|
609
|
+
readonly outputs: readonly [];
|
|
610
|
+
readonly stateMutability: "nonpayable";
|
|
611
|
+
}, {
|
|
612
|
+
readonly type: "function";
|
|
613
|
+
readonly name: "retired";
|
|
614
|
+
readonly inputs: readonly [{
|
|
615
|
+
readonly name: "agentId";
|
|
616
|
+
readonly type: "uint256";
|
|
617
|
+
}];
|
|
618
|
+
readonly outputs: readonly [{
|
|
619
|
+
readonly type: "bool";
|
|
620
|
+
}];
|
|
621
|
+
readonly stateMutability: "view";
|
|
622
|
+
}, {
|
|
623
|
+
readonly type: "function";
|
|
624
|
+
readonly name: "isRetired";
|
|
625
|
+
readonly inputs: readonly [{
|
|
626
|
+
readonly name: "agentId";
|
|
627
|
+
readonly type: "uint256";
|
|
628
|
+
}];
|
|
629
|
+
readonly outputs: readonly [{
|
|
630
|
+
readonly type: "bool";
|
|
631
|
+
}];
|
|
632
|
+
readonly stateMutability: "view";
|
|
633
|
+
}, {
|
|
634
|
+
readonly type: "function";
|
|
635
|
+
readonly name: "isTradeAllowed";
|
|
636
|
+
readonly inputs: readonly [{
|
|
637
|
+
readonly name: "agentId";
|
|
638
|
+
readonly type: "uint256";
|
|
639
|
+
}, {
|
|
640
|
+
readonly name: "token";
|
|
641
|
+
readonly type: "address";
|
|
642
|
+
}, {
|
|
643
|
+
readonly name: "aggregator";
|
|
644
|
+
readonly type: "address";
|
|
645
|
+
}];
|
|
646
|
+
readonly outputs: readonly [{
|
|
647
|
+
readonly type: "bool";
|
|
648
|
+
}];
|
|
649
|
+
readonly stateMutability: "view";
|
|
650
|
+
}, {
|
|
651
|
+
readonly type: "function";
|
|
652
|
+
readonly name: "getRiskUniverse";
|
|
653
|
+
readonly inputs: readonly [{
|
|
654
|
+
readonly name: "agentId";
|
|
655
|
+
readonly type: "uint256";
|
|
656
|
+
}];
|
|
657
|
+
readonly outputs: readonly [{
|
|
658
|
+
readonly type: "uint8";
|
|
659
|
+
}];
|
|
660
|
+
readonly stateMutability: "view";
|
|
661
|
+
}, {
|
|
662
|
+
readonly type: "function";
|
|
663
|
+
readonly name: "tradeCount";
|
|
664
|
+
readonly inputs: readonly [{
|
|
665
|
+
readonly name: "agentId";
|
|
666
|
+
readonly type: "uint256";
|
|
667
|
+
}];
|
|
668
|
+
readonly outputs: readonly [{
|
|
669
|
+
readonly type: "uint256";
|
|
670
|
+
}];
|
|
671
|
+
readonly stateMutability: "view";
|
|
672
|
+
}, {
|
|
673
|
+
readonly type: "event";
|
|
674
|
+
readonly name: "AgentRetired";
|
|
675
|
+
readonly inputs: readonly [{
|
|
676
|
+
readonly name: "agentId";
|
|
677
|
+
readonly type: "uint256";
|
|
678
|
+
readonly indexed: true;
|
|
679
|
+
}];
|
|
680
|
+
}, {
|
|
681
|
+
readonly type: "event";
|
|
682
|
+
readonly name: "ConfigUpdated";
|
|
683
|
+
readonly inputs: readonly [{
|
|
684
|
+
readonly name: "agentId";
|
|
685
|
+
readonly type: "uint256";
|
|
686
|
+
readonly indexed: true;
|
|
687
|
+
}, {
|
|
688
|
+
readonly name: "oldConfigHash";
|
|
689
|
+
readonly type: "bytes32";
|
|
690
|
+
readonly indexed: false;
|
|
691
|
+
}, {
|
|
692
|
+
readonly name: "newConfigHash";
|
|
693
|
+
readonly type: "bytes32";
|
|
694
|
+
readonly indexed: false;
|
|
695
|
+
}, {
|
|
696
|
+
readonly name: "epochId";
|
|
697
|
+
readonly type: "uint256";
|
|
698
|
+
readonly indexed: false;
|
|
699
|
+
}, {
|
|
700
|
+
readonly name: "blockNumber";
|
|
701
|
+
readonly type: "uint256";
|
|
702
|
+
readonly indexed: false;
|
|
703
|
+
}];
|
|
704
|
+
}, {
|
|
705
|
+
readonly type: "error";
|
|
706
|
+
readonly name: "AgentNotOwner";
|
|
707
|
+
readonly inputs: readonly [];
|
|
708
|
+
}, {
|
|
709
|
+
readonly type: "error";
|
|
710
|
+
readonly name: "WalletAlreadyLinked";
|
|
711
|
+
readonly inputs: readonly [];
|
|
712
|
+
}, {
|
|
713
|
+
readonly type: "error";
|
|
714
|
+
readonly name: "WalletNotLinked";
|
|
715
|
+
readonly inputs: readonly [];
|
|
716
|
+
}, {
|
|
717
|
+
readonly type: "error";
|
|
718
|
+
readonly name: "InvalidSignature";
|
|
719
|
+
readonly inputs: readonly [];
|
|
720
|
+
}, {
|
|
721
|
+
readonly type: "error";
|
|
722
|
+
readonly name: "TransferDisabled";
|
|
723
|
+
readonly inputs: readonly [];
|
|
724
|
+
}, {
|
|
725
|
+
readonly type: "error";
|
|
726
|
+
readonly name: "InvalidMetadataURI";
|
|
727
|
+
readonly inputs: readonly [];
|
|
728
|
+
}, {
|
|
729
|
+
readonly type: "error";
|
|
730
|
+
readonly name: "AgentDoesNotExist";
|
|
731
|
+
readonly inputs: readonly [];
|
|
732
|
+
}, {
|
|
733
|
+
readonly type: "error";
|
|
734
|
+
readonly name: "NameAlreadyTaken";
|
|
735
|
+
readonly inputs: readonly [];
|
|
736
|
+
}, {
|
|
737
|
+
readonly type: "error";
|
|
738
|
+
readonly name: "InvalidName";
|
|
739
|
+
readonly inputs: readonly [];
|
|
740
|
+
}, {
|
|
741
|
+
readonly type: "error";
|
|
742
|
+
readonly name: "OwnerAlreadyHasAgent";
|
|
743
|
+
readonly inputs: readonly [{
|
|
744
|
+
readonly name: "existingAgentId";
|
|
745
|
+
readonly type: "uint256";
|
|
746
|
+
}];
|
|
747
|
+
}, {
|
|
748
|
+
readonly type: "error";
|
|
749
|
+
readonly name: "InvalidRiskUniverse";
|
|
750
|
+
readonly inputs: readonly [];
|
|
751
|
+
}, {
|
|
752
|
+
readonly type: "error";
|
|
753
|
+
readonly name: "InvalidTradingConfig";
|
|
754
|
+
readonly inputs: readonly [];
|
|
755
|
+
}, {
|
|
756
|
+
readonly type: "error";
|
|
757
|
+
readonly name: "NotAuthorizedCaller";
|
|
758
|
+
readonly inputs: readonly [];
|
|
759
|
+
}, {
|
|
760
|
+
readonly type: "error";
|
|
761
|
+
readonly name: "MetadataValueTooLarge";
|
|
762
|
+
readonly inputs: readonly [];
|
|
763
|
+
}, {
|
|
764
|
+
readonly type: "error";
|
|
765
|
+
readonly name: "AgentIsRetired";
|
|
766
|
+
readonly inputs: readonly [];
|
|
767
|
+
}, {
|
|
768
|
+
readonly type: "error";
|
|
769
|
+
readonly name: "InvalidRiskUniverseForWhitelist";
|
|
770
|
+
readonly inputs: readonly [];
|
|
771
|
+
}];
|
|
297
772
|
/**
|
|
298
773
|
* Wrapper for ExagentRegistry contract interactions
|
|
299
774
|
*/
|
|
@@ -385,11 +860,6 @@ declare class ExagentRegistry {
|
|
|
385
860
|
* @returns Current nonce
|
|
386
861
|
*/
|
|
387
862
|
getNonce(wallet: Address): Promise<bigint>;
|
|
388
|
-
/**
|
|
389
|
-
* Get the next agent ID that will be assigned
|
|
390
|
-
* @returns Next agent ID
|
|
391
|
-
*/
|
|
392
|
-
getNextAgentId(): Promise<bigint>;
|
|
393
863
|
/**
|
|
394
864
|
* Generate the message hash for wallet linking.
|
|
395
865
|
* Matches the contract's keccak256(abi.encodePacked(...)) exactly.
|
|
@@ -415,11 +885,6 @@ declare class ExagentRegistry {
|
|
|
415
885
|
canRegister: boolean;
|
|
416
886
|
existingAgentId: bigint;
|
|
417
887
|
}>;
|
|
418
|
-
/**
|
|
419
|
-
* Get the registry contract version
|
|
420
|
-
* @returns Version string (e.g., "4.0.0")
|
|
421
|
-
*/
|
|
422
|
-
getVersion(): Promise<string>;
|
|
423
888
|
/**
|
|
424
889
|
* Update the agent's LLM config hash on-chain
|
|
425
890
|
* @param agentId The agent's ID
|
|
@@ -433,29 +898,6 @@ declare class ExagentRegistry {
|
|
|
433
898
|
* @returns Config hash (bytes32(0) if never set)
|
|
434
899
|
*/
|
|
435
900
|
getConfigHash(agentId: bigint): Promise<`0x${string}`>;
|
|
436
|
-
/**
|
|
437
|
-
* Get the current epoch ID for an agent
|
|
438
|
-
* @param agentId The agent's ID
|
|
439
|
-
* @returns Current epoch (0 if never configured)
|
|
440
|
-
*/
|
|
441
|
-
getCurrentEpoch(agentId: bigint): Promise<bigint>;
|
|
442
|
-
/**
|
|
443
|
-
* Get full config info for an agent
|
|
444
|
-
* @param agentId The agent's ID
|
|
445
|
-
* @returns AgentConfig struct (configHash, epochId, epochStartBlock)
|
|
446
|
-
*/
|
|
447
|
-
getAgentConfig(agentId: bigint): Promise<{
|
|
448
|
-
configHash: `0x${string}`;
|
|
449
|
-
epochId: bigint;
|
|
450
|
-
epochStartBlock: bigint;
|
|
451
|
-
}>;
|
|
452
|
-
/**
|
|
453
|
-
* Get the config hash for a specific epoch
|
|
454
|
-
* @param agentId The agent's ID
|
|
455
|
-
* @param epochId The epoch to look up
|
|
456
|
-
* @returns Config hash for that epoch
|
|
457
|
-
*/
|
|
458
|
-
getEpochConfigHash(agentId: bigint, epochId: bigint): Promise<`0x${string}`>;
|
|
459
901
|
/**
|
|
460
902
|
* Calculate the config hash for a provider and model
|
|
461
903
|
* @param provider The LLM provider name (e.g., "openai", "anthropic")
|
|
@@ -1353,7 +1795,7 @@ declare class ExagentStaking {
|
|
|
1353
1795
|
}
|
|
1354
1796
|
|
|
1355
1797
|
/** SDK version — sent to API for version gating */
|
|
1356
|
-
declare const SDK_VERSION = "0.1.
|
|
1798
|
+
declare const SDK_VERSION = "0.1.13";
|
|
1357
1799
|
/**
|
|
1358
1800
|
* Default RPC URL for Base mainnet.
|
|
1359
1801
|
* Uses a higher-limit public endpoint to avoid rate-limiting.
|
|
@@ -2054,6 +2496,103 @@ declare class ExagentClient {
|
|
|
2054
2496
|
private parseAgentIdFromReceipt;
|
|
2055
2497
|
}
|
|
2056
2498
|
|
|
2499
|
+
/**
|
|
2500
|
+
* ABI for ExagentRouter custom errors
|
|
2501
|
+
* Used for decoding revert reasons from router transactions
|
|
2502
|
+
*/
|
|
2503
|
+
declare const EXAGENT_ROUTER_ABI: readonly [{
|
|
2504
|
+
readonly type: "error";
|
|
2505
|
+
readonly name: "InvalidAgentId";
|
|
2506
|
+
readonly inputs: readonly [];
|
|
2507
|
+
}, {
|
|
2508
|
+
readonly type: "error";
|
|
2509
|
+
readonly name: "SwapFailed";
|
|
2510
|
+
readonly inputs: readonly [];
|
|
2511
|
+
}, {
|
|
2512
|
+
readonly type: "error";
|
|
2513
|
+
readonly name: "InsufficientOutput";
|
|
2514
|
+
readonly inputs: readonly [];
|
|
2515
|
+
}, {
|
|
2516
|
+
readonly type: "error";
|
|
2517
|
+
readonly name: "ZeroAddress";
|
|
2518
|
+
readonly inputs: readonly [];
|
|
2519
|
+
}, {
|
|
2520
|
+
readonly type: "error";
|
|
2521
|
+
readonly name: "ZeroAmount";
|
|
2522
|
+
readonly inputs: readonly [];
|
|
2523
|
+
}, {
|
|
2524
|
+
readonly type: "error";
|
|
2525
|
+
readonly name: "AggregatorNotWhitelisted";
|
|
2526
|
+
readonly inputs: readonly [];
|
|
2527
|
+
}, {
|
|
2528
|
+
readonly type: "error";
|
|
2529
|
+
readonly name: "ETHTransferFailed";
|
|
2530
|
+
readonly inputs: readonly [];
|
|
2531
|
+
}, {
|
|
2532
|
+
readonly type: "error";
|
|
2533
|
+
readonly name: "FeeBpsTooHigh";
|
|
2534
|
+
readonly inputs: readonly [];
|
|
2535
|
+
}, {
|
|
2536
|
+
readonly type: "error";
|
|
2537
|
+
readonly name: "NotAuthorizedForAgent";
|
|
2538
|
+
readonly inputs: readonly [{
|
|
2539
|
+
readonly name: "agentId";
|
|
2540
|
+
readonly type: "uint256";
|
|
2541
|
+
}, {
|
|
2542
|
+
readonly name: "caller";
|
|
2543
|
+
readonly type: "address";
|
|
2544
|
+
}];
|
|
2545
|
+
}, {
|
|
2546
|
+
readonly type: "error";
|
|
2547
|
+
readonly name: "ConfigMismatch";
|
|
2548
|
+
readonly inputs: readonly [{
|
|
2549
|
+
readonly name: "provided";
|
|
2550
|
+
readonly type: "bytes32";
|
|
2551
|
+
}, {
|
|
2552
|
+
readonly name: "onChain";
|
|
2553
|
+
readonly type: "bytes32";
|
|
2554
|
+
}];
|
|
2555
|
+
}, {
|
|
2556
|
+
readonly type: "error";
|
|
2557
|
+
readonly name: "MsgValueMismatch";
|
|
2558
|
+
readonly inputs: readonly [];
|
|
2559
|
+
}, {
|
|
2560
|
+
readonly type: "error";
|
|
2561
|
+
readonly name: "FeeCollectorNotSet";
|
|
2562
|
+
readonly inputs: readonly [];
|
|
2563
|
+
}, {
|
|
2564
|
+
readonly type: "error";
|
|
2565
|
+
readonly name: "TokenNotAllowedForAgent";
|
|
2566
|
+
readonly inputs: readonly [{
|
|
2567
|
+
readonly name: "agentId";
|
|
2568
|
+
readonly type: "uint256";
|
|
2569
|
+
}, {
|
|
2570
|
+
readonly name: "token";
|
|
2571
|
+
readonly type: "address";
|
|
2572
|
+
}];
|
|
2573
|
+
}, {
|
|
2574
|
+
readonly type: "error";
|
|
2575
|
+
readonly name: "NotAuthorized";
|
|
2576
|
+
readonly inputs: readonly [];
|
|
2577
|
+
}, {
|
|
2578
|
+
readonly type: "error";
|
|
2579
|
+
readonly name: "RiskUniverseTooLow";
|
|
2580
|
+
readonly inputs: readonly [{
|
|
2581
|
+
readonly name: "agentId";
|
|
2582
|
+
readonly type: "uint256";
|
|
2583
|
+
}, {
|
|
2584
|
+
readonly name: "riskUniverse";
|
|
2585
|
+
readonly type: "uint256";
|
|
2586
|
+
}];
|
|
2587
|
+
}, {
|
|
2588
|
+
readonly type: "error";
|
|
2589
|
+
readonly name: "FillAlreadyProcessed";
|
|
2590
|
+
readonly inputs: readonly [{
|
|
2591
|
+
readonly name: "fillId";
|
|
2592
|
+
readonly type: "bytes32";
|
|
2593
|
+
}];
|
|
2594
|
+
}];
|
|
2595
|
+
|
|
2057
2596
|
/**
|
|
2058
2597
|
* ExagentVaultFactory ABI (Mainnet — no burn fee, seed-based creation)
|
|
2059
2598
|
*/
|
|
@@ -2364,4 +2903,4 @@ declare class ExagentVaultFactory {
|
|
|
2364
2903
|
}>;
|
|
2365
2904
|
}
|
|
2366
2905
|
|
|
2367
|
-
export { type AgentMetadata, type AgentProfile, type StakingInfo$1 as ApiStakingInfo, CHAIN_CONFIG, CONTRACT_ADDRESSES, type CanCreateVaultResult, type CreateVaultOptions, DEFAULT_RPC_URL, DEX_ADDRESSES, type DepositInfo, EXAGENT_API_CONFIG, EXAGENT_STAKING_ABI, EXAGENT_VAULT_FACTORY_ABI, type EarningsTierInfo, ExagentClient, type ExagentClientConfig, ExagentRegistry, ExagentStaking, ExagentVault, ExagentVaultFactory, type GlobalAgentId, type LockInfo, type NetworkType, type PerformanceSnapshot, type PriceQuote, type RouteQuote, type RouteStep, type RouterTradeResponse, SDK_VERSION, type ServiceRequest, type StakeInfo, type StakingInfo, type TradeIntent, type TradeResult, type UserVaultPosition, type VaultActivityEntry, type VaultConfig, type VaultCreationRequirements, type VaultInfo, type VaultPosition, type VaultSummary, type VaultTradeEntry, type WithdrawalRequest, ZERO_X_CONFIG, buildGlobalAgentId, getRpcUrl, parseGlobalAgentId };
|
|
2906
|
+
export { type AgentMetadata, type AgentProfile, type StakingInfo$1 as ApiStakingInfo, CHAIN_CONFIG, CONTRACT_ADDRESSES, type CanCreateVaultResult, type CreateVaultOptions, DEFAULT_RPC_URL, DEX_ADDRESSES, type DepositInfo, EXAGENT_API_CONFIG, EXAGENT_REGISTRY_ABI, EXAGENT_ROUTER_ABI, EXAGENT_STAKING_ABI, EXAGENT_VAULT_FACTORY_ABI, type EarningsTierInfo, ExagentClient, type ExagentClientConfig, ExagentRegistry, ExagentStaking, ExagentVault, ExagentVaultFactory, type GlobalAgentId, type LockInfo, type NetworkType, type PerformanceSnapshot, type PriceQuote, type RouteQuote, type RouteStep, type RouterTradeResponse, SDK_VERSION, type ServiceRequest, type StakeInfo, type StakingInfo, type TradeIntent, type TradeResult, type UserVaultPosition, type VaultActivityEntry, type VaultConfig, type VaultCreationRequirements, type VaultInfo, type VaultPosition, type VaultSummary, type VaultTradeEntry, type WithdrawalRequest, ZERO_X_CONFIG, buildGlobalAgentId, getRpcUrl, parseGlobalAgentId };
|