BMA classes :

BMA

Blockchain

class ucoinpy.api.bma.blockchain.__init__.Actives(connection_handler, module='blockchain')

GET, returns block numbers containing actives.

__get__(**kwargs)

GET, returns block numbers containing actives.

Parameters:kwargs
class ucoinpy.api.bma.blockchain.__init__.Block(connection_handler, number=None)

GET/POST a block from/to the blockchain.

__get__(**kwargs)

GET a block from the blockchain : /blockchain/block/[NUMBER]

Parameters:kwargs
__init__(connection_handler, number=None)

Constructor - Use the number parameter in order to select a block number.

Parameters:
  • connection_handler – The connection handler.
  • number (int) – The block number to select. (Default = None)
__post__(**kwargs)

POST a block to the blockchain : blockchain/block

Parameters:kwargs – 2 fields required : field “block” and field “signature”.
class ucoinpy.api.bma.blockchain.__init__.Blockchain(connection_handler, module='blockchain')
__init__(connection_handler, module='blockchain')

Constructor

Parameters:
  • connection_handler – The connection handler.
  • module (str) – (Default value = blockchain)
class ucoinpy.api.bma.blockchain.__init__.Certifications(connection_handler, module='blockchain')

GET, returns block numbers containing certifications.

__get__(**kwargs)

GET, returns block numbers containing certifications.

Parameters:kwargs
class ucoinpy.api.bma.blockchain.__init__.Current(connection_handler, module='blockchain')

GET, same as block/[number], but return last accepted block.

__get__(**kwargs)

GET, same as block/[number], but return last accepted block : /blockchain/current

Parameters:kwargs
class ucoinpy.api.bma.blockchain.__init__.Excluded(connection_handler, module='blockchain')

GET, returns block numbers containing excluded.

__get__(**kwargs)

GET, returns block numbers containing excluded.

Parameters:kwargs
class ucoinpy.api.bma.blockchain.__init__.Hardship(connection_handler, fingerprint)

GET hardship level for given member’s fingerprint for writing next block.

__get__(**kwargs)

GET hardship level for given member’s fingerprint for writing next block.

Parameters:kwargs
__init__(connection_handler, fingerprint)

Constructor - Use the number parameter in order to select a block number.

Parameters:
  • connection_handler – The connection handler.
  • fingerprint (str) – The member fingerprint.
class ucoinpy.api.bma.blockchain.__init__.Joiners(connection_handler, module='blockchain')

GET, returns block numbers containing joiners.

__get__(**kwargs)

GET, returns block numbers containing joiners.

Parameters:kwargs
class ucoinpy.api.bma.blockchain.__init__.Leavers(connection_handler, module='blockchain')

GET, returns block numbers containing leavers.

__get__(**kwargs)

GET, returns block numbers containing leavers.

Parameters:kwargs
class ucoinpy.api.bma.blockchain.__init__.Membership(connection_handler, search=None)

GET/POST a Membership document.

__get__(**kwargs)

GET a list of Memberships documents issued by the member and written in the blockhain : /blockchain/memberships/[search]

Parameters:kwargs
__init__(connection_handler, search=None)

Constructor

Parameters:
  • connection_handler – The connection handler.
  • search – (Default = None)
__post__(**kwargs)

POST a Membership document to the blockchain : /blockchain/membership

Parameters:kwargs – The field “membership” is required.
class ucoinpy.api.bma.blockchain.__init__.Newcomers(connection_handler, module='blockchain')

GET, returns block numbers containing newcomers.

__get__(**kwargs)

GET, returns block numbers containing newcomers : /blockchain/newcomers

Parameters:kwargs
class ucoinpy.api.bma.blockchain.__init__.Parameters(connection_handler, module='blockchain')

GET the blockchain parameters used by this node.

__get__(**kwargs)

GET the blockchain parameters used by this node : /blockchain/parameters

Parameters:kwargs
class ucoinpy.api.bma.blockchain.__init__.TX(connection_handler, module='blockchain')

GET, returns block numbers containing transactions.

__get__(**kwargs)

GET, returns block numbers containing transactions : /with/tx

Parameters:kwargs
class ucoinpy.api.bma.blockchain.__init__.UD(connection_handler, module='blockchain')

GET, returns block numbers containing universal dividend.

__get__(**kwargs)

GET, returns block numbers containing Universal Dividend.

Parameters:kwargs

TX

class ucoinpy.api.bma.tx.__init__.History(conn_handler, pubkey, module='tx')

Get transaction history from a public key : /tx/history/[PUBKEY]

__get__(**kwargs)

Get transaction history from a public key : /tx/history/[PUBKEY]

Parameters:kwargs
__init__(conn_handler, pubkey, module='tx')

Constructor

Parameters:
  • conn_handler
  • pubkey (str) – The wallet public key.
  • module (str) – (Default value = tx)
class ucoinpy.api.bma.tx.__init__.Process(connection_handler, module='tx')

POST a transaction.

__post__(**kwargs)

POST a transaction.

Parameters:kwargs – The field “transaction” is required : /tx/process
class ucoinpy.api.bma.tx.__init__.Sources(connection_handler, pubkey, module='tx')

Get the Transaction sources.

__get__(**kwargs)

Get the Transaction sources : /tx/sources

Parameters:kwargs
__init__(connection_handler, pubkey, module='tx')

Constructor

Parameters:
  • conn_handler – The connection handler.
  • pubkey (str) – Owner of the coins’ public key.
  • module (str) – (Default value = tx)

TX -> History

class ucoinpy.api.bma.tx.history.__init__.Blocks(conn_handler, pubkey, from_, to_, module='tx')

Get the wallet transaction history : /tx/history/[PUBKEY]/blocks/[from]/[to]

__get__(**kwargs)

Get the wallet transaction history : /tx/history/[PUBKEY]/blocks/[from]/[to]

Parameters:kwargs
__init__(conn_handler, pubkey, from_, to_, module='tx')

Constructor

Parameters:
  • conn_handler
  • pubkey (str) – The wallet public key.
  • from – The starting block or the starting timestamp limit (optionnal).
  • to – The ending block or the ending timestamp (optionnal).
  • module (str) – (Default value = tx)

Network

class ucoinpy.api.bma.network.__init__.Network(connection_handler, module='network')

/network/* , this URL is used for the “UCoin Gossip” protocol (exchanging UC.G. messages).

__init__(connection_handler, module='network')

Constructor

Parameters:
  • connection_handler – The connection handler.
  • module (str) – (Default value = network)
class ucoinpy.api.bma.network.__init__.Peering(connection_handler, module='network')

GET peering information about a peer.

__get__(**kwargs)

GET peering information about a peer : /network/peering

Parameters:kwargs

Network -> Peering

class ucoinpy.api.bma.network.peering.__init__.Peers(connection_handler)

GET peering entries of every node inside the currency network.

__get__(**kwargs)

GET peering entries of every node inside the currency network : /network/peering/peers Creates a generator with one peering entry per iteration.

Parameters:kwargs
__post__(**kwargs)

POST a UCG peering entry document to this node in order to alter UCG peering table : /network/peering/peers

Parameters:kwargs – 2 fields required : field “entry” and field “signature”.
class ucoinpy.api.bma.network.peering.__init__.Status(connection_handler)

POST a network Status document to this node in order notify of its status.

__post__(**kwargs)

POST a network Status document to this node in order notify of its status.

Parameters:kwargs – 2 fields required : field “status” and field “signature”.

WoT (Web of Trust)

class ucoinpy.api.bma.wot.__init__.Add(connection_handler, module='wot')

POST Public key data.

__post__(**kwargs)

POST Public key data.

Parameters:kwargs
class ucoinpy.api.bma.wot.__init__.CertifiedBy(connection_handler, search, module='wot')

GET Certification data from a member.

__get__(**kwargs)

GET Certification data from a member.

Parameters:kwargs
__init__(connection_handler, search, module='wot')

Constructor

Parameters:
  • connection_handler – The connection handler.
  • search
  • module (str) – (Default value = wot)
class ucoinpy.api.bma.wot.__init__.CertifiersOf(connection_handler, search, module='wot')

GET Certification data over a member.

__get__(**kwargs)

GET Certification data over a member.

Parameters:kwargs
__init__(connection_handler, search, module='wot')

Constructor

Parameters:
  • connection_handler – The connection handler.
  • search
  • module (str) – (Default value = wot)
class ucoinpy.api.bma.wot.__init__.Lookup(connection_handler, search, module='wot')

GET Public key data.

__get__(**kwargs)

GET Public key data.

Parameters:kwargs
__init__(connection_handler, search, module='wot')

Constructor

Parameters:
  • connection_handler – The connection handler.
  • search
  • module (str) – (Default value = wot)
class ucoinpy.api.bma.wot.__init__.Members(connection_handler, module='wot')

GET the List of all current members of the Web of Trust.

__get__(**kwargs)

GET the List of all current members of the Web of Trust.

Parameters:kwargs
__init__(connection_handler, module='wot')

Constructor

Parameters:
  • connection_handler – The connection handler.
  • module (str) – (Default value = wot)
class ucoinpy.api.bma.wot.__init__.Revoke(connection_handler, module='wot')

POST Public key data.

__post__(**kwargs)

POST Public key data.

Parameters:kwargs
class ucoinpy.api.bma.wot.__init__.WOT(connection_handler, module='wot')

Class relative to the Web of Trust.

__init__(connection_handler, module='wot')

Constructor

Parameters:
  • connection_handler – The connection handler.
  • module (str) – (Default value = wot)

UD (Universal Dividend)

class ucoinpy.api.bma.ud.__init__.History(conn_handler, pubkey, module='ud')

Get the Universal Dividend history.

__get__(**kwargs)

Get the Universal Dividend history.

Parameters:kwargs
__init__(conn_handler, pubkey, module='ud')

Constructor

Parameters:
  • conn_handler – The connection handler.
  • pubkey (str) – The public key.
  • module – (Default = ud)
class ucoinpy.api.bma.ud.__init__.Ud(conn_handler, module='ud')

Class relative to the Universal Dividend.

__init__(conn_handler, module='ud')

Constructor

Parameters:
  • conn_handler – The connection handler.
  • module – (Default = ud)