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

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 (57) hide show
  1. package/dist/index.js +2 -773
  2. package/dist/index.mjs +1 -772
  3. package/dist/v4/protocols/index.d.ts +1 -131
  4. package/dist/v4/protocols/index.d.ts.map +1 -1
  5. package/dist/v4/protocols/index.js +11 -85
  6. package/package.json +2 -1
  7. package/dist/v4/protocols/aave-v3.d.ts +0 -21
  8. package/dist/v4/protocols/aave-v3.d.ts.map +0 -1
  9. package/dist/v4/protocols/aave-v3.js +0 -238
  10. package/dist/v4/protocols/aerodrome.d.ts +0 -4
  11. package/dist/v4/protocols/aerodrome.d.ts.map +0 -1
  12. package/dist/v4/protocols/aerodrome.js +0 -9
  13. package/dist/v4/protocols/chainlink.d.ts +0 -7
  14. package/dist/v4/protocols/chainlink.d.ts.map +0 -1
  15. package/dist/v4/protocols/chainlink.js +0 -25
  16. package/dist/v4/protocols/common.d.ts +0 -16
  17. package/dist/v4/protocols/common.d.ts.map +0 -1
  18. package/dist/v4/protocols/common.js +0 -76
  19. package/dist/v4/protocols/compound-v3.d.ts +0 -4
  20. package/dist/v4/protocols/compound-v3.d.ts.map +0 -1
  21. package/dist/v4/protocols/compound-v3.js +0 -15
  22. package/dist/v4/protocols/erc20.d.ts +0 -5
  23. package/dist/v4/protocols/erc20.d.ts.map +0 -1
  24. package/dist/v4/protocols/erc20.js +0 -18
  25. package/dist/v4/protocols/ethena.d.ts +0 -7
  26. package/dist/v4/protocols/ethena.d.ts.map +0 -1
  27. package/dist/v4/protocols/ethena.js +0 -58
  28. package/dist/v4/protocols/frax-ether.d.ts +0 -7
  29. package/dist/v4/protocols/frax-ether.d.ts.map +0 -1
  30. package/dist/v4/protocols/frax-ether.js +0 -20
  31. package/dist/v4/protocols/lido.d.ts +0 -7
  32. package/dist/v4/protocols/lido.d.ts.map +0 -1
  33. package/dist/v4/protocols/lido.js +0 -44
  34. package/dist/v4/protocols/morpho.d.ts +0 -6
  35. package/dist/v4/protocols/morpho.d.ts.map +0 -1
  36. package/dist/v4/protocols/morpho.js +0 -89
  37. package/dist/v4/protocols/rocket-pool.d.ts +0 -6
  38. package/dist/v4/protocols/rocket-pool.d.ts.map +0 -1
  39. package/dist/v4/protocols/rocket-pool.js +0 -36
  40. package/dist/v4/protocols/sky.d.ts +0 -6
  41. package/dist/v4/protocols/sky.d.ts.map +0 -1
  42. package/dist/v4/protocols/sky.js +0 -13
  43. package/dist/v4/protocols/spark.d.ts +0 -4
  44. package/dist/v4/protocols/spark.d.ts.map +0 -1
  45. package/dist/v4/protocols/spark.js +0 -15
  46. package/dist/v4/protocols/superfluid.d.ts +0 -6
  47. package/dist/v4/protocols/superfluid.d.ts.map +0 -1
  48. package/dist/v4/protocols/superfluid.js +0 -39
  49. package/dist/v4/protocols/types.d.ts +0 -17
  50. package/dist/v4/protocols/types.d.ts.map +0 -1
  51. package/dist/v4/protocols/types.js +0 -1
  52. package/dist/v4/protocols/uniswap-v3.d.ts +0 -27
  53. package/dist/v4/protocols/uniswap-v3.d.ts.map +0 -1
  54. package/dist/v4/protocols/uniswap-v3.js +0 -197
  55. package/dist/v4/protocols/wrapped.d.ts +0 -6
  56. package/dist/v4/protocols/wrapped.d.ts.map +0 -1
  57. package/dist/v4/protocols/wrapped.js +0 -55
@@ -1,76 +0,0 @@
1
- // Shared ABI fragments that more than one protocol routinely reuses:
2
- // - AggregatorV3Interface for any Chainlink-compatible price feed
3
- // - ERC-4626 deposit/redeem for staking vaults (sUSDe, sfrxETH, sDAI, ...)
4
- // - ERC-20 approve already lives in `./erc20.ts` — keep that import path
5
- // stable since it's the most-touched fragment in the catalog.
6
- /**
7
- * Chainlink AggregatorV3Interface — `latestRoundData` and `decimals`.
8
- * Every Chainlink Data Feed contract implements this, so the same ABI
9
- * works for ETH/USD, BTC/USD, LINK/USD, etc.
10
- */
11
- export const aggregatorV3Abi = Object.freeze([
12
- {
13
- inputs: [],
14
- name: "latestRoundData",
15
- outputs: [
16
- { internalType: "uint80", name: "roundId", type: "uint80" },
17
- { internalType: "int256", name: "answer", type: "int256" },
18
- { internalType: "uint256", name: "startedAt", type: "uint256" },
19
- { internalType: "uint256", name: "updatedAt", type: "uint256" },
20
- { internalType: "uint80", name: "answeredInRound", type: "uint80" },
21
- ],
22
- stateMutability: "view",
23
- type: "function",
24
- },
25
- {
26
- inputs: [],
27
- name: "decimals",
28
- outputs: [{ internalType: "uint8", name: "", type: "uint8" }],
29
- stateMutability: "view",
30
- type: "function",
31
- },
32
- ]);
33
- /**
34
- * Minimal ERC-4626 vault ABI — `deposit`, `redeem`, `previewRedeem`,
35
- * `convertToAssets`. Sufficient for staking vault templates that wrap
36
- * an underlying into a yield-bearing share token (sfrxETH, sDAI, etc.).
37
- * Vaults with non-standard write paths (e.g. sUSDe's cooldown +
38
- * unstake) ship their own ABI in their own protocol module.
39
- */
40
- export const erc4626VaultAbi = Object.freeze([
41
- {
42
- inputs: [
43
- { internalType: "uint256", name: "assets", type: "uint256" },
44
- { internalType: "address", name: "receiver", type: "address" },
45
- ],
46
- name: "deposit",
47
- outputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
48
- stateMutability: "nonpayable",
49
- type: "function",
50
- },
51
- {
52
- inputs: [
53
- { internalType: "uint256", name: "shares", type: "uint256" },
54
- { internalType: "address", name: "receiver", type: "address" },
55
- { internalType: "address", name: "owner", type: "address" },
56
- ],
57
- name: "redeem",
58
- outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
59
- stateMutability: "nonpayable",
60
- type: "function",
61
- },
62
- {
63
- inputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
64
- name: "previewRedeem",
65
- outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
66
- stateMutability: "view",
67
- type: "function",
68
- },
69
- {
70
- inputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
71
- name: "convertToAssets",
72
- outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
73
- stateMutability: "view",
74
- type: "function",
75
- },
76
- ]);
@@ -1,4 +0,0 @@
1
- export declare const compoundV3: Readonly<{
2
- cometUsdc: Partial<Record<number, `0x${string}`>>;
3
- }>;
4
- //# sourceMappingURL=compound-v3.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"compound-v3.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/compound-v3.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,UAAU;;EAErB,CAAC"}
@@ -1,15 +0,0 @@
1
- // Compound V3 (Comet) — USDC base market.
2
- //
3
- // Comet bundles supply/borrow on a single contract: `supply` /
4
- // `withdraw` move the base asset (USDC, 6 decimals) or collateral;
5
- // `withdraw` past zero opens a borrow.
6
- //
7
- // Address parity with studio/app/lib/contracts/protocols/compound-v3.ts.
8
- import { Chains } from "../chains";
9
- const cometUsdc = {
10
- [Chains.EthereumMainnet]: "0xc3d688B66703497DAA19211EEdff47f25384cdc3",
11
- [Chains.BaseMainnet]: "0xb125E6687d4313864e53df431d5425969c15Eb2F",
12
- };
13
- export const compoundV3 = Object.freeze({
14
- cometUsdc,
15
- });
@@ -1,5 +0,0 @@
1
- import { type AbiFragment } from "./types";
2
- export declare const erc20: Readonly<{
3
- approveAbi: readonly AbiFragment[];
4
- }>;
5
- //# sourceMappingURL=erc20.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"erc20.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/erc20.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAE,MAAM,SAAS,CAAC;AAE3C,eAAO,MAAM,KAAK;gBAYV,SAAS,WAAW,EAAE;EAC5B,CAAC"}
@@ -1,18 +0,0 @@
1
- // Minimal ERC-20 ABI fragments that templates routinely need but don't
2
- // belong to any one protocol. `approveAbi` is the standard 2-arg ERC-20
3
- // approve — used by any DeFi flow that funnels tokens through a protocol's
4
- // pool/router (AAVE.supply, Uniswap.swap, etc.).
5
- export const erc20 = Object.freeze({
6
- approveAbi: Object.freeze([
7
- {
8
- inputs: [
9
- { internalType: "address", name: "spender", type: "address" },
10
- { internalType: "uint256", name: "amount", type: "uint256" },
11
- ],
12
- name: "approve",
13
- outputs: [{ internalType: "bool", name: "", type: "bool" }],
14
- stateMutability: "nonpayable",
15
- type: "function",
16
- },
17
- ]),
18
- });
@@ -1,7 +0,0 @@
1
- import { type AbiFragment } from "./types";
2
- export declare const ethena: Readonly<{
3
- susde: Partial<Record<number, `0x${string}`>>;
4
- usde: Partial<Record<number, `0x${string}`>>;
5
- susdeAbi: readonly AbiFragment[];
6
- }>;
7
- //# sourceMappingURL=ethena.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ethena.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/ethena.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,SAAS,CAAC;AAmDhE,eAAO,MAAM,MAAM;;;;EAIjB,CAAC"}
@@ -1,58 +0,0 @@
1
- // Ethena — USDe synthetic dollar + sUSDe staking vault.
2
- //
3
- // sUSDe (StakedUSDeV2) is ERC-4626-shaped on the deposit side but
4
- // gates withdrawals behind a cooldown: redemption is a two-step
5
- // `cooldownShares` → `unstake` flow, NOT a direct ERC-4626 redeem.
6
- // So we ship a custom ABI rather than reusing `common.erc4626VaultAbi`.
7
- import { Chains } from "../chains";
8
- const susde = {
9
- [Chains.EthereumMainnet]: "0x9D39A5DE30e57443BfF2A8307A4256c8797A3497",
10
- };
11
- const usde = {
12
- [Chains.EthereumMainnet]: "0x4c9EDD5852cd905f086C759E8383e09bff1E68B3",
13
- };
14
- const susdeAbi = Object.freeze([
15
- {
16
- inputs: [
17
- { internalType: "uint256", name: "assets", type: "uint256" },
18
- { internalType: "address", name: "receiver", type: "address" },
19
- ],
20
- name: "deposit",
21
- outputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
22
- stateMutability: "nonpayable",
23
- type: "function",
24
- },
25
- {
26
- inputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
27
- name: "cooldownShares",
28
- outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
29
- stateMutability: "nonpayable",
30
- type: "function",
31
- },
32
- {
33
- inputs: [{ internalType: "address", name: "receiver", type: "address" }],
34
- name: "unstake",
35
- outputs: [],
36
- stateMutability: "nonpayable",
37
- type: "function",
38
- },
39
- {
40
- inputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
41
- name: "previewRedeem",
42
- outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
43
- stateMutability: "view",
44
- type: "function",
45
- },
46
- {
47
- inputs: [{ internalType: "uint256", name: "shares", type: "uint256" }],
48
- name: "convertToAssets",
49
- outputs: [{ internalType: "uint256", name: "assets", type: "uint256" }],
50
- stateMutability: "view",
51
- type: "function",
52
- },
53
- ]);
54
- export const ethena = Object.freeze({
55
- susde,
56
- usde,
57
- susdeAbi,
58
- });
@@ -1,7 +0,0 @@
1
- export declare const fraxEther: Readonly<{
2
- sfrxeth: Partial<Record<number, `0x${string}`>>;
3
- frxeth: Partial<Record<number, `0x${string}`>>;
4
- /** Standard ERC-4626 surface — sfrxETH conforms exactly. */
5
- vaultAbi: readonly import("./types").AbiFragment[];
6
- }>;
7
- //# sourceMappingURL=frax-ether.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"frax-ether.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/frax-ether.ts"],"names":[],"mappings":"AAmBA,eAAO,MAAM,SAAS;;;IAGpB,4DAA4D;;EAE5D,CAAC"}
@@ -1,20 +0,0 @@
1
- // Frax Ether — frxETH (the L1 liquid token) + sfrxETH (the ERC-4626
2
- // staking vault that distributes validator yield to depositors).
3
- //
4
- // sfrxETH is a standard ERC-4626 vault — deposit/redeem/previewRedeem/
5
- // convertToAssets all live in `common.erc4626VaultAbi`. We just need
6
- // to surface the addresses.
7
- import { Chains } from "../chains";
8
- import { erc4626VaultAbi } from "./common";
9
- const sfrxeth = {
10
- [Chains.EthereumMainnet]: "0xac3E018457B222d93114458476f3E3416Abbe38F",
11
- };
12
- const frxeth = {
13
- [Chains.EthereumMainnet]: "0x5E8422345238F34275888049021821E8E08CAa1f",
14
- };
15
- export const fraxEther = Object.freeze({
16
- sfrxeth,
17
- frxeth,
18
- /** Standard ERC-4626 surface — sfrxETH conforms exactly. */
19
- vaultAbi: erc4626VaultAbi,
20
- });
@@ -1,7 +0,0 @@
1
- import { type AbiFragment } from "./types";
2
- export declare const lido: Readonly<{
3
- wsteth: Partial<Record<number, `0x${string}`>>;
4
- steth: Partial<Record<number, `0x${string}`>>;
5
- wstethAbi: readonly AbiFragment[];
6
- }>;
7
- //# sourceMappingURL=lido.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"lido.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/lido.ts"],"names":[],"mappings":"AAMA,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,SAAS,CAAC;AAuChE,eAAO,MAAM,IAAI;;;;EAIf,CAAC"}
@@ -1,44 +0,0 @@
1
- // Lido — stETH (L1 rebasing) + wstETH (wrapped). Wrap/unwrap only
2
- // exist on the L1 wstETH contract; the Base wstETH entry is a
3
- // bridged ERC-20 and supports standard ERC-20 transfers / approvals
4
- // only. stETH is not bridged to Base.
5
- import { Chains } from "../chains";
6
- const wsteth = {
7
- [Chains.EthereumMainnet]: "0x7f39C581F595B53c5cb19bD0b3f8dA6c935E2Ca0",
8
- [Chains.BaseMainnet]: "0xc1CBa3fCea344f92D9239c08C0568f6F2F0ee452",
9
- };
10
- const steth = {
11
- [Chains.EthereumMainnet]: "0xae7ab96520DE3A18E5e111B5EaAb095312D7fE84",
12
- };
13
- /**
14
- * wstETH wrap/unwrap + getStETHByWstETH read. L1-only — calls against
15
- * the Base bridged token revert.
16
- */
17
- const wstethAbi = Object.freeze([
18
- {
19
- inputs: [{ internalType: "uint256", name: "_stETHAmount", type: "uint256" }],
20
- name: "wrap",
21
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
22
- stateMutability: "nonpayable",
23
- type: "function",
24
- },
25
- {
26
- inputs: [{ internalType: "uint256", name: "_wstETHAmount", type: "uint256" }],
27
- name: "unwrap",
28
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
29
- stateMutability: "nonpayable",
30
- type: "function",
31
- },
32
- {
33
- inputs: [{ internalType: "uint256", name: "_wstETHAmount", type: "uint256" }],
34
- name: "getStETHByWstETH",
35
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
36
- stateMutability: "view",
37
- type: "function",
38
- },
39
- ]);
40
- export const lido = Object.freeze({
41
- wsteth,
42
- steth,
43
- wstethAbi,
44
- });
@@ -1,6 +0,0 @@
1
- import { type AbiFragment } from "./types";
2
- export declare const morphoBlue: Readonly<{
3
- morpho: Partial<Record<number, `0x${string}`>>;
4
- morphoAbi: readonly AbiFragment[];
5
- }>;
6
- //# sourceMappingURL=morpho.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"morpho.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/morpho.ts"],"names":[],"mappings":"AAOA,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,SAAS,CAAC;AAmFhE,eAAO,MAAM,UAAU;;;EAGrB,CAAC"}
@@ -1,89 +0,0 @@
1
- // Morpho Blue — permissionless lending singleton. Same address on
2
- // every supported chain. Every market is addressed by a `MarketParams`
3
- // tuple (loanToken, collateralToken, oracle, irm, lltv); lending calls
4
- // pass that struct plus an amount in either `assets` or `shares`
5
- // (one is zero).
6
- import { Chains } from "../chains";
7
- const morpho = {
8
- [Chains.EthereumMainnet]: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
9
- [Chains.BaseMainnet]: "0xBBBBBbbBBb9cC5e90e3b3Af64bdAF62C37EEFFCb",
10
- };
11
- /**
12
- * Morpho Blue minimal write+read surface. Each write takes the full
13
- * `MarketParams` tuple as the first argument; the `data` callback
14
- * bytes default to `0x` in template usage.
15
- */
16
- const morphoAbi = Object.freeze([
17
- {
18
- inputs: [
19
- {
20
- components: [
21
- { internalType: "address", name: "loanToken", type: "address" },
22
- { internalType: "address", name: "collateralToken", type: "address" },
23
- { internalType: "address", name: "oracle", type: "address" },
24
- { internalType: "address", name: "irm", type: "address" },
25
- { internalType: "uint256", name: "lltv", type: "uint256" },
26
- ],
27
- internalType: "struct MarketParams",
28
- name: "marketParams",
29
- type: "tuple",
30
- },
31
- { internalType: "uint256", name: "assets", type: "uint256" },
32
- { internalType: "uint256", name: "shares", type: "uint256" },
33
- { internalType: "address", name: "onBehalf", type: "address" },
34
- { internalType: "bytes", name: "data", type: "bytes" },
35
- ],
36
- name: "supply",
37
- outputs: [
38
- { internalType: "uint256", name: "assetsSupplied", type: "uint256" },
39
- { internalType: "uint256", name: "sharesSupplied", type: "uint256" },
40
- ],
41
- stateMutability: "nonpayable",
42
- type: "function",
43
- },
44
- {
45
- inputs: [
46
- {
47
- components: [
48
- { internalType: "address", name: "loanToken", type: "address" },
49
- { internalType: "address", name: "collateralToken", type: "address" },
50
- { internalType: "address", name: "oracle", type: "address" },
51
- { internalType: "address", name: "irm", type: "address" },
52
- { internalType: "uint256", name: "lltv", type: "uint256" },
53
- ],
54
- internalType: "struct MarketParams",
55
- name: "marketParams",
56
- type: "tuple",
57
- },
58
- { internalType: "uint256", name: "assets", type: "uint256" },
59
- { internalType: "uint256", name: "shares", type: "uint256" },
60
- { internalType: "address", name: "onBehalf", type: "address" },
61
- { internalType: "address", name: "receiver", type: "address" },
62
- ],
63
- name: "borrow",
64
- outputs: [
65
- { internalType: "uint256", name: "assetsBorrowed", type: "uint256" },
66
- { internalType: "uint256", name: "sharesBorrowed", type: "uint256" },
67
- ],
68
- stateMutability: "nonpayable",
69
- type: "function",
70
- },
71
- {
72
- inputs: [
73
- { internalType: "bytes32", name: "id", type: "bytes32" },
74
- { internalType: "address", name: "user", type: "address" },
75
- ],
76
- name: "position",
77
- outputs: [
78
- { internalType: "uint256", name: "supplyShares", type: "uint256" },
79
- { internalType: "uint128", name: "borrowShares", type: "uint128" },
80
- { internalType: "uint128", name: "collateral", type: "uint128" },
81
- ],
82
- stateMutability: "view",
83
- type: "function",
84
- },
85
- ]);
86
- export const morphoBlue = Object.freeze({
87
- morpho,
88
- morphoAbi,
89
- });
@@ -1,6 +0,0 @@
1
- import { type AbiFragment } from "./types";
2
- export declare const rocketPool: Readonly<{
3
- reth: Partial<Record<number, `0x${string}`>>;
4
- rethAbi: readonly AbiFragment[];
5
- }>;
6
- //# sourceMappingURL=rocket-pool.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"rocket-pool.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/rocket-pool.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,SAAS,CAAC;AAgChE,eAAO,MAAM,UAAU;;;EAGrB,CAAC"}
@@ -1,36 +0,0 @@
1
- // Rocket Pool — rETH liquid-staking token. L1 rETH supports burn /
2
- // getExchangeRate / getEthValue; Base rETH is a bridged ERC-20 and
3
- // only exposes the standard ERC-20 surface.
4
- import { Chains } from "../chains";
5
- const reth = {
6
- [Chains.EthereumMainnet]: "0xae78736Cd615f374D3085123A210448E74Fc6393",
7
- [Chains.BaseMainnet]: "0xB6fe221Fe9EeF5aBa221c348bA20A1Bf5e73624c",
8
- };
9
- /** L1-only `burn` + rate/value reads. */
10
- const rethAbi = Object.freeze([
11
- {
12
- inputs: [{ internalType: "uint256", name: "_rethAmount", type: "uint256" }],
13
- name: "burn",
14
- outputs: [],
15
- stateMutability: "nonpayable",
16
- type: "function",
17
- },
18
- {
19
- inputs: [],
20
- name: "getExchangeRate",
21
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
22
- stateMutability: "view",
23
- type: "function",
24
- },
25
- {
26
- inputs: [{ internalType: "uint256", name: "_rethAmount", type: "uint256" }],
27
- name: "getEthValue",
28
- outputs: [{ internalType: "uint256", name: "", type: "uint256" }],
29
- stateMutability: "view",
30
- type: "function",
31
- },
32
- ]);
33
- export const rocketPool = Object.freeze({
34
- reth,
35
- rethAbi,
36
- });
@@ -1,6 +0,0 @@
1
- export declare const sky: Readonly<{
2
- sdai: Partial<Record<number, `0x${string}`>>;
3
- /** Standard ERC-4626 surface — sDAI conforms exactly. */
4
- vaultAbi: readonly import("./types").AbiFragment[];
5
- }>;
6
- //# sourceMappingURL=sky.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"sky.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/sky.ts"],"names":[],"mappings":"AAYA,eAAO,MAAM,GAAG;;IAEd,yDAAyD;;EAEzD,CAAC"}
@@ -1,13 +0,0 @@
1
- // Sky Protocol (formerly MakerDAO) — sDAI savings vault. Standard
2
- // ERC-4626 wrapper over the Dai Savings Rate (no cooldown), so the
3
- // shared vault ABI applies cleanly.
4
- import { Chains } from "../chains";
5
- import { erc4626VaultAbi } from "./common";
6
- const sdai = {
7
- [Chains.EthereumMainnet]: "0x83F20F44975D03b1b09e64809B757c47f942BEeA",
8
- };
9
- export const sky = Object.freeze({
10
- sdai,
11
- /** Standard ERC-4626 surface — sDAI conforms exactly. */
12
- vaultAbi: erc4626VaultAbi,
13
- });
@@ -1,4 +0,0 @@
1
- export declare const spark: Readonly<{
2
- pool: Partial<Record<number, `0x${string}`>>;
3
- }>;
4
- //# sourceMappingURL=spark.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"spark.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/spark.ts"],"names":[],"mappings":"AAgBA,eAAO,MAAM,KAAK;;EAEhB,CAAC"}
@@ -1,15 +0,0 @@
1
- // Spark Protocol — SparkLend money market, an AAVE V3 fork.
2
- //
3
- // Because Spark forked AAVE V3 unchanged, the Pool contract surface
4
- // is identical: `supply`, `withdraw`, `borrow`, `repay`,
5
- // `setUserUseReserveAsCollateral`, `getUserAccountData` — same
6
- // signatures as `Protocols.aaveV3.poolMethodsAbi`. Templates that
7
- // target Spark can pass `aaveV3.poolMethodsAbi` directly; we don't
8
- // re-vendor a copy. Only the addresses differ.
9
- import { Chains } from "../chains";
10
- const pool = {
11
- [Chains.EthereumMainnet]: "0xC13e21B648A5Ee794902342038FF3aDAB66BE987",
12
- };
13
- export const spark = Object.freeze({
14
- pool,
15
- });
@@ -1,6 +0,0 @@
1
- import { type AbiFragment } from "./types";
2
- export declare const superfluid: Readonly<{
3
- cfaForwarder: Partial<Record<number, `0x${string}`>>;
4
- cfaForwarderAbi: readonly AbiFragment[];
5
- }>;
6
- //# sourceMappingURL=superfluid.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"superfluid.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/superfluid.ts"],"names":[],"mappings":"AAKA,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,SAAS,CAAC;AAmChE,eAAO,MAAM,UAAU;;;EAGrB,CAAC"}
@@ -1,39 +0,0 @@
1
- // Superfluid — money streaming via the CFAv1Forwarder. Deployed at
2
- // the same address on every Superfluid network (Ethereum, Base,
3
- // Polygon, Optimism, ...). Flow rates are tokens-per-second as int96.
4
- import { Chains } from "../chains";
5
- const cfaForwarder = {
6
- [Chains.EthereumMainnet]: "0xcfA132E353cB4E398080B9700609bb008eceB125",
7
- [Chains.BaseMainnet]: "0xcfA132E353cB4E398080B9700609bb008eceB125",
8
- };
9
- /** CFAv1Forwarder minimal write surface — `setFlowrate` + `createFlow`. */
10
- const cfaForwarderAbi = Object.freeze([
11
- {
12
- inputs: [
13
- { internalType: "address", name: "token", type: "address" },
14
- { internalType: "address", name: "receiver", type: "address" },
15
- { internalType: "int96", name: "flowrate", type: "int96" },
16
- ],
17
- name: "setFlowrate",
18
- outputs: [{ internalType: "bool", name: "", type: "bool" }],
19
- stateMutability: "nonpayable",
20
- type: "function",
21
- },
22
- {
23
- inputs: [
24
- { internalType: "address", name: "token", type: "address" },
25
- { internalType: "address", name: "sender", type: "address" },
26
- { internalType: "address", name: "receiver", type: "address" },
27
- { internalType: "int96", name: "flowrate", type: "int96" },
28
- { internalType: "bytes", name: "userData", type: "bytes" },
29
- ],
30
- name: "createFlow",
31
- outputs: [{ internalType: "bool", name: "", type: "bool" }],
32
- stateMutability: "nonpayable",
33
- type: "function",
34
- },
35
- ]);
36
- export const superfluid = Object.freeze({
37
- cfaForwarder,
38
- cfaForwarderAbi,
39
- });
@@ -1,17 +0,0 @@
1
- export interface AbiFragment {
2
- readonly name?: string;
3
- readonly type: string;
4
- readonly stateMutability?: string;
5
- readonly anonymous?: boolean;
6
- readonly inputs?: readonly unknown[];
7
- readonly outputs?: readonly unknown[];
8
- readonly [key: string]: unknown;
9
- }
10
- import { type ChainId } from "../chains";
11
- /**
12
- * Per-chain address map. Use `ChainId` constants from `Chains.*` for
13
- * the keys at the call site; `Partial` because not every protocol
14
- * ships on every chain.
15
- */
16
- export type AddressByChain = Partial<Record<ChainId, `0x${string}`>>;
17
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/types.ts"],"names":[],"mappings":"AAQA,MAAM,WAAW,WAAW;IAC1B,QAAQ,CAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IACvB,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,eAAe,CAAC,EAAE,MAAM,CAAC;IAClC,QAAQ,CAAC,SAAS,CAAC,EAAE,OAAO,CAAC;IAC7B,QAAQ,CAAC,MAAM,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IACrC,QAAQ,CAAC,OAAO,CAAC,EAAE,SAAS,OAAO,EAAE,CAAC;IAMtC,QAAQ,EAAE,GAAG,EAAE,MAAM,GAAG,OAAO,CAAC;CACjC;AAED,OAAO,EAAE,KAAK,OAAO,EAAE,MAAM,WAAW,CAAC;AAEzC;;;;GAIG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,MAAM,CAAC,OAAO,EAAE,KAAK,MAAM,EAAE,CAAC,CAAC,CAAC"}
@@ -1 +0,0 @@
1
- export {};
@@ -1,27 +0,0 @@
1
- import { type AbiFragment } from "./types";
2
- export declare const uniswapV3: Readonly<{
3
- swapRouter02: Partial<Record<number, `0x${string}`>>;
4
- quoterV2: Partial<Record<number, `0x${string}`>>;
5
- permit2: Partial<Record<number, `0x${string}`>>;
6
- factory: Partial<Record<number, `0x${string}`>>;
7
- nonfungiblePositionManager: Partial<Record<number, `0x${string}`>>;
8
- universalRouter: Partial<Record<number, `0x${string}`>>;
9
- swapRouter02Abi: readonly AbiFragment[];
10
- quoterV2Abi: readonly AbiFragment[];
11
- factoryAbi: readonly AbiFragment[];
12
- tokens: Readonly<{
13
- WETH: {
14
- 11155111: "0xfFf9976782d46CC05630D1f6eBAb18b2324d6B14";
15
- 1: "0xC02aaA39b223FE8D0A0e5C4F27eAD9083C756Cc2";
16
- 8453: "0x4200000000000000000000000000000000000006";
17
- 84532: "0x4200000000000000000000000000000000000006";
18
- };
19
- USDC: {
20
- 11155111: "0x1c7D4B196Cb0C7B01d743Fbc6116a902379C7238";
21
- 1: "0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48";
22
- 8453: "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913";
23
- 84532: "0x036CbD53842c5426634e7929541eC2318f3dCF7e";
24
- };
25
- }>;
26
- }>;
27
- //# sourceMappingURL=uniswap-v3.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"uniswap-v3.d.ts","sourceRoot":"","sources":["../../../src/v4/protocols/uniswap-v3.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,KAAK,WAAW,EAAuB,MAAM,SAAS,CAAC;AAqLhE,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;EAWpB,CAAC"}