Governance

Governance

create_committee_member

Creates a committee_member object owned by the given account.

An account can have at most one committee_member object.

signed_transaction graphene::wallet::wallet_api::create_committee_member(
    string owner_account, 
    string url, 
    bool broadcast = false)
  • owner_account: the name or id of the account which is creating the committee_member

  • url: a URL to include in the committee_member record in the blockchain. Clients may display this when showing a list of committee_members. May be blank.

  • broadcast: true to broadcast the transaction on the network

get_witness

Returns information about the given witness.

witness_object graphene::wallet::wallet_api::get_witness(
    string owner_account)
  • owner_account: the name or id of the witness account owner, or the id of the witness

get_committee_member

Returns information about the given committee_member.

committee_member_object graphene::wallet::wallet_api::get_committee_member(
    string owner_account)
  • owner_account: the name or id of the committee_member account owner, or the id of the committee_member.

list_witnesses

Lists all Witnesses registered in the blockchain. This returns a list of all account names that own Witnesses, and the associated witness id, sorted by name. This lists Witnesses whether they are currently voted in or not.

Use the lowerbound and limit parameters to page through the list. To retrieve all Witness's, start by setting lowerbound to the empty string "", and then each iteration, pass the last witness name returned as the lowerbound for the next list_witnesss() call.

map<string, witness_id_type> graphene::wallet::wallet_api::list_witnesses(
    const string &lowerbound, 
    uint32_t limit)
  • lowerbound: the name of the first Witness to return. If the named Witness does not exist, the list will start at the witness that comes after lowerbound

  • limit: the maximum number of Witness's to return (max: 1000)

list_committee_members

Lists all committee_members registered in the blockchain. This returns a list of all account names that own committee_members, and the associated committee_member id, sorted by name. This lists committee_members whether they are currently voted in or not.

Use the lowerbound and limit parameters to page through the list. To retrieve all committee_members, start by setting lowerbound to the empty string "", and then each iteration, pass the last committee_member name returned as the lowerbound for the next list_committee_members() call.

map<string, committee_member_id_type> graphene::wallet::wallet_api::list_committee_members(
    const string &lowerbound, 
    uint32_t limit)
  • lowerbound: the name of the first committee_member to return. If the named committee_member does not exist, the list will start at the committee_member that comes after lowerbound

  • limit: the maximum number of committee_members to return (max: 1000)

create_witness

Creates a witness object owned by the given account.

An account can have at most one witness object.

signed_transaction graphene::wallet::wallet_api::create_witness(
    string owner_account, 
    string url, 
    bool broadcast = false)
  • owner_account: the name or id of the account which is creating the witness

  • url: a URL to include in the witness record in the blockchain. Clients may display this when showing a list of witnesses. May be blank.

  • broadcast: true to broadcast the transaction on the network

update_witness

Update a witness object owned by the given account.

signed_transaction graphene::wallet::wallet_api::update_witness(
    string witness_name, 
    string url, 
    string block_signing_key, 
    bool broadcast = false)
  • witness_name: The name of the witness’s owner account. Also accepts the ID of the owner account or the ID of the witness.

  • url: Same as for create_witness. The empty string makes it remain the same.

  • block_signing_key: The new block signing public key. The empty string makes it remain the same.

  • broadcast: true if you wish to broadcast the transaction.

create_worker

Create a worker object.

signed_transaction graphene::wallet::wallet_api::create_worker(
    string owner_account, 
    time_point_sec work_begin_date, 
    time_point_sec work_end_date, 
    share_type daily_pay, 
    string name, string url, 
    variant worker_settings, 
    bool broadcast = false)
  • owner_account: The account which owns the worker and will be paid

  • work_begin_date: When the work begins

  • work_end_date: When the work ends

  • daily_pay: Amount of pay per day (NOT per maint interval)

  • name: Any text

  • url: Any text

  • worker_settings: {“type” : “burn”|”refund”|”vesting”, “pay_vesting_period_days” : x}

  • broadcast: true if you wish to broadcast the transaction.

update_worker_votes

Update your votes for workers.

signed_transaction graphene::wallet::wallet_api::update_worker_votes(
    string account, 
    worker_vote_delta delta,
    bool broadcast = false)
  • account: The account which will pay the fee and update votes.

  • delta: {“vote_for” : […], “vote_against” : […], “vote_abstain” : […]}

  • broadcast: true if you wish to broadcast the transaction.

vote_for_committee_member

Vote for a given committee_member.

An account can publish a list of all committee_members they approve of. This command allows you to add or remove committee_members from this list. Each account’s vote is weighted according to the number of shares of the core asset owned by that account at the time the votes are tallied.

Note: You can't vote against a committee_member, you can only vote for the committee_member or not vote for the committee_member.

signed_transaction graphene::wallet::wallet_api::vote_for_committee_member(
    string voting_account, 
    string committee_member, 
    bool approve, 
    bool broadcast = false)
  • voting_account: the name or id of the account who is voting with their shares

  • committee_member: the name or id of the committee_member’ owner account

  • approve: true if you wish to vote in favour of that committee_member, false to remove your vote in favour of that committee_member

  • broadcast: true if you wish to broadcast the transaction

vote_for_witness

Vote for a given witness.

An account can publish a list of all witnesses they approve of. This command allows you to add or remove witnesses from this list. Each account’s vote is weighted according to the number of shares of the core asset owned by that account at the time the votes are tallied.

Note: You can't vote against a witness, you can only vote for the witness or not vote for the witness.

signed_transaction graphene::wallet::wallet_api::vote_for_witness(
    string voting_account, 
    string witness, 
    bool approve, 
    bool broadcast = false)
  • voting_account: the name or id of the account who is voting with their shares

  • witness: the name or id of the witness’ owner account

  • approve: true if you wish to vote in favour of that witness, false to remove your vote in favour of that witness

  • broadcast: true if you wish to broadcast the transaction

set_voting_proxy

Set the voting proxy for an account.

If a user does not wish to take an active part in voting, they can choose to allow another account to vote their stake.

Setting a vote proxy does not remove your previous votes from the blockchain, they remain there but are ignored. If you later null out your vote proxy, your previous votes will take effect again.

This setting can be changed at any time.

signed_transaction graphene::wallet::wallet_api::set_voting_proxy(
    string account_to_modify, 
    optional<string> voting_account, 
    bool broadcast = false)
  • account_to_modify: the name or id of the account to update

  • voting_account: the name or id of an account authorized to vote account_to_modify’s shares, or null to vote your own shares

  • broadcast: true if you wish to broadcast the transaction

set_desired_witness_and_committee_member_count

Set your vote for the number of witnesses and committee_members in the system.

Each account can voice their opinion on how many committee_members and how many witnesses there should be in the active committee_member/active witness list. These are independent of each other. You must vote your approval of at least as many committee_members or witnesses as you claim there should be (you can’t say that there should be 20 committee_members but only vote for 10).

There are maximum values for each set in the blockchain parameters (currently defaulting to 1001).

This setting can be changed at any time. If your account has a voting proxy set, your preferences will be ignored.

signed_transaction graphene::wallet::wallet_api::set_desired_witness_and_committee_member_count(
    string account_to_modify, 
    uint16_t desired_number_of_witnesses, 
    uint16_t desired_number_of_committee_members, 
    bool broadcast = false)
  • account_to_modify: the name or id of the account to update

  • desired_number_of_witnesses: desired number of active witnesses

  • desired_number_of_committee_members: desired number of active committee members

  • broadcast: true if you wish to broadcast the transaction

propose_parameter_change

Creates a transaction to propose a parameter change.

Multiple parameters can be specified if an atomic change is desired.

signed_transaction graphene::wallet::wallet_api::propose_parameter_change(
    const string &proposing_account, 
    fc::time_point_sec expiration_time, 
    const variant_object &changed_values, 
    bool broadcast = false)
  • proposing_account: The account paying the fee to propose the tx

  • expiration_time: Timestamp specifying when the proposal will either take effect or expire.

  • changed_values: The values to change; all other chain parameters are filled in with default values

  • broadcast: true if you wish to broadcast the transaction

propose_fee_change

Propose a fee change.

signed_transaction graphene::wallet::wallet_api::propose_fee_change(
    const string &proposing_account, 
    fc::time_point_sec expiration_time, 
    const variant_object &changed_values, 
    bool broadcast = false)
  • proposing_account: The account paying the fee to propose the tx

  • expiration_time: Timestamp specifying when the proposal will either take effect or expire.

  • changed_values: Map of operation type to new fee. Operations may be specified by name or ID. The “scale” key changes the scale. All other operations will maintain current values.

  • broadcast: true if you wish to broadcast the transaction