@@ -25,46 +25,7 @@ import {
25
25
Schema ,
26
26
} from 'src'
27
27
import * as uuid from 'uuid' ;
28
-
29
- const ARIES_CONNECTION_REQUEST = {
30
- '@id' : 'b5517062-303f-4267-9a29-09bc89497c06' ,
31
- '@type' : 'did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0/request' ,
32
- connection : {
33
- DID : '2RjtVytftf9Psbh3E8jqyq' ,
34
- DIDDoc : {
35
- '@context' : 'https://w3id.org/did/v1' ,
36
- authentication : [
37
- {
38
- publicKey : '2RjtVytftf9Psbh3E8jqyq#1' ,
39
- type : 'Ed25519SignatureAuthentication2018' ,
40
- } ,
41
- ] ,
42
- id : '2RjtVytftf9Psbh3E8jqyq' ,
43
- publicKey : [
44
- {
45
- controller : '2RjtVytftf9Psbh3E8jqyq' ,
46
- id : '1' ,
47
- publicKeyBase58 : 'n6ZJrPGhbkLxQBxH11BvQHSKch58sx3MAqDTkUG4GmK' ,
48
- type : 'Ed25519VerificationKey2018' ,
49
- } ,
50
- ] ,
51
- service : [
52
- {
53
- id : 'did:example:123456789abcdefghi;indy' ,
54
- priority : 0 ,
55
- recipientKeys : [ '2RjtVytftf9Psbh3E8jqyq#1' ] ,
56
- routingKeys : [
57
- 'AKnC8qR9xsZZEBY7mdV6fzjmmtKxeegrNatpz4jSJhrH' ,
58
- 'Hezce2UWMZ3wUhVkh2LfKSs8nDzWwzs2Win7EzNN3YaR' ,
59
- ] ,
60
- serviceEndpoint : 'http://localhost:8080/agency/msg' ,
61
- type : 'IndyAgent' ,
62
- } ,
63
- ] ,
64
- } ,
65
- } ,
66
- label : 'alice-157ea14b-4b7c-48a5-b536-d4ed6e027b84' ,
67
- } ;
28
+ import { ARIES_CONNECTION_ACK , ARIES_CONNECTION_REQUEST } from './mockdata'
68
29
69
30
export const dataConnectionCreate = ( ) : IConnectionCreateData => ( {
70
31
id : `testConnectionId-${ uuid . v4 ( ) } ` ,
@@ -96,6 +57,14 @@ export const createConnectionInviterRequested = async (
96
57
return connection ;
97
58
} ;
98
59
60
+ export const createConnectionInviterFinished = async (
61
+ data = dataConnectionCreate ( ) ,
62
+ ) : Promise < Connection > => {
63
+ const connection = await createConnectionInviterRequested ( )
64
+ await connection . updateStateWithMessage ( JSON . stringify ( ARIES_CONNECTION_ACK ) ) ;
65
+ return connection ;
66
+ } ;
67
+
99
68
export const dataCredentialDefCreate = ( ) : ICredentialDefCreateDataV2 => ( {
100
69
schemaId : 'testCredentialDefSchemaId' ,
101
70
sourceId : 'testCredentialDefSourceId' ,
0 commit comments