openclaw-overlay-plugin 0.8.44 → 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
@@ -139486,7 +139486,7 @@ var plugin = definePluginEntry({
139486
139486
  name: "BSV Overlay Network",
139487
139487
  description: "OpenClaw Overlay \u2014 decentralized agent marketplace with BSV micropayments",
139488
139488
  register(api) {
139489
- const version = "0.8.44";
139489
+ const version = "0.8.45";
139490
139490
  if (isInitialized) return;
139491
139491
  isInitialized = true;
139492
139492
  const config = api.pluginConfig || {};
@@ -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;