File tree Expand file tree Collapse file tree 3 files changed +12
-7
lines changed
Expand file tree Collapse file tree 3 files changed +12
-7
lines changed Original file line number Diff line number Diff line change @@ -6,7 +6,11 @@ import {
66 checkDataIntegrityProofVerifyErrors
77} from 'data-integrity-test-suite-assertion' ;
88import { config } from './helpers.js' ;
9+ import {
10+ cryptosuite as eddsaRdfc2022CryptoSuite
11+ } from '@digitalbazaar/eddsa-rdfc-2022-cryptosuite' ;
912import { endpoints } from 'vc-test-suite-implementations' ;
13+ import { getMultikey } from './vc-generator/helpers.js' ;
1014
1115// only use implementations with `eddsa-rdfc-2022` verifiers.
1216const { tags} = config . suites [ 'eddsa-rdfc-2022' ] ;
@@ -17,6 +21,8 @@ const {match} = endpoints.filterByTag({
1721// options for the DI Verifier Suite
1822const testDataOptions = {
1923 suiteName : 'eddsa-rdfc-2022' ,
24+ cryptosuite : eddsaRdfc2022CryptoSuite ,
25+ key : await getMultikey ( )
2026} ;
2127
2228checkDataIntegrityProofVerifyErrors ( {
Original file line number Diff line number Diff line change @@ -6,7 +6,10 @@ import * as Ed25519Multikey from '@digitalbazaar/ed25519-multikey';
66import crypto from 'crypto' ;
77import { decodeSecretKeySeed } from 'bnid' ;
88
9- export const getMultikey = async ( { seedMultibase} ) => {
9+ export const getMultikey = async ( {
10+ // all else fails use the test key seed
11+ seedMultibase = 'z1AYMku6XEB5KV3XJbYzz9VejGJYRuqzu5wmq4JDRyUCjr8'
12+ } = { } ) => {
1013 if ( ! seedMultibase ) {
1114 throw new Error ( 'seedMultibase required' ) ;
1215 }
Original file line number Diff line number Diff line change @@ -20,12 +20,8 @@ const vcCache = new Map([
2020 */
2121export async function generateTestData ( ) {
2222 const { signer, issuer} = await getMultikey ( {
23- seedMultibase : (
24- process . env ?. KEY_SEED_DB ||
25- process . env ?. CLIENT_SECRET_DB ||
26- // all else fails use the test key seed
27- 'z1AYMku6XEB5KV3XJbYzz9VejGJYRuqzu5wmq4JDRyUCjr8'
28- )
23+ seedMultibase : ( process . env ?. KEY_SEED_DB ||
24+ process . env ?. CLIENT_SECRET_DB )
2925 } ) ;
3026 const credential = klona ( validVc ) ;
3127 credential . issuer = issuer ;
You can’t perform that action at this time.
0 commit comments