@metamask/bridge-controller 72.0.4 → 73.0.1

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 (86) hide show
  1. package/CHANGELOG.md +41 -1
  2. package/dist/bridge-controller-method-action-types.cjs.map +1 -1
  3. package/dist/bridge-controller-method-action-types.d.cts +5 -1
  4. package/dist/bridge-controller-method-action-types.d.cts.map +1 -1
  5. package/dist/bridge-controller-method-action-types.d.mts +5 -1
  6. package/dist/bridge-controller-method-action-types.d.mts.map +1 -1
  7. package/dist/bridge-controller-method-action-types.mjs.map +1 -1
  8. package/dist/bridge-controller.cjs +71 -2
  9. package/dist/bridge-controller.cjs.map +1 -1
  10. package/dist/bridge-controller.d.cts +8 -0
  11. package/dist/bridge-controller.d.cts.map +1 -1
  12. package/dist/bridge-controller.d.mts +8 -0
  13. package/dist/bridge-controller.d.mts.map +1 -1
  14. package/dist/bridge-controller.mjs +72 -3
  15. package/dist/bridge-controller.mjs.map +1 -1
  16. package/dist/constants/bridge.cjs +2 -0
  17. package/dist/constants/bridge.cjs.map +1 -1
  18. package/dist/constants/bridge.d.cts.map +1 -1
  19. package/dist/constants/bridge.d.mts.map +1 -1
  20. package/dist/constants/bridge.mjs +2 -0
  21. package/dist/constants/bridge.mjs.map +1 -1
  22. package/dist/index.cjs +4 -2
  23. package/dist/index.cjs.map +1 -1
  24. package/dist/index.d.cts +4 -4
  25. package/dist/index.d.cts.map +1 -1
  26. package/dist/index.d.mts +4 -4
  27. package/dist/index.d.mts.map +1 -1
  28. package/dist/index.mjs +2 -2
  29. package/dist/index.mjs.map +1 -1
  30. package/dist/selectors.cjs +36 -4
  31. package/dist/selectors.cjs.map +1 -1
  32. package/dist/selectors.d.cts +3672 -3111
  33. package/dist/selectors.d.cts.map +1 -1
  34. package/dist/selectors.d.mts +3672 -3111
  35. package/dist/selectors.d.mts.map +1 -1
  36. package/dist/selectors.mjs +36 -4
  37. package/dist/selectors.mjs.map +1 -1
  38. package/dist/types.cjs.map +1 -1
  39. package/dist/types.d.cts +20 -2
  40. package/dist/types.d.cts.map +1 -1
  41. package/dist/types.d.mts +20 -2
  42. package/dist/types.d.mts.map +1 -1
  43. package/dist/types.mjs.map +1 -1
  44. package/dist/utils/bridge.cjs.map +1 -1
  45. package/dist/utils/bridge.d.cts +9 -9
  46. package/dist/utils/bridge.d.cts.map +1 -1
  47. package/dist/utils/bridge.d.mts +9 -9
  48. package/dist/utils/bridge.d.mts.map +1 -1
  49. package/dist/utils/bridge.mjs.map +1 -1
  50. package/dist/utils/fetch.cjs +55 -1
  51. package/dist/utils/fetch.cjs.map +1 -1
  52. package/dist/utils/fetch.d.cts +15 -1
  53. package/dist/utils/fetch.d.cts.map +1 -1
  54. package/dist/utils/fetch.d.mts +15 -1
  55. package/dist/utils/fetch.d.mts.map +1 -1
  56. package/dist/utils/fetch.mjs +53 -1
  57. package/dist/utils/fetch.mjs.map +1 -1
  58. package/dist/utils/metrics/constants.cjs +1 -0
  59. package/dist/utils/metrics/constants.cjs.map +1 -1
  60. package/dist/utils/metrics/constants.d.cts +2 -1
  61. package/dist/utils/metrics/constants.d.cts.map +1 -1
  62. package/dist/utils/metrics/constants.d.mts +2 -1
  63. package/dist/utils/metrics/constants.d.mts.map +1 -1
  64. package/dist/utils/metrics/constants.mjs +1 -0
  65. package/dist/utils/metrics/constants.mjs.map +1 -1
  66. package/dist/utils/quote.cjs +26 -5
  67. package/dist/utils/quote.cjs.map +1 -1
  68. package/dist/utils/quote.d.cts +16 -1
  69. package/dist/utils/quote.d.cts.map +1 -1
  70. package/dist/utils/quote.d.mts +16 -1
  71. package/dist/utils/quote.d.mts.map +1 -1
  72. package/dist/utils/quote.mjs +24 -4
  73. package/dist/utils/quote.mjs.map +1 -1
  74. package/dist/utils/slippage.d.cts +1 -1
  75. package/dist/utils/slippage.d.mts +1 -1
  76. package/dist/utils/trade-utils.d.cts +4 -4
  77. package/dist/utils/trade-utils.d.mts +4 -4
  78. package/dist/utils/validators.cjs +82 -51
  79. package/dist/utils/validators.cjs.map +1 -1
  80. package/dist/utils/validators.d.cts +317 -1451
  81. package/dist/utils/validators.d.cts.map +1 -1
  82. package/dist/utils/validators.d.mts +317 -1451
  83. package/dist/utils/validators.d.mts.map +1 -1
  84. package/dist/utils/validators.mjs +80 -50
  85. package/dist/utils/validators.mjs.map +1 -1
  86. package/package.json +8 -8
@@ -13,7 +13,7 @@ export declare enum ActionTypes {
13
13
  SWAP = "swap",
14
14
  REFUEL = "refuel"
15
15
  }
16
- export declare const truthyString: (s: string) => boolean;
16
+ export declare const truthyString: (value: string) => boolean;
17
17
  export declare const BridgeAssetSchema: import("@metamask/superstruct").Struct<{
18
18
  symbol: string;
19
19
  chainId: number;
@@ -518,32 +518,32 @@ export declare const StepSchema: import("@metamask/superstruct").Struct<{
518
518
  * protocols (e.g. CoW Swap) to build, sign, and submit an order.
519
519
  */
520
520
  export declare const IntentOrderSchema: import("@metamask/superstruct").Struct<{
521
- sellToken: string;
522
- buyToken: string;
521
+ sellToken: `0x${string}`;
522
+ buyToken: `0x${string}`;
523
523
  validTo: string | number;
524
524
  appData: string;
525
- appDataHash: string;
525
+ appDataHash: `0x${string}`;
526
526
  feeAmount: string;
527
527
  kind: "sell" | "buy";
528
528
  partiallyFillable: boolean;
529
- receiver?: string | undefined;
529
+ receiver?: `0x${string}` | undefined;
530
530
  sellAmount?: string | undefined;
531
531
  buyAmount?: string | undefined;
532
- from?: string | undefined;
532
+ from?: `0x${string}` | undefined;
533
533
  }, {
534
534
  /**
535
535
  * Address of the token being sold.
536
536
  */
537
- sellToken: import("@metamask/superstruct").Struct<string, null>;
537
+ sellToken: import("@metamask/superstruct").Struct<`0x${string}`, null>;
538
538
  /**
539
539
  * Address of the token being bought.
540
540
  */
541
- buyToken: import("@metamask/superstruct").Struct<string, null>;
541
+ buyToken: import("@metamask/superstruct").Struct<`0x${string}`, null>;
542
542
  /**
543
543
  * Optional receiver of the bought tokens.
544
544
  * If omitted, defaults to the signer / order owner.
545
545
  */
546
- receiver: import("@metamask/superstruct").Struct<string | undefined, null>;
546
+ receiver: import("@metamask/superstruct").Struct<`0x${string}` | undefined, null>;
547
547
  /**
548
548
  * Order expiration time.
549
549
  *
@@ -558,7 +558,7 @@ export declare const IntentOrderSchema: import("@metamask/superstruct").Struct<{
558
558
  /**
559
559
  * Hash of the `appData` field, used for EIP-712 signing.
560
560
  */
561
- appDataHash: import("@metamask/superstruct").Struct<string, null>;
561
+ appDataHash: import("@metamask/superstruct").Struct<`0x${string}`, null>;
562
562
  /**
563
563
  * Fee amount paid for order execution, expressed as a digit string.
564
564
  */
@@ -594,7 +594,7 @@ export declare const IntentOrderSchema: import("@metamask/superstruct").Struct<{
594
594
  *
595
595
  * Provided for convenience when building the EIP-712 domain and message.
596
596
  */
597
- from: import("@metamask/superstruct").Struct<string | undefined, null>;
597
+ from: import("@metamask/superstruct").Struct<`0x${string}` | undefined, null>;
598
598
  }>;
599
599
  /**
600
600
  * Schema representing an intent submission payload.
@@ -605,18 +605,18 @@ export declare const IntentOrderSchema: import("@metamask/superstruct").Struct<{
605
605
  export declare const IntentSchema: import("@metamask/superstruct").Struct<{
606
606
  protocol: string;
607
607
  order: {
608
- sellToken: string;
609
- buyToken: string;
608
+ sellToken: `0x${string}`;
609
+ buyToken: `0x${string}`;
610
610
  validTo: string | number;
611
611
  appData: string;
612
- appDataHash: string;
612
+ appDataHash: `0x${string}`;
613
613
  feeAmount: string;
614
614
  kind: "sell" | "buy";
615
615
  partiallyFillable: boolean;
616
- receiver?: string | undefined;
616
+ receiver?: `0x${string}` | undefined;
617
617
  sellAmount?: string | undefined;
618
618
  buyAmount?: string | undefined;
619
- from?: string | undefined;
619
+ from?: `0x${string}` | undefined;
620
620
  };
621
621
  typedData: {
622
622
  types: Record<string, {
@@ -627,7 +627,7 @@ export declare const IntentSchema: import("@metamask/superstruct").Struct<{
627
627
  domain: Record<string, any>;
628
628
  message: Record<string, any>;
629
629
  };
630
- settlementContract?: string | undefined;
630
+ settlementContract?: `0x${string}` | undefined;
631
631
  }, {
632
632
  /**
633
633
  * Identifier of the intent protocol used to interpret the order.
@@ -637,32 +637,32 @@ export declare const IntentSchema: import("@metamask/superstruct").Struct<{
637
637
  * The intent order to be signed and submitted.
638
638
  */
639
639
  order: import("@metamask/superstruct").Struct<{
640
- sellToken: string;
641
- buyToken: string;
640
+ sellToken: `0x${string}`;
641
+ buyToken: `0x${string}`;
642
642
  validTo: string | number;
643
643
  appData: string;
644
- appDataHash: string;
644
+ appDataHash: `0x${string}`;
645
645
  feeAmount: string;
646
646
  kind: "sell" | "buy";
647
647
  partiallyFillable: boolean;
648
- receiver?: string | undefined;
648
+ receiver?: `0x${string}` | undefined;
649
649
  sellAmount?: string | undefined;
650
650
  buyAmount?: string | undefined;
651
- from?: string | undefined;
651
+ from?: `0x${string}` | undefined;
652
652
  }, {
653
653
  /**
654
654
  * Address of the token being sold.
655
655
  */
656
- sellToken: import("@metamask/superstruct").Struct<string, null>;
656
+ sellToken: import("@metamask/superstruct").Struct<`0x${string}`, null>;
657
657
  /**
658
658
  * Address of the token being bought.
659
659
  */
660
- buyToken: import("@metamask/superstruct").Struct<string, null>;
660
+ buyToken: import("@metamask/superstruct").Struct<`0x${string}`, null>;
661
661
  /**
662
662
  * Optional receiver of the bought tokens.
663
663
  * If omitted, defaults to the signer / order owner.
664
664
  */
665
- receiver: import("@metamask/superstruct").Struct<string | undefined, null>;
665
+ receiver: import("@metamask/superstruct").Struct<`0x${string}` | undefined, null>;
666
666
  /**
667
667
  * Order expiration time.
668
668
  *
@@ -677,7 +677,7 @@ export declare const IntentSchema: import("@metamask/superstruct").Struct<{
677
677
  /**
678
678
  * Hash of the `appData` field, used for EIP-712 signing.
679
679
  */
680
- appDataHash: import("@metamask/superstruct").Struct<string, null>;
680
+ appDataHash: import("@metamask/superstruct").Struct<`0x${string}`, null>;
681
681
  /**
682
682
  * Fee amount paid for order execution, expressed as a digit string.
683
683
  */
@@ -713,12 +713,12 @@ export declare const IntentSchema: import("@metamask/superstruct").Struct<{
713
713
  *
714
714
  * Provided for convenience when building the EIP-712 domain and message.
715
715
  */
716
- from: import("@metamask/superstruct").Struct<string | undefined, null>;
716
+ from: import("@metamask/superstruct").Struct<`0x${string}` | undefined, null>;
717
717
  }>;
718
718
  /**
719
719
  * Optional settlement contract address used for execution.
720
720
  */
721
- settlementContract: import("@metamask/superstruct").Struct<string | undefined, null>;
721
+ settlementContract: import("@metamask/superstruct").Struct<`0x${string}` | undefined, null>;
722
722
  /**
723
723
  * Optional EIP-712 typed data payload for signing.
724
724
  * Must be JSON-serializable and include required EIP-712 fields.
@@ -741,7 +741,33 @@ export declare const IntentSchema: import("@metamask/superstruct").Struct<{
741
741
  message: import("@metamask/superstruct").Struct<Record<string, any>, null>;
742
742
  }>;
743
743
  }>;
744
+ export declare const TxFeeGasLimitsSchema: import("@metamask/superstruct").Struct<{
745
+ maxFeePerGas: string;
746
+ maxPriorityFeePerGas: string;
747
+ }, {
748
+ maxFeePerGas: import("@metamask/superstruct").Struct<string, null>;
749
+ maxPriorityFeePerGas: import("@metamask/superstruct").Struct<string, null>;
750
+ }>;
751
+ export declare const GaslessPropertiesSchema: import("@metamask/superstruct").Struct<{
752
+ gasIncluded?: boolean | undefined;
753
+ gasIncluded7702?: boolean | undefined;
754
+ gasSponsored?: boolean | undefined;
755
+ }, {
756
+ gasIncluded: import("@metamask/superstruct").Struct<boolean | undefined, null>;
757
+ /**
758
+ * Whether the quote can use EIP-7702 delegated gasless execution
759
+ */
760
+ gasIncluded7702: import("@metamask/superstruct").Struct<boolean | undefined, null>;
761
+ /**
762
+ * A third party sponsors the gas. If true, then gasIncluded7702 is also true.
763
+ */
764
+ gasSponsored: import("@metamask/superstruct").Struct<boolean | undefined, null>;
765
+ }>;
744
766
  export declare const QuoteSchema: import("@metamask/superstruct").Struct<{
767
+ gasIncluded?: boolean | undefined;
768
+ gasIncluded7702?: boolean | undefined;
769
+ gasSponsored?: boolean | undefined;
770
+ } & {
745
771
  srcChainId: number;
746
772
  destChainId: number;
747
773
  srcAsset: {
@@ -865,679 +891,29 @@ export declare const QuoteSchema: import("@metamask/superstruct").Struct<{
865
891
  };
866
892
  destChainId?: number | undefined;
867
893
  } | undefined;
868
- gasIncluded?: boolean | undefined;
869
- gasIncluded7702?: boolean | undefined;
870
894
  priceData?: {
871
895
  totalFromAmountUsd?: string | undefined;
872
896
  totalToAmountUsd?: string | undefined;
873
897
  priceImpact?: string | undefined;
874
898
  totalFeeAmountUsd?: string | undefined;
875
- } | undefined;
876
- intent?: {
877
- protocol: string;
878
- order: {
879
- sellToken: string;
880
- buyToken: string;
881
- validTo: string | number;
882
- appData: string;
883
- appDataHash: string;
884
- feeAmount: string;
885
- kind: "sell" | "buy";
886
- partiallyFillable: boolean;
887
- receiver?: string | undefined;
888
- sellAmount?: string | undefined;
889
- buyAmount?: string | undefined;
890
- from?: string | undefined;
891
- };
892
- typedData: {
893
- types: Record<string, {
894
- name: string;
895
- type: string;
896
- }[]>;
897
- primaryType: string;
898
- domain: Record<string, any>;
899
- message: Record<string, any>;
900
- };
901
- settlementContract?: string | undefined;
902
- } | undefined;
903
- gasSponsored?: boolean | undefined;
904
- }, {
905
- requestId: import("@metamask/superstruct").Struct<string, null>;
906
- srcChainId: import("@metamask/superstruct").Struct<number, null>;
907
- srcAsset: import("@metamask/superstruct").Struct<{
908
- symbol: string;
909
- chainId: number;
910
- address: string;
911
- assetId: `${string}:${string}/${string}:${string}`;
912
- name: string;
913
- decimals: number;
914
- icon?: string | null | undefined;
915
- iconUrl?: string | null | undefined;
916
- }, {
917
- /**
918
- * The chainId of the token
919
- */
920
- chainId: import("@metamask/superstruct").Struct<number, null>;
921
- /**
922
- * An address that the metaswap-api recognizes as the default token
923
- */
924
- address: import("@metamask/superstruct").Struct<string, null>;
925
- /**
926
- * The assetId of the token
927
- */
928
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
929
- /**
930
- * The symbol of token object
931
- */
932
- symbol: import("@metamask/superstruct").Struct<string, null>;
933
- /**
934
- * The name for the network
935
- */
936
- name: import("@metamask/superstruct").Struct<string, null>;
937
- decimals: import("@metamask/superstruct").Struct<number, null>;
938
- /**
939
- * URL for token icon
940
- */
941
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
942
- /**
943
- * URL for token icon
944
- */
945
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
946
- }>;
947
- /**
948
- * The amount sent, in atomic amount: amount sent - fees
949
- * Some tokens have a fee of 0, so sometimes it's equal to amount sent
950
- */
951
- srcTokenAmount: import("@metamask/superstruct").Struct<string, null>;
952
- destChainId: import("@metamask/superstruct").Struct<number, null>;
953
- destAsset: import("@metamask/superstruct").Struct<{
954
- symbol: string;
955
- chainId: number;
956
- address: string;
957
- assetId: `${string}:${string}/${string}:${string}`;
958
- name: string;
959
- decimals: number;
960
- icon?: string | null | undefined;
961
- iconUrl?: string | null | undefined;
962
- }, {
963
- /**
964
- * The chainId of the token
965
- */
966
- chainId: import("@metamask/superstruct").Struct<number, null>;
967
- /**
968
- * An address that the metaswap-api recognizes as the default token
969
- */
970
- address: import("@metamask/superstruct").Struct<string, null>;
971
- /**
972
- * The assetId of the token
973
- */
974
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
975
- /**
976
- * The symbol of token object
977
- */
978
- symbol: import("@metamask/superstruct").Struct<string, null>;
979
- /**
980
- * The name for the network
981
- */
982
- name: import("@metamask/superstruct").Struct<string, null>;
983
- decimals: import("@metamask/superstruct").Struct<number, null>;
984
- /**
985
- * URL for token icon
986
- */
987
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
988
- /**
989
- * URL for token icon
990
- */
991
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
992
- }>;
993
- /**
994
- * The amount received, in atomic amount
995
- */
996
- destTokenAmount: import("@metamask/superstruct").Struct<string, null>;
997
- /**
998
- * The minimum amount that will be received, in atomic amount
999
- */
1000
- minDestTokenAmount: import("@metamask/superstruct").Struct<string, null>;
1001
- feeData: import("@metamask/superstruct").Struct<{
1002
- metabridge: {
1003
- amount: string;
1004
- asset: {
1005
- symbol: string;
1006
- chainId: number;
1007
- address: string;
1008
- assetId: `${string}:${string}/${string}:${string}`;
1009
- name: string;
1010
- decimals: number;
1011
- icon?: string | null | undefined;
1012
- iconUrl?: string | null | undefined;
1013
- };
1014
- };
1015
- txFee?: ({
1016
- amount: string;
1017
- asset: {
1018
- symbol: string;
1019
- chainId: number;
1020
- address: string;
1021
- assetId: `${string}:${string}/${string}:${string}`;
1022
- name: string;
1023
- decimals: number;
1024
- icon?: string | null | undefined;
1025
- iconUrl?: string | null | undefined;
1026
- };
1027
- } & {
1028
- maxFeePerGas: string;
1029
- maxPriorityFeePerGas: string;
1030
- }) | undefined;
1031
- }, {
1032
- metabridge: import("@metamask/superstruct").Struct<{
1033
- amount: string;
1034
- asset: {
1035
- symbol: string;
1036
- chainId: number;
1037
- address: string;
1038
- assetId: `${string}:${string}/${string}:${string}`;
1039
- name: string;
1040
- decimals: number;
1041
- icon?: string | null | undefined;
1042
- iconUrl?: string | null | undefined;
1043
- };
1044
- }, {
1045
- amount: import("@metamask/superstruct").Struct<string, null>;
1046
- asset: import("@metamask/superstruct").Struct<{
1047
- symbol: string;
1048
- chainId: number;
1049
- address: string;
1050
- assetId: `${string}:${string}/${string}:${string}`;
1051
- name: string;
1052
- decimals: number;
1053
- icon?: string | null | undefined;
1054
- iconUrl?: string | null | undefined;
1055
- }, {
1056
- /**
1057
- * The chainId of the token
1058
- */
1059
- chainId: import("@metamask/superstruct").Struct<number, null>;
1060
- /**
1061
- * An address that the metaswap-api recognizes as the default token
1062
- */
1063
- address: import("@metamask/superstruct").Struct<string, null>;
1064
- /**
1065
- * The assetId of the token
1066
- */
1067
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
1068
- /**
1069
- * The symbol of token object
1070
- */
1071
- symbol: import("@metamask/superstruct").Struct<string, null>;
1072
- /**
1073
- * The name for the network
1074
- */
1075
- name: import("@metamask/superstruct").Struct<string, null>;
1076
- decimals: import("@metamask/superstruct").Struct<number, null>;
1077
- /**
1078
- * URL for token icon
1079
- */
1080
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1081
- /**
1082
- * URL for token icon
1083
- */
1084
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1085
- }>;
1086
- }>;
1087
- /**
1088
- * This is the fee for the swap transaction taken from either the
1089
- * src or dest token if the quote has gas fees included or "gasless"
1090
- */
1091
- txFee: import("@metamask/superstruct").Struct<({
1092
- amount: string;
1093
- asset: {
1094
- symbol: string;
1095
- chainId: number;
1096
- address: string;
1097
- assetId: `${string}:${string}/${string}:${string}`;
1098
- name: string;
1099
- decimals: number;
1100
- icon?: string | null | undefined;
1101
- iconUrl?: string | null | undefined;
1102
- };
1103
- } & {
1104
- maxFeePerGas: string;
1105
- maxPriorityFeePerGas: string;
1106
- }) | undefined, null>;
1107
- }>;
1108
- gasIncluded: import("@metamask/superstruct").Struct<boolean | undefined, null>;
1109
- /**
1110
- * Whether the quote can use EIP-7702 delegated gasless execution
1111
- */
1112
- gasIncluded7702: import("@metamask/superstruct").Struct<boolean | undefined, null>;
1113
- bridgeId: import("@metamask/superstruct").Struct<string, null>;
1114
- bridges: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
1115
- steps: import("@metamask/superstruct").Struct<{
1116
- action: ActionTypes;
1117
- srcChainId: number;
1118
- srcAsset: {
1119
- symbol: string;
1120
- chainId: number;
1121
- address: string;
1122
- assetId: `${string}:${string}/${string}:${string}`;
1123
- name: string;
1124
- decimals: number;
1125
- icon?: string | null | undefined;
1126
- iconUrl?: string | null | undefined;
1127
- };
1128
- destAsset: {
1129
- symbol: string;
1130
- chainId: number;
1131
- address: string;
1132
- assetId: `${string}:${string}/${string}:${string}`;
1133
- name: string;
1134
- decimals: number;
1135
- icon?: string | null | undefined;
1136
- iconUrl?: string | null | undefined;
1137
- };
1138
- srcAmount: string;
1139
- destAmount: string;
1140
- protocol: {
1141
- name: string;
1142
- icon?: string | undefined;
1143
- displayName?: string | undefined;
1144
- };
1145
- destChainId?: number | undefined;
1146
- }[], import("@metamask/superstruct").Struct<{
1147
- action: ActionTypes;
1148
- srcChainId: number;
1149
- srcAsset: {
1150
- symbol: string;
1151
- chainId: number;
1152
- address: string;
1153
- assetId: `${string}:${string}/${string}:${string}`;
1154
- name: string;
1155
- decimals: number;
1156
- icon?: string | null | undefined;
1157
- iconUrl?: string | null | undefined;
1158
- };
1159
- destAsset: {
1160
- symbol: string;
1161
- chainId: number;
1162
- address: string;
1163
- assetId: `${string}:${string}/${string}:${string}`;
1164
- name: string;
1165
- decimals: number;
1166
- icon?: string | null | undefined;
1167
- iconUrl?: string | null | undefined;
1168
- };
1169
- srcAmount: string;
1170
- destAmount: string;
1171
- protocol: {
1172
- name: string;
1173
- icon?: string | undefined;
1174
- displayName?: string | undefined;
1175
- };
1176
- destChainId?: number | undefined;
1177
- }, {
1178
- action: import("@metamask/superstruct").Struct<ActionTypes, {
1179
- bridge: ActionTypes.BRIDGE;
1180
- swap: ActionTypes.SWAP;
1181
- refuel: ActionTypes.REFUEL;
1182
- }>;
1183
- srcChainId: import("@metamask/superstruct").Struct<number, null>;
1184
- destChainId: import("@metamask/superstruct").Struct<number | undefined, null>;
1185
- srcAsset: import("@metamask/superstruct").Struct<{
1186
- symbol: string;
1187
- chainId: number;
1188
- address: string;
1189
- assetId: `${string}:${string}/${string}:${string}`;
1190
- name: string;
1191
- decimals: number;
1192
- icon?: string | null | undefined;
1193
- iconUrl?: string | null | undefined;
1194
- }, {
1195
- /**
1196
- * The chainId of the token
1197
- */
1198
- chainId: import("@metamask/superstruct").Struct<number, null>;
1199
- /**
1200
- * An address that the metaswap-api recognizes as the default token
1201
- */
1202
- address: import("@metamask/superstruct").Struct<string, null>;
1203
- /**
1204
- * The assetId of the token
1205
- */
1206
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
1207
- /**
1208
- * The symbol of token object
1209
- */
1210
- symbol: import("@metamask/superstruct").Struct<string, null>;
1211
- /**
1212
- * The name for the network
1213
- */
1214
- name: import("@metamask/superstruct").Struct<string, null>;
1215
- decimals: import("@metamask/superstruct").Struct<number, null>;
1216
- /**
1217
- * URL for token icon
1218
- */
1219
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1220
- /**
1221
- * URL for token icon
1222
- */
1223
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1224
- }>;
1225
- destAsset: import("@metamask/superstruct").Struct<{
1226
- symbol: string;
1227
- chainId: number;
1228
- address: string;
1229
- assetId: `${string}:${string}/${string}:${string}`;
1230
- name: string;
1231
- decimals: number;
1232
- icon?: string | null | undefined;
1233
- iconUrl?: string | null | undefined;
1234
- }, {
1235
- /**
1236
- * The chainId of the token
1237
- */
1238
- chainId: import("@metamask/superstruct").Struct<number, null>;
1239
- /**
1240
- * An address that the metaswap-api recognizes as the default token
1241
- */
1242
- address: import("@metamask/superstruct").Struct<string, null>;
1243
- /**
1244
- * The assetId of the token
1245
- */
1246
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
1247
- /**
1248
- * The symbol of token object
1249
- */
1250
- symbol: import("@metamask/superstruct").Struct<string, null>;
1251
- /**
1252
- * The name for the network
1253
- */
1254
- name: import("@metamask/superstruct").Struct<string, null>;
1255
- decimals: import("@metamask/superstruct").Struct<number, null>;
1256
- /**
1257
- * URL for token icon
1258
- */
1259
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1260
- /**
1261
- * URL for token icon
1262
- */
1263
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1264
- }>;
1265
- srcAmount: import("@metamask/superstruct").Struct<string, null>;
1266
- destAmount: import("@metamask/superstruct").Struct<string, null>;
1267
- protocol: import("@metamask/superstruct").Struct<{
1268
- name: string;
1269
- icon?: string | undefined;
1270
- displayName?: string | undefined;
1271
- }, {
1272
- name: import("@metamask/superstruct").Struct<string, null>;
1273
- displayName: import("@metamask/superstruct").Struct<string | undefined, null>;
1274
- icon: import("@metamask/superstruct").Struct<string | undefined, null>;
1275
- }>;
1276
- }>>;
1277
- refuel: import("@metamask/superstruct").Struct<{
1278
- action: ActionTypes;
1279
- srcChainId: number;
1280
- srcAsset: {
1281
- symbol: string;
1282
- chainId: number;
1283
- address: string;
1284
- assetId: `${string}:${string}/${string}:${string}`;
1285
- name: string;
1286
- decimals: number;
1287
- icon?: string | null | undefined;
1288
- iconUrl?: string | null | undefined;
1289
- };
1290
- destAsset: {
1291
- symbol: string;
1292
- chainId: number;
1293
- address: string;
1294
- assetId: `${string}:${string}/${string}:${string}`;
1295
- name: string;
1296
- decimals: number;
1297
- icon?: string | null | undefined;
1298
- iconUrl?: string | null | undefined;
1299
- };
1300
- srcAmount: string;
1301
- destAmount: string;
1302
- protocol: {
1303
- name: string;
1304
- icon?: string | undefined;
1305
- displayName?: string | undefined;
1306
- };
1307
- destChainId?: number | undefined;
1308
- } | undefined, {
1309
- action: import("@metamask/superstruct").Struct<ActionTypes, {
1310
- bridge: ActionTypes.BRIDGE;
1311
- swap: ActionTypes.SWAP;
1312
- refuel: ActionTypes.REFUEL;
1313
- }>;
1314
- srcChainId: import("@metamask/superstruct").Struct<number, null>;
1315
- destChainId: import("@metamask/superstruct").Struct<number | undefined, null>;
1316
- srcAsset: import("@metamask/superstruct").Struct<{
1317
- symbol: string;
1318
- chainId: number;
1319
- address: string;
1320
- assetId: `${string}:${string}/${string}:${string}`;
1321
- name: string;
1322
- decimals: number;
1323
- icon?: string | null | undefined;
1324
- iconUrl?: string | null | undefined;
1325
- }, {
1326
- /**
1327
- * The chainId of the token
1328
- */
1329
- chainId: import("@metamask/superstruct").Struct<number, null>;
1330
- /**
1331
- * An address that the metaswap-api recognizes as the default token
1332
- */
1333
- address: import("@metamask/superstruct").Struct<string, null>;
1334
- /**
1335
- * The assetId of the token
1336
- */
1337
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
1338
- /**
1339
- * The symbol of token object
1340
- */
1341
- symbol: import("@metamask/superstruct").Struct<string, null>;
1342
- /**
1343
- * The name for the network
1344
- */
1345
- name: import("@metamask/superstruct").Struct<string, null>;
1346
- decimals: import("@metamask/superstruct").Struct<number, null>;
1347
- /**
1348
- * URL for token icon
1349
- */
1350
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1351
- /**
1352
- * URL for token icon
1353
- */
1354
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1355
- }>;
1356
- destAsset: import("@metamask/superstruct").Struct<{
1357
- symbol: string;
1358
- chainId: number;
1359
- address: string;
1360
- assetId: `${string}:${string}/${string}:${string}`;
1361
- name: string;
1362
- decimals: number;
1363
- icon?: string | null | undefined;
1364
- iconUrl?: string | null | undefined;
1365
- }, {
1366
- /**
1367
- * The chainId of the token
1368
- */
1369
- chainId: import("@metamask/superstruct").Struct<number, null>;
1370
- /**
1371
- * An address that the metaswap-api recognizes as the default token
1372
- */
1373
- address: import("@metamask/superstruct").Struct<string, null>;
1374
- /**
1375
- * The assetId of the token
1376
- */
1377
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
1378
- /**
1379
- * The symbol of token object
1380
- */
1381
- symbol: import("@metamask/superstruct").Struct<string, null>;
1382
- /**
1383
- * The name for the network
1384
- */
1385
- name: import("@metamask/superstruct").Struct<string, null>;
1386
- decimals: import("@metamask/superstruct").Struct<number, null>;
1387
- /**
1388
- * URL for token icon
1389
- */
1390
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1391
- /**
1392
- * URL for token icon
1393
- */
1394
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1395
- }>;
1396
- srcAmount: import("@metamask/superstruct").Struct<string, null>;
1397
- destAmount: import("@metamask/superstruct").Struct<string, null>;
1398
- protocol: import("@metamask/superstruct").Struct<{
1399
- name: string;
1400
- icon?: string | undefined;
1401
- displayName?: string | undefined;
1402
- }, {
1403
- name: import("@metamask/superstruct").Struct<string, null>;
1404
- displayName: import("@metamask/superstruct").Struct<string | undefined, null>;
1405
- icon: import("@metamask/superstruct").Struct<string | undefined, null>;
1406
- }>;
1407
- }>;
1408
- priceData: import("@metamask/superstruct").Struct<{
1409
- totalFromAmountUsd?: string | undefined;
1410
- totalToAmountUsd?: string | undefined;
1411
- priceImpact?: string | undefined;
1412
- totalFeeAmountUsd?: string | undefined;
1413
- } | undefined, {
1414
- totalFromAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
1415
- totalToAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
1416
- priceImpact: import("@metamask/superstruct").Struct<string | undefined, null>;
1417
- totalFeeAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
1418
- }>;
1419
- intent: import("@metamask/superstruct").Struct<{
1420
- protocol: string;
1421
- order: {
1422
- sellToken: string;
1423
- buyToken: string;
1424
- validTo: string | number;
1425
- appData: string;
1426
- appDataHash: string;
1427
- feeAmount: string;
1428
- kind: "sell" | "buy";
1429
- partiallyFillable: boolean;
1430
- receiver?: string | undefined;
1431
- sellAmount?: string | undefined;
1432
- buyAmount?: string | undefined;
1433
- from?: string | undefined;
1434
- };
1435
- typedData: {
1436
- types: Record<string, {
1437
- name: string;
1438
- type: string;
1439
- }[]>;
1440
- primaryType: string;
1441
- domain: Record<string, any>;
1442
- message: Record<string, any>;
1443
- };
1444
- settlementContract?: string | undefined;
1445
- } | undefined, {
1446
- /**
1447
- * Identifier of the intent protocol used to interpret the order.
1448
- */
1449
- protocol: import("@metamask/superstruct").Struct<string, null>;
1450
- /**
1451
- * The intent order to be signed and submitted.
1452
- */
1453
- order: import("@metamask/superstruct").Struct<{
1454
- sellToken: string;
1455
- buyToken: string;
1456
- validTo: string | number;
1457
- appData: string;
1458
- appDataHash: string;
1459
- feeAmount: string;
1460
- kind: "sell" | "buy";
1461
- partiallyFillable: boolean;
1462
- receiver?: string | undefined;
1463
- sellAmount?: string | undefined;
1464
- buyAmount?: string | undefined;
1465
- from?: string | undefined;
1466
- }, {
1467
- /**
1468
- * Address of the token being sold.
1469
- */
1470
- sellToken: import("@metamask/superstruct").Struct<string, null>;
1471
- /**
1472
- * Address of the token being bought.
1473
- */
1474
- buyToken: import("@metamask/superstruct").Struct<string, null>;
1475
- /**
1476
- * Optional receiver of the bought tokens.
1477
- * If omitted, defaults to the signer / order owner.
1478
- */
1479
- receiver: import("@metamask/superstruct").Struct<string | undefined, null>;
1480
- /**
1481
- * Order expiration time.
1482
- *
1483
- * Can be provided as a UNIX timestamp in seconds, either as a number
1484
- * or as a digit string, depending on provider requirements.
1485
- */
1486
- validTo: import("@metamask/superstruct").Struct<string | number, null>;
1487
- /**
1488
- * Arbitrary application-specific data attached to the order.
1489
- */
1490
- appData: import("@metamask/superstruct").Struct<string, null>;
1491
- /**
1492
- * Hash of the `appData` field, used for EIP-712 signing.
1493
- */
1494
- appDataHash: import("@metamask/superstruct").Struct<string, null>;
1495
- /**
1496
- * Fee amount paid for order execution, expressed as a digit string.
1497
- */
1498
- feeAmount: import("@metamask/superstruct").Struct<string, null>;
1499
- /**
1500
- * Order kind.
1501
- *
1502
- * - `sell`: exact sell amount, variable buy amount
1503
- * - `buy`: exact buy amount, variable sell amount
1504
- */
1505
- kind: import("@metamask/superstruct").Struct<"sell" | "buy", {
1506
- sell: "sell";
1507
- buy: "buy";
1508
- }>;
1509
- /**
1510
- * Whether the order can be partially filled.
1511
- */
1512
- partiallyFillable: import("@metamask/superstruct").Struct<boolean, null>;
1513
- /**
1514
- * Exact amount of the sell token.
1515
- *
1516
- * Required for `sell` orders.
1517
- */
1518
- sellAmount: import("@metamask/superstruct").Struct<string | undefined, null>;
1519
- /**
1520
- * Exact amount of the buy token.
1521
- *
1522
- * Required for `buy` orders.
1523
- */
1524
- buyAmount: import("@metamask/superstruct").Struct<string | undefined, null>;
1525
- /**
1526
- * Optional order owner / sender address.
1527
- *
1528
- * Provided for convenience when building the EIP-712 domain and message.
1529
- */
1530
- from: import("@metamask/superstruct").Struct<string | undefined, null>;
1531
- }>;
1532
- /**
1533
- * Optional settlement contract address used for execution.
1534
- */
1535
- settlementContract: import("@metamask/superstruct").Struct<string | undefined, null>;
1536
- /**
1537
- * Optional EIP-712 typed data payload for signing.
1538
- * Must be JSON-serializable and include required EIP-712 fields.
1539
- */
1540
- typedData: import("@metamask/superstruct").Struct<{
899
+ } | undefined;
900
+ intent?: {
901
+ protocol: string;
902
+ order: {
903
+ sellToken: `0x${string}`;
904
+ buyToken: `0x${string}`;
905
+ validTo: string | number;
906
+ appData: string;
907
+ appDataHash: `0x${string}`;
908
+ feeAmount: string;
909
+ kind: "sell" | "buy";
910
+ partiallyFillable: boolean;
911
+ receiver?: `0x${string}` | undefined;
912
+ sellAmount?: string | undefined;
913
+ buyAmount?: string | undefined;
914
+ from?: `0x${string}` | undefined;
915
+ };
916
+ typedData: {
1541
917
  types: Record<string, {
1542
918
  name: string;
1543
919
  type: string;
@@ -1545,35 +921,24 @@ export declare const QuoteSchema: import("@metamask/superstruct").Struct<{
1545
921
  primaryType: string;
1546
922
  domain: Record<string, any>;
1547
923
  message: Record<string, any>;
1548
- }, {
1549
- types: import("@metamask/superstruct").Struct<Record<string, {
1550
- name: string;
1551
- type: string;
1552
- }[]>, null>;
1553
- primaryType: import("@metamask/superstruct").Struct<string, null>;
1554
- domain: import("@metamask/superstruct").Struct<Record<string, any>, null>;
1555
- message: import("@metamask/superstruct").Struct<Record<string, any>, null>;
1556
- }>;
1557
- }>;
1558
- /**
1559
- * A third party sponsors the gas. If true, then gasIncluded7702 is also true.
1560
- */
1561
- gasSponsored: import("@metamask/superstruct").Struct<boolean | undefined, null>;
1562
- }>;
924
+ };
925
+ settlementContract?: `0x${string}` | undefined;
926
+ } | undefined;
927
+ }, null>;
1563
928
  export declare const TxDataSchema: import("@metamask/superstruct").Struct<{
1564
929
  chainId: number;
1565
- from: string;
1566
- to: string;
1567
- value: string;
1568
- data: string;
930
+ from: `0x${string}`;
931
+ to: `0x${string}`;
932
+ value: `0x${string}`;
933
+ data: `0x${string}`;
1569
934
  gasLimit: number | null;
1570
935
  effectiveGas?: number | undefined;
1571
936
  }, {
1572
937
  chainId: import("@metamask/superstruct").Struct<number, null>;
1573
- to: import("@metamask/superstruct").Struct<string, null>;
1574
- from: import("@metamask/superstruct").Struct<string, null>;
1575
- value: import("@metamask/superstruct").Struct<string, null>;
1576
- data: import("@metamask/superstruct").Struct<string, null>;
938
+ to: import("@metamask/superstruct").Struct<`0x${string}`, null>;
939
+ from: import("@metamask/superstruct").Struct<`0x${string}`, null>;
940
+ value: import("@metamask/superstruct").Struct<`0x${string}`, null>;
941
+ data: import("@metamask/superstruct").Struct<`0x${string}`, null>;
1577
942
  gasLimit: import("@metamask/superstruct").Struct<number | null, null>;
1578
943
  effectiveGas: import("@metamask/superstruct").Struct<number | undefined, null>;
1579
944
  }>;
@@ -1614,6 +979,10 @@ export declare const TronTradeDataSchema: import("@metamask/superstruct").Struct
1614
979
  }>;
1615
980
  export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct<{
1616
981
  quote: {
982
+ gasIncluded?: boolean | undefined;
983
+ gasIncluded7702?: boolean | undefined;
984
+ gasSponsored?: boolean | undefined;
985
+ } & {
1617
986
  srcChainId: number;
1618
987
  destChainId: number;
1619
988
  srcAsset: {
@@ -1737,8 +1106,6 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
1737
1106
  };
1738
1107
  destChainId?: number | undefined;
1739
1108
  } | undefined;
1740
- gasIncluded?: boolean | undefined;
1741
- gasIncluded7702?: boolean | undefined;
1742
1109
  priceData?: {
1743
1110
  totalFromAmountUsd?: string | undefined;
1744
1111
  totalToAmountUsd?: string | undefined;
@@ -1748,18 +1115,18 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
1748
1115
  intent?: {
1749
1116
  protocol: string;
1750
1117
  order: {
1751
- sellToken: string;
1752
- buyToken: string;
1118
+ sellToken: `0x${string}`;
1119
+ buyToken: `0x${string}`;
1753
1120
  validTo: string | number;
1754
1121
  appData: string;
1755
- appDataHash: string;
1122
+ appDataHash: `0x${string}`;
1756
1123
  feeAmount: string;
1757
1124
  kind: "sell" | "buy";
1758
1125
  partiallyFillable: boolean;
1759
- receiver?: string | undefined;
1126
+ receiver?: `0x${string}` | undefined;
1760
1127
  sellAmount?: string | undefined;
1761
1128
  buyAmount?: string | undefined;
1762
- from?: string | undefined;
1129
+ from?: `0x${string}` | undefined;
1763
1130
  };
1764
1131
  typedData: {
1765
1132
  types: Record<string, {
@@ -1770,17 +1137,16 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
1770
1137
  domain: Record<string, any>;
1771
1138
  message: Record<string, any>;
1772
1139
  };
1773
- settlementContract?: string | undefined;
1140
+ settlementContract?: `0x${string}` | undefined;
1774
1141
  } | undefined;
1775
- gasSponsored?: boolean | undefined;
1776
1142
  };
1777
1143
  estimatedProcessingTimeInSeconds: number;
1778
1144
  trade: string | {
1779
1145
  chainId: number;
1780
- from: string;
1781
- to: string;
1782
- value: string;
1783
- data: string;
1146
+ from: `0x${string}`;
1147
+ to: `0x${string}`;
1148
+ value: `0x${string}`;
1149
+ data: `0x${string}`;
1784
1150
  gasLimit: number | null;
1785
1151
  effectiveGas?: number | undefined;
1786
1152
  } | {
@@ -1796,12 +1162,13 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
1796
1162
  fee_limit?: number | undefined;
1797
1163
  } | null | undefined;
1798
1164
  };
1165
+ quoteId?: string | undefined;
1799
1166
  approval?: {
1800
1167
  chainId: number;
1801
- from: string;
1802
- to: string;
1803
- value: string;
1804
- data: string;
1168
+ from: `0x${string}`;
1169
+ to: `0x${string}`;
1170
+ value: `0x${string}`;
1171
+ data: `0x${string}`;
1805
1172
  gasLimit: number | null;
1806
1173
  effectiveGas?: number | undefined;
1807
1174
  } | {
@@ -1815,7 +1182,12 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
1815
1182
  } | null | undefined;
1816
1183
  } | undefined;
1817
1184
  }, {
1185
+ quoteId: import("@metamask/superstruct").Struct<string | undefined, null>;
1818
1186
  quote: import("@metamask/superstruct").Struct<{
1187
+ gasIncluded?: boolean | undefined;
1188
+ gasIncluded7702?: boolean | undefined;
1189
+ gasSponsored?: boolean | undefined;
1190
+ } & {
1819
1191
  srcChainId: number;
1820
1192
  destChainId: number;
1821
1193
  srcAsset: {
@@ -1832,247 +1204,17 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
1832
1204
  symbol: string;
1833
1205
  chainId: number;
1834
1206
  address: string;
1835
- assetId: `${string}:${string}/${string}:${string}`;
1836
- name: string;
1837
- decimals: number;
1838
- icon?: string | null | undefined;
1839
- iconUrl?: string | null | undefined;
1840
- };
1841
- requestId: string;
1842
- srcTokenAmount: string;
1843
- destTokenAmount: string;
1844
- minDestTokenAmount: string;
1845
- feeData: {
1846
- metabridge: {
1847
- amount: string;
1848
- asset: {
1849
- symbol: string;
1850
- chainId: number;
1851
- address: string;
1852
- assetId: `${string}:${string}/${string}:${string}`;
1853
- name: string;
1854
- decimals: number;
1855
- icon?: string | null | undefined;
1856
- iconUrl?: string | null | undefined;
1857
- };
1858
- };
1859
- txFee?: ({
1860
- amount: string;
1861
- asset: {
1862
- symbol: string;
1863
- chainId: number;
1864
- address: string;
1865
- assetId: `${string}:${string}/${string}:${string}`;
1866
- name: string;
1867
- decimals: number;
1868
- icon?: string | null | undefined;
1869
- iconUrl?: string | null | undefined;
1870
- };
1871
- } & {
1872
- maxFeePerGas: string;
1873
- maxPriorityFeePerGas: string;
1874
- }) | undefined;
1875
- };
1876
- bridgeId: string;
1877
- bridges: string[];
1878
- steps: {
1879
- action: ActionTypes;
1880
- srcChainId: number;
1881
- srcAsset: {
1882
- symbol: string;
1883
- chainId: number;
1884
- address: string;
1885
- assetId: `${string}:${string}/${string}:${string}`;
1886
- name: string;
1887
- decimals: number;
1888
- icon?: string | null | undefined;
1889
- iconUrl?: string | null | undefined;
1890
- };
1891
- destAsset: {
1892
- symbol: string;
1893
- chainId: number;
1894
- address: string;
1895
- assetId: `${string}:${string}/${string}:${string}`;
1896
- name: string;
1897
- decimals: number;
1898
- icon?: string | null | undefined;
1899
- iconUrl?: string | null | undefined;
1900
- };
1901
- srcAmount: string;
1902
- destAmount: string;
1903
- protocol: {
1904
- name: string;
1905
- icon?: string | undefined;
1906
- displayName?: string | undefined;
1907
- };
1908
- destChainId?: number | undefined;
1909
- }[];
1910
- refuel?: {
1911
- action: ActionTypes;
1912
- srcChainId: number;
1913
- srcAsset: {
1914
- symbol: string;
1915
- chainId: number;
1916
- address: string;
1917
- assetId: `${string}:${string}/${string}:${string}`;
1918
- name: string;
1919
- decimals: number;
1920
- icon?: string | null | undefined;
1921
- iconUrl?: string | null | undefined;
1922
- };
1923
- destAsset: {
1924
- symbol: string;
1925
- chainId: number;
1926
- address: string;
1927
- assetId: `${string}:${string}/${string}:${string}`;
1928
- name: string;
1929
- decimals: number;
1930
- icon?: string | null | undefined;
1931
- iconUrl?: string | null | undefined;
1932
- };
1933
- srcAmount: string;
1934
- destAmount: string;
1935
- protocol: {
1936
- name: string;
1937
- icon?: string | undefined;
1938
- displayName?: string | undefined;
1939
- };
1940
- destChainId?: number | undefined;
1941
- } | undefined;
1942
- gasIncluded?: boolean | undefined;
1943
- gasIncluded7702?: boolean | undefined;
1944
- priceData?: {
1945
- totalFromAmountUsd?: string | undefined;
1946
- totalToAmountUsd?: string | undefined;
1947
- priceImpact?: string | undefined;
1948
- totalFeeAmountUsd?: string | undefined;
1949
- } | undefined;
1950
- intent?: {
1951
- protocol: string;
1952
- order: {
1953
- sellToken: string;
1954
- buyToken: string;
1955
- validTo: string | number;
1956
- appData: string;
1957
- appDataHash: string;
1958
- feeAmount: string;
1959
- kind: "sell" | "buy";
1960
- partiallyFillable: boolean;
1961
- receiver?: string | undefined;
1962
- sellAmount?: string | undefined;
1963
- buyAmount?: string | undefined;
1964
- from?: string | undefined;
1965
- };
1966
- typedData: {
1967
- types: Record<string, {
1968
- name: string;
1969
- type: string;
1970
- }[]>;
1971
- primaryType: string;
1972
- domain: Record<string, any>;
1973
- message: Record<string, any>;
1974
- };
1975
- settlementContract?: string | undefined;
1976
- } | undefined;
1977
- gasSponsored?: boolean | undefined;
1978
- }, {
1979
- requestId: import("@metamask/superstruct").Struct<string, null>;
1980
- srcChainId: import("@metamask/superstruct").Struct<number, null>;
1981
- srcAsset: import("@metamask/superstruct").Struct<{
1982
- symbol: string;
1983
- chainId: number;
1984
- address: string;
1985
- assetId: `${string}:${string}/${string}:${string}`;
1986
- name: string;
1987
- decimals: number;
1988
- icon?: string | null | undefined;
1989
- iconUrl?: string | null | undefined;
1990
- }, {
1991
- /**
1992
- * The chainId of the token
1993
- */
1994
- chainId: import("@metamask/superstruct").Struct<number, null>;
1995
- /**
1996
- * An address that the metaswap-api recognizes as the default token
1997
- */
1998
- address: import("@metamask/superstruct").Struct<string, null>;
1999
- /**
2000
- * The assetId of the token
2001
- */
2002
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2003
- /**
2004
- * The symbol of token object
2005
- */
2006
- symbol: import("@metamask/superstruct").Struct<string, null>;
2007
- /**
2008
- * The name for the network
2009
- */
2010
- name: import("@metamask/superstruct").Struct<string, null>;
2011
- decimals: import("@metamask/superstruct").Struct<number, null>;
2012
- /**
2013
- * URL for token icon
2014
- */
2015
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2016
- /**
2017
- * URL for token icon
2018
- */
2019
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2020
- }>;
2021
- /**
2022
- * The amount sent, in atomic amount: amount sent - fees
2023
- * Some tokens have a fee of 0, so sometimes it's equal to amount sent
2024
- */
2025
- srcTokenAmount: import("@metamask/superstruct").Struct<string, null>;
2026
- destChainId: import("@metamask/superstruct").Struct<number, null>;
2027
- destAsset: import("@metamask/superstruct").Struct<{
2028
- symbol: string;
2029
- chainId: number;
2030
- address: string;
2031
- assetId: `${string}:${string}/${string}:${string}`;
2032
- name: string;
2033
- decimals: number;
2034
- icon?: string | null | undefined;
2035
- iconUrl?: string | null | undefined;
2036
- }, {
2037
- /**
2038
- * The chainId of the token
2039
- */
2040
- chainId: import("@metamask/superstruct").Struct<number, null>;
2041
- /**
2042
- * An address that the metaswap-api recognizes as the default token
2043
- */
2044
- address: import("@metamask/superstruct").Struct<string, null>;
2045
- /**
2046
- * The assetId of the token
2047
- */
2048
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2049
- /**
2050
- * The symbol of token object
2051
- */
2052
- symbol: import("@metamask/superstruct").Struct<string, null>;
2053
- /**
2054
- * The name for the network
2055
- */
2056
- name: import("@metamask/superstruct").Struct<string, null>;
2057
- decimals: import("@metamask/superstruct").Struct<number, null>;
2058
- /**
2059
- * URL for token icon
2060
- */
2061
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2062
- /**
2063
- * URL for token icon
2064
- */
2065
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2066
- }>;
2067
- /**
2068
- * The amount received, in atomic amount
2069
- */
2070
- destTokenAmount: import("@metamask/superstruct").Struct<string, null>;
2071
- /**
2072
- * The minimum amount that will be received, in atomic amount
2073
- */
2074
- minDestTokenAmount: import("@metamask/superstruct").Struct<string, null>;
2075
- feeData: import("@metamask/superstruct").Struct<{
1207
+ assetId: `${string}:${string}/${string}:${string}`;
1208
+ name: string;
1209
+ decimals: number;
1210
+ icon?: string | null | undefined;
1211
+ iconUrl?: string | null | undefined;
1212
+ };
1213
+ requestId: string;
1214
+ srcTokenAmount: string;
1215
+ destTokenAmount: string;
1216
+ minDestTokenAmount: string;
1217
+ feeData: {
2076
1218
  metabridge: {
2077
1219
  amount: string;
2078
1220
  asset: {
@@ -2102,122 +1244,10 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
2102
1244
  maxFeePerGas: string;
2103
1245
  maxPriorityFeePerGas: string;
2104
1246
  }) | undefined;
2105
- }, {
2106
- metabridge: import("@metamask/superstruct").Struct<{
2107
- amount: string;
2108
- asset: {
2109
- symbol: string;
2110
- chainId: number;
2111
- address: string;
2112
- assetId: `${string}:${string}/${string}:${string}`;
2113
- name: string;
2114
- decimals: number;
2115
- icon?: string | null | undefined;
2116
- iconUrl?: string | null | undefined;
2117
- };
2118
- }, {
2119
- amount: import("@metamask/superstruct").Struct<string, null>;
2120
- asset: import("@metamask/superstruct").Struct<{
2121
- symbol: string;
2122
- chainId: number;
2123
- address: string;
2124
- assetId: `${string}:${string}/${string}:${string}`;
2125
- name: string;
2126
- decimals: number;
2127
- icon?: string | null | undefined;
2128
- iconUrl?: string | null | undefined;
2129
- }, {
2130
- /**
2131
- * The chainId of the token
2132
- */
2133
- chainId: import("@metamask/superstruct").Struct<number, null>;
2134
- /**
2135
- * An address that the metaswap-api recognizes as the default token
2136
- */
2137
- address: import("@metamask/superstruct").Struct<string, null>;
2138
- /**
2139
- * The assetId of the token
2140
- */
2141
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2142
- /**
2143
- * The symbol of token object
2144
- */
2145
- symbol: import("@metamask/superstruct").Struct<string, null>;
2146
- /**
2147
- * The name for the network
2148
- */
2149
- name: import("@metamask/superstruct").Struct<string, null>;
2150
- decimals: import("@metamask/superstruct").Struct<number, null>;
2151
- /**
2152
- * URL for token icon
2153
- */
2154
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2155
- /**
2156
- * URL for token icon
2157
- */
2158
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2159
- }>;
2160
- }>;
2161
- /**
2162
- * This is the fee for the swap transaction taken from either the
2163
- * src or dest token if the quote has gas fees included or "gasless"
2164
- */
2165
- txFee: import("@metamask/superstruct").Struct<({
2166
- amount: string;
2167
- asset: {
2168
- symbol: string;
2169
- chainId: number;
2170
- address: string;
2171
- assetId: `${string}:${string}/${string}:${string}`;
2172
- name: string;
2173
- decimals: number;
2174
- icon?: string | null | undefined;
2175
- iconUrl?: string | null | undefined;
2176
- };
2177
- } & {
2178
- maxFeePerGas: string;
2179
- maxPriorityFeePerGas: string;
2180
- }) | undefined, null>;
2181
- }>;
2182
- gasIncluded: import("@metamask/superstruct").Struct<boolean | undefined, null>;
2183
- /**
2184
- * Whether the quote can use EIP-7702 delegated gasless execution
2185
- */
2186
- gasIncluded7702: import("@metamask/superstruct").Struct<boolean | undefined, null>;
2187
- bridgeId: import("@metamask/superstruct").Struct<string, null>;
2188
- bridges: import("@metamask/superstruct").Struct<string[], import("@metamask/superstruct").Struct<string, null>>;
2189
- steps: import("@metamask/superstruct").Struct<{
2190
- action: ActionTypes;
2191
- srcChainId: number;
2192
- srcAsset: {
2193
- symbol: string;
2194
- chainId: number;
2195
- address: string;
2196
- assetId: `${string}:${string}/${string}:${string}`;
2197
- name: string;
2198
- decimals: number;
2199
- icon?: string | null | undefined;
2200
- iconUrl?: string | null | undefined;
2201
- };
2202
- destAsset: {
2203
- symbol: string;
2204
- chainId: number;
2205
- address: string;
2206
- assetId: `${string}:${string}/${string}:${string}`;
2207
- name: string;
2208
- decimals: number;
2209
- icon?: string | null | undefined;
2210
- iconUrl?: string | null | undefined;
2211
- };
2212
- srcAmount: string;
2213
- destAmount: string;
2214
- protocol: {
2215
- name: string;
2216
- icon?: string | undefined;
2217
- displayName?: string | undefined;
2218
- };
2219
- destChainId?: number | undefined;
2220
- }[], import("@metamask/superstruct").Struct<{
1247
+ };
1248
+ bridgeId: string;
1249
+ bridges: string[];
1250
+ steps: {
2221
1251
  action: ActionTypes;
2222
1252
  srcChainId: number;
2223
1253
  srcAsset: {
@@ -2248,107 +1278,8 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
2248
1278
  displayName?: string | undefined;
2249
1279
  };
2250
1280
  destChainId?: number | undefined;
2251
- }, {
2252
- action: import("@metamask/superstruct").Struct<ActionTypes, {
2253
- bridge: ActionTypes.BRIDGE;
2254
- swap: ActionTypes.SWAP;
2255
- refuel: ActionTypes.REFUEL;
2256
- }>;
2257
- srcChainId: import("@metamask/superstruct").Struct<number, null>;
2258
- destChainId: import("@metamask/superstruct").Struct<number | undefined, null>;
2259
- srcAsset: import("@metamask/superstruct").Struct<{
2260
- symbol: string;
2261
- chainId: number;
2262
- address: string;
2263
- assetId: `${string}:${string}/${string}:${string}`;
2264
- name: string;
2265
- decimals: number;
2266
- icon?: string | null | undefined;
2267
- iconUrl?: string | null | undefined;
2268
- }, {
2269
- /**
2270
- * The chainId of the token
2271
- */
2272
- chainId: import("@metamask/superstruct").Struct<number, null>;
2273
- /**
2274
- * An address that the metaswap-api recognizes as the default token
2275
- */
2276
- address: import("@metamask/superstruct").Struct<string, null>;
2277
- /**
2278
- * The assetId of the token
2279
- */
2280
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2281
- /**
2282
- * The symbol of token object
2283
- */
2284
- symbol: import("@metamask/superstruct").Struct<string, null>;
2285
- /**
2286
- * The name for the network
2287
- */
2288
- name: import("@metamask/superstruct").Struct<string, null>;
2289
- decimals: import("@metamask/superstruct").Struct<number, null>;
2290
- /**
2291
- * URL for token icon
2292
- */
2293
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2294
- /**
2295
- * URL for token icon
2296
- */
2297
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2298
- }>;
2299
- destAsset: import("@metamask/superstruct").Struct<{
2300
- symbol: string;
2301
- chainId: number;
2302
- address: string;
2303
- assetId: `${string}:${string}/${string}:${string}`;
2304
- name: string;
2305
- decimals: number;
2306
- icon?: string | null | undefined;
2307
- iconUrl?: string | null | undefined;
2308
- }, {
2309
- /**
2310
- * The chainId of the token
2311
- */
2312
- chainId: import("@metamask/superstruct").Struct<number, null>;
2313
- /**
2314
- * An address that the metaswap-api recognizes as the default token
2315
- */
2316
- address: import("@metamask/superstruct").Struct<string, null>;
2317
- /**
2318
- * The assetId of the token
2319
- */
2320
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2321
- /**
2322
- * The symbol of token object
2323
- */
2324
- symbol: import("@metamask/superstruct").Struct<string, null>;
2325
- /**
2326
- * The name for the network
2327
- */
2328
- name: import("@metamask/superstruct").Struct<string, null>;
2329
- decimals: import("@metamask/superstruct").Struct<number, null>;
2330
- /**
2331
- * URL for token icon
2332
- */
2333
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2334
- /**
2335
- * URL for token icon
2336
- */
2337
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2338
- }>;
2339
- srcAmount: import("@metamask/superstruct").Struct<string, null>;
2340
- destAmount: import("@metamask/superstruct").Struct<string, null>;
2341
- protocol: import("@metamask/superstruct").Struct<{
2342
- name: string;
2343
- icon?: string | undefined;
2344
- displayName?: string | undefined;
2345
- }, {
2346
- name: import("@metamask/superstruct").Struct<string, null>;
2347
- displayName: import("@metamask/superstruct").Struct<string | undefined, null>;
2348
- icon: import("@metamask/superstruct").Struct<string | undefined, null>;
2349
- }>;
2350
- }>>;
2351
- refuel: import("@metamask/superstruct").Struct<{
1281
+ }[];
1282
+ refuel?: {
2352
1283
  action: ActionTypes;
2353
1284
  srcChainId: number;
2354
1285
  srcAsset: {
@@ -2379,132 +1310,28 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
2379
1310
  displayName?: string | undefined;
2380
1311
  };
2381
1312
  destChainId?: number | undefined;
2382
- } | undefined, {
2383
- action: import("@metamask/superstruct").Struct<ActionTypes, {
2384
- bridge: ActionTypes.BRIDGE;
2385
- swap: ActionTypes.SWAP;
2386
- refuel: ActionTypes.REFUEL;
2387
- }>;
2388
- srcChainId: import("@metamask/superstruct").Struct<number, null>;
2389
- destChainId: import("@metamask/superstruct").Struct<number | undefined, null>;
2390
- srcAsset: import("@metamask/superstruct").Struct<{
2391
- symbol: string;
2392
- chainId: number;
2393
- address: string;
2394
- assetId: `${string}:${string}/${string}:${string}`;
2395
- name: string;
2396
- decimals: number;
2397
- icon?: string | null | undefined;
2398
- iconUrl?: string | null | undefined;
2399
- }, {
2400
- /**
2401
- * The chainId of the token
2402
- */
2403
- chainId: import("@metamask/superstruct").Struct<number, null>;
2404
- /**
2405
- * An address that the metaswap-api recognizes as the default token
2406
- */
2407
- address: import("@metamask/superstruct").Struct<string, null>;
2408
- /**
2409
- * The assetId of the token
2410
- */
2411
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2412
- /**
2413
- * The symbol of token object
2414
- */
2415
- symbol: import("@metamask/superstruct").Struct<string, null>;
2416
- /**
2417
- * The name for the network
2418
- */
2419
- name: import("@metamask/superstruct").Struct<string, null>;
2420
- decimals: import("@metamask/superstruct").Struct<number, null>;
2421
- /**
2422
- * URL for token icon
2423
- */
2424
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2425
- /**
2426
- * URL for token icon
2427
- */
2428
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2429
- }>;
2430
- destAsset: import("@metamask/superstruct").Struct<{
2431
- symbol: string;
2432
- chainId: number;
2433
- address: string;
2434
- assetId: `${string}:${string}/${string}:${string}`;
2435
- name: string;
2436
- decimals: number;
2437
- icon?: string | null | undefined;
2438
- iconUrl?: string | null | undefined;
2439
- }, {
2440
- /**
2441
- * The chainId of the token
2442
- */
2443
- chainId: import("@metamask/superstruct").Struct<number, null>;
2444
- /**
2445
- * An address that the metaswap-api recognizes as the default token
2446
- */
2447
- address: import("@metamask/superstruct").Struct<string, null>;
2448
- /**
2449
- * The assetId of the token
2450
- */
2451
- assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
2452
- /**
2453
- * The symbol of token object
2454
- */
2455
- symbol: import("@metamask/superstruct").Struct<string, null>;
2456
- /**
2457
- * The name for the network
2458
- */
2459
- name: import("@metamask/superstruct").Struct<string, null>;
2460
- decimals: import("@metamask/superstruct").Struct<number, null>;
2461
- /**
2462
- * URL for token icon
2463
- */
2464
- icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2465
- /**
2466
- * URL for token icon
2467
- */
2468
- iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
2469
- }>;
2470
- srcAmount: import("@metamask/superstruct").Struct<string, null>;
2471
- destAmount: import("@metamask/superstruct").Struct<string, null>;
2472
- protocol: import("@metamask/superstruct").Struct<{
2473
- name: string;
2474
- icon?: string | undefined;
2475
- displayName?: string | undefined;
2476
- }, {
2477
- name: import("@metamask/superstruct").Struct<string, null>;
2478
- displayName: import("@metamask/superstruct").Struct<string | undefined, null>;
2479
- icon: import("@metamask/superstruct").Struct<string | undefined, null>;
2480
- }>;
2481
- }>;
2482
- priceData: import("@metamask/superstruct").Struct<{
1313
+ } | undefined;
1314
+ priceData?: {
2483
1315
  totalFromAmountUsd?: string | undefined;
2484
1316
  totalToAmountUsd?: string | undefined;
2485
1317
  priceImpact?: string | undefined;
2486
1318
  totalFeeAmountUsd?: string | undefined;
2487
- } | undefined, {
2488
- totalFromAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
2489
- totalToAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
2490
- priceImpact: import("@metamask/superstruct").Struct<string | undefined, null>;
2491
- totalFeeAmountUsd: import("@metamask/superstruct").Struct<string | undefined, null>;
2492
- }>;
2493
- intent: import("@metamask/superstruct").Struct<{
1319
+ } | undefined;
1320
+ intent?: {
2494
1321
  protocol: string;
2495
1322
  order: {
2496
- sellToken: string;
2497
- buyToken: string;
1323
+ sellToken: `0x${string}`;
1324
+ buyToken: `0x${string}`;
2498
1325
  validTo: string | number;
2499
1326
  appData: string;
2500
- appDataHash: string;
1327
+ appDataHash: `0x${string}`;
2501
1328
  feeAmount: string;
2502
1329
  kind: "sell" | "buy";
2503
1330
  partiallyFillable: boolean;
2504
- receiver?: string | undefined;
1331
+ receiver?: `0x${string}` | undefined;
2505
1332
  sellAmount?: string | undefined;
2506
1333
  buyAmount?: string | undefined;
2507
- from?: string | undefined;
1334
+ from?: `0x${string}` | undefined;
2508
1335
  };
2509
1336
  typedData: {
2510
1337
  types: Record<string, {
@@ -2515,132 +1342,16 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
2515
1342
  domain: Record<string, any>;
2516
1343
  message: Record<string, any>;
2517
1344
  };
2518
- settlementContract?: string | undefined;
2519
- } | undefined, {
2520
- /**
2521
- * Identifier of the intent protocol used to interpret the order.
2522
- */
2523
- protocol: import("@metamask/superstruct").Struct<string, null>;
2524
- /**
2525
- * The intent order to be signed and submitted.
2526
- */
2527
- order: import("@metamask/superstruct").Struct<{
2528
- sellToken: string;
2529
- buyToken: string;
2530
- validTo: string | number;
2531
- appData: string;
2532
- appDataHash: string;
2533
- feeAmount: string;
2534
- kind: "sell" | "buy";
2535
- partiallyFillable: boolean;
2536
- receiver?: string | undefined;
2537
- sellAmount?: string | undefined;
2538
- buyAmount?: string | undefined;
2539
- from?: string | undefined;
2540
- }, {
2541
- /**
2542
- * Address of the token being sold.
2543
- */
2544
- sellToken: import("@metamask/superstruct").Struct<string, null>;
2545
- /**
2546
- * Address of the token being bought.
2547
- */
2548
- buyToken: import("@metamask/superstruct").Struct<string, null>;
2549
- /**
2550
- * Optional receiver of the bought tokens.
2551
- * If omitted, defaults to the signer / order owner.
2552
- */
2553
- receiver: import("@metamask/superstruct").Struct<string | undefined, null>;
2554
- /**
2555
- * Order expiration time.
2556
- *
2557
- * Can be provided as a UNIX timestamp in seconds, either as a number
2558
- * or as a digit string, depending on provider requirements.
2559
- */
2560
- validTo: import("@metamask/superstruct").Struct<string | number, null>;
2561
- /**
2562
- * Arbitrary application-specific data attached to the order.
2563
- */
2564
- appData: import("@metamask/superstruct").Struct<string, null>;
2565
- /**
2566
- * Hash of the `appData` field, used for EIP-712 signing.
2567
- */
2568
- appDataHash: import("@metamask/superstruct").Struct<string, null>;
2569
- /**
2570
- * Fee amount paid for order execution, expressed as a digit string.
2571
- */
2572
- feeAmount: import("@metamask/superstruct").Struct<string, null>;
2573
- /**
2574
- * Order kind.
2575
- *
2576
- * - `sell`: exact sell amount, variable buy amount
2577
- * - `buy`: exact buy amount, variable sell amount
2578
- */
2579
- kind: import("@metamask/superstruct").Struct<"sell" | "buy", {
2580
- sell: "sell";
2581
- buy: "buy";
2582
- }>;
2583
- /**
2584
- * Whether the order can be partially filled.
2585
- */
2586
- partiallyFillable: import("@metamask/superstruct").Struct<boolean, null>;
2587
- /**
2588
- * Exact amount of the sell token.
2589
- *
2590
- * Required for `sell` orders.
2591
- */
2592
- sellAmount: import("@metamask/superstruct").Struct<string | undefined, null>;
2593
- /**
2594
- * Exact amount of the buy token.
2595
- *
2596
- * Required for `buy` orders.
2597
- */
2598
- buyAmount: import("@metamask/superstruct").Struct<string | undefined, null>;
2599
- /**
2600
- * Optional order owner / sender address.
2601
- *
2602
- * Provided for convenience when building the EIP-712 domain and message.
2603
- */
2604
- from: import("@metamask/superstruct").Struct<string | undefined, null>;
2605
- }>;
2606
- /**
2607
- * Optional settlement contract address used for execution.
2608
- */
2609
- settlementContract: import("@metamask/superstruct").Struct<string | undefined, null>;
2610
- /**
2611
- * Optional EIP-712 typed data payload for signing.
2612
- * Must be JSON-serializable and include required EIP-712 fields.
2613
- */
2614
- typedData: import("@metamask/superstruct").Struct<{
2615
- types: Record<string, {
2616
- name: string;
2617
- type: string;
2618
- }[]>;
2619
- primaryType: string;
2620
- domain: Record<string, any>;
2621
- message: Record<string, any>;
2622
- }, {
2623
- types: import("@metamask/superstruct").Struct<Record<string, {
2624
- name: string;
2625
- type: string;
2626
- }[]>, null>;
2627
- primaryType: import("@metamask/superstruct").Struct<string, null>;
2628
- domain: import("@metamask/superstruct").Struct<Record<string, any>, null>;
2629
- message: import("@metamask/superstruct").Struct<Record<string, any>, null>;
2630
- }>;
2631
- }>;
2632
- /**
2633
- * A third party sponsors the gas. If true, then gasIncluded7702 is also true.
2634
- */
2635
- gasSponsored: import("@metamask/superstruct").Struct<boolean | undefined, null>;
2636
- }>;
1345
+ settlementContract?: `0x${string}` | undefined;
1346
+ } | undefined;
1347
+ }, null>;
2637
1348
  estimatedProcessingTimeInSeconds: import("@metamask/superstruct").Struct<number, null>;
2638
1349
  approval: import("@metamask/superstruct").Struct<{
2639
1350
  chainId: number;
2640
- from: string;
2641
- to: string;
2642
- value: string;
2643
- data: string;
1351
+ from: `0x${string}`;
1352
+ to: `0x${string}`;
1353
+ value: `0x${string}`;
1354
+ data: `0x${string}`;
2644
1355
  gasLimit: number | null;
2645
1356
  effectiveGas?: number | undefined;
2646
1357
  } | {
@@ -2655,10 +1366,10 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
2655
1366
  } | undefined, null>;
2656
1367
  trade: import("@metamask/superstruct").Struct<string | {
2657
1368
  chainId: number;
2658
- from: string;
2659
- to: string;
2660
- value: string;
2661
- data: string;
1369
+ from: `0x${string}`;
1370
+ to: `0x${string}`;
1371
+ value: `0x${string}`;
1372
+ data: `0x${string}`;
2662
1373
  gasLimit: number | null;
2663
1374
  effectiveGas?: number | undefined;
2664
1375
  } | {
@@ -2677,6 +1388,10 @@ export declare const QuoteResponseSchema: import("@metamask/superstruct").Struct
2677
1388
  }>;
2678
1389
  export declare const validateQuoteResponse: (data: unknown) => data is {
2679
1390
  quote: {
1391
+ gasIncluded?: boolean | undefined;
1392
+ gasIncluded7702?: boolean | undefined;
1393
+ gasSponsored?: boolean | undefined;
1394
+ } & {
2680
1395
  srcChainId: number;
2681
1396
  destChainId: number;
2682
1397
  srcAsset: {
@@ -2800,8 +1515,6 @@ export declare const validateQuoteResponse: (data: unknown) => data is {
2800
1515
  };
2801
1516
  destChainId?: number | undefined;
2802
1517
  } | undefined;
2803
- gasIncluded?: boolean | undefined;
2804
- gasIncluded7702?: boolean | undefined;
2805
1518
  priceData?: {
2806
1519
  totalFromAmountUsd?: string | undefined;
2807
1520
  totalToAmountUsd?: string | undefined;
@@ -2811,18 +1524,18 @@ export declare const validateQuoteResponse: (data: unknown) => data is {
2811
1524
  intent?: {
2812
1525
  protocol: string;
2813
1526
  order: {
2814
- sellToken: string;
2815
- buyToken: string;
1527
+ sellToken: `0x${string}`;
1528
+ buyToken: `0x${string}`;
2816
1529
  validTo: string | number;
2817
1530
  appData: string;
2818
- appDataHash: string;
1531
+ appDataHash: `0x${string}`;
2819
1532
  feeAmount: string;
2820
1533
  kind: "sell" | "buy";
2821
1534
  partiallyFillable: boolean;
2822
- receiver?: string | undefined;
1535
+ receiver?: `0x${string}` | undefined;
2823
1536
  sellAmount?: string | undefined;
2824
1537
  buyAmount?: string | undefined;
2825
- from?: string | undefined;
1538
+ from?: `0x${string}` | undefined;
2826
1539
  };
2827
1540
  typedData: {
2828
1541
  types: Record<string, {
@@ -2833,17 +1546,16 @@ export declare const validateQuoteResponse: (data: unknown) => data is {
2833
1546
  domain: Record<string, any>;
2834
1547
  message: Record<string, any>;
2835
1548
  };
2836
- settlementContract?: string | undefined;
1549
+ settlementContract?: `0x${string}` | undefined;
2837
1550
  } | undefined;
2838
- gasSponsored?: boolean | undefined;
2839
1551
  };
2840
1552
  estimatedProcessingTimeInSeconds: number;
2841
1553
  trade: string | {
2842
1554
  chainId: number;
2843
- from: string;
2844
- to: string;
2845
- value: string;
2846
- data: string;
1555
+ from: `0x${string}`;
1556
+ to: `0x${string}`;
1557
+ value: `0x${string}`;
1558
+ data: `0x${string}`;
2847
1559
  gasLimit: number | null;
2848
1560
  effectiveGas?: number | undefined;
2849
1561
  } | {
@@ -2859,12 +1571,13 @@ export declare const validateQuoteResponse: (data: unknown) => data is {
2859
1571
  fee_limit?: number | undefined;
2860
1572
  } | null | undefined;
2861
1573
  };
1574
+ quoteId?: string | undefined;
2862
1575
  approval?: {
2863
1576
  chainId: number;
2864
- from: string;
2865
- to: string;
2866
- value: string;
2867
- data: string;
1577
+ from: `0x${string}`;
1578
+ to: `0x${string}`;
1579
+ value: `0x${string}`;
1580
+ data: `0x${string}`;
2868
1581
  gasLimit: number | null;
2869
1582
  effectiveGas?: number | undefined;
2870
1583
  } | {
@@ -2941,4 +1654,157 @@ export declare const validateQuoteStreamComplete: (data: unknown) => data is {
2941
1654
  reason?: QuoteStreamCompleteReason | undefined;
2942
1655
  context?: Record<string, any> | undefined;
2943
1656
  };
1657
+ export declare enum BatchSellTransactionType {
1658
+ TRADE = "trade",
1659
+ APPROVAL = "approval",
1660
+ TRANSFER = "transfer"
1661
+ }
1662
+ export declare const SimulatedGasFeeLimitsSchema: import("@metamask/superstruct").Struct<{
1663
+ maxFeePerGas: `0x${string}`;
1664
+ maxPriorityFeePerGas: `0x${string}`;
1665
+ }, {
1666
+ maxFeePerGas: import("@metamask/superstruct").Struct<`0x${string}`, null>;
1667
+ maxPriorityFeePerGas: import("@metamask/superstruct").Struct<`0x${string}`, null>;
1668
+ }>;
1669
+ export declare const BatchSellTradesResponseSchema: import("@metamask/superstruct").Struct<{
1670
+ transactions: ({
1671
+ chainId: number;
1672
+ from: `0x${string}`;
1673
+ to: `0x${string}`;
1674
+ value: `0x${string}`;
1675
+ data: `0x${string}`;
1676
+ gasLimit: number | null;
1677
+ effectiveGas?: number | undefined;
1678
+ } & {
1679
+ maxFeePerGas: `0x${string}`;
1680
+ maxPriorityFeePerGas: `0x${string}`;
1681
+ } & {
1682
+ type: BatchSellTransactionType;
1683
+ })[];
1684
+ fee?: {
1685
+ amount: string;
1686
+ asset: {
1687
+ symbol: string;
1688
+ chainId: number;
1689
+ address: string;
1690
+ assetId: `${string}:${string}/${string}:${string}`;
1691
+ name: string;
1692
+ decimals: number;
1693
+ icon?: string | null | undefined;
1694
+ iconUrl?: string | null | undefined;
1695
+ };
1696
+ } | undefined;
1697
+ }, {
1698
+ transactions: import("@metamask/superstruct").Struct<({
1699
+ chainId: number;
1700
+ from: `0x${string}`;
1701
+ to: `0x${string}`;
1702
+ value: `0x${string}`;
1703
+ data: `0x${string}`;
1704
+ gasLimit: number | null;
1705
+ effectiveGas?: number | undefined;
1706
+ } & {
1707
+ maxFeePerGas: `0x${string}`;
1708
+ maxPriorityFeePerGas: `0x${string}`;
1709
+ } & {
1710
+ type: BatchSellTransactionType;
1711
+ })[], import("@metamask/superstruct").Struct<{
1712
+ chainId: number;
1713
+ from: `0x${string}`;
1714
+ to: `0x${string}`;
1715
+ value: `0x${string}`;
1716
+ data: `0x${string}`;
1717
+ gasLimit: number | null;
1718
+ effectiveGas?: number | undefined;
1719
+ } & {
1720
+ maxFeePerGas: `0x${string}`;
1721
+ maxPriorityFeePerGas: `0x${string}`;
1722
+ } & {
1723
+ type: BatchSellTransactionType;
1724
+ }, null>>;
1725
+ fee: import("@metamask/superstruct").Struct<{
1726
+ amount: string;
1727
+ asset: {
1728
+ symbol: string;
1729
+ chainId: number;
1730
+ address: string;
1731
+ assetId: `${string}:${string}/${string}:${string}`;
1732
+ name: string;
1733
+ decimals: number;
1734
+ icon?: string | null | undefined;
1735
+ iconUrl?: string | null | undefined;
1736
+ };
1737
+ } | undefined, {
1738
+ asset: import("@metamask/superstruct").Struct<{
1739
+ symbol: string;
1740
+ chainId: number;
1741
+ address: string;
1742
+ assetId: `${string}:${string}/${string}:${string}`;
1743
+ name: string;
1744
+ decimals: number;
1745
+ icon?: string | null | undefined;
1746
+ iconUrl?: string | null | undefined;
1747
+ }, {
1748
+ /**
1749
+ * The chainId of the token
1750
+ */
1751
+ chainId: import("@metamask/superstruct").Struct<number, null>;
1752
+ /**
1753
+ * An address that the metaswap-api recognizes as the default token
1754
+ */
1755
+ address: import("@metamask/superstruct").Struct<string, null>;
1756
+ /**
1757
+ * The assetId of the token
1758
+ */
1759
+ assetId: import("@metamask/superstruct").Struct<`${string}:${string}/${string}:${string}`, null>;
1760
+ /**
1761
+ * The symbol of token object
1762
+ */
1763
+ symbol: import("@metamask/superstruct").Struct<string, null>;
1764
+ /**
1765
+ * The name for the network
1766
+ */
1767
+ name: import("@metamask/superstruct").Struct<string, null>;
1768
+ decimals: import("@metamask/superstruct").Struct<number, null>;
1769
+ /**
1770
+ * URL for token icon
1771
+ */
1772
+ icon: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1773
+ /**
1774
+ * URL for token icon
1775
+ */
1776
+ iconUrl: import("@metamask/superstruct").Struct<string | null | undefined, null>;
1777
+ }>;
1778
+ amount: import("@metamask/superstruct").Struct<string, null>;
1779
+ }>;
1780
+ }>;
1781
+ export declare const validateBatchSellTradesResponse: (data: unknown) => data is {
1782
+ transactions: ({
1783
+ chainId: number;
1784
+ from: `0x${string}`;
1785
+ to: `0x${string}`;
1786
+ value: `0x${string}`;
1787
+ data: `0x${string}`;
1788
+ gasLimit: number | null;
1789
+ effectiveGas?: number | undefined;
1790
+ } & {
1791
+ maxFeePerGas: `0x${string}`;
1792
+ maxPriorityFeePerGas: `0x${string}`;
1793
+ } & {
1794
+ type: BatchSellTransactionType;
1795
+ })[];
1796
+ fee?: {
1797
+ amount: string;
1798
+ asset: {
1799
+ symbol: string;
1800
+ chainId: number;
1801
+ address: string;
1802
+ assetId: `${string}:${string}/${string}:${string}`;
1803
+ name: string;
1804
+ decimals: number;
1805
+ icon?: string | null | undefined;
1806
+ iconUrl?: string | null | undefined;
1807
+ };
1808
+ } | undefined;
1809
+ };
2944
1810
  //# sourceMappingURL=validators.d.cts.map