account.h 933 字节
Newer Older
B
Brian Johnson 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
/**
 *  @file
 *  @copyright defined in eos/LICENSE.txt
 */
#pragma once

#include <eoslib/types.h>

/**
 *  @defgroup accountcapi Account API
 *  @brief Define API for querying account data
 *  @ingroup contractdev
 */

extern "C" {
   /**
17
    * @brief Retrieve the balance for the provided account
B
Brian Johnson 已提交
18 19 20
    *
    * @param balance -  a pointer to a range of memory to store balance data
    * @param len     -  length of the range of memory to store balance data
21
    * @ret true if account information is retrieved
B
Brian Johnson 已提交
22 23 24 25 26 27 28 29
    *
    * @pre data is a valid pointer to a range of memory at least datalen bytes long
    * @pre data is a pointer to a balance object
    * @pre *((uint64_t*)data) stores the primary key
    *
    *  Example:
    *  @code
    *  balance b;
B
Brian Johnson 已提交
30
    *  b.account = N(myaccount);
B
Brian Johnson 已提交
31 32 33 34
    *  balance(b, sizeof(balance));
    *  @endcode
    */

35
   bool account_balance_get( void* balance, uint32_t len );
B
Brian Johnson 已提交
36 37
   ///@ } accountcapi
}