Author Topic: Graphene API Documentation?  (Read 3043 times)

0 Members and 1 Guest are viewing this topic.

Offline bulletproof

The API for the chain database is here... it will give you the calls / arguments that are available over websocket.

https://github.com/cryptonomex/graphene/blob/master/libraries/app/include/graphene/app/database_api.hpp

@CryptoPrometheus, in case you aren't familiar with it; doxygen can produce a much more user-friendly html rendition of the source code documentation - just do
Code: [Select]
doxygen database_api.hpp (in this case) from it's directory and open the resulting html folder. This will show exactly what you are after (param/return types etc) for each command etc. and is much easier to read then the source docs markup ;)
Everything is awesome, or if it isn't it ought to be.

Offline boombastic

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • AngelShares Explorer
http://bitshares.dacplay.org/r/boombastic
Support My Witness: mr.agsexplorer
BTC: 1Bb6V1UStz45QMAamjaX8rDjsnQnBpHvE8

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
Code: [Select]
--delay-block-count --trusted-node
Are they hidden options?  ./witness_node --help doesn't print these options.
Those are for the delayed_node .. a separate executable .. i foubd the parameters from the sources since they were not printed in the help

Offline boombastic

  • Sr. Member
  • ****
  • Posts: 251
    • View Profile
    • AngelShares Explorer
Code: [Select]
--delay-block-count --trusted-node
Are they hidden options?  ./witness_node --help doesn't print these options.
http://bitshares.dacplay.org/r/boombastic
Support My Witness: mr.agsexplorer
BTC: 1Bb6V1UStz45QMAamjaX8rDjsnQnBpHvE8

Offline CryptoPrometheus

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
Thank you both, this is helpful
"Power and law are not synonymous. In fact, they are often in opposition and irreconcilable."
- Cicero

Offline xeroc

  • Board Moderator
  • Hero Member
  • *****
  • Posts: 12922
  • ChainSquad GmbH
    • View Profile
    • ChainSquad GmbH
  • BitShares: xeroc
  • GitHub: xeroc
I started putting together some basic API stuff:
http://python-graphenelib.readthedocs.org/en/latest/

if you are interfacing with the "cli_wallet" then you may also want to take a look at the available RPC calls here:
https://github.com/cryptonomex/graphene/blob/master/libraries/wallet/include/graphene/wallet/wallet.hpp

Offline bytemaster

The API for the chain database is here... it will give you the calls / arguments that are available over websocket.

https://github.com/cryptonomex/graphene/blob/master/libraries/app/include/graphene/app/database_api.hpp

For the latest updates checkout my blog: http://bytemaster.bitshares.org
Anything said on these forums does not constitute an intent to create a legal obligation or contract between myself and anyone else.   These are merely my opinions and I reserve the right to change them at any time.

Offline CryptoPrometheus

  • Sr. Member
  • ****
  • Posts: 324
    • View Profile
I am having a program designed that will pull data from the blockchain and use it for different aspects of a website, and I need to know what all of my options are for "data points" that can be accessed via the API. I am  trying to figure out *exactly* what data is available that can be queried, and what format each "data point" takes (true / false, numerical, string, etc.). Make sense?

I will try to give an example of what this might look like. This is from my imagination (a non-programmer's perspective) so please bear with me:

- account_name: (string)

- member: (true / false)
- membership_expiration_date (number)

- registered_delegate: (true / false)
- currently_elected_delegate: (true/false)

- registered_witness: (true / false)
- currently_elected_witness: (true/false)

- registered_worker: (true / false)
- currently_elected_worker: (true / false)
- worker_payment_per_block: (number)
- vested_payment: (true / false)
- vesting_period: (number)
- total_payment_requested: (number)

- UIA_registered: (true_false)
- asset_symbol: (string)
- full_name: (string)
- current_supply: (number)
- reserve_fund: (number)
- creation_date: (number)
- burn_message: (string)
                                                               
- account_ownership_transferred: (true / false)
- account_ownership_transfer_date: (number)

I'm sure that this data is not stored / expressed in the way that I have outlined above, but I just wanted to give an example of some of the "data points" that we need to access.

Does anyone know if there is a list somewhere that would explain how each piece of blockchain data is stored, and what it represents? Or perhaps how I would go about locating this information within the existing documentation?

EDIT: Perhaps I am way off base and have oversimplified how this works in my mind, so feel free to ELI5 :)
« Last Edit: September 26, 2015, 04:26:59 pm by CryptoPrometheus »
"Power and law are not synonymous. In fact, they are often in opposition and irreconcilable."
- Cicero