mirror of
https://github.com/kaspanet/kaspad.git
synced 2025-05-21 14:26:45 +00:00

* Add a show-address subcommand to kaspawallet. * Update the description of the key-file command line parameter.
32 lines
737 B
Go
32 lines
737 B
Go
package main
|
|
|
|
import "github.com/pkg/errors"
|
|
|
|
func main() {
|
|
subCmd, config := parseCommandLine()
|
|
|
|
var err error
|
|
switch subCmd {
|
|
case createSubCmd:
|
|
err = create(config.(*createConfig))
|
|
case balanceSubCmd:
|
|
err = balance(config.(*balanceConfig))
|
|
case sendSubCmd:
|
|
err = send(config.(*sendConfig))
|
|
case createUnsignedTransactionSubCmd:
|
|
err = createUnsignedTransaction(config.(*createUnsignedTransactionConfig))
|
|
case signSubCmd:
|
|
err = sign(config.(*signConfig))
|
|
case broadcastSubCmd:
|
|
err = broadcast(config.(*broadcastConfig))
|
|
case showAddressSubCmd:
|
|
err = showAddress(config.(*showAddressConfig))
|
|
default:
|
|
err = errors.Errorf("Unknown sub-command '%s'\n", subCmd)
|
|
}
|
|
|
|
if err != nil {
|
|
printErrorAndExit(err)
|
|
}
|
|
}
|