DECENT
Functions

Functions

vector< asset_object > list_assets (const string &lowerbound, uint32_t limit) const
 Lists all assets registered on the blockchain. To list all assets, pass the empty string "" for the lowerbound to start at the beginning of the list, and iterate as necessary. More...
 
asset_object get_asset (const string &asset_name_or_id) const
 Returns information about the given asset. More...
 
monitored_asset_options get_monitored_asset_data (const string &asset_name_or_id) const
 Returns the specific data for a given monitored asset. More...
 
signed_transaction create_monitored_asset (const string &issuer, const string &symbol, uint8_t precision, const string &description, uint32_t feed_lifetime_sec, uint8_t minimum_feeds, bool broadcast=false)
 Creates a new monitored asset. More...
 
signed_transaction update_monitored_asset (const string &symbol, const string &description, uint32_t feed_lifetime_sec, uint8_t minimum_feeds, bool broadcast=false)
 Update the parameters specific to a monitored asset. More...
 
signed_transaction create_user_issued_asset (const string &issuer, const string &symbol, uint8_t precision, const string &description, uint64_t max_supply, price core_exchange_rate, bool is_exchangeable, bool is_fixed_max_supply, bool broadcast=false)
 Creates a new user-issued asset. More...
 
signed_transaction issue_asset (const string &to_account, const string &amount, const string &symbol, const string &memo, bool broadcast=false)
 Issue new shares of an asset. More...
 
signed_transaction update_user_issued_asset (const string &symbol, const string &new_issuer, const string &description, uint64_t max_supply, price core_exchange_rate, bool is_exchangeable, bool broadcast=false)
 Update the parameters specific to a user issued asset. User issued assets have some options which are not relevant to other asset types. This operation is used to update those options an an existing user issues asset. More...
 
signed_transaction fund_asset_pools (const string &from, const string &uia_amount, const string &uia_symbol, const string &dct_amount, const string &dct_symbol, bool broadcast=false)
 Pay into the pools for the given asset. Allows anyone to deposit core/asset into pools. More...
 
signed_transaction reserve_asset (const string &from, const string &amount, const string &symbol, bool broadcast=false)
 Burns the given user-issued asset. This command burns the user-issued asset to reduce the amount in circulation. More...
 
signed_transaction claim_fees (const string &uia_amount, const string &uia_symbol, const string &dct_amount, const string &dct_symbol, bool broadcast=false)
 Transfers accumulated assets from pools back to the issuer's balance. More...
 
string price_to_dct (const string &amount, const string &asset_symbol_or_id)
 Converts asset into DCT, using actual price feed. More...
 
signed_transaction publish_asset_feed (const string &publishing_account, const string &symbol, price_feed feed, bool broadcast=false)
 Publishes a price feed for the named asset. Price feed providers use this command to publish their price feeds for monitored assets. A price feed is used to tune the market for a particular monitored asset. For each value in the feed, the median across all miner feeds for that asset is calculated and the market for the asset is configured with the median of that value. More...
 
multimap< time_point_sec, price_feed > get_feeds_by_miner (const string &account_name_or_id, const uint32_t count)
 Get a list of published price feeds by a miner. More...
 
real_supply get_real_supply () const
 Get current supply of the core asset. More...
 
vector< asset_objectgraphene::wallet::wallet_api::list_assets (const string &lowerbound, uint32_t limit) const
 Lists all assets registered on the blockchain. To list all assets, pass the empty string "" for the lowerbound to start at the beginning of the list, and iterate as necessary. More...
 
asset_object graphene::wallet::wallet_api::get_asset (const string &asset_name_or_id) const
 Returns information about the given asset. More...
 
monitored_asset_options graphene::wallet::wallet_api::get_monitored_asset_data (const string &asset_name_or_id) const
 Returns the specific data for a given monitored asset. More...
 
signed_transaction graphene::wallet::wallet_api::create_monitored_asset (const string &issuer, const string &symbol, uint8_t precision, const string &description, uint32_t feed_lifetime_sec, uint8_t minimum_feeds, bool broadcast=false)
 Creates a new monitored asset. More...
 
signed_transaction graphene::wallet::wallet_api::update_monitored_asset (const string &symbol, const string &description, uint32_t feed_lifetime_sec, uint8_t minimum_feeds, bool broadcast=false)
 Update the parameters specific to a monitored asset. More...
 
signed_transaction graphene::wallet::wallet_api::create_user_issued_asset (const string &issuer, const string &symbol, uint8_t precision, const string &description, uint64_t max_supply, price core_exchange_rate, bool is_exchangeable, bool is_fixed_max_supply, bool broadcast=false)
 Creates a new user-issued asset. More...
 
signed_transaction graphene::wallet::wallet_api::issue_asset (const string &to_account, const string &amount, const string &symbol, const string &memo, bool broadcast=false)
 Issue new shares of an asset. More...
 
signed_transaction graphene::wallet::wallet_api::update_user_issued_asset (const string &symbol, const string &new_issuer, const string &description, uint64_t max_supply, price core_exchange_rate, bool is_exchangeable, bool broadcast=false)
 Update the parameters specific to a user issued asset. User issued assets have some options which are not relevant to other asset types. This operation is used to update those options an an existing user issues asset. More...
 
signed_transaction graphene::wallet::wallet_api::fund_asset_pools (const string &from, const string &uia_amount, const string &uia_symbol, const string &dct_amount, const string &dct_symbol, bool broadcast=false)
 Pay into the pools for the given asset. Allows anyone to deposit core/asset into pools. More...
 
signed_transaction graphene::wallet::wallet_api::reserve_asset (const string &from, const string &amount, const string &symbol, bool broadcast=false)
 Burns the given user-issued asset. This command burns the user-issued asset to reduce the amount in circulation. More...
 
signed_transaction graphene::wallet::wallet_api::claim_fees (const string &uia_amount, const string &uia_symbol, const string &dct_amount, const string &dct_symbol, bool broadcast=false)
 Transfers accumulated assets from pools back to the issuer's balance. More...
 
string graphene::wallet::wallet_api::price_to_dct (const string &amount, const string &asset_symbol_or_id)
 Converts asset into DCT, using actual price feed. More...
 
signed_transaction graphene::wallet::wallet_api::publish_asset_feed (const string &publishing_account, const string &symbol, price_feed feed, bool broadcast=false)
 Publishes a price feed for the named asset. Price feed providers use this command to publish their price feeds for monitored assets. A price feed is used to tune the market for a particular monitored asset. For each value in the feed, the median across all miner feeds for that asset is calculated and the market for the asset is configured with the median of that value. More...
 
multimap< time_point_sec, price_feedgraphene::wallet::wallet_api::get_feeds_by_miner (const string &account_name_or_id, const uint32_t count)
 Get a list of published price feeds by a miner. More...
 
real_supply graphene::wallet::wallet_api::get_real_supply () const
 Get current supply of the core asset. More...
 

Detailed Description

Function Documentation

◆ claim_fees() [1/2]

signed_transaction claim_fees ( const string &  uia_amount,
const string &  uia_symbol,
const string &  dct_amount,
const string &  dct_symbol,
bool  broadcast = false 
)

Transfers accumulated assets from pools back to the issuer's balance.

Note
You cannot claim assets from pools of monitored asset.
Parameters
uia_amountthe amount of "this" asset to claim, in nominal units
uia_symbolthe name or id of the asset to claim
dct_amountthe amount of DCT asset to claim, in nominal units
dct_symbolthe name or id of the DCT asset to claim
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction claiming the fees

◆ claim_fees() [2/2]

signed_transaction wallet_api::claim_fees ( const string &  uia_amount,
const string &  uia_symbol,
const string &  dct_amount,
const string &  dct_symbol,
bool  broadcast = false 
)

Transfers accumulated assets from pools back to the issuer's balance.

Note
You cannot claim assets from pools of monitored asset.
Parameters
uia_amountthe amount of "this" asset to claim, in nominal units
uia_symbolthe name or id of the asset to claim
dct_amountthe amount of DCT asset to claim, in nominal units
dct_symbolthe name or id of the DCT asset to claim
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction claiming the fees

Definition at line 99 of file wallet.cpp.

◆ create_monitored_asset() [1/2]

signed_transaction create_monitored_asset ( const string &  issuer,
const string &  symbol,
uint8_t  precision,
const string &  description,
uint32_t  feed_lifetime_sec,
uint8_t  minimum_feeds,
bool  broadcast = false 
)

Creates a new monitored asset.

Note
some parameters can be changed later using update_monitored_asset()
Parameters
issuerthe name or id of the account who will pay the fee and become the issuer of the new asset. This can be updated later
symbolthe ticker symbol of the new asset
precisionthe number of digits of precision to the right of the decimal point, must be less than or equal to 12
descriptionasset description. Maximal length is 1000 chars
feed_lifetime_sectime before a price feed expires
minimum_feedsminimum number of unexpired feeds required to extract a median feed from
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction creating a new asset

◆ create_monitored_asset() [2/2]

signed_transaction wallet_api::create_monitored_asset ( const string &  issuer,
const string &  symbol,
uint8_t  precision,
const string &  description,
uint32_t  feed_lifetime_sec,
uint8_t  minimum_feeds,
bool  broadcast = false 
)

Creates a new monitored asset.

Note
some parameters can be changed later using update_monitored_asset()
Parameters
issuerthe name or id of the account who will pay the fee and become the issuer of the new asset. This can be updated later
symbolthe ticker symbol of the new asset
precisionthe number of digits of precision to the right of the decimal point, must be less than or equal to 12
descriptionasset description. Maximal length is 1000 chars
feed_lifetime_sectime before a price feed expires
minimum_feedsminimum number of unexpired feeds required to extract a median feed from
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction creating a new asset

Definition at line 22 of file wallet.cpp.

◆ create_user_issued_asset() [1/2]

signed_transaction create_user_issued_asset ( const string &  issuer,
const string &  symbol,
uint8_t  precision,
const string &  description,
uint64_t  max_supply,
price  core_exchange_rate,
bool  is_exchangeable,
bool  is_fixed_max_supply,
bool  broadcast = false 
)

Creates a new user-issued asset.

Note
Some parameters can be changed later using update_user_issued_asset()
See also
issue_asset()
Parameters
issuerthe name or id of the account who will pay the fee and become the issuer of the new asset. This can be updated later
symbolthe ticker symbol of the new asset
precisionthe number of digits of precision to the right of the decimal point, must be less than or equal to 12
descriptionasset description. Maximal length is 1000 chars
max_supplythe maximum supply of this asset which may exist at any given time
core_exchange_ratecore_exchange_rate is a price struct which consist from base asset and quote asset (see price). One of the asset has to be core asset. Technically core_exchange_rate needs to store the asset id of this new asset. Since this id is not known at the time this operation is created, create this price as though the new asset id has instance 1, and the chain will overwrite it with the new asset's id
is_exchangeabletrue to allow implicit conversion when buing content of this asset to/from core asset
is_fixed_max_supplytrue to deny future modifications of 'max_supply' otherwise false
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction creating a new asset

◆ create_user_issued_asset() [2/2]

signed_transaction wallet_api::create_user_issued_asset ( const string &  issuer,
const string &  symbol,
uint8_t  precision,
const string &  description,
uint64_t  max_supply,
price  core_exchange_rate,
bool  is_exchangeable,
bool  is_fixed_max_supply,
bool  broadcast = false 
)

Creates a new user-issued asset.

Note
Some parameters can be changed later using update_user_issued_asset()
See also
issue_asset()
Parameters
issuerthe name or id of the account who will pay the fee and become the issuer of the new asset. This can be updated later
symbolthe ticker symbol of the new asset
precisionthe number of digits of precision to the right of the decimal point, must be less than or equal to 12
descriptionasset description. Maximal length is 1000 chars
max_supplythe maximum supply of this asset which may exist at any given time
core_exchange_ratecore_exchange_rate is a price struct which consist from base asset and quote asset (see price). One of the asset has to be core asset. Technically core_exchange_rate needs to store the asset id of this new asset. Since this id is not known at the time this operation is created, create this price as though the new asset id has instance 1, and the chain will overwrite it with the new asset's id
is_exchangeabletrue to allow implicit conversion when buing content of this asset to/from core asset
is_fixed_max_supplytrue to deny future modifications of 'max_supply' otherwise false
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction creating a new asset

Definition at line 43 of file wallet.cpp.

◆ fund_asset_pools() [1/2]

signed_transaction fund_asset_pools ( const string &  from,
const string &  uia_amount,
const string &  uia_symbol,
const string &  dct_amount,
const string &  dct_symbol,
bool  broadcast = false 
)

Pay into the pools for the given asset. Allows anyone to deposit core/asset into pools.

Note
User-issued assets can optionally have two asset pools. This pools are used when conversion between assets is needed (paying fees, paying for a content in different asset ).
Parameters
fromthe name or id of the account sending the core asset
uia_amountthe amount of "this" asset to deposit
uia_symbolthe name or id of the asset whose pool you wish to fund
dct_amountthe amount of the core asset to deposit
dct_symbolthe name or id of the DCT asset
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction funding the asset pools

◆ fund_asset_pools() [2/2]

signed_transaction wallet_api::fund_asset_pools ( const string &  from,
const string &  uia_amount,
const string &  uia_symbol,
const string &  dct_amount,
const string &  dct_symbol,
bool  broadcast = false 
)

Pay into the pools for the given asset. Allows anyone to deposit core/asset into pools.

Note
User-issued assets can optionally have two asset pools. This pools are used when conversion between assets is needed (paying fees, paying for a content in different asset ).
Parameters
fromthe name or id of the account sending the core asset
uia_amountthe amount of "this" asset to deposit
uia_symbolthe name or id of the asset whose pool you wish to fund
dct_amountthe amount of the core asset to deposit
dct_symbolthe name or id of the DCT asset
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction funding the asset pools

Definition at line 76 of file wallet.cpp.

◆ get_asset() [1/2]

asset_object get_asset ( const string &  asset_name_or_id) const

Returns information about the given asset.

Parameters
asset_name_or_idthe symbol or id of the asset in question
Returns
the information about the asset stored in the block chain

◆ get_asset() [2/2]

asset_object wallet_api::get_asset ( const string &  asset_name_or_id) const

Returns information about the given asset.

Parameters
asset_name_or_idthe symbol or id of the asset in question
Returns
the information about the asset stored in the block chain

Definition at line 8 of file wallet.cpp.

◆ get_feeds_by_miner() [1/2]

multimap<time_point_sec, price_feed> get_feeds_by_miner ( const string &  account_name_or_id,
const uint32_t  count 
)

Get a list of published price feeds by a miner.

Parameters
account_name_or_idthe name or id of the account
countmaximum number of price feeds to fetch (must not exceed 100)
Returns
list of price feeds published by the miner

◆ get_feeds_by_miner() [2/2]

multimap< time_point_sec, price_feed > wallet_api::get_feeds_by_miner ( const string &  account_name_or_id,
const uint32_t  count 
)

Get a list of published price feeds by a miner.

Parameters
account_name_or_idthe name or id of the account
countmaximum number of price feeds to fetch (must not exceed 100)
Returns
list of price feeds published by the miner

Definition at line 116 of file wallet.cpp.

◆ get_monitored_asset_data() [1/2]

monitored_asset_options get_monitored_asset_data ( const string &  asset_name_or_id) const

Returns the specific data for a given monitored asset.

See also
get_asset()
Parameters
asset_name_or_idthe symbol or id of the monitored asset in question
Returns
the specific data for this monitored asset

◆ get_monitored_asset_data() [2/2]

monitored_asset_options wallet_api::get_monitored_asset_data ( const string &  asset_name_or_id) const

Returns the specific data for a given monitored asset.

See also
get_asset()
Parameters
asset_name_or_idthe symbol or id of the monitored asset in question
Returns
the specific data for this monitored asset

Definition at line 15 of file wallet.cpp.

◆ get_real_supply() [1/2]

real_supply get_real_supply ( ) const

Get current supply of the core asset.

Returns
the number of shares currently in existence in account and vesting balances, escrows and pools

◆ get_real_supply() [2/2]

real_supply wallet_api::get_real_supply ( ) const

Get current supply of the core asset.

Returns
the number of shares currently in existence in account and vesting balances, escrows and pools

Definition at line 123 of file wallet.cpp.

◆ issue_asset() [1/2]

signed_transaction issue_asset ( const string &  to_account,
const string &  amount,
const string &  symbol,
const string &  memo,
bool  broadcast = false 
)

Issue new shares of an asset.

Parameters
to_accountthe name or id of the account to receive the new shares
amountthe amount to issue, in nominal units
symbolthe ticker symbol of the asset to issue
memoa memo to include in the transaction, readable by the recipient
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction issuing the new shares

◆ issue_asset() [2/2]

signed_transaction wallet_api::issue_asset ( const string &  to_account,
const string &  amount,
const string &  symbol,
const string &  memo,
bool  broadcast = false 
)

Issue new shares of an asset.

Parameters
to_accountthe name or id of the account to receive the new shares
amountthe amount to issue, in nominal units
symbolthe ticker symbol of the asset to issue
memoa memo to include in the transaction, readable by the recipient
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction issuing the new shares

Definition at line 56 of file wallet.cpp.

◆ list_assets() [1/2]

vector<asset_object> list_assets ( const string &  lowerbound,
uint32_t  limit 
) const

Lists all assets registered on the blockchain. To list all assets, pass the empty string "" for the lowerbound to start at the beginning of the list, and iterate as necessary.

Parameters
lowerboundthe symbol of the first asset to include in the list
limitthe maximum number of assets to return (max: 100)
Returns
the list of asset objects, ordered by symbol

◆ list_assets() [2/2]

vector< asset_object > wallet_api::list_assets ( const string &  lowerbound,
uint32_t  limit 
) const

Lists all assets registered on the blockchain. To list all assets, pass the empty string "" for the lowerbound to start at the beginning of the list, and iterate as necessary.

Parameters
lowerboundthe symbol of the first asset to include in the list
limitthe maximum number of assets to return (max: 100)
Returns
the list of asset objects, ordered by symbol

Definition at line 3 of file wallet.cpp.

◆ price_to_dct() [1/2]

string price_to_dct ( const string &  amount,
const string &  asset_symbol_or_id 
)

Converts asset into DCT, using actual price feed.

Parameters
amountthe amount to convert in nominal units
asset_symbol_or_idthe symbol or id of the asset to convert
Returns
price in DCT

◆ price_to_dct() [2/2]

string wallet_api::price_to_dct ( const string &  amount,
const string &  asset_symbol_or_id 
)

Converts asset into DCT, using actual price feed.

Parameters
amountthe amount to convert in nominal units
asset_symbol_or_idthe symbol or id of the asset to convert
Returns
price in DCT

Definition at line 94 of file wallet.cpp.

◆ publish_asset_feed() [1/2]

signed_transaction publish_asset_feed ( const string &  publishing_account,
const string &  symbol,
price_feed  feed,
bool  broadcast = false 
)

Publishes a price feed for the named asset. Price feed providers use this command to publish their price feeds for monitored assets. A price feed is used to tune the market for a particular monitored asset. For each value in the feed, the median across all miner feeds for that asset is calculated and the market for the asset is configured with the median of that value.

Parameters
publishing_accountthe account publishing the price feed
symbolthe name or id of the asset whose feed we're publishing
feedthe price feed object for particular monitored asset
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction updating the price feed for the given asset

◆ publish_asset_feed() [2/2]

signed_transaction wallet_api::publish_asset_feed ( const string &  publishing_account,
const string &  symbol,
price_feed  feed,
bool  broadcast = false 
)

Publishes a price feed for the named asset. Price feed providers use this command to publish their price feeds for monitored assets. A price feed is used to tune the market for a particular monitored asset. For each value in the feed, the median across all miner feeds for that asset is calculated and the market for the asset is configured with the median of that value.

Parameters
publishing_accountthe account publishing the price feed
symbolthe name or id of the asset whose feed we're publishing
feedthe price feed object for particular monitored asset
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction updating the price feed for the given asset

Definition at line 108 of file wallet.cpp.

◆ reserve_asset() [1/2]

signed_transaction reserve_asset ( const string &  from,
const string &  amount,
const string &  symbol,
bool  broadcast = false 
)

Burns the given user-issued asset. This command burns the user-issued asset to reduce the amount in circulation.

Note
you cannot burn monitored asset.
Parameters
fromthe account containing the asset you wish to burn
amountthe amount to burn, in nominal units
symbolthe name or id of the asset to burn
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction burning the asset

◆ reserve_asset() [2/2]

signed_transaction wallet_api::reserve_asset ( const string &  from,
const string &  amount,
const string &  symbol,
bool  broadcast = false 
)

Burns the given user-issued asset. This command burns the user-issued asset to reduce the amount in circulation.

Note
you cannot burn monitored asset.
Parameters
fromthe account containing the asset you wish to burn
amountthe amount to burn, in nominal units
symbolthe name or id of the asset to burn
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction burning the asset

Definition at line 86 of file wallet.cpp.

◆ update_monitored_asset() [1/2]

signed_transaction update_monitored_asset ( const string &  symbol,
const string &  description,
uint32_t  feed_lifetime_sec,
uint8_t  minimum_feeds,
bool  broadcast = false 
)

Update the parameters specific to a monitored asset.

Parameters
symbolthe name or id of the asset to update, which must be a monitored asset
descriptionasset description
feed_lifetime_sectime before a price feed expires
minimum_feedsminimum number of unexpired feeds required to extract a median feed from
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction updating the monitored asset

◆ update_monitored_asset() [2/2]

signed_transaction wallet_api::update_monitored_asset ( const string &  symbol,
const string &  description,
uint32_t  feed_lifetime_sec,
uint8_t  minimum_feeds,
bool  broadcast = false 
)

Update the parameters specific to a monitored asset.

Parameters
symbolthe name or id of the asset to update, which must be a monitored asset
descriptionasset description
feed_lifetime_sectime before a price feed expires
minimum_feedsminimum number of unexpired feeds required to extract a median feed from
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction updating the monitored asset

Definition at line 34 of file wallet.cpp.

◆ update_user_issued_asset() [1/2]

signed_transaction update_user_issued_asset ( const string &  symbol,
const string &  new_issuer,
const string &  description,
uint64_t  max_supply,
price  core_exchange_rate,
bool  is_exchangeable,
bool  broadcast = false 
)

Update the parameters specific to a user issued asset. User issued assets have some options which are not relevant to other asset types. This operation is used to update those options an an existing user issues asset.

Parameters
symbolthe name or id of the asset to update, which must be a user-issued asset
new_issuerif the asset is to be given a new issuer, specify his ID here
descriptionasset description
max_supplythe maximum supply of this asset which may exist at any given time
core_exchange_rateprice used to convert non-core asset to core asset
is_exchangeabletrue to allow implicit conversion of this asset to/from core asset
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction updating the user-issued asset

◆ update_user_issued_asset() [2/2]

signed_transaction wallet_api::update_user_issued_asset ( const string &  symbol,
const string &  new_issuer,
const string &  description,
uint64_t  max_supply,
price  core_exchange_rate,
bool  is_exchangeable,
bool  broadcast = false 
)

Update the parameters specific to a user issued asset. User issued assets have some options which are not relevant to other asset types. This operation is used to update those options an an existing user issues asset.

Parameters
symbolthe name or id of the asset to update, which must be a user-issued asset
new_issuerif the asset is to be given a new issuer, specify his ID here
descriptionasset description
max_supplythe maximum supply of this asset which may exist at any given time
core_exchange_rateprice used to convert non-core asset to core asset
is_exchangeabletrue to allow implicit conversion of this asset to/from core asset
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction updating the user-issued asset

Definition at line 65 of file wallet.cpp.