duniterpy.api.bma package

Submodules

duniterpy.api.bma.blockchain module

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

GET the block numbers containing actives

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.blockchain.block(client: Client, number: int = 0, block_raw: str | None = None, signature: str | None = None) dict | HTTPResponse

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: 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: 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: Client) dict

GET the block numbers containing certifications

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.blockchain.current(client: Client) dict

GET the last accepted block

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.blockchain.difficulties(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: Client) dict

GET the block numbers containing excluded

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.blockchain.hardship(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: Client) dict

GET the block numbers containing joiners

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.blockchain.leavers(client: Client) dict

GET the block numbers containing leavers

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.blockchain.membership(client: Client, membership_signed_raw: str) HTTPResponse

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: 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: Client) dict

GET the block numbers containing newcomers

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.blockchain.parameters(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: Client) dict

GET the block numbers containing revoked members.

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.blockchain.tx(client: Client) dict

GET the block numbers containing transactions

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.blockchain.ud(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: Client, peer_signed_raw: str) HTTPResponse

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: Client) dict

GET peering information about a peer

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.network.peering_peers(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.network.peers(client: Client) dict

GET the exhaustive list of peers known by the node

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.network.ws2p_heads(client: Client) dict

GET ws2p heads known by the node

Parameters:

client – Client to connect to the api

Return type:

dict

duniterpy.api.bma.node module

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

GET Duniter node version and infos

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.node.summary(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: 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: 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: 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: Client, transaction_signed_raw: str) HTTPResponse

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: 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: 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: 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: Client, identity_signed_raw: str) HTTPResponse

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: Client, search: str, pubkey: bool = False) dict

GET identities certified by UID/Public key

Parameters:
  • client – Client to connect to the api

  • search – UID or public key

  • pubkey – Query argument for passing a public key for quicker response

Returns:

duniterpy.api.bma.wot.certifiers_of(client: Client, search: str, pubkey: bool = False) dict

GET UID/Public key certifiers

Parameters:
  • client – Client to connect to the api

  • search – UID or public key

  • pubkey – Query argument for passing a public key for quicker response

Returns:

duniterpy.api.bma.wot.certify(client: Client, certification_signed_raw: str) HTTPResponse

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: 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: 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: 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: Client, search: str, pubkey: bool = False) dict

GET list of requirements for a given UID/Public key

Parameters:
  • client – Client to connect to the api

  • search – UID or public key

  • pubkey – Query argument for passing a public key for quicker response

Returns:

duniterpy.api.bma.wot.requirements_of_pending(client: Client, minsig: int) dict

GET list of requirements of all pending identities with a minimum of minsig certifications

Parameters:
  • client – Client to connect to the api

  • minsig – Minimum number of certifications

Returns:

duniterpy.api.bma.wot.revoke(client: Client, revocation_signed_raw: str) HTTPResponse

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: Client) WSConnection

Connect to block websocket

Parameters:

client – Client to connect to the api

Returns:

duniterpy.api.bma.ws.peer(client: Client) WSConnection

Connect to peer websocket

Parameters:

client – Client to connect to the api

Returns:

Module contents