2020-04-14 14:24:21 +00:00
|
|
|
package crypto
|
|
|
|
|
|
|
|
import (
|
|
|
|
"github.com/nspcc-dev/neo-go/pkg/core/interop"
|
2020-08-13 07:41:33 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/core/interop/interopnames"
|
2020-04-14 14:24:21 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
var (
|
2021-03-09 15:11:21 +00:00
|
|
|
neoCryptoCheckMultisigID = interopnames.ToID([]byte(interopnames.NeoCryptoCheckMultisig))
|
|
|
|
neoCryptoCheckSigID = interopnames.ToID([]byte(interopnames.NeoCryptoCheckSig))
|
2020-04-14 14:24:21 +00:00
|
|
|
)
|
|
|
|
|
2020-07-28 13:38:00 +00:00
|
|
|
var cryptoInterops = []interop.Function{
|
2021-03-09 15:11:21 +00:00
|
|
|
{ID: neoCryptoCheckMultisigID, Func: ECDSASecp256r1CheckMultisig},
|
2021-03-04 17:56:54 +00:00
|
|
|
{ID: neoCryptoCheckSigID, Func: ECDSASecp256r1CheckSig},
|
2020-07-28 13:38:00 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func init() {
|
|
|
|
interop.Sort(cryptoInterops)
|
|
|
|
}
|
|
|
|
|
|
|
|
// Register adds crypto interops to ic.
|
|
|
|
func Register(ic *interop.Context) {
|
|
|
|
ic.Functions = append(ic.Functions, cryptoInterops)
|
2020-04-14 14:24:21 +00:00
|
|
|
}
|