Metakit / @doeixd/metakit/build

attestClaims

function · packages/metakit/src/ops/lawEquations.ts:54

function attestClaims(
  op: Node.ForeignOp & {
    readonly args: ReadonlyArray<Schema.Top>
  },
  foreign: ForeignImplementations,
  samples: ClaimSamples,
): {
  readonly results: ReadonlyArray<ClaimResult>
  readonly evidence: Option.Option<ForeignRewriteEvidence>
}

Run each claim op declares on the tuples samples gives it, through the implementations in foreign. Evidence, at assurance tested, covers only the claims that held on at least one tuple where both sides returned values, and is bound to every binding in foreign. Throws on a tuple whose length is not op.args.length.