@owney/sdk 0.6.9-beta.2 → 0.6.9-beta.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.
package/dist/index.cjs CHANGED
@@ -413,7 +413,9 @@ function mapUserProfile(raw, userAddress) {
413
413
  chains: raw.chains || [],
414
414
  strategy: raw.strategy,
415
415
  hasActiveSessionKey: raw.hasActiveSessionKey || false,
416
- protocols: raw.protocols || []
416
+ protocols: raw.protocols || [],
417
+ splitting: raw.splitting,
418
+ minSplits: raw.minSplits
417
419
  };
418
420
  }
419
421
  function mapApyByStrategy(raw) {
@@ -1264,6 +1266,16 @@ var ZyfaiAgent = class {
1264
1266
  await this.connectAuth(state, chainId);
1265
1267
  const validChainId = isValidChainId(chainId);
1266
1268
  const raw = await this.sdk.getUserDetails();
1269
+ debugLog("zyfai:profile", "getUserProfile \u2014 Zyfai reports", {
1270
+ asset: "USDC (default \u2014 no asset passed)",
1271
+ splitting: raw.splitting,
1272
+ minSplits: raw.minSplits,
1273
+ strategy: raw.strategy,
1274
+ chains: raw.chains,
1275
+ protocolCount: raw.protocols?.length,
1276
+ hasActiveSessionKey: raw.hasActiveSessionKey,
1277
+ smartWallet: raw.smartWallet
1278
+ });
1267
1279
  await this.ensureSessionKey(state, this.getAddress(), validChainId);
1268
1280
  return mapUserProfile(raw, this.connectedAddress);
1269
1281
  }
package/dist/index.d.cts CHANGED
@@ -272,6 +272,19 @@ interface AgentUserProfile {
272
272
  strategy?: string;
273
273
  hasActiveSessionKey: boolean;
274
274
  protocols: string[];
275
+ /**
276
+ * Capital splitting, as the agent currently has it (ROUT-229). Optional
277
+ * because not every agent has the concept — Sail omits both.
278
+ *
279
+ * `minSplits` is the field that carries the meaning: 1 means "split only when
280
+ * it beats a single pool", 2-4 means "force a split for diversification".
281
+ *
282
+ * Zyfai stores these PER ASSET. This profile read does not pass an asset, so
283
+ * these reflect the USDC bucket; a WETH-only user's real setting is not shown
284
+ * here.
285
+ */
286
+ splitting?: boolean;
287
+ minSplits?: number;
275
288
  }
276
289
  interface OwneyUserProfile {
277
290
  agentUserProfile: Record<AgentId, AgentUserProfile>;
package/dist/index.d.ts CHANGED
@@ -272,6 +272,19 @@ interface AgentUserProfile {
272
272
  strategy?: string;
273
273
  hasActiveSessionKey: boolean;
274
274
  protocols: string[];
275
+ /**
276
+ * Capital splitting, as the agent currently has it (ROUT-229). Optional
277
+ * because not every agent has the concept — Sail omits both.
278
+ *
279
+ * `minSplits` is the field that carries the meaning: 1 means "split only when
280
+ * it beats a single pool", 2-4 means "force a split for diversification".
281
+ *
282
+ * Zyfai stores these PER ASSET. This profile read does not pass an asset, so
283
+ * these reflect the USDC bucket; a WETH-only user's real setting is not shown
284
+ * here.
285
+ */
286
+ splitting?: boolean;
287
+ minSplits?: number;
275
288
  }
276
289
  interface OwneyUserProfile {
277
290
  agentUserProfile: Record<AgentId, AgentUserProfile>;
package/dist/index.js CHANGED
@@ -380,7 +380,9 @@ function mapUserProfile(raw, userAddress) {
380
380
  chains: raw.chains || [],
381
381
  strategy: raw.strategy,
382
382
  hasActiveSessionKey: raw.hasActiveSessionKey || false,
383
- protocols: raw.protocols || []
383
+ protocols: raw.protocols || [],
384
+ splitting: raw.splitting,
385
+ minSplits: raw.minSplits
384
386
  };
385
387
  }
386
388
  function mapApyByStrategy(raw) {
@@ -1231,6 +1233,16 @@ var ZyfaiAgent = class {
1231
1233
  await this.connectAuth(state, chainId);
1232
1234
  const validChainId = isValidChainId(chainId);
1233
1235
  const raw = await this.sdk.getUserDetails();
1236
+ debugLog("zyfai:profile", "getUserProfile \u2014 Zyfai reports", {
1237
+ asset: "USDC (default \u2014 no asset passed)",
1238
+ splitting: raw.splitting,
1239
+ minSplits: raw.minSplits,
1240
+ strategy: raw.strategy,
1241
+ chains: raw.chains,
1242
+ protocolCount: raw.protocols?.length,
1243
+ hasActiveSessionKey: raw.hasActiveSessionKey,
1244
+ smartWallet: raw.smartWallet
1245
+ });
1234
1246
  await this.ensureSessionKey(state, this.getAddress(), validChainId);
1235
1247
  return mapUserProfile(raw, this.connectedAddress);
1236
1248
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@owney/sdk",
3
- "version": "0.6.9-beta.2",
3
+ "version": "0.6.9-beta.3",
4
4
  "type": "module",
5
5
  "main": "dist/index.cjs",
6
6
  "module": "dist/index.js",