Merge pull request #2387 from filecoin-project/asr/cli-api
CLI/API improvements
This commit is contained in:
commit
7ec58255bf
@ -162,7 +162,7 @@ type FullNode interface {
|
|||||||
WalletNew(context.Context, crypto.SigType) (address.Address, error)
|
WalletNew(context.Context, crypto.SigType) (address.Address, error)
|
||||||
// WalletHas indicates whether the given address is in the wallet.
|
// WalletHas indicates whether the given address is in the wallet.
|
||||||
WalletHas(context.Context, address.Address) (bool, error)
|
WalletHas(context.Context, address.Address) (bool, error)
|
||||||
// WalletHas indicates whether the given address is in the wallet.
|
// WalletList lists all the addresses in the wallet.
|
||||||
WalletList(context.Context) ([]address.Address, error)
|
WalletList(context.Context) ([]address.Address, error)
|
||||||
// WalletBalance returns the balance of the given address at the current head of the chain.
|
// WalletBalance returns the balance of the given address at the current head of the chain.
|
||||||
WalletBalance(context.Context, address.Address) (types.BigInt, error)
|
WalletBalance(context.Context, address.Address) (types.BigInt, error)
|
||||||
|
@ -84,6 +84,11 @@ var clientImportCmd = &cli.Command{
|
|||||||
}
|
}
|
||||||
defer closer()
|
defer closer()
|
||||||
ctx := ReqContext(cctx)
|
ctx := ReqContext(cctx)
|
||||||
|
|
||||||
|
if cctx.NArg() != 1 {
|
||||||
|
return xerrors.New("expected input path as the only arg")
|
||||||
|
}
|
||||||
|
|
||||||
absPath, err := filepath.Abs(cctx.Args().First())
|
absPath, err := filepath.Abs(cctx.Args().First())
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user