@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/README.md +19 -0
- package/dist/index.cjs +3 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +3 -1
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
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
|