mirror of
https://github.com/stablyai/orca.git
synced 2026-11-18 03:45:08 +00:00
fix(cloud): grant sealer records the device only when the script provides the ledger path
This commit is contained in:
File diff suppressed because one or more lines are too long
@@ -47,7 +47,7 @@ process.stdin.on("data", (c) => (input += c)).on("end", () => {
|
||||
console.error("offer unavailable")
|
||||
process.exit(1)
|
||||
}
|
||||
require("node:fs").appendFileSync(process.env.ORCA_GRANT_LEDGER, res.deviceId + "\n", { mode: 0o600 })
|
||||
if (process.env.ORCA_GRANT_LEDGER) require("node:fs").appendFileSync(process.env.ORCA_GRANT_LEDGER, res.deviceId + "\n", { mode: 0o600 })
|
||||
const recipient = Buffer.from(process.env.ORCA_GRANT_RECIPIENT_KEY, "base64")
|
||||
if (recipient.length !== 32) { console.error("bad key length"); process.exit(2) }
|
||||
const recipientKey = crypto.createPublicKey({ key: { kty: "OKP", crv: "X25519", x: recipient.toString("base64url") }, format: "jwk" })
|
||||
|
||||
Reference in New Issue
Block a user