Socket
Socket
Sign inDemoInstall

@portal-hq/provider

Package Overview
Dependencies
Maintainers
8
Versions
98
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@portal-hq/provider - npm Package Compare versions

Comparing version 0.3.5 to 0.3.6-beta

8

lib/commonjs/providers/index.js

@@ -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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc