@portal-hq/connect 2.0.10 → 2.0.11

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.
@@ -12,6 +12,16 @@ Object.defineProperty(exports, "__esModule", { value: true });
12
12
  exports.ConnectionStates = exports.ConnectError = void 0;
13
13
  const provider_1 = require("@portal-hq/provider");
14
14
  class PortalConnect {
15
+ get address() {
16
+ return this.provider.address;
17
+ }
18
+ get chainId() {
19
+ return this.provider.chainId;
20
+ }
21
+ get connected() {
22
+ return (this.connectionState === ConnectionStates.CONNECTED ||
23
+ this.connectionState === ConnectionStates.CONNECTING);
24
+ }
15
25
  constructor({ apiKey, chainId, keychain, gatewayConfig,
16
26
  // Optional
17
27
  isSimulator = false, autoApprove = false, version = 'v5', apiHost = 'api.portalhq.io', mpcHost = 'mpc.portalhq.io', webSocketServer = 'connect.portalhq.io', }) {
@@ -60,16 +70,6 @@ class PortalConnect {
60
70
  this.handleSessionRequest = this.handleSessionRequest.bind(this);
61
71
  this.handleSigningRejected = this.handleSigningRejected.bind(this);
62
72
  }
63
- get address() {
64
- return this.provider.address;
65
- }
66
- get chainId() {
67
- return this.provider.chainId;
68
- }
69
- get connected() {
70
- return (this.connectionState === ConnectionStates.CONNECTED ||
71
- this.connectionState === ConnectionStates.CONNECTING);
72
- }
73
73
  /**
74
74
  * Establishes a websocket connection with the Connect Proxy and dispatches the binding
75
75
  * of websocket events for the newly established socket
package/lib/esm/index.js CHANGED
@@ -9,6 +9,16 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  };
10
10
  import { Provider } from '@portal-hq/provider';
11
11
  class PortalConnect {
12
+ get address() {
13
+ return this.provider.address;
14
+ }
15
+ get chainId() {
16
+ return this.provider.chainId;
17
+ }
18
+ get connected() {
19
+ return (this.connectionState === ConnectionStates.CONNECTED ||
20
+ this.connectionState === ConnectionStates.CONNECTING);
21
+ }
12
22
  constructor({ apiKey, chainId, keychain, gatewayConfig,
13
23
  // Optional
14
24
  isSimulator = false, autoApprove = false, version = 'v5', apiHost = 'api.portalhq.io', mpcHost = 'mpc.portalhq.io', webSocketServer = 'connect.portalhq.io', }) {
@@ -57,16 +67,6 @@ class PortalConnect {
57
67
  this.handleSessionRequest = this.handleSessionRequest.bind(this);
58
68
  this.handleSigningRejected = this.handleSigningRejected.bind(this);
59
69
  }
60
- get address() {
61
- return this.provider.address;
62
- }
63
- get chainId() {
64
- return this.provider.chainId;
65
- }
66
- get connected() {
67
- return (this.connectionState === ConnectionStates.CONNECTED ||
68
- this.connectionState === ConnectionStates.CONNECTING);
69
- }
70
70
  /**
71
71
  * Establishes a websocket connection with the Connect Proxy and dispatches the binding
72
72
  * of websocket events for the newly established socket
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portal-hq/connect",
3
- "version": "2.0.10",
3
+ "version": "2.0.11",
4
4
  "main": "lib/commonjs/index",
5
5
  "module": "lib/esm/index",
6
6
  "source": "src/index",
@@ -32,5 +32,5 @@
32
32
  "react": "*",
33
33
  "react-native": "*"
34
34
  },
35
- "gitHead": "9614b8afc13c4cb0a7a6dba7df276de6a690bba9"
35
+ "gitHead": "4d2140adec1afe2a882f825bbf958434ab7d180b"
36
36
  }