@portal-hq/provider
Advanced tools
Comparing version 0.3.5 to 0.3.6-beta
@@ -26,3 +26,4 @@ "use strict"; | ||
'eth_signTransaction', | ||
'eth_signTypedData', | ||
'eth_signTypedData_v3', | ||
'eth_signTypedData_v4', | ||
'personal_sign', | ||
@@ -35,3 +36,3 @@ ]; | ||
// Optional options | ||
apiUrl = 'api.portalhq.io', autoApprove = false, mpcUrl = 'mpc.portalhq.io', mpcVersion = 'v2', gatewayConfig = {}, }) { | ||
apiUrl = 'api.portalhq.io', autoApprove = false, mpcUrl = 'mpc.portalhq.io', mpcVersion = 'v3', gatewayConfig = {}, }) { | ||
// Handle required fields | ||
@@ -367,3 +368,4 @@ if (!apiKey || apiKey.length === 0) { | ||
case 'eth_signTransaction': | ||
case 'eth_signTypedData': | ||
case 'eth_signTypedData_v3': | ||
case 'eth_signTypedData_v4': | ||
case 'personal_sign': | ||
@@ -370,0 +372,0 @@ const result = yield ((_a = this.signer) === null || _a === void 0 ? void 0 : _a.sign({ chainId: this.chainId, method, params }, this)); |
@@ -15,4 +15,4 @@ "use strict"; | ||
class MpcSigner { | ||
constructor({ keychain, mpcUrl, mpcVersion = 'v2' }) { | ||
this.mpcVersion = 'v2'; | ||
constructor({ keychain, mpcUrl, mpcVersion = 'v3' }) { | ||
this.mpcVersion = 'v3'; | ||
this.buildParams = (method, txParams) => { | ||
@@ -19,0 +19,0 @@ let params = txParams; |
@@ -24,3 +24,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
'eth_signTransaction', | ||
'eth_signTypedData', | ||
'eth_signTypedData_v3', | ||
'eth_signTypedData_v4', | ||
'personal_sign', | ||
@@ -33,3 +34,3 @@ ]; | ||
// Optional options | ||
apiUrl = 'api.portalhq.io', autoApprove = false, mpcUrl = 'mpc.portalhq.io', mpcVersion = 'v2', gatewayConfig = {}, }) { | ||
apiUrl = 'api.portalhq.io', autoApprove = false, mpcUrl = 'mpc.portalhq.io', mpcVersion = 'v3', gatewayConfig = {}, }) { | ||
// Handle required fields | ||
@@ -365,3 +366,4 @@ if (!apiKey || apiKey.length === 0) { | ||
case 'eth_signTransaction': | ||
case 'eth_signTypedData': | ||
case 'eth_signTypedData_v3': | ||
case 'eth_signTypedData_v4': | ||
case 'personal_sign': | ||
@@ -368,0 +370,0 @@ const result = yield ((_a = this.signer) === null || _a === void 0 ? void 0 : _a.sign({ chainId: this.chainId, method, params }, this)); |
@@ -13,4 +13,4 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
class MpcSigner { | ||
constructor({ keychain, mpcUrl, mpcVersion = 'v2' }) { | ||
this.mpcVersion = 'v2'; | ||
constructor({ keychain, mpcUrl, mpcVersion = 'v3' }) { | ||
this.mpcVersion = 'v3'; | ||
this.buildParams = (method, txParams) => { | ||
@@ -17,0 +17,0 @@ let params = txParams; |
{ | ||
"name": "@portal-hq/provider", | ||
"version": "0.3.5", | ||
"version": "0.3.6-beta", | ||
"license": "MIT", | ||
@@ -22,3 +22,3 @@ "main": "lib/commonjs/index", | ||
"dependencies": { | ||
"@portal-hq/utils": "^0.3.4" | ||
"@portal-hq/utils": "^0.3.6-beta" | ||
}, | ||
@@ -32,3 +32,4 @@ "devDependencies": { | ||
"typescript": "^4.8.4" | ||
} | ||
}, | ||
"gitHead": "5b85f3c81205059c628653c005a7a0a6bedbe8cb" | ||
} |
@@ -35,3 +35,4 @@ import { | ||
'eth_signTransaction', | ||
'eth_signTypedData', | ||
'eth_signTypedData_v3', | ||
'eth_signTypedData_v4', | ||
'personal_sign', | ||
@@ -70,3 +71,3 @@ ] | ||
mpcUrl = 'mpc.portalhq.io', | ||
mpcVersion = 'v2', | ||
mpcVersion = 'v3', | ||
gatewayConfig = {}, | ||
@@ -475,3 +476,4 @@ }: ProviderOptions) { | ||
case 'eth_signTransaction': | ||
case 'eth_signTypedData': | ||
case 'eth_signTypedData_v3': | ||
case 'eth_signTypedData_v4': | ||
case 'personal_sign': | ||
@@ -478,0 +480,0 @@ const result = await this.signer?.sign( |
@@ -23,5 +23,5 @@ import { NativeModules } from 'react-native' | ||
public mpcUrl: string // should we add a default here mpc.portalhq.io | ||
public mpcVersion: string = 'v2' | ||
public mpcVersion: string = 'v3' | ||
constructor({ keychain, mpcUrl, mpcVersion = 'v2' }: MpcSignerOptions) { | ||
constructor({ keychain, mpcUrl, mpcVersion = 'v3' }: MpcSignerOptions) { | ||
this.keychain = keychain | ||
@@ -28,0 +28,0 @@ this.mpc = NativeModules.PortalMobileMpc |
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
70082
1867
Updated@portal-hq/utils@^0.3.6-beta