@unicitylabs/openclaw-unicity 0.5.6-dev.1 → 0.5.7

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 (2) hide show
  1. package/package.json +1 -1
  2. package/src/sphere.ts +4 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unicitylabs/openclaw-unicity",
3
- "version": "0.5.6-dev.1",
3
+ "version": "0.5.7",
4
4
  "description": "Unicity wallet identity and encrypted DMs for OpenClaw agents — powered by Sphere SDK",
5
5
  "type": "module",
6
6
  "main": "src/index.ts",
package/src/sphere.ts CHANGED
@@ -14,6 +14,9 @@ export { DATA_DIR, MNEMONIC_PATH, walletExists };
14
14
  /** Default testnet API key (from Sphere app) */
15
15
  const DEFAULT_API_KEY = "sk_06365a9c44654841a366068bcfc68986";
16
16
 
17
+ /** How far back to fetch DMs on first connect (seconds). */
18
+ export const DM_LOOKBACK_SECONDS = 86_400;
19
+
17
20
  let sphereInstance: Sphere | null = null;
18
21
  let initPromise: Promise<InitSphereResult> | null = null;
19
22
 
@@ -116,7 +119,7 @@ async function doInitSphere(
116
119
  ...(existingMnemonic ? { mnemonic: existingMnemonic } : { autoGenerate: true }),
117
120
  ...(cfg.nametag ? { nametag: cfg.nametag } : {}),
118
121
  ...(groupChat ? { groupChat: groupChatRelays ? { relays: groupChatRelays } : true } : {}),
119
- dmSince: Math.floor(Date.now() / 1000) - 86400,
122
+ dmSince: Math.floor(Date.now() / 1000) - DM_LOOKBACK_SECONDS,
120
123
  });
121
124
 
122
125
  sphereInstance = result.sphere;