lotus/chain/types/voucher.go

28 lines
529 B
Go
Raw Normal View History

package types
import (
"encoding/base64"
2020-02-12 23:52:36 +00:00
"github.com/filecoin-project/specs-actors/actors/builtin/paych"
cbor "github.com/ipfs/go-ipld-cbor"
)
2020-02-12 23:52:36 +00:00
type SignedVoucher = paych.SignedVoucher
2019-09-09 13:59:07 +00:00
func DecodeSignedVoucher(s string) (*SignedVoucher, error) {
data, err := base64.RawURLEncoding.DecodeString(s)
if err != nil {
return nil, err
}
var sv SignedVoucher
if err := cbor.DecodeInto(data, &sv); err != nil {
return nil, err
}
return &sv, nil
}
2020-02-12 23:52:36 +00:00
type Merge = paych.Merge
type ModVerifyParams = paych.ModVerifyParams