@zyfai/sdk 0.1.10 → 0.1.11

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
@@ -856,21 +856,6 @@ declare class ZyfaiSDK {
856
856
  * ```
857
857
  */
858
858
  getRebalanceFrequency(walletAddress: string): Promise<RebalanceFrequencyResponse>;
859
- /**
860
- * Add wallet to SDK API key allowedWallets list
861
- * Adds a wallet address to the SDK API key's allowedWallets list.
862
- * This endpoint requires SDK API key authentication (API key starting with "zyfai_").
863
- *
864
- * @param walletAddress - Wallet address to add to the allowed list
865
- * @returns Response indicating success and status message
866
- *
867
- * @example
868
- * ```typescript
869
- * const result = await sdk.addWalletToSdk("0x1234...");
870
- * console.log(result.message); // "Wallet successfully added to allowed list"
871
- * ```
872
- */
873
- addWalletToSdk(walletAddress: string): Promise<AddWalletToSdkResponse>;
874
859
  }
875
860
 
876
861
  export { type ActionData, type ActiveWallet, type ActiveWalletsResponse, type AddWalletToSdkResponse, type Address, type ChainConfig, type ChainPortfolio, type DailyApyEntry, type DailyApyHistoryResponse, type DailyEarning, type DailyEarningsResponse, type DebankPortfolioResponse, type DeploySafeResponse, type DepositResponse, type ERC7739Context, type ERC7739Data, type Environment, type FirstTopupResponse, type Hex, type HistoryEntry, type HistoryPosition, type HistoryResponse, type OnchainEarnings, type OnchainEarningsResponse, type OpportunitiesResponse, type Opportunity, type PolicyData, type Pool, type PortfolioToken, type Position, type PositionSlot, type PositionsResponse, type Protocol, type ProtocolsResponse, type RebalanceFrequencyResponse, type RebalanceInfo, type RebalanceInfoResponse, type SDKConfig, type Session, type SessionKeyResponse, type SmartWalletByEOAResponse, type SmartWalletResponse, type SupportedChainId, type TVLResponse, type UserDetails, type UserDetailsResponse, type VolumeResponse, type WithdrawResponse, ZyfaiSDK, getChainConfig, getSupportedChainIds, isSupportedChain };
package/dist/index.d.ts CHANGED
@@ -856,21 +856,6 @@ declare class ZyfaiSDK {
856
856
  * ```
857
857
  */
858
858
  getRebalanceFrequency(walletAddress: string): Promise<RebalanceFrequencyResponse>;
859
- /**
860
- * Add wallet to SDK API key allowedWallets list
861
- * Adds a wallet address to the SDK API key's allowedWallets list.
862
- * This endpoint requires SDK API key authentication (API key starting with "zyfai_").
863
- *
864
- * @param walletAddress - Wallet address to add to the allowed list
865
- * @returns Response indicating success and status message
866
- *
867
- * @example
868
- * ```typescript
869
- * const result = await sdk.addWalletToSdk("0x1234...");
870
- * console.log(result.message); // "Wallet successfully added to allowed list"
871
- * ```
872
- */
873
- addWalletToSdk(walletAddress: string): Promise<AddWalletToSdkResponse>;
874
859
  }
875
860
 
876
861
  export { type ActionData, type ActiveWallet, type ActiveWalletsResponse, type AddWalletToSdkResponse, type Address, type ChainConfig, type ChainPortfolio, type DailyApyEntry, type DailyApyHistoryResponse, type DailyEarning, type DailyEarningsResponse, type DebankPortfolioResponse, type DeploySafeResponse, type DepositResponse, type ERC7739Context, type ERC7739Data, type Environment, type FirstTopupResponse, type Hex, type HistoryEntry, type HistoryPosition, type HistoryResponse, type OnchainEarnings, type OnchainEarningsResponse, type OpportunitiesResponse, type Opportunity, type PolicyData, type Pool, type PortfolioToken, type Position, type PositionSlot, type PositionsResponse, type Protocol, type ProtocolsResponse, type RebalanceFrequencyResponse, type RebalanceInfo, type RebalanceInfoResponse, type SDKConfig, type Session, type SessionKeyResponse, type SmartWalletByEOAResponse, type SmartWalletResponse, type SupportedChainId, type TVLResponse, type UserDetails, type UserDetailsResponse, type VolumeResponse, type WithdrawResponse, ZyfaiSDK, getChainConfig, getSupportedChainIds, isSupportedChain };
package/dist/index.js CHANGED
@@ -59,7 +59,6 @@ var ENDPOINTS = {
59
59
  USER_ME: "/users/me",
60
60
  USER_WITHDRAW: "/users/withdraw",
61
61
  PARTIAL_WITHDRAW: "/users/partial-withdraw",
62
- USER_ADD_WALLET_TO_SDK: "/users/add-wallet-to-sdk",
63
62
  // Session Keys
64
63
  SESSION_KEYS_CONFIG: "/session-keys/config",
65
64
  SESSION_KEYS_ADD: "/session-keys/add",
@@ -2132,49 +2131,6 @@ var ZyfaiSDK = class {
2132
2131
  );
2133
2132
  }
2134
2133
  }
2135
- // ============================================================================
2136
- // SDK API Key Management
2137
- // ============================================================================
2138
- /**
2139
- * Add wallet to SDK API key allowedWallets list
2140
- * Adds a wallet address to the SDK API key's allowedWallets list.
2141
- * This endpoint requires SDK API key authentication (API key starting with "zyfai_").
2142
- *
2143
- * @param walletAddress - Wallet address to add to the allowed list
2144
- * @returns Response indicating success and status message
2145
- *
2146
- * @example
2147
- * ```typescript
2148
- * const result = await sdk.addWalletToSdk("0x1234...");
2149
- * console.log(result.message); // "Wallet successfully added to allowed list"
2150
- * ```
2151
- */
2152
- async addWalletToSdk(walletAddress) {
2153
- try {
2154
- if (!walletAddress) {
2155
- throw new Error("Wallet address is required");
2156
- }
2157
- try {
2158
- (0, import_viem4.getAddress)(walletAddress);
2159
- } catch {
2160
- throw new Error("Invalid wallet address format");
2161
- }
2162
- const response = await this.httpClient.post(
2163
- ENDPOINTS.USER_ADD_WALLET_TO_SDK,
2164
- {
2165
- walletAddress
2166
- }
2167
- );
2168
- return {
2169
- success: response.success ?? true,
2170
- message: response.message || "Wallet added successfully"
2171
- };
2172
- } catch (error) {
2173
- throw new Error(
2174
- `Failed to add wallet to SDK: ${error.message}`
2175
- );
2176
- }
2177
- }
2178
2134
  };
2179
2135
  // Annotate the CommonJS export names for ESM import in node:
2180
2136
  0 && (module.exports = {
package/dist/index.mjs CHANGED
@@ -20,7 +20,6 @@ var ENDPOINTS = {
20
20
  USER_ME: "/users/me",
21
21
  USER_WITHDRAW: "/users/withdraw",
22
22
  PARTIAL_WITHDRAW: "/users/partial-withdraw",
23
- USER_ADD_WALLET_TO_SDK: "/users/add-wallet-to-sdk",
24
23
  // Session Keys
25
24
  SESSION_KEYS_CONFIG: "/session-keys/config",
26
25
  SESSION_KEYS_ADD: "/session-keys/add",
@@ -2112,49 +2111,6 @@ var ZyfaiSDK = class {
2112
2111
  );
2113
2112
  }
2114
2113
  }
2115
- // ============================================================================
2116
- // SDK API Key Management
2117
- // ============================================================================
2118
- /**
2119
- * Add wallet to SDK API key allowedWallets list
2120
- * Adds a wallet address to the SDK API key's allowedWallets list.
2121
- * This endpoint requires SDK API key authentication (API key starting with "zyfai_").
2122
- *
2123
- * @param walletAddress - Wallet address to add to the allowed list
2124
- * @returns Response indicating success and status message
2125
- *
2126
- * @example
2127
- * ```typescript
2128
- * const result = await sdk.addWalletToSdk("0x1234...");
2129
- * console.log(result.message); // "Wallet successfully added to allowed list"
2130
- * ```
2131
- */
2132
- async addWalletToSdk(walletAddress) {
2133
- try {
2134
- if (!walletAddress) {
2135
- throw new Error("Wallet address is required");
2136
- }
2137
- try {
2138
- getAddress2(walletAddress);
2139
- } catch {
2140
- throw new Error("Invalid wallet address format");
2141
- }
2142
- const response = await this.httpClient.post(
2143
- ENDPOINTS.USER_ADD_WALLET_TO_SDK,
2144
- {
2145
- walletAddress
2146
- }
2147
- );
2148
- return {
2149
- success: response.success ?? true,
2150
- message: response.message || "Wallet added successfully"
2151
- };
2152
- } catch (error) {
2153
- throw new Error(
2154
- `Failed to add wallet to SDK: ${error.message}`
2155
- );
2156
- }
2157
- }
2158
2114
  };
2159
2115
  export {
2160
2116
  ZyfaiSDK,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@zyfai/sdk",
3
- "version": "0.1.10",
3
+ "version": "0.1.11",
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",