Skip to content

Commit

Permalink
Filecoin signature serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
ZenGround0 committed Dec 1, 2020
1 parent 751568a commit 2e5843a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion cmd/lotus-shed/ledger.go
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import (

"github.com/filecoin-project/go-address"
"github.com/filecoin-project/go-state-types/big"
"github.com/filecoin-project/go-state-types/crypto"
"github.com/urfave/cli/v2"
ledgerfil "github.com/whyrusleeping/ledger-filecoin-go"

Expand Down Expand Up @@ -249,7 +250,9 @@ var ledgerSignTestCmd = &cli.Command{
return err
}

fmt.Printf("Signature: %x\n", sig.SignatureBytes())
sigBytes := append([]byte{byte(crypto.SigTypeSecp256k1)}, sig.SignatureBytes()...)

fmt.Printf("Signature: %x\n", sigBytes)

return nil
},
Expand Down

0 comments on commit 2e5843a

Please sign in to comment.