Debugging & Error Handling
import { Arc402 } from "arc402-sdk";
const arc = new Arc402({ apiKey: process.env.ARC402_API_KEY });
try {
const result = await arc.submitSignal({ type: "testAction", payload: { value: 42 } });
console.log("Signal processed successfully:", result);
const proof = await arc.verifyDecision(result.id);
console.log("Decision proof is valid:", proof.valid);
} catch (error) {
console.error("Encountered an error while processing the signal:", error.message);
}
Last updated