2019-08-09 21:41:50 +00:00
|
|
|
package types
|
|
|
|
|
|
|
|
import (
|
2019-08-13 04:27:54 +00:00
|
|
|
"encoding/base64"
|
|
|
|
|
2020-02-12 23:52:36 +00:00
|
|
|
"github.com/filecoin-project/specs-actors/actors/builtin/paych"
|
2019-08-09 21:41:50 +00:00
|
|
|
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
|
|
|
|
2019-08-13 04:27:54 +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
|