Documentation
¶
Index ¶
- Variables
- func BuildTx(nonce, to, amount, gasLimit, gasPrice, data string) error
- func BuildTxAction(c *cli.Context) error
- func CalcHashAction(c *cli.Context) error
- func Ecrecover(hash string, sig string) error
- func EcrecoverAction(c *cli.Context) error
- func PackAction(c *cli.Context) error
- func PackArguments(args []string) error
- func ParseFlagKeystore(c *cli.Context) string
- func ParseFlagPassword(c *cli.Context) string
- func ReadPassphrase(c *cli.Context) (string, error)
- func SignHash(ksPath string, account, passphrase string, hash string) error
- func SignHashAction(c *cli.Context) error
- func SignTx(ksPath string, account, passphrase string, rawTxStr string, chainId string) error
- func SignTxAction(c *cli.Context) error
- func Verify(pub, hash, sig string) error
- func VerifyAction(c *cli.Context) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FlagKeystore = cli.StringFlag{ Name: "keystore", Usage: "keystore directory", Value: DefaultKeystore(), } FlagPassword = cli.StringFlag{ Name: "password", Usage: "password file", Value: DefaultPassword(), } )
View Source
var BuildTxCmd = cli.Command{ Name: "tx", Usage: "build a new tx", UsageText: "tx <nonce> <to> <value> <gasLimit> <gasPrice> [data]", Action: BuildTxAction, Flags: []cli.Flag{}, }
View Source
var CalcHashCmd = cli.Command{ Name: "hash", Usage: "calculate keccak256 hash of data", UsageText: "hash <data>", Action: CalcHashAction, Flags: []cli.Flag{}, }
View Source
var CryptoCmd = cli.Command{ Name: "crypto", Usage: "crypto operations", Flags: []cli.Flag{FlagKeystore, FlagPassword}, Subcommands: []cli.Command{ CalcHashCmd, SignHashCmd, BuildTxCmd, SignTxCmd, VerifyCmd, EcrecoverCmd, PackCmd, }, }
View Source
var DefaultKeystore = utils.DefaultKeystore
View Source
var DefaultPassword = utils.DefaultPassword
View Source
var EcrecoverCmd = cli.Command{ Name: "ecrecover", Usage: "recover address from a signature", UsageText: "ecrecover <hash> <sig>", Action: EcrecoverAction, Flags: []cli.Flag{}, }
View Source
var (
ErrInsufficientArguments = fmt.Errorf("insufficient arguments")
)
View Source
var PackCmd = cli.Command{ Name: "pack", Usage: "pack arguments", UsageText: "pack <type0> <arg0> <type1> <arg1> ...", Action: PackAction, Flags: []cli.Flag{}, }
View Source
var ParseBigInt = utils.ParseBigInt
View Source
var ParseUint64 = utils.ParseUint64
View Source
var SignHashCmd = cli.Command{ Name: "signhash", Usage: "sign a hash", UsageText: "sign <account> <hash>", Action: SignHashAction, Flags: []cli.Flag{}, }
View Source
var SignTxCmd = cli.Command{ Name: "signtx", Usage: "sign a transaction", UsageText: "sign <account> <tx>", Action: SignTxAction, Flags: []cli.Flag{}, }
View Source
var VerifyCmd = cli.Command{ Name: "verify", Usage: "verify a signature", UsageText: "verify <pubkey> <hash> <sig>", Action: VerifyAction, Flags: []cli.Flag{}, }
Functions ¶
func BuildTxAction ¶
func CalcHashAction ¶
func EcrecoverAction ¶
func PackAction ¶
func PackArguments ¶
func ParseFlagKeystore ¶
func ParseFlagPassword ¶
func SignHashAction ¶
func SignTxAction ¶
func VerifyAction ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.