Skip to content

Commit 2da1da8

Browse files
committed
changed path to start from root folder
1 parent c52a8e8 commit 2da1da8

23 files changed

+515
-2730
lines changed

projects/doctors-in-training/notebooks/gmc/Part 3.1 - Initialising the GMC Agent.ipynb

Lines changed: 25 additions & 120 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,9 @@
4545
},
4646
{
4747
"cell_type": "code",
48-
"execution_count": 1,
48+
"execution_count": null,
4949
"metadata": {},
50-
"outputs": [
51-
{
52-
"name": "stdout",
53-
"output_type": "stream",
54-
"text": [
55-
"IPython autoawait is `on`, and set to use `asyncio`\n"
56-
]
57-
}
58-
],
50+
"outputs": [],
5951
"source": [
6052
"%autoawait\n",
6153
"import time\n",
@@ -84,17 +76,9 @@
8476
},
8577
{
8678
"cell_type": "code",
87-
"execution_count": 2,
79+
"execution_count": null,
8880
"metadata": {},
89-
"outputs": [
90-
{
91-
"name": "stdout",
92-
"output_type": "stream",
93-
"text": [
94-
"{'result': None}\n"
95-
]
96-
}
97-
],
81+
"outputs": [],
9882
"source": [
9983
"response = await agent_controller.wallet.get_public_did()\n",
10084
"print(response)"
@@ -111,17 +95,9 @@
11195
},
11296
{
11397
"cell_type": "code",
114-
"execution_count": 3,
98+
"execution_count": null,
11599
"metadata": {},
116-
"outputs": [
117-
{
118-
"name": "stdout",
119-
"output_type": "stream",
120-
"text": [
121-
"New DID {'did': 'XXGYrwtSiPtqkhncbhuWMJ', 'verkey': 'HdrfXbbCh7wgMAyxiXTSpJiYDybtutRFqve5bi25DxZd', 'public': False}\n"
122-
]
123-
}
124-
],
100+
"outputs": [],
125101
"source": [
126102
"# generate new DID\n",
127103
"response = await agent_controller.wallet.create_did()\n",
@@ -143,18 +119,9 @@
143119
},
144120
{
145121
"cell_type": "code",
146-
"execution_count": 4,
122+
"execution_count": null,
147123
"metadata": {},
148-
"outputs": [
149-
{
150-
"name": "stdout",
151-
"output_type": "stream",
152-
"text": [
153-
"{'statusCode': 200, 'headers': {'Access-Control-Allow-Origin': '*'}, 'body': '{\"statusCode\": 200, \"XXGYrwtSiPtqkhncbhuWMJ\": {\"status\": \"Success\", \"statusCode\": 200, \"reason\": \"Successfully wrote NYM identified by XXGYrwtSiPtqkhncbhuWMJ to the ledger with role ENDORSER\"}}'}\n",
154-
"200\n"
155-
]
156-
}
157-
],
124+
"outputs": [],
158125
"source": [
159126
"# write new DID to Sovrin Stagingnet\n",
160127
"import requests\n",
@@ -202,10 +169,8 @@
202169
},
203170
{
204171
"cell_type": "code",
205-
"execution_count": 5,
206-
"metadata": {
207-
"scrolled": false
208-
},
172+
"execution_count": null,
173+
"metadata": {},
209174
"outputs": [],
210175
"source": [
211176
"response = await agent_controller.ledger.get_taa()\n",
@@ -224,17 +189,9 @@
224189
},
225190
{
226191
"cell_type": "code",
227-
"execution_count": 6,
192+
"execution_count": null,
228193
"metadata": {},
229-
"outputs": [
230-
{
231-
"name": "stdout",
232-
"output_type": "stream",
233-
"text": [
234-
"{}\n"
235-
]
236-
}
237-
],
194+
"outputs": [],
238195
"source": [
239196
"response = await agent_controller.ledger.accept_taa(taa_record)\n",
240197
"## Will return {} if successful\n",
@@ -252,17 +209,9 @@
252209
},
253210
{
254211
"cell_type": "code",
255-
"execution_count": 7,
212+
"execution_count": null,
256213
"metadata": {},
257-
"outputs": [
258-
{
259-
"name": "stdout",
260-
"output_type": "stream",
261-
"text": [
262-
"{'result': {'did': 'XXGYrwtSiPtqkhncbhuWMJ', 'verkey': 'HdrfXbbCh7wgMAyxiXTSpJiYDybtutRFqve5bi25DxZd', 'public': True}}\n"
263-
]
264-
}
265-
],
214+
"outputs": [],
266215
"source": [
267216
"response = await agent_controller.wallet.assign_public_did(did_object[\"did\"])\n",
268217
"print(response)"
@@ -277,19 +226,9 @@
277226
},
278227
{
279228
"cell_type": "code",
280-
"execution_count": 8,
229+
"execution_count": null,
281230
"metadata": {},
282-
"outputs": [
283-
{
284-
"name": "stdout",
285-
"output_type": "stream",
286-
"text": [
287-
"{'result': {'did': 'XXGYrwtSiPtqkhncbhuWMJ', 'verkey': 'HdrfXbbCh7wgMAyxiXTSpJiYDybtutRFqve5bi25DxZd', 'public': True}}\n",
288-
"\n",
289-
"Issuer public DID: XXGYrwtSiPtqkhncbhuWMJ\n"
290-
]
291-
}
292-
],
231+
"outputs": [],
293232
"source": [
294233
"response = await agent_controller.wallet.get_public_did()\n",
295234
"print(response)\n",
@@ -308,17 +247,9 @@
308247
},
309248
{
310249
"cell_type": "code",
311-
"execution_count": 9,
250+
"execution_count": null,
312251
"metadata": {},
313-
"outputs": [
314-
{
315-
"name": "stdout",
316-
"output_type": "stream",
317-
"text": [
318-
"{'verkey': 'HdrfXbbCh7wgMAyxiXTSpJiYDybtutRFqve5bi25DxZd'}\n"
319-
]
320-
}
321-
],
252+
"outputs": [],
322253
"source": [
323254
"issuer_verkey = await agent_controller.ledger.get_did_verkey(issuer_nym)\n",
324255
"print(issuer_verkey)"
@@ -335,17 +266,9 @@
335266
},
336267
{
337268
"cell_type": "code",
338-
"execution_count": 10,
269+
"execution_count": null,
339270
"metadata": {},
340-
"outputs": [
341-
{
342-
"name": "stdout",
343-
"output_type": "stream",
344-
"text": [
345-
"{'endpoint': 'https://580a595cb1c9.ngrok.io'}\n"
346-
]
347-
}
348-
],
271+
"outputs": [],
349272
"source": [
350273
"issuer_endpoint = await agent_controller.ledger.get_did_endpoint(issuer_nym)\n",
351274
"print(issuer_endpoint)"
@@ -360,7 +283,7 @@
360283
},
361284
{
362285
"cell_type": "code",
363-
"execution_count": 11,
286+
"execution_count": null,
364287
"metadata": {},
365288
"outputs": [],
366289
"source": [
@@ -370,19 +293,9 @@
370293
},
371294
{
372295
"cell_type": "code",
373-
"execution_count": 12,
296+
"execution_count": null,
374297
"metadata": {},
375-
"outputs": [
376-
{
377-
"name": "stdout",
378-
"output_type": "stream",
379-
"text": [
380-
"XXGYrwtSiPtqkhncbhuWMJ:3:CL:141256:default\n",
381-
"Stored 'cred_def_id' (str)\n",
382-
"Stored 'schema_id' (str)\n"
383-
]
384-
}
385-
],
298+
"outputs": [],
386299
"source": [
387300
"cred_def_id = response[\"credential_definition_id\"]\n",
388301
"print(cred_def_id)\n",
@@ -401,17 +314,9 @@
401314
},
402315
{
403316
"cell_type": "code",
404-
"execution_count": 13,
317+
"execution_count": null,
405318
"metadata": {},
406-
"outputs": [
407-
{
408-
"name": "stdout",
409-
"output_type": "stream",
410-
"text": [
411-
"None\n"
412-
]
413-
}
414-
],
319+
"outputs": [],
415320
"source": [
416321
"response = await agent_controller.terminate()\n",
417322
"print(response)"

0 commit comments

Comments
 (0)