@zyfai/sdk 0.12.0 → 0.15.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -22
- package/dist/index.d.mts +99 -17
- package/dist/index.d.ts +99 -17
- package/dist/index.js +386 -52
- package/dist/index.mjs +364 -24
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -134,16 +134,18 @@ This method:
|
|
|
134
134
|
> - The address is always the backend-assigned one; it is **never** derived with
|
|
135
135
|
> `getDeterministicSafeAddress`.
|
|
136
136
|
>
|
|
137
|
-
>
|
|
138
|
-
>
|
|
137
|
+
> Onboarding a pool wallet takes a single funding signature. Eligible direct
|
|
138
|
+
> first deposits use a sponsored ERC-2612 permit.
|
|
139
139
|
>
|
|
140
|
-
> **Registering
|
|
140
|
+
> **Registering a wallet transfer.** For pool wallets, an on-chain
|
|
141
141
|
> ERC-20 transfer alone does **not** subscribe the user. The backend must also
|
|
142
142
|
> receive `POST /users/log_deposit` with a **user JWT** (`Authorization: Bearer
|
|
143
143
|
> …`) from SIWE — your SDK API key is not enough (that call returns **401**).
|
|
144
144
|
> Without a successful `log_deposit`, ownership is not rotated, the session key
|
|
145
145
|
> is not activated, and funds sit idle in the Safe.
|
|
146
146
|
>
|
|
147
|
+
> For sponsored permit deposits, the execution API registers the confirmed pull.
|
|
148
|
+
>
|
|
147
149
|
> The pool's ERC-7579 module addresses are exported as reference constants
|
|
148
150
|
> (`POOL_MODULE_ADDRESSES`, `INTENT_SMART_SESSIONS`, `PROXY_EXECUTOR`, …) for
|
|
149
151
|
> parity/validation only — the SDK does not install them.
|
|
@@ -417,7 +419,7 @@ console.log("User ID:", result.userId);
|
|
|
417
419
|
|
|
418
420
|
### 4. Send a Deposit
|
|
419
421
|
|
|
420
|
-
|
|
422
|
+
Fund your Safe smart wallet. The SDK selects the token address from the chain and asset.
|
|
421
423
|
|
|
422
424
|
- **Ethereum Mainnet (1), Base (8453), Arbitrum (42161)**: USDC (default) or WETH
|
|
423
425
|
- **Ethereum Mainnet (1), Base (8453)**: EURC (6 decimals; not available on Arbitrum)
|
|
@@ -435,6 +437,18 @@ Minimums for WETH and NVDAc are quoted in dollars and converted at deposit time
|
|
|
435
437
|
|
|
436
438
|
Top-ups smaller than the minimum are allowed if the Safe already holds enough of the asset to meet it after the deposit.
|
|
437
439
|
|
|
440
|
+
For a direct first deposit into a reserved pool Safe, `sendDeposit()` and `sendDirectDeposit()` request a typed-data signature when the execution API enables the token on that chain. Zyfai sponsors the pull and returns the normal deposit registration. Other direct deposits use a wallet transfer.
|
|
441
|
+
|
|
442
|
+
If the permit response is interrupted or times out, check its status before retrying:
|
|
443
|
+
|
|
444
|
+
```typescript
|
|
445
|
+
const intent = await sdk.getFirstPermitDepositStatus(userAddress);
|
|
446
|
+
if (intent?.depositId) {
|
|
447
|
+
await sdk.waitForDepositCredit(intent.depositId, intent.chainId);
|
|
448
|
+
}
|
|
449
|
+
```
|
|
450
|
+
|
|
451
|
+
|
|
438
452
|
```typescript
|
|
439
453
|
// Send 10 USDC (6 decimals) to Safe on Base.
|
|
440
454
|
const sent = await sdk.sendDeposit(
|
|
@@ -468,8 +482,8 @@ if (credited.status === "credited") {
|
|
|
468
482
|
- Amount must be in least decimal units. For USDC (6 decimals): 1 USDC = 1000000
|
|
469
483
|
- `asset` is required (`"USDC"`, `"WETH"`, `"EURC"`, `"USDT"`, `"PYUSD"`, or `"NVDAc"` — EURC on Mainnet/Base, USDT and PYUSD on Mainnet, NVDAc on Base); token address is selected from that for the chain. Depositing an asset on a chain where it does not exist throws before any transfer.
|
|
470
484
|
- The total Safe balance must meet the per-asset minimum after the deposit (see above). WETH uses a live ETH/USD price, so the wei threshold moves with the market.
|
|
471
|
-
- Call `connectAccount()` on the **same** `ZyfaiSDK` instance before `sendDeposit()`. The
|
|
472
|
-
- `sendDeposit(userAddress, chainId, amount, asset)`
|
|
485
|
+
- Call `connectAccount()` on the **same** `ZyfaiSDK` instance before `sendDeposit()`. The SDK uses that session's JWT to submit a permit or register a wallet transfer.
|
|
486
|
+
- `sendDeposit(userAddress, chainId, amount, asset)` funds the Safe directly when the wallet already holds the collateral. Pass an object with `spendToken` when the wallet holds a different token or the same token on another chain: the execution API quotes Relay, the wallet signs, and the Safe receives `asset`. Same-chain ETH into WETH wraps in the wallet (`spendToken: "ETH"`). `sendDirectDeposit` and `sendSwapDeposit` are the two steps `sendDeposit` chooses between. Optional `slippageBps` on a swap defaults to 200 (max 500) and is fixed when the funding order is created. Omit it to use the server default. A later `sendSwapDeposit({ orderId })` ignores a new `slippageBps` and signs the stored order.
|
|
473
487
|
|
|
474
488
|
```typescript
|
|
475
489
|
const swapped = await sdk.sendDeposit({
|
|
@@ -485,7 +499,7 @@ if (credited.status === "credited") {
|
|
|
485
499
|
|
|
486
500
|
- `sendDeposit()` confirms the transfer (or the Relay fill) and registers its lifecycle, then returns its ID. Call `waitForDepositPosition()` when the UI should wait until allocation finishes. `waitForDepositCredit()` is the shorter wait for credited balance only.
|
|
487
501
|
- `depositFunds()` remains a compatibility wrapper that calls both steps and waits through the normal completion window; it **rejects** if credit is not confirmed in that window (track in-flight deposits with `getDepositStatus()` or call `waitForDepositCredit()` with a longer `timeoutMs`).
|
|
488
|
-
- If first-deposit protocol patching fails,
|
|
502
|
+
- If first-deposit protocol patching fails, funding still proceeds. If registration fails after a wallet transfer, use the transfer hash to retry `logDeposit()` after `connectAccount()`.
|
|
489
503
|
- **First deposit only** (before transfer + `log_deposit`): if the USDC profile has no `chains` yet, the SDK patches protocols for **USDC, WETH, EURC, USDT, PYUSD, and NVDAc**, each across the chains it exists on (EURC on Mainnet/Base, USDT and PYUSD on Mainnet, NVDAc on Base → `assetTypeSettings.[usdc|eth|eurc|usdt|pyusd|nvdac]`). Pass optional `strategy` (`"conservative"` default, `"aggressive"` or `"yieldmaxxing"`) — same role as the former `deploySafe` strategy argument. Later deposits skip this.
|
|
490
504
|
- **`strategy` is ignored on later deposits, and no error is raised.** Re-running the patch would overwrite a protocol selection the user may have customised, so passing `"yieldmaxxing"` to an account that has already deposited leaves it on its current strategy. To change an existing account, use `setStrategyWithProtocols` or `setAssetStrategy` (not `updateUserProfile` alone):
|
|
491
505
|
|
|
@@ -656,28 +670,30 @@ const redeeming = (portfolio.pendingAsyncWithdrawals ?? []).some(
|
|
|
656
670
|
|
|
657
671
|
### Claim rZFI Rewards
|
|
658
672
|
|
|
659
|
-
rZFI accrues to the user's Safe on Base
|
|
660
|
-
|
|
661
|
-
|
|
673
|
+
rZFI accrues to the user's Safe on Base. Build the claim as an unsigned
|
|
674
|
+
transaction and sign and send it with your own signer, like
|
|
675
|
+
`buildDepositTransfer`:
|
|
662
676
|
|
|
663
677
|
```typescript
|
|
664
|
-
|
|
665
|
-
|
|
666
|
-
// prepared.claimableAmount (wei), prepared.userOpHashToSign
|
|
678
|
+
const tx = await sdk.buildRzfiClaimTransaction(userAddress);
|
|
679
|
+
// tx.claimableAmount (wei), tx.to, tx.data, tx.value
|
|
667
680
|
|
|
668
|
-
//
|
|
669
|
-
const
|
|
681
|
+
// Send from userAddress on Base (8453). Any other sender reverts.
|
|
682
|
+
const hash = await walletClient.sendTransaction({
|
|
670
683
|
account: userAddress,
|
|
671
|
-
|
|
684
|
+
chain: base,
|
|
685
|
+
to: tx.to,
|
|
686
|
+
data: tx.data,
|
|
687
|
+
value: BigInt(tx.value),
|
|
672
688
|
});
|
|
673
|
-
|
|
674
|
-
// 3. Submit within 5 minutes
|
|
675
|
-
const { txHash } = await sdk.submitRzfiClaim(userAddress, signature);
|
|
676
689
|
```
|
|
677
690
|
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
691
|
+
The sender pays the gas (about 250k on Base). It throws when there is nothing
|
|
692
|
+
to claim, or asks you to retry while Merkl's reward tree is updating on-chain.
|
|
693
|
+
|
|
694
|
+
For a gas-sponsored claim, use `prepareRzfiClaim(userAddress)`, sign the
|
|
695
|
+
returned `userOpHashToSign` (personal_sign of the raw hash), then
|
|
696
|
+
`submitRzfiClaim(userAddress, signature)`.
|
|
681
697
|
|
|
682
698
|
### 6. Get Available Protocols
|
|
683
699
|
|
package/dist/index.d.mts
CHANGED
|
@@ -14,6 +14,8 @@ type Hex = `0x${string}`;
|
|
|
14
14
|
* see `PortfolioDetailed.pendingAsyncWithdrawals`.
|
|
15
15
|
*/
|
|
16
16
|
type Strategy = "conservative" | "aggressive" | "yieldmaxxing";
|
|
17
|
+
/** Strategy labels returned on opportunity rows (includes renamed public tiers). */
|
|
18
|
+
type OpportunityStrategyType = "conservative" | "balanced" | "advanced" | Strategy;
|
|
17
19
|
/** Public asset symbols supported by the SDK */
|
|
18
20
|
type SupportedAsset = "USDC" | "WETH" | "EURC" | "USDT" | "PYUSD" | "NVDAc";
|
|
19
21
|
/** Optional per-chain RPC URLs for on-chain reads and writes. */
|
|
@@ -557,14 +559,14 @@ interface Opportunity {
|
|
|
557
559
|
tvl?: number;
|
|
558
560
|
asset?: string;
|
|
559
561
|
risk?: string;
|
|
560
|
-
/**
|
|
561
|
-
strategyType:
|
|
562
|
+
/** Strategy tier for this pool (see {@link OpportunityStrategyType}). */
|
|
563
|
+
strategyType: OpportunityStrategyType;
|
|
562
564
|
status?: string;
|
|
563
565
|
}
|
|
564
566
|
interface OpportunitiesResponse {
|
|
565
567
|
success: boolean;
|
|
566
568
|
chainId?: number;
|
|
567
|
-
strategyType:
|
|
569
|
+
strategyType: OpportunityStrategyType;
|
|
568
570
|
data: Opportunity[];
|
|
569
571
|
}
|
|
570
572
|
interface ApyPosition {
|
|
@@ -618,7 +620,7 @@ interface DepositResponse {
|
|
|
618
620
|
amount: string;
|
|
619
621
|
/**
|
|
620
622
|
* How the collateral reached the Safe.
|
|
621
|
-
* `direct`
|
|
623
|
+
* `direct` sends the collateral by permit or wallet transfer. `swap` converts another token
|
|
622
624
|
* through Relay. `wrap` turns same-chain native ETH into WETH, then transfers it.
|
|
623
625
|
*/
|
|
624
626
|
route?: "direct" | "swap" | "wrap";
|
|
@@ -630,6 +632,18 @@ interface DepositResponse {
|
|
|
630
632
|
*/
|
|
631
633
|
registration: DepositLifecycleResponse;
|
|
632
634
|
}
|
|
635
|
+
/** Current sponsored first-deposit intent for the authenticated EOA. */
|
|
636
|
+
interface FirstPermitDepositStatus {
|
|
637
|
+
id: string;
|
|
638
|
+
status: "prepared" | "queued" | "submitted" | "registered" | "failed";
|
|
639
|
+
chainId: SupportedChainId;
|
|
640
|
+
token: Address;
|
|
641
|
+
/** Exact collateral amount in least units. */
|
|
642
|
+
amount: string;
|
|
643
|
+
/** Available after the backend registers the confirmed pull. */
|
|
644
|
+
depositId: string | null;
|
|
645
|
+
txHash: Hex | null;
|
|
646
|
+
}
|
|
633
647
|
/**
|
|
634
648
|
* Spend a token that is not already the destination collateral.
|
|
635
649
|
* The execution API quotes Relay; the connected wallet signs the steps.
|
|
@@ -703,7 +717,7 @@ interface SwapDepositOrder {
|
|
|
703
717
|
lastError?: string | null;
|
|
704
718
|
}
|
|
705
719
|
/**
|
|
706
|
-
* `sendDeposit` input. Omit `spendToken` to
|
|
720
|
+
* `sendDeposit` input. Omit `spendToken` to deposit `asset` directly on `chainId`.
|
|
707
721
|
* Set `spendToken` when the wallet holds a different token or chain.
|
|
708
722
|
*/
|
|
709
723
|
interface SendDepositParams {
|
|
@@ -794,6 +808,17 @@ interface MerklCampaign {
|
|
|
794
808
|
/** True while now is between startDate and endDate. */
|
|
795
809
|
isActive: boolean;
|
|
796
810
|
}
|
|
811
|
+
/** Unsigned rZFI claim from {@link ZyfaiSDK.buildRzfiClaimTransaction}. */
|
|
812
|
+
interface RzfiClaimTransaction {
|
|
813
|
+
/** Safe that receives the rZFI. */
|
|
814
|
+
safeAddress: Address;
|
|
815
|
+
chainId: 8453;
|
|
816
|
+
/** rZFI being claimed, in wei (18 decimals). */
|
|
817
|
+
claimableAmount: string;
|
|
818
|
+
to: Address;
|
|
819
|
+
data: Hex;
|
|
820
|
+
value: "0";
|
|
821
|
+
}
|
|
797
822
|
/**
|
|
798
823
|
* Two-step rZFI claim state from {@link ZyfaiSDK.prepareRzfiClaim} and
|
|
799
824
|
* {@link ZyfaiSDK.submitRzfiClaim}.
|
|
@@ -1714,14 +1739,16 @@ declare class ZyfaiSDK {
|
|
|
1714
1739
|
status: string;
|
|
1715
1740
|
}>;
|
|
1716
1741
|
/**
|
|
1717
|
-
*
|
|
1742
|
+
* Deposit a collateral token the wallet already holds into the Safe.
|
|
1718
1743
|
*
|
|
1719
1744
|
* @remarks
|
|
1720
1745
|
* Use this when the connected wallet holds the strategy collateral on the
|
|
1721
1746
|
* deposit chain. {@link ZyfaiSDK.sendDeposit} calls this automatically in
|
|
1722
1747
|
* that case. A different token uses {@link ZyfaiSDK.sendSwapDeposit}.
|
|
1723
1748
|
*
|
|
1724
|
-
*
|
|
1749
|
+
* Eligible first deposits sign an ERC-2612 permit and the backend sponsors and
|
|
1750
|
+
* registers the pull. Other direct deposits confirm an ERC-20 transfer and
|
|
1751
|
+
* call {@link ZyfaiSDK.logDeposit}.
|
|
1725
1752
|
* Requires {@link ZyfaiSDK.connectAccount}. Pass the **EOA** as `userAddress`.
|
|
1726
1753
|
*
|
|
1727
1754
|
* @group Deposits and withdrawals
|
|
@@ -1745,12 +1772,37 @@ declare class ZyfaiSDK {
|
|
|
1745
1772
|
* ```
|
|
1746
1773
|
*/
|
|
1747
1774
|
sendDirectDeposit(userAddress: string, chainId: SupportedChainId, amount: string, asset: string, strategy?: Strategy): Promise<DepositResponse>;
|
|
1775
|
+
private sendCollateralDeposit;
|
|
1776
|
+
/**
|
|
1777
|
+
* Read the current first-deposit permit intent after a pending or interrupted deposit.
|
|
1778
|
+
*
|
|
1779
|
+
* @remarks
|
|
1780
|
+
* Uses the execution API and the SIWE session from {@link ZyfaiSDK.connectAccount}.
|
|
1781
|
+
* A registered intent provides the deposit id for {@link ZyfaiSDK.getDepositStatus}.
|
|
1782
|
+
*
|
|
1783
|
+
* @group Deposits and withdrawals
|
|
1784
|
+
*
|
|
1785
|
+
* @param userAddress - Authenticated EOA
|
|
1786
|
+
* @returns The latest permit intent, or null when no intent exists
|
|
1787
|
+
* @throws If the address differs from the authenticated EOA or the request fails
|
|
1788
|
+
*
|
|
1789
|
+
* @example
|
|
1790
|
+
* ```typescript
|
|
1791
|
+
* const intent = await sdk.getFirstPermitDepositStatus(eoa);
|
|
1792
|
+
* if (intent?.depositId) await sdk.waitForDepositCredit(intent.depositId, intent.chainId);
|
|
1793
|
+
* ```
|
|
1794
|
+
*/
|
|
1795
|
+
getFirstPermitDepositStatus(userAddress: string): Promise<FirstPermitDepositStatus | null>;
|
|
1796
|
+
private getFirstPermitDepositAvailability;
|
|
1797
|
+
private sendFirstPermitDeposit;
|
|
1748
1798
|
/**
|
|
1749
1799
|
* Fund the Safe with a collateral the wallet already holds, or swap another token into it.
|
|
1750
1800
|
*
|
|
1751
1801
|
* @remarks
|
|
1752
|
-
* The positional call
|
|
1753
|
-
*
|
|
1802
|
+
* The positional call deposits the collateral on `chainId`. Eligible first
|
|
1803
|
+
* deposits use a sponsored ERC-2612 permit. Other direct deposits use a wallet
|
|
1804
|
+
* transfer. If a permit submission is interrupted, check
|
|
1805
|
+
* {@link ZyfaiSDK.getFirstPermitDepositStatus} before starting another deposit.
|
|
1754
1806
|
*
|
|
1755
1807
|
* The object form spends `spendToken`. When that token is the destination
|
|
1756
1808
|
* collateral on `chainId`, this is a direct deposit. Any other token is
|
|
@@ -1939,6 +1991,24 @@ declare class ZyfaiSDK {
|
|
|
1939
1991
|
data: Hex;
|
|
1940
1992
|
value: "0";
|
|
1941
1993
|
}>;
|
|
1994
|
+
/**
|
|
1995
|
+
* Build the rZFI claim as an unsigned transaction for your own signer.
|
|
1996
|
+
*
|
|
1997
|
+
* @remarks
|
|
1998
|
+
* Same pattern as {@link ZyfaiSDK.buildDepositTransfer}: sign and send
|
|
1999
|
+
* `{ to, data, value }` from `userAddress` on Base (chain 8453). It must be
|
|
2000
|
+
* sent by `userAddress` itself; any other sender reverts. The sender pays the
|
|
2001
|
+
* gas. Claims all unclaimed rZFI into the user's Safe.
|
|
2002
|
+
*
|
|
2003
|
+
* @group Rewards
|
|
2004
|
+
*
|
|
2005
|
+
* @param userAddress - Owner EOA, which must send the transaction
|
|
2006
|
+
* @returns Safe address, claimable amount, and the transaction to send
|
|
2007
|
+
*
|
|
2008
|
+
* @throws If there is no rZFI to claim, the reward tree is updating (retry
|
|
2009
|
+
* later), or `userAddress` cannot execute the Safe alone (not an owner, or threshold above 1)
|
|
2010
|
+
*/
|
|
2011
|
+
buildRzfiClaimTransaction(userAddress: string): Promise<RzfiClaimTransaction>;
|
|
1942
2012
|
/**
|
|
1943
2013
|
* Prepare a gas-sponsored rZFI claim into the user's Safe on Base.
|
|
1944
2014
|
*
|
|
@@ -2560,36 +2630,48 @@ declare class ZyfaiSDK {
|
|
|
2560
2630
|
*/
|
|
2561
2631
|
getConservativeOpportunities(chainId?: number, asset?: string, status?: "live" | "not_live"): Promise<OpportunitiesResponse>;
|
|
2562
2632
|
/**
|
|
2563
|
-
* Get
|
|
2633
|
+
* Get balanced (high-risk, high-reward) yield opportunities.
|
|
2564
2634
|
*
|
|
2565
2635
|
* @param chainId - Optional chain ID filter
|
|
2566
2636
|
* @param asset - Optional asset filter (e.g. "USDC", "WETH", "WBTC")
|
|
2567
|
-
* @returns List of
|
|
2637
|
+
* @returns List of balanced opportunities
|
|
2568
2638
|
*
|
|
2569
2639
|
* @example
|
|
2570
2640
|
* ```typescript
|
|
2571
|
-
* const opportunities = await sdk.
|
|
2641
|
+
* const opportunities = await sdk.getBalancedOpportunities(8453, "WETH");
|
|
2572
2642
|
* opportunities.data.forEach(o => console.log(o.protocolName, o.apy));
|
|
2573
2643
|
* ```
|
|
2574
2644
|
*/
|
|
2645
|
+
getBalancedOpportunities(chainId?: number, asset?: string, status?: "live" | "not_live"): Promise<OpportunitiesResponse>;
|
|
2646
|
+
/**
|
|
2647
|
+
* @deprecated Use {@link getBalancedOpportunities} instead. Retains the
|
|
2648
|
+
* pre-rename `getAggressiveOpportunities` entry point; same HTTP request as
|
|
2649
|
+
* balanced, with legacy `strategyType: "aggressive"` on the response and rows.
|
|
2650
|
+
*/
|
|
2575
2651
|
getAggressiveOpportunities(chainId?: number, asset?: string, status?: "live" | "not_live"): Promise<OpportunitiesResponse>;
|
|
2576
2652
|
/**
|
|
2577
|
-
* Get
|
|
2578
|
-
* `"
|
|
2653
|
+
* Get advanced yield opportunities — pools reachable only with the
|
|
2654
|
+
* `"advanced"` strategy, including protocols whose withdrawals are
|
|
2579
2655
|
* asynchronous (Ipor, Superform). Exiting these pools takes about a day
|
|
2580
2656
|
* on Ipor and three on Superform; track the redemption through
|
|
2581
2657
|
* `getPortfolio().portfolio.pendingAsyncWithdrawals`.
|
|
2582
2658
|
*
|
|
2583
2659
|
* @param chainId - Optional chain ID filter
|
|
2584
2660
|
* @param asset - Optional asset filter (e.g. "USDC", "WETH")
|
|
2585
|
-
* @returns List of
|
|
2661
|
+
* @returns List of advanced opportunities
|
|
2586
2662
|
*
|
|
2587
2663
|
* @example
|
|
2588
2664
|
* ```typescript
|
|
2589
|
-
* const opportunities = await sdk.
|
|
2665
|
+
* const opportunities = await sdk.getAdvancedOpportunities(8453);
|
|
2590
2666
|
* opportunities.data.forEach(o => console.log(o.protocolName, o.apy));
|
|
2591
2667
|
* ```
|
|
2592
2668
|
*/
|
|
2669
|
+
getAdvancedOpportunities(chainId?: number, asset?: string, status?: "live" | "not_live"): Promise<OpportunitiesResponse>;
|
|
2670
|
+
/**
|
|
2671
|
+
* @deprecated Use {@link getAdvancedOpportunities} instead. Retains the
|
|
2672
|
+
* pre-rename `getAsyncOpportunities` entry point; same HTTP request as
|
|
2673
|
+
* advanced, with legacy `strategyType: "yieldmaxxing"` on the response and rows.
|
|
2674
|
+
*/
|
|
2593
2675
|
getAsyncOpportunities(chainId?: number, asset?: string, status?: "live" | "not_live"): Promise<OpportunitiesResponse>;
|
|
2594
2676
|
/**
|
|
2595
2677
|
* Get active conservative opportunities (status = "live") with risk and utilization data
|
|
@@ -3250,4 +3332,4 @@ declare const ERC7579_LAUNCHPAD_ADDRESS: Address$1;
|
|
|
3250
3332
|
*/
|
|
3251
3333
|
declare const POOL_MODULE_ADDRESSES: readonly Address$1[];
|
|
3252
3334
|
|
|
3253
|
-
export { ALLOWED_HISTORY_DAYS, API_ENDPOINT, type APYPerStrategy, type APYPerStrategyResponse, type ActionData, type ActiveWallet, type ActiveWalletsResponse, type AddWalletToSdkResponse, type Address, type AllocationDetail, type AllowedHistoryDays, type ApyPosition, type AsyncWithdrawal, type AsyncWithdrawalStatus, type BackendEnvironment, type BankrProvider, type BankrProviderConfig, type BaseMerklCampaignId, type BestOpportunityDetails, type BestOpportunityResponse, type ChainConfig, type ChainPortfolio, type ChainTokenEarnings, type CustomizationConfig, type CustomizeBatchRequest, type CustomizeBatchResponse, DATA_API_BASE_URLS, DATA_API_ENDPOINT, DEFAULT_RELAY_SLIPPAGE_BPS, DEFAULT_TOKEN_ADDRESSES, type DailyApyEntry, type DailyApyHistoryPeriod, type DailyApyHistoryResponse, type DailyEarning, type DailyEarningsResponse, type DebankPortfolioResponse, type DepegEvent, type DeploySafeResponse, type DepositLifecycleResponse, type DepositLifecycleStatus, type DepositPositionOutcome, type DepositResponse, type DepositRoute, type DepositRouteInput, ERC7579_LAUNCHPAD_ADDRESS, type ERC7739Context, type ERC7739Data, EXECUTION_API_BASE_URLS, type ExcludedPool, type FirstTopupResponse, type GetPoolsResponse, type GetSelectedPoolsResponse, type Hex, type HistoryEntry, type HistoryFeeData, type HistoryPosition, type HistoryRebalanceLog, type HistoryResponse, INTENT_EXECUTOR, INTENT_SMART_SESSIONS, LOCAL_DATA_API_BASE_URL, LOCAL_EXECUTION_API_BASE_URL, LOCAL_WS_URL, type LiquidityDropEvent, type LogDepositResponse, MAX_RELAY_SLIPPAGE_BPS, type MerklCampaign, type NewCollateralDetectedEvent, OWNABLE_VALIDATOR, type OnchainEarnings, type OnchainEarningsResponse, type OpportunitiesResponse, type Opportunity, type OpportunityPosition, POOL_MODULE_ADDRESSES, PROXY_EXECUTOR, type PolicyData, type Pool, type Portfolio, type PortfolioAssetBalance, type PortfolioByAssetType, type PortfolioByChain, type PortfolioDetailed, type PortfolioDetailedResponse, type PortfolioResponse, type PortfolioToken, type PositionSlot, type Protocol, type ProtocolsResponse, RELAY_SLIPPAGE_PRESETS_BPS, type RebalanceFrequencyResponse, type RegisterAgentResponse, type RzfiClaimResponse, SAFE_7579_ADDRESS, type SDKConfig, SMART_SESSIONS_FALLBACK, SMART_SESSIONS_VALIDATOR, STAGING_DATA_API_BASE_URL, STAGING_EXECUTION_API_BASE_URL, STAGING_WS_URL, type SdkKeyTVLResponse, type SendDepositParams, type Session, type SessionKeyResponse, type SimulateBestPositionsParams, type SimulateBestPositionsResponse, type SimulateCalldataItem, type SimulatedPosition, type SmartWalletByEOAResponse, type SmartWalletResponse, type Strategy, type SupportedAsset, type SupportedChainId, type SwapDepositOrder, type SwapDepositParams, type SwapDepositQuote, type TVLResponse, type TokenApy, type TokenEarnings, type UpdateUserProfileRequest, type UpdateUserProfileResponse, type UserPosition, type UserSessionAuth, VAULT_ADDRESS, type VaultAsset, type VaultClaimResponse, type VaultDepositResponse, type VaultSharesResponse, type VaultWithdrawResponse, type VaultWithdrawStatusResponse, type VolumeResponse, WS_ENDPOINT, WS_URLS, type WaitForDepositCreditOptions, type WaitForDepositPositionOptions, type WaitForWithdrawCompleteOptions, type WaitForWithdrawSettlementOptions, type WalletTVL, type WithdrawAsyncLeg, type WithdrawLifecycleResponse, type WithdrawLifecycleStatus, type WithdrawResponse, type ZyfaiEventFilters, type ZyfaiEventHandlers, ZyfaiSDK, createBankrProvider, getChainConfig, getDataApiBaseUrl, getDefaultTokenAddress, getExecutionApiBaseUrl, getManagedAssets, getSupportedChainIds, getWsUrl, isSupportedChain, resolveDepositRoute, resolveRelaySlippageBps, type staleBalances };
|
|
3335
|
+
export { ALLOWED_HISTORY_DAYS, API_ENDPOINT, type APYPerStrategy, type APYPerStrategyResponse, type ActionData, type ActiveWallet, type ActiveWalletsResponse, type AddWalletToSdkResponse, type Address, type AllocationDetail, type AllowedHistoryDays, type ApyPosition, type AsyncWithdrawal, type AsyncWithdrawalStatus, type BackendEnvironment, type BankrProvider, type BankrProviderConfig, type BaseMerklCampaignId, type BestOpportunityDetails, type BestOpportunityResponse, type ChainConfig, type ChainPortfolio, type ChainTokenEarnings, type CustomizationConfig, type CustomizeBatchRequest, type CustomizeBatchResponse, DATA_API_BASE_URLS, DATA_API_ENDPOINT, DEFAULT_RELAY_SLIPPAGE_BPS, DEFAULT_TOKEN_ADDRESSES, type DailyApyEntry, type DailyApyHistoryPeriod, type DailyApyHistoryResponse, type DailyEarning, type DailyEarningsResponse, type DebankPortfolioResponse, type DepegEvent, type DeploySafeResponse, type DepositLifecycleResponse, type DepositLifecycleStatus, type DepositPositionOutcome, type DepositResponse, type DepositRoute, type DepositRouteInput, ERC7579_LAUNCHPAD_ADDRESS, type ERC7739Context, type ERC7739Data, EXECUTION_API_BASE_URLS, type ExcludedPool, type FirstPermitDepositStatus, type FirstTopupResponse, type GetPoolsResponse, type GetSelectedPoolsResponse, type Hex, type HistoryEntry, type HistoryFeeData, type HistoryPosition, type HistoryRebalanceLog, type HistoryResponse, INTENT_EXECUTOR, INTENT_SMART_SESSIONS, LOCAL_DATA_API_BASE_URL, LOCAL_EXECUTION_API_BASE_URL, LOCAL_WS_URL, type LiquidityDropEvent, type LogDepositResponse, MAX_RELAY_SLIPPAGE_BPS, type MerklCampaign, type NewCollateralDetectedEvent, OWNABLE_VALIDATOR, type OnchainEarnings, type OnchainEarningsResponse, type OpportunitiesResponse, type Opportunity, type OpportunityPosition, POOL_MODULE_ADDRESSES, PROXY_EXECUTOR, type PolicyData, type Pool, type Portfolio, type PortfolioAssetBalance, type PortfolioByAssetType, type PortfolioByChain, type PortfolioDetailed, type PortfolioDetailedResponse, type PortfolioResponse, type PortfolioToken, type PositionSlot, type Protocol, type ProtocolsResponse, RELAY_SLIPPAGE_PRESETS_BPS, type RebalanceFrequencyResponse, type RegisterAgentResponse, type RzfiClaimResponse, type RzfiClaimTransaction, SAFE_7579_ADDRESS, type SDKConfig, SMART_SESSIONS_FALLBACK, SMART_SESSIONS_VALIDATOR, STAGING_DATA_API_BASE_URL, STAGING_EXECUTION_API_BASE_URL, STAGING_WS_URL, type SdkKeyTVLResponse, type SendDepositParams, type Session, type SessionKeyResponse, type SimulateBestPositionsParams, type SimulateBestPositionsResponse, type SimulateCalldataItem, type SimulatedPosition, type SmartWalletByEOAResponse, type SmartWalletResponse, type Strategy, type SupportedAsset, type SupportedChainId, type SwapDepositOrder, type SwapDepositParams, type SwapDepositQuote, type TVLResponse, type TokenApy, type TokenEarnings, type UpdateUserProfileRequest, type UpdateUserProfileResponse, type UserPosition, type UserSessionAuth, VAULT_ADDRESS, type VaultAsset, type VaultClaimResponse, type VaultDepositResponse, type VaultSharesResponse, type VaultWithdrawResponse, type VaultWithdrawStatusResponse, type VolumeResponse, WS_ENDPOINT, WS_URLS, type WaitForDepositCreditOptions, type WaitForDepositPositionOptions, type WaitForWithdrawCompleteOptions, type WaitForWithdrawSettlementOptions, type WalletTVL, type WithdrawAsyncLeg, type WithdrawLifecycleResponse, type WithdrawLifecycleStatus, type WithdrawResponse, type ZyfaiEventFilters, type ZyfaiEventHandlers, ZyfaiSDK, createBankrProvider, getChainConfig, getDataApiBaseUrl, getDefaultTokenAddress, getExecutionApiBaseUrl, getManagedAssets, getSupportedChainIds, getWsUrl, isSupportedChain, resolveDepositRoute, resolveRelaySlippageBps, type staleBalances };
|
package/dist/index.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ type Hex = `0x${string}`;
|
|
|
14
14
|
* see `PortfolioDetailed.pendingAsyncWithdrawals`.
|
|
15
15
|
*/
|
|
16
16
|
type Strategy = "conservative" | "aggressive" | "yieldmaxxing";
|
|
17
|
+
/** Strategy labels returned on opportunity rows (includes renamed public tiers). */
|
|
18
|
+
type OpportunityStrategyType = "conservative" | "balanced" | "advanced" | Strategy;
|
|
17
19
|
/** Public asset symbols supported by the SDK */
|
|
18
20
|
type SupportedAsset = "USDC" | "WETH" | "EURC" | "USDT" | "PYUSD" | "NVDAc";
|
|
19
21
|
/** Optional per-chain RPC URLs for on-chain reads and writes. */
|
|
@@ -557,14 +559,14 @@ interface Opportunity {
|
|
|
557
559
|
tvl?: number;
|
|
558
560
|
asset?: string;
|
|
559
561
|
risk?: string;
|
|
560
|
-
/**
|
|
561
|
-
strategyType:
|
|
562
|
+
/** Strategy tier for this pool (see {@link OpportunityStrategyType}). */
|
|
563
|
+
strategyType: OpportunityStrategyType;
|
|
562
564
|
status?: string;
|
|
563
565
|
}
|
|
564
566
|
interface OpportunitiesResponse {
|
|
565
567
|
success: boolean;
|
|
566
568
|
chainId?: number;
|
|
567
|
-
strategyType:
|
|
569
|
+
strategyType: OpportunityStrategyType;
|
|
568
570
|
data: Opportunity[];
|
|
569
571
|
}
|
|
570
572
|
interface ApyPosition {
|
|
@@ -618,7 +620,7 @@ interface DepositResponse {
|
|
|
618
620
|
amount: string;
|
|
619
621
|
/**
|
|
620
622
|
* How the collateral reached the Safe.
|
|
621
|
-
* `direct`
|
|
623
|
+
* `direct` sends the collateral by permit or wallet transfer. `swap` converts another token
|
|
622
624
|
* through Relay. `wrap` turns same-chain native ETH into WETH, then transfers it.
|
|
623
625
|
*/
|
|
624
626
|
route?: "direct" | "swap" | "wrap";
|
|
@@ -630,6 +632,18 @@ interface DepositResponse {
|
|
|
630
632
|
*/
|
|
631
633
|
registration: DepositLifecycleResponse;
|
|
632
634
|
}
|
|
635
|
+
/** Current sponsored first-deposit intent for the authenticated EOA. */
|
|
636
|
+
interface FirstPermitDepositStatus {
|
|
637
|
+
id: string;
|
|
638
|
+
status: "prepared" | "queued" | "submitted" | "registered" | "failed";
|
|
639
|
+
chainId: SupportedChainId;
|
|
640
|
+
token: Address;
|
|
641
|
+
/** Exact collateral amount in least units. */
|
|
642
|
+
amount: string;
|
|
643
|
+
/** Available after the backend registers the confirmed pull. */
|
|
644
|
+
depositId: string | null;
|
|
645
|
+
txHash: Hex | null;
|
|
646
|
+
}
|
|
633
647
|
/**
|
|
634
648
|
* Spend a token that is not already the destination collateral.
|
|
635
649
|
* The execution API quotes Relay; the connected wallet signs the steps.
|
|
@@ -703,7 +717,7 @@ interface SwapDepositOrder {
|
|
|
703
717
|
lastError?: string | null;
|
|
704
718
|
}
|
|
705
719
|
/**
|
|
706
|
-
* `sendDeposit` input. Omit `spendToken` to
|
|
720
|
+
* `sendDeposit` input. Omit `spendToken` to deposit `asset` directly on `chainId`.
|
|
707
721
|
* Set `spendToken` when the wallet holds a different token or chain.
|
|
708
722
|
*/
|
|
709
723
|
interface SendDepositParams {
|
|
@@ -794,6 +808,17 @@ interface MerklCampaign {
|
|
|
794
808
|
/** True while now is between startDate and endDate. */
|
|
795
809
|
isActive: boolean;
|
|
796
810
|
}
|
|
811
|
+
/** Unsigned rZFI claim from {@link ZyfaiSDK.buildRzfiClaimTransaction}. */
|
|
812
|
+
interface RzfiClaimTransaction {
|
|
813
|
+
/** Safe that receives the rZFI. */
|
|
814
|
+
safeAddress: Address;
|
|
815
|
+
chainId: 8453;
|
|
816
|
+
/** rZFI being claimed, in wei (18 decimals). */
|
|
817
|
+
claimableAmount: string;
|
|
818
|
+
to: Address;
|
|
819
|
+
data: Hex;
|
|
820
|
+
value: "0";
|
|
821
|
+
}
|
|
797
822
|
/**
|
|
798
823
|
* Two-step rZFI claim state from {@link ZyfaiSDK.prepareRzfiClaim} and
|
|
799
824
|
* {@link ZyfaiSDK.submitRzfiClaim}.
|
|
@@ -1714,14 +1739,16 @@ declare class ZyfaiSDK {
|
|
|
1714
1739
|
status: string;
|
|
1715
1740
|
}>;
|
|
1716
1741
|
/**
|
|
1717
|
-
*
|
|
1742
|
+
* Deposit a collateral token the wallet already holds into the Safe.
|
|
1718
1743
|
*
|
|
1719
1744
|
* @remarks
|
|
1720
1745
|
* Use this when the connected wallet holds the strategy collateral on the
|
|
1721
1746
|
* deposit chain. {@link ZyfaiSDK.sendDeposit} calls this automatically in
|
|
1722
1747
|
* that case. A different token uses {@link ZyfaiSDK.sendSwapDeposit}.
|
|
1723
1748
|
*
|
|
1724
|
-
*
|
|
1749
|
+
* Eligible first deposits sign an ERC-2612 permit and the backend sponsors and
|
|
1750
|
+
* registers the pull. Other direct deposits confirm an ERC-20 transfer and
|
|
1751
|
+
* call {@link ZyfaiSDK.logDeposit}.
|
|
1725
1752
|
* Requires {@link ZyfaiSDK.connectAccount}. Pass the **EOA** as `userAddress`.
|
|
1726
1753
|
*
|
|
1727
1754
|
* @group Deposits and withdrawals
|
|
@@ -1745,12 +1772,37 @@ declare class ZyfaiSDK {
|
|
|
1745
1772
|
* ```
|
|
1746
1773
|
*/
|
|
1747
1774
|
sendDirectDeposit(userAddress: string, chainId: SupportedChainId, amount: string, asset: string, strategy?: Strategy): Promise<DepositResponse>;
|
|
1775
|
+
private sendCollateralDeposit;
|
|
1776
|
+
/**
|
|
1777
|
+
* Read the current first-deposit permit intent after a pending or interrupted deposit.
|
|
1778
|
+
*
|
|
1779
|
+
* @remarks
|
|
1780
|
+
* Uses the execution API and the SIWE session from {@link ZyfaiSDK.connectAccount}.
|
|
1781
|
+
* A registered intent provides the deposit id for {@link ZyfaiSDK.getDepositStatus}.
|
|
1782
|
+
*
|
|
1783
|
+
* @group Deposits and withdrawals
|
|
1784
|
+
*
|
|
1785
|
+
* @param userAddress - Authenticated EOA
|
|
1786
|
+
* @returns The latest permit intent, or null when no intent exists
|
|
1787
|
+
* @throws If the address differs from the authenticated EOA or the request fails
|
|
1788
|
+
*
|
|
1789
|
+
* @example
|
|
1790
|
+
* ```typescript
|
|
1791
|
+
* const intent = await sdk.getFirstPermitDepositStatus(eoa);
|
|
1792
|
+
* if (intent?.depositId) await sdk.waitForDepositCredit(intent.depositId, intent.chainId);
|
|
1793
|
+
* ```
|
|
1794
|
+
*/
|
|
1795
|
+
getFirstPermitDepositStatus(userAddress: string): Promise<FirstPermitDepositStatus | null>;
|
|
1796
|
+
private getFirstPermitDepositAvailability;
|
|
1797
|
+
private sendFirstPermitDeposit;
|
|
1748
1798
|
/**
|
|
1749
1799
|
* Fund the Safe with a collateral the wallet already holds, or swap another token into it.
|
|
1750
1800
|
*
|
|
1751
1801
|
* @remarks
|
|
1752
|
-
* The positional call
|
|
1753
|
-
*
|
|
1802
|
+
* The positional call deposits the collateral on `chainId`. Eligible first
|
|
1803
|
+
* deposits use a sponsored ERC-2612 permit. Other direct deposits use a wallet
|
|
1804
|
+
* transfer. If a permit submission is interrupted, check
|
|
1805
|
+
* {@link ZyfaiSDK.getFirstPermitDepositStatus} before starting another deposit.
|
|
1754
1806
|
*
|
|
1755
1807
|
* The object form spends `spendToken`. When that token is the destination
|
|
1756
1808
|
* collateral on `chainId`, this is a direct deposit. Any other token is
|
|
@@ -1939,6 +1991,24 @@ declare class ZyfaiSDK {
|
|
|
1939
1991
|
data: Hex;
|
|
1940
1992
|
value: "0";
|
|
1941
1993
|
}>;
|
|
1994
|
+
/**
|
|
1995
|
+
* Build the rZFI claim as an unsigned transaction for your own signer.
|
|
1996
|
+
*
|
|
1997
|
+
* @remarks
|
|
1998
|
+
* Same pattern as {@link ZyfaiSDK.buildDepositTransfer}: sign and send
|
|
1999
|
+
* `{ to, data, value }` from `userAddress` on Base (chain 8453). It must be
|
|
2000
|
+
* sent by `userAddress` itself; any other sender reverts. The sender pays the
|
|
2001
|
+
* gas. Claims all unclaimed rZFI into the user's Safe.
|
|
2002
|
+
*
|
|
2003
|
+
* @group Rewards
|
|
2004
|
+
*
|
|
2005
|
+
* @param userAddress - Owner EOA, which must send the transaction
|
|
2006
|
+
* @returns Safe address, claimable amount, and the transaction to send
|
|
2007
|
+
*
|
|
2008
|
+
* @throws If there is no rZFI to claim, the reward tree is updating (retry
|
|
2009
|
+
* later), or `userAddress` cannot execute the Safe alone (not an owner, or threshold above 1)
|
|
2010
|
+
*/
|
|
2011
|
+
buildRzfiClaimTransaction(userAddress: string): Promise<RzfiClaimTransaction>;
|
|
1942
2012
|
/**
|
|
1943
2013
|
* Prepare a gas-sponsored rZFI claim into the user's Safe on Base.
|
|
1944
2014
|
*
|
|
@@ -2560,36 +2630,48 @@ declare class ZyfaiSDK {
|
|
|
2560
2630
|
*/
|
|
2561
2631
|
getConservativeOpportunities(chainId?: number, asset?: string, status?: "live" | "not_live"): Promise<OpportunitiesResponse>;
|
|
2562
2632
|
/**
|
|
2563
|
-
* Get
|
|
2633
|
+
* Get balanced (high-risk, high-reward) yield opportunities.
|
|
2564
2634
|
*
|
|
2565
2635
|
* @param chainId - Optional chain ID filter
|
|
2566
2636
|
* @param asset - Optional asset filter (e.g. "USDC", "WETH", "WBTC")
|
|
2567
|
-
* @returns List of
|
|
2637
|
+
* @returns List of balanced opportunities
|
|
2568
2638
|
*
|
|
2569
2639
|
* @example
|
|
2570
2640
|
* ```typescript
|
|
2571
|
-
* const opportunities = await sdk.
|
|
2641
|
+
* const opportunities = await sdk.getBalancedOpportunities(8453, "WETH");
|
|
2572
2642
|
* opportunities.data.forEach(o => console.log(o.protocolName, o.apy));
|
|
2573
2643
|
* ```
|
|
2574
2644
|
*/
|
|
2645
|
+
getBalancedOpportunities(chainId?: number, asset?: string, status?: "live" | "not_live"): Promise<OpportunitiesResponse>;
|
|
2646
|
+
/**
|
|
2647
|
+
* @deprecated Use {@link getBalancedOpportunities} instead. Retains the
|
|
2648
|
+
* pre-rename `getAggressiveOpportunities` entry point; same HTTP request as
|
|
2649
|
+
* balanced, with legacy `strategyType: "aggressive"` on the response and rows.
|
|
2650
|
+
*/
|
|
2575
2651
|
getAggressiveOpportunities(chainId?: number, asset?: string, status?: "live" | "not_live"): Promise<OpportunitiesResponse>;
|
|
2576
2652
|
/**
|
|
2577
|
-
* Get
|
|
2578
|
-
* `"
|
|
2653
|
+
* Get advanced yield opportunities — pools reachable only with the
|
|
2654
|
+
* `"advanced"` strategy, including protocols whose withdrawals are
|
|
2579
2655
|
* asynchronous (Ipor, Superform). Exiting these pools takes about a day
|
|
2580
2656
|
* on Ipor and three on Superform; track the redemption through
|
|
2581
2657
|
* `getPortfolio().portfolio.pendingAsyncWithdrawals`.
|
|
2582
2658
|
*
|
|
2583
2659
|
* @param chainId - Optional chain ID filter
|
|
2584
2660
|
* @param asset - Optional asset filter (e.g. "USDC", "WETH")
|
|
2585
|
-
* @returns List of
|
|
2661
|
+
* @returns List of advanced opportunities
|
|
2586
2662
|
*
|
|
2587
2663
|
* @example
|
|
2588
2664
|
* ```typescript
|
|
2589
|
-
* const opportunities = await sdk.
|
|
2665
|
+
* const opportunities = await sdk.getAdvancedOpportunities(8453);
|
|
2590
2666
|
* opportunities.data.forEach(o => console.log(o.protocolName, o.apy));
|
|
2591
2667
|
* ```
|
|
2592
2668
|
*/
|
|
2669
|
+
getAdvancedOpportunities(chainId?: number, asset?: string, status?: "live" | "not_live"): Promise<OpportunitiesResponse>;
|
|
2670
|
+
/**
|
|
2671
|
+
* @deprecated Use {@link getAdvancedOpportunities} instead. Retains the
|
|
2672
|
+
* pre-rename `getAsyncOpportunities` entry point; same HTTP request as
|
|
2673
|
+
* advanced, with legacy `strategyType: "yieldmaxxing"` on the response and rows.
|
|
2674
|
+
*/
|
|
2593
2675
|
getAsyncOpportunities(chainId?: number, asset?: string, status?: "live" | "not_live"): Promise<OpportunitiesResponse>;
|
|
2594
2676
|
/**
|
|
2595
2677
|
* Get active conservative opportunities (status = "live") with risk and utilization data
|
|
@@ -3250,4 +3332,4 @@ declare const ERC7579_LAUNCHPAD_ADDRESS: Address$1;
|
|
|
3250
3332
|
*/
|
|
3251
3333
|
declare const POOL_MODULE_ADDRESSES: readonly Address$1[];
|
|
3252
3334
|
|
|
3253
|
-
export { ALLOWED_HISTORY_DAYS, API_ENDPOINT, type APYPerStrategy, type APYPerStrategyResponse, type ActionData, type ActiveWallet, type ActiveWalletsResponse, type AddWalletToSdkResponse, type Address, type AllocationDetail, type AllowedHistoryDays, type ApyPosition, type AsyncWithdrawal, type AsyncWithdrawalStatus, type BackendEnvironment, type BankrProvider, type BankrProviderConfig, type BaseMerklCampaignId, type BestOpportunityDetails, type BestOpportunityResponse, type ChainConfig, type ChainPortfolio, type ChainTokenEarnings, type CustomizationConfig, type CustomizeBatchRequest, type CustomizeBatchResponse, DATA_API_BASE_URLS, DATA_API_ENDPOINT, DEFAULT_RELAY_SLIPPAGE_BPS, DEFAULT_TOKEN_ADDRESSES, type DailyApyEntry, type DailyApyHistoryPeriod, type DailyApyHistoryResponse, type DailyEarning, type DailyEarningsResponse, type DebankPortfolioResponse, type DepegEvent, type DeploySafeResponse, type DepositLifecycleResponse, type DepositLifecycleStatus, type DepositPositionOutcome, type DepositResponse, type DepositRoute, type DepositRouteInput, ERC7579_LAUNCHPAD_ADDRESS, type ERC7739Context, type ERC7739Data, EXECUTION_API_BASE_URLS, type ExcludedPool, type FirstTopupResponse, type GetPoolsResponse, type GetSelectedPoolsResponse, type Hex, type HistoryEntry, type HistoryFeeData, type HistoryPosition, type HistoryRebalanceLog, type HistoryResponse, INTENT_EXECUTOR, INTENT_SMART_SESSIONS, LOCAL_DATA_API_BASE_URL, LOCAL_EXECUTION_API_BASE_URL, LOCAL_WS_URL, type LiquidityDropEvent, type LogDepositResponse, MAX_RELAY_SLIPPAGE_BPS, type MerklCampaign, type NewCollateralDetectedEvent, OWNABLE_VALIDATOR, type OnchainEarnings, type OnchainEarningsResponse, type OpportunitiesResponse, type Opportunity, type OpportunityPosition, POOL_MODULE_ADDRESSES, PROXY_EXECUTOR, type PolicyData, type Pool, type Portfolio, type PortfolioAssetBalance, type PortfolioByAssetType, type PortfolioByChain, type PortfolioDetailed, type PortfolioDetailedResponse, type PortfolioResponse, type PortfolioToken, type PositionSlot, type Protocol, type ProtocolsResponse, RELAY_SLIPPAGE_PRESETS_BPS, type RebalanceFrequencyResponse, type RegisterAgentResponse, type RzfiClaimResponse, SAFE_7579_ADDRESS, type SDKConfig, SMART_SESSIONS_FALLBACK, SMART_SESSIONS_VALIDATOR, STAGING_DATA_API_BASE_URL, STAGING_EXECUTION_API_BASE_URL, STAGING_WS_URL, type SdkKeyTVLResponse, type SendDepositParams, type Session, type SessionKeyResponse, type SimulateBestPositionsParams, type SimulateBestPositionsResponse, type SimulateCalldataItem, type SimulatedPosition, type SmartWalletByEOAResponse, type SmartWalletResponse, type Strategy, type SupportedAsset, type SupportedChainId, type SwapDepositOrder, type SwapDepositParams, type SwapDepositQuote, type TVLResponse, type TokenApy, type TokenEarnings, type UpdateUserProfileRequest, type UpdateUserProfileResponse, type UserPosition, type UserSessionAuth, VAULT_ADDRESS, type VaultAsset, type VaultClaimResponse, type VaultDepositResponse, type VaultSharesResponse, type VaultWithdrawResponse, type VaultWithdrawStatusResponse, type VolumeResponse, WS_ENDPOINT, WS_URLS, type WaitForDepositCreditOptions, type WaitForDepositPositionOptions, type WaitForWithdrawCompleteOptions, type WaitForWithdrawSettlementOptions, type WalletTVL, type WithdrawAsyncLeg, type WithdrawLifecycleResponse, type WithdrawLifecycleStatus, type WithdrawResponse, type ZyfaiEventFilters, type ZyfaiEventHandlers, ZyfaiSDK, createBankrProvider, getChainConfig, getDataApiBaseUrl, getDefaultTokenAddress, getExecutionApiBaseUrl, getManagedAssets, getSupportedChainIds, getWsUrl, isSupportedChain, resolveDepositRoute, resolveRelaySlippageBps, type staleBalances };
|
|
3335
|
+
export { ALLOWED_HISTORY_DAYS, API_ENDPOINT, type APYPerStrategy, type APYPerStrategyResponse, type ActionData, type ActiveWallet, type ActiveWalletsResponse, type AddWalletToSdkResponse, type Address, type AllocationDetail, type AllowedHistoryDays, type ApyPosition, type AsyncWithdrawal, type AsyncWithdrawalStatus, type BackendEnvironment, type BankrProvider, type BankrProviderConfig, type BaseMerklCampaignId, type BestOpportunityDetails, type BestOpportunityResponse, type ChainConfig, type ChainPortfolio, type ChainTokenEarnings, type CustomizationConfig, type CustomizeBatchRequest, type CustomizeBatchResponse, DATA_API_BASE_URLS, DATA_API_ENDPOINT, DEFAULT_RELAY_SLIPPAGE_BPS, DEFAULT_TOKEN_ADDRESSES, type DailyApyEntry, type DailyApyHistoryPeriod, type DailyApyHistoryResponse, type DailyEarning, type DailyEarningsResponse, type DebankPortfolioResponse, type DepegEvent, type DeploySafeResponse, type DepositLifecycleResponse, type DepositLifecycleStatus, type DepositPositionOutcome, type DepositResponse, type DepositRoute, type DepositRouteInput, ERC7579_LAUNCHPAD_ADDRESS, type ERC7739Context, type ERC7739Data, EXECUTION_API_BASE_URLS, type ExcludedPool, type FirstPermitDepositStatus, type FirstTopupResponse, type GetPoolsResponse, type GetSelectedPoolsResponse, type Hex, type HistoryEntry, type HistoryFeeData, type HistoryPosition, type HistoryRebalanceLog, type HistoryResponse, INTENT_EXECUTOR, INTENT_SMART_SESSIONS, LOCAL_DATA_API_BASE_URL, LOCAL_EXECUTION_API_BASE_URL, LOCAL_WS_URL, type LiquidityDropEvent, type LogDepositResponse, MAX_RELAY_SLIPPAGE_BPS, type MerklCampaign, type NewCollateralDetectedEvent, OWNABLE_VALIDATOR, type OnchainEarnings, type OnchainEarningsResponse, type OpportunitiesResponse, type Opportunity, type OpportunityPosition, POOL_MODULE_ADDRESSES, PROXY_EXECUTOR, type PolicyData, type Pool, type Portfolio, type PortfolioAssetBalance, type PortfolioByAssetType, type PortfolioByChain, type PortfolioDetailed, type PortfolioDetailedResponse, type PortfolioResponse, type PortfolioToken, type PositionSlot, type Protocol, type ProtocolsResponse, RELAY_SLIPPAGE_PRESETS_BPS, type RebalanceFrequencyResponse, type RegisterAgentResponse, type RzfiClaimResponse, type RzfiClaimTransaction, SAFE_7579_ADDRESS, type SDKConfig, SMART_SESSIONS_FALLBACK, SMART_SESSIONS_VALIDATOR, STAGING_DATA_API_BASE_URL, STAGING_EXECUTION_API_BASE_URL, STAGING_WS_URL, type SdkKeyTVLResponse, type SendDepositParams, type Session, type SessionKeyResponse, type SimulateBestPositionsParams, type SimulateBestPositionsResponse, type SimulateCalldataItem, type SimulatedPosition, type SmartWalletByEOAResponse, type SmartWalletResponse, type Strategy, type SupportedAsset, type SupportedChainId, type SwapDepositOrder, type SwapDepositParams, type SwapDepositQuote, type TVLResponse, type TokenApy, type TokenEarnings, type UpdateUserProfileRequest, type UpdateUserProfileResponse, type UserPosition, type UserSessionAuth, VAULT_ADDRESS, type VaultAsset, type VaultClaimResponse, type VaultDepositResponse, type VaultSharesResponse, type VaultWithdrawResponse, type VaultWithdrawStatusResponse, type VolumeResponse, WS_ENDPOINT, WS_URLS, type WaitForDepositCreditOptions, type WaitForDepositPositionOptions, type WaitForWithdrawCompleteOptions, type WaitForWithdrawSettlementOptions, type WalletTVL, type WithdrawAsyncLeg, type WithdrawLifecycleResponse, type WithdrawLifecycleStatus, type WithdrawResponse, type ZyfaiEventFilters, type ZyfaiEventHandlers, ZyfaiSDK, createBankrProvider, getChainConfig, getDataApiBaseUrl, getDefaultTokenAddress, getExecutionApiBaseUrl, getManagedAssets, getSupportedChainIds, getWsUrl, isSupportedChain, resolveDepositRoute, resolveRelaySlippageBps, type staleBalances };
|