Skip to content

Commit abde3a0

Browse files
TheTechmagedbluhm
authored andcommitted
chore: add missing docstrings
Signed-off-by: Colton Wolkins (Indicio work address) <[email protected]>
1 parent f5e4fb3 commit abde3a0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

didcomm_messaging/quickstart.py

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def set_id(method):
9999

100100

101101
def generate_did():
102-
"""Use Askar to generate encryption/verification keys, then a DID from both."""
102+
"""Use Askar to generate encryption/verification keys, then return a DID from both."""
103103

104104
verkey = Key.generate(KeyAlg.ED25519)
105105
xkey = Key.generate(KeyAlg.X25519)
@@ -134,6 +134,7 @@ def generate_did():
134134

135135

136136
async def setup_default(did, did_secrets, enable_compatibility_prefix=False):
137+
"""Setup a pre-configured DIDCommMessaging instance."""
137138

138139
# The Crypto Service is used to encrypt, decrypt, sign and verify messages.
139140
# Askar is a pretty solid choice for these tasks.
@@ -203,6 +204,7 @@ async def setup_default(did, did_secrets, enable_compatibility_prefix=False):
203204
async def send_http_message(
204205
dmp: DIDCommMessaging, my_did: DID, message: Message, target: DID
205206
):
207+
"""Send a message via HTTP."""
206208

207209
# Get the message as a dictionary
208210
message_wrapper = message
@@ -239,6 +241,9 @@ async def send_http_message(
239241
async def setup_relay(
240242
dmp: DIDCommMessaging, my_did: DID, relay_did: DID, keys: Sequence[Key]
241243
) -> Union[DID, None]:
244+
"""Negotiate services with an outbound relay.
245+
246+
Returns a DID upon successful negotiation."""
242247

243248
# Request mediation from the outbound relay
244249
message = Message(
@@ -315,6 +320,7 @@ async def fetch_relayed_messages(
315320
relay_did: DID,
316321
callback: Callable[[Message], Awaitable[None]] = None,
317322
) -> List[Message]:
323+
"""Fetch stored messages from the relay."""
318324

319325
# Fetch a count of all stored messages
320326
message = Message(

0 commit comments

Comments
 (0)