|
22 | 22 | },
|
23 | 23 | {
|
24 | 24 | "cell_type": "code",
|
25 |
| - "execution_count": 2, |
| 25 | + "execution_count": 1, |
26 | 26 | "metadata": {},
|
27 | 27 | "outputs": [
|
28 | 28 | {
|
|
58 | 58 | },
|
59 | 59 | {
|
60 | 60 | "cell_type": "code",
|
61 |
| - "execution_count": null, |
| 61 | + "execution_count": 2, |
62 | 62 | "metadata": {},
|
63 | 63 | "outputs": [],
|
64 | 64 | "source": [
|
|
88 | 88 | },
|
89 | 89 | {
|
90 | 90 | "cell_type": "code",
|
91 |
| - "execution_count": 6, |
| 91 | + "execution_count": 3, |
92 | 92 | "metadata": {},
|
93 | 93 | "outputs": [
|
94 | 94 | {
|
95 | 95 | "name": "stdout",
|
96 | 96 | "output_type": "stream",
|
97 | 97 | "text": [
|
98 |
| - "{'request_id': '54503fbb-0f20-475b-b014-e6f411e85dea', 'connection_id': '641c865f-0bfb-4ccd-bc26-e5328a1b3f05', 'their_label': 'Alice', 'accept': 'auto', 'created_at': '2020-10-30 11:28:20.655988Z', 'invitation_key': 'G1pr1jqD4Y9cpXXVVStSQQy5p265VF1fHnocH5BYhtpu', 'my_did': 'HdesGn1FTbpZjq3Sg2U8hQ', 'routing_state': 'none', 'updated_at': '2020-10-30 11:28:20.673566Z', 'initiator': 'external', 'state': 'request', 'invitation_mode': 'once'}\n" |
| 98 | + "Connection Webhook : {'connection_id': '4f47cb7e-be35-4a34-8c4c-f0d987aec3aa', 'created_at': '2020-10-30 12:50:49.322105Z', 'routing_state': 'none', 'invitation_key': '8egq2Lysck4b9HpLKez4bZcDnwZqgVNFMeuSUBaGdLW1', 'state': 'invitation', 'accept': 'auto', 'initiator': 'external', 'invitation_mode': 'once', 'updated_at': '2020-10-30 12:50:49.322105Z', 'their_label': 'Alice'}\n", |
| 99 | + "Connection Webhook : {'connection_id': '4f47cb7e-be35-4a34-8c4c-f0d987aec3aa', 'created_at': '2020-10-30 12:50:49.322105Z', 'routing_state': 'none', 'invitation_key': '8egq2Lysck4b9HpLKez4bZcDnwZqgVNFMeuSUBaGdLW1', 'state': 'request', 'accept': 'auto', 'initiator': 'external', 'invitation_mode': 'once', 'request_id': 'db6d03a3-04ca-4ed3-9da6-36fc31f3ad95', 'updated_at': '2020-10-30 12:50:49.333258Z', 'my_did': '3oyc4duyVFbKq6wKLhqfv5', 'their_label': 'Alice'}\n", |
| 100 | + "{'connection_id': '4f47cb7e-be35-4a34-8c4c-f0d987aec3aa', 'created_at': '2020-10-30 12:50:49.322105Z', 'routing_state': 'none', 'invitation_key': '8egq2Lysck4b9HpLKez4bZcDnwZqgVNFMeuSUBaGdLW1', 'state': 'request', 'accept': 'auto', 'initiator': 'external', 'invitation_mode': 'once', 'request_id': 'db6d03a3-04ca-4ed3-9da6-36fc31f3ad95', 'updated_at': '2020-10-30 12:50:49.333258Z', 'my_did': '3oyc4duyVFbKq6wKLhqfv5', 'their_label': 'Alice'}\n", |
| 101 | + "Connection Webhook : {'connection_id': '4f47cb7e-be35-4a34-8c4c-f0d987aec3aa', 'created_at': '2020-10-30 12:50:49.322105Z', 'their_did': '6RoJMQnJikyY2Em2pz7p8Q', 'routing_state': 'none', 'invitation_key': '8egq2Lysck4b9HpLKez4bZcDnwZqgVNFMeuSUBaGdLW1', 'state': 'response', 'accept': 'auto', 'initiator': 'external', 'invitation_mode': 'once', 'request_id': 'db6d03a3-04ca-4ed3-9da6-36fc31f3ad95', 'updated_at': '2020-10-30 12:50:49.421094Z', 'my_did': '3oyc4duyVFbKq6wKLhqfv5', 'their_label': 'Alice'}\n" |
99 | 102 | ]
|
100 | 103 | }
|
101 | 104 | ],
|
102 | 105 | "source": [
|
103 | 106 | "import json\n",
|
104 |
| - "oob_invite = {'@type': 'did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.0/invitation', '@id': '4a611f31-396a-4e94-bdfb-820d81bde452', 'request~attach': [], 'handshake_protocols': ['https://didcomm.org/connections/1.0/invitation', 'did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0/invitation'], 'label': 'Alice', 'service': [{'id': '#inline', 'type': 'did-communication', 'recipientKeys': ['did:key:z6MkuU5tbz5eQ5e5w2NCB1rHFWX5dbMvu8G1yoiY7M9Zd7cH'], 'routingKeys': [], 'serviceEndpoint': 'http://172.17.0.1:8020'}]}\n", |
105 |
| - "\n", |
| 107 | + "oob_invite = {'@type': 'did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.0/invitation', '@id': 'e536ed97-2e32-4133-bf20-7ce998739267', 'label': 'Alice', 'handshake_protocols': ['https://didcomm.org/connections/1.0/invitation', 'did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0/invitation'], 'request~attach': [], 'service': [{'id': '#inline', 'type': 'did-communication', 'recipientKeys': ['did:key:z6Mkn6wscbEJxHZ4Fnf31DwuSfADcWqh6Ncc3fpNJTYHYZHP'], 'routingKeys': [], 'serviceEndpoint': 'http://172.17.0.1:8020'}]}\n", |
106 | 108 | "response = await agent_controller.oob.receive_invitation(oob_invite)\n",
|
107 | 109 | "print(response)"
|
108 | 110 | ]
|
|
116 | 118 | },
|
117 | 119 | {
|
118 | 120 | "cell_type": "code",
|
119 |
| - "execution_count": 8, |
| 121 | + "execution_count": 4, |
120 | 122 | "metadata": {},
|
121 | 123 | "outputs": [
|
122 | 124 | {
|
123 | 125 | "name": "stdout",
|
124 | 126 | "output_type": "stream",
|
125 | 127 | "text": [
|
126 |
| - "641c865f-0bfb-4ccd-bc26-e5328a1b3f05\n", |
127 |
| - "{'request_id': '54503fbb-0f20-475b-b014-e6f411e85dea', 'connection_id': '641c865f-0bfb-4ccd-bc26-e5328a1b3f05', 'their_label': 'Alice', 'accept': 'auto', 'created_at': '2020-10-30 11:28:20.655988Z', 'invitation_key': 'G1pr1jqD4Y9cpXXVVStSQQy5p265VF1fHnocH5BYhtpu', 'my_did': 'HdesGn1FTbpZjq3Sg2U8hQ', 'routing_state': 'none', 'updated_at': '2020-10-30 11:28:20.673566Z', 'initiator': 'external', 'state': 'request', 'invitation_mode': 'once'}\n" |
| 128 | + "4f47cb7e-be35-4a34-8c4c-f0d987aec3aa\n", |
| 129 | + "{'connection_id': '4f47cb7e-be35-4a34-8c4c-f0d987aec3aa', 'created_at': '2020-10-30 12:50:49.322105Z', 'their_did': '6RoJMQnJikyY2Em2pz7p8Q', 'routing_state': 'none', 'invitation_key': '8egq2Lysck4b9HpLKez4bZcDnwZqgVNFMeuSUBaGdLW1', 'state': 'response', 'accept': 'auto', 'initiator': 'external', 'invitation_mode': 'once', 'request_id': 'db6d03a3-04ca-4ed3-9da6-36fc31f3ad95', 'updated_at': '2020-10-30 12:50:49.421094Z', 'my_did': '3oyc4duyVFbKq6wKLhqfv5', 'their_label': 'Alice'}\n", |
| 130 | + "Connection State : response\n" |
128 | 131 | ]
|
129 | 132 | }
|
130 | 133 | ],
|
|
142 | 145 | "cell_type": "markdown",
|
143 | 146 | "metadata": {},
|
144 | 147 | "source": [
|
145 |
| - "## 9. Continue in the Sender [Notebook](http://localhost:8888/notebooks/Part%208%20-%20Out%20of%20Band%20Protocol.ipynb)\n", |
| 148 | + "## 9. Send Trust Ping\n", |
146 | 149 | "\n",
|
147 |
| - "You will need to accept the request and send a trust ping before this connection moves to the active state." |
| 150 | + "This moves the connection to the active state" |
| 151 | + ] |
| 152 | + }, |
| 153 | + { |
| 154 | + "cell_type": "code", |
| 155 | + "execution_count": 6, |
| 156 | + "metadata": {}, |
| 157 | + "outputs": [ |
| 158 | + { |
| 159 | + "data": { |
| 160 | + "text/plain": [ |
| 161 | + "{'thread_id': '85e649b0-0fea-4691-a5ae-61dfc51e643c'}" |
| 162 | + ] |
| 163 | + }, |
| 164 | + "execution_count": 6, |
| 165 | + "metadata": {}, |
| 166 | + "output_type": "execute_result" |
| 167 | + }, |
| 168 | + { |
| 169 | + "name": "stdout", |
| 170 | + "output_type": "stream", |
| 171 | + "text": [ |
| 172 | + "Connection Webhook : {'connection_id': '4f47cb7e-be35-4a34-8c4c-f0d987aec3aa', 'created_at': '2020-10-30 12:50:49.322105Z', 'their_did': '6RoJMQnJikyY2Em2pz7p8Q', 'routing_state': 'none', 'invitation_key': '8egq2Lysck4b9HpLKez4bZcDnwZqgVNFMeuSUBaGdLW1', 'state': 'active', 'accept': 'auto', 'initiator': 'external', 'invitation_mode': 'once', 'request_id': 'db6d03a3-04ca-4ed3-9da6-36fc31f3ad95', 'updated_at': '2020-10-30 12:52:25.954656Z', 'my_did': '3oyc4duyVFbKq6wKLhqfv5', 'their_label': 'Alice'}\n" |
| 173 | + ] |
| 174 | + } |
| 175 | + ], |
| 176 | + "source": [ |
| 177 | + "await agent_controller.messaging.trust_ping(connection_id, \"active\")" |
| 178 | + ] |
| 179 | + }, |
| 180 | + { |
| 181 | + "cell_type": "markdown", |
| 182 | + "metadata": {}, |
| 183 | + "source": [ |
| 184 | + "## End Tutorial\n" |
| 185 | + ] |
| 186 | + }, |
| 187 | + { |
| 188 | + "cell_type": "code", |
| 189 | + "execution_count": 7, |
| 190 | + "metadata": {}, |
| 191 | + "outputs": [], |
| 192 | + "source": [ |
| 193 | + "await agent_controller.terminate()" |
148 | 194 | ]
|
149 | 195 | },
|
150 | 196 | {
|
|
0 commit comments