diff --git a/cmd/lotus-shed/cid.go b/cmd/lotus-shed/cid.go index b25e8580c2e..ee81dfdb84c 100644 --- a/cmd/lotus-shed/cid.go +++ b/cmd/lotus-shed/cid.go @@ -30,6 +30,21 @@ var cidCmd = &cli.Command{ cidIdCmd, inspectBundleCmd, cborCid, + cidBytes, + }, +} + +var cidBytes = &cli.Command{ + Name: "cbor", + Usage: "cid bytes", + ArgsUsage: "[cid]", + Action: func(cctx *cli.Context) error { + c, err := cid.Decode(cctx.Args().First()) + if err != nil { + return err + } + fmt.Printf("%x\n", c.Bytes()) + return nil }, }