From ba1c879af5d4f02b4f4e359b3cd6d018be3a7587 Mon Sep 17 00:00:00 2001
From: vtexier <vit@free.fr>
Date: Wed, 19 Dec 2018 17:29:53 +0100
Subject: [PATCH] Add tx/history/[pubkey]/pending in bma api

---
 duniterpy/api/bma/tx.py | 16 +++++++++++++++-
 1 file changed, 15 insertions(+), 1 deletion(-)

diff --git a/duniterpy/api/bma/tx.py b/duniterpy/api/bma/tx.py
index 9e17d49b..7045e7a9 100644
--- a/duniterpy/api/bma/tx.py
+++ b/duniterpy/api/bma/tx.py
@@ -49,8 +49,11 @@ HISTORY_SCHEMA = {
                 "receiving": {
                     "$ref": "#/definitions/transactioning_data"
                 },
+                "pending": {
+                    "$ref": "#/definitions/transactioning_data"
+                }
             },
-            "required": ["sent", "received", "sending", "receiving"]
+            "required": ["sent", "received", "sending", "receiving", "pending"]
         }
     },
     "definitions": {
@@ -233,6 +236,17 @@ async def sources(client: Client, pubkey: str) -> dict:
     return await client.get(MODULE + '/sources/%s' % pubkey, schema=SOURCES_SCHEMA)
 
 
+async def pending(client: Client, pubkey: str) -> dict:
+    """
+    GET pending transaction history for the given pubkey
+
+    :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 blocks(client: Client, pubkey: str, start: int, end: int) -> dict:
     """
     GET public key transactions history between start and end block number
-- 
GitLab