@openocean.finance/wallet 1.10.67 → 1.10.68

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.
@@ -0,0 +1,17 @@
1
+ import { EnumChains, EnumWalletName, EnumWalletType } from "../types";
2
+ import BaseWallet from "./BaseWallet";
3
+ import Web3 from "web3";
4
+ declare class BifrostWallet extends BaseWallet {
5
+ name: EnumWalletName;
6
+ icon: any;
7
+ supportChains: EnumChains[];
8
+ type: EnumWalletType;
9
+ sdk: Web3 | null;
10
+ installUrl: string;
11
+ /**
12
+ * connect Bifrost and get wallet address
13
+ * @param chainId specific chainId,throw error when not match
14
+ */
15
+ requestConnect(chainId?: number): Promise<string>;
16
+ }
17
+ export default BifrostWallet;
@@ -0,0 +1,147 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
28
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ var __importDefault = (this && this.__importDefault) || function (mod) {
54
+ return (mod && mod.__esModule) ? mod : { "default": mod };
55
+ };
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ /**
58
+ * @name BifrostWallet
59
+ * @author openocean
60
+ * @date 2021/4/21
61
+ * @desc
62
+ */
63
+ // @ts-ignore
64
+ var bifrost_png_1 = __importDefault(require("../assets/bifrost.png"));
65
+ var types_1 = require("../types");
66
+ var BaseWallet_1 = __importDefault(require("./BaseWallet"));
67
+ var web3_1 = __importDefault(require("web3"));
68
+ var injectedTargets_1 = require("../injectedTargets");
69
+ var BifrostWallet = /** @class */ (function (_super) {
70
+ __extends(BifrostWallet, _super);
71
+ function BifrostWallet() {
72
+ var _this = _super !== null && _super.apply(this, arguments) || this;
73
+ _this.name = types_1.EnumWalletName.BifrostWallet;
74
+ _this.icon = bifrost_png_1.default;
75
+ _this.supportChains = [
76
+ types_1.EnumChains.ETH,
77
+ types_1.EnumChains.BSC,
78
+ types_1.EnumChains.Polygon,
79
+ types_1.EnumChains.XDai,
80
+ types_1.EnumChains.Fantom,
81
+ types_1.EnumChains.Sonic,
82
+ types_1.EnumChains.Avalanche,
83
+ types_1.EnumChains.Arbitrum,
84
+ types_1.EnumChains.Optimism,
85
+ types_1.EnumChains.Metis,
86
+ types_1.EnumChains.Telos,
87
+ types_1.EnumChains.Scroll,
88
+ types_1.EnumChains.Base,
89
+ types_1.EnumChains.OpBNB,
90
+ types_1.EnumChains.Mantle,
91
+ types_1.EnumChains.Manta,
92
+ types_1.EnumChains.Mode,
93
+ types_1.EnumChains.Rootstock,
94
+ types_1.EnumChains.Sei,
95
+ types_1.EnumChains.ArbitrumSepolia,
96
+ types_1.EnumChains.Gravity,
97
+ types_1.EnumChains.ApeChain,
98
+ types_1.EnumChains.UniChain,
99
+ types_1.EnumChains.Flare,
100
+ types_1.EnumChains.Monad,
101
+ types_1.EnumChains.MonadTest,
102
+ types_1.EnumChains.Swell,
103
+ types_1.EnumChains.HyperEvm,
104
+ types_1.EnumChains.Plume,
105
+ types_1.EnumChains.Tac,
106
+ types_1.EnumChains.Plasma,
107
+ types_1.EnumChains.Injective
108
+ ];
109
+ _this.type = types_1.EnumWalletType.Mobile;
110
+ _this.sdk = null;
111
+ _this.installUrl = "https://chrome.google.com/webstore/detail/bifrost-wallet/opcjggmabjecjbpjllcohbkdjphlheih";
112
+ return _this;
113
+ }
114
+ /**
115
+ * connect Bifrost and get wallet address
116
+ * @param chainId specific chainId,throw error when not match
117
+ */
118
+ BifrostWallet.prototype.requestConnect = function (chainId) {
119
+ return __awaiter(this, void 0, void 0, function () {
120
+ var provider, address, currentChainId;
121
+ return __generator(this, function (_a) {
122
+ switch (_a.label) {
123
+ case 0:
124
+ provider = (0, injectedTargets_1.getEthereumProvider)('bifrost') || window.bifrost;
125
+ if (!provider) {
126
+ throw new Error(types_1.EnumErrors.NoBifrostWallet);
127
+ }
128
+ this.sdk = new web3_1.default(provider);
129
+ return [4 /*yield*/, this.sdk.eth.requestAccounts()];
130
+ case 1:
131
+ address = (_a.sent())[0];
132
+ return [4 /*yield*/, this.sdk.eth.getChainId()];
133
+ case 2:
134
+ currentChainId = _a.sent();
135
+ if (chainId && currentChainId !== chainId) {
136
+ throw new Error(types_1.EnumErrors.ChainIdNotMath);
137
+ }
138
+ this.address = address;
139
+ this.chainId = currentChainId;
140
+ return [2 /*return*/, address];
141
+ }
142
+ });
143
+ });
144
+ };
145
+ return BifrostWallet;
146
+ }(BaseWallet_1.default));
147
+ exports.default = BifrostWallet;
@@ -0,0 +1,17 @@
1
+ import { EnumChains, EnumWalletName, EnumWalletType } from "../types";
2
+ import BaseWallet from "./BaseWallet";
3
+ import Web3 from "web3";
4
+ declare class RainbowWallet extends BaseWallet {
5
+ name: EnumWalletName;
6
+ icon: any;
7
+ supportChains: EnumChains[];
8
+ type: EnumWalletType;
9
+ sdk: Web3 | null;
10
+ installUrl: string;
11
+ /**
12
+ * connect Rainbow and get wallet address
13
+ * @param chainId specific chainId,throw error when not match
14
+ */
15
+ requestConnect(chainId?: number): Promise<string>;
16
+ }
17
+ export default RainbowWallet;
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+ var __extends = (this && this.__extends) || (function () {
3
+ var extendStatics = function (d, b) {
4
+ extendStatics = Object.setPrototypeOf ||
5
+ ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
6
+ function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
7
+ return extendStatics(d, b);
8
+ };
9
+ return function (d, b) {
10
+ if (typeof b !== "function" && b !== null)
11
+ throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
12
+ extendStatics(d, b);
13
+ function __() { this.constructor = d; }
14
+ d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
+ };
16
+ })();
17
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
+ return new (P || (P = Promise))(function (resolve, reject) {
20
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
21
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
22
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
23
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
24
+ });
25
+ };
26
+ var __generator = (this && this.__generator) || function (thisArg, body) {
27
+ var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g = Object.create((typeof Iterator === "function" ? Iterator : Object).prototype);
28
+ return g.next = verb(0), g["throw"] = verb(1), g["return"] = verb(2), typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
29
+ function verb(n) { return function (v) { return step([n, v]); }; }
30
+ function step(op) {
31
+ if (f) throw new TypeError("Generator is already executing.");
32
+ while (g && (g = 0, op[0] && (_ = 0)), _) try {
33
+ if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
34
+ if (y = 0, t) op = [op[0] & 2, t.value];
35
+ switch (op[0]) {
36
+ case 0: case 1: t = op; break;
37
+ case 4: _.label++; return { value: op[1], done: false };
38
+ case 5: _.label++; y = op[1]; op = [0]; continue;
39
+ case 7: op = _.ops.pop(); _.trys.pop(); continue;
40
+ default:
41
+ if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
42
+ if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
43
+ if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
44
+ if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
45
+ if (t[2]) _.ops.pop();
46
+ _.trys.pop(); continue;
47
+ }
48
+ op = body.call(thisArg, _);
49
+ } catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
50
+ if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
51
+ }
52
+ };
53
+ var __importDefault = (this && this.__importDefault) || function (mod) {
54
+ return (mod && mod.__esModule) ? mod : { "default": mod };
55
+ };
56
+ Object.defineProperty(exports, "__esModule", { value: true });
57
+ /**
58
+ * @name RainbowWallet
59
+ * @author openocean
60
+ * @date 2021/4/21
61
+ * @desc
62
+ */
63
+ // @ts-ignore
64
+ var rainbow_png_1 = __importDefault(require("../assets/rainbow.png"));
65
+ var types_1 = require("../types");
66
+ var BaseWallet_1 = __importDefault(require("./BaseWallet"));
67
+ var web3_1 = __importDefault(require("web3"));
68
+ var injectedTargets_1 = require("../injectedTargets");
69
+ var RainbowWallet = /** @class */ (function (_super) {
70
+ __extends(RainbowWallet, _super);
71
+ function RainbowWallet() {
72
+ var _this = _super !== null && _super.apply(this, arguments) || this;
73
+ _this.name = types_1.EnumWalletName.RainbowWallet;
74
+ _this.icon = rainbow_png_1.default;
75
+ _this.supportChains = [
76
+ types_1.EnumChains.ETH,
77
+ types_1.EnumChains.BSC,
78
+ types_1.EnumChains.Polygon,
79
+ types_1.EnumChains.Arbitrum,
80
+ types_1.EnumChains.Optimism,
81
+ types_1.EnumChains.Base,
82
+ types_1.EnumChains.ZKSYNC,
83
+ types_1.EnumChains.PolygonzkEVM,
84
+ types_1.EnumChains.Mode,
85
+ types_1.EnumChains.Rootstock,
86
+ types_1.EnumChains.ArbitrumSepolia,
87
+ types_1.EnumChains.Gravity,
88
+ types_1.EnumChains.ApeChain,
89
+ types_1.EnumChains.UniChain,
90
+ types_1.EnumChains.Flare,
91
+ types_1.EnumChains.Monad,
92
+ types_1.EnumChains.MonadTest,
93
+ types_1.EnumChains.Swell,
94
+ types_1.EnumChains.HyperEvm,
95
+ types_1.EnumChains.Plume,
96
+ types_1.EnumChains.Tac,
97
+ types_1.EnumChains.Plasma,
98
+ types_1.EnumChains.Injective
99
+ ];
100
+ _this.type = types_1.EnumWalletType.Extension;
101
+ _this.sdk = null;
102
+ _this.installUrl = "https://chrome.google.com/webstore/detail/rainbow/opfgelmcmbiajamepnmloijbpoleiama";
103
+ return _this;
104
+ }
105
+ /**
106
+ * connect Rainbow and get wallet address
107
+ * @param chainId specific chainId,throw error when not match
108
+ */
109
+ RainbowWallet.prototype.requestConnect = function (chainId) {
110
+ return __awaiter(this, void 0, void 0, function () {
111
+ var sdf, provider, address, currentChainId;
112
+ return __generator(this, function (_a) {
113
+ switch (_a.label) {
114
+ case 0:
115
+ sdf = (0, injectedTargets_1.getEthereumProvider)('rainbow');
116
+ debugger;
117
+ provider = (0, injectedTargets_1.getEthereumProvider)('rainbow') || (window.ethereum && window.ethereum.isRainbow ? window.ethereum : null);
118
+ if (!provider) {
119
+ throw new Error(types_1.EnumErrors.NoRainbowWallet);
120
+ }
121
+ this.sdk = new web3_1.default(provider);
122
+ return [4 /*yield*/, this.sdk.eth.requestAccounts()];
123
+ case 1:
124
+ address = (_a.sent())[0];
125
+ return [4 /*yield*/, this.sdk.eth.getChainId()];
126
+ case 2:
127
+ currentChainId = _a.sent();
128
+ if (chainId && currentChainId !== chainId) {
129
+ throw new Error(types_1.EnumErrors.ChainIdNotMath);
130
+ }
131
+ this.address = address;
132
+ this.chainId = currentChainId;
133
+ return [2 /*return*/, address];
134
+ }
135
+ });
136
+ });
137
+ };
138
+ return RainbowWallet;
139
+ }(BaseWallet_1.default));
140
+ exports.default = RainbowWallet;
@@ -14,6 +14,17 @@ var __extends = (this && this.__extends) || (function () {
14
14
  d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
15
15
  };
16
16
  })();
17
+ var __assign = (this && this.__assign) || function () {
18
+ __assign = Object.assign || function(t) {
19
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
20
+ s = arguments[i];
21
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
22
+ t[p] = s[p];
23
+ }
24
+ return t;
25
+ };
26
+ return __assign.apply(this, arguments);
27
+ };
17
28
  var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
18
29
  function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
19
30
  return new (P || (P = Promise))(function (resolve, reject) {
@@ -152,29 +163,17 @@ var WalletConnect = /** @class */ (function (_super) {
152
163
  icons: ['https://s3.openocean.finance/token_logos/logos/1666922406718_40623932820124664.png']
153
164
  };
154
165
  var defaultNetwork = networks.find(function (item) { return item.id == chainId; });
155
- this.modal = (0, appkit_1.createAppKit)({
156
- showWallets: true,
157
- adapters: [wagmiAdapter],
158
- defaultNetwork: defaultNetwork,
159
- networks: networks,
160
- metadata: metadata,
161
- projectId: projectId,
162
- allWallets: 'SHOW',
166
+ this.modal = (0, appkit_1.createAppKit)(__assign(__assign({ showWallets: true, adapters: [wagmiAdapter] }, (defaultNetwork ? { defaultNetwork: defaultNetwork } : {})), { networks: networks, metadata: metadata, projectId: projectId, allWallets: 'SHOW',
163
167
  // includeWalletIds: ['metamask', 'okxwallet', 'trustwallet', 'binance-web3-wallet'],
164
168
  features: {
165
169
  swaps: false,
166
170
  socials: false,
167
171
  email: false,
168
- },
169
- enableWalletConnect: true,
170
- debug: false,
171
- themeVariables: {
172
+ }, enableWalletConnect: true, debug: false, themeVariables: {
172
173
  '--w3m-z-index': 9999
173
- },
174
- excludeWalletIds: [
174
+ }, excludeWalletIds: [
175
175
  'a797aa35c0fadbfc1a53e7f675162ed5226968b44a19ee3d24385c64d1d3c393'
176
- ],
177
- });
176
+ ] }));
178
177
  this.modal.subscribeEvents(function (event) {
179
178
  console.log('_____________________event_________________');
180
179
  console.log(event.data);
@@ -341,12 +340,13 @@ var WalletConnect = /** @class */ (function (_super) {
341
340
  switch (_a.label) {
342
341
  case 0:
343
342
  chain = this.networks.find(function (item) { return item.id == chainId; });
344
- if (!chain) return [3 /*break*/, 2];
343
+ if (!chain) {
344
+ throw new Error("Chain with id ".concat(chainId, " is not supported"));
345
+ }
345
346
  return [4 /*yield*/, this.modal.switchNetwork(chain)];
346
347
  case 1:
347
348
  _a.sent();
348
- _a.label = 2;
349
- case 2: return [2 /*return*/];
349
+ return [2 /*return*/];
350
350
  }
351
351
  });
352
352
  });
@@ -58,6 +58,8 @@ var OKXBtcWallet_1 = __importDefault(require("./OKXBtcWallet"));
58
58
  var UnisatWallet_1 = __importDefault(require("./UnisatWallet"));
59
59
  var SlushWallet_1 = __importDefault(require("./SlushWallet"));
60
60
  var SuietWallet_1 = __importDefault(require("./SuietWallet"));
61
+ var BifrostWallet_1 = __importDefault(require("./BifrostWallet"));
62
+ var RainbowWallet_1 = __importDefault(require("./RainbowWallet"));
61
63
  var WalletObj = {
62
64
  MetaMask: new MetaMask_1.default(),
63
65
  // BscWallet: new BscWallet(),
@@ -112,6 +114,8 @@ var WalletObj = {
112
114
  UnisatWallet: new UnisatWallet_1.default(),
113
115
  SuiWallet: new SlushWallet_1.default(),
114
116
  SuietWallet: new SuietWallet_1.default(),
117
+ BifrostWallet: new BifrostWallet_1.default(),
118
+ RainbowWallet: new RainbowWallet_1.default(),
115
119
  };
116
120
  var Wallets = /** @class */ (function () {
117
121
  function Wallets() {
Binary file
Binary file
package/lib/index.d.ts CHANGED
@@ -48,9 +48,11 @@ import OKXBtcWallet from './Wallets/OKXBtcWallet';
48
48
  import UnisatWallet from './Wallets/UnisatWallet';
49
49
  import SlushWallet from './Wallets/SlushWallet';
50
50
  import SuietWallet from './Wallets/SuietWallet';
51
+ import BifrostWallet from './Wallets/BifrostWallet';
52
+ import RainbowWallet from './Wallets/RainbowWallet';
51
53
  import { EnumChains, EnumWalletName } from "./types";
52
54
  import { getSidName, tryWalletConnect, ReqConnectWalletVo } from "./TryWalletConnect";
53
55
  import { chainsObj, Chains, Chain } from "./Chains";
54
56
  import { walletsObj, Wallets } from "./Wallets/index";
55
57
  import solanaWeb3 from "@solana/web3.js";
56
- export { solanaWeb3, chainsObj, Chains, Chain, walletsObj, Wallets, ReqConnectWalletVo, tryWalletConnect, getSidName, EnumChains, EnumWalletName, BaseWallet, MetaMask, Cyano, TronLink, Sollet, SolletIo, OntoMobile, WalletConnect, MathWallet, OntoWallet, SafePalWallet, TokenPocket, TrustWallet, Coin98, Phantom, TerraStation, CoinbaseWallet, CloverWallet, XDEFIWallet, SolflareWallet, OKXWallet, KeplrWallet, BraveWallet, CryptoCom, BitgetWallet, GnosisSafeWallet, PetraWallet, MartianWallet, PontemWallet, UnstoppableDomains, MyNearWallet, MeteorWallet, SenderWallet, LedgerWallet, LedgerEmbedWallet, Krystal, Risewallet, Fewcha, ZerionWallet, CompassWallet, OKXBtcWallet, UnisatWallet, SlushWallet, SuietWallet, };
58
+ export { solanaWeb3, chainsObj, Chains, Chain, walletsObj, Wallets, ReqConnectWalletVo, tryWalletConnect, getSidName, EnumChains, EnumWalletName, BaseWallet, MetaMask, Cyano, TronLink, Sollet, SolletIo, OntoMobile, WalletConnect, MathWallet, OntoWallet, SafePalWallet, TokenPocket, TrustWallet, Coin98, Phantom, TerraStation, CoinbaseWallet, CloverWallet, XDEFIWallet, SolflareWallet, OKXWallet, KeplrWallet, BraveWallet, CryptoCom, BitgetWallet, GnosisSafeWallet, PetraWallet, MartianWallet, PontemWallet, UnstoppableDomains, MyNearWallet, MeteorWallet, SenderWallet, LedgerWallet, LedgerEmbedWallet, Krystal, Risewallet, Fewcha, ZerionWallet, CompassWallet, OKXBtcWallet, UnisatWallet, SlushWallet, SuietWallet, BifrostWallet, RainbowWallet, };
package/lib/index.js CHANGED
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
4
4
  };
5
5
  Object.defineProperty(exports, "__esModule", { value: true });
6
6
  exports.OKXBtcWallet = exports.CompassWallet = exports.ZerionWallet = exports.Fewcha = exports.Risewallet = exports.Krystal = exports.LedgerEmbedWallet = exports.LedgerWallet = exports.SenderWallet = exports.MeteorWallet = exports.MyNearWallet = exports.UnstoppableDomains = exports.PontemWallet = exports.MartianWallet = exports.PetraWallet = exports.GnosisSafeWallet = exports.BitgetWallet = exports.CryptoCom = exports.BraveWallet = exports.KeplrWallet = exports.OKXWallet = exports.SolflareWallet = exports.XDEFIWallet = exports.CloverWallet = exports.CoinbaseWallet = exports.TerraStation = exports.Phantom = exports.Coin98 = exports.TrustWallet = exports.TokenPocket = exports.SafePalWallet = exports.OntoWallet = exports.MathWallet = exports.WalletConnect = exports.OntoMobile = exports.SolletIo = exports.Sollet = exports.TronLink = exports.Cyano = exports.MetaMask = exports.BaseWallet = exports.EnumWalletName = exports.EnumChains = exports.getSidName = exports.tryWalletConnect = exports.Wallets = exports.walletsObj = exports.Chains = exports.chainsObj = exports.solanaWeb3 = void 0;
7
- exports.SuietWallet = exports.SlushWallet = exports.UnisatWallet = void 0;
7
+ exports.RainbowWallet = exports.BifrostWallet = exports.SuietWallet = exports.SlushWallet = exports.UnisatWallet = void 0;
8
8
  /**
9
9
  * wallets-manager entry
10
10
  * @author openocean
@@ -105,6 +105,10 @@ var SlushWallet_1 = __importDefault(require("./Wallets/SlushWallet"));
105
105
  exports.SlushWallet = SlushWallet_1.default;
106
106
  var SuietWallet_1 = __importDefault(require("./Wallets/SuietWallet"));
107
107
  exports.SuietWallet = SuietWallet_1.default;
108
+ var BifrostWallet_1 = __importDefault(require("./Wallets/BifrostWallet"));
109
+ exports.BifrostWallet = BifrostWallet_1.default;
110
+ var RainbowWallet_1 = __importDefault(require("./Wallets/RainbowWallet"));
111
+ exports.RainbowWallet = RainbowWallet_1.default;
108
112
  var types_1 = require("./types");
109
113
  Object.defineProperty(exports, "EnumChains", { enumerable: true, get: function () { return types_1.EnumChains; } });
110
114
  Object.defineProperty(exports, "EnumWalletName", { enumerable: true, get: function () { return types_1.EnumWalletName; } });
@@ -36,6 +36,10 @@ function setupEip6963Listener() {
36
36
  id = "mathwallet";
37
37
  else if (name.includes("TokenPocket") || rdns.includes("tokenpocket"))
38
38
  id = "tokenpocket";
39
+ else if (name.includes("Bifrost") || rdns.includes("bifrost"))
40
+ id = "bifrost";
41
+ else if (name.includes("Rainbow") || rdns.includes("rainbow"))
42
+ id = "rainbow";
39
43
  addTarget({
40
44
  id: id,
41
45
  name: (info === null || info === void 0 ? void 0 : info.name) || id,
package/lib/types.d.ts CHANGED
@@ -139,7 +139,9 @@ export declare enum EnumWalletName {
139
139
  OKXBtcWallet = "OKX Wallet",
140
140
  UnisatWallet = "Unisat Wallet",
141
141
  SlushWallet = "Slush Wallet",
142
- SuietWallet = "Suiet Wallet"
142
+ SuietWallet = "Suiet Wallet",
143
+ BifrostWallet = "Bifrost Wallet",
144
+ RainbowWallet = "Rainbow Wallet"
143
145
  }
144
146
  export declare enum EnumErrors {
145
147
  NotMetamask = "40001",
@@ -191,7 +193,9 @@ export declare enum EnumErrors {
191
193
  NoOkxBtxWallet = "40049",
192
194
  NoUnisatWallet = "40050",
193
195
  NoSlushWallet = "40051",
194
- NoSuietWallet = "40052"
196
+ NoSuietWallet = "40052",
197
+ NoBifrostWallet = "40053",
198
+ NoRainbowWallet = "40054"
195
199
  }
196
200
  export interface ConnectResult {
197
201
  chain: EnumChains;
package/lib/types.js CHANGED
@@ -142,6 +142,8 @@ var EnumWalletName;
142
142
  EnumWalletName["UnisatWallet"] = "Unisat Wallet";
143
143
  EnumWalletName["SlushWallet"] = "Slush Wallet";
144
144
  EnumWalletName["SuietWallet"] = "Suiet Wallet";
145
+ EnumWalletName["BifrostWallet"] = "Bifrost Wallet";
146
+ EnumWalletName["RainbowWallet"] = "Rainbow Wallet";
145
147
  })(EnumWalletName || (exports.EnumWalletName = EnumWalletName = {}));
146
148
  var EnumErrors;
147
149
  (function (EnumErrors) {
@@ -195,4 +197,6 @@ var EnumErrors;
195
197
  EnumErrors["NoUnisatWallet"] = "40050";
196
198
  EnumErrors["NoSlushWallet"] = "40051";
197
199
  EnumErrors["NoSuietWallet"] = "40052";
200
+ EnumErrors["NoBifrostWallet"] = "40053";
201
+ EnumErrors["NoRainbowWallet"] = "40054";
198
202
  })(EnumErrors || (exports.EnumErrors = EnumErrors = {}));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@openocean.finance/wallet",
3
- "version": "1.10.67",
3
+ "version": "1.10.68",
4
4
  "description": "A multi-chain wallets manager",
5
5
  "main": "lib/index.js",
6
6
  "scripts": {