diff --git a/duniterpy/api/bma/tx.py b/duniterpy/api/bma/tx.py index 9e17d49b6df5540e8f303ff7c2bb8dcd9a94d5b2..7045e7a95bc51f9537b680d99121ffadc931761e 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