Skip to content
Snippets Groups Projects
Commit ba1c879a authored by Vincent Texier's avatar Vincent Texier
Browse files

Add tx/history/[pubkey]/pending in bma api

parent 01d1c4b9
No related branches found
No related tags found
No related merge requests found
...@@ -49,8 +49,11 @@ HISTORY_SCHEMA = { ...@@ -49,8 +49,11 @@ HISTORY_SCHEMA = {
"receiving": { "receiving": {
"$ref": "#/definitions/transactioning_data" "$ref": "#/definitions/transactioning_data"
}, },
"pending": {
"$ref": "#/definitions/transactioning_data"
}
}, },
"required": ["sent", "received", "sending", "receiving"] "required": ["sent", "received", "sending", "receiving", "pending"]
} }
}, },
"definitions": { "definitions": {
...@@ -233,6 +236,17 @@ async def sources(client: Client, pubkey: str) -> dict: ...@@ -233,6 +236,17 @@ async def sources(client: Client, pubkey: str) -> dict:
return await client.get(MODULE + '/sources/%s' % pubkey, schema=SOURCES_SCHEMA) 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: async def blocks(client: Client, pubkey: str, start: int, end: int) -> dict:
""" """
GET public key transactions history between start and end block number GET public key transactions history between start and end block number
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment