@coasys/ad4m-connect 0.13.0-test-interpretation-2 → 0.13.1-staging.1

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/core.d.ts CHANGED
@@ -18,24 +18,37 @@ export default class Ad4mConnect extends EventTarget {
18
18
  hostIndexUrl: string;
19
19
  lowCreditThreshold: number;
20
20
  private creditPollInterval;
21
+ private releaseCreditListener?;
21
22
  private embeddedResolve?;
22
23
  private embeddedReject?;
23
24
  constructor(options: Ad4mConnectOptions);
24
25
  connect(): Promise<Ad4mClient>;
26
+ /** Make this client the connection, closing the one it replaces. */
27
+ private adoptClient;
25
28
  private buildClient;
26
29
  private withTempClient;
27
30
  checkAuth(): Promise<boolean>;
31
+ /**
32
+ * What the executor says about this session, with nothing applied yet.
33
+ *
34
+ * \`agent.status\` first: on an authorised session — every connect after the first — it answers
35
+ * in one call. \`agent.isLocked\` needs no capability, so when \`status\` fails
36
+ * it is the one that can tell a locked wallet from a refused token.
37
+ */
38
+ private readAuth;
39
+ /** Act on what \`readAuth\` found. Answers whether it found anything usable — see \`checkAuth\`. */
40
+ private applyAuth;
28
41
  disconnect(): Promise<void>;
29
42
  /**
30
43
  * Subscribe to real-time credit updates.
31
- * Falls back to polling if the subscription is not supported by the executor.
44
+ * Polling runs beside it as a safety net.
32
45
  */
33
46
  startCreditSubscription(): void;
34
47
  startCreditPolling(): void;
35
48
  stopCreditPolling(): void;
36
49
  requestTopUp(amountHOT: number): Promise<{
37
50
  success: boolean;
38
- message: string;
51
+ amountHOT: string;
39
52
  }>;
40
53
  /** Fetch recent compute log entries. */
41
54
  fetchComputeLog(since?: string, limit?: number): Promise<import('./types').ComputeLogEntryData[]>;