File tree Expand file tree Collapse file tree 1 file changed +30
-5
lines changed Expand file tree Collapse file tree 1 file changed +30
-5
lines changed Original file line number Diff line number Diff line change 22 * Copyright 2024 Digital Bazaar, Inc.
33 * SPDX-License-Identifier: BSD-3-Clause
44 */
5+ import {
6+ assertions ,
7+ generators ,
8+ issueCloned
9+ } from 'data-integrity-test-suite-assertion' ;
510import {
611 shouldBeBs64UrlNoPad ,
712 shouldHaveHeaderBytes ,
813} from '../assertions.js' ;
9- import {
10- assertions ,
11- } from 'data-integrity-test-suite-assertion' ;
1214import { createInitialVc } from '../helpers.js' ;
1315import { expect } from 'chai' ;
16+ import { getMultiKey } from '../vc-generator/key-gen.js' ;
17+ import { getSuites } from './helpers.js' ;
1418
1519export function sd2023Algorithms ( {
1620 credential,
@@ -323,6 +327,27 @@ export function sd2023Algorithms({
323327 } ) ;
324328}
325329
326- function _setup ( ) {
327-
330+ async function _setup ( {
331+ credential,
332+ suiteName,
333+ keyType,
334+ mandatoryPointers,
335+ selectivePointers
336+ } ) {
337+ const { invalidCreated} = generators ?. dates ;
338+ const credentials = new Map ( ) ;
339+ const keyPair = await getMultiKey ( { keyType} ) ;
340+ const signer = keyPair . signer ( ) ;
341+ const _credential = structuredClone ( credential ) ;
342+ _credential . issuer = keyPair . controller ;
343+ credentials . set ( 'invalidCreated' , await issueCloned ( invalidCreated ( {
344+ credential : structuredClone ( _credential ) ,
345+ ...getSuites ( {
346+ signer,
347+ suiteName,
348+ selectivePointers,
349+ mandatoryPointers
350+ } )
351+ } ) ) ) ;
352+ return credentials ;
328353}
You can’t perform that action at this time.
0 commit comments