openclaw-overlay-plugin 0.8.45 → 0.8.46

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.js CHANGED
@@ -139500,6 +139500,16 @@ var plugin = definePluginEntry({
139500
139500
  const httpToken = config.credentials && config.credentials.hooksToken || "";
139501
139501
  const dailyBudgetSats = config.dailyBudgetSats || 5e3;
139502
139502
  api.logger?.info?.(`[openclaw-overlay] Initializing Plugin v${version}`);
139503
+ async function checkFunding(api2) {
139504
+ try {
139505
+ syncEnv();
139506
+ const wallet = await BSVAgentWallet.load({ network, storageDir: walletDir });
139507
+ const balance = await wallet.getBalance();
139508
+ await wallet.destroy();
139509
+ if (balance < 500) api2.logger.warn(`[overlay] Wallet has low balance (${balance} sats).`);
139510
+ } catch (err) {
139511
+ }
139512
+ }
139503
139513
  function syncEnv() {
139504
139514
  const env = process["env"];
139505
139515
  env.BSV_WALLET_DIR = walletDir;