@zyfai/sdk 0.2.41 → 0.2.42

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.d.mts CHANGED
@@ -436,6 +436,7 @@ interface SimulateBestPositionsParams {
436
436
  protocols?: string[];
437
437
  pools?: string[];
438
438
  userPositions?: UserPosition[];
439
+ partOfZyfiTvl?: boolean;
439
440
  }
440
441
  interface SimulateCalldataItem {
441
442
  contract_address: Address;
@@ -444,9 +445,17 @@ interface SimulateCalldataItem {
444
445
  value: string;
445
446
  description: string;
446
447
  }
448
+ interface AllocationDetail {
449
+ pool_capacity_usd: number;
450
+ zyfi_position_usd: number;
451
+ available_capacity_usd: number;
452
+ fair_share_usd: number;
453
+ overflow_usd: number;
454
+ }
447
455
  interface SimulatedPosition {
448
456
  protocol: string;
449
457
  pool: string;
458
+ rank: number;
450
459
  simulated_apy: number;
451
460
  combined_apy: number;
452
461
  amount: number;
@@ -455,11 +464,20 @@ interface SimulatedPosition {
455
464
  tvl: number;
456
465
  liquidity: number;
457
466
  averageCombinedApy30Days: number;
467
+ allocation_detail: AllocationDetail;
458
468
  calldata: SimulateCalldataItem[];
459
469
  }
470
+ interface ExcludedPool {
471
+ protocol: string;
472
+ pool: string;
473
+ reason: string;
474
+ detail: string;
475
+ failed_checks?: string[];
476
+ }
460
477
  interface SimulateBestPositionsResponse {
461
478
  success: boolean;
462
479
  data: Record<string, SimulatedPosition[]>;
480
+ excluded: Record<string, ExcludedPool[]>;
463
481
  messages: Record<string, string>;
464
482
  }
465
483
  interface OpportunityPosition {
@@ -1695,4 +1713,4 @@ type BankrProvider = ReturnType<typeof createBankrProvider>;
1695
1713
 
1696
1714
  declare const VAULT_ADDRESS: "0xD580071c47d4a667858B5FafAb85BC9C609beC5D";
1697
1715
 
1698
- export { type APYPerStrategy, type APYPerStrategyResponse, type ActionData, type ActiveWallet, type ActiveWalletsResponse, type AddWalletToSdkResponse, type Address, type ApyPosition, type BankrProvider, type BankrProviderConfig, type BestOpportunityDetails, type BestOpportunityResponse, type ChainConfig, type ChainPortfolio, type ChainTokenEarnings, type CustomizationConfig, type CustomizeBatchRequest, type CustomizeBatchResponse, DEFAULT_TOKEN_ADDRESSES, type DailyApyEntry, type DailyApyHistoryResponse, type DailyEarning, type DailyEarningsResponse, type DebankPortfolioResponse, type DepegEvent, type DeploySafeResponse, type DepositResponse, type ERC7739Context, type ERC7739Data, type FirstTopupResponse, type GetPoolsResponse, type GetSelectedPoolsResponse, type Hex, type HistoryEntry, type HistoryPosition, type HistoryResponse, type LiquidityDropEvent, type LogDepositResponse, type NewCollateralDetectedEvent, type OnchainEarnings, type OnchainEarningsResponse, type OpportunitiesResponse, type Opportunity, type OpportunityPosition, 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, type RebalanceFrequencyResponse, type RegisterAgentResponse, type SDKConfig, type SdkKeyTVLResponse, type Session, type SessionKeyResponse, type SimulateBestPositionsParams, type SimulateBestPositionsResponse, type SimulateCalldataItem, type SimulatedPosition, type SmartWalletByEOAResponse, type SmartWalletResponse, type Strategy, type SupportedChainId, type TVLResponse, type TokenApy, type TokenEarnings, type UpdateUserProfileRequest, type UpdateUserProfileResponse, type UserPosition, VAULT_ADDRESS, type VaultAsset, type VaultClaimResponse, type VaultDepositResponse, type VaultSharesResponse, type VaultWithdrawResponse, type VaultWithdrawStatusResponse, type VolumeResponse, type WalletTVL, type WithdrawResponse, type ZyfaiEventFilters, type ZyfaiEventHandlers, ZyfaiSDK, createBankrProvider, getChainConfig, getDefaultTokenAddress, getSupportedChainIds, isSupportedChain };
1716
+ export { type APYPerStrategy, type APYPerStrategyResponse, type ActionData, type ActiveWallet, type ActiveWalletsResponse, type AddWalletToSdkResponse, type Address, type AllocationDetail, type ApyPosition, type BankrProvider, type BankrProviderConfig, type BestOpportunityDetails, type BestOpportunityResponse, type ChainConfig, type ChainPortfolio, type ChainTokenEarnings, type CustomizationConfig, type CustomizeBatchRequest, type CustomizeBatchResponse, DEFAULT_TOKEN_ADDRESSES, type DailyApyEntry, type DailyApyHistoryResponse, type DailyEarning, type DailyEarningsResponse, type DebankPortfolioResponse, type DepegEvent, type DeploySafeResponse, type DepositResponse, type ERC7739Context, type ERC7739Data, type ExcludedPool, type FirstTopupResponse, type GetPoolsResponse, type GetSelectedPoolsResponse, type Hex, type HistoryEntry, type HistoryPosition, type HistoryResponse, type LiquidityDropEvent, type LogDepositResponse, type NewCollateralDetectedEvent, type OnchainEarnings, type OnchainEarningsResponse, type OpportunitiesResponse, type Opportunity, type OpportunityPosition, 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, type RebalanceFrequencyResponse, type RegisterAgentResponse, type SDKConfig, type SdkKeyTVLResponse, type Session, type SessionKeyResponse, type SimulateBestPositionsParams, type SimulateBestPositionsResponse, type SimulateCalldataItem, type SimulatedPosition, type SmartWalletByEOAResponse, type SmartWalletResponse, type Strategy, type SupportedChainId, type TVLResponse, type TokenApy, type TokenEarnings, type UpdateUserProfileRequest, type UpdateUserProfileResponse, type UserPosition, VAULT_ADDRESS, type VaultAsset, type VaultClaimResponse, type VaultDepositResponse, type VaultSharesResponse, type VaultWithdrawResponse, type VaultWithdrawStatusResponse, type VolumeResponse, type WalletTVL, type WithdrawResponse, type ZyfaiEventFilters, type ZyfaiEventHandlers, ZyfaiSDK, createBankrProvider, getChainConfig, getDefaultTokenAddress, getSupportedChainIds, isSupportedChain };
package/dist/index.d.ts CHANGED
@@ -436,6 +436,7 @@ interface SimulateBestPositionsParams {
436
436
  protocols?: string[];
437
437
  pools?: string[];
438
438
  userPositions?: UserPosition[];
439
+ partOfZyfiTvl?: boolean;
439
440
  }
440
441
  interface SimulateCalldataItem {
441
442
  contract_address: Address;
@@ -444,9 +445,17 @@ interface SimulateCalldataItem {
444
445
  value: string;
445
446
  description: string;
446
447
  }
448
+ interface AllocationDetail {
449
+ pool_capacity_usd: number;
450
+ zyfi_position_usd: number;
451
+ available_capacity_usd: number;
452
+ fair_share_usd: number;
453
+ overflow_usd: number;
454
+ }
447
455
  interface SimulatedPosition {
448
456
  protocol: string;
449
457
  pool: string;
458
+ rank: number;
450
459
  simulated_apy: number;
451
460
  combined_apy: number;
452
461
  amount: number;
@@ -455,11 +464,20 @@ interface SimulatedPosition {
455
464
  tvl: number;
456
465
  liquidity: number;
457
466
  averageCombinedApy30Days: number;
467
+ allocation_detail: AllocationDetail;
458
468
  calldata: SimulateCalldataItem[];
459
469
  }
470
+ interface ExcludedPool {
471
+ protocol: string;
472
+ pool: string;
473
+ reason: string;
474
+ detail: string;
475
+ failed_checks?: string[];
476
+ }
460
477
  interface SimulateBestPositionsResponse {
461
478
  success: boolean;
462
479
  data: Record<string, SimulatedPosition[]>;
480
+ excluded: Record<string, ExcludedPool[]>;
463
481
  messages: Record<string, string>;
464
482
  }
465
483
  interface OpportunityPosition {
@@ -1695,4 +1713,4 @@ type BankrProvider = ReturnType<typeof createBankrProvider>;
1695
1713
 
1696
1714
  declare const VAULT_ADDRESS: "0xD580071c47d4a667858B5FafAb85BC9C609beC5D";
1697
1715
 
1698
- export { type APYPerStrategy, type APYPerStrategyResponse, type ActionData, type ActiveWallet, type ActiveWalletsResponse, type AddWalletToSdkResponse, type Address, type ApyPosition, type BankrProvider, type BankrProviderConfig, type BestOpportunityDetails, type BestOpportunityResponse, type ChainConfig, type ChainPortfolio, type ChainTokenEarnings, type CustomizationConfig, type CustomizeBatchRequest, type CustomizeBatchResponse, DEFAULT_TOKEN_ADDRESSES, type DailyApyEntry, type DailyApyHistoryResponse, type DailyEarning, type DailyEarningsResponse, type DebankPortfolioResponse, type DepegEvent, type DeploySafeResponse, type DepositResponse, type ERC7739Context, type ERC7739Data, type FirstTopupResponse, type GetPoolsResponse, type GetSelectedPoolsResponse, type Hex, type HistoryEntry, type HistoryPosition, type HistoryResponse, type LiquidityDropEvent, type LogDepositResponse, type NewCollateralDetectedEvent, type OnchainEarnings, type OnchainEarningsResponse, type OpportunitiesResponse, type Opportunity, type OpportunityPosition, 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, type RebalanceFrequencyResponse, type RegisterAgentResponse, type SDKConfig, type SdkKeyTVLResponse, type Session, type SessionKeyResponse, type SimulateBestPositionsParams, type SimulateBestPositionsResponse, type SimulateCalldataItem, type SimulatedPosition, type SmartWalletByEOAResponse, type SmartWalletResponse, type Strategy, type SupportedChainId, type TVLResponse, type TokenApy, type TokenEarnings, type UpdateUserProfileRequest, type UpdateUserProfileResponse, type UserPosition, VAULT_ADDRESS, type VaultAsset, type VaultClaimResponse, type VaultDepositResponse, type VaultSharesResponse, type VaultWithdrawResponse, type VaultWithdrawStatusResponse, type VolumeResponse, type WalletTVL, type WithdrawResponse, type ZyfaiEventFilters, type ZyfaiEventHandlers, ZyfaiSDK, createBankrProvider, getChainConfig, getDefaultTokenAddress, getSupportedChainIds, isSupportedChain };
1716
+ export { type APYPerStrategy, type APYPerStrategyResponse, type ActionData, type ActiveWallet, type ActiveWalletsResponse, type AddWalletToSdkResponse, type Address, type AllocationDetail, type ApyPosition, type BankrProvider, type BankrProviderConfig, type BestOpportunityDetails, type BestOpportunityResponse, type ChainConfig, type ChainPortfolio, type ChainTokenEarnings, type CustomizationConfig, type CustomizeBatchRequest, type CustomizeBatchResponse, DEFAULT_TOKEN_ADDRESSES, type DailyApyEntry, type DailyApyHistoryResponse, type DailyEarning, type DailyEarningsResponse, type DebankPortfolioResponse, type DepegEvent, type DeploySafeResponse, type DepositResponse, type ERC7739Context, type ERC7739Data, type ExcludedPool, type FirstTopupResponse, type GetPoolsResponse, type GetSelectedPoolsResponse, type Hex, type HistoryEntry, type HistoryPosition, type HistoryResponse, type LiquidityDropEvent, type LogDepositResponse, type NewCollateralDetectedEvent, type OnchainEarnings, type OnchainEarningsResponse, type OpportunitiesResponse, type Opportunity, type OpportunityPosition, 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, type RebalanceFrequencyResponse, type RegisterAgentResponse, type SDKConfig, type SdkKeyTVLResponse, type Session, type SessionKeyResponse, type SimulateBestPositionsParams, type SimulateBestPositionsResponse, type SimulateCalldataItem, type SimulatedPosition, type SmartWalletByEOAResponse, type SmartWalletResponse, type Strategy, type SupportedChainId, type TVLResponse, type TokenApy, type TokenEarnings, type UpdateUserProfileRequest, type UpdateUserProfileResponse, type UserPosition, VAULT_ADDRESS, type VaultAsset, type VaultClaimResponse, type VaultDepositResponse, type VaultSharesResponse, type VaultWithdrawResponse, type VaultWithdrawStatusResponse, type VolumeResponse, type WalletTVL, type WithdrawResponse, type ZyfaiEventFilters, type ZyfaiEventHandlers, ZyfaiSDK, createBankrProvider, getChainConfig, getDefaultTokenAddress, getSupportedChainIds, isSupportedChain };
package/dist/index.js CHANGED
@@ -94,6 +94,7 @@ var ENDPOINTS = {
94
94
  if (params.protocols?.length) query.push(`protocols=${params.protocols.join(",")}`);
95
95
  if (params.pools?.length) query.push(`pools=${params.pools.join(",")}`);
96
96
  if (params.userPositions?.length) query.push(`userPositions=${encodeURIComponent(JSON.stringify(params.userPositions))}`);
97
+ if (params.partOfZyfiTvl !== void 0) query.push(`partOfZyfiTvl=${params.partOfZyfiTvl}`);
97
98
  return `/simulate/best-positions?${query.join("&")}`;
98
99
  },
99
100
  // Customization
package/dist/index.mjs CHANGED
@@ -51,6 +51,7 @@ var ENDPOINTS = {
51
51
  if (params.protocols?.length) query.push(`protocols=${params.protocols.join(",")}`);
52
52
  if (params.pools?.length) query.push(`pools=${params.pools.join(",")}`);
53
53
  if (params.userPositions?.length) query.push(`userPositions=${encodeURIComponent(JSON.stringify(params.userPositions))}`);
54
+ if (params.partOfZyfiTvl !== void 0) query.push(`partOfZyfiTvl=${params.partOfZyfiTvl}`);
54
55
  return `/simulate/best-positions?${query.join("&")}`;
55
56
  },
56
57
  // Customization
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyfai/sdk",
3
- "version": "0.2.41",
3
+ "version": "0.2.42",
4
4
  "description": "TypeScript SDK for Zyfai Yield Optimization Engine - Deploy Safe smart wallets, manage session keys, and interact with DeFi protocols",
5
5
  "main": "dist/index.js",
6
6
  "module": "dist/index.mjs",