clio and fio-wallet (keosd)

fio-wallet

The EOSIO keosd wallet was renamed to fio-wallet to make it easier for Block Producers to run both EOSIO and FIO commands in the same environment.

Handling large numbers of FIO keys in fio wallet

If you are using the default settings for fio-wallet, you may encounter errors when attempting to sign a transaction with wallets containing larger numbers of keys (30,000+ keys). The failure is caused because requests to the nodeos API are exceeding the maximum payload size allowed for incoming requests.

To prevent this failure, add the following to /etc/fio/nodeos/config.ini when using a large number of keys in the wallet:

max-body-size=10485760
http-max-bytes-in-flight-mb=5000

clio

clio is the command line interface for FIO.

clio Examples

Manage wallet

Create a wallet

clio wallet create -n PICK_WALLET_NAME --to-console

Generate private/public keys

clio create key --to-console

Import private key into wallet

clio wallet import --private-key YOUR_PRIVATE_KEY -n PICK_WALLET_NAME

Remove key from wallet

clio wallet remove_key YOUR_PUBLIC_KEY -n PICK_WALLET_NAME --password YOUR_WALLET_PASSWORD

Unlock wallet

clio wallet unlock -n PICK_WALLET_NAME --password YOUR_WALLET_PASSWORD

Msig

Propose 1 FIO transfer msig

clio -u https://API_NODE_URL multisig propose NAME_YOUR_MSIG '[{"actor": "ACCOUNT_OF_FIRST_SIGNER", "permission": "active"},{"actor": "ACCOUNT_OF_SECOND_SIGNER", "permission": "active"}]' '[{"actor": "ACCOUNT_OF_MSIG", "permission": "active"}]' fio.token trnsfiopubky '{"payee_public_key":"PUBLIC_KEY_WHERE_FUNDS_ARE_SENT", "amount":1000000000, "max_fee":2000000000, "actor":"ACCOUNT_OF_MSIG", "tpid":""}' 1000000000 -p [email protected]

Approve msig

clio -u https://API_NODE_URL multisig approve ACCOUNT_OF_MSIG_PROPOSER NAME_YOUR_MSIG '{"actor": "ACCOUNT_OF_SIGNER", "permission": "active"}' 400000000 -p [email protected]

Execute msig

clio -u https://API_NODE_URL multisig exec ACCOUNT_OF_MSIG_PROPOSER NAME_YOUR_MSIG 400000000 -p [email protected]

Vote using clio

See Voting for block producers using clio

Push action

Using clio you can push any action to the blockchain as follows:

clio -u https://API_NODE_URL push action CONTRACT ACTION DATA -p [email protected]

Where:

  • CONTRACT and ACTION are specified for every API call in FIO Protocol API Spec. For example CONTRACT and ACTION for /register_fio_domain is fio.address and regdomain respectively.
  • DATA is specified for every API call in FIO Protocol API Spec. For example DATA for /register_fio_domain is:
{
  "fio_domain": "alice",
  "owner_fio_public_key": "FIO8PRe4WRZJj5mkem6qVGKyvNFgPsNnjNN6kPhh6EaCpzCVin5Jj",
  "max_fee": 2000000000,
  "tpid": "[email protected]",
  "actor": "aftyershcu22"
}

Registering FIO Address

For full description of fields see /register_fio_address

clio -u https://API_NODE_URL push action fio.address regaddress '{"fio_address": "YOUR_ADDRESS", "owner_fio_public_key": "", "max_fee": 40000000000, "tpid": "", "actor": "ACCOUNT_OF_SIGNER"
}' -p [email protected]

Setting domain public

For full description of fields see /set_fio_domain_public

clio -u https://API_NODE_URL push action fio.address setdomainpub '{"fio_domain": "YOUR_DOMAIN", "is_public": 1, "max_fee": 2000000000, "tpid": "", "actor": "ACCOUNT_OF_DOMAIN_OWNER"
}' -p [email protected]

Transferring tokens

For full description of fields see /transfer_tokens_pub_key

clio -u https://API_NODE_URL push action fio.token trnsfiopubky '{"payee_public_key": "RECIPIENT_FIO_PUBLIC_KEY", "amount": 1000000000, "max_fee": 2000000000, "tpid": "", "actor": "ACCOUNT_OF_PAYER"
}' -p [email protected]