Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AddRemoteCmd = &cli.Command{ Name: "add-remote", Usage: "Add remote wallet", ArgsUsage: "<address> <remote_peer>", Flags: []cli.Flag{}, Action: func(c *cli.Context) error { db, closer, err := database.OpenFromCLI(c) if err != nil { return err } defer closer.Close() lotusClient := util.NewLotusClient(c.String("lotus-api"), c.String("lotus-token")) w, err2 := wallet.AddRemoteHandler( c.Context, db, lotusClient, wallet.AddRemoteRequest{ Address: c.Args().Get(0), RemotePeer: c.Args().Get(1), }) if err2 != nil { return err2 } cliutil.PrintToConsole(w, c.Bool("json"), nil) return nil }, }
View Source
var ImportCmd = &cli.Command{ Name: "import", Usage: "Import a wallet from exported private key", ArgsUsage: "PRIVATE_KEY", Action: func(c *cli.Context) error { db, closer, err := database.OpenFromCLI(c) if err != nil { return err } defer closer.Close() lotusClient := util.NewLotusClient(c.String("lotus-api"), c.String("lotus-token")) w, err := wallet.ImportHandler( c.Context, db, lotusClient, wallet.ImportRequest{ PrivateKey: c.Args().Get(0), }) if err != nil { return err } cliutil.PrintToConsole(w, c.Bool("json"), nil) return nil }, }
View Source
var ListCmd = &cli.Command{ Name: "list", Usage: "List all imported wallets", Action: func(c *cli.Context) error { db, closer, err := database.OpenFromCLI(c) if err != nil { return err } defer closer.Close() wallets, err := wallet.ListHandler(c.Context, db) if err != nil { return err } cliutil.PrintToConsole(wallets, c.Bool("json"), nil) return nil }, }
View Source
var RemoveCmd = &cli.Command{ Name: "remove", Usage: "Remove a wallet", ArgsUsage: "<address>", Flags: []cli.Flag{ cliutil.ReallyDotItFlag, }, Action: func(c *cli.Context) error { if err := cliutil.HandleReallyDoIt(c); err != nil { return err } db, closer, err := database.OpenFromCLI(c) if err != nil { return err } defer closer.Close() return wallet.RemoveHandler(c.Context, db, c.Args().Get(0)) }, }
Functions ¶
This section is empty.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.