@injectivelabs/wallet-strategy 1.17.2-alpha.2 → 1.17.2-alpha.3
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/dist/cjs/index.cjs +55 -14
- package/dist/esm/index.js +55 -14
- package/package.json +12 -12
package/dist/cjs/index.cjs
CHANGED
|
@@ -2,6 +2,61 @@ let __injectivelabs_exceptions = require("@injectivelabs/exceptions");
|
|
|
2
2
|
let __injectivelabs_wallet_core = require("@injectivelabs/wallet-core");
|
|
3
3
|
let __injectivelabs_wallet_base = require("@injectivelabs/wallet-base");
|
|
4
4
|
|
|
5
|
+
//#region src/strategy/loaders.ts
|
|
6
|
+
let cachedEvmStrategy = null;
|
|
7
|
+
let cachedCosmosStrategy = null;
|
|
8
|
+
let cachedLedgerStrategies = null;
|
|
9
|
+
let cachedTrezorStrategies = null;
|
|
10
|
+
let cachedPrivateKeyStrategy = null;
|
|
11
|
+
let cachedTurnkeyStrategy = null;
|
|
12
|
+
let cachedMagicStrategy = null;
|
|
13
|
+
let cachedWalletConnectStrategy = null;
|
|
14
|
+
const loadEvmStrategy = async () => {
|
|
15
|
+
if (!cachedEvmStrategy) cachedEvmStrategy = (await import("@injectivelabs/wallet-evm")).EvmWalletStrategy;
|
|
16
|
+
return cachedEvmStrategy;
|
|
17
|
+
};
|
|
18
|
+
const loadCosmosStrategy = async () => {
|
|
19
|
+
if (!cachedCosmosStrategy) cachedCosmosStrategy = (await import("@injectivelabs/wallet-cosmos")).CosmosWalletStrategy;
|
|
20
|
+
return cachedCosmosStrategy;
|
|
21
|
+
};
|
|
22
|
+
const loadLedgerStrategies = async () => {
|
|
23
|
+
if (!cachedLedgerStrategies) {
|
|
24
|
+
const m = await import("@injectivelabs/wallet-ledger");
|
|
25
|
+
cachedLedgerStrategies = {
|
|
26
|
+
LedgerLiveStrategy: m.LedgerLiveStrategy,
|
|
27
|
+
LedgerLegacyStrategy: m.LedgerLegacyStrategy
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return cachedLedgerStrategies;
|
|
31
|
+
};
|
|
32
|
+
const loadTrezorStrategies = async () => {
|
|
33
|
+
if (!cachedTrezorStrategies) {
|
|
34
|
+
const m = await import("@injectivelabs/wallet-trezor");
|
|
35
|
+
cachedTrezorStrategies = {
|
|
36
|
+
TrezorBip32Strategy: m.TrezorBip32Strategy,
|
|
37
|
+
TrezorBip44Strategy: m.TrezorBip44Strategy
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return cachedTrezorStrategies;
|
|
41
|
+
};
|
|
42
|
+
const loadPrivateKeyStrategy = async () => {
|
|
43
|
+
if (!cachedPrivateKeyStrategy) cachedPrivateKeyStrategy = (await import("@injectivelabs/wallet-private-key")).PrivateKeyWalletStrategy;
|
|
44
|
+
return cachedPrivateKeyStrategy;
|
|
45
|
+
};
|
|
46
|
+
const loadTurnkeyStrategy = async () => {
|
|
47
|
+
if (!cachedTurnkeyStrategy) cachedTurnkeyStrategy = (await import("@injectivelabs/wallet-turnkey")).TurnkeyWalletStrategy;
|
|
48
|
+
return cachedTurnkeyStrategy;
|
|
49
|
+
};
|
|
50
|
+
const loadMagicStrategy = async () => {
|
|
51
|
+
if (!cachedMagicStrategy) cachedMagicStrategy = (await import("@injectivelabs/wallet-magic")).MagicStrategy;
|
|
52
|
+
return cachedMagicStrategy;
|
|
53
|
+
};
|
|
54
|
+
const loadWalletConnectStrategy = async () => {
|
|
55
|
+
if (!cachedWalletConnectStrategy) cachedWalletConnectStrategy = (await import("@injectivelabs/wallet-wallet-connect")).WalletConnectStrategy;
|
|
56
|
+
return cachedWalletConnectStrategy;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
5
60
|
//#region \0@oxc-project+runtime@0.98.0/helpers/typeof.js
|
|
6
61
|
function _typeof(o) {
|
|
7
62
|
"@babel/helpers - typeof";
|
|
@@ -45,20 +100,6 @@ function _defineProperty(e, r, t) {
|
|
|
45
100
|
|
|
46
101
|
//#endregion
|
|
47
102
|
//#region src/strategy/index.ts
|
|
48
|
-
const loadEvmStrategy = () => import("@injectivelabs/wallet-evm").then((m) => m.EvmWalletStrategy);
|
|
49
|
-
const loadCosmosStrategy = () => import("@injectivelabs/wallet-cosmos").then((m) => m.CosmosWalletStrategy);
|
|
50
|
-
const loadLedgerStrategies = () => import("@injectivelabs/wallet-ledger").then((m) => ({
|
|
51
|
-
LedgerLiveStrategy: m.LedgerLiveStrategy,
|
|
52
|
-
LedgerLegacyStrategy: m.LedgerLegacyStrategy
|
|
53
|
-
}));
|
|
54
|
-
const loadTrezorStrategies = () => import("@injectivelabs/wallet-trezor").then((m) => ({
|
|
55
|
-
TrezorBip32Strategy: m.TrezorBip32Strategy,
|
|
56
|
-
TrezorBip44Strategy: m.TrezorBip44Strategy
|
|
57
|
-
}));
|
|
58
|
-
const loadPrivateKeyStrategy = () => import("@injectivelabs/wallet-private-key").then((m) => m.PrivateKeyWalletStrategy);
|
|
59
|
-
const loadTurnkeyStrategy = () => import("@injectivelabs/wallet-turnkey").then((m) => m.TurnkeyWalletStrategy);
|
|
60
|
-
const loadMagicStrategy = () => import("@injectivelabs/wallet-magic").then((m) => m.MagicStrategy);
|
|
61
|
-
const loadWalletConnectStrategy = () => import("@injectivelabs/wallet-wallet-connect").then((m) => m.WalletConnectStrategy);
|
|
62
103
|
const ethereumWalletsDisabled = (args) => {
|
|
63
104
|
const { evmOptions } = args;
|
|
64
105
|
if (!evmOptions) return true;
|
package/dist/esm/index.js
CHANGED
|
@@ -2,6 +2,61 @@ import { GeneralException } from "@injectivelabs/exceptions";
|
|
|
2
2
|
import { BaseWalletStrategy } from "@injectivelabs/wallet-core";
|
|
3
3
|
import { Wallet, isEvmWallet } from "@injectivelabs/wallet-base";
|
|
4
4
|
|
|
5
|
+
//#region src/strategy/loaders.ts
|
|
6
|
+
let cachedEvmStrategy = null;
|
|
7
|
+
let cachedCosmosStrategy = null;
|
|
8
|
+
let cachedLedgerStrategies = null;
|
|
9
|
+
let cachedTrezorStrategies = null;
|
|
10
|
+
let cachedPrivateKeyStrategy = null;
|
|
11
|
+
let cachedTurnkeyStrategy = null;
|
|
12
|
+
let cachedMagicStrategy = null;
|
|
13
|
+
let cachedWalletConnectStrategy = null;
|
|
14
|
+
const loadEvmStrategy = async () => {
|
|
15
|
+
if (!cachedEvmStrategy) cachedEvmStrategy = (await import("@injectivelabs/wallet-evm")).EvmWalletStrategy;
|
|
16
|
+
return cachedEvmStrategy;
|
|
17
|
+
};
|
|
18
|
+
const loadCosmosStrategy = async () => {
|
|
19
|
+
if (!cachedCosmosStrategy) cachedCosmosStrategy = (await import("@injectivelabs/wallet-cosmos")).CosmosWalletStrategy;
|
|
20
|
+
return cachedCosmosStrategy;
|
|
21
|
+
};
|
|
22
|
+
const loadLedgerStrategies = async () => {
|
|
23
|
+
if (!cachedLedgerStrategies) {
|
|
24
|
+
const m = await import("@injectivelabs/wallet-ledger");
|
|
25
|
+
cachedLedgerStrategies = {
|
|
26
|
+
LedgerLiveStrategy: m.LedgerLiveStrategy,
|
|
27
|
+
LedgerLegacyStrategy: m.LedgerLegacyStrategy
|
|
28
|
+
};
|
|
29
|
+
}
|
|
30
|
+
return cachedLedgerStrategies;
|
|
31
|
+
};
|
|
32
|
+
const loadTrezorStrategies = async () => {
|
|
33
|
+
if (!cachedTrezorStrategies) {
|
|
34
|
+
const m = await import("@injectivelabs/wallet-trezor");
|
|
35
|
+
cachedTrezorStrategies = {
|
|
36
|
+
TrezorBip32Strategy: m.TrezorBip32Strategy,
|
|
37
|
+
TrezorBip44Strategy: m.TrezorBip44Strategy
|
|
38
|
+
};
|
|
39
|
+
}
|
|
40
|
+
return cachedTrezorStrategies;
|
|
41
|
+
};
|
|
42
|
+
const loadPrivateKeyStrategy = async () => {
|
|
43
|
+
if (!cachedPrivateKeyStrategy) cachedPrivateKeyStrategy = (await import("@injectivelabs/wallet-private-key")).PrivateKeyWalletStrategy;
|
|
44
|
+
return cachedPrivateKeyStrategy;
|
|
45
|
+
};
|
|
46
|
+
const loadTurnkeyStrategy = async () => {
|
|
47
|
+
if (!cachedTurnkeyStrategy) cachedTurnkeyStrategy = (await import("@injectivelabs/wallet-turnkey")).TurnkeyWalletStrategy;
|
|
48
|
+
return cachedTurnkeyStrategy;
|
|
49
|
+
};
|
|
50
|
+
const loadMagicStrategy = async () => {
|
|
51
|
+
if (!cachedMagicStrategy) cachedMagicStrategy = (await import("@injectivelabs/wallet-magic")).MagicStrategy;
|
|
52
|
+
return cachedMagicStrategy;
|
|
53
|
+
};
|
|
54
|
+
const loadWalletConnectStrategy = async () => {
|
|
55
|
+
if (!cachedWalletConnectStrategy) cachedWalletConnectStrategy = (await import("@injectivelabs/wallet-wallet-connect")).WalletConnectStrategy;
|
|
56
|
+
return cachedWalletConnectStrategy;
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
//#endregion
|
|
5
60
|
//#region \0@oxc-project+runtime@0.98.0/helpers/typeof.js
|
|
6
61
|
function _typeof(o) {
|
|
7
62
|
"@babel/helpers - typeof";
|
|
@@ -45,20 +100,6 @@ function _defineProperty(e, r, t) {
|
|
|
45
100
|
|
|
46
101
|
//#endregion
|
|
47
102
|
//#region src/strategy/index.ts
|
|
48
|
-
const loadEvmStrategy = () => import("@injectivelabs/wallet-evm").then((m) => m.EvmWalletStrategy);
|
|
49
|
-
const loadCosmosStrategy = () => import("@injectivelabs/wallet-cosmos").then((m) => m.CosmosWalletStrategy);
|
|
50
|
-
const loadLedgerStrategies = () => import("@injectivelabs/wallet-ledger").then((m) => ({
|
|
51
|
-
LedgerLiveStrategy: m.LedgerLiveStrategy,
|
|
52
|
-
LedgerLegacyStrategy: m.LedgerLegacyStrategy
|
|
53
|
-
}));
|
|
54
|
-
const loadTrezorStrategies = () => import("@injectivelabs/wallet-trezor").then((m) => ({
|
|
55
|
-
TrezorBip32Strategy: m.TrezorBip32Strategy,
|
|
56
|
-
TrezorBip44Strategy: m.TrezorBip44Strategy
|
|
57
|
-
}));
|
|
58
|
-
const loadPrivateKeyStrategy = () => import("@injectivelabs/wallet-private-key").then((m) => m.PrivateKeyWalletStrategy);
|
|
59
|
-
const loadTurnkeyStrategy = () => import("@injectivelabs/wallet-turnkey").then((m) => m.TurnkeyWalletStrategy);
|
|
60
|
-
const loadMagicStrategy = () => import("@injectivelabs/wallet-magic").then((m) => m.MagicStrategy);
|
|
61
|
-
const loadWalletConnectStrategy = () => import("@injectivelabs/wallet-wallet-connect").then((m) => m.WalletConnectStrategy);
|
|
62
103
|
const ethereumWalletsDisabled = (args) => {
|
|
63
104
|
const { evmOptions } = args;
|
|
64
105
|
if (!evmOptions) return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@injectivelabs/wallet-strategy",
|
|
3
|
-
"version": "1.17.2-alpha.
|
|
3
|
+
"version": "1.17.2-alpha.3",
|
|
4
4
|
"description": "Wallet strategy with instantiated wallets",
|
|
5
5
|
"license": "Apache-2.0",
|
|
6
6
|
"author": {
|
|
@@ -38,17 +38,17 @@
|
|
|
38
38
|
"dist"
|
|
39
39
|
],
|
|
40
40
|
"dependencies": {
|
|
41
|
-
"@injectivelabs/exceptions": "1.17.2-alpha.
|
|
42
|
-
"@injectivelabs/wallet-base": "1.17.2-alpha.
|
|
43
|
-
"@injectivelabs/wallet-core": "1.17.2-alpha.
|
|
44
|
-
"@injectivelabs/wallet-
|
|
45
|
-
"@injectivelabs/wallet-
|
|
46
|
-
"@injectivelabs/wallet-
|
|
47
|
-
"@injectivelabs/wallet-
|
|
48
|
-
"@injectivelabs/wallet-private-key": "1.17.2-alpha.
|
|
49
|
-
"@injectivelabs/wallet-turnkey": "1.17.2-alpha.
|
|
50
|
-
"@injectivelabs/wallet-
|
|
51
|
-
"@injectivelabs/wallet-
|
|
41
|
+
"@injectivelabs/exceptions": "1.17.2-alpha.3",
|
|
42
|
+
"@injectivelabs/wallet-base": "1.17.2-alpha.3",
|
|
43
|
+
"@injectivelabs/wallet-core": "1.17.2-alpha.3",
|
|
44
|
+
"@injectivelabs/wallet-cosmos": "1.17.2-alpha.3",
|
|
45
|
+
"@injectivelabs/wallet-evm": "1.17.2-alpha.3",
|
|
46
|
+
"@injectivelabs/wallet-ledger": "1.17.2-alpha.3",
|
|
47
|
+
"@injectivelabs/wallet-magic": "1.17.2-alpha.3",
|
|
48
|
+
"@injectivelabs/wallet-private-key": "1.17.2-alpha.3",
|
|
49
|
+
"@injectivelabs/wallet-turnkey": "1.17.2-alpha.3",
|
|
50
|
+
"@injectivelabs/wallet-trezor": "1.17.2-alpha.3",
|
|
51
|
+
"@injectivelabs/wallet-wallet-connect": "1.17.2-alpha.3"
|
|
52
52
|
},
|
|
53
53
|
"publishConfig": {
|
|
54
54
|
"access": "public"
|