hyperledger/iroha
Iroha - A simple, decentralized ledger http://iroha.tech
shared_model::bindings::ModelTransactionBuilder Class Reference

#include "model_transaction_builder.hpp"

Collaboration diagram for shared_model::bindings::ModelTransactionBuilder:
Collaboration graph

Public Member Functions

 ModelTransactionBuilder ()
 
ModelTransactionBuilder creatorAccountId (const interface::types::AccountIdType &account_id)
 
ModelTransactionBuilder createdTime (interface::types::TimestampType created_time)
 
ModelTransactionBuilder quorum (interface::types::QuorumType quorum)
 
ModelTransactionBuilder batchMeta (interface::types::BatchType type, const std::vector< interface::types::HashType > &hashes)
 
ModelTransactionBuilder addAssetQuantity (const interface::types::AssetIdType &asset_id, const std::string &amount)
 
ModelTransactionBuilder addPeer (const interface::types::AddressType &address, const crypto::PublicKey &peer_key)
 
ModelTransactionBuilder addSignatory (const interface::types::AddressType &account_id, const crypto::PublicKey &public_key)
 
ModelTransactionBuilder removeSignatory (const interface::types::AddressType &account_id, const crypto::PublicKey &public_key)
 
ModelTransactionBuilder appendRole (const interface::types::AccountIdType &account_id, const interface::types::RoleIdType &role_name)
 
ModelTransactionBuilder createAsset (const interface::types::AssetNameType &asset_name, const interface::types::DomainIdType &domain_id, interface::types::PrecisionType precision)
 
ModelTransactionBuilder createAccount (const interface::types::AccountNameType &account_name, const interface::types::AddressType &domain_id, const crypto::PublicKey &main_pubkey)
 
ModelTransactionBuilder createDomain (const interface::types::AddressType &domain_id, const interface::types::RoleIdType &default_role)
 
ModelTransactionBuilder createRole (const interface::types::RoleIdType &role_name, const interface::RolePermissionSet &permissions)
 
ModelTransactionBuilder detachRole (const interface::types::AccountIdType &account_id, const interface::types::RoleIdType &role_name)
 
ModelTransactionBuilder grantPermission (const interface::types::AccountIdType &account_id, interface::permissions::Grantable permission)
 
ModelTransactionBuilder revokePermission (const interface::types::AccountIdType &account_id, interface::permissions::Grantable permission)
 
ModelTransactionBuilder setAccountDetail (const interface::types::AccountIdType &account_id, const interface::types::AccountDetailKeyType &key, const interface::types::AccountDetailValueType &value)
 
ModelTransactionBuilder setAccountQuorum (const interface::types::AddressType &account_id, interface::types::QuorumType quorum)
 
ModelTransactionBuilder subtractAssetQuantity (const interface::types::AssetIdType &asset_id, const std::string &amount)
 
ModelTransactionBuilder transferAsset (const interface::types::AccountIdType &src_account_id, const interface::types::AccountIdType &dest_account_id, const interface::types::AssetIdType &asset_id, const std::string &description, const std::string &amount)
 
proto::UnsignedWrapper< proto::Transaction > build ()
 

Detailed Description

Wrapper class for transaction builder. Designed only for SWIG bindings, don't use in other cases.

Constructor & Destructor Documentation

shared_model::bindings::ModelTransactionBuilder::ModelTransactionBuilder ( )

Here is the call graph for this function:

Here is the caller graph for this function:

Member Function Documentation

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::addAssetQuantity ( const interface::types::AssetIdType asset_id,
const std::string amount 
)

Adds given quantity of given asset to account

Parameters
asset_id- asset id
amount- amount of asset to add
Returns
builder with asset quantity command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::addPeer ( const interface::types::AddressType address,
const crypto::PublicKey peer_key 
)

Adds new peer into ledger

Parameters
address- peer address
peer_key- peer public key
Returns
builder with added peer command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::addSignatory ( const interface::types::AddressType account_id,
const crypto::PublicKey public_key 
)

Adds new signatory

Parameters
account_id- id of signatory's account
public_key- public key of signatory
Returns
builder with added signatory command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::appendRole ( const interface::types::AccountIdType account_id,
const interface::types::RoleIdType role_name 
)

Appends role

Parameters
account_id- account id to append role
role_name- role name to append
Returns
builder with append role command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::batchMeta ( interface::types::BatchType  type,
const std::vector< interface::types::HashType > &  hashes 
)

Sets batch meta

Parameters
type- one of ATOMIC or ORDERED
hashes- vector of hashes of transactions in this batch
Returns
builder with batchMeta set

Here is the call graph for this function:

proto::UnsignedWrapper< proto::Transaction > shared_model::bindings::ModelTransactionBuilder::build ( )

Builds result with all appended fields

Returns
wrapper on unsigned transaction

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::createAccount ( const interface::types::AccountNameType account_name,
const interface::types::AddressType domain_id,
const crypto::PublicKey main_pubkey 
)

Creates new account

Parameters
account_name- name of account to create
domain_id- id of domain where account will be created
main_pubkey- main public key of account
Returns
builder with new account command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::createAsset ( const interface::types::AssetNameType asset_name,
const interface::types::DomainIdType domain_id,
interface::types::PrecisionType  precision 
)

Creates asset

Parameters
asset_name- asset name to create
domain_id- domain id to create asset in
precision- asset precision
Returns
builder with create asset command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::createDomain ( const interface::types::AddressType domain_id,
const interface::types::RoleIdType default_role 
)

Creates new domain

Parameters
domain_id- domain name to create
default_role- default role name
Returns
builder with new domain command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::createdTime ( interface::types::TimestampType  created_time)

Sets time of creation

Parameters
created_time- time of creation
Returns
builder with created_time field appended

Here is the call graph for this function:

Here is the caller graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::createRole ( const interface::types::RoleIdType role_name,
const interface::RolePermissionSet permissions 
)

Creates role

Parameters
role_name- role name to create
permissions- permissions to include in new role
Returns
builder with create role command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::creatorAccountId ( const interface::types::AccountIdType account_id)

Sets id of account creator

Parameters
account_id- account id
Returns
builder with account_id field appended

Here is the call graph for this function:

Here is the caller graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::detachRole ( const interface::types::AccountIdType account_id,
const interface::types::RoleIdType role_name 
)

Detaches role

Parameters
account_id- account id to detach role from
role_name- role name to detach
Returns
builder with detach role command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::grantPermission ( const interface::types::AccountIdType account_id,
interface::permissions::Grantable  permission 
)

Grants permission

Parameters
account_id- account id to grant permission
permission- permission to grant
Returns
builder with grant permission command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::quorum ( interface::types::QuorumType  quorum)

Sets transaction quorum

Parameters
quorumto set
Returns
builder with quorum field appended

Here is the call graph for this function:

Here is the caller graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::removeSignatory ( const interface::types::AddressType account_id,
const crypto::PublicKey public_key 
)

Removes signatory

Parameters
account_id- id of signatory's account to remove
public_key- public key of signatory
Returns
builder with removed signatory command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::revokePermission ( const interface::types::AccountIdType account_id,
interface::permissions::Grantable  permission 
)

Revokes permission

Parameters
account_id- account id to revoke permission
permission- permission to revoke
Returns
builder with revoke permission command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::setAccountDetail ( const interface::types::AccountIdType account_id,
const interface::types::AccountDetailKeyType key,
const interface::types::AccountDetailValueType value 
)

Sets account detail

Parameters
account_id- account id to set detail
key- detail key
value- detail value
Returns
builder with set account detail command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::setAccountQuorum ( const interface::types::AddressType account_id,
interface::types::QuorumType  quorum 
)

Sets account quorum

Parameters
account_id- id of account to set quorum
quorum- quorum amount
Returns
builder with set account quorum command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::subtractAssetQuantity ( const interface::types::AssetIdType asset_id,
const std::string amount 
)

Subtracts asset quantity

Parameters
asset_id- asset id to subtract
amount- amount to subtract
Returns
builder with subtract asset quantity command appended

Here is the call graph for this function:

ModelTransactionBuilder shared_model::bindings::ModelTransactionBuilder::transferAsset ( const interface::types::AccountIdType src_account_id,
const interface::types::AccountIdType dest_account_id,
const interface::types::AssetIdType asset_id,
const std::string description,
const std::string amount 
)

Transfers asset from one account to another

Parameters
src_account_id- source account id
dest_account_id- destination account id
asset_id- asset id
description- description message which user can set
amount- amount of asset to transfer
Returns
buidler with transfer asset command appended

Here is the call graph for this function:


The documentation for this class was generated from the following files: