@txnlab/use-wallet 3.0.0 → 3.1.1

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/index.cjs CHANGED
@@ -3418,7 +3418,7 @@ module.exports = __toCommonJS(src_exports);
3418
3418
 
3419
3419
  // src/manager.ts
3420
3420
  var import_store13 = require("@tanstack/store");
3421
- var import_algosdk11 = __toESM(require("algosdk"), 1);
3421
+ var import_algosdk12 = __toESM(require("algosdk"), 1);
3422
3422
 
3423
3423
  // src/network.ts
3424
3424
  var NetworkId = /* @__PURE__ */ ((NetworkId2) => {
@@ -3620,7 +3620,10 @@ var DeflyWallet = class extends BaseWallet {
3620
3620
  };
3621
3621
  async initializeClient() {
3622
3622
  console.info(`[${this.metadata.name}] Initializing client...`);
3623
- const module2 = await import("@blockshake/defly-connect");
3623
+ const module2 = await import(
3624
+ /* webpackIgnore: true */
3625
+ "@blockshake/defly-connect"
3626
+ );
3624
3627
  const DeflyWalletConnect = module2.default ? module2.default.DeflyWalletConnect : module2.DeflyWalletConnect;
3625
3628
  const client = new DeflyWalletConnect(this.options);
3626
3629
  client.connector?.on("disconnect", this.onDisconnect);
@@ -4061,7 +4064,10 @@ var KibisisWallet = class _KibisisWallet extends BaseWallet {
4061
4064
  console.info(
4062
4065
  `[${_KibisisWallet.name}]#${_functionName}: initializing @agoralabs-sh/avm-web-provider...`
4063
4066
  );
4064
- this.avmWebProviderSDK = await import("@agoralabs-sh/avm-web-provider");
4067
+ this.avmWebProviderSDK = await import(
4068
+ /* webpackIgnore: true */
4069
+ "@agoralabs-sh/avm-web-provider"
4070
+ );
4065
4071
  if (!this.avmWebProviderSDK) {
4066
4072
  throw new Error(
4067
4073
  "failed to initialize, the @agoralabs-sh/avm-web-provider sdk was not provided"
@@ -4486,7 +4492,10 @@ var LuteWallet = class extends BaseWallet {
4486
4492
  };
4487
4493
  async initializeClient() {
4488
4494
  console.info(`[${this.metadata.name}] Initializing client...`);
4489
- const module2 = await import("lute-connect");
4495
+ const module2 = await import(
4496
+ /* webpackIgnore: true */
4497
+ "lute-connect"
4498
+ );
4490
4499
  const LuteConnect = module2.default;
4491
4500
  const client = new LuteConnect(this.options.siteName);
4492
4501
  this.client = client;
@@ -4969,7 +4978,10 @@ var PeraWallet = class extends BaseWallet {
4969
4978
  };
4970
4979
  async initializeClient() {
4971
4980
  console.info(`[${this.metadata.name}] Initializing client...`);
4972
- const module2 = await import("@perawallet/connect");
4981
+ const module2 = await import(
4982
+ /* webpackIgnore: true */
4983
+ "@perawallet/connect"
4984
+ );
4973
4985
  const PeraWalletConnect = module2.default ? module2.default.PeraWalletConnect : module2.PeraWalletConnect;
4974
4986
  const client = new PeraWalletConnect(this.options);
4975
4987
  client.connector?.on("disconnect", this.onDisconnect);
@@ -5135,7 +5147,10 @@ var PeraWallet2 = class extends BaseWallet {
5135
5147
  };
5136
5148
  async initializeClient() {
5137
5149
  console.info(`[${this.metadata.name}] Initializing client...`);
5138
- const module2 = await import("@perawallet/connect-beta");
5150
+ const module2 = await import(
5151
+ /* webpackIgnore: true */
5152
+ "@perawallet/connect-beta"
5153
+ );
5139
5154
  const PeraWalletConnect = module2.PeraWalletConnect || module2.default.PeraWalletConnect;
5140
5155
  const client = new PeraWalletConnect(this.options);
5141
5156
  client.client?.on("session_delete", this.onDisconnect);
@@ -5442,7 +5457,10 @@ var WalletConnect = class extends BaseWallet {
5442
5457
  }
5443
5458
  async initializeClient() {
5444
5459
  console.info(`[${this.metadata.name}] Initializing client...`);
5445
- const SignClient = (await import("@walletconnect/sign-client")).SignClient;
5460
+ const SignClient = (await import(
5461
+ /* webpackIgnore: true */
5462
+ "@walletconnect/sign-client"
5463
+ )).SignClient;
5446
5464
  const client = await SignClient.init(this.options);
5447
5465
  client.on("session_event", (args) => {
5448
5466
  console.log(`[${this.metadata.name}] EVENT`, "session_event", args);
@@ -5463,7 +5481,10 @@ var WalletConnect = class extends BaseWallet {
5463
5481
  }
5464
5482
  async initializeModal() {
5465
5483
  console.info(`[${this.metadata.name}] Initializing modal...`);
5466
- const WalletConnectModal = (await import("@walletconnect/modal")).WalletConnectModal;
5484
+ const WalletConnectModal = (await import(
5485
+ /* webpackIgnore: true */
5486
+ "@walletconnect/modal"
5487
+ )).WalletConnectModal;
5467
5488
  const modal = new WalletConnectModal({
5468
5489
  projectId: this.options.projectId,
5469
5490
  chains: this.chains,
@@ -5865,10 +5886,12 @@ var CustomWallet = class extends BaseWallet {
5865
5886
  };
5866
5887
 
5867
5888
  // src/store.ts
5889
+ var import_algosdk11 = require("algosdk");
5868
5890
  var defaultState = {
5869
5891
  wallets: {},
5870
5892
  activeWallet: null,
5871
- activeNetwork: "testnet" /* TESTNET */
5893
+ activeNetwork: "testnet" /* TESTNET */,
5894
+ algodClient: new import_algosdk11.Algodv2("", "https://testnet-api.algonode.cloud/")
5872
5895
  };
5873
5896
  var LOCAL_STORAGE_KEY = "@txnlab/use-wallet:v3";
5874
5897
  function addWallet(store, { walletId, wallet }) {
@@ -6111,7 +6134,7 @@ var WalletManager = class {
6111
6134
  createAlgodClient(config) {
6112
6135
  console.info(`[Manager] Creating Algodv2 client for ${this.activeNetwork}...`);
6113
6136
  const { token = "", baseServer, port = "", headers = {} } = config;
6114
- return new import_algosdk11.default.Algodv2(token, baseServer, port, headers);
6137
+ return new import_algosdk12.default.Algodv2(token, baseServer, port, headers);
6115
6138
  }
6116
6139
  getAlgodClient = () => {
6117
6140
  return this.algodClient;