diff --git a/silkaj/membership.py b/silkaj/membership.py index c7101a1e05272873d78f2fb2d03c60f123bca436..137f1d687e55ad4e637e5cb4add0b880255b38fc 100644 --- a/silkaj/membership.py +++ b/silkaj/membership.py @@ -20,6 +20,7 @@ import click import pendulum from duniterpy.api import bma from duniterpy.documents import BlockID, Membership, get_block_id +from duniterpy.key import SigningKey from tabulate import tabulate from silkaj import auth, tui, wot @@ -35,7 +36,7 @@ from silkaj.network_tools import client_instance, send_document for first emission and for renewal", ) @click.pass_context -def send_membership(ctx): +def send_membership(ctx: click.Context) -> None: dry_run = ctx.obj["DRY_RUN"] # Authentication @@ -82,7 +83,9 @@ def send_membership(ctx): send_document(bma.blockchain.membership, membership) -def display_confirmation_table(identity_uid, pubkey, identity_block_id): +def display_confirmation_table( + identity_uid: str, pubkey: str, identity_block_id: BlockID +) -> None: """ Check whether there is pending memberships already in the mempool Display their expiration date @@ -142,13 +145,13 @@ def display_confirmation_table(identity_uid, pubkey, identity_block_id): def generate_membership_document( - pubkey, - membership_block_id, - identity_uid, - identity_block_id, - currency, - key=None, -): + pubkey: str, + membership_block_id: BlockID, + identity_uid: str, + identity_block_id: BlockID, + currency: str, + key: SigningKey = None, +) -> Membership: return Membership( issuer=pubkey, membership_block_id=membership_block_id,