-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathindex.js
More file actions
25 lines (25 loc) · 727 Bytes
/
Copy pathindex.js
File metadata and controls
25 lines (25 loc) · 727 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
export const PETAL = "GPG-Gold";
export const INVARIANT = "GPG_STATIONARY";
export function verify(input) {
if (!input || typeof input !== "object") {
return {
pass: false,
stationary: false,
signal: "gpg-gold:INVALID_INPUT",
reason: "input must be an object"
};
}
const stationary =
input.repo === "Riverbraid-GPG-Gold" &&
input.petal === "GPG-Gold" &&
input.ring === 1 &&
input.invariant === "GPG_STATIONARY";
return {
pass: true,
stationary,
signal: stationary ? "gpg-gold:STATIONARY" : "gpg-gold:DRIFT",
reason: stationary
? "Stationary fields match declared petal identity"
: "One or more stationary fields drift from declaration"
};
}