@portal-hq/provider 3.0.4 → 3.0.5

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.
@@ -9,8 +9,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
9
9
  });
10
10
  };
11
11
  Object.defineProperty(exports, "__esModule", { value: true });
12
- const react_native_1 = require("react-native");
13
12
  const utils_1 = require("@portal-hq/utils");
13
+ const react_native_1 = require("react-native");
14
14
  class MpcSigner {
15
15
  get address() {
16
16
  return this.keychain.getAddress(this.isSimulator);
@@ -7,8 +7,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { NativeModules } from 'react-native';
11
10
  import { PortalMpcError, } from '@portal-hq/utils';
11
+ import { NativeModules } from 'react-native';
12
12
  class MpcSigner {
13
13
  get address() {
14
14
  return this.keychain.getAddress(this.isSimulator);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@portal-hq/provider",
3
- "version": "3.0.4",
3
+ "version": "3.0.5",
4
4
  "license": "MIT",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/esm/index",
@@ -19,8 +19,8 @@
19
19
  "test": "jest"
20
20
  },
21
21
  "dependencies": {
22
- "@portal-hq/connect": "^3.0.4",
23
- "@portal-hq/utils": "^3.0.4"
22
+ "@portal-hq/connect": "^3.0.5",
23
+ "@portal-hq/utils": "^3.0.5"
24
24
  },
25
25
  "devDependencies": {
26
26
  "@babel/preset-typescript": "^7.18.6",
@@ -30,5 +30,5 @@
30
30
  "ts-jest": "^29.0.3",
31
31
  "typescript": "^4.8.4"
32
32
  },
33
- "gitHead": "06ea78f34f46124827901f7a55b9a3dc761a5172"
33
+ "gitHead": "58faddeac81625fcb230357540e7f4663f8c810c"
34
34
  }
@@ -1,3 +1,4 @@
1
+ import PortalConnect from '@portal-hq/connect'
1
2
  import {
2
3
  Events,
3
4
  HttpRequester,
@@ -10,8 +11,8 @@ import {
10
11
  type RequestArguments,
11
12
  RpcErrorCodes,
12
13
  } from '@portal-hq/utils'
14
+ import { RpcErrorOptions } from '@portal-hq/utils/types'
13
15
 
14
- import { MpcSigner, Signer } from '../signers'
15
16
  import {
16
17
  type EventHandler,
17
18
  type GatewayLike,
@@ -19,8 +20,7 @@ import {
19
20
  type RegisteredEventHandler,
20
21
  type SwitchEthereumChainParameter,
21
22
  } from '../../types'
22
- import PortalConnect from '@portal-hq/connect'
23
- import { RpcErrorOptions } from '@portal-hq/utils/types'
23
+ import { MpcSigner, Signer } from '../signers'
24
24
 
25
25
  const passiveSignerMethods = [
26
26
  'eth_accounts',
@@ -1,10 +1,11 @@
1
1
  import { SigningRequestArguments } from '@portal-hq/utils'
2
+
2
3
  import { type SignResult } from '../../types'
3
4
 
4
5
  abstract class Signer {
5
6
  public sign(_: SigningRequestArguments, __?: any): Promise<SignResult> {
6
7
  throw new Error(
7
- '[Portal] sign() method must be implemented in a subclass of Signer'
8
+ '[Portal] sign() method must be implemented in a subclass of Signer',
8
9
  )
9
10
  }
10
11
  }
@@ -1,20 +1,19 @@
1
- import { NativeModules } from 'react-native'
1
+ import { FeatureFlags } from '@portal-hq/core/types'
2
2
  import {
3
3
  IPortalProvider,
4
4
  KeychainAdapter,
5
5
  PortalMpcError,
6
6
  type SigningRequestArguments,
7
7
  } from '@portal-hq/utils'
8
-
9
- import Signer from './abstract'
8
+ import { NativeModules } from 'react-native'
10
9
 
11
10
  import {
12
- PortalMobileMpcMetadata,
13
11
  type MpcSignerOptions,
14
12
  type PortalMobileMpc,
13
+ PortalMobileMpcMetadata,
15
14
  type SigningResponse,
16
15
  } from '../../types'
17
- import { FeatureFlags } from '@portal-hq/core/types'
16
+ import Signer from './abstract'
18
17
 
19
18
  class MpcSigner implements Signer {
20
19
  private isSimulator: boolean
package/types.d.ts CHANGED
@@ -1,5 +1,4 @@
1
1
  // Types
2
-
3
2
  import PortalConnect from '@portal-hq/connect'
4
3
  import { BackupMethods } from '@portal-hq/core'
5
4
  import { KeychainAdapter, type PortalError } from '@portal-hq/utils'