Skip to content

Commit ed4e895

Browse files
committed
oob protocol
1 parent ce1f803 commit ed4e895

File tree

2 files changed

+66
-16
lines changed

2 files changed

+66
-16
lines changed

tutorials/aries-basic-controller/notebooks/alice/Part 3 - Establishing a Connection.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -292,7 +292,7 @@
292292
},
293293
{
294294
"cell_type": "code",
295-
"execution_count": 8,
295+
"execution_count": 30,
296296
"metadata": {},
297297
"outputs": [
298298
{

tutorials/aries-basic-controller/notebooks/alice/Part 8 - Out of Band Protocol.ipynb

Lines changed: 65 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,27 @@
22
"cells": [
33
{
44
"cell_type": "code",
5-
"execution_count": null,
5+
"execution_count": 6,
66
"metadata": {},
7-
"outputs": [],
7+
"outputs": [
8+
{
9+
"name": "stdout",
10+
"output_type": "stream",
11+
"text": [
12+
"IPython autoawait is `on`, and set to use `asyncio`\n"
13+
]
14+
}
15+
],
816
"source": [
917
"%autoawait\n",
1018
"import time\n",
11-
"import asyncio"
19+
"import asyncio\n",
20+
"import json"
1221
]
1322
},
1423
{
1524
"cell_type": "code",
16-
"execution_count": null,
25+
"execution_count": 2,
1726
"metadata": {},
1827
"outputs": [],
1928
"source": [
@@ -35,7 +44,7 @@
3544
},
3645
{
3746
"cell_type": "code",
38-
"execution_count": null,
47+
"execution_count": 4,
3948
"metadata": {},
4049
"outputs": [],
4150
"source": [
@@ -46,13 +55,6 @@
4655
"agent_controller.register_listeners([], defaults=True)"
4756
]
4857
},
49-
{
50-
"cell_type": "code",
51-
"execution_count": null,
52-
"metadata": {},
53-
"outputs": [],
54-
"source": []
55-
},
5658
{
5759
"cell_type": "markdown",
5860
"metadata": {},
@@ -62,9 +64,48 @@
6264
},
6365
{
6466
"cell_type": "code",
65-
"execution_count": null,
67+
"execution_count": 12,
6668
"metadata": {},
67-
"outputs": [],
69+
"outputs": [
70+
{
71+
"name": "stdout",
72+
"output_type": "stream",
73+
"text": [
74+
"{\"include_handshake\": true, \"use_public_did\": false}\n",
75+
"{\"state\": \"initial\", \"invitation\": {\"@type\": \"did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.0/invitation\", \"@id\": \"40ea3b1e-4589-477d-84ae-c28e9fa490ac\", \"label\": \"Alice\", \"request~attach\": [], \"handshake_protocols\": [\"https://didcomm.org/connections/1.0/invitation\", \"did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0/invitation\"], \"service\": [{\"id\": \"#inline\", \"type\": \"did-communication\", \"recipientKeys\": [\"did:key:z6Mkjh4wVVG9PN3tkRxhw9yLqjfxWEeHoqbnxcEhciPHHq9w\"], \"routingKeys\": [], \"serviceEndpoint\": \"http://192.168.65.3:8020\"}]}, \"created_at\": \"2020-10-30 11:32:45.079505Z\", \"invitation_id\": \"722c4c0e-0d29-4bff-a910-dd4d7d922c18\", \"updated_at\": \"2020-10-30 11:32:45.079505Z\", \"trace\": false}\n",
76+
"\n",
77+
"\n",
78+
"{\n",
79+
" \"state\": \"initial\",\n",
80+
" \"invitation\": {\n",
81+
" \"@type\": \"did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/out-of-band/1.0/invitation\",\n",
82+
" \"@id\": \"40ea3b1e-4589-477d-84ae-c28e9fa490ac\",\n",
83+
" \"label\": \"Alice\",\n",
84+
" \"request~attach\": [],\n",
85+
" \"handshake_protocols\": [\n",
86+
" \"https://didcomm.org/connections/1.0/invitation\",\n",
87+
" \"did:sov:BzCbsNYhMrjHiqZDTUASHg;spec/connections/1.0/invitation\"\n",
88+
" ],\n",
89+
" \"service\": [\n",
90+
" {\n",
91+
" \"id\": \"#inline\",\n",
92+
" \"type\": \"did-communication\",\n",
93+
" \"recipientKeys\": [\n",
94+
" \"did:key:z6Mkjh4wVVG9PN3tkRxhw9yLqjfxWEeHoqbnxcEhciPHHq9w\"\n",
95+
" ],\n",
96+
" \"routingKeys\": [],\n",
97+
" \"serviceEndpoint\": \"http://192.168.65.3:8020\"\n",
98+
" }\n",
99+
" ]\n",
100+
" },\n",
101+
" \"created_at\": \"2020-10-30 11:32:45.079505Z\",\n",
102+
" \"invitation_id\": \"722c4c0e-0d29-4bff-a910-dd4d7d922c18\",\n",
103+
" \"updated_at\": \"2020-10-30 11:32:45.079505Z\",\n",
104+
" \"trace\": false\n",
105+
"}\n"
106+
]
107+
}
108+
],
68109
"source": [
69110
"payload = {\n",
70111
" \"include_handshake\": True,\n",
@@ -74,8 +115,17 @@
74115
"\n",
75116
"# Create an out of band Invitation\n",
76117
"oob_invite = await agent_controller.oob.create_invitation(json.dumps(payload))\n",
77-
"print(json.dumps(oob_invite))"
118+
"print(json.dumps(oob_invite))\n",
119+
"print('\\n')\n",
120+
"print(json.dumps(oob_invite, indent=2))"
78121
]
122+
},
123+
{
124+
"cell_type": "code",
125+
"execution_count": null,
126+
"metadata": {},
127+
"outputs": [],
128+
"source": []
79129
}
80130
],
81131
"metadata": {

0 commit comments

Comments
 (0)