Skip to content

Commit

Permalink
Add verifySignature to example (#2185)
Browse files Browse the repository at this point in the history
Clearing out an old branch of code changes I made migrating example to
pod.org docs.
I realized the example code didn't include any calls to
verifySignature(), so added one here.
  • Loading branch information
artwyman authored Dec 11, 2024
1 parent 77f5c78 commit 0707741
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions examples/pod-gpc-example/src/podExample.ts
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,9 @@ export async function podDemo(): Promise<boolean> {
// recreate it without signing again.
const loadedPOD = POD.load(sampleEntries, signature, signerPublicKey);
console.log("Loaded POD content ID", loadedPOD.contentID);
if (!loadedPOD.verifySignature()) {
throw new Error("Bad POD!");
}

//////////////////////////////////////////////////////////////////////////////
// POD contents can be serialized to/from a JSON-compatible format, which can
Expand Down

0 comments on commit 0707741

Please sign in to comment.