mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-11-27 03:58:06 +00:00
25 lines
675 B
Go
25 lines
675 B
Go
package crypto
|
|
|
|
import (
|
|
"github.com/nspcc-dev/neo-go/pkg/core/interop"
|
|
"github.com/nspcc-dev/neo-go/pkg/core/interop/interopnames"
|
|
)
|
|
|
|
var (
|
|
neoCryptoCheckMultisigID = interopnames.ToID([]byte(interopnames.NeoCryptoCheckMultisig))
|
|
neoCryptoCheckSigID = interopnames.ToID([]byte(interopnames.SystemCryptoCheckSig))
|
|
)
|
|
|
|
var cryptoInterops = []interop.Function{
|
|
{ID: neoCryptoCheckMultisigID, Func: ECDSASecp256r1CheckMultisig},
|
|
{ID: neoCryptoCheckSigID, Func: ECDSASecp256r1CheckSig},
|
|
}
|
|
|
|
func init() {
|
|
interop.Sort(cryptoInterops)
|
|
}
|
|
|
|
// Register adds crypto interops to ic.
|
|
func Register(ic *interop.Context) {
|
|
ic.Functions = append(ic.Functions, cryptoInterops)
|
|
}
|