mirror of https://github.com/poanetwork/gecko.git
30 lines
481 B
Go
30 lines
481 B
Go
|
// (c) 2019-2020, Ava Labs, Inc. All rights reserved.
|
||
|
// See the file LICENSE for licensing terms.
|
||
|
|
||
|
package secp256k1fx
|
||
|
|
||
|
import (
|
||
|
"errors"
|
||
|
|
||
|
"github.com/ava-labs/gecko/utils/crypto"
|
||
|
)
|
||
|
|
||
|
var (
|
||
|
errNilCredential = errors.New("nil credential")
|
||
|
)
|
||
|
|
||
|
// Credential ...
|
||
|
type Credential struct {
|
||
|
Sigs [][crypto.SECP256K1RSigLen]byte `serialize:"true"`
|
||
|
}
|
||
|
|
||
|
// Verify ...
|
||
|
func (cr *Credential) Verify() error {
|
||
|
switch {
|
||
|
case cr == nil:
|
||
|
return errNilCredential
|
||
|
default:
|
||
|
return nil
|
||
|
}
|
||
|
}
|