@openocean.finance/wallet 1.6.3 → 1.6.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.
package/lib/Chains.js CHANGED
@@ -422,6 +422,17 @@ var chainObj = {
422
422
  "https://testrpc.x1.tech"
423
423
  ],
424
424
  compiler: 'EVM'
425
+ },
426
+ "blast": {
427
+ chainName: "Blast",
428
+ chainId: 168587773,
429
+ blockExplorerUrl: "https://testnet.blastscan.io/tx/",
430
+ nativeCurrency: { name: "ETH", symbol: "ETH", decimals: 18, address: "0xEeeeeEeeeEeEeeEeEeEeeEEEeeeeEeeeeeeeEEeE" },
431
+ popularToken: [],
432
+ rpcUrls: [
433
+ "https://sepolia.blast.io"
434
+ ],
435
+ compiler: 'EVM'
425
436
  }
426
437
  };
427
438
  var Chains = /** @class */ (function () {
@@ -88,7 +88,7 @@ var HaHaWallet = /** @class */ (function (_super) {
88
88
  HaHaWallet.prototype.requestConnect = function (chainId, config) {
89
89
  if (chainId === void 0) { chainId = 1; }
90
90
  return __awaiter(this, void 0, void 0, function () {
91
- var qrModalOptions, provider, currentChainId, address;
91
+ var qrModalOptions, rpcMap, provider, currentChainId, address;
92
92
  return __generator(this, function (_a) {
93
93
  switch (_a.label) {
94
94
  case 0:
@@ -101,11 +101,21 @@ var HaHaWallet = /** @class */ (function (_super) {
101
101
  '--wcm-z-index': '99999',
102
102
  }
103
103
  };
104
+ rpcMap = {};
104
105
  return [4 /*yield*/, ethereum_provider_1.EthereumProvider.init({
105
106
  projectId: config && config.projectId ? config.projectId : 'c1ca7adc83e89c7e7848440702f28f38',
106
- chains: [chainId],
107
107
  showQrModal: true,
108
- qrModalOptions: qrModalOptions
108
+ // qrModalOptions,
109
+ chains: [chainId],
110
+ optionalChains: config.chainsObj.chainIds,
111
+ rpcMap: rpcMap,
112
+ optionalMethods: [
113
+ 'wallet_addEthereumChain',
114
+ 'wallet_switchEthereumChain',
115
+ "eth_signTypedData",
116
+ "eth_signTypedData_v4",
117
+ "eth_sign"
118
+ ]
109
119
  })];
110
120
  case 1:
111
121
  provider = _a.sent();
@@ -93,7 +93,7 @@ var Krystal = /** @class */ (function (_super) {
93
93
  Krystal.prototype.requestConnect = function (chainId, config) {
94
94
  if (chainId === void 0) { chainId = 1; }
95
95
  return __awaiter(this, void 0, void 0, function () {
96
- var qrModalOptions, provider, currentChainId, address;
96
+ var qrModalOptions, rpcMap, provider, currentChainId, address;
97
97
  return __generator(this, function (_a) {
98
98
  switch (_a.label) {
99
99
  case 0:
@@ -106,11 +106,21 @@ var Krystal = /** @class */ (function (_super) {
106
106
  '--wcm-z-index': '99999',
107
107
  }
108
108
  };
109
+ rpcMap = {};
109
110
  return [4 /*yield*/, ethereum_provider_1.EthereumProvider.init({
110
- projectId: 'c1ca7adc83e89c7e7848440702f28f38',
111
- chains: [chainId],
111
+ projectId: config && config.projectId ? config.projectId : 'c1ca7adc83e89c7e7848440702f28f38',
112
112
  showQrModal: true,
113
- qrModalOptions: qrModalOptions
113
+ // qrModalOptions,
114
+ chains: [chainId],
115
+ optionalChains: config.chainsObj.chainIds,
116
+ rpcMap: rpcMap,
117
+ optionalMethods: [
118
+ 'wallet_addEthereumChain',
119
+ 'wallet_switchEthereumChain',
120
+ "eth_signTypedData",
121
+ "eth_signTypedData_v4",
122
+ "eth_sign"
123
+ ]
114
124
  })];
115
125
  case 1:
116
126
  provider = _a.sent();
@@ -105,7 +105,8 @@ var MetaMask = /** @class */ (function (_super) {
105
105
  types_1.EnumChains.OpBNB,
106
106
  types_1.EnumChains.Mantle,
107
107
  types_1.EnumChains.Manta,
108
- types_1.EnumChains.X1
108
+ types_1.EnumChains.X1,
109
+ types_1.EnumChains.Blast
109
110
  ];
110
111
  _this.type = types_1.EnumWalletType.Extension;
111
112
  _this.sdk = null;
@@ -90,7 +90,7 @@ var PlenaWallet = /** @class */ (function (_super) {
90
90
  PlenaWallet.prototype.requestConnect = function (chainId, config) {
91
91
  if (chainId === void 0) { chainId = 1; }
92
92
  return __awaiter(this, void 0, void 0, function () {
93
- var qrModalOptions, provider, currentChainId, address;
93
+ var qrModalOptions, rpcMap, provider, currentChainId, address;
94
94
  return __generator(this, function (_a) {
95
95
  switch (_a.label) {
96
96
  case 0:
@@ -103,11 +103,21 @@ var PlenaWallet = /** @class */ (function (_super) {
103
103
  '--wcm-z-index': '99999',
104
104
  }
105
105
  };
106
+ rpcMap = {};
106
107
  return [4 /*yield*/, ethereum_provider_1.EthereumProvider.init({
107
108
  projectId: config && config.projectId ? config.projectId : 'c1ca7adc83e89c7e7848440702f28f38',
108
- chains: [chainId],
109
109
  showQrModal: true,
110
- qrModalOptions: qrModalOptions
110
+ // qrModalOptions,
111
+ chains: [chainId],
112
+ optionalChains: config.chainsObj.chainIds,
113
+ rpcMap: rpcMap,
114
+ optionalMethods: [
115
+ 'wallet_addEthereumChain',
116
+ 'wallet_switchEthereumChain',
117
+ "eth_signTypedData",
118
+ "eth_signTypedData_v4",
119
+ "eth_sign"
120
+ ]
111
121
  })];
112
122
  case 1:
113
123
  provider = _a.sent();
@@ -98,7 +98,8 @@ var TrustWallet = /** @class */ (function (_super) {
98
98
  types_1.EnumChains.Base,
99
99
  types_1.EnumChains.OpBNB,
100
100
  types_1.EnumChains.Mantle,
101
- types_1.EnumChains.Manta
101
+ types_1.EnumChains.Manta,
102
+ types_1.EnumChains.Blast
102
103
  ];
103
104
  _this.type = types_1.EnumWalletType.Extension;
104
105
  _this.sdk = null;
@@ -100,7 +100,8 @@ var WalletConnect = /** @class */ (function (_super) {
100
100
  types_1.EnumChains.OpBNB,
101
101
  types_1.EnumChains.Mantle,
102
102
  types_1.EnumChains.Manta,
103
- types_1.EnumChains.X1
103
+ types_1.EnumChains.X1,
104
+ types_1.EnumChains.Blast
104
105
  ];
105
106
  _this.type = types_1.EnumWalletType.WalletConnect;
106
107
  _this.sdk = null;
@@ -133,7 +134,13 @@ var WalletConnect = /** @class */ (function (_super) {
133
134
  chains: [chainId],
134
135
  optionalChains: config.chainsObj.chainIds,
135
136
  rpcMap: rpcMap,
136
- optionalMethods: ['wallet_addEthereumChain', 'wallet_switchEthereumChain']
137
+ optionalMethods: [
138
+ 'wallet_addEthereumChain',
139
+ 'wallet_switchEthereumChain',
140
+ "eth_signTypedData",
141
+ "eth_signTypedData_v4",
142
+ "eth_sign"
143
+ ]
137
144
  })];
138
145
  case 1:
139
146
  provider = _a.sent();
package/lib/types.d.ts CHANGED
@@ -52,7 +52,8 @@ export declare enum EnumChains {
52
52
  OpBNB = "opbnb",
53
53
  Mantle = "mantle",
54
54
  Manta = "manta",
55
- X1 = "x1"
55
+ X1 = "x1",
56
+ Blast = "blast"
56
57
  }
57
58
  export declare enum EnumWalletType {
58
59
  Extension = "Extension",
package/lib/types.js CHANGED
@@ -53,6 +53,7 @@ var EnumChains;
53
53
  EnumChains["Mantle"] = "mantle";
54
54
  EnumChains["Manta"] = "manta";
55
55
  EnumChains["X1"] = "x1";
56
+ EnumChains["Blast"] = "blast";
56
57
  })(EnumChains = exports.EnumChains || (exports.EnumChains = {}));
57
58
  var EnumWalletType;
58
59
  (function (EnumWalletType) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/wallet",
3
- "version": "1.6.3",
3
+ "version": "1.6.5",
4
4
  "description": "A multi-chain wallets manager",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {