@avaprotocol/sdk-js 4.0.0-dev.0 → 4.0.0-dev.2

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 (90) hide show
  1. package/dist/index.js +874 -14
  2. package/dist/index.mjs +873 -14
  3. package/dist/v4/builders/nodes.d.ts +5 -2
  4. package/dist/v4/builders/nodes.d.ts.map +1 -1
  5. package/dist/v4/builders/nodes.js +1 -0
  6. package/dist/v4/index.d.ts +1 -0
  7. package/dist/v4/index.d.ts.map +1 -1
  8. package/dist/v4/index.js +1 -0
  9. package/dist/v4/protocols/aave-v3.d.ts +21 -0
  10. package/dist/v4/protocols/aave-v3.d.ts.map +1 -0
  11. package/dist/v4/protocols/aave-v3.js +238 -0
  12. package/dist/v4/protocols/aerodrome.d.ts +4 -0
  13. package/dist/v4/protocols/aerodrome.d.ts.map +1 -0
  14. package/dist/v4/protocols/aerodrome.js +9 -0
  15. package/dist/v4/protocols/chainlink.d.ts +7 -0
  16. package/dist/v4/protocols/chainlink.d.ts.map +1 -0
  17. package/dist/v4/protocols/chainlink.js +25 -0
  18. package/dist/v4/protocols/common.d.ts +16 -0
  19. package/dist/v4/protocols/common.d.ts.map +1 -0
  20. package/dist/v4/protocols/common.js +76 -0
  21. package/dist/v4/protocols/compound-v3.d.ts +4 -0
  22. package/dist/v4/protocols/compound-v3.d.ts.map +1 -0
  23. package/dist/v4/protocols/compound-v3.js +15 -0
  24. package/dist/v4/protocols/erc20.d.ts +5 -0
  25. package/dist/v4/protocols/erc20.d.ts.map +1 -0
  26. package/dist/v4/protocols/erc20.js +18 -0
  27. package/dist/v4/protocols/ethena.d.ts +7 -0
  28. package/dist/v4/protocols/ethena.d.ts.map +1 -0
  29. package/dist/v4/protocols/ethena.js +58 -0
  30. package/dist/v4/protocols/frax-ether.d.ts +7 -0
  31. package/dist/v4/protocols/frax-ether.d.ts.map +1 -0
  32. package/dist/v4/protocols/frax-ether.js +20 -0
  33. package/dist/v4/protocols/index.d.ts +132 -0
  34. package/dist/v4/protocols/index.d.ts.map +1 -0
  35. package/dist/v4/protocols/index.js +87 -0
  36. package/dist/v4/protocols/lido.d.ts +7 -0
  37. package/dist/v4/protocols/lido.d.ts.map +1 -0
  38. package/dist/v4/protocols/lido.js +44 -0
  39. package/dist/v4/protocols/morpho.d.ts +6 -0
  40. package/dist/v4/protocols/morpho.d.ts.map +1 -0
  41. package/dist/v4/protocols/morpho.js +89 -0
  42. package/dist/v4/protocols/rocket-pool.d.ts +6 -0
  43. package/dist/v4/protocols/rocket-pool.d.ts.map +1 -0
  44. package/dist/v4/protocols/rocket-pool.js +36 -0
  45. package/dist/v4/protocols/sky.d.ts +6 -0
  46. package/dist/v4/protocols/sky.d.ts.map +1 -0
  47. package/dist/v4/protocols/sky.js +13 -0
  48. package/dist/v4/protocols/spark.d.ts +4 -0
  49. package/dist/v4/protocols/spark.d.ts.map +1 -0
  50. package/dist/v4/protocols/spark.js +15 -0
  51. package/dist/v4/protocols/superfluid.d.ts +6 -0
  52. package/dist/v4/protocols/superfluid.d.ts.map +1 -0
  53. package/dist/v4/protocols/superfluid.js +39 -0
  54. package/dist/v4/protocols/types.d.ts +17 -0
  55. package/dist/v4/protocols/types.d.ts.map +1 -0
  56. package/dist/v4/protocols/types.js +1 -0
  57. package/dist/v4/protocols/uniswap-v3.d.ts +27 -0
  58. package/dist/v4/protocols/uniswap-v3.d.ts.map +1 -0
  59. package/dist/v4/protocols/uniswap-v3.js +197 -0
  60. package/dist/v4/protocols/wrapped.d.ts +6 -0
  61. package/dist/v4/protocols/wrapped.d.ts.map +1 -0
  62. package/dist/v4/protocols/wrapped.js +55 -0
  63. package/dist/v4/resources/executions.d.ts +6 -0
  64. package/dist/v4/resources/executions.d.ts.map +1 -1
  65. package/dist/v4/resources/executions.js +6 -0
  66. package/dist/v4/resources/health.d.ts +11 -1
  67. package/dist/v4/resources/health.d.ts.map +1 -1
  68. package/dist/v4/resources/health.js +11 -1
  69. package/dist/v4/resources/nodes.d.ts +21 -1
  70. package/dist/v4/resources/nodes.d.ts.map +1 -1
  71. package/dist/v4/resources/nodes.js +21 -1
  72. package/dist/v4/resources/operators.d.ts +15 -1
  73. package/dist/v4/resources/operators.d.ts.map +1 -1
  74. package/dist/v4/resources/operators.js +15 -1
  75. package/dist/v4/resources/secrets.d.ts +10 -0
  76. package/dist/v4/resources/secrets.d.ts.map +1 -1
  77. package/dist/v4/resources/secrets.js +10 -0
  78. package/dist/v4/resources/tokens.d.ts +16 -4
  79. package/dist/v4/resources/tokens.d.ts.map +1 -1
  80. package/dist/v4/resources/tokens.js +16 -4
  81. package/dist/v4/resources/triggers.d.ts +21 -1
  82. package/dist/v4/resources/triggers.d.ts.map +1 -1
  83. package/dist/v4/resources/triggers.js +21 -1
  84. package/dist/v4/resources/wallets.d.ts +53 -6
  85. package/dist/v4/resources/wallets.d.ts.map +1 -1
  86. package/dist/v4/resources/wallets.js +53 -6
  87. package/dist/v4/resources/workflows.d.ts +10 -0
  88. package/dist/v4/resources/workflows.d.ts.map +1 -1
  89. package/dist/v4/resources/workflows.js +10 -0
  90. package/package.json +7 -2
package/dist/index.mjs CHANGED
@@ -374,6 +374,11 @@ var HealthResource = class {
374
374
  constructor(transport) {
375
375
  this.transport = transport;
376
376
  }
377
+ /**
378
+ * GET /health — returns `{ status, chainId, version }` when the
379
+ * gateway is up. Use for liveness checks; do not rely on it for
380
+ * deep readiness (it doesn't probe worker connectivity).
381
+ */
377
382
  check() {
378
383
  return this.transport.request({ path: "/health" });
379
384
  }
@@ -384,7 +389,21 @@ var NodesResource = class {
384
389
  constructor(transport) {
385
390
  this.transport = transport;
386
391
  }
387
- /** POST /nodes:run — execute a single node against inline input. */
392
+ /**
393
+ * POST /nodes:run — execute one node against inline `inputVariables`.
394
+ *
395
+ * The request shape mirrors a single entry from `workflows.simulate`:
396
+ * a complete node definition + the variables the node would have seen
397
+ * inside a workflow. The gateway runs the node in-process (no worker
398
+ * delegation, no persistence) and returns the raw output keyed by
399
+ * node type — `{ success, output: { <nodeType>: {...} } }`.
400
+ *
401
+ * Chain context: the gateway resolves the target chain in this order:
402
+ * `body.chainId` → `inputVariables.settings.chain_id` → the JWT's
403
+ * `aud` claim → the gateway's default chain. Specify `chainId`
404
+ * explicitly when calling a contract that lives on a non-default
405
+ * chain (e.g. a sepolia oracle when the gateway defaults to mainnet).
406
+ */
388
407
  run(req) {
389
408
  return this.transport.request({
390
409
  path: "/nodes:run",
@@ -399,7 +418,15 @@ var OperatorsResource = class {
399
418
  constructor(transport) {
400
419
  this.transport = transport;
401
420
  }
402
- /** GET /operators — connected operators + capabilities. */
421
+ /**
422
+ * GET /operators — every operator currently connected to the
423
+ * gateway, plus their advertised capabilities (block / time /
424
+ * event monitoring) and the timestamp of their last heartbeat.
425
+ *
426
+ * An empty array means no operators are connected — workflows will
427
+ * still accept, but won't execute until at least one operator
428
+ * comes online.
429
+ */
403
430
  list() {
404
431
  return this.transport.request({ path: "/operators" });
405
432
  }
@@ -441,10 +468,16 @@ var TokensResource = class {
441
468
  this.transport = transport;
442
469
  }
443
470
  /**
444
- * GET /tokens/{address} — returns `{ found: false }` (not 404)
445
- * when the token is not in the aggregator's whitelist and the
446
- * on-chain fallback fails. Partial info (the address) is still
447
- * useful to callers.
471
+ * GET /tokens/{address} — resolve a token by contract address.
472
+ *
473
+ * Returns `{ found: false, address }` (not 404) when the token
474
+ * isn't on the whitelist and the on-chain probe also fails — the
475
+ * partial response keeps the caller's UI from breaking on
476
+ * unrecognized tokens.
477
+ *
478
+ * `opts.chainId` picks which chain's whitelist + RPC to consult.
479
+ * Omit it to fall back to the JWT's `aud` chain (the gateway's
480
+ * default chain context for the authenticated user).
448
481
  */
449
482
  retrieve(address, opts) {
450
483
  return this.transport.request({
@@ -459,7 +492,20 @@ var TriggersResource = class {
459
492
  constructor(transport) {
460
493
  this.transport = transport;
461
494
  }
462
- /** POST /triggers:run — evaluate a trigger config against inline input. */
495
+ /**
496
+ * POST /triggers:run — evaluate a trigger config against inline
497
+ * input and return the same shape an executor would see.
498
+ *
499
+ * For event triggers, the gateway uses Tenderly to simulate a
500
+ * matching event log against the request's `addresses` + `topics`
501
+ * filter, then returns the decoded log under `output.data` and
502
+ * the raw log under `output.metadata`.
503
+ *
504
+ * For time-based triggers (cron, fixedTime, block), the response
505
+ * carries the next scheduled fire time / block height.
506
+ *
507
+ * No workflow record is created and no execution is persisted.
508
+ */
463
509
  run(req) {
464
510
  return this.transport.request({
465
511
  path: "/triggers:run",
@@ -474,13 +520,29 @@ var WalletsResource = class {
474
520
  constructor(transport) {
475
521
  this.transport = transport;
476
522
  }
477
- /** GET /wallets */
523
+ /**
524
+ * GET /wallets — every smart wallet owned by the authenticated
525
+ * EOA on the JWT's audience chain.
526
+ *
527
+ * Hidden wallets (`isHidden=true`) are excluded by default. The
528
+ * response is an envelope `{ data: Wallet[] }`, not a bare array.
529
+ */
478
530
  list() {
479
531
  return this.transport.request({ path: "/wallets" });
480
532
  }
481
533
  /**
482
534
  * POST /wallets — idempotent "ensure exists". Derives the CREATE2
483
- * address from (owner, salt, factory) and persists the record.
535
+ * address from `(owner, salt, factory)` and persists the record;
536
+ * calling twice with the same triple returns the same address.
537
+ *
538
+ * The on-chain account is **not** deployed by this call — deployment
539
+ * happens lazily as part of the first UserOp (workflow execution or
540
+ * `withdraw`) via the `initCode` field, so the smart wallet costs
541
+ * zero gas until it's first used.
542
+ *
543
+ * Per-owner cap is enforced by `max_wallets_per_owner` in the
544
+ * aggregator config; the call returns 429 `WALLETS_LIMIT_REACHED`
545
+ * when exceeded.
484
546
  */
485
547
  create(req) {
486
548
  return this.transport.request({
@@ -490,8 +552,11 @@ var WalletsResource = class {
490
552
  });
491
553
  }
492
554
  /**
493
- * PATCH /wallets/{address} — partial update. Today the only
494
- * mutable field is `isHidden`.
555
+ * PATCH /wallets/{address} — partial update. The only mutable
556
+ * field today is `isHidden`, used by the Studio UI's hide/unhide
557
+ * wallet action. Keyed by **address**, not salt — callers that
558
+ * still think in salts must look up the address first via
559
+ * `create({ salt })`.
495
560
  */
496
561
  update(address, body) {
497
562
  return this.transport.request({
@@ -500,7 +565,18 @@ var WalletsResource = class {
500
565
  body
501
566
  });
502
567
  }
503
- /** POST /wallets/{address}:withdraw — UserOp-driven withdraw. */
568
+ /**
569
+ * POST /wallets/{address}:withdraw — transfer ETH or an ERC-20 out
570
+ * of the smart wallet via a UserOp through the bundler + paymaster.
571
+ *
572
+ * Per-chain config (bundler URL, paymaster address, RPC) is resolved
573
+ * by the gateway from the JWT's `aud` claim or `body.chainId`.
574
+ * The response's `status` is one of `pending | confirmed | failed`:
575
+ * `confirmed` means the bundler returned a receipt synchronously,
576
+ * `pending` means it accepted the UserOp but the receipt hasn't
577
+ * landed yet, `failed` means the bundler rejected the op or it
578
+ * reverted before inclusion.
579
+ */
504
580
  withdraw(address, req) {
505
581
  return this.transport.request({
506
582
  path: `/wallets/${encodeURIComponent(address)}:withdraw`,
@@ -508,7 +584,14 @@ var WalletsResource = class {
508
584
  body: req
509
585
  });
510
586
  }
511
- /** GET /wallets/{address}:getNonce */
587
+ /**
588
+ * GET /wallets/{address}:getNonce — current AA nonce for the wallet.
589
+ *
590
+ * Used when an external signer needs to assemble a UserOp outside
591
+ * the SDK's bundler path. Most callers don't need this directly —
592
+ * `workflows.simulate` and `wallets.withdraw` handle nonce sourcing
593
+ * internally.
594
+ */
512
595
  getNonce(address) {
513
596
  return this.transport.request({
514
597
  path: `/wallets/${encodeURIComponent(address)}:getNonce`
@@ -756,7 +839,8 @@ var Nodes = Object.freeze({
756
839
  url: opts.url,
757
840
  method: opts.method,
758
841
  ...opts.body ? { body: opts.body } : {},
759
- ...opts.headers ? { headers: opts.headers } : {}
842
+ ...opts.headers ? { headers: opts.headers } : {},
843
+ ...opts.options ? { options: opts.options } : {}
760
844
  }
761
845
  };
762
846
  },
@@ -814,6 +898,780 @@ var Nodes = Object.freeze({
814
898
  };
815
899
  }
816
900
  });
901
+
902
+ // src/v4/protocols/aave-v3.ts
903
+ var pool = {
904
+ [Chains.EthereumMainnet]: "0x87870Bca3F3fD6335C3F4ce8392D69350B4fA4E2",
905
+ [Chains.Sepolia]: "0x6Ae43d3271ff6888e7Fc43Fd7321a503ff738951",
906
+ [Chains.BaseMainnet]: "0xA238Dd80C259a72e81d7e4664a9801593F98d1c5",
907
+ [Chains.BaseSepolia]: "0x8bAB6d1b75f19e9eD9fCe8b9BD338844fF79aE27"
908
+ };
909
+ var oracle = {
910
+ [Chains.EthereumMainnet]: "0x54586bE62E3c3580375aE3723C145253060Ca0C2",
911
+ [Chains.Sepolia]: "0x2da88497588bf89281816106C7259e31AF45a663",
912
+ [Chains.BaseMainnet]: "0x2Cc0Fc26eD4563A5ce5e8bdcfe1A2878676Ae156",
913
+ [Chains.BaseSepolia]: "0x943b0dE18d4abf4eF02A85912F8fc07684C141dF"
914
+ };
915
+ var wethGateway = {
916
+ [Chains.EthereumMainnet]: "0xd01607c3C5eCABa394D8be377a08590149325722",
917
+ [Chains.Sepolia]: "0x387d311e47e80b498169e6fb51d3193167d89F7D",
918
+ [Chains.BaseMainnet]: "0xa0d9C1E9E48Ca30c8d8C3B5D69FF5dc1f6DFfC24",
919
+ [Chains.BaseSepolia]: "0x0568130e794429D2eEBC4dafE18f25Ff1a1ed8b6"
920
+ };
921
+ var eventTopics = Object.freeze({
922
+ Supply: "0x2b627736bca15cd5381dcf80b0bf11fd197d01a037c52b927a881a10fb73ba61",
923
+ Withdraw: "0x3115d1449a7b732c986cba18244e897a450f61e1bb8d589cd2e69e6c8924f9f7",
924
+ Borrow: "0xb3d084820fb1a9decffb176436bd02558d15fac9b0ddfed8c465bc7359d7dce0",
925
+ Repay: "0xa534c8dbe71f871f9f3530e97a74601fea17b426cae02e1c5aee42c96c784051",
926
+ LiquidationCall: "0xe413a321e8681d831f4dbccbca790d2952b56f977908e45be37335533e005286"
927
+ });
928
+ var poolEventsAbi = Object.freeze([
929
+ {
930
+ anonymous: false,
931
+ inputs: [
932
+ { indexed: true, internalType: "address", name: "reserve", type: "address" },
933
+ { indexed: false, internalType: "address", name: "user", type: "address" },
934
+ { indexed: true, internalType: "address", name: "onBehalfOf", type: "address" },
935
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
936
+ { indexed: true, internalType: "uint16", name: "referralCode", type: "uint16" }
937
+ ],
938
+ name: "Supply",
939
+ type: "event"
940
+ },
941
+ {
942
+ anonymous: false,
943
+ inputs: [
944
+ { indexed: true, internalType: "address", name: "reserve", type: "address" },
945
+ { indexed: true, internalType: "address", name: "user", type: "address" },
946
+ { indexed: true, internalType: "address", name: "to", type: "address" },
947
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" }
948
+ ],
949
+ name: "Withdraw",
950
+ type: "event"
951
+ },
952
+ {
953
+ anonymous: false,
954
+ inputs: [
955
+ { indexed: true, internalType: "address", name: "reserve", type: "address" },
956
+ { indexed: false, internalType: "address", name: "user", type: "address" },
957
+ { indexed: true, internalType: "address", name: "onBehalfOf", type: "address" },
958
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
959
+ { indexed: false, internalType: "uint8", name: "interestRateMode", type: "uint8" },
960
+ { indexed: false, internalType: "uint256", name: "borrowRate", type: "uint256" },
961
+ { indexed: true, internalType: "uint16", name: "referralCode", type: "uint16" }
962
+ ],
963
+ name: "Borrow",
964
+ type: "event"
965
+ },
966
+ {
967
+ anonymous: false,
968
+ inputs: [
969
+ { indexed: true, internalType: "address", name: "reserve", type: "address" },
970
+ { indexed: true, internalType: "address", name: "user", type: "address" },
971
+ { indexed: true, internalType: "address", name: "repayer", type: "address" },
972
+ { indexed: false, internalType: "uint256", name: "amount", type: "uint256" },
973
+ { indexed: false, internalType: "bool", name: "useATokens", type: "bool" }
974
+ ],
975
+ name: "Repay",
976
+ type: "event"
977
+ },
978
+ {
979
+ anonymous: false,
980
+ inputs: [
981
+ { indexed: true, internalType: "address", name: "collateralAsset", type: "address" },
982
+ { indexed: true, internalType: "address", name: "debtAsset", type: "address" },
983
+ { indexed: true, internalType: "address", name: "user", type: "address" },
984
+ { indexed: false, internalType: "uint256", name: "debtToCover", type: "uint256" },
985
+ { indexed: false, internalType: "uint256", name: "liquidatedCollateralAmount", type: "uint256" },
986
+ { indexed: false, internalType: "address", name: "liquidator", type: "address" },
987
+ { indexed: false, internalType: "bool", name: "receiveAToken", type: "bool" }
988
+ ],
989
+ name: "LiquidationCall",
990
+ type: "event"
991
+ }
992
+ ]);
993
+ var poolMethodsAbi = Object.freeze([
994
+ {
995
+ inputs: [{ internalType: "address", name: "user", type: "address" }],
996
+ name: "getUserAccountData",
997
+ outputs: [
998
+ { internalType: "uint256", name: "totalCollateralBase", type: "uint256" },
999
+ { internalType: "uint256", name: "totalDebtBase", type: "uint256" },
1000
+ { internalType: "uint256", name: "availableBorrowsBase", type: "uint256" },
1001
+ { internalType: "uint256", name: "currentLiquidationThreshold", type: "uint256" },
1002
+ { internalType: "uint256", name: "ltv", type: "uint256" },
1003
+ { internalType: "uint256", name: "healthFactor", type: "uint256" }
1004
+ ],
1005
+ stateMutability: "view",
1006
+ type: "function"
1007
+ },
1008
+ {
1009
+ inputs: [
1010
+ { internalType: "address", name: "asset", type: "address" },
1011
+ { internalType: "uint256", name: "amount", type: "uint256" },
1012
+ { internalType: "address", name: "onBehalfOf", type: "address" },
1013
+ { internalType: "uint16", name: "referralCode", type: "uint16" }
1014
+ ],
1015
+ name: "supply",
1016
+ outputs: [],
1017
+ stateMutability: "nonpayable",
1018
+ type: "function"
1019
+ },
1020
+ {
1021
+ inputs: [
1022
+ { internalType: "address", name: "asset", type: "address" },
1023
+ { internalType: "uint256", name: "amount", type: "uint256" },
1024
+ { internalType: "uint256", name: "interestRateMode", type: "uint256" },
1025
+ { internalType: "uint16", name: "referralCode", type: "uint16" },
1026
+ { internalType: "address", name: "onBehalfOf", type: "address" }
1027
+ ],
1028
+ name: "borrow",
1029
+ outputs: [],
1030
+ stateMutability: "nonpayable",
1031
+ type: "function"
1032
+ },
1033
+ {
1034
+ inputs: [
1035
+ { internalType: "address", name: "asset", type: "address" },
1036
+ { internalType: "uint256", name: "amount", type: "uint256" },
1037
+ { internalType: "uint256", name: "interestRateMode", type: "uint256" },
1038
+ { internalType: "address", name: "onBehalfOf", type: "address" }
1039
+ ],
1040
+ name: "repay",
1041
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1042
+ stateMutability: "nonpayable",
1043
+ type: "function"
1044
+ },
1045
+ {
1046
+ inputs: [
1047
+ { internalType: "address", name: "asset", type: "address" },
1048
+ { internalType: "uint256", name: "amount", type: "uint256" },
1049
+ { internalType: "address", name: "to", type: "address" }
1050
+ ],
1051
+ name: "withdraw",
1052
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1053
+ stateMutability: "nonpayable",
1054
+ type: "function"
1055
+ },
1056
+ {
1057
+ inputs: [
1058
+ { internalType: "address", name: "asset", type: "address" },
1059
+ { internalType: "bool", name: "useAsCollateral", type: "bool" }
1060
+ ],
1061
+ name: "setUserUseReserveAsCollateral",
1062
+ outputs: [],
1063
+ stateMutability: "nonpayable",
1064
+ type: "function"
1065
+ }
1066
+ ]);
1067
+ var tokens = Object.freeze({
1068
+ LINK: {
1069
+ [Chains.Sepolia]: "0xf8Fb3713D459D7C1018BD0A49D19b4C44290EBE5"
1070
+ }
1071
+ });
1072
+ var aaveV3 = Object.freeze({
1073
+ pool,
1074
+ oracle,
1075
+ wethGateway,
1076
+ eventTopics,
1077
+ poolEventsAbi,
1078
+ poolMethodsAbi,
1079
+ tokens
1080
+ });
1081
+
1082
+ // src/v4/protocols/aerodrome.ts
1083
+ var router = {
1084
+ [Chains.BaseMainnet]: "0xcF77a3Ba9A5CA399B7c97c74d54e5b1Beb874E43"
1085
+ };
1086
+ var aerodrome = Object.freeze({
1087
+ router
1088
+ });
1089
+
1090
+ // src/v4/protocols/common.ts
1091
+ var aggregatorV3Abi = Object.freeze([
1092
+ {
1093
+ inputs: [],
1094
+ name: "latestRoundData",
1095
+ outputs: [
1096
+ { internalType: "uint80", name: "roundId", type: "uint80" },
1097
+ { internalType: "int256", name: "answer", type: "int256" },
1098
+ { internalType: "uint256", name: "startedAt", type: "uint256" },
1099
+ { internalType: "uint256", name: "updatedAt", type: "uint256" },
1100
+ { internalType: "uint80", name: "answeredInRound", type: "uint80" }
1101
+ ],
1102
+ stateMutability: "view",
1103
+ type: "function"
1104
+ },
1105
+ {
1106
+ inputs: [],
1107
+ name: "decimals",
1108
+ outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
1109
+ stateMutability: "view",
1110
+ type: "function"
1111
+ }
1112
+ ]);
1113
+ var erc4626VaultAbi = Object.freeze([
1114
+ {
1115
+ inputs: [
1116
+ { internalType: "uint256", name: "assets", type: "uint256" },
1117
+ { internalType: "address", name: "receiver", type: "address" }
1118
+ ],
1119
+ name: "deposit",
1120
+ outputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
1121
+ stateMutability: "nonpayable",
1122
+ type: "function"
1123
+ },
1124
+ {
1125
+ inputs: [
1126
+ { internalType: "uint256", name: "shares", type: "uint256" },
1127
+ { internalType: "address", name: "receiver", type: "address" },
1128
+ { internalType: "address", name: "owner", type: "address" }
1129
+ ],
1130
+ name: "redeem",
1131
+ outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
1132
+ stateMutability: "nonpayable",
1133
+ type: "function"
1134
+ },
1135
+ {
1136
+ inputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
1137
+ name: "previewRedeem",
1138
+ outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
1139
+ stateMutability: "view",
1140
+ type: "function"
1141
+ },
1142
+ {
1143
+ inputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
1144
+ name: "convertToAssets",
1145
+ outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
1146
+ stateMutability: "view",
1147
+ type: "function"
1148
+ }
1149
+ ]);
1150
+
1151
+ // src/v4/protocols/chainlink.ts
1152
+ var ethUsdFeed = {
1153
+ [Chains.EthereumMainnet]: "0x5f4eC3Df9cbd43714FE2740f5E3616155c5b8419",
1154
+ [Chains.Sepolia]: "0x694AA1769357215DE4FAC081bf1f309aDC325306"
1155
+ };
1156
+ var btcUsdFeed = {
1157
+ [Chains.EthereumMainnet]: "0xF4030086522a5bEEa4988F8cA5B36dbC97BeE88c"
1158
+ };
1159
+ var chainlink = Object.freeze({
1160
+ ethUsdFeed,
1161
+ btcUsdFeed,
1162
+ /** Shared AggregatorV3 ABI — works for any Chainlink feed. */
1163
+ aggregatorV3Abi
1164
+ });
1165
+
1166
+ // src/v4/protocols/compound-v3.ts
1167
+ var cometUsdc = {
1168
+ [Chains.EthereumMainnet]: "0xc3d688B66703497DAA19211EEdff47f25384cdc3",
1169
+ [Chains.BaseMainnet]: "0xb125E6687d4313864e53df431d5425969c15Eb2F"
1170
+ };
1171
+ var compoundV3 = Object.freeze({
1172
+ cometUsdc
1173
+ });
1174
+
1175
+ // src/v4/protocols/erc20.ts
1176
+ var erc20 = Object.freeze({
1177
+ approveAbi: Object.freeze([
1178
+ {
1179
+ inputs: [
1180
+ { internalType: "address", name: "spender", type: "address" },
1181
+ { internalType: "uint256", name: "amount", type: "uint256" }
1182
+ ],
1183
+ name: "approve",
1184
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
1185
+ stateMutability: "nonpayable",
1186
+ type: "function"
1187
+ }
1188
+ ])
1189
+ });
1190
+
1191
+ // src/v4/protocols/ethena.ts
1192
+ var susde = {
1193
+ [Chains.EthereumMainnet]: "0x9D39A5DE30e57443BfF2A8307A4256c8797A3497"
1194
+ };
1195
+ var usde = {
1196
+ [Chains.EthereumMainnet]: "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3"
1197
+ };
1198
+ var susdeAbi = Object.freeze([
1199
+ {
1200
+ inputs: [
1201
+ { internalType: "uint256", name: "assets", type: "uint256" },
1202
+ { internalType: "address", name: "receiver", type: "address" }
1203
+ ],
1204
+ name: "deposit",
1205
+ outputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
1206
+ stateMutability: "nonpayable",
1207
+ type: "function"
1208
+ },
1209
+ {
1210
+ inputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
1211
+ name: "cooldownShares",
1212
+ outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
1213
+ stateMutability: "nonpayable",
1214
+ type: "function"
1215
+ },
1216
+ {
1217
+ inputs: [{ internalType: "address", name: "receiver", type: "address" }],
1218
+ name: "unstake",
1219
+ outputs: [],
1220
+ stateMutability: "nonpayable",
1221
+ type: "function"
1222
+ },
1223
+ {
1224
+ inputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
1225
+ name: "previewRedeem",
1226
+ outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
1227
+ stateMutability: "view",
1228
+ type: "function"
1229
+ },
1230
+ {
1231
+ inputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
1232
+ name: "convertToAssets",
1233
+ outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
1234
+ stateMutability: "view",
1235
+ type: "function"
1236
+ }
1237
+ ]);
1238
+ var ethena = Object.freeze({
1239
+ susde,
1240
+ usde,
1241
+ susdeAbi
1242
+ });
1243
+
1244
+ // src/v4/protocols/frax-ether.ts
1245
+ var sfrxeth = {
1246
+ [Chains.EthereumMainnet]: "0xac3E018457B222d93114458476f3E3416Abbe38F"
1247
+ };
1248
+ var frxeth = {
1249
+ [Chains.EthereumMainnet]: "0x5E8422345238F34275888049021821E8E08CAa1f"
1250
+ };
1251
+ var fraxEther = Object.freeze({
1252
+ sfrxeth,
1253
+ frxeth,
1254
+ /** Standard ERC-4626 surface — sfrxETH conforms exactly. */
1255
+ vaultAbi: erc4626VaultAbi
1256
+ });
1257
+
1258
+ // src/v4/protocols/lido.ts
1259
+ var wsteth = {
1260
+ [Chains.EthereumMainnet]: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
1261
+ [Chains.BaseMainnet]: "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452"
1262
+ };
1263
+ var steth = {
1264
+ [Chains.EthereumMainnet]: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84"
1265
+ };
1266
+ var wstethAbi = Object.freeze([
1267
+ {
1268
+ inputs: [{ internalType: "uint256", name: "_stETHAmount", type: "uint256" }],
1269
+ name: "wrap",
1270
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1271
+ stateMutability: "nonpayable",
1272
+ type: "function"
1273
+ },
1274
+ {
1275
+ inputs: [{ internalType: "uint256", name: "_wstETHAmount", type: "uint256" }],
1276
+ name: "unwrap",
1277
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1278
+ stateMutability: "nonpayable",
1279
+ type: "function"
1280
+ },
1281
+ {
1282
+ inputs: [{ internalType: "uint256", name: "_wstETHAmount", type: "uint256" }],
1283
+ name: "getStETHByWstETH",
1284
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1285
+ stateMutability: "view",
1286
+ type: "function"
1287
+ }
1288
+ ]);
1289
+ var lido = Object.freeze({
1290
+ wsteth,
1291
+ steth,
1292
+ wstethAbi
1293
+ });
1294
+
1295
+ // src/v4/protocols/morpho.ts
1296
+ var morpho = {
1297
+ [Chains.EthereumMainnet]: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
1298
+ [Chains.BaseMainnet]: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb"
1299
+ };
1300
+ var morphoAbi = Object.freeze([
1301
+ {
1302
+ inputs: [
1303
+ {
1304
+ components: [
1305
+ { internalType: "address", name: "loanToken", type: "address" },
1306
+ { internalType: "address", name: "collateralToken", type: "address" },
1307
+ { internalType: "address", name: "oracle", type: "address" },
1308
+ { internalType: "address", name: "irm", type: "address" },
1309
+ { internalType: "uint256", name: "lltv", type: "uint256" }
1310
+ ],
1311
+ internalType: "struct MarketParams",
1312
+ name: "marketParams",
1313
+ type: "tuple"
1314
+ },
1315
+ { internalType: "uint256", name: "assets", type: "uint256" },
1316
+ { internalType: "uint256", name: "shares", type: "uint256" },
1317
+ { internalType: "address", name: "onBehalf", type: "address" },
1318
+ { internalType: "bytes", name: "data", type: "bytes" }
1319
+ ],
1320
+ name: "supply",
1321
+ outputs: [
1322
+ { internalType: "uint256", name: "assetsSupplied", type: "uint256" },
1323
+ { internalType: "uint256", name: "sharesSupplied", type: "uint256" }
1324
+ ],
1325
+ stateMutability: "nonpayable",
1326
+ type: "function"
1327
+ },
1328
+ {
1329
+ inputs: [
1330
+ {
1331
+ components: [
1332
+ { internalType: "address", name: "loanToken", type: "address" },
1333
+ { internalType: "address", name: "collateralToken", type: "address" },
1334
+ { internalType: "address", name: "oracle", type: "address" },
1335
+ { internalType: "address", name: "irm", type: "address" },
1336
+ { internalType: "uint256", name: "lltv", type: "uint256" }
1337
+ ],
1338
+ internalType: "struct MarketParams",
1339
+ name: "marketParams",
1340
+ type: "tuple"
1341
+ },
1342
+ { internalType: "uint256", name: "assets", type: "uint256" },
1343
+ { internalType: "uint256", name: "shares", type: "uint256" },
1344
+ { internalType: "address", name: "onBehalf", type: "address" },
1345
+ { internalType: "address", name: "receiver", type: "address" }
1346
+ ],
1347
+ name: "borrow",
1348
+ outputs: [
1349
+ { internalType: "uint256", name: "assetsBorrowed", type: "uint256" },
1350
+ { internalType: "uint256", name: "sharesBorrowed", type: "uint256" }
1351
+ ],
1352
+ stateMutability: "nonpayable",
1353
+ type: "function"
1354
+ },
1355
+ {
1356
+ inputs: [
1357
+ { internalType: "bytes32", name: "id", type: "bytes32" },
1358
+ { internalType: "address", name: "user", type: "address" }
1359
+ ],
1360
+ name: "position",
1361
+ outputs: [
1362
+ { internalType: "uint256", name: "supplyShares", type: "uint256" },
1363
+ { internalType: "uint128", name: "borrowShares", type: "uint128" },
1364
+ { internalType: "uint128", name: "collateral", type: "uint128" }
1365
+ ],
1366
+ stateMutability: "view",
1367
+ type: "function"
1368
+ }
1369
+ ]);
1370
+ var morphoBlue = Object.freeze({
1371
+ morpho,
1372
+ morphoAbi
1373
+ });
1374
+
1375
+ // src/v4/protocols/rocket-pool.ts
1376
+ var reth = {
1377
+ [Chains.EthereumMainnet]: "0xae78736Cd615f374D3085123A210448E74Fc6393",
1378
+ [Chains.BaseMainnet]: "0xB6fe221Fe9EeF5aBa221c348bA20A1Bf5e73624c"
1379
+ };
1380
+ var rethAbi = Object.freeze([
1381
+ {
1382
+ inputs: [{ internalType: "uint256", name: "_rethAmount", type: "uint256" }],
1383
+ name: "burn",
1384
+ outputs: [],
1385
+ stateMutability: "nonpayable",
1386
+ type: "function"
1387
+ },
1388
+ {
1389
+ inputs: [],
1390
+ name: "getExchangeRate",
1391
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1392
+ stateMutability: "view",
1393
+ type: "function"
1394
+ },
1395
+ {
1396
+ inputs: [{ internalType: "uint256", name: "_rethAmount", type: "uint256" }],
1397
+ name: "getEthValue",
1398
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1399
+ stateMutability: "view",
1400
+ type: "function"
1401
+ }
1402
+ ]);
1403
+ var rocketPool = Object.freeze({
1404
+ reth,
1405
+ rethAbi
1406
+ });
1407
+
1408
+ // src/v4/protocols/sky.ts
1409
+ var sdai = {
1410
+ [Chains.EthereumMainnet]: "0x83F20F44975D03b1b09e64809B757c47f942BEeA"
1411
+ };
1412
+ var sky = Object.freeze({
1413
+ sdai,
1414
+ /** Standard ERC-4626 surface — sDAI conforms exactly. */
1415
+ vaultAbi: erc4626VaultAbi
1416
+ });
1417
+
1418
+ // src/v4/protocols/spark.ts
1419
+ var pool2 = {
1420
+ [Chains.EthereumMainnet]: "0xC13e21B648A5Ee794902342038FF3aDAB66BE987"
1421
+ };
1422
+ var spark = Object.freeze({
1423
+ pool: pool2
1424
+ });
1425
+
1426
+ // src/v4/protocols/superfluid.ts
1427
+ var cfaForwarder = {
1428
+ [Chains.EthereumMainnet]: "0xcfA132E353cB4E398080B9700609bb008eceB125",
1429
+ [Chains.BaseMainnet]: "0xcfA132E353cB4E398080B9700609bb008eceB125"
1430
+ };
1431
+ var cfaForwarderAbi = Object.freeze([
1432
+ {
1433
+ inputs: [
1434
+ { internalType: "address", name: "token", type: "address" },
1435
+ { internalType: "address", name: "receiver", type: "address" },
1436
+ { internalType: "int96", name: "flowrate", type: "int96" }
1437
+ ],
1438
+ name: "setFlowrate",
1439
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
1440
+ stateMutability: "nonpayable",
1441
+ type: "function"
1442
+ },
1443
+ {
1444
+ inputs: [
1445
+ { internalType: "address", name: "token", type: "address" },
1446
+ { internalType: "address", name: "sender", type: "address" },
1447
+ { internalType: "address", name: "receiver", type: "address" },
1448
+ { internalType: "int96", name: "flowrate", type: "int96" },
1449
+ { internalType: "bytes", name: "userData", type: "bytes" }
1450
+ ],
1451
+ name: "createFlow",
1452
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
1453
+ stateMutability: "nonpayable",
1454
+ type: "function"
1455
+ }
1456
+ ]);
1457
+ var superfluid = Object.freeze({
1458
+ cfaForwarder,
1459
+ cfaForwarderAbi
1460
+ });
1461
+
1462
+ // src/v4/protocols/uniswap-v3.ts
1463
+ var swapRouter02 = {
1464
+ [Chains.EthereumMainnet]: "0x68b3465833fb72A70ecDF485E0e4C7bD8665Fc45",
1465
+ [Chains.Sepolia]: "0x3bFA4769FB09eefC5a80d6E87c3B9C650f7Ae48E",
1466
+ [Chains.BaseMainnet]: "0x2626664c2603336E57B271c5C0b26F421741e481",
1467
+ [Chains.BaseSepolia]: "0x94cC0AaC535CCDB3C01d6787D6413C739ae12bc4"
1468
+ };
1469
+ var quoterV2 = {
1470
+ [Chains.EthereumMainnet]: "0x61fFE014bA17989E743c5F6cB21bF9697530B21e",
1471
+ [Chains.Sepolia]: "0xEd1f6473345F45b75F8179591dd5bA1888cf2FB3",
1472
+ [Chains.BaseMainnet]: "0x3d4e44Eb1374240CE5F1B871ab261CD16335B76a",
1473
+ [Chains.BaseSepolia]: "0xC5290058841028F1614F3A6F0F5816cAd0df5E27"
1474
+ };
1475
+ var permit2 = {
1476
+ [Chains.EthereumMainnet]: "0x000000000022d473030F116dDEE9F6B43aC78BA3",
1477
+ [Chains.Sepolia]: "0x000000000022d473030F116dDEE9F6B43aC78BA3",
1478
+ [Chains.BaseMainnet]: "0x000000000022d473030F116dDEE9F6B43aC78BA3",
1479
+ [Chains.BaseSepolia]: "0x000000000022d473030F116dDEE9F6B43aC78BA3"
1480
+ };
1481
+ var factory = {
1482
+ [Chains.EthereumMainnet]: "0x1F98431c8aD98523631AE4a59f267346ea31F984",
1483
+ [Chains.Sepolia]: "0x0227628f3F023bb0B980b67D528571c95c6DaC1c",
1484
+ [Chains.BaseMainnet]: "0x33128a8fC17869897dcE68Ed026d694621f6FDfD",
1485
+ [Chains.BaseSepolia]: "0x4752ba5DBc23f44D87826276BF6Fd6b1C372aD24"
1486
+ };
1487
+ var nonfungiblePositionManager = {
1488
+ [Chains.EthereumMainnet]: "0xC36442b4a4522E871399CD717aBDD847Ab11FE88",
1489
+ [Chains.Sepolia]: "0x1238536071E1c677A632429e3655c799b22cDA52",
1490
+ [Chains.BaseMainnet]: "0x03a520b32C04BF3bEEf7BEb72E919cf822Ed34f1",
1491
+ [Chains.BaseSepolia]: "0x27F971cb582BF9E50F397e4d29a5C7A34f11faA2"
1492
+ };
1493
+ var universalRouter = {
1494
+ [Chains.EthereumMainnet]: "0x66a9893cc07d91d95644aedd05d03f95e1dba8af",
1495
+ [Chains.Sepolia]: "0x3A9D48AB9751398BbFa63ad67599Bb04e4BdF98b",
1496
+ [Chains.BaseMainnet]: "0x6ff5693b99212da76ad316178a184ab56d299b43",
1497
+ [Chains.BaseSepolia]: "0x492e6456d9528771018deb9e87ef7750ef184104"
1498
+ };
1499
+ var swapRouter02Abi = Object.freeze([
1500
+ {
1501
+ inputs: [
1502
+ {
1503
+ components: [
1504
+ { internalType: "address", name: "tokenIn", type: "address" },
1505
+ { internalType: "address", name: "tokenOut", type: "address" },
1506
+ { internalType: "uint24", name: "fee", type: "uint24" },
1507
+ { internalType: "address", name: "recipient", type: "address" },
1508
+ { internalType: "uint256", name: "amountIn", type: "uint256" },
1509
+ { internalType: "uint256", name: "amountOutMinimum", type: "uint256" },
1510
+ { internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" }
1511
+ ],
1512
+ internalType: "struct IV3SwapRouter.ExactInputSingleParams",
1513
+ name: "params",
1514
+ type: "tuple"
1515
+ }
1516
+ ],
1517
+ name: "exactInputSingle",
1518
+ outputs: [{ internalType: "uint256", name: "amountOut", type: "uint256" }],
1519
+ stateMutability: "payable",
1520
+ type: "function"
1521
+ },
1522
+ {
1523
+ inputs: [
1524
+ {
1525
+ components: [
1526
+ { internalType: "address", name: "tokenIn", type: "address" },
1527
+ { internalType: "address", name: "tokenOut", type: "address" },
1528
+ { internalType: "uint24", name: "fee", type: "uint24" },
1529
+ { internalType: "address", name: "recipient", type: "address" },
1530
+ { internalType: "uint256", name: "amountOut", type: "uint256" },
1531
+ { internalType: "uint256", name: "amountInMaximum", type: "uint256" },
1532
+ { internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" }
1533
+ ],
1534
+ internalType: "struct IV3SwapRouter.ExactOutputSingleParams",
1535
+ name: "params",
1536
+ type: "tuple"
1537
+ }
1538
+ ],
1539
+ name: "exactOutputSingle",
1540
+ outputs: [{ internalType: "uint256", name: "amountIn", type: "uint256" }],
1541
+ stateMutability: "payable",
1542
+ type: "function"
1543
+ }
1544
+ ]);
1545
+ var quoterV2Abi = Object.freeze([
1546
+ {
1547
+ inputs: [
1548
+ {
1549
+ components: [
1550
+ { internalType: "address", name: "tokenIn", type: "address" },
1551
+ { internalType: "address", name: "tokenOut", type: "address" },
1552
+ { internalType: "uint256", name: "amountIn", type: "uint256" },
1553
+ { internalType: "uint24", name: "fee", type: "uint24" },
1554
+ { internalType: "uint160", name: "sqrtPriceLimitX96", type: "uint160" }
1555
+ ],
1556
+ internalType: "struct IQuoterV2.QuoteExactInputSingleParams",
1557
+ name: "params",
1558
+ type: "tuple"
1559
+ }
1560
+ ],
1561
+ name: "quoteExactInputSingle",
1562
+ outputs: [
1563
+ { internalType: "uint256", name: "amountOut", type: "uint256" },
1564
+ { internalType: "uint160", name: "sqrtPriceX96After", type: "uint160" },
1565
+ { internalType: "uint32", name: "initializedTicksCrossed", type: "uint32" },
1566
+ { internalType: "uint256", name: "gasEstimate", type: "uint256" }
1567
+ ],
1568
+ stateMutability: "nonpayable",
1569
+ type: "function"
1570
+ }
1571
+ ]);
1572
+ var factoryAbi = Object.freeze([
1573
+ {
1574
+ inputs: [
1575
+ { internalType: "address", name: "tokenA", type: "address" },
1576
+ { internalType: "address", name: "tokenB", type: "address" },
1577
+ { internalType: "uint24", name: "fee", type: "uint24" }
1578
+ ],
1579
+ name: "getPool",
1580
+ outputs: [{ internalType: "address", name: "pool", type: "address" }],
1581
+ stateMutability: "view",
1582
+ type: "function"
1583
+ }
1584
+ ]);
1585
+ var tokens2 = Object.freeze({
1586
+ WETH: {
1587
+ [Chains.Sepolia]: "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",
1588
+ [Chains.EthereumMainnet]: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
1589
+ [Chains.BaseMainnet]: "0x4200000000000000000000000000000000000006",
1590
+ [Chains.BaseSepolia]: "0x4200000000000000000000000000000000000006"
1591
+ },
1592
+ USDC: {
1593
+ [Chains.Sepolia]: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238",
1594
+ [Chains.EthereumMainnet]: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48",
1595
+ [Chains.BaseMainnet]: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
1596
+ [Chains.BaseSepolia]: "0x036CbD53842c5426634e7929541eC2318f3dCF7e"
1597
+ }
1598
+ });
1599
+ var uniswapV3 = Object.freeze({
1600
+ swapRouter02,
1601
+ quoterV2,
1602
+ permit2,
1603
+ factory,
1604
+ nonfungiblePositionManager,
1605
+ universalRouter,
1606
+ swapRouter02Abi,
1607
+ quoterV2Abi,
1608
+ factoryAbi,
1609
+ tokens: tokens2
1610
+ });
1611
+
1612
+ // src/v4/protocols/wrapped.ts
1613
+ var weth = {
1614
+ [Chains.EthereumMainnet]: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2",
1615
+ [Chains.Sepolia]: "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14",
1616
+ [Chains.BaseMainnet]: "0x4200000000000000000000000000000000000006",
1617
+ [Chains.BaseSepolia]: "0x4200000000000000000000000000000000000006"
1618
+ };
1619
+ var wethAbi = Object.freeze([
1620
+ {
1621
+ inputs: [],
1622
+ name: "deposit",
1623
+ outputs: [],
1624
+ stateMutability: "payable",
1625
+ type: "function"
1626
+ },
1627
+ {
1628
+ inputs: [{ internalType: "uint256", name: "wad", type: "uint256" }],
1629
+ name: "withdraw",
1630
+ outputs: [],
1631
+ stateMutability: "nonpayable",
1632
+ type: "function"
1633
+ },
1634
+ {
1635
+ inputs: [
1636
+ { internalType: "address", name: "guy", type: "address" },
1637
+ { internalType: "uint256", name: "wad", type: "uint256" }
1638
+ ],
1639
+ name: "approve",
1640
+ outputs: [{ internalType: "bool", name: "", type: "bool" }],
1641
+ stateMutability: "nonpayable",
1642
+ type: "function"
1643
+ },
1644
+ {
1645
+ inputs: [{ internalType: "address", name: "", type: "address" }],
1646
+ name: "balanceOf",
1647
+ outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
1648
+ stateMutability: "view",
1649
+ type: "function"
1650
+ }
1651
+ ]);
1652
+ var wrapped = Object.freeze({
1653
+ weth,
1654
+ wethAbi
1655
+ });
1656
+
1657
+ // src/v4/protocols/index.ts
1658
+ var Protocols = Object.freeze({
1659
+ aaveV3,
1660
+ aerodrome,
1661
+ chainlink,
1662
+ compoundV3,
1663
+ erc20,
1664
+ ethena,
1665
+ fraxEther,
1666
+ lido,
1667
+ morphoBlue,
1668
+ rocketPool,
1669
+ sky,
1670
+ spark,
1671
+ superfluid,
1672
+ uniswapV3,
1673
+ wrapped
1674
+ });
817
1675
  export {
818
1676
  APIError,
819
1677
  AUTH_TEMPLATE,
@@ -827,6 +1685,7 @@ export {
827
1685
  Nodes,
828
1686
  NodesResource,
829
1687
  OperatorsResource,
1688
+ Protocols,
830
1689
  SecretsResource,
831
1690
  TokensResource,
832
1691
  Triggers,