@@ -31,7 +31,7 @@ describe('presentations.sign()', function() {
3131 profileId = profile . id ;
3232 } ) ;
3333 it ( 'should successfully sign a presentation with default proof type ' +
34- '"Ed25519Signature2018 " if no "acceptedProofTypes" is provided.' ,
34+ '"eddsa-rdfc-2022 " if no "acceptedProofTypes" is provided.' ,
3535 async ( ) => {
3636 // create unsigned presentation
3737 const presentationId = `urn:uuid:${ uuid ( ) } ` ;
@@ -54,11 +54,11 @@ describe('presentations.sign()', function() {
5454 credential : verifiableCredential ,
5555 presentationId,
5656 profileId,
57- expectedProofType : 'Ed25519Signature2018 '
57+ expectedProofType : 'DataIntegrityProof '
5858 } ) ;
5959 } ) ;
6060 it ( 'should successfully sign a presentation with default proof type ' +
61- '"Ed25519Signature2018 " if "acceptedProofTypes" is an empty array.' ,
61+ '"eddsa-rdfc-2022 " if "acceptedProofTypes" is an empty array.' ,
6262 async ( ) => {
6363 // create unsigned presentation
6464 const presentationId = `urn:uuid:${ uuid ( ) } ` ;
@@ -82,14 +82,14 @@ describe('presentations.sign()', function() {
8282 credential : verifiableCredential ,
8383 presentationId,
8484 profileId,
85- expectedProofType : 'Ed25519Signature2018 '
85+ expectedProofType : 'DataIntegrityProof '
8686 } ) ;
8787 } ) ;
8888 it ( 'should successfully sign a presentation with updated default signature ' +
8989 'suite if wallet signatureSuite config is changed.' ,
9090 async ( ) => {
91- // Intentionally change signatureSuite config to eddsa-2022
92- config . wallet . defaults . signatureSuite = 'eddsa-2022 ' ;
91+ // Intentionally change signatureSuite config to Ed25519Signature2020
92+ config . wallet . defaults . signatureSuite = 'Ed25519Signature2020 ' ;
9393 // create unsigned presentation
9494 const presentationId = `urn:uuid:${ uuid ( ) } ` ;
9595 const unsignedPresentation = createUnsignedPresentation ( {
@@ -106,41 +106,13 @@ describe('presentations.sign()', function() {
106106 }
107107 should . not . exist ( err ) ;
108108 should . exist ( signedPresentation ) ;
109+ console . log ( JSON . stringify ( signedPresentation , null , 2 ) ) ;
109110 assertSignedPresentation ( {
110111 signedPresentation,
111112 credential : verifiableCredential ,
112113 presentationId,
113114 profileId,
114- expectedProofType : 'DataIntegrityProof' ,
115- expectedCryptosuite : 'eddsa-2022'
116- } ) ;
117- } ) ;
118- it ( 'should successfully sign a presentation with "acceptedProofTypes" ' +
119- '"eddsa-2022".' , async ( ) => {
120- // create unsigned presentation
121- const presentationId = `urn:uuid:${ uuid ( ) } ` ;
122- const unsignedPresentation = createUnsignedPresentation ( {
123- profileId, verifiableCredential, presentationId
124- } ) ;
125- let signedPresentation ;
126- let err ;
127- try {
128- signedPresentation = await webWallet . presentations . sign ( {
129- challenge, domain, profileId, presentation : unsignedPresentation ,
130- acceptedProofTypes : [ { name : 'eddsa-2022' } ]
131- } ) ;
132- } catch ( e ) {
133- err = e ;
134- }
135- should . not . exist ( err ) ;
136- should . exist ( signedPresentation ) ;
137- assertSignedPresentation ( {
138- signedPresentation,
139- credential : verifiableCredential ,
140- presentationId,
141- profileId,
142- expectedProofType : 'DataIntegrityProof' ,
143- expectedCryptosuite : 'eddsa-2022'
115+ expectedProofType : 'Ed25519Signature2020' ,
144116 } ) ;
145117 } ) ;
146118 it ( 'should successfully sign a presentation with "acceptedProofTypes" ' +
@@ -211,8 +183,7 @@ describe('presentations.sign()', function() {
211183 signedPresentation = await webWallet . presentations . sign ( {
212184 challenge, domain, profileId, presentation : unsignedPresentation ,
213185 acceptedProofTypes : [
214- { name : 'eddsa-2022' } ,
215- { name : 'Ed25519Signature2018' } ,
186+ { name : 'eddsa-rdfc-2022' } ,
216187 { name : 'Ed25519Signature2020' } ,
217188 ]
218189 } ) ;
@@ -227,19 +198,19 @@ describe('presentations.sign()', function() {
227198 presentationId,
228199 profileId,
229200 expectedProofType : 'DataIntegrityProof' ,
230- expectedCryptosuite : 'eddsa-2022'
201+ expectedCryptosuite : 'eddsa-rdfc- 2022'
231202 } ) ;
232203 } ) ;
233204 it ( 'should successfully sign a presentation with the supported type ' +
234205 'from the "acceptedProofTypes" list.' , async ( ) => {
235206 const acceptedProofTypes = [
236207 [
237208 { name : 'unsupportedType' } ,
238- { name : 'eddsa-2022' } ,
209+ { name : 'eddsa-rdfc- 2022' } ,
239210 ] ,
240211 [
241212 { name : 'unsupportedType' } ,
242- { name : 'eddsa-2022' } ,
213+ { name : 'eddsa-rdfc- 2022' } ,
243214 { name : 'unsupportedType' } ,
244215 ]
245216 ] ;
@@ -267,7 +238,7 @@ describe('presentations.sign()', function() {
267238 presentationId,
268239 profileId,
269240 expectedProofType : 'DataIntegrityProof' ,
270- expectedCryptosuite : 'eddsa-2022'
241+ expectedCryptosuite : 'eddsa-rdfc- 2022'
271242 } ) ;
272243 }
273244 } ) ;
0 commit comments