@dyne/interfacer-client 0.7.0 → 0.7.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.js CHANGED
@@ -2675,13 +2675,15 @@ var WalletClient = class {
2675
2675
  amount: String(amount),
2676
2676
  owner: agentId
2677
2677
  });
2678
- const headers = await signGraphQLRequest(body, this.store);
2678
+ const headers = await signDidRequest(body, this.store);
2679
2679
  const res = await fetch(walletUrl, {
2680
2680
  method: "POST",
2681
2681
  headers: { ...headers, "Content-Type": "application/json" },
2682
2682
  body
2683
2683
  });
2684
2684
  if (!res.ok) throw new Error(`Wallet addPoints failed: ${res.statusText}`);
2685
+ const data = await res.json();
2686
+ if (data?.success !== true) throw new Error(`Wallet addPoints refused: ${data?.error ?? "unknown"}`);
2685
2687
  }
2686
2688
  /**
2687
2689
  * Issue points for a ValueFlows/social event. Unlike addPoints, the caller