forked from TrueCloudLab/neoneo-go
interop: add canonical type lengths as constants
Contracts need them anyway.
This commit is contained in:
parent
66f2bb1b03
commit
e230040c2e
1 changed files with 20 additions and 0 deletions
|
@ -1,5 +1,25 @@
|
|||
package interop
|
||||
|
||||
const (
|
||||
// Hash160Len is the length of proper Hash160 in bytes, use it to
|
||||
// sanitize input parameters.
|
||||
Hash160Len = 20
|
||||
// Hash256Len is the length of proper Hash256 in bytes, use it to
|
||||
// sanitize input parameters.
|
||||
Hash256Len = 32
|
||||
// PublicKeyCompressedLen is the length of compressed public key (which
|
||||
// is the most common public key type), use it to sanitize input
|
||||
// parameters.
|
||||
PublicKeyCompressedLen = 33
|
||||
// PublicKeyUncompressedLen is the length of uncompressed public key
|
||||
// (but you're not likely to ever encounter that), use it to sanitize
|
||||
// input parameters.
|
||||
PublicKeyUncompressedLen = 65
|
||||
// SignatureLen is the length of standard signature, use it to sanitize
|
||||
// input parameters.
|
||||
SignatureLen = 64
|
||||
)
|
||||
|
||||
// Signature represents 64-byte signature.
|
||||
type Signature []byte
|
||||
|
||||
|
|
Loading…
Reference in a new issue