@meshconnect/uwc-core 1.0.1-snapshot.c7e65ce → 1.0.2
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/README.md +66 -211
- package/dist/events.d.ts +2 -69
- package/dist/events.d.ts.map +1 -1
- package/dist/events.js +1 -40
- package/dist/events.js.map +1 -1
- package/dist/index.d.ts +0 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -1
- package/dist/index.js.map +1 -1
- package/dist/managers/event-manager.d.ts.map +1 -1
- package/dist/managers/event-manager.js +1 -5
- package/dist/managers/event-manager.js.map +1 -1
- package/dist/services/connection-service.d.ts +1 -2
- package/dist/services/connection-service.d.ts.map +1 -1
- package/dist/services/connection-service.js +15 -35
- package/dist/services/connection-service.js.map +1 -1
- package/dist/services/network-switch-service.d.ts +1 -2
- package/dist/services/network-switch-service.d.ts.map +1 -1
- package/dist/services/network-switch-service.js +15 -33
- package/dist/services/network-switch-service.js.map +1 -1
- package/dist/universal-wallet-connector.d.ts +2 -51
- package/dist/universal-wallet-connector.d.ts.map +1 -1
- package/dist/universal-wallet-connector.js +61 -163
- package/dist/universal-wallet-connector.js.map +1 -1
- package/package.json +5 -5
- package/src/events.ts +1 -114
- package/src/index.ts +0 -6
- package/src/managers/event-manager.test.ts +0 -25
- package/src/managers/event-manager.ts +1 -5
- package/src/services/connection-service.test.ts +1 -66
- package/src/services/connection-service.ts +32 -54
- package/src/services/network-switch-service.test.ts +1 -51
- package/src/services/network-switch-service.ts +23 -43
- package/src/universal-wallet-connector.ts +71 -244
- package/dist/logger/create-logger.d.ts +0 -32
- package/dist/logger/create-logger.d.ts.map +0 -1
- package/dist/logger/create-logger.js +0 -69
- package/dist/logger/create-logger.js.map +0 -1
- package/dist/observability/connect-observer.d.ts +0 -22
- package/dist/observability/connect-observer.d.ts.map +0 -1
- package/dist/observability/connect-observer.js +0 -60
- package/dist/observability/connect-observer.js.map +0 -1
- package/dist/observability/instrument-handoff.d.ts +0 -39
- package/dist/observability/instrument-handoff.d.ts.map +0 -1
- package/dist/observability/instrument-handoff.js +0 -86
- package/dist/observability/instrument-handoff.js.map +0 -1
- package/dist/observability/scrub.d.ts +0 -30
- package/dist/observability/scrub.d.ts.map +0 -1
- package/dist/observability/scrub.js +0 -135
- package/dist/observability/scrub.js.map +0 -1
- package/dist/observability/telemetry.d.ts +0 -77
- package/dist/observability/telemetry.d.ts.map +0 -1
- package/dist/observability/telemetry.js +0 -138
- package/dist/observability/telemetry.js.map +0 -1
- package/dist/utils/id.d.ts +0 -2
- package/dist/utils/id.d.ts.map +0 -1
- package/dist/utils/id.js +0 -41
- package/dist/utils/id.js.map +0 -1
- package/dist/utils/to-wallet-error.d.ts +0 -16
- package/dist/utils/to-wallet-error.d.ts.map +0 -1
- package/dist/utils/to-wallet-error.js +0 -33
- package/dist/utils/to-wallet-error.js.map +0 -1
- package/src/logger/create-logger.test.ts +0 -111
- package/src/logger/create-logger.ts +0 -101
- package/src/observability/connect-observer.test.ts +0 -100
- package/src/observability/connect-observer.ts +0 -71
- package/src/observability/instrument-handoff.test.ts +0 -150
- package/src/observability/instrument-handoff.ts +0 -122
- package/src/observability/scrub.test.ts +0 -109
- package/src/observability/scrub.ts +0 -142
- package/src/observability/telemetry.test.ts +0 -134
- package/src/observability/telemetry.ts +0 -211
- package/src/universal-wallet-connector.observability.test.ts +0 -265
- package/src/utils/id.test.ts +0 -15
- package/src/utils/id.ts +0 -48
- package/src/utils/to-wallet-error.ts +0 -36
package/README.md
CHANGED
|
@@ -121,11 +121,11 @@ await connector.connect('injected', 'metamask', 'eip155:1')
|
|
|
121
121
|
|
|
122
122
|
Three mutually exclusive ways a user can connect:
|
|
123
123
|
|
|
124
|
-
| Mode | Description
|
|
125
|
-
| --------------- |
|
|
124
|
+
| Mode | Description | Typical wallets |
|
|
125
|
+
| --------------- | ------------------------------------------------------------------ | -------------------------------- |
|
|
126
126
|
| `injected` | Browser-extension or in-app injected provider (EIP-6963, Solana Wallet Standard, Tron, TON JS Bridge) | MetaMask, Phantom, Tonkeeper extension |
|
|
127
|
-
| `walletConnect` | WalletConnect v2 relay + QR code / deeplink
|
|
128
|
-
| `tonConnect` | TON Connect JS Bridge + QR code / universal link
|
|
127
|
+
| `walletConnect` | WalletConnect v2 relay + QR code / deeplink | Any WC-compatible mobile wallet |
|
|
128
|
+
| `tonConnect` | TON Connect JS Bridge + QR code / universal link | Tonkeeper, OKX TON Wallet |
|
|
129
129
|
|
|
130
130
|
A wallet can support multiple modes. `isConnectionModeAvailable(mode, walletId)`
|
|
131
131
|
tells you which ones are actually viable in the current runtime.
|
|
@@ -141,7 +141,7 @@ interface Session {
|
|
|
141
141
|
activeNetwork: Network | null
|
|
142
142
|
activeAddress: string | null
|
|
143
143
|
publicKey: string | null
|
|
144
|
-
availableNetworks: Network[]
|
|
144
|
+
availableNetworks: Network[] // networks the current wallet supports
|
|
145
145
|
availableAddresses: AvailableAddress[] // one per chain the wallet exposed
|
|
146
146
|
activeWalletCapabilities: Record<string, EVMCapabilities> | null
|
|
147
147
|
activeNetworkWalletCapabilities: EVMCapabilities | null
|
|
@@ -153,30 +153,24 @@ a `sessionChanged` event fires.
|
|
|
153
153
|
|
|
154
154
|
### Observer / event model
|
|
155
155
|
|
|
156
|
-
The connector is an event emitter.
|
|
157
|
-
|
|
158
|
-
| Event
|
|
159
|
-
|
|
|
160
|
-
| `ready`
|
|
161
|
-
| `walletsDetected`
|
|
162
|
-
| `connecting`
|
|
163
|
-
| `connectionUri`
|
|
164
|
-
| `connected`
|
|
165
|
-
| `disconnected`
|
|
166
|
-
| `sessionChanged`
|
|
167
|
-
| `networkSwitching`
|
|
168
|
-
| `networkSwitched`
|
|
169
|
-
| `capabilitiesUpdated`
|
|
170
|
-
| `error`
|
|
171
|
-
| `change`
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
visibility (see [Logging & observability](#logging--observability)). These
|
|
175
|
-
deliberately do **not** cascade to `change` (so they never trigger re-renders):
|
|
176
|
-
`log`, `awaitingWallet`, `walletSucceeded`, `walletRejected`, `walletFailed`,
|
|
177
|
-
`walletTimedOut`.
|
|
178
|
-
|
|
179
|
-
Use `on(eventName, listener)` for targeted updates. Every state-change event also
|
|
156
|
+
The connector is an event emitter. There are twelve typed events:
|
|
157
|
+
|
|
158
|
+
| Event | When it fires |
|
|
159
|
+
| ----------------------- | ------------------------------------------------------------ |
|
|
160
|
+
| `ready` | Initial wallet detection has completed |
|
|
161
|
+
| `walletsDetected` | Detection completed, payload is the enriched wallet list |
|
|
162
|
+
| `connecting` | `connect()` started |
|
|
163
|
+
| `connectionUri` | A WC/TonConnect pairing URI is now available |
|
|
164
|
+
| `connected` | `connect()` finished successfully |
|
|
165
|
+
| `disconnected` | `disconnect()` finished (session cleared) |
|
|
166
|
+
| `sessionChanged` | Any session field changed |
|
|
167
|
+
| `networkSwitching` | Network switch started or ended |
|
|
168
|
+
| `networkSwitched` | Network switch finished successfully |
|
|
169
|
+
| `capabilitiesUpdated` | `getWalletCapabilities()` refreshed data |
|
|
170
|
+
| `error` | A user-initiated op threw |
|
|
171
|
+
| `change` | Catch-all — fires after every other event |
|
|
172
|
+
|
|
173
|
+
Use `on(eventName, listener)` for targeted updates. Every typed event also
|
|
180
174
|
cascades to `change`, so the legacy `subscribe(listener)` pattern still works.
|
|
181
175
|
|
|
182
176
|
### AbortSignal
|
|
@@ -302,8 +296,8 @@ const connector = new UniversalWalletConnector(
|
|
|
302
296
|
)
|
|
303
297
|
```
|
|
304
298
|
|
|
305
|
-
Constructing a **second** instance logs
|
|
306
|
-
|
|
299
|
+
Constructing a **second** instance logs a `console.error` warning — it's
|
|
300
|
+
almost always a mistake. For tests and full-logout flows, call
|
|
307
301
|
`UniversalWalletConnector.resetInstance()` to clear the cached reference.
|
|
308
302
|
|
|
309
303
|
---
|
|
@@ -313,15 +307,15 @@ Constructing a **second** instance logs an error through the configured logger
|
|
|
313
307
|
All reads are synchronous and cheap. Call them any time.
|
|
314
308
|
|
|
315
309
|
```ts
|
|
316
|
-
connector.getSession()
|
|
317
|
-
connector.getState()
|
|
318
|
-
connector.isReady()
|
|
319
|
-
connector.getWallets()
|
|
320
|
-
connector.getNetworks()
|
|
310
|
+
connector.getSession() // current Session
|
|
311
|
+
connector.getState() // { session } — parity with older API
|
|
312
|
+
connector.isReady() // true once detection completed
|
|
313
|
+
connector.getWallets() // wallets with `installed` flags set
|
|
314
|
+
connector.getNetworks() // the configured networks array
|
|
321
315
|
connector.isConnectionModeAvailable('walletConnect', 'metamask')
|
|
322
|
-
connector.getConnectionURI()
|
|
316
|
+
connector.getConnectionURI() // WC/TonConnect pairing URI, if any
|
|
323
317
|
connector.getNetworkSwitchLoadingState()
|
|
324
|
-
// { isLoading, isWaitingForUserApproval }
|
|
318
|
+
// { isLoading, isWaitingForUserApproval }
|
|
325
319
|
connector.getActiveWalletCapabilities() // Record<NetworkId, EVMCapabilities> | null
|
|
326
320
|
```
|
|
327
321
|
|
|
@@ -369,21 +363,18 @@ connector.off('connectionUri', handler)
|
|
|
369
363
|
import type { UWCEventMap } from '@meshconnect/uwc-core'
|
|
370
364
|
|
|
371
365
|
// Narrowed per event:
|
|
372
|
-
connector.on('connecting',
|
|
373
|
-
connector.on('connected',
|
|
374
|
-
connector.on('disconnected',
|
|
366
|
+
connector.on('connecting', ({ connectionMode, walletId }) => {})
|
|
367
|
+
connector.on('connected', ({ session }) => {})
|
|
368
|
+
connector.on('disconnected', () => {})
|
|
375
369
|
connector.on('connectionUri', ({ uri, connectionMode }) => {})
|
|
376
|
-
connector.on(
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
)
|
|
380
|
-
connector.on('networkSwitched', ({ network }) => {})
|
|
381
|
-
connector.on('sessionChanged', ({ session }) => {})
|
|
370
|
+
connector.on('networkSwitching', ({ isLoading, isWaitingForUserApproval }) => {})
|
|
371
|
+
connector.on('networkSwitched', ({ network }) => {})
|
|
372
|
+
connector.on('sessionChanged', ({ session }) => {})
|
|
382
373
|
connector.on('capabilitiesUpdated', ({ capabilities }) => {})
|
|
383
|
-
connector.on('walletsDetected',
|
|
374
|
+
connector.on('walletsDetected', ({ wallets }) => {})
|
|
384
375
|
connector.on('ready', () => {})
|
|
385
376
|
connector.on('error', ({ error, operation }) => {})
|
|
386
|
-
connector.on('change', () => {})
|
|
377
|
+
connector.on('change', () => {}) // catch-all; no payload
|
|
387
378
|
```
|
|
388
379
|
|
|
389
380
|
### Legacy `subscribe()`
|
|
@@ -482,8 +473,8 @@ await connector.switchNetwork('eip155:8453') // Base
|
|
|
482
473
|
// Track loading for UI
|
|
483
474
|
connector.on('networkSwitching', ({ isLoading, isWaitingForUserApproval }) => {
|
|
484
475
|
if (isWaitingForUserApproval) showBanner('Approve in your wallet…')
|
|
485
|
-
else if (isLoading)
|
|
486
|
-
else
|
|
476
|
+
else if (isLoading) showBanner('Switching network…')
|
|
477
|
+
else hideBanner()
|
|
487
478
|
})
|
|
488
479
|
```
|
|
489
480
|
|
|
@@ -656,8 +647,8 @@ interface WalletError {
|
|
|
656
647
|
```
|
|
657
648
|
|
|
658
649
|
- `rejected` — user dismissed the prompt.
|
|
659
|
-
- `expired`
|
|
660
|
-
- `unknown`
|
|
650
|
+
- `expired` — WalletConnect pairing proposal timed out.
|
|
651
|
+
- `unknown` — everything else (network errors, bad wallet state, …).
|
|
661
652
|
|
|
662
653
|
### Per-call handling
|
|
663
654
|
|
|
@@ -679,20 +670,20 @@ try {
|
|
|
679
670
|
```ts
|
|
680
671
|
import type { UWCOperation } from '@meshconnect/uwc-core'
|
|
681
672
|
|
|
682
|
-
connector.on(
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
}
|
|
691
|
-
)
|
|
673
|
+
connector.on('error', ({ error, operation }: {
|
|
674
|
+
error: WalletError
|
|
675
|
+
operation: UWCOperation
|
|
676
|
+
}) => {
|
|
677
|
+
analytics.track('wallet.error', {
|
|
678
|
+
operation,
|
|
679
|
+
type: error.type,
|
|
680
|
+
message: error.message
|
|
681
|
+
})
|
|
682
|
+
})
|
|
692
683
|
```
|
|
693
684
|
|
|
694
685
|
`operation` is one of:
|
|
695
|
-
`'connect' | 'disconnect' | 'switchNetwork' | 'signMessage' | '
|
|
686
|
+
`'connect' | 'disconnect' | 'switchNetwork' | 'signMessage' | 'sendTransaction' | 'getWalletCapabilities' | 'initialize'`.
|
|
696
687
|
|
|
697
688
|
### AbortError
|
|
698
689
|
|
|
@@ -714,122 +705,6 @@ try {
|
|
|
714
705
|
|
|
715
706
|
---
|
|
716
707
|
|
|
717
|
-
## Logging & observability
|
|
718
|
-
|
|
719
|
-
UWC ships **no** third-party telemetry SDK. Instead it exposes two opt-in seams
|
|
720
|
-
you wire to whatever stack you run (Datadog, Amplitude, Segment, a plain
|
|
721
|
-
console). With neither configured, there is **zero external egress** — the
|
|
722
|
-
security-first default for a sign-only wallet layer.
|
|
723
|
-
|
|
724
|
-
### Logging
|
|
725
|
-
|
|
726
|
-
A pluggable, level-gated logger backs UWC's internal logging. Configure it via
|
|
727
|
-
`UWCConfig`:
|
|
728
|
-
|
|
729
|
-
```ts
|
|
730
|
-
const connector = new UniversalWalletConnector({
|
|
731
|
-
networks,
|
|
732
|
-
wallets,
|
|
733
|
-
logLevel: 'info', // console threshold; default 'warn'
|
|
734
|
-
logger: myAppLogger // optional: redirect output into your own logger
|
|
735
|
-
})
|
|
736
|
-
```
|
|
737
|
-
|
|
738
|
-
`logger` (any object with `debug`/`info`/`warn`/`error`) receives the raw
|
|
739
|
-
`(message, ...args)`; omit it and a console sink is used with an ISO/level prefix.
|
|
740
|
-
|
|
741
|
-
Tune the threshold at runtime — useful when triaging in a wallet's in-app
|
|
742
|
-
browser where you can't redeploy:
|
|
743
|
-
|
|
744
|
-
```ts
|
|
745
|
-
connector.setLogLevel('debug') // programmatic
|
|
746
|
-
window.UWC_DEBUG = true // or from the console: surfaces everything
|
|
747
|
-
window.UWC_DEBUG = 'info' // or a specific level (only ever lowers it)
|
|
748
|
-
```
|
|
749
|
-
|
|
750
|
-
### Observer (telemetry)
|
|
751
|
-
|
|
752
|
-
Implement `UWCObserver` to receive a normalized, PII-safe event stream plus all
|
|
753
|
-
log lines. The vendor code lives in **your** app, never in UWC:
|
|
754
|
-
|
|
755
|
-
```ts
|
|
756
|
-
import type { UWCObserver } from '@meshconnect/uwc-core'
|
|
757
|
-
|
|
758
|
-
const observer: UWCObserver = {
|
|
759
|
-
onEvent: e => datadogRum.addAction(`uwc.${e.name}`, e), // or amplitude.track / …
|
|
760
|
-
onLog: (level, message, args) =>
|
|
761
|
-
myAppLogger[level](`[uwc] ${message}`, ...args)
|
|
762
|
-
}
|
|
763
|
-
|
|
764
|
-
const connector = new UniversalWalletConnector({ networks, wallets, observer })
|
|
765
|
-
```
|
|
766
|
-
|
|
767
|
-
> **Keep `onEvent` / `onLog` non-blocking.** They are called synchronously on the
|
|
768
|
-
> wallet-operation path — a terminal event fires between the wallet returning a
|
|
769
|
-
> result and that result reaching your `await`, so a slow handler adds latency to
|
|
770
|
-
> connect / sign / sendTransaction. Queue-backed sinks (Datadog `addAction`,
|
|
771
|
-
> Segment `track`) are already non-blocking; for anything heavy, defer it yourself
|
|
772
|
-
> (`onEvent: e => queueMicrotask(() => …)`).
|
|
773
|
-
|
|
774
|
-
Every `onEvent` record is a `UWCTelemetryEvent` — only routing facets
|
|
775
|
-
(`operation`, `connectionMode`, `namespace`, `chainId`, `walletId`, `durationMs`,
|
|
776
|
-
outcome…) plus a `sdkSessionId` correlation id. By default `sdkSessionId` is a
|
|
777
|
-
generated per-instance id; pass `correlationId` (a string or getter) to align it
|
|
778
|
-
to your own session key (e.g. `link_sess_id`) so UWC events join your existing
|
|
779
|
-
Datadog/RUM telemetry without a separate mapping:
|
|
780
|
-
|
|
781
|
-
````ts
|
|
782
|
-
new UniversalWalletConnector({
|
|
783
|
-
...config,
|
|
784
|
-
observer,
|
|
785
|
-
correlationId: () => myLinkSession.id // resolved per-event; getter may be lazy/dynamic
|
|
786
|
-
})
|
|
787
|
-
``` **Structured fields
|
|
788
|
-
never carry a signing payload or wallet address** — the shape has no slot for
|
|
789
|
-
them. The two free-form surfaces (`error.message` and `onLog` args) additionally
|
|
790
|
-
pass through a key + content scrubber that redacts sensitive keys, EVM hex blobs
|
|
791
|
-
(addresses / signatures / keys), secret URL params, and bearer tokens. Note this
|
|
792
|
-
last pass is best-effort: a base58 (Solana) or TON address embedded in a
|
|
793
|
-
free-form error string is a documented gap (it can't be matched without
|
|
794
|
-
false-positives), so don't rely on it for non-EVM address redaction.
|
|
795
|
-
|
|
796
|
-
### Wallet-handoff funnel
|
|
797
|
-
|
|
798
|
-
The moment UWC hands control to a wallet (extension popup, WC deeplink, TON
|
|
799
|
-
sheet) it emits `awaitingWallet`; when the wallet answers it emits exactly one
|
|
800
|
-
terminal — all sharing a `handoffId` and carrying `durationMs`:
|
|
801
|
-
|
|
802
|
-
````
|
|
803
|
-
|
|
804
|
-
awaitingWallet ─┬─ walletSucceeded success
|
|
805
|
-
├─ walletRejected user said no (4001 / rejected)
|
|
806
|
-
└─ walletFailed any other error
|
|
807
|
-
|
|
808
|
-
````
|
|
809
|
-
|
|
810
|
-
A non-cancelling `walletTimedOut` marker also fires if a non-TON handoff is still
|
|
811
|
-
pending past `walletResponseTimeoutMs` (default 60s, `0` disables). It is purely
|
|
812
|
-
observational — it never rejects, aborts, or mutates state, and is cleared the
|
|
813
|
-
instant the op settles, so a fast op never false-fires it. This turns the
|
|
814
|
-
previously-blind connect/sign/approve window into a per-(chain × wallet × flow)
|
|
815
|
-
timed funnel.
|
|
816
|
-
|
|
817
|
-
> A failed or rejected op emits **both** a handoff terminal
|
|
818
|
-
> (`walletFailed` / `walletRejected`) **and** the back-compat `error` event. For
|
|
819
|
-
> failure metrics, count the handoff terminals and treat `error` as the legacy
|
|
820
|
-
> channel — counting both double-counts each failure.
|
|
821
|
-
|
|
822
|
-
### Teardown
|
|
823
|
-
|
|
824
|
-
Call `dispose()` on full logout to release observer subscriptions and clear all
|
|
825
|
-
listeners:
|
|
826
|
-
|
|
827
|
-
```ts
|
|
828
|
-
connector.dispose()
|
|
829
|
-
````
|
|
830
|
-
|
|
831
|
-
---
|
|
832
|
-
|
|
833
708
|
## Testing
|
|
834
709
|
|
|
835
710
|
The shared singleton can leak state between tests. Reset it in `beforeEach`:
|
|
@@ -851,9 +726,7 @@ When unit-testing consumer code, mock the whole module:
|
|
|
851
726
|
vi.mock('@meshconnect/uwc-core', () => ({
|
|
852
727
|
UniversalWalletConnector: class {
|
|
853
728
|
static getInstance = () => new this()
|
|
854
|
-
getSession = () => ({
|
|
855
|
-
/* fixture */
|
|
856
|
-
})
|
|
729
|
+
getSession = () => ({ /* fixture */ })
|
|
857
730
|
on = () => () => {}
|
|
858
731
|
once = () => () => {}
|
|
859
732
|
off = () => {}
|
|
@@ -884,12 +757,12 @@ connector.on('sessionChanged', ({ session }) => {
|
|
|
884
757
|
session.activeAddress ?? 'not connected'
|
|
885
758
|
})
|
|
886
759
|
|
|
887
|
-
document
|
|
888
|
-
.
|
|
889
|
-
|
|
890
|
-
document
|
|
891
|
-
.
|
|
892
|
-
|
|
760
|
+
document.querySelector('#connect')!.addEventListener('click', () =>
|
|
761
|
+
connector.connect('injected', 'metamask')
|
|
762
|
+
)
|
|
763
|
+
document.querySelector('#disconnect')!.addEventListener('click', () =>
|
|
764
|
+
connector.disconnect()
|
|
765
|
+
)
|
|
893
766
|
```
|
|
894
767
|
|
|
895
768
|
### Show QR and auto-close modal on pair
|
|
@@ -932,9 +805,7 @@ const controller = new AbortController()
|
|
|
932
805
|
window.addEventListener('beforeunload', () => controller.abort())
|
|
933
806
|
|
|
934
807
|
try {
|
|
935
|
-
const sig = await connector.signMessage('Sign in', {
|
|
936
|
-
signal: controller.signal
|
|
937
|
-
})
|
|
808
|
+
const sig = await connector.signMessage('Sign in', { signal: controller.signal })
|
|
938
809
|
submitLogin(sig)
|
|
939
810
|
} catch (error) {
|
|
940
811
|
if ((error as { name?: string }).name === 'AbortError') return
|
|
@@ -957,12 +828,6 @@ export interface UWCConfig {
|
|
|
957
828
|
walletConnectConfig?: WalletConnectConfig
|
|
958
829
|
tonConnectConfig?: TonConnectConfig
|
|
959
830
|
tronConnectorConfig?: TronConnectorConfig
|
|
960
|
-
// Observability (all optional; defaults preserve current behaviour)
|
|
961
|
-
observer?: UWCObserver // vendor-agnostic telemetry sink; default = no egress
|
|
962
|
-
logger?: Logger // redirect internal logging; default = console
|
|
963
|
-
logLevel?: LogLevel // console threshold; default 'warn'
|
|
964
|
-
walletResponseTimeoutMs?: number // walletTimedOut deadline; default 60_000, 0 disables
|
|
965
|
-
correlationId?: string | (() => string) // align sdkSessionId to your session key
|
|
966
831
|
}
|
|
967
832
|
|
|
968
833
|
export interface OperationOptions {
|
|
@@ -971,15 +836,9 @@ export interface OperationOptions {
|
|
|
971
836
|
|
|
972
837
|
export type UWCEventName = keyof UWCEventMap
|
|
973
838
|
export type UWCOperation =
|
|
974
|
-
| 'connect'
|
|
975
|
-
| '
|
|
976
|
-
| '
|
|
977
|
-
| 'signMessage'
|
|
978
|
-
| 'signTypedData'
|
|
979
|
-
| 'sendTransaction'
|
|
980
|
-
| 'signSolanaTransaction'
|
|
981
|
-
| 'getWalletCapabilities'
|
|
982
|
-
| 'initialize'
|
|
839
|
+
| 'connect' | 'disconnect' | 'switchNetwork'
|
|
840
|
+
| 'signMessage' | 'sendTransaction'
|
|
841
|
+
| 'getWalletCapabilities' | 'initialize'
|
|
983
842
|
```
|
|
984
843
|
|
|
985
844
|
### Static methods
|
|
@@ -1020,10 +879,6 @@ getNetworkSwitchLoadingState(): {
|
|
|
1020
879
|
getActiveWalletCapabilities(): Record<string, EVMCapabilities> | null
|
|
1021
880
|
isConnectionModeAvailable(mode: ConnectionMode, walletId: string): boolean
|
|
1022
881
|
|
|
1023
|
-
// Observability
|
|
1024
|
-
setLogLevel(level: LogLevel): void // tune the console threshold at runtime
|
|
1025
|
-
dispose(): void // release observer subs + clear listeners
|
|
1026
|
-
|
|
1027
882
|
// Events
|
|
1028
883
|
on<K extends UWCEventName>(event: K, listener: UWCEventListener<K>): () => void
|
|
1029
884
|
once<K extends UWCEventName>(event: K, listener: UWCEventListener<K>): () => void
|
package/dist/events.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
import type { Session, Network, WalletMetadata, ConnectionMode, WalletError, EVMCapabilities
|
|
1
|
+
import type { Session, Network, WalletMetadata, ConnectionMode, WalletError, EVMCapabilities } from '@meshconnect/uwc-types';
|
|
2
2
|
/**
|
|
3
3
|
* User-initiated operations that can surface through the `error` event.
|
|
4
4
|
*/
|
|
5
|
-
export type UWCOperation = 'connect' | 'disconnect' | 'switchNetwork' | 'signMessage' | '
|
|
5
|
+
export type UWCOperation = 'connect' | 'disconnect' | 'switchNetwork' | 'signMessage' | 'sendTransaction' | 'getWalletCapabilities' | 'initialize';
|
|
6
6
|
/**
|
|
7
7
|
* Typed event map emitted by UniversalWalletConnector.
|
|
8
8
|
*
|
|
@@ -60,79 +60,12 @@ export interface UWCEventMap {
|
|
|
60
60
|
error: WalletError;
|
|
61
61
|
operation: UWCOperation;
|
|
62
62
|
};
|
|
63
|
-
/**
|
|
64
|
-
* A line emitted through the internal `Logger`. Fires for ALL levels regardless
|
|
65
|
-
* of the console threshold so an observer can capture `debug`/`info` even when
|
|
66
|
-
* the console is quiet. `args` is scrubbed before reaching `observer.onLog`.
|
|
67
|
-
*/
|
|
68
|
-
log: {
|
|
69
|
-
level: LogLevel;
|
|
70
|
-
message: string;
|
|
71
|
-
args: unknown[];
|
|
72
|
-
};
|
|
73
|
-
/**
|
|
74
|
-
* Emitted immediately BEFORE control is handed to the wallet for a boundary op
|
|
75
|
-
* (the moment the blind window opens). Pair with exactly one terminal event via
|
|
76
|
-
* `handoffId`. Carries no signing payload and no address — only routing facets.
|
|
77
|
-
*/
|
|
78
|
-
awaitingWallet: {
|
|
79
|
-
operation: UWCOperation;
|
|
80
|
-
connectionMode: ConnectionMode;
|
|
81
|
-
walletId?: string | undefined;
|
|
82
|
-
/** CAIP namespace (eip155 | solana | tron | tvm …) — not an address. */
|
|
83
|
-
namespace?: Namespace | undefined;
|
|
84
|
-
/** CAIP chain id (e.g. `eip155:1`) — not an address. */
|
|
85
|
-
chainId?: NetworkId | undefined;
|
|
86
|
-
handoffId: string;
|
|
87
|
-
/** Derived, best-effort flow taxonomy (heuristic — see deriveWalletFlowType). */
|
|
88
|
-
walletFlowType: WalletFlowType;
|
|
89
|
-
/** Coarse runtime surface (heuristic — see derivePlatform). */
|
|
90
|
-
platform: Platform;
|
|
91
|
-
timestamp: number;
|
|
92
|
-
};
|
|
93
|
-
/** The wallet resolved the op successfully. Closes a handoff. */
|
|
94
|
-
walletSucceeded: {
|
|
95
|
-
handoffId: string;
|
|
96
|
-
operation: UWCOperation;
|
|
97
|
-
durationMs: number;
|
|
98
|
-
};
|
|
99
|
-
/** The user explicitly rejected (4001 / WalletError.type === 'rejected'). Closes a handoff. */
|
|
100
|
-
walletRejected: {
|
|
101
|
-
handoffId: string;
|
|
102
|
-
operation: UWCOperation;
|
|
103
|
-
durationMs: number;
|
|
104
|
-
};
|
|
105
|
-
/** The op failed for any non-rejection reason. Closes a handoff. */
|
|
106
|
-
walletFailed: {
|
|
107
|
-
handoffId: string;
|
|
108
|
-
operation: UWCOperation;
|
|
109
|
-
durationMs: number;
|
|
110
|
-
error: WalletError;
|
|
111
|
-
};
|
|
112
|
-
/**
|
|
113
|
-
* Side marker: the deadline passed with the op still pending. OBSERVATIONAL —
|
|
114
|
-
* it does NOT reject, abort, or mutate state; the wallet may still complete and
|
|
115
|
-
* produce the real terminal. Never fires for an op that settled before the
|
|
116
|
-
* deadline. Not itself a terminal.
|
|
117
|
-
*/
|
|
118
|
-
walletTimedOut: {
|
|
119
|
-
handoffId: string;
|
|
120
|
-
operation: UWCOperation;
|
|
121
|
-
durationMs: number;
|
|
122
|
-
};
|
|
123
63
|
/**
|
|
124
64
|
* Back-compat catch-all. Fires after every other event above.
|
|
125
65
|
* New code should prefer the specific events.
|
|
126
66
|
*/
|
|
127
67
|
change: void;
|
|
128
68
|
}
|
|
129
|
-
/**
|
|
130
|
-
* Events that describe telemetry rather than a state change. `EventManager.emit`
|
|
131
|
-
* skips the legacy `change` cascade for these so high-frequency logging / handoff
|
|
132
|
-
* instrumentation can't trigger React re-renders through `subscribe()`.
|
|
133
|
-
*/
|
|
134
|
-
export declare const TELEMETRY_ONLY_EVENTS: ReadonlySet<UWCEventName>;
|
|
135
69
|
export type UWCEventName = keyof UWCEventMap;
|
|
136
70
|
export type UWCEventListener<K extends UWCEventName> = (data: UWCEventMap[K]) => void;
|
|
137
|
-
export declare const UWC_EVENT_NAMES: UWCEventName[];
|
|
138
71
|
//# sourceMappingURL=events.d.ts.map
|
package/dist/events.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,WAAW,EACX,eAAe,
|
|
1
|
+
{"version":3,"file":"events.d.ts","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,OAAO,EACP,cAAc,EACd,cAAc,EACd,WAAW,EACX,eAAe,EAChB,MAAM,wBAAwB,CAAA;AAE/B;;GAEG;AACH,MAAM,MAAM,YAAY,GACpB,SAAS,GACT,YAAY,GACZ,eAAe,GACf,aAAa,GACb,iBAAiB,GACjB,uBAAuB,GACvB,YAAY,CAAA;AAEhB;;;;;;;;GAQG;AACH,MAAM,WAAW,WAAW;IAC1B,kFAAkF;IAClF,KAAK,EAAE,IAAI,CAAA;IACX,mEAAmE;IACnE,eAAe,EAAE;QAAE,OAAO,EAAE,cAAc,EAAE,CAAA;KAAE,CAAA;IAE9C,+BAA+B;IAC/B,UAAU,EAAE;QAAE,cAAc,EAAE,cAAc,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAA;IAChE,0CAA0C;IAC1C,SAAS,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAA;IAC/B,4DAA4D;IAC5D,YAAY,EAAE,IAAI,CAAA;IAClB;;;OAGG;IACH,aAAa,EAAE;QAAE,GAAG,EAAE,MAAM,CAAC;QAAC,cAAc,EAAE,cAAc,CAAA;KAAE,CAAA;IAE9D,sEAAsE;IACtE,cAAc,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAA;IAEpC,gEAAgE;IAChE,gBAAgB,EAAE;QAAE,SAAS,EAAE,OAAO,CAAC;QAAC,wBAAwB,EAAE,OAAO,CAAA;KAAE,CAAA;IAC3E,gCAAgC;IAChC,eAAe,EAAE;QAAE,OAAO,EAAE,OAAO,CAAA;KAAE,CAAA;IAErC,0CAA0C;IAC1C,mBAAmB,EAAE;QAAE,YAAY,EAAE,MAAM,CAAC,MAAM,EAAE,eAAe,CAAC,CAAA;KAAE,CAAA;IAEtE,yCAAyC;IACzC,KAAK,EAAE;QAAE,KAAK,EAAE,WAAW,CAAC;QAAC,SAAS,EAAE,YAAY,CAAA;KAAE,CAAA;IAEtD;;;OAGG;IACH,MAAM,EAAE,IAAI,CAAA;CACb;AAED,MAAM,MAAM,YAAY,GAAG,MAAM,WAAW,CAAA;AAC5C,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,YAAY,IAAI,CACrD,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,KACjB,IAAI,CAAA"}
|
package/dist/events.js
CHANGED
|
@@ -1,41 +1,2 @@
|
|
|
1
|
-
|
|
2
|
-
* Events that describe telemetry rather than a state change. `EventManager.emit`
|
|
3
|
-
* skips the legacy `change` cascade for these so high-frequency logging / handoff
|
|
4
|
-
* instrumentation can't trigger React re-renders through `subscribe()`.
|
|
5
|
-
*/
|
|
6
|
-
export const TELEMETRY_ONLY_EVENTS = new Set([
|
|
7
|
-
'log',
|
|
8
|
-
'awaitingWallet',
|
|
9
|
-
'walletSucceeded',
|
|
10
|
-
'walletRejected',
|
|
11
|
-
'walletFailed',
|
|
12
|
-
'walletTimedOut'
|
|
13
|
-
]);
|
|
14
|
-
/**
|
|
15
|
-
* Runtime list of every event name. The `Record<UWCEventName, true>` literal
|
|
16
|
-
* forces this to stay exhaustive — adding an event to `UWCEventMap` without
|
|
17
|
-
* listing it here is a compile error — so the observer bridge can never silently
|
|
18
|
-
* drop a new event.
|
|
19
|
-
*/
|
|
20
|
-
const EVENT_NAME_FLAGS = {
|
|
21
|
-
ready: true,
|
|
22
|
-
walletsDetected: true,
|
|
23
|
-
connecting: true,
|
|
24
|
-
connected: true,
|
|
25
|
-
disconnected: true,
|
|
26
|
-
connectionUri: true,
|
|
27
|
-
sessionChanged: true,
|
|
28
|
-
networkSwitching: true,
|
|
29
|
-
networkSwitched: true,
|
|
30
|
-
capabilitiesUpdated: true,
|
|
31
|
-
error: true,
|
|
32
|
-
log: true,
|
|
33
|
-
awaitingWallet: true,
|
|
34
|
-
walletSucceeded: true,
|
|
35
|
-
walletRejected: true,
|
|
36
|
-
walletFailed: true,
|
|
37
|
-
walletTimedOut: true,
|
|
38
|
-
change: true
|
|
39
|
-
};
|
|
40
|
-
export const UWC_EVENT_NAMES = Object.keys(EVENT_NAME_FLAGS);
|
|
1
|
+
export {};
|
|
41
2
|
//# sourceMappingURL=events.js.map
|
package/dist/events.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"events.js","sourceRoot":"","sources":["../src/events.ts"],"names":[],"mappings":""}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,6 +1,4 @@
|
|
|
1
1
|
export { UniversalWalletConnector, type UWCConfig, type OperationOptions } from './universal-wallet-connector';
|
|
2
2
|
export type { UWCEventMap, UWCEventName, UWCEventListener, UWCOperation } from './events';
|
|
3
|
-
export { createLogger, type ManagedLogger, type CreateLoggerOptions } from './logger/create-logger';
|
|
4
|
-
export type { UWCObserver, UWCTelemetryEvent } from './observability/telemetry';
|
|
5
3
|
export { toBaseUnits } from './utils/to-base-units';
|
|
6
4
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAA;AACrC,YAAY,EACV,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACb,MAAM,UAAU,CAAA;AACjB,OAAO,
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EACxB,KAAK,SAAS,EACd,KAAK,gBAAgB,EACtB,MAAM,8BAA8B,CAAA;AACrC,YAAY,EACV,WAAW,EACX,YAAY,EACZ,gBAAgB,EAChB,YAAY,EACb,MAAM,UAAU,CAAA;AACjB,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA"}
|
package/dist/index.js
CHANGED
package/dist/index.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAGzB,MAAM,8BAA8B,CAAA;AAOrC,OAAO,
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,wBAAwB,EAGzB,MAAM,8BAA8B,CAAA;AAOrC,OAAO,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-manager.d.ts","sourceRoot":"","sources":["../../src/managers/event-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;
|
|
1
|
+
{"version":3,"file":"event-manager.d.ts","sourceRoot":"","sources":["../../src/managers/event-manager.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,WAAW,CAAA;AAE5E,KAAK,cAAc,GAAG,MAAM,IAAI,CAAA;AAGhC;;;;;;GAMG;AACH,qBAAa,YAAY;IACvB,OAAO,CAAC,SAAS,CAAqD;IAEtE,mEAAmE;IACnE,EAAE,CAAC,CAAC,SAAS,YAAY,EACvB,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC5B,MAAM,IAAI;IAUb,wEAAwE;IACxE,IAAI,CAAC,CAAC,SAAS,YAAY,EACzB,KAAK,EAAE,CAAC,EACR,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAC5B,MAAM,IAAI;IAQb,GAAG,CAAC,CAAC,SAAS,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,QAAQ,EAAE,gBAAgB,CAAC,CAAC,CAAC,GAAG,IAAI;IAK1E,IAAI,CAAC,CAAC,SAAS,YAAY,EAAE,KAAK,EAAE,CAAC,EAAE,IAAI,EAAE,WAAW,CAAC,CAAC,CAAC,GAAG,IAAI;IAOlE,OAAO,CAAC,QAAQ;IAkBhB;;;OAGG;IACH,SAAS,CAAC,QAAQ,EAAE,cAAc,GAAG,MAAM,IAAI;IAI/C,kFAAkF;IAClF,MAAM,IAAI,IAAI;IAId,gBAAgB,IAAI,MAAM;IAQ1B,iBAAiB,IAAI,IAAI;CAG1B"}
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { TELEMETRY_ONLY_EVENTS } from '../events';
|
|
2
1
|
/**
|
|
3
2
|
* Typed event emitter used by UniversalWalletConnector.
|
|
4
3
|
*
|
|
@@ -32,10 +31,7 @@ export class EventManager {
|
|
|
32
31
|
}
|
|
33
32
|
emit(event, data) {
|
|
34
33
|
this.dispatch(event, data);
|
|
35
|
-
|
|
36
|
-
// happened, not a state change — don't cascade them to `change`, or every
|
|
37
|
-
// log line would trigger a React re-render via legacy `subscribe()`.
|
|
38
|
-
if (event !== 'change' && !TELEMETRY_ONLY_EVENTS.has(event)) {
|
|
34
|
+
if (event !== 'change') {
|
|
39
35
|
this.dispatch('change', undefined);
|
|
40
36
|
}
|
|
41
37
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"event-manager.js","sourceRoot":"","sources":["../../src/managers/event-manager.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"event-manager.js","sourceRoot":"","sources":["../../src/managers/event-manager.ts"],"names":[],"mappings":"AAKA;;;;;;GAMG;AACH,MAAM,OAAO,YAAY;IACf,SAAS,GAA4C,IAAI,GAAG,EAAE,CAAA;IAEtE,mEAAmE;IACnE,EAAE,CACA,KAAQ,EACR,QAA6B;QAE7B,IAAI,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACnC,IAAI,CAAC,GAAG,EAAE,CAAC;YACT,GAAG,GAAG,IAAI,GAAG,EAAE,CAAA;YACf,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,EAAE,GAAG,CAAC,CAAA;QAChC,CAAC;QACD,GAAG,CAAC,GAAG,CAAC,QAA2B,CAAC,CAAA;QACpC,OAAO,GAAG,EAAE,CAAC,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAA;IACxC,CAAC;IAED,wEAAwE;IACxE,IAAI,CACF,KAAQ,EACR,QAA6B;QAE7B,MAAM,OAAO,GAAwB,IAAI,CAAC,EAAE;YAC1C,IAAI,CAAC,GAAG,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;YACxB,QAAQ,CAAC,IAAI,CAAC,CAAA;QAChB,CAAC,CAAA;QACD,OAAO,IAAI,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,CAAC,CAAA;IAChC,CAAC;IAED,GAAG,CAAyB,KAAQ,EAAE,QAA6B;QACjE,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACrC,GAAG,EAAE,MAAM,CAAC,QAA2B,CAAC,CAAA;IAC1C,CAAC;IAED,IAAI,CAAyB,KAAQ,EAAE,IAAoB;QACzD,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,IAAI,CAAC,CAAA;QAC1B,IAAI,KAAK,KAAK,QAAQ,EAAE,CAAC;YACvB,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAkC,CAAC,CAAA;QAC7D,CAAC;IACH,CAAC;IAEO,QAAQ,CACd,KAAQ,EACR,IAAoB;QAEpB,MAAM,GAAG,GAAG,IAAI,CAAC,SAAS,CAAC,GAAG,CAAC,KAAK,CAAC,CAAA;QACrC,IAAI,CAAC,GAAG,IAAI,GAAG,CAAC,IAAI,KAAK,CAAC;YAAE,OAAM;QAClC,mDAAmD;QACnD,KAAK,MAAM,QAAQ,IAAI,CAAC,GAAG,GAAG,CAAC,EAAE,CAAC;YAChC,IAAI,CAAC;gBACH,QAAQ,CAAC,IAAI,CAAC,CAAA;YAChB,CAAC;YAAC,MAAM,CAAC;gBACP,iEAAiE;YACnE,CAAC;QACH,CAAC;IACH,CAAC;IAED,oEAAoE;IAEpE;;;OAGG;IACH,SAAS,CAAC,QAAwB;QAChC,OAAO,IAAI,CAAC,EAAE,CAAC,QAAQ,EAAE,QAAQ,CAAC,CAAA;IACpC,CAAC;IAED,kFAAkF;IAClF,MAAM;QACJ,IAAI,CAAC,QAAQ,CAAC,QAAQ,EAAE,SAAkC,CAAC,CAAA;IAC7D,CAAC;IAED,gBAAgB;QACd,IAAI,KAAK,GAAG,CAAC,CAAA;QACb,KAAK,MAAM,GAAG,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,EAAE,EAAE,CAAC;YAC1C,KAAK,IAAI,GAAG,CAAC,IAAI,CAAA;QACnB,CAAC;QACD,OAAO,KAAK,CAAA;IACd,CAAC;IAED,iBAAiB;QACf,IAAI,CAAC,SAAS,CAAC,KAAK,EAAE,CAAA;IACxB,CAAC;CACF"}
|
|
@@ -11,9 +11,8 @@ export declare class ConnectionService {
|
|
|
11
11
|
private connectors;
|
|
12
12
|
private usingIntegratedBrowser;
|
|
13
13
|
private eventManager;
|
|
14
|
-
private walletResponseTimeoutMs;
|
|
15
14
|
private activeConnector;
|
|
16
|
-
constructor(networks: Network[], wallets: WalletMetadata[], sessionManager: SessionManager, connectors: Map<ConnectionMode, Connector>, usingIntegratedBrowser: boolean, eventManager: EventManager
|
|
15
|
+
constructor(networks: Network[], wallets: WalletMetadata[], sessionManager: SessionManager, connectors: Map<ConnectionMode, Connector>, usingIntegratedBrowser: boolean, eventManager: EventManager);
|
|
17
16
|
connect(connectionMode: ConnectionMode, walletId: string, networkId?: NetworkId, options?: ServiceOptions): Promise<void>;
|
|
18
17
|
private connectWithURIPoll;
|
|
19
18
|
private getConnector;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"connection-service.d.ts","sourceRoot":"","sources":["../../src/services/connection-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,cAAc,EACd,cAAc,EACd,SAAS,EAMV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;
|
|
1
|
+
{"version":3,"file":"connection-service.d.ts","sourceRoot":"","sources":["../../src/services/connection-service.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,OAAO,EACP,SAAS,EACT,cAAc,EACd,cAAc,EACd,SAAS,EAMV,MAAM,wBAAwB,CAAA;AAC/B,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAA;AACjE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2BAA2B,CAAA;AAG7D,MAAM,WAAW,cAAc;IAC7B,MAAM,CAAC,EAAE,WAAW,CAAA;CACrB;AAED,qBAAa,iBAAiB;IAI1B,OAAO,CAAC,QAAQ;IAChB,OAAO,CAAC,OAAO;IACf,OAAO,CAAC,cAAc;IACtB,OAAO,CAAC,UAAU;IAClB,OAAO,CAAC,sBAAsB;IAC9B,OAAO,CAAC,YAAY;IARtB,OAAO,CAAC,eAAe,CAAyB;gBAGtC,QAAQ,EAAE,OAAO,EAAE,EACnB,OAAO,EAAE,cAAc,EAAE,EACzB,cAAc,EAAE,cAAc,EAC9B,UAAU,EAAE,GAAG,CAAC,cAAc,EAAE,SAAS,CAAC,EAC1C,sBAAsB,EAAE,OAAO,EAC/B,YAAY,EAAE,YAAY;IAG9B,OAAO,CACX,cAAc,EAAE,cAAc,EAC9B,QAAQ,EAAE,MAAM,EAChB,SAAS,CAAC,EAAE,SAAS,EACrB,OAAO,CAAC,EAAE,cAAc,GACvB,OAAO,CAAC,IAAI,CAAC;YAuFF,kBAAkB;IAqDhC,OAAO,CAAC,YAAY;IAUpB,OAAO,CAAC,UAAU;IAQlB,OAAO,CAAC,kBAAkB;IA2C1B,OAAO,CAAC,2BAA2B;IA6C7B,UAAU,CAAC,OAAO,CAAC,EAAE,cAAc,GAAG,OAAO,CAAC,IAAI,CAAC;IAkBzD,gBAAgB,IAAI,MAAM,GAAG,SAAS;IAiBtC,UAAU,IAAI,cAAc,EAAE;IAI9B,aAAa,CAAC,OAAO,EAAE,cAAc,EAAE,GAAG,IAAI;IAI9C,WAAW,IAAI,OAAO,EAAE;IAIxB;;;;;;;;;;;;OAYG;IACH,OAAO,CAAC,wBAAwB;CAiBjC"}
|