Skip to content

Commit 841618e

Browse files
committed
Update docstring and func return params
1 parent 4db0652 commit 841618e

File tree

1 file changed

+5
-10
lines changed

1 file changed

+5
-10
lines changed

src/simple_sign/sign.py

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,4 @@
1-
"""Python template repository.
2-
3-
Baseline template for future Python code related to this project.
4-
5-
Replace this docstring and code below with your own code as required.
6-
"""
1+
"""Orcfax simple sign."""
72

83
import argparse
94
import logging
@@ -59,20 +54,20 @@ def signature_in_constitution_config():
5954
raise NotImplementedError("reading from config is not yet implemented")
6055

6156

62-
def sign_with_key(data: str, signing_key: str):
57+
def sign_with_key(data: str, signing_key: str) -> str:
6358
"""Sign with an signing key."""
6459
skey = pyc.SigningKey.from_json(signing_key)
6560
vkey = pyc.VerificationKey.from_signing_key(skey)
6661
logger.info("signing with addr: %s", pyc.Address(vkey.hash()))
6762
return pyc.sign(data, skey)
6863

6964

70-
def signing_handler(data: str, signing_key: str):
65+
def signing_handler(data: str, signing_key: str) -> str:
7166
"""Handle signing functions."""
7267
return sign_with_key(data, signing_key)
7368

7469

75-
def verify_signature(data: str):
70+
def verify_signature(data: str) -> dict:
7671
"""Verify a signature with an address."""
7772
try:
7873
status = pyc.verify(data)
@@ -93,7 +88,7 @@ def verify_signature(data: str):
9388
}
9489

9590

96-
def verify_handler(data: str):
91+
def verify_handler(data: str) -> dict:
9792
"""Verify input data."""
9893
return verify_signature(data)
9994

0 commit comments

Comments
 (0)