DECENT
Functions
Content

Functions

signed_transaction submit_content (const string &author, const vector< pair< string, uint32_t >> &co_authors, const string &URI, const vector< regional_price_info > &price_amounts, uint64_t size, const fc::ripemd160 &hash, const vector< account_id_type > &seeders, uint32_t quorum, const fc::time_point_sec &expiration, const string &publishing_fee_asset, const string &publishing_fee_amount, const string &synopsis, const DInteger &secret, const decent::encrypt::CustodyData &cd, bool broadcast)
 Submits or resubmits a content to the blockchain. In a case of resubmit, co-authors, price and synopsis fields can be modified. More...
 
void submit_content_async (const string &author, const vector< pair< string, uint32_t >> &co_authors, const string &content_dir, const string &samples_dir, const string &protocol, const vector< regional_price_info > &price_amounts, const vector< account_id_type > &seeders, const fc::time_point_sec &expiration, const string &synopsis)
 This function is used to create and upload a package and submit content in one step. More...
 
signed_transaction content_cancellation (const string &author, const string &URI, bool broadcast)
 This function can be used to cancel submitted content. This content is immediately not available to purchase. Seeders keep seeding this content up to next 24 hours. More...
 
void download_content (const string &consumer, const string &URI, const string &region_code_from, bool broadcast=false)
 Downloads encrypted content specified by provided URI. More...
 
optional< content_download_status > get_download_status (const string &consumer, const string &URI) const
 Get status about particular download process specified by provided URI. More...
 
signed_transaction request_to_buy (const string &consumer, const string &URI, const string &price_asset_name, const string &price_amount, const string &str_region_code_from, bool broadcast)
 This function is used to send a request to buy a content. This request is caught by seeders. More...
 
void leave_rating_and_comment (const string &consumer, const string &URI, uint64_t rating, const string &comment, bool broadcast=false)
 Rates and comments a content. More...
 
vector< buying_object > get_open_buyings () const
 Get a list of open buyings. More...
 
vector< buying_object > get_open_buyings_by_URI (const string &URI) const
 Get a list of open buyings by URI. More...
 
vector< buying_object > get_open_buyings_by_consumer (const string &account_id_or_name) const
 Get a list of open buyings by consumer. More...
 
vector< buying_object > get_buying_history_objects_by_consumer (const string &account_id_or_name) const
 Get history buyings by consumer. More...
 
vector< buying_object_ex > search_my_purchases (const string &account_id_or_name, const string &term, const string &order, const string &id, uint32_t count) const
 Get history buying objects by consumer that match search term. More...
 
optional< buying_object > get_buying_by_consumer_URI (const string &account_id_or_name, const string &URI) const
 Get buying object (open or history) by consumer and URI. More...
 
vector< rating_object_ex > search_feedback (const string &user, const string &URI, const string &id, uint32_t count) const
 Search for term in users' feedbacks. More...
 
optional< content_object > get_content (const string &URI) const
 Get a content by URI. More...
 
vector< content_summary > search_content (const string &term, const string &order, const string &user, const string &region_code, const string &id, const string &type, uint32_t count) const
 Get a list of contents ordered alphabetically by search term. More...
 
vector< content_summary > search_user_content (const string &user, const string &term, const string &order, const string &region_code, const string &id, const string &type, uint32_t count) const
 Get a list of contents ordered alphabetically by search term. More...
 
pair< account_id_type, vector< account_id_type > > get_author_and_co_authors_by_URI (const string &URI) const
 Get author and list of co-authors of a content corresponding to the provided URI. More...
 
std::pair< string, decent::encrypt::CustodyData > create_package (const std::string &content_dir, const std::string &samples_dir, const DInteger &aes_key) const
 Creates a package from selected files. More...
 
void extract_package (const std::string &package_hash, const std::string &output_dir, const DInteger &aes_key) const
 Extracts selected package. More...
 
void download_package (const std::string &url) const
 Downloads the package. More...
 
std::string upload_package (const std::string &package_hash, const std::string &protocol) const
 Starts uploading of the package. More...
 
void remove_package (const std::string &package_hash) const
 Removes the package. More...
 
DInteger restore_encryption_key (const string &account, buying_id_type buying)
 Restores AES key( used to encrypt and decrypt a content) from key particles stored in a buying object. More...
 
DInteger generate_encryption_key () const
 Generates AES encryption key. More...
 
signed_transaction graphene::wallet::wallet_api::submit_content (const string &author, const vector< pair< string, uint32_t >> &co_authors, const string &URI, const vector< regional_price_info > &price_amounts, uint64_t size, const fc::ripemd160 &hash, const vector< account_id_type > &seeders, uint32_t quorum, const fc::time_point_sec &expiration, const string &publishing_fee_asset, const string &publishing_fee_amount, const string &synopsis, const DInteger &secret, const decent::encrypt::CustodyData &cd, bool broadcast)
 Submits or resubmits a content to the blockchain. In a case of resubmit, co-authors, price and synopsis fields can be modified. More...
 
void graphene::wallet::wallet_api::submit_content_async (const string &author, const vector< pair< string, uint32_t >> &co_authors, const string &content_dir, const string &samples_dir, const string &protocol, const vector< regional_price_info > &price_amounts, const vector< account_id_type > &seeders, const fc::time_point_sec &expiration, const string &synopsis)
 This function is used to create and upload a package and submit content in one step. More...
 
signed_transaction graphene::wallet::wallet_api::content_cancellation (const string &author, const string &URI, bool broadcast)
 This function can be used to cancel submitted content. This content is immediately not available to purchase. Seeders keep seeding this content up to next 24 hours. More...
 
void graphene::wallet::wallet_api::download_content (const string &consumer, const string &URI, const string &region_code_from, bool broadcast=false)
 Downloads encrypted content specified by provided URI. More...
 
optional< content_download_statusgraphene::wallet::wallet_api::get_download_status (const string &consumer, const string &URI) const
 Get status about particular download process specified by provided URI. More...
 
signed_transaction graphene::wallet::wallet_api::request_to_buy (const string &consumer, const string &URI, const string &price_asset_name, const string &price_amount, const string &str_region_code_from, bool broadcast)
 This function is used to send a request to buy a content. This request is caught by seeders. More...
 
void graphene::wallet::wallet_api::leave_rating_and_comment (const string &consumer, const string &URI, uint64_t rating, const string &comment, bool broadcast=false)
 Rates and comments a content. More...
 
vector< buying_objectgraphene::wallet::wallet_api::get_open_buyings () const
 Get a list of open buyings. More...
 
vector< buying_objectgraphene::wallet::wallet_api::get_open_buyings_by_URI (const string &URI) const
 Get a list of open buyings by URI. More...
 
vector< buying_objectgraphene::wallet::wallet_api::get_open_buyings_by_consumer (const string &account_id_or_name) const
 Get a list of open buyings by consumer. More...
 
vector< buying_objectgraphene::wallet::wallet_api::get_buying_history_objects_by_consumer (const string &account_id_or_name) const
 Get history buyings by consumer. More...
 
vector< buying_object_exgraphene::wallet::wallet_api::search_my_purchases (const string &account_id_or_name, const string &term, const string &order, const string &id, uint32_t count) const
 Get history buying objects by consumer that match search term. More...
 
optional< buying_objectgraphene::wallet::wallet_api::get_buying_by_consumer_URI (const string &account_id_or_name, const string &URI) const
 Get buying object (open or history) by consumer and URI. More...
 
vector< rating_object_exgraphene::wallet::wallet_api::search_feedback (const string &user, const string &URI, const string &id, uint32_t count) const
 Search for term in users' feedbacks. More...
 
optional< content_objectgraphene::wallet::wallet_api::get_content (const string &URI) const
 Get a content by URI. More...
 
vector< content_summarygraphene::wallet::wallet_api::search_content (const string &term, const string &order, const string &user, const string &region_code, const string &id, const string &type, uint32_t count) const
 Get a list of contents ordered alphabetically by search term. More...
 
vector< content_summarygraphene::wallet::wallet_api::search_user_content (const string &user, const string &term, const string &order, const string &region_code, const string &id, const string &type, uint32_t count) const
 Get a list of contents ordered alphabetically by search term. More...
 
pair< account_id_type, vector< account_id_type > > graphene::wallet::wallet_api::get_author_and_co_authors_by_URI (const string &URI) const
 Get author and list of co-authors of a content corresponding to the provided URI. More...
 
std::pair< string, decent::encrypt::CustodyData > graphene::wallet::wallet_api::create_package (const std::string &content_dir, const std::string &samples_dir, const DInteger &aes_key) const
 Creates a package from selected files. More...
 
void graphene::wallet::wallet_api::extract_package (const std::string &package_hash, const std::string &output_dir, const DInteger &aes_key) const
 Extracts selected package. More...
 
void graphene::wallet::wallet_api::download_package (const std::string &url) const
 Downloads the package. More...
 
std::string graphene::wallet::wallet_api::upload_package (const std::string &package_hash, const std::string &protocol) const
 Starts uploading of the package. More...
 
void graphene::wallet::wallet_api::remove_package (const std::string &package_hash) const
 Removes the package. More...
 
DInteger graphene::wallet::wallet_api::restore_encryption_key (const string &account, buying_id_type buying)
 Restores AES key( used to encrypt and decrypt a content) from key particles stored in a buying object. More...
 
DInteger graphene::wallet::wallet_api::generate_encryption_key () const
 Generates AES encryption key. More...
 

Detailed Description

Function Documentation

◆ content_cancellation() [1/2]

signed_transaction content_cancellation ( const string &  author,
const string &  URI,
bool  broadcast 
)

This function can be used to cancel submitted content. This content is immediately not available to purchase. Seeders keep seeding this content up to next 24 hours.

Parameters
authorthe author of the content
URIthe URI of the content
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction cancelling the content

◆ content_cancellation() [2/2]

signed_transaction wallet_api::content_cancellation ( const string &  author,
const string &  URI,
bool  broadcast 
)

This function can be used to cancel submitted content. This content is immediately not available to purchase. Seeders keep seeding this content up to next 24 hours.

Parameters
authorthe author of the content
URIthe URI of the content
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction cancelling the content

Definition at line 38 of file wallet.cpp.

◆ create_package() [1/2]

std::pair<string, decent::encrypt::CustodyData> create_package ( const std::string &  content_dir,
const std::string &  samples_dir,
const DInteger &  aes_key 
) const

Creates a package from selected files.

See also
upload_package()
Parameters
content_dirthe directory containing all content that should be packed
samples_dirthe directory containing samples of the content
aes_keythe AES key for encryption
Returns
the package hash and content custody data

◆ create_package() [2/2]

std::pair< string, decent::encrypt::CustodyData > wallet_api::create_package ( const std::string &  content_dir,
const std::string &  samples_dir,
const DInteger &  aes_key 
) const

Creates a package from selected files.

See also
upload_package()
Parameters
content_dirthe directory containing all content that should be packed
samples_dirthe directory containing samples of the content
aes_keythe AES key for encryption
Returns
the package hash and content custody data

Definition at line 276 of file wallet.cpp.

◆ download_content() [1/2]

void download_content ( const string &  consumer,
const string &  URI,
const string &  region_code_from,
bool  broadcast = false 
)

Downloads encrypted content specified by provided URI.

Parameters
consumerconsumer of the content
URIthe URI of the content
region_code_fromtwo letter region code
broadcasttrue to broadcast the transaction on the network

◆ download_content() [2/2]

void wallet_api::download_content ( const string &  consumer,
const string &  URI,
const string &  region_code_from,
bool  broadcast = false 
)

Downloads encrypted content specified by provided URI.

Parameters
consumerconsumer of the content
URIthe URI of the content
region_code_fromtwo letter region code
broadcasttrue to broadcast the transaction on the network

Definition at line 45 of file wallet.cpp.

◆ download_package() [1/2]

void download_package ( const std::string &  url) const

Downloads the package.

Parameters
urlthe URL of the package

◆ download_package() [2/2]

void wallet_api::download_package ( const std::string &  url) const

Downloads the package.

Parameters
urlthe URL of the package

Definition at line 319 of file wallet.cpp.

◆ extract_package() [1/2]

void extract_package ( const std::string &  package_hash,
const std::string &  output_dir,
const DInteger &  aes_key 
) const

Extracts selected package.

See also
download_package()
Parameters
package_hashhash of the package that needs to be extracted
output_dirdirectory where extracted files will be created
aes_keythe AES key for decryption

◆ extract_package() [2/2]

void wallet_api::extract_package ( const std::string &  package_hash,
const std::string &  output_dir,
const DInteger &  aes_key 
) const

Extracts selected package.

See also
download_package()
Parameters
package_hashhash of the package that needs to be extracted
output_dirdirectory where extracted files will be created
aes_keythe AES key for decryption

Definition at line 298 of file wallet.cpp.

◆ generate_encryption_key() [1/2]

DInteger generate_encryption_key ( ) const

Generates AES encryption key.

Returns
random encryption key

◆ generate_encryption_key() [2/2]

DInteger wallet_api::generate_encryption_key ( ) const

Generates AES encryption key.

Returns
random encryption key

Definition at line 93 of file wallet.cpp.

◆ get_author_and_co_authors_by_URI() [1/2]

pair<account_id_type, vector<account_id_type> > get_author_and_co_authors_by_URI ( const string &  URI) const

Get author and list of co-authors of a content corresponding to the provided URI.

Parameters
URIthe URI of the content
Returns
the autor of the content and the list of co-authors, if provided

◆ get_author_and_co_authors_by_URI() [2/2]

pair< account_id_type, vector< account_id_type > > wallet_api::get_author_and_co_authors_by_URI ( const string &  URI) const

Get author and list of co-authors of a content corresponding to the provided URI.

Parameters
URIthe URI of the content
Returns
the autor of the content and the list of co-authors, if provided

Definition at line 271 of file wallet.cpp.

◆ get_buying_by_consumer_URI() [1/2]

optional<buying_object> get_buying_by_consumer_URI ( const string &  account_id_or_name,
const string &  URI 
) const

Get buying object (open or history) by consumer and URI.

Parameters
account_id_or_nameconsumer of the buying to retrieve
URIthe URI of the buying to retrieve
Returns
buying objects corresponding to the provided consumer, or null if no matching buying was found

◆ get_buying_by_consumer_URI() [2/2]

optional< buying_object > wallet_api::get_buying_by_consumer_URI ( const string &  account_id_or_name,
const string &  URI 
) const

Get buying object (open or history) by consumer and URI.

Parameters
account_id_or_nameconsumer of the buying to retrieve
URIthe URI of the buying to retrieve
Returns
buying objects corresponding to the provided consumer, or null if no matching buying was found

Definition at line 178 of file wallet.cpp.

◆ get_buying_history_objects_by_consumer() [1/2]

vector<buying_object> get_buying_history_objects_by_consumer ( const string &  account_id_or_name) const

Get history buyings by consumer.

Parameters
account_id_or_nameconsumer of the buyings to retrieve
Returns
a list of history buying objects corresponding to the provided consumer

◆ get_buying_history_objects_by_consumer() [2/2]

vector< buying_object > wallet_api::get_buying_history_objects_by_consumer ( const string &  account_id_or_name) const

Get history buyings by consumer.

Parameters
account_id_or_nameconsumer of the buyings to retrieve
Returns
a list of history buying objects corresponding to the provided consumer

Definition at line 116 of file wallet.cpp.

◆ get_content() [1/2]

optional<content_object> get_content ( const string &  URI) const

Get a content by URI.

Parameters
URIthe URI of the content to retrieve
Returns
the content corresponding to the provided URI, or null if no matching content was found

◆ get_content() [2/2]

optional< content_object > wallet_api::get_content ( const string &  URI) const

Get a content by URI.

Parameters
URIthe URI of the content to retrieve
Returns
the content corresponding to the provided URI, or null if no matching content was found

Definition at line 198 of file wallet.cpp.

◆ get_download_status() [1/2]

optional<content_download_status> get_download_status ( const string &  consumer,
const string &  URI 
) const

Get status about particular download process specified by provided URI.

Parameters
consumerconsumer of the content
URIthe URI of the content
Returns
download status, or null if no matching download process was found

◆ get_download_status() [2/2]

optional< content_download_status > wallet_api::get_download_status ( const string &  consumer,
const string &  URI 
) const

Get status about particular download process specified by provided URI.

Parameters
consumerconsumer of the content
URIthe URI of the content
Returns
download status, or null if no matching download process was found

Definition at line 50 of file wallet.cpp.

◆ get_open_buyings() [1/2]

vector<buying_object> get_open_buyings ( ) const

Get a list of open buyings.

Returns
a list of open buying objects

◆ get_open_buyings() [2/2]

vector< buying_object > wallet_api::get_open_buyings ( ) const

Get a list of open buyings.

Returns
a list of open buying objects

Definition at line 100 of file wallet.cpp.

◆ get_open_buyings_by_consumer() [1/2]

vector<buying_object> get_open_buyings_by_consumer ( const string &  account_id_or_name) const

Get a list of open buyings by consumer.

Parameters
account_id_or_nameconsumer of the buyings to retrieve
Returns
a list of open buying objects corresponding to the provided consumer

◆ get_open_buyings_by_consumer() [2/2]

vector< buying_object > wallet_api::get_open_buyings_by_consumer ( const string &  account_id_or_name) const

Get a list of open buyings by consumer.

Parameters
account_id_or_nameconsumer of the buyings to retrieve
Returns
a list of open buying objects corresponding to the provided consumer

Definition at line 110 of file wallet.cpp.

◆ get_open_buyings_by_URI() [1/2]

vector<buying_object> get_open_buyings_by_URI ( const string &  URI) const

Get a list of open buyings by URI.

Parameters
URIURI of the buyings to retrieve
Returns
a list of open buying objects corresponding to the provided URI

◆ get_open_buyings_by_URI() [2/2]

vector< buying_object > wallet_api::get_open_buyings_by_URI ( const string &  URI) const

Get a list of open buyings by URI.

Parameters
URIURI of the buyings to retrieve
Returns
a list of open buying objects corresponding to the provided URI

Definition at line 105 of file wallet.cpp.

◆ leave_rating_and_comment() [1/2]

void leave_rating_and_comment ( const string &  consumer,
const string &  URI,
uint64_t  rating,
const string &  comment,
bool  broadcast = false 
)

Rates and comments a content.

Parameters
consumerconsumer giving the rating
URIthe URI of the content
ratingthe rating. The available options are 1-5
commentthe maximum length of a comment is 100 characters
broadcasttrue to broadcast the transaction on the network

◆ leave_rating_and_comment() [2/2]

void wallet_api::leave_rating_and_comment ( const string &  consumer,
const string &  URI,
uint64_t  rating,
const string &  comment,
bool  broadcast = false 
)

Rates and comments a content.

Parameters
consumerconsumer giving the rating
URIthe URI of the content
ratingthe rating. The available options are 1-5
commentthe maximum length of a comment is 100 characters
broadcasttrue to broadcast the transaction on the network

Definition at line 79 of file wallet.cpp.

◆ remove_package() [1/2]

void remove_package ( const std::string &  package_hash) const

Removes the package.

Parameters
package_hashhash of the package that needs to be removed

◆ remove_package() [2/2]

void wallet_api::remove_package ( const std::string &  package_hash) const

Removes the package.

Parameters
package_hashhash of the package that needs to be removed

Definition at line 336 of file wallet.cpp.

◆ request_to_buy() [1/2]

signed_transaction request_to_buy ( const string &  consumer,
const string &  URI,
const string &  price_asset_name,
const string &  price_amount,
const string &  str_region_code_from,
bool  broadcast 
)

This function is used to send a request to buy a content. This request is caught by seeders.

Parameters
consumerconsumer of the content
URIthe URI of the content
price_asset_nameticker symbol of the asset which will be used to buy content
price_amountthe price of the content
str_region_code_fromtwo letter region code
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction requesting buying of the content

◆ request_to_buy() [2/2]

signed_transaction wallet_api::request_to_buy ( const string &  consumer,
const string &  URI,
const string &  price_asset_name,
const string &  price_amount,
const string &  str_region_code_from,
bool  broadcast 
)

This function is used to send a request to buy a content. This request is caught by seeders.

Parameters
consumerconsumer of the content
URIthe URI of the content
price_asset_nameticker symbol of the asset which will be used to buy content
price_amountthe price of the content
str_region_code_fromtwo letter region code
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction requesting buying of the content

Definition at line 56 of file wallet.cpp.

◆ restore_encryption_key() [1/2]

DInteger restore_encryption_key ( const string &  account,
buying_id_type  buying 
)

Restores AES key( used to encrypt and decrypt a content) from key particles stored in a buying object.

Parameters
accountconsumers account id or name
buyingthe buying object containing key particles
Returns
restored AES key from key particles

◆ restore_encryption_key() [2/2]

DInteger wallet_api::restore_encryption_key ( const string &  account,
buying_id_type  buying 
)

Restores AES key( used to encrypt and decrypt a content) from key particles stored in a buying object.

Parameters
accountconsumers account id or name
buyingthe buying object containing key particles
Returns
restored AES key from key particles

Definition at line 88 of file wallet.cpp.

◆ search_content() [1/2]

vector<content_summary> search_content ( const string &  term,
const string &  order,
const string &  user,
const string &  region_code,
const string &  id,
const string &  type,
uint32_t  count 
) const

Get a list of contents ordered alphabetically by search term.

Parameters
termsearch term
orderorder field. Available options are defined in 'database_api.cpp'
usercontent owner
region_codetwo letter region code
idthe id of content object to start searching from
typethe application and content type to be filtered, separated by comma. Available options are defined in 'content_object.hpp'
countmaximum number of contents to fetch (must not exceed 100)
Returns
the contents found

◆ search_content() [2/2]

vector< content_summary > wallet_api::search_content ( const string &  term,
const string &  order,
const string &  user,
const string &  region_code,
const string &  id,
const string &  type,
uint32_t  count 
) const

Get a list of contents ordered alphabetically by search term.

Parameters
termsearch term
orderorder field. Available options are defined in 'database_api.cpp'
usercontent owner
region_codetwo letter region code
idthe id of content object to start searching from
typethe application and content type to be filtered, separated by comma. Available options are defined in 'content_object.hpp'
countmaximum number of contents to fetch (must not exceed 100)
Returns
the contents found

Definition at line 204 of file wallet.cpp.

◆ search_feedback() [1/2]

vector<rating_object_ex> search_feedback ( const string &  user,
const string &  URI,
const string &  id,
uint32_t  count 
) const

Search for term in users' feedbacks.

Parameters
userthe author of the feedback
URIthe content object URI
idthe id of feedback object to start searching from
countmaximum number of feedbacks to fetch
Returns
the feedback found

◆ search_feedback() [2/2]

vector< rating_object_ex > wallet_api::search_feedback ( const string &  user,
const string &  URI,
const string &  id,
uint32_t  count 
) const

Search for term in users' feedbacks.

Parameters
userthe author of the feedback
URIthe content object URI
idthe id of feedback object to start searching from
countmaximum number of feedbacks to fetch
Returns
the feedback found

Definition at line 184 of file wallet.cpp.

◆ search_my_purchases() [1/2]

vector<buying_object_ex> search_my_purchases ( const string &  account_id_or_name,
const string &  term,
const string &  order,
const string &  id,
uint32_t  count 
) const

Get history buying objects by consumer that match search term.

Parameters
account_id_or_nameconsumer of the buyings to retrieve
termsearch term to look up in title and description
ordersort data by field. Available options are defined in 'database_api.cpp'
idthe id of buying object to start searching from
countmaximum number of contents to fetch (must not exceed 100)
Returns
a list of history buying objects corresponding to the provided consumer and matching search term

◆ search_my_purchases() [2/2]

vector< buying_object_ex > wallet_api::search_my_purchases ( const string &  account_id_or_name,
const string &  term,
const string &  order,
const string &  id,
uint32_t  count 
) const

Get history buying objects by consumer that match search term.

Parameters
account_id_or_nameconsumer of the buyings to retrieve
termsearch term to look up in title and description
ordersort data by field. Available options are defined in 'database_api.cpp'
idthe id of buying object to start searching from
countmaximum number of contents to fetch (must not exceed 100)
Returns
a list of history buying objects corresponding to the provided consumer and matching search term

Definition at line 143 of file wallet.cpp.

◆ search_user_content() [1/2]

vector<content_summary> search_user_content ( const string &  user,
const string &  term,
const string &  order,
const string &  region_code,
const string &  id,
const string &  type,
uint32_t  count 
) const

Get a list of contents ordered alphabetically by search term.

Parameters
usercontent owner
termsearch term. Available options are defined in 'database_api.cpp'
orderorder field
region_codetwo letter region code
idthe id of content object to start searching from
typethe application and content type to be filtered, separated by comma. Available options are defined in 'content_object.hpp'
countmaximum number of contents to fetch (must not exceed 100)
Returns
the contents found

◆ search_user_content() [2/2]

vector< content_summary > wallet_api::search_user_content ( const string &  user,
const string &  term,
const string &  order,
const string &  region_code,
const string &  id,
const string &  type,
uint32_t  count 
) const

Get a list of contents ordered alphabetically by search term.

Parameters
usercontent owner
termsearch term. Available options are defined in 'database_api.cpp'
orderorder field
region_codetwo letter region code
idthe id of content object to start searching from
typethe application and content type to be filtered, separated by comma. Available options are defined in 'content_object.hpp'
countmaximum number of contents to fetch (must not exceed 100)
Returns
the contents found

Definition at line 215 of file wallet.cpp.

◆ submit_content() [1/2]

signed_transaction submit_content ( const string &  author,
const vector< pair< string, uint32_t >> &  co_authors,
const string &  URI,
const vector< regional_price_info > &  price_amounts,
uint64_t  size,
const fc::ripemd160 &  hash,
const vector< account_id_type > &  seeders,
uint32_t  quorum,
const fc::time_point_sec &  expiration,
const string &  publishing_fee_asset,
const string &  publishing_fee_amount,
const string &  synopsis,
const DInteger &  secret,
const decent::encrypt::CustodyData &  cd,
bool  broadcast 
)

Submits or resubmits a content to the blockchain. In a case of resubmit, co-authors, price and synopsis fields can be modified.

See also
generate_encryption_key()
submit_content_async()
Parameters
authorthe author of the content
co_authorsthe co-authors' account name or ID mapped to corresponding payment split based on basis points. The maximum number of co-authors is 10
URIthe URI of the content
price_amountsthe price of the content per regions
sizethe size of the content
hashthe Hash of the package
seederslist of the seeders, which will publish the content
quorumdefines number of seeders needed to restore the encryption key
expirationthe expiration time of the content. The content is available to buy till it's expiration time
publishing_fee_assetticker symbol of the asset which will be used to publish content
publishing_fee_amountpublishing price
synopsisthe description of the content
secretthe AES key used to encrypt and decrypt the content
cdcustody data
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction submitting the content

◆ submit_content() [2/2]

signed_transaction wallet_api::submit_content ( const string &  author,
const vector< pair< string, uint32_t >> &  co_authors,
const string &  URI,
const vector< regional_price_info > &  price_amounts,
uint64_t  size,
const fc::ripemd160 &  hash,
const vector< account_id_type > &  seeders,
uint32_t  quorum,
const fc::time_point_sec &  expiration,
const string &  publishing_fee_asset,
const string &  publishing_fee_amount,
const string &  synopsis,
const DInteger &  secret,
const decent::encrypt::CustodyData &  cd,
bool  broadcast 
)

Submits or resubmits a content to the blockchain. In a case of resubmit, co-authors, price and synopsis fields can be modified.

See also
generate_encryption_key()
submit_content_async()
Parameters
authorthe author of the content
co_authorsthe co-authors' account name or ID mapped to corresponding payment split based on basis points. The maximum number of co-authors is 10
URIthe URI of the content
price_amountsthe price of the content per regions
sizethe size of the content
hashthe Hash of the package
seederslist of the seeders, which will publish the content
quorumdefines number of seeders needed to restore the encryption key
expirationthe expiration time of the content. The content is available to buy till it's expiration time
publishing_fee_assetticker symbol of the asset which will be used to publish content
publishing_fee_amountpublishing price
synopsisthe description of the content
secretthe AES key used to encrypt and decrypt the content
cdcustody data
broadcasttrue to broadcast the transaction on the network
Returns
the signed transaction submitting the content

Definition at line 3 of file wallet.cpp.

◆ submit_content_async() [1/2]

void submit_content_async ( const string &  author,
const vector< pair< string, uint32_t >> &  co_authors,
const string &  content_dir,
const string &  samples_dir,
const string &  protocol,
const vector< regional_price_info > &  price_amounts,
const vector< account_id_type > &  seeders,
const fc::time_point_sec &  expiration,
const string &  synopsis 
)

This function is used to create and upload a package and submit content in one step.

See also
create_package()
upload_package()
submit_content()
Parameters
authorthe author of the content
co_authorsthe co-authors' account name or ID mapped to corresponding payment split based on basis points. The maximum number of co-authors is 10
content_dirpath to the directory containing all content that should be packed
samples_dirpath to the directory containing samples of content
protocolprotocol for uploading package( ipfs )
price_amountsthe prices of the content per regions
seederslist of the seeders, which will publish the content
expirationthe expiration time of the content. The content is available to buy till it's expiration time
synopsisthe description of the content

◆ submit_content_async() [2/2]

void wallet_api::submit_content_async ( const string &  author,
const vector< pair< string, uint32_t >> &  co_authors,
const string &  content_dir,
const string &  samples_dir,
const string &  protocol,
const vector< regional_price_info > &  price_amounts,
const vector< account_id_type > &  seeders,
const fc::time_point_sec &  expiration,
const string &  synopsis 
)

This function is used to create and upload a package and submit content in one step.

See also
create_package()
upload_package()
submit_content()
Parameters
authorthe author of the content
co_authorsthe co-authors' account name or ID mapped to corresponding payment split based on basis points. The maximum number of co-authors is 10
content_dirpath to the directory containing all content that should be packed
samples_dirpath to the directory containing samples of content
protocolprotocol for uploading package( ipfs )
price_amountsthe prices of the content per regions
seederslist of the seeders, which will publish the content
expirationthe expiration time of the content. The content is available to buy till it's expiration time
synopsisthe description of the content

Definition at line 24 of file wallet.cpp.

◆ upload_package() [1/2]

std::string upload_package ( const std::string &  package_hash,
const std::string &  protocol 
) const

Starts uploading of the package.

See also
create_package()
Parameters
package_hashhash of the package that needs to be extracted
protocolprotocol for uploading package ( ipfs )
Returns
URL of package

◆ upload_package() [2/2]

std::string wallet_api::upload_package ( const std::string &  package_hash,
const std::string &  protocol 
) const

Starts uploading of the package.

See also
create_package()
Parameters
package_hashhash of the package that needs to be extracted
protocolprotocol for uploading package ( ipfs )
Returns
URL of package

Definition at line 328 of file wallet.cpp.