From 50d13649401ba4bf55af357dbcc1cc231f8b3d1a Mon Sep 17 00:00:00 2001 From: Moul <moul@moul.re> Date: Wed, 19 Dec 2018 16:10:38 +0100 Subject: [PATCH] [enh] BMA: Add tx/history/{%pubkey}/pending method --- duniterpy/api/bma/tx.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/duniterpy/api/bma/tx.py b/duniterpy/api/bma/tx.py index 9e17d49b..ba608f0d 100644 --- a/duniterpy/api/bma/tx.py +++ b/duniterpy/api/bma/tx.py @@ -211,6 +211,17 @@ async def history(client: Client, pubkey: str) -> dict: return await client.get(MODULE + '/history/%s' % pubkey, schema=HISTORY_SCHEMA) +async def history_pending(client: Client, pubkey: str) -> dict: + """ + Get pending transactions history of public key + + :param client: Client to connect to the api + :param pubkey: Public key + :return: + """ + return await client.get(MODULE + '/history/%s/pending' % pubkey, schema=HISTORY_SCHEMA) + + async def process(client: Client, transaction_signed_raw: str) -> ClientResponse: """ POST a transaction raw document -- GitLab