MCPcopy Index your code
hub / github.com/anomalyco/opencode / assertSecret

Method assertSecret

packages/function/src/api.ts:86–88  ·  view source on GitHub ↗
(secret: string)

Source from the content-addressed store, hash-verified

84 }
85
86 public async assertSecret(secret: string) {
87 if (secret !== (await this.getSecret())) throw new Error("Invalid secret")
88 }
89
90 private async getSecret() {
91 return this.ctx.storage.get<string>("secret")

Callers 1

api.tsFile · 0.80

Calls 1

getSecretMethod · 0.95

Tested by

no test coverage detected