@portal-hq/core
Advanced tools
Comparing version 2.0.3 to 2.0.4
@@ -38,3 +38,3 @@ "use strict"; | ||
// Optional | ||
isSimulator = false, autoApprove = false, keychain = new keychain_1.default(), version = 'v4', apiHost = 'api.portalhq.io', mpcHost = 'mpc.portalhq.io', webSocketHost = 'connect.portalhq.io', }) { | ||
isSimulator = false, autoApprove = false, keychain = new keychain_1.default(), version = 'v4', apiHost = 'api.portalhq.io', mpcHost = 'mpc.portalhq.io', webSocketHost = 'connect.portalhq.io', featureFlags = { optimized: false }, }) { | ||
this.version = 'v4'; | ||
@@ -50,2 +50,3 @@ this.apiHost = apiHost; | ||
this.webSocketHost = webSocketHost; | ||
this.featureFlags = featureFlags; | ||
if (version != 'v4') { | ||
@@ -65,2 +66,3 @@ throw new Error('Mpc Version is not supported. Only v4 is currently supported.'); | ||
version, | ||
featureFlags, | ||
}); | ||
@@ -67,0 +69,0 @@ // Initialize the Portal MPC Client |
@@ -124,2 +124,3 @@ "use strict"; | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}); | ||
@@ -187,2 +188,3 @@ res = yield this.mpc.backup(this.apiKey, this.host, signingShare, this.apiHost, metadata); | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}); | ||
@@ -454,2 +456,3 @@ res = yield this.mpc.generate(this.apiKey, this.host, this.apiHost, metadata); | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}); | ||
@@ -508,2 +511,3 @@ res = yield this.mpc.recoverBackup(this.apiKey, this.host, dkgResult, this.apiHost, metadata); | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}); | ||
@@ -510,0 +514,0 @@ res = yield this.mpc.recoverSigning(this.apiKey, this.host, dkgResult, this.apiHost, metadata); |
@@ -25,3 +25,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
// Optional | ||
isSimulator = false, autoApprove = false, keychain = new Keychain(), version = 'v4', apiHost = 'api.portalhq.io', mpcHost = 'mpc.portalhq.io', webSocketHost = 'connect.portalhq.io', }) { | ||
isSimulator = false, autoApprove = false, keychain = new Keychain(), version = 'v4', apiHost = 'api.portalhq.io', mpcHost = 'mpc.portalhq.io', webSocketHost = 'connect.portalhq.io', featureFlags = { optimized: false }, }) { | ||
this.version = 'v4'; | ||
@@ -37,2 +37,3 @@ this.apiHost = apiHost; | ||
this.webSocketHost = webSocketHost; | ||
this.featureFlags = featureFlags; | ||
if (version != 'v4') { | ||
@@ -52,2 +53,3 @@ throw new Error('Mpc Version is not supported. Only v4 is currently supported.'); | ||
version, | ||
featureFlags, | ||
}); | ||
@@ -54,0 +56,0 @@ // Initialize the Portal MPC Client |
@@ -96,2 +96,3 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}); | ||
@@ -159,2 +160,3 @@ res = yield this.mpc.backup(this.apiKey, this.host, signingShare, this.apiHost, metadata); | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}); | ||
@@ -426,2 +428,3 @@ res = yield this.mpc.generate(this.apiKey, this.host, this.apiHost, metadata); | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}); | ||
@@ -480,2 +483,3 @@ res = yield this.mpc.recoverBackup(this.apiKey, this.host, dkgResult, this.apiHost, metadata); | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}); | ||
@@ -482,0 +486,0 @@ res = yield this.mpc.recoverSigning(this.apiKey, this.host, dkgResult, this.apiHost, metadata); |
@@ -6,3 +6,3 @@ { | ||
"homepage": "https://portalhq.io/", | ||
"version": "2.0.3", | ||
"version": "2.0.4", | ||
"license": "MIT", | ||
@@ -31,7 +31,7 @@ "main": "lib/commonjs/index", | ||
"dependencies": { | ||
"@portal-hq/connect": "^2.0.3", | ||
"@portal-hq/keychain": "^2.0.3", | ||
"@portal-hq/provider": "^2.0.3", | ||
"@portal-hq/swaps": "^2.0.3", | ||
"@portal-hq/utils": "^2.0.3" | ||
"@portal-hq/connect": "^2.0.4", | ||
"@portal-hq/keychain": "^2.0.4", | ||
"@portal-hq/provider": "^2.0.4", | ||
"@portal-hq/swaps": "^2.0.4", | ||
"@portal-hq/utils": "^2.0.4" | ||
}, | ||
@@ -53,3 +53,3 @@ "devDependencies": { | ||
}, | ||
"gitHead": "c333fe5280f16a5c5f70b7ae768f112baf7156ba" | ||
"gitHead": "2d2f1ef628bc8788fa4a9cd32cc44795e547b3a7" | ||
} |
@@ -6,3 +6,3 @@ import Keychain from '@portal-hq/keychain' | ||
import PortalMpc, { BackupMethods } from './mpc' | ||
import { type BackupOptions, type PortalOptions } from '../types' | ||
import { FeatureFlags, type BackupOptions, type PortalOptions } from '../types' | ||
import { | ||
@@ -36,2 +36,3 @@ Events, | ||
public provider: IPortalProvider | ||
public featureFlags: FeatureFlags | ||
@@ -72,2 +73,3 @@ private apiHost: string | ||
webSocketHost = 'connect.portalhq.io', | ||
featureFlags = { optimized: false }, | ||
}: PortalOptions) { | ||
@@ -83,2 +85,3 @@ this.apiHost = apiHost | ||
this.webSocketHost = webSocketHost | ||
this.featureFlags = featureFlags | ||
@@ -102,2 +105,3 @@ if (version != 'v4') { | ||
version, | ||
featureFlags, | ||
}) | ||
@@ -111,3 +115,2 @@ | ||
portal: this, | ||
// Optional | ||
@@ -114,0 +117,0 @@ isSimulator, |
@@ -148,2 +148,3 @@ import { NativeModules } from 'react-native' | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}) | ||
@@ -223,2 +224,3 @@ res = await this.mpc.backup( | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}) | ||
@@ -550,2 +552,3 @@ res = await this.mpc.generate( | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}) | ||
@@ -621,2 +624,3 @@ res = await this.mpc.recoverBackup( | ||
mpcServerVersion: this.version, | ||
optimized: this.portal.featureFlags.optimized, | ||
}) | ||
@@ -623,0 +627,0 @@ res = await this.mpc.recoverSigning( |
@@ -17,2 +17,6 @@ import { | ||
export interface FeatureFlags { | ||
optimized: boolean | ||
} | ||
export interface BackupOptions { | ||
@@ -182,2 +186,3 @@ custom?: Storage | ||
webSocketHost?: string | ||
featureFlags?: FeatureFlags | ||
} | ||
@@ -184,0 +189,0 @@ |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 2 instances in 1 package
3837
0
108691000
Updated@portal-hq/connect@^2.0.4
Updated@portal-hq/keychain@^2.0.4
Updated@portal-hq/provider@^2.0.4
Updated@portal-hq/swaps@^2.0.4
Updated@portal-hq/utils@^2.0.4