• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

hyperledger-identus / sdk-ts / 14516774575

17 Apr 2025 01:26PM UTC coverage: 76.22% (+0.7%) from 75.544%
14516774575

Pull #415

github

web-flow
Merge 63da50b9d into 0bddae204
Pull Request #415: feat: OIDC moving to plugin

1439 of 2086 branches covered (68.98%)

Branch coverage included in aggregate %.

116 of 211 new or added lines in 19 files covered. (54.98%)

15 existing lines in 3 files now uncovered.

3436 of 4310 relevant lines covered (79.72%)

54.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

31.25
/src/edge-agent/didFunctions/PrismKeyPathIndex.ts
1
import { Task } from "../../utils/tasks";
2
import { AgentContext } from "../didcomm/Context";
3

4
/**
5
 * Task to find the latest Prism DID KeyPathIndex
6
 * 
7
 * Use the latest index from persisted PrismDIDs
8
 * or zero if none found
9
 * 
10
 * @returns number
11
 */
12

13
interface Args {
14
  index?: number;
15
}
16

17
export class PrismKeyPathIndexTask extends Task<number, Args> {
18
  async run(ctx: AgentContext) {
19
    const { index } = this.args;
2✔
20
    const prismDIDs = await ctx.Pluto.getAllPrismDIDs();
2✔
21

22
    if (prismDIDs.length <= 0) {
2!
23
      return 0;
2✔
24
    }
25

UNCOV
26
    const indexes = prismDIDs.map(x => x.privateKey.index ?? 0);
×
UNCOV
27
    const maxKey = Math.max(0, ...indexes);
×
UNCOV
28
    const keyPathIndex = maxKey;
×
UNCOV
29
    return typeof index !== 'undefined' && index > keyPathIndex ? index : keyPathIndex + 1;
×
30
  }
31
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc