DPoS / Transfer Gateway CLI
yarn install
yarn build
To generate a Loom private key, run:
yarn gen:mainnet-key
The private key will be saved into a file called mainnet_private_key
.
For Ethereum mainnet, run:
yarn gen:ethereum-key
This command will save the private key into a file called ethereum_private_key
.
export INFURA_API_KEY=<YOUR_INFURA_API_KEY>
First, you must map your accounts with:
node dist/index.js -c ../configs/mainnet.json map-accounts
Next, you can use the CLI like this:
node dist/index.js -c ../configs/mainnet.json list-validators
map-accounts
: Connects the user's dappchain/ethereum keys together. THIS MUST BE EXECUTED WHEN CONNECTING A NEW KEYPAIR TO THE DAPPCHAINcoin-balance
: Retrieves the user's Loom balance.resolve <contractName>
: Retrieve thecontractName
's dappchain address from the address mapper
deposit <amount>
: Depositsamount
LOOM tokens to the gateway. If not enough tokens approved before hand, it will also approve the missing amountwithdraw <amount>
: Withdrawsamount
LOOM tokens from the gateway.resume-withdrawal
: Resumes an interrupted withdrawal that didn't consume the last withdrawal receiptreceipt
: Retrieves the currently pending withdrawal receipt (or null if there is none)
list-validators
: Returns the current DPoS validatorslist-candidates
: Returns information about the current DPoS candidates + their metadatacheck-delegations -v validatorAddress -d delegatorAddress
: Checks how much LOOM has been delegated bydelegatorAddress
tovalidatorAddress
claim-delegations
: Claims the user's rewards. Optionally can supply `--account to withdraw to a different addressdelegate <amount> <validator>
: Lock upamount
and delegate it tovalidator
undelegate <amount> <validator>
: Unbondamount
fromvalidator
list-all-delegations
: Shows all delegations that are active for each validatorlist-delegations <validator>
: Shows all delegations of a validatormy-delegations
: display the user's delegations to all candidatestime-until-elections
: displays the time until electionscheck-delegations --validator <hex-address> (optional) --delegator <hex-address> (optional)
: Check how much has a delegator bonded to a candidate/validatorcheck-rewards
: Check the user rewardsclaim-rewards
: Get back the user rewardsdelegate <amount> <validator> <tier> [referrer]
: Delegatesamount
to a candidate / validatorredelegate <amount> <formerValidator> <validator> <index>
: Instantly redelegates an amount from a delegation to another validatorundelegate <amount> <validator> <index>
: Undelegatesamount
from a validator