@meshconnect/uwc-types 0.20.0-snapshot.3bf4b70 → 0.20.0-snapshot.cb0b223

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.
@@ -17,32 +17,14 @@ export type LogLevel = 'debug' | 'info' | 'warn' | 'error';
17
17
  * drive a reuse-outcome dashboard without high cardinality. Emitted via
18
18
  * `WalletConnectConfig.onSessionReuseSkipped`.
19
19
  *
20
- * - `no_record` — no topic recorded for the selected wallet (e.g. first connect),
21
- * or the recorded session is no longer in storage.
22
- * - `expired` — the recorded session exists but is past its expiry.
23
- * - `no_address` — the session carries no account for the requested network.
24
- * - `ping_timeout`— the liveness ping got NO ack within the bounded window (peer
25
- * slow/suspended or the relay socket is dead — CARE-263). Split
26
- * from `ping_error` so a slow-but-alive mobile wallet (which
27
- * would defeat reuse if the window is too tight) is measurable
28
- * separately from a hard failure.
29
- * - `ping_error` — the ping REJECTED (offline / relay / protocol error), i.e. an
30
- * unknown liveness state rather than a confirmed no-ack.
31
- * - `superseded` — a disconnect()/newer connect() invalidated the attempt mid-ping.
20
+ * - `no_record` — no topic recorded for the selected wallet (e.g. first connect),
21
+ * or the recorded session is no longer in storage.
22
+ * - `expired` — the recorded session exists but is past its expiry.
23
+ * - `no_address` — the session carries no account for the requested network.
24
+ * - `ping_failed`— the liveness ping timed out / errored (peer or relay dead).
25
+ * - `superseded` — a disconnect()/newer connect() invalidated the attempt mid-ping.
32
26
  */
33
- export type WalletConnectSessionReuseSkipReason = 'no_record' | 'expired' | 'no_address' | 'ping_timeout' | 'ping_error' | 'superseded';
34
- /**
35
- * Payload for `WalletConnectConfig.onSessionReuseSkipped`. Carries the coarse
36
- * reason plus, for the two ping outcomes, the ping round-trip in ms — so a
37
- * consumer can chart the ping-latency distribution and decide whether the bound
38
- * is clipping live-but-slow wallets. (The healthy-ping latency is separately
39
- * observable as the reused connect's own handoff duration.)
40
- */
41
- export interface WalletConnectSessionReuseSkip {
42
- reason: WalletConnectSessionReuseSkipReason;
43
- /** Ping round-trip in ms; present only for `ping_timeout` / `ping_error`. */
44
- pingMs?: number;
45
- }
27
+ export type WalletConnectSessionReuseSkipReason = 'no_record' | 'expired' | 'no_address' | 'ping_failed' | 'superseded';
46
28
  /**
47
29
  * Pluggable logger. The default implementation (`createLogger`) is console-backed
48
30
  * and level-gated; inject your own to redirect UWC's internal logging into your
@@ -1 +1 @@
1
- {"version":3,"file":"observability.d.ts","sourceRoot":"","sources":["../src/observability.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;GAWG;AAEH,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,CAAA;AAE1D;;;;;;;;;;;;;;;;;;GAkBG;AACH,MAAM,MAAM,mCAAmC,GAC3C,WAAW,GACX,SAAS,GACT,YAAY,GACZ,cAAc,GACd,YAAY,GACZ,YAAY,CAAA;AAEhB;;;;;;GAMG;AACH,MAAM,WAAW,6BAA6B;IAC5C,MAAM,EAAE,mCAAmC,CAAA;IAC3C,6EAA6E;IAC7E,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;;;;GAKG;AACH,MAAM,WAAW,MAAM;IACrB,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAChD,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC/C,IAAI,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;IAC/C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;CACjD;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,cAAc,GACtB,wBAAwB,GACxB,+BAA+B,GAC/B,wBAAwB,GACxB,qBAAqB,GACrB,cAAc,GAC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AE,GAAG,IAAI,CAAA;IAC/C,KAAK,CAAC,OAAO,EAAE,MAAM,EAAE,GAAG,IAAI,EAAE,OAAO,EAAE,GAAG,IAAI,CAAA;CACjD;AAED;;;;;;;;;;;;;GAaG;AACH,MAAM,MAAM,cAAc,GACtB,wBAAwB,GACxB,+BAA+B,GAC/B,wBAAwB,GACxB,qBAAqB,GACrB,cAAc,GACd,qBAAqB,GACrB,4BAA4B,GAC5B,wBAAwB,GACxB,SAAS,CAAA;AAEb;;;;GAIG;AACH,MAAM,MAAM,QAAQ,GAAG,QAAQ,GAAG,SAAS,GAAG,SAAS,GAAG,SAAS,CAAA;AAEnE;;;;;;GAMG;AACH,MAAM,MAAM,WAAW,GACnB,eAAe,GACf,gBAAgB,GAChB,cAAc,GACd,eAAe;AACjB,iFAAiF;GAC/E,mBAAmB,GACnB,oBAAoB,GACpB,gBAAgB,GAChB,SAAS;AACX,gFAAgF;GAC9E,oBAAoB,GACpB,SAAS,CAAA;AAEb;;;;GAIG;AACH,MAAM,MAAM,WAAW,GACnB,UAAU,GACV,WAAW,GACX,QAAQ,GACR,KAAK,GACL,SAAS,CAAA;AAEb;;;;GAIG;AACH,MAAM,MAAM,0BAA0B;AACpC,gGAAgG;AAC9F,mCAAmC;AACrC,uFAAuF;GACrF,iCAAiC;AACnC,oEAAoE;GAClE,uBAAuB;AACzB;;;;GAIG;GACD,mBAAmB;AACrB;;;GAGG;GACD,cAAc,CAAA"}
@@ -1,4 +1,4 @@
1
- import type { WalletConnectSessionReuseSkip } from './observability';
1
+ import type { WalletConnectSessionReuseSkipReason } from './observability';
2
2
  /**
3
3
  * Configuration for WalletConnect connector
4
4
  */
@@ -37,25 +37,11 @@ export interface WalletConnectConfig {
37
37
  onSessionRestored?: () => void;
38
38
  /**
39
39
  * Fired when reuse was attempted (enableSessionReuse on + wallet known) but fell
40
- * back to a fresh pairing. Carries the coarse `reason` plus, for the ping
41
- * outcomes, the ping round-trip (`pingMs`). The counterpart to onSessionRestored:
42
- * together they give a reuse-outcome funnel (reused vs the reason it wasn't) for
43
- * monitoring. Telemetry-only; never affects behaviour. No-op unless
44
- * enableSessionReuse is on.
40
+ * back to a fresh pairing, with the coarse reason. The counterpart to
41
+ * onSessionRestored: together they give a reuse-outcome funnel (reused vs the
42
+ * reason it wasn't) for monitoring. Telemetry-only; never affects behaviour.
43
+ * No-op unless enableSessionReuse is on.
45
44
  */
46
- onSessionReuseSkipped?: (skip: WalletConnectSessionReuseSkip) => void;
47
- /**
48
- * Opt-in liveness-ping window (ms) for session reuse. Reuse is OPTIMISTIC by
49
- * default: when this is unset (or ≤ 0) connect() adopts a stored session with no
50
- * blocking probe — matching WC's own restore and every mainstream dApp connector
51
- * — and a dead peer surfaces at the first sign (bounded by the app's signing
52
- * escape hatch), not by making every relaunch wait. Set a positive number only if
53
- * you would rather pay an up-front ping and re-pair immediately than risk a late
54
- * failure; a too-tight bound will discard live-but-slow mobile peers (they often
55
- * need > 4s to ack over the relay), so calibrate against the `pingMs` carried by
56
- * onSessionReuseSkipped. Exposed as config so this bound can be tuned per consumer
57
- * without a new UWC release. No-op unless enableSessionReuse is on.
58
- */
59
- sessionReusePingTimeoutMs?: number;
45
+ onSessionReuseSkipped?: (reason: WalletConnectSessionReuseSkipReason) => void;
60
46
  }
61
47
  //# sourceMappingURL=wallet-connect-connector.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"wallet-connect-connector.d.ts","sourceRoot":"","sources":["../src/wallet-connect-connector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,6BAA6B,EAAE,MAAM,iBAAiB,CAAA;AAEpE;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,MAAM,CAAA;QACnB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,EAAE,CAAA;KAChB,CAAA;IACD;;;;;;;;;;;;;;;OAeG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B;;;;;;;OAOG;IACH,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,6BAA6B,KAAK,IAAI,CAAA;IACrE;;;;;;;;;;;OAWG;IACH,yBAAyB,CAAC,EAAE,MAAM,CAAA;CACnC"}
1
+ {"version":3,"file":"wallet-connect-connector.d.ts","sourceRoot":"","sources":["../src/wallet-connect-connector.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,mCAAmC,EAAE,MAAM,iBAAiB,CAAA;AAE1E;;GAEG;AACH,MAAM,WAAW,mBAAmB;IAClC,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE;QACT,IAAI,EAAE,MAAM,CAAA;QACZ,WAAW,EAAE,MAAM,CAAA;QACnB,GAAG,EAAE,MAAM,CAAA;QACX,KAAK,EAAE,MAAM,EAAE,CAAA;KAChB,CAAA;IACD;;;;;;;;;;;;;;;OAeG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B;;;;;;OAMG;IACH,iBAAiB,CAAC,EAAE,MAAM,IAAI,CAAA;IAC9B;;;;;;OAMG;IACH,qBAAqB,CAAC,EAAE,CAAC,MAAM,EAAE,mCAAmC,KAAK,IAAI,CAAA;CAC9E"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@meshconnect/uwc-types",
3
- "version": "0.20.0-snapshot.3bf4b70",
3
+ "version": "0.20.0-snapshot.cb0b223",
4
4
  "description": "TypeScript types for Universal Wallet Connector",
5
5
  "type": "module",
6
6
  "main": "dist/index.js",
@@ -19,40 +19,20 @@ export type LogLevel = 'debug' | 'info' | 'warn' | 'error'
19
19
  * drive a reuse-outcome dashboard without high cardinality. Emitted via
20
20
  * `WalletConnectConfig.onSessionReuseSkipped`.
21
21
  *
22
- * - `no_record` — no topic recorded for the selected wallet (e.g. first connect),
23
- * or the recorded session is no longer in storage.
24
- * - `expired` — the recorded session exists but is past its expiry.
25
- * - `no_address` — the session carries no account for the requested network.
26
- * - `ping_timeout`— the liveness ping got NO ack within the bounded window (peer
27
- * slow/suspended or the relay socket is dead — CARE-263). Split
28
- * from `ping_error` so a slow-but-alive mobile wallet (which
29
- * would defeat reuse if the window is too tight) is measurable
30
- * separately from a hard failure.
31
- * - `ping_error` — the ping REJECTED (offline / relay / protocol error), i.e. an
32
- * unknown liveness state rather than a confirmed no-ack.
33
- * - `superseded` — a disconnect()/newer connect() invalidated the attempt mid-ping.
22
+ * - `no_record` — no topic recorded for the selected wallet (e.g. first connect),
23
+ * or the recorded session is no longer in storage.
24
+ * - `expired` — the recorded session exists but is past its expiry.
25
+ * - `no_address` — the session carries no account for the requested network.
26
+ * - `ping_failed`— the liveness ping timed out / errored (peer or relay dead).
27
+ * - `superseded` — a disconnect()/newer connect() invalidated the attempt mid-ping.
34
28
  */
35
29
  export type WalletConnectSessionReuseSkipReason =
36
30
  | 'no_record'
37
31
  | 'expired'
38
32
  | 'no_address'
39
- | 'ping_timeout'
40
- | 'ping_error'
33
+ | 'ping_failed'
41
34
  | 'superseded'
42
35
 
43
- /**
44
- * Payload for `WalletConnectConfig.onSessionReuseSkipped`. Carries the coarse
45
- * reason plus, for the two ping outcomes, the ping round-trip in ms — so a
46
- * consumer can chart the ping-latency distribution and decide whether the bound
47
- * is clipping live-but-slow wallets. (The healthy-ping latency is separately
48
- * observable as the reused connect's own handoff duration.)
49
- */
50
- export interface WalletConnectSessionReuseSkip {
51
- reason: WalletConnectSessionReuseSkipReason
52
- /** Ping round-trip in ms; present only for `ping_timeout` / `ping_error`. */
53
- pingMs?: number
54
- }
55
-
56
36
  /**
57
37
  * Pluggable logger. The default implementation (`createLogger`) is console-backed
58
38
  * and level-gated; inject your own to redirect UWC's internal logging into your
@@ -1,4 +1,4 @@
1
- import type { WalletConnectSessionReuseSkip } from './observability'
1
+ import type { WalletConnectSessionReuseSkipReason } from './observability'
2
2
 
3
3
  /**
4
4
  * Configuration for WalletConnect connector
@@ -38,24 +38,10 @@ export interface WalletConnectConfig {
38
38
  onSessionRestored?: () => void
39
39
  /**
40
40
  * Fired when reuse was attempted (enableSessionReuse on + wallet known) but fell
41
- * back to a fresh pairing. Carries the coarse `reason` plus, for the ping
42
- * outcomes, the ping round-trip (`pingMs`). The counterpart to onSessionRestored:
43
- * together they give a reuse-outcome funnel (reused vs the reason it wasn't) for
44
- * monitoring. Telemetry-only; never affects behaviour. No-op unless
45
- * enableSessionReuse is on.
41
+ * back to a fresh pairing, with the coarse reason. The counterpart to
42
+ * onSessionRestored: together they give a reuse-outcome funnel (reused vs the
43
+ * reason it wasn't) for monitoring. Telemetry-only; never affects behaviour.
44
+ * No-op unless enableSessionReuse is on.
46
45
  */
47
- onSessionReuseSkipped?: (skip: WalletConnectSessionReuseSkip) => void
48
- /**
49
- * Opt-in liveness-ping window (ms) for session reuse. Reuse is OPTIMISTIC by
50
- * default: when this is unset (or ≤ 0) connect() adopts a stored session with no
51
- * blocking probe — matching WC's own restore and every mainstream dApp connector
52
- * — and a dead peer surfaces at the first sign (bounded by the app's signing
53
- * escape hatch), not by making every relaunch wait. Set a positive number only if
54
- * you would rather pay an up-front ping and re-pair immediately than risk a late
55
- * failure; a too-tight bound will discard live-but-slow mobile peers (they often
56
- * need > 4s to ack over the relay), so calibrate against the `pingMs` carried by
57
- * onSessionReuseSkipped. Exposed as config so this bound can be tuned per consumer
58
- * without a new UWC release. No-op unless enableSessionReuse is on.
59
- */
60
- sessionReusePingTimeoutMs?: number
46
+ onSessionReuseSkipped?: (reason: WalletConnectSessionReuseSkipReason) => void
61
47
  }