@flarenetwork/multichain-wallet-connector 0.0.2-rc.11 → 0.0.2-rc.12
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/core/index.d.mts +2 -2
- package/dist/core/index.mjs +2 -3
- package/dist/{multichain-BhIYlOPc.mjs → core-COrQHAyb.mjs} +2 -62
- package/dist/core-COrQHAyb.mjs.map +1 -0
- package/dist/{use-wallets-BEGWA_BQ.d.mts → index-1ESqXgk2.d.mts} +6 -5
- package/dist/index-1ESqXgk2.d.mts.map +1 -0
- package/dist/{utils-rdqnqYX7.d.mts → index-DzuXmnaN.d.mts} +4 -4
- package/dist/index-DzuXmnaN.d.mts.map +1 -0
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +3 -5
- package/dist/react/index.d.mts +3 -3
- package/dist/react/index.mjs +3 -5
- package/dist/{use-wallets-Ccq_qRWx.mjs → react-DmP_6701.mjs} +3 -20
- package/dist/react-DmP_6701.mjs.map +1 -0
- package/package.json +28 -40
- package/dist/multichain-BhIYlOPc.mjs.map +0 -1
- package/dist/use-wallets-BEGWA_BQ.d.mts.map +0 -1
- package/dist/use-wallets-Ccq_qRWx.mjs.map +0 -1
- package/dist/utils-rdqnqYX7.d.mts.map +0 -1
package/dist/core/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as MultiChainEvents, A as ConnectorTypeMap, B as LedgerConnectOptions, C as ConnectorClientMap, D as ConnectorProviderMap, E as ConnectorProvider, F as XrpClient, G as ChainChangedEvent, H as LedgerPaginatedBip44, I as EvmClient, J as DcentWalletOptions, K as ChainOverride, L as ChainClient, M as XamanSendTxOptions, N as LedgerSession, O as ConnectorSendTxOptions, P as DcentConnector, Q as MetaMaskWalletOptions, R as LedgerCaip2, S as ConnectorClient, T as ConnectorConnectOptionsMap, U as Bip44, V as LedgerHDStandard, W as AccountChangedEvent, X as ErrorEvent, Y as DisconnectEvent, Z as LedgerWalletOptions, _ as ConfigResolver, _t as XRPlCaip2, a as shortenAddress, at as XamanWalletOptions, c as WalletConnectError, d as DcentError, dt as BaseChain, et as MultiChainOptions, f as WalletError, ft as Caip2, g as MultiChain, gt as NonEvmChain, h as ChainGuards, ht as EvmChain, i as objectValues, it as WalletOptions, j as ConnectorXrpClientMap, k as ConnectorSendTxOptionsMap, l as MetaMaskError, m as ErrorCodeKey, mt as Eip155Caip2, n as objectFromEntries, nt as WalletConnectWalletOptions, o as WalletErrorHelper, ot as WalletAddressState, p as ErrorCode, pt as Chain, q as ConnectEvent, r as objectKeys, rt as WalletMetadata, s as XamanError, st as WalletState, t as objectEntries, tt as ResolvedWalletConfig, u as LedgerError, ut as WalletType, vt as XrplChain, w as ConnectorConnectOptions, x as Connector, z as LedgerComputedAddress } from "../
|
|
2
|
-
export {
|
|
1
|
+
import { $ as MultiChainEvents, A as ConnectorTypeMap, B as LedgerConnectOptions, C as ConnectorClientMap, D as ConnectorProviderMap, E as ConnectorProvider, F as XrpClient, G as ChainChangedEvent, H as LedgerPaginatedBip44, I as EvmClient, J as DcentWalletOptions, K as ChainOverride, L as ChainClient, M as XamanSendTxOptions, N as LedgerSession, O as ConnectorSendTxOptions, P as DcentConnector, Q as MetaMaskWalletOptions, R as LedgerCaip2, S as ConnectorClient, T as ConnectorConnectOptionsMap, U as Bip44, V as LedgerHDStandard, W as AccountChangedEvent, X as ErrorEvent, Y as DisconnectEvent, Z as LedgerWalletOptions, _ as ConfigResolver, _t as XRPlCaip2, a as shortenAddress, at as XamanWalletOptions, c as WalletConnectError, d as DcentError, dt as BaseChain, et as MultiChainOptions, f as WalletError, ft as Caip2, g as MultiChain, gt as NonEvmChain, h as ChainGuards, ht as EvmChain, i as objectValues, it as WalletOptions, j as ConnectorXrpClientMap, k as ConnectorSendTxOptionsMap, l as MetaMaskError, m as ErrorCodeKey, mt as Eip155Caip2, n as objectFromEntries, nt as WalletConnectWalletOptions, o as WalletErrorHelper, ot as WalletAddressState, p as ErrorCode, pt as Chain, q as ConnectEvent, r as objectKeys, rt as WalletMetadata, s as XamanError, st as WalletState, t as objectEntries, tt as ResolvedWalletConfig, u as LedgerError, ut as WalletType, vt as XrplChain, w as ConnectorConnectOptions, x as Connector, z as LedgerComputedAddress } from "../index-DzuXmnaN.mjs";
|
|
2
|
+
export { AccountChangedEvent, BaseChain, Bip44, Caip2, Chain, ChainChangedEvent, ChainClient, ChainGuards, ChainOverride, ConfigResolver, ConnectEvent, Connector, ConnectorClient, ConnectorClientMap, ConnectorConnectOptions, ConnectorConnectOptionsMap, ConnectorProvider, ConnectorProviderMap, ConnectorSendTxOptions, ConnectorSendTxOptionsMap, ConnectorTypeMap, ConnectorXrpClientMap, DcentConnector, DcentError, DcentWalletOptions, DisconnectEvent, Eip155Caip2, ErrorCode, ErrorCodeKey, ErrorEvent, EvmChain, EvmClient, LedgerCaip2, LedgerComputedAddress, LedgerConnectOptions, LedgerError, LedgerHDStandard, LedgerPaginatedBip44, LedgerSession, LedgerWalletOptions, MetaMaskError, MetaMaskWalletOptions, MultiChain, MultiChainEvents, MultiChainOptions, NonEvmChain, ResolvedWalletConfig, WalletAddressState, WalletConnectError, WalletConnectWalletOptions, WalletError, WalletErrorHelper, WalletMetadata, WalletOptions, WalletState, WalletType, XRPlCaip2, XamanError, XamanSendTxOptions, XamanWalletOptions, XrpClient, XrplChain, objectEntries, objectFromEntries, objectKeys, objectValues, shortenAddress };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,3 +1,2 @@
|
|
|
1
|
-
import { _ as objectFromEntries, a as WalletErrorHelper, b as shortenAddress, c as MetaMaskError, d as WalletError, f as ErrorCode, g as objectEntries, h as ChainGuards, i as DcentConnector, l as LedgerError, n as EvmClient, o as XamanError, p as ConfigResolver, r as Bip44, s as WalletConnectError, t as MultiChain, u as DcentError, v as objectKeys, y as objectValues } from "../
|
|
2
|
-
|
|
3
|
-
export { Bip44, ChainGuards, ConfigResolver, DcentConnector, DcentError, ErrorCode, EvmClient, LedgerError, MetaMaskError, MultiChain, WalletConnectError, WalletError, WalletErrorHelper, XamanError, objectEntries, objectFromEntries, objectKeys, objectValues, shortenAddress };
|
|
1
|
+
import { _ as objectFromEntries, a as WalletErrorHelper, b as shortenAddress, c as MetaMaskError, d as WalletError, f as ErrorCode, g as objectEntries, h as ChainGuards, i as DcentConnector, l as LedgerError, n as EvmClient, o as XamanError, p as ConfigResolver, r as Bip44, s as WalletConnectError, t as MultiChain, u as DcentError, v as objectKeys, y as objectValues } from "../core-COrQHAyb.mjs";
|
|
2
|
+
export { Bip44, ChainGuards, ConfigResolver, DcentConnector, DcentError, ErrorCode, EvmClient, LedgerError, MetaMaskError, MultiChain, WalletConnectError, WalletError, WalletErrorHelper, XamanError, objectEntries, objectFromEntries, objectKeys, objectValues, shortenAddress };
|
|
@@ -14,7 +14,6 @@ import { createAppKit } from "@reown/appkit";
|
|
|
14
14
|
import UniversalProvider from "@walletconnect/universal-provider";
|
|
15
15
|
import { Xumm } from "xumm";
|
|
16
16
|
import { createStore } from "@xstate/store";
|
|
17
|
-
|
|
18
17
|
//#region src/core/shared/type-utils.ts
|
|
19
18
|
var TypeUtils = class {
|
|
20
19
|
static isError(value) {
|
|
@@ -27,7 +26,6 @@ var TypeUtils = class {
|
|
|
27
26
|
return typeof value === "string";
|
|
28
27
|
}
|
|
29
28
|
};
|
|
30
|
-
|
|
31
29
|
//#endregion
|
|
32
30
|
//#region src/core/utils/utils.ts
|
|
33
31
|
/**
|
|
@@ -64,7 +62,6 @@ function isEmptyObject(value) {
|
|
|
64
62
|
function stripEmptyObjects(obj) {
|
|
65
63
|
return objectFromEntries(objectEntries(obj).filter(([, v]) => !isEmptyObject(v)));
|
|
66
64
|
}
|
|
67
|
-
|
|
68
65
|
//#endregion
|
|
69
66
|
//#region src/core/chains/chain.constants.ts
|
|
70
67
|
const CAIP2_NAMESPACES = {
|
|
@@ -87,7 +84,6 @@ const CAIP2 = {
|
|
|
87
84
|
},
|
|
88
85
|
[CAIP2_NAMESPACES.bip122]: { "1a91e3dace36e2be3bf030a65679fe821": "Dogecoin Mainnet" }
|
|
89
86
|
};
|
|
90
|
-
|
|
91
87
|
//#endregion
|
|
92
88
|
//#region src/core/chains/chain.utils.ts
|
|
93
89
|
var ChainGuards = class {
|
|
@@ -156,7 +152,6 @@ function createChainConfig(config) {
|
|
|
156
152
|
}];
|
|
157
153
|
}));
|
|
158
154
|
}
|
|
159
|
-
|
|
160
155
|
//#endregion
|
|
161
156
|
//#region src/core/chains/viem/custom-chains.ts
|
|
162
157
|
const flareCoston = defineChain({
|
|
@@ -175,7 +170,6 @@ const flareCoston = defineChain({
|
|
|
175
170
|
} },
|
|
176
171
|
testnet: true
|
|
177
172
|
});
|
|
178
|
-
|
|
179
173
|
//#endregion
|
|
180
174
|
//#region src/core/chains/chain-registry.ts
|
|
181
175
|
function defineChainRegistry(registry) {
|
|
@@ -304,7 +298,6 @@ const isCaip2 = (caip2) => {
|
|
|
304
298
|
if (!caip2) return false;
|
|
305
299
|
return Object.hasOwn(chainConfig, caip2);
|
|
306
300
|
};
|
|
307
|
-
|
|
308
301
|
//#endregion
|
|
309
302
|
//#region src/core/config/config-resolver.ts
|
|
310
303
|
var ConfigResolver = class ConfigResolver {
|
|
@@ -402,7 +395,6 @@ var ConfigResolver = class ConfigResolver {
|
|
|
402
395
|
});
|
|
403
396
|
}
|
|
404
397
|
};
|
|
405
|
-
|
|
406
398
|
//#endregion
|
|
407
399
|
//#region src/core/errors/error-codes.ts
|
|
408
400
|
/**
|
|
@@ -459,7 +451,6 @@ function buildReverseMap() {
|
|
|
459
451
|
return objectFromEntries(entries);
|
|
460
452
|
}
|
|
461
453
|
const ErrorCode = buildReverseMap();
|
|
462
|
-
|
|
463
454
|
//#endregion
|
|
464
455
|
//#region src/core/errors/error-messages.ts
|
|
465
456
|
/**
|
|
@@ -497,7 +488,6 @@ const ErrorMessages = {
|
|
|
497
488
|
DCENT_NOT_IN_BROWSER: "D'CENT in-app browser not detected",
|
|
498
489
|
DCENT_SIGN_REJECTED: "Transaction rejected in D'CENT wallet"
|
|
499
490
|
};
|
|
500
|
-
|
|
501
491
|
//#endregion
|
|
502
492
|
//#region src/core/errors/wallet-error.ts
|
|
503
493
|
var WalletError = class extends Error {
|
|
@@ -512,7 +502,6 @@ var WalletError = class extends Error {
|
|
|
512
502
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
513
503
|
}
|
|
514
504
|
};
|
|
515
|
-
|
|
516
505
|
//#endregion
|
|
517
506
|
//#region src/core/connectors/dcent/dcent-error.ts
|
|
518
507
|
var DcentError = class extends WalletError {
|
|
@@ -524,7 +513,6 @@ var DcentError = class extends WalletError {
|
|
|
524
513
|
return null;
|
|
525
514
|
}
|
|
526
515
|
};
|
|
527
|
-
|
|
528
516
|
//#endregion
|
|
529
517
|
//#region src/core/connectors/ledger/ledger-error.ts
|
|
530
518
|
var LedgerError = class LedgerError extends WalletError {
|
|
@@ -574,7 +562,6 @@ var LedgerError = class LedgerError extends WalletError {
|
|
|
574
562
|
return null;
|
|
575
563
|
}
|
|
576
564
|
};
|
|
577
|
-
|
|
578
565
|
//#endregion
|
|
579
566
|
//#region src/core/utils/chain-utils.ts
|
|
580
567
|
/**
|
|
@@ -603,7 +590,6 @@ var ChainUtils = class ChainUtils {
|
|
|
603
590
|
return map;
|
|
604
591
|
}
|
|
605
592
|
};
|
|
606
|
-
|
|
607
593
|
//#endregion
|
|
608
594
|
//#region src/core/connectors/metamask/metamask-error.ts
|
|
609
595
|
var MetaMaskError = class MetaMaskError extends WalletError {
|
|
@@ -616,7 +602,6 @@ var MetaMaskError = class MetaMaskError extends WalletError {
|
|
|
616
602
|
return null;
|
|
617
603
|
}
|
|
618
604
|
};
|
|
619
|
-
|
|
620
605
|
//#endregion
|
|
621
606
|
//#region src/core/connectors/wallet-connect/wallet-connect-error.ts
|
|
622
607
|
var WalletConnectError = class WalletConnectError extends WalletError {
|
|
@@ -629,7 +614,6 @@ var WalletConnectError = class WalletConnectError extends WalletError {
|
|
|
629
614
|
return null;
|
|
630
615
|
}
|
|
631
616
|
};
|
|
632
|
-
|
|
633
617
|
//#endregion
|
|
634
618
|
//#region src/core/connectors/xaman/xaman-error.ts
|
|
635
619
|
var XamanError = class extends WalletError {
|
|
@@ -641,7 +625,6 @@ var XamanError = class extends WalletError {
|
|
|
641
625
|
return null;
|
|
642
626
|
}
|
|
643
627
|
};
|
|
644
|
-
|
|
645
628
|
//#endregion
|
|
646
629
|
//#region src/core/errors/wallet-error-helper.ts
|
|
647
630
|
var WalletErrorHelper = class {
|
|
@@ -660,7 +643,6 @@ var WalletErrorHelper = class {
|
|
|
660
643
|
}
|
|
661
644
|
}
|
|
662
645
|
};
|
|
663
|
-
|
|
664
646
|
//#endregion
|
|
665
647
|
//#region src/core/utils/error-utils.ts
|
|
666
648
|
var ErrorUtils = class ErrorUtils {
|
|
@@ -679,7 +661,6 @@ var ErrorUtils = class ErrorUtils {
|
|
|
679
661
|
return new Error(ErrorUtils.extractMessage(error));
|
|
680
662
|
}
|
|
681
663
|
};
|
|
682
|
-
|
|
683
664
|
//#endregion
|
|
684
665
|
//#region src/core/connectors/connector-events.ts
|
|
685
666
|
var ConnectorEventEmitter = class {
|
|
@@ -745,7 +726,6 @@ var ConnectorEventEmitter = class {
|
|
|
745
726
|
return addresses;
|
|
746
727
|
}
|
|
747
728
|
};
|
|
748
|
-
|
|
749
729
|
//#endregion
|
|
750
730
|
//#region src/core/connectors/base-connector.ts
|
|
751
731
|
var BaseConnector = class {
|
|
@@ -802,7 +782,6 @@ var BaseConnector = class {
|
|
|
802
782
|
});
|
|
803
783
|
}
|
|
804
784
|
};
|
|
805
|
-
|
|
806
785
|
//#endregion
|
|
807
786
|
//#region src/core/clients/xrp/base-xrpl-client.ts
|
|
808
787
|
var BaseXrplClient = class extends Client {
|
|
@@ -836,7 +815,6 @@ var BaseXrplClient = class extends Client {
|
|
|
836
815
|
}
|
|
837
816
|
}
|
|
838
817
|
};
|
|
839
|
-
|
|
840
818
|
//#endregion
|
|
841
819
|
//#region src/core/clients/xrp/xrpl-client.ts
|
|
842
820
|
var XrplClient = class extends BaseXrplClient {
|
|
@@ -851,7 +829,6 @@ var XrplClient = class extends BaseXrplClient {
|
|
|
851
829
|
await super.onDestroy();
|
|
852
830
|
}
|
|
853
831
|
};
|
|
854
|
-
|
|
855
832
|
//#endregion
|
|
856
833
|
//#region src/core/connectors/dcent/dcent-xrpl-client.ts
|
|
857
834
|
var DcentXrpClient = class {
|
|
@@ -891,7 +868,6 @@ var DcentXrpClient = class {
|
|
|
891
868
|
}
|
|
892
869
|
async onDestroy() {}
|
|
893
870
|
};
|
|
894
|
-
|
|
895
871
|
//#endregion
|
|
896
872
|
//#region src/core/connectors/dcent/dcent-connector.ts
|
|
897
873
|
const DCENT_NETWORK_MAP = {
|
|
@@ -965,7 +941,6 @@ var DcentConnector = class DcentConnector extends BaseConnector {
|
|
|
965
941
|
return this.store.getSnapshot().context.connectionState;
|
|
966
942
|
}
|
|
967
943
|
};
|
|
968
|
-
|
|
969
944
|
//#endregion
|
|
970
945
|
//#region src/core/shared/bip44.ts
|
|
971
946
|
const BIP44_HARDENED_OFFSET = 2147483648;
|
|
@@ -1113,7 +1088,6 @@ var Bip44 = class Bip44 {
|
|
|
1113
1088
|
return component.hardened ? component.value + BIP44_HARDENED_OFFSET : component.value;
|
|
1114
1089
|
}
|
|
1115
1090
|
};
|
|
1116
|
-
|
|
1117
1091
|
//#endregion
|
|
1118
1092
|
//#region src/core/shared/connection-mutex.ts
|
|
1119
1093
|
/**
|
|
@@ -1138,7 +1112,6 @@ var ConnectionMutex = class {
|
|
|
1138
1112
|
}
|
|
1139
1113
|
}
|
|
1140
1114
|
};
|
|
1141
|
-
|
|
1142
1115
|
//#endregion
|
|
1143
1116
|
//#region src/core/connectors/ledger/internal/ledger-hex-utils.ts
|
|
1144
1117
|
var LedgerHexUtils = class {
|
|
@@ -1152,7 +1125,6 @@ var LedgerHexUtils = class {
|
|
|
1152
1125
|
return `0x${Array.from(buffer).map((item) => item.toString(16).padStart(2, "0")).join("")}`;
|
|
1153
1126
|
}
|
|
1154
1127
|
};
|
|
1155
|
-
|
|
1156
1128
|
//#endregion
|
|
1157
1129
|
//#region src/core/connectors/ledger/internal/ledger-address-helper.ts
|
|
1158
1130
|
var LedgerAddressHelper = class {
|
|
@@ -1170,7 +1142,6 @@ var LedgerAddressHelper = class {
|
|
|
1170
1142
|
return publicKeyToAddress(LedgerHexUtils.fromBuffer(point.toBytes(false)));
|
|
1171
1143
|
}
|
|
1172
1144
|
};
|
|
1173
|
-
|
|
1174
1145
|
//#endregion
|
|
1175
1146
|
//#region src/core/connectors/ledger/apps/ledger-app-verification.ts
|
|
1176
1147
|
const MAX_ATTEMPTS = 4;
|
|
@@ -1190,7 +1161,6 @@ async function getActiveAppName(transport) {
|
|
|
1190
1161
|
const nameLength = response[1];
|
|
1191
1162
|
return response.subarray(2, 2 + nameLength).toString("ascii");
|
|
1192
1163
|
}
|
|
1193
|
-
|
|
1194
1164
|
//#endregion
|
|
1195
1165
|
//#region src/core/connectors/ledger/apps/ethereum/ethereum-viem-adapter.ts
|
|
1196
1166
|
async function ledgerToEthAccount({ ledger, derivationPath }) {
|
|
@@ -1252,7 +1222,6 @@ async function ledgerToEthAccount({ ledger, derivationPath }) {
|
|
|
1252
1222
|
source: "ledger"
|
|
1253
1223
|
};
|
|
1254
1224
|
}
|
|
1255
|
-
|
|
1256
1225
|
//#endregion
|
|
1257
1226
|
//#region src/core/connectors/ledger/apps/ethereum/ethereum-ledger-app.ts
|
|
1258
1227
|
var EthereumLedgerApp = class extends Eth {
|
|
@@ -1279,7 +1248,6 @@ var EthereumLedgerApp = class extends Eth {
|
|
|
1279
1248
|
await verifyLedgerAppActive(this.transport, this.appName);
|
|
1280
1249
|
}
|
|
1281
1250
|
};
|
|
1282
|
-
|
|
1283
1251
|
//#endregion
|
|
1284
1252
|
//#region src/core/connectors/ledger/apps/flare/flare-viem-adapter.ts
|
|
1285
1253
|
async function ledgerToFlareAccount({ ledger, derivationPath }) {
|
|
@@ -1322,7 +1290,6 @@ async function ledgerToFlareAccount({ ledger, derivationPath }) {
|
|
|
1322
1290
|
source: "ledger"
|
|
1323
1291
|
};
|
|
1324
1292
|
}
|
|
1325
|
-
|
|
1326
1293
|
//#endregion
|
|
1327
1294
|
//#region src/core/connectors/ledger/apps/flare/flare-ledger-app.ts
|
|
1328
1295
|
var FlareLedgerApp = class extends FlareApp {
|
|
@@ -1350,7 +1317,6 @@ var FlareLedgerApp = class extends FlareApp {
|
|
|
1350
1317
|
await verifyLedgerAppActive(this.transport, this.appName);
|
|
1351
1318
|
}
|
|
1352
1319
|
};
|
|
1353
|
-
|
|
1354
1320
|
//#endregion
|
|
1355
1321
|
//#region src/core/connectors/ledger/apps/xrp/xrp-ledger-app.ts
|
|
1356
1322
|
var XrpLedgerApp = class extends Xrp {
|
|
@@ -1372,7 +1338,6 @@ var XrpLedgerApp = class extends Xrp {
|
|
|
1372
1338
|
await verifyLedgerAppActive(this.transport, this.appName);
|
|
1373
1339
|
}
|
|
1374
1340
|
};
|
|
1375
|
-
|
|
1376
1341
|
//#endregion
|
|
1377
1342
|
//#region src/core/connectors/ledger/internal/ledger-app-factory.ts
|
|
1378
1343
|
const CHAIN_TO_APP = {
|
|
@@ -1403,7 +1368,6 @@ var LedgerAppFactory = class {
|
|
|
1403
1368
|
}
|
|
1404
1369
|
}
|
|
1405
1370
|
};
|
|
1406
|
-
|
|
1407
1371
|
//#endregion
|
|
1408
1372
|
//#region src/core/chains/viem/viem-helper.ts
|
|
1409
1373
|
var ViemHelper = class ViemHelper {
|
|
@@ -1447,7 +1411,6 @@ var ViemHelper = class ViemHelper {
|
|
|
1447
1411
|
};
|
|
1448
1412
|
}
|
|
1449
1413
|
};
|
|
1450
|
-
|
|
1451
1414
|
//#endregion
|
|
1452
1415
|
//#region src/core/clients/base-evm-client.ts
|
|
1453
1416
|
var BaseEvmClient = class {
|
|
@@ -1459,7 +1422,6 @@ var BaseEvmClient = class {
|
|
|
1459
1422
|
}
|
|
1460
1423
|
async onDestroy() {}
|
|
1461
1424
|
};
|
|
1462
|
-
|
|
1463
1425
|
//#endregion
|
|
1464
1426
|
//#region src/core/clients/evm/evm-client.ts
|
|
1465
1427
|
/**
|
|
@@ -1522,7 +1484,6 @@ var EvmClient = class EvmClient extends BaseEvmClient {
|
|
|
1522
1484
|
return this.chainConfig;
|
|
1523
1485
|
}
|
|
1524
1486
|
};
|
|
1525
|
-
|
|
1526
1487
|
//#endregion
|
|
1527
1488
|
//#region src/core/connectors/ledger/clients/ledger-evm-client.ts
|
|
1528
1489
|
var LedgerEvmClient = class LedgerEvmClient extends EvmClient {
|
|
@@ -1537,7 +1498,6 @@ var LedgerEvmClient = class LedgerEvmClient extends EvmClient {
|
|
|
1537
1498
|
return this._app;
|
|
1538
1499
|
}
|
|
1539
1500
|
};
|
|
1540
|
-
|
|
1541
1501
|
//#endregion
|
|
1542
1502
|
//#region src/core/connectors/ledger/clients/ledger-xrp-client.ts
|
|
1543
1503
|
var LedgerXrpClient = class extends XrplClient {
|
|
@@ -1566,7 +1526,6 @@ var LedgerXrpClient = class extends XrplClient {
|
|
|
1566
1526
|
return (await this.submitAndWait(prepared)).result.hash;
|
|
1567
1527
|
}
|
|
1568
1528
|
};
|
|
1569
|
-
|
|
1570
1529
|
//#endregion
|
|
1571
1530
|
//#region src/core/connectors/ledger/internal/ledger-client-factory.ts
|
|
1572
1531
|
var LedgerClientFactory = class {
|
|
@@ -1591,7 +1550,6 @@ var LedgerClientFactory = class {
|
|
|
1591
1550
|
throw new LedgerError("COMMON_CHAIN_NOT_SUPPORTED");
|
|
1592
1551
|
}
|
|
1593
1552
|
};
|
|
1594
|
-
|
|
1595
1553
|
//#endregion
|
|
1596
1554
|
//#region src/core/storage/local-storage-manager.ts
|
|
1597
1555
|
var LocalStorageManager = class {
|
|
@@ -1640,7 +1598,6 @@ var LocalStorageManager = class {
|
|
|
1640
1598
|
keysToRemove.forEach((key) => localStorage.removeItem(key));
|
|
1641
1599
|
}
|
|
1642
1600
|
};
|
|
1643
|
-
|
|
1644
1601
|
//#endregion
|
|
1645
1602
|
//#region src/core/storage/local-storage-schema.ts
|
|
1646
1603
|
/**
|
|
@@ -1651,7 +1608,6 @@ const mwcStorage = new LocalStorageManager({
|
|
|
1651
1608
|
prefix: "mwc",
|
|
1652
1609
|
separator: ":"
|
|
1653
1610
|
});
|
|
1654
|
-
|
|
1655
1611
|
//#endregion
|
|
1656
1612
|
//#region src/core/connectors/ledger/internal/ledger-storage.ts
|
|
1657
1613
|
var LedgerStorage = class {
|
|
@@ -1684,7 +1640,6 @@ var LedgerStorage = class {
|
|
|
1684
1640
|
}
|
|
1685
1641
|
};
|
|
1686
1642
|
const ledgerStorage = new LedgerStorage(mwcStorage);
|
|
1687
|
-
|
|
1688
1643
|
//#endregion
|
|
1689
1644
|
//#region src/core/connectors/ledger/internal/ledger-session-manager.ts
|
|
1690
1645
|
var LedgerSessionManager = class {
|
|
@@ -1725,7 +1680,6 @@ var LedgerSessionManager = class {
|
|
|
1725
1680
|
ledgerStorage.clear();
|
|
1726
1681
|
}
|
|
1727
1682
|
};
|
|
1728
|
-
|
|
1729
1683
|
//#endregion
|
|
1730
1684
|
//#region src/core/connectors/ledger/internal/ledger-transport-manager.ts
|
|
1731
1685
|
var LedgerTransportManager = class {
|
|
@@ -1829,7 +1783,6 @@ var LedgerTransportManager = class {
|
|
|
1829
1783
|
if (this.transport && this.disconnectHandler) this.transport.on("disconnect", this.disconnectHandler);
|
|
1830
1784
|
}
|
|
1831
1785
|
};
|
|
1832
|
-
|
|
1833
1786
|
//#endregion
|
|
1834
1787
|
//#region src/core/connectors/ledger/ledger-connector.ts
|
|
1835
1788
|
var LedgerConnector = class extends BaseConnector {
|
|
@@ -1995,7 +1948,6 @@ var LedgerConnector = class extends BaseConnector {
|
|
|
1995
1948
|
if (currentApp.name !== requiredApp) throw new LedgerError("LEDGER_WRONG_APP", /* @__PURE__ */ new Error(`Please open the ${requiredApp} app on your Ledger. Currently running: ${currentApp.name}`));
|
|
1996
1949
|
}
|
|
1997
1950
|
};
|
|
1998
|
-
|
|
1999
1951
|
//#endregion
|
|
2000
1952
|
//#region src/core/connectors/metamask/metamask-connector.ts
|
|
2001
1953
|
const RPC_ERROR = {
|
|
@@ -2169,7 +2121,6 @@ var MetaMaskConnector = class extends BaseConnector {
|
|
|
2169
2121
|
return this.store.getSnapshot().context.caip2;
|
|
2170
2122
|
}
|
|
2171
2123
|
};
|
|
2172
|
-
|
|
2173
2124
|
//#endregion
|
|
2174
2125
|
//#region src/core/connectors/wallet-connect/clients/wallet-connect-evm-client.ts
|
|
2175
2126
|
/**
|
|
@@ -2192,7 +2143,6 @@ var WalletConnectEvmClient = class WalletConnectEvmClient extends EvmClient {
|
|
|
2192
2143
|
}));
|
|
2193
2144
|
}
|
|
2194
2145
|
};
|
|
2195
|
-
|
|
2196
2146
|
//#endregion
|
|
2197
2147
|
//#region src/core/connectors/wallet-connect/clients/wallet-connect-xrpl-client.ts
|
|
2198
2148
|
var WalletConnectXrpClient = class extends XrplClient {
|
|
@@ -2240,7 +2190,6 @@ var WalletConnectXrpClient = class extends XrplClient {
|
|
|
2240
2190
|
return (this.provider.session?.peer.metadata.name ?? "unknown").toLowerCase().includes("girin");
|
|
2241
2191
|
}
|
|
2242
2192
|
};
|
|
2243
|
-
|
|
2244
2193
|
//#endregion
|
|
2245
2194
|
//#region src/core/connectors/wallet-connect/internal/wallet-connect-client-factory.ts
|
|
2246
2195
|
var WalletConnectClientFactory = class {
|
|
@@ -2257,7 +2206,6 @@ var WalletConnectClientFactory = class {
|
|
|
2257
2206
|
throw new WalletConnectError("COMMON_CHAIN_NOT_SUPPORTED");
|
|
2258
2207
|
}
|
|
2259
2208
|
};
|
|
2260
|
-
|
|
2261
2209
|
//#endregion
|
|
2262
2210
|
//#region src/core/connectors/wallet-connect/internal/wallet-connect-session-storage.ts
|
|
2263
2211
|
var SessionStorage = class {
|
|
@@ -2289,7 +2237,6 @@ var SessionStorage = class {
|
|
|
2289
2237
|
}
|
|
2290
2238
|
};
|
|
2291
2239
|
const sessionStorage = new SessionStorage(mwcStorage);
|
|
2292
|
-
|
|
2293
2240
|
//#endregion
|
|
2294
2241
|
//#region src/core/connectors/wallet-connect/internal/wallet-connect-session-manager.ts
|
|
2295
2242
|
var WalletConnectSessionManager = class {
|
|
@@ -2364,7 +2311,6 @@ var WalletConnectSessionManager = class {
|
|
|
2364
2311
|
return namespaces;
|
|
2365
2312
|
}
|
|
2366
2313
|
};
|
|
2367
|
-
|
|
2368
2314
|
//#endregion
|
|
2369
2315
|
//#region src/core/connectors/wallet-connect/wallet-connect-connector.ts
|
|
2370
2316
|
/**
|
|
@@ -2554,7 +2500,6 @@ var WalletConnectConnector = class extends BaseConnector {
|
|
|
2554
2500
|
return this.store.getSnapshot().context.caip2;
|
|
2555
2501
|
}
|
|
2556
2502
|
};
|
|
2557
|
-
|
|
2558
2503
|
//#endregion
|
|
2559
2504
|
//#region src/core/connectors/xaman/xaman-xrpl-client.ts
|
|
2560
2505
|
var XamanClient = class XamanClient extends Xumm {
|
|
@@ -2612,7 +2557,6 @@ var XamanClient = class XamanClient extends Xumm {
|
|
|
2612
2557
|
return `xrpl:${networkId}`;
|
|
2613
2558
|
}
|
|
2614
2559
|
};
|
|
2615
|
-
|
|
2616
2560
|
//#endregion
|
|
2617
2561
|
//#region src/core/connectors/xaman/xaman-connector.ts
|
|
2618
2562
|
var XamanConnector = class extends BaseConnector {
|
|
@@ -2698,7 +2642,6 @@ var XamanConnector = class extends BaseConnector {
|
|
|
2698
2642
|
return this.store.getSnapshot().context.caip2;
|
|
2699
2643
|
}
|
|
2700
2644
|
};
|
|
2701
|
-
|
|
2702
2645
|
//#endregion
|
|
2703
2646
|
//#region src/core/connectors/connector-factory.ts
|
|
2704
2647
|
const DEFAULT_METADATA = {
|
|
@@ -2741,7 +2684,6 @@ var ConnectorFactory = class {
|
|
|
2741
2684
|
}
|
|
2742
2685
|
}
|
|
2743
2686
|
};
|
|
2744
|
-
|
|
2745
2687
|
//#endregion
|
|
2746
2688
|
//#region src/core/stores/wallet-store/aggregate-wallet-store.ts
|
|
2747
2689
|
const createAggregateWalletStore = (stores) => {
|
|
@@ -2753,7 +2695,6 @@ const createAggregateWalletStore = (stores) => {
|
|
|
2753
2695
|
} }) }
|
|
2754
2696
|
});
|
|
2755
2697
|
};
|
|
2756
|
-
|
|
2757
2698
|
//#endregion
|
|
2758
2699
|
//#region src/core/stores/wallet-store/wallet-store.ts
|
|
2759
2700
|
const INITIAL_STATE = {
|
|
@@ -2855,7 +2796,6 @@ const createWalletStore = (walletType) => {
|
|
|
2855
2796
|
}
|
|
2856
2797
|
});
|
|
2857
2798
|
};
|
|
2858
|
-
|
|
2859
2799
|
//#endregion
|
|
2860
2800
|
//#region src/core/multichain/multichain.ts
|
|
2861
2801
|
var MultiChain = class {
|
|
@@ -2988,7 +2928,7 @@ var MultiChain = class {
|
|
|
2988
2928
|
this.subscriptions.push(store.subscribe(sync));
|
|
2989
2929
|
}
|
|
2990
2930
|
};
|
|
2991
|
-
|
|
2992
2931
|
//#endregion
|
|
2993
2932
|
export { objectFromEntries as _, WalletErrorHelper as a, shortenAddress as b, MetaMaskError as c, WalletError as d, ErrorCode as f, objectEntries as g, ChainGuards as h, DcentConnector as i, LedgerError as l, evmCaip2s as m, EvmClient as n, XamanError as o, ConfigResolver as p, Bip44 as r, WalletConnectError as s, MultiChain as t, DcentError as u, objectKeys as v, objectValues as y };
|
|
2994
|
-
|
|
2933
|
+
|
|
2934
|
+
//# sourceMappingURL=core-COrQHAyb.mjs.map
|