duniterpy.api.bma package

Submodules

duniterpy.api.bma.blockchain module

duniterpy.api.bma.blockchain.actives(client: duniterpy.api.client.Client) → dict

GET the block numbers containing actives

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.block(client: duniterpy.api.client.Client, number: int = 0, block_raw: str = None, signature: str = None) → Union[dict, aiohttp.client_reqrep.ClientResponse]

GET/POST a block from/to the blockchain

Parameters:
  • client – Client to connect to the api
  • number – Block number to get
  • block_raw – Block document to post
  • signature – Signature of the block document issuer
Returns:

duniterpy.api.bma.blockchain.blocks(client: duniterpy.api.client.Client, count: int, start: int) → list

GET list of blocks from the blockchain

Parameters:
  • client – Client to connect to the api
  • count – Number of blocks
  • start – First block number
Returns:

duniterpy.api.bma.blockchain.branches(client: duniterpy.api.client.Client) → list

GET current branches of the node (top block of each branch)

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.certifications(client: duniterpy.api.client.Client) → dict

GET the block numbers containing certifications

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.current(client: duniterpy.api.client.Client) → dict

GET the last accepted block

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.difficulties(client: duniterpy.api.client.Client) → dict

GET difficulties levels for members into current window for writing next block

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.excluded(client: duniterpy.api.client.Client) → dict

GET the block numbers containing excluded

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.hardship(client: duniterpy.api.client.Client, pubkey: str) → dict

GET hardship level for given member’s public key for writing next block

Parameters:
  • client – Client to connect to the api
  • pubkey – Public key of the member
Returns:

duniterpy.api.bma.blockchain.joiners(client: duniterpy.api.client.Client) → dict

GET the block numbers containing joiners

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.leavers(client: duniterpy.api.client.Client) → dict

GET the block numbers containing leavers

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.membership(client: duniterpy.api.client.Client, membership_signed_raw: str) → aiohttp.client_reqrep.ClientResponse

POST a Membership document

Parameters:
  • client – Client to connect to the api
  • membership_signed_raw – Membership signed raw document
Returns:

duniterpy.api.bma.blockchain.memberships(client: duniterpy.api.client.Client, search: str) → dict

GET list of Membership documents for UID/Public key

Parameters:
  • client – Client to connect to the api
  • search – UID/Public key
Returns:

duniterpy.api.bma.blockchain.newcomers(client: duniterpy.api.client.Client) → dict

GET the block numbers containing newcomers

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.parameters(client: duniterpy.api.client.Client) → dict

GET the blockchain parameters used by this node

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.revoked(client: duniterpy.api.client.Client) → dict

GET the block numbers containing revoked members.

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.tx(client: duniterpy.api.client.Client) → dict

GET the block numbers containing transactions

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.blockchain.ud(client: duniterpy.api.client.Client) → dict

GET the block numbers containing universal dividend

Parameters:client – Client to connect to the api
Returns:

duniterpy.api.bma.network module

duniterpy.api.bma.network.peer(client: duniterpy.api.client.Client, peer_signed_raw: str) → aiohttp.client_reqrep.ClientResponse

POST a Peer signed raw document

Parameters:
  • client – Client to connect to the api
  • peer_signed_raw – Peer signed raw document
Returns:

duniterpy.api.bma.network.peering(client: duniterpy.api.client.Client) → dict

GET peering information about a peer

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.network.peers(client: duniterpy.api.client.Client, leaves: bool = False, leaf: str = '') → dict

GET peering entries of every node inside the currency network

Parameters:
  • client – Client to connect to the api
  • leaves – True if leaves should be requested
  • leaf – True if leaf should be requested
Returns:

duniterpy.api.bma.node module

duniterpy.api.bma.node.sandboxes(client: duniterpy.api.client.Client) → dict

GET Duniter node version and infos

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.node.summary(client: duniterpy.api.client.Client) → dict

GET Duniter node version and infos

Parameters:client – Client to connect to the api
Returns:

duniterpy.api.bma.tx module

duniterpy.api.bma.tx.blocks(client: duniterpy.api.client.Client, pubkey: str, start: int, end: int) → dict

GET public key transactions history between start and end block number

Parameters:
  • client – Client to connect to the api
  • pubkey – Public key
  • start – Start from block number
  • end – End to block number
Returns:

duniterpy.api.bma.tx.history(client: duniterpy.api.client.Client, pubkey: str) → dict

Get transactions history of public key

Parameters:
  • client – Client to connect to the api
  • pubkey – Public key
Returns:

duniterpy.api.bma.tx.pending(client: duniterpy.api.client.Client, pubkey: str) → dict

GET pending transaction history for the given pubkey

Parameters:
  • client – Client to connect to the api
  • pubkey – Public key
Returns:

duniterpy.api.bma.tx.process(client: duniterpy.api.client.Client, transaction_signed_raw: str) → aiohttp.client_reqrep.ClientResponse

POST a transaction raw document

Parameters:
  • client – Client to connect to the api
  • transaction_signed_raw – Transaction signed raw document
Returns:

duniterpy.api.bma.tx.sources(client: duniterpy.api.client.Client, pubkey: str) → dict

GET transaction sources

Parameters:
  • client – Client to connect to the api
  • pubkey – Public key
Returns:

duniterpy.api.bma.tx.times(client: duniterpy.api.client.Client, pubkey: str, start: int, end: int) → dict

GET public key transactions history between start and end timestamp

Parameters:
  • client – Client to connect to the api
  • pubkey – Public key
  • start – Start from timestamp
  • end – End to timestamp
Returns:

duniterpy.api.bma.ud module

duniterpy.api.bma.ud.history(client: duniterpy.api.client.Client, pubkey: str) → dict

Get UD history of a member account

Parameters:
  • client – Client to connect to the api
  • pubkey – Public key of the member
Returns:

duniterpy.api.bma.wot module

duniterpy.api.bma.wot.add(client: duniterpy.api.client.Client, identity_signed_raw: str) → aiohttp.client_reqrep.ClientResponse

POST identity raw document

Parameters:
  • client – Client to connect to the api
  • identity_signed_raw – Identity raw document
Returns:

duniterpy.api.bma.wot.certified_by(client: duniterpy.api.client.Client, search: str) → dict

GET identities certified by UID/Public key

Parameters:
  • client – Client to connect to the api
  • search – UID or public key
Returns:

duniterpy.api.bma.wot.certifiers_of(client: duniterpy.api.client.Client, search: str) → dict

GET UID/Public key certifiers

Parameters:
  • client – Client to connect to the api
  • search – UID or public key
Returns:

duniterpy.api.bma.wot.certify(client: duniterpy.api.client.Client, certification_signed_raw: str) → aiohttp.client_reqrep.ClientResponse

POST certification raw document

Parameters:
  • client – Client to connect to the api
  • certification_signed_raw – Certification raw document
Returns:

duniterpy.api.bma.wot.identity_of(client: duniterpy.api.client.Client, search: str) → dict

GET Identity data written in the blockchain

Parameters:
  • client – Client to connect to the api
  • search – UID or public key
Returns:

duniterpy.api.bma.wot.lookup(client: duniterpy.api.client.Client, search: str) → dict

GET UID/Public key data

Parameters:
  • client – Client to connect to the api
  • search – UID or public key
Returns:

duniterpy.api.bma.wot.members(client: duniterpy.api.client.Client) → dict

GET list of all current members of the Web of Trust

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.wot.requirements(client: duniterpy.api.client.Client, search: str) → dict

GET list of requirements for a given UID/Public key

Parameters:
  • client – Client to connect to the api
  • search – UID or public key
Returns:

duniterpy.api.bma.wot.revoke(client: duniterpy.api.client.Client, revocation_signed_raw: str) → aiohttp.client_reqrep.ClientResponse

POST revocation document

Parameters:
  • client – Client to connect to the api
  • revocation_signed_raw – Certification raw document
Returns:

duniterpy.api.bma.ws module

duniterpy.api.bma.ws.block(client: duniterpy.api.client.Client) → aiohttp.client._WSRequestContextManager

Connect to block websocket

Parameters:client – Client to connect to the api
Returns:
duniterpy.api.bma.ws.peer(client: duniterpy.api.client.Client) → aiohttp.client._WSRequestContextManager

Connect to peer websocket

Parameters:client – Client to connect to the api
Returns:

Module contents