CLI Commands for Witnesses

CLI commands that witnesses use.

1. Witnesses CLI Command Reference

1.1. create_witness

Creates a witness object owned by the given account. An account can have at most one witness object.

return type, namespace, & method
signed_transaction graphene::wallet::wallet_api::create_witness(
    string owner_account, 
    string url,
    bool broadcast);

Parameters

name

data type

description

details

owner_account

string

The name or id of the account which is creating the witness.

no quotes required.

url

string

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

bool

true to broadcast the transaction on the network.

n/a

Example Call

create_witness myaccountname1 "www.my-awesome-witness.com" true

1.2. update_witness

Update a witness object owned by the given account.

return type, namespace, & method
signed_transaction graphene::wallet::wallet_api::update_witness(
    string witness_name,
    string url,
    string block_signing_key,
    bool broadcast);

Parameters

name

data type

description

details

witness_name

string

The name of the witness's owner account. Also accepts the ID of the owner account or the ID of the witness.

no quotes required.

url

string

Same as for create_witness. An empty string makes it remain the same.

n/a

block_signing_key

string

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

n/a

broadcast

bool

true to broadcast the transaction on the network.

n/a

Example Call

update_witness myaccountname-witness "www.my-awesome-witness.com" PPY62L3VYXS8XqorUe2kn63j4TAQpX4YkMJkfFfmmD1nd8Qjo4Bxz true

1.3. get_witness

Returns information about the given witness.

return type, namespace, & method
witness_object graphene::wallet::wallet_api::get_witness(
    string owner_account);

Parameters

name

data type

description

details

owner_account

string

The name or id of the witness account owner, or the id of the witness.

No quotes required.

Example Call

get_witness 1.6.99

1.4. 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 PPY owned by that account at the time the votes are tallied. Note that you can't vote against a witness, you can only vote for the witness or not vote for the witness.

return type, namespace, & method
signed_transaction graphene::wallet::wallet_api::vote_for_witness(
    string voting_account,
    string witness,
    bool approve,
    bool broadcast);

Parameters

name

data type

description

details

voting_account

string

The name or id of the account who is voting with their PPY.

No quotes required.

witness

string

The name or id of the witness' owner account.

No quotes required.

approve

bool

true if you wish to vote in favor of that witness, false to remove your vote in favor of that witness.

n/a

broadcast

bool

true to broadcast the transaction on the network.

n/a

Example Call

vote_for_witness 1.2.12345 some-witness true true

Last updated