@portal-hq/provider 2.0.9 → 2.0.10
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.
|
@@ -32,7 +32,7 @@ class Provider {
|
|
|
32
32
|
// Required
|
|
33
33
|
apiKey, chainId, keychain, gatewayConfig,
|
|
34
34
|
// Optional
|
|
35
|
-
isSimulator = false, autoApprove = false, apiHost = 'api.portalhq.io', mpcHost = 'mpc.portalhq.io', version = '
|
|
35
|
+
isSimulator = false, autoApprove = false, apiHost = 'api.portalhq.io', mpcHost = 'mpc.portalhq.io', version = 'v5', featureFlags = { optimized: false }, }) {
|
|
36
36
|
// Handle required fields
|
|
37
37
|
if (!apiKey || apiKey.length === 0) {
|
|
38
38
|
throw new utils_1.InvalidApiKeyError();
|
|
@@ -12,8 +12,8 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
12
12
|
const react_native_1 = require("react-native");
|
|
13
13
|
const utils_1 = require("@portal-hq/utils");
|
|
14
14
|
class MpcSigner {
|
|
15
|
-
constructor({ keychain, isSimulator = false, mpcHost = 'mpc.portalhq.io', version = '
|
|
16
|
-
this.version = '
|
|
15
|
+
constructor({ keychain, isSimulator = false, mpcHost = 'mpc.portalhq.io', version = 'v5', featureFlags = { optimized: false }, }) {
|
|
16
|
+
this.version = 'v5';
|
|
17
17
|
this.buildParams = (method, txParams) => {
|
|
18
18
|
let params = txParams;
|
|
19
19
|
switch (method) {
|
|
@@ -30,7 +30,7 @@ class Provider {
|
|
|
30
30
|
// Required
|
|
31
31
|
apiKey, chainId, keychain, gatewayConfig,
|
|
32
32
|
// Optional
|
|
33
|
-
isSimulator = false, autoApprove = false, apiHost = 'api.portalhq.io', mpcHost = 'mpc.portalhq.io', version = '
|
|
33
|
+
isSimulator = false, autoApprove = false, apiHost = 'api.portalhq.io', mpcHost = 'mpc.portalhq.io', version = 'v5', featureFlags = { optimized: false }, }) {
|
|
34
34
|
// Handle required fields
|
|
35
35
|
if (!apiKey || apiKey.length === 0) {
|
|
36
36
|
throw new InvalidApiKeyError();
|
package/lib/esm/signers/mpc.js
CHANGED
|
@@ -10,8 +10,8 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
10
10
|
import { NativeModules } from 'react-native';
|
|
11
11
|
import { PortalMpcError, } from '@portal-hq/utils';
|
|
12
12
|
class MpcSigner {
|
|
13
|
-
constructor({ keychain, isSimulator = false, mpcHost = 'mpc.portalhq.io', version = '
|
|
14
|
-
this.version = '
|
|
13
|
+
constructor({ keychain, isSimulator = false, mpcHost = 'mpc.portalhq.io', version = 'v5', featureFlags = { optimized: false }, }) {
|
|
14
|
+
this.version = 'v5';
|
|
15
15
|
this.buildParams = (method, txParams) => {
|
|
16
16
|
let params = txParams;
|
|
17
17
|
switch (method) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@portal-hq/provider",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.10",
|
|
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": "^2.0.
|
|
23
|
-
"@portal-hq/utils": "^2.0.
|
|
22
|
+
"@portal-hq/connect": "^2.0.10",
|
|
23
|
+
"@portal-hq/utils": "^2.0.10"
|
|
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": "
|
|
33
|
+
"gitHead": "9614b8afc13c4cb0a7a6dba7df276de6a690bba9"
|
|
34
34
|
}
|
package/src/providers/index.ts
CHANGED
|
@@ -74,7 +74,7 @@ class Provider implements IPortalProvider {
|
|
|
74
74
|
autoApprove = false,
|
|
75
75
|
apiHost = 'api.portalhq.io',
|
|
76
76
|
mpcHost = 'mpc.portalhq.io',
|
|
77
|
-
version = '
|
|
77
|
+
version = 'v5',
|
|
78
78
|
featureFlags = { optimized: false },
|
|
79
79
|
}: ProviderOptions) {
|
|
80
80
|
// Handle required fields
|
package/src/signers/mpc.ts
CHANGED
|
@@ -21,7 +21,7 @@ class MpcSigner implements Signer {
|
|
|
21
21
|
private keychain: KeychainAdapter
|
|
22
22
|
private mpc: PortalMobileMpc
|
|
23
23
|
private mpcHost: string // should we add a default here mpc.portalhq.io
|
|
24
|
-
private version = '
|
|
24
|
+
private version = 'v5'
|
|
25
25
|
private featureFlags: FeatureFlags
|
|
26
26
|
|
|
27
27
|
private get address(): Promise<string | undefined> {
|
|
@@ -36,7 +36,7 @@ class MpcSigner implements Signer {
|
|
|
36
36
|
keychain,
|
|
37
37
|
isSimulator = false,
|
|
38
38
|
mpcHost = 'mpc.portalhq.io',
|
|
39
|
-
version = '
|
|
39
|
+
version = 'v5',
|
|
40
40
|
featureFlags = { optimized: false },
|
|
41
41
|
}: MpcSignerOptions) {
|
|
42
42
|
this.isSimulator = isSimulator
|