interop/input|output: update documentation

This commit is contained in:
Roman Khimov 2020-05-18 14:37:38 +03:00
parent 80b39649aa
commit 2bf7329a15
2 changed files with 24 additions and 13 deletions

View file

@ -1,17 +1,22 @@
/*
Package input provides functions dealing with transaction inputs.
*/
package input
// Package input provides function signatures that can be used inside
// smart contracts that are written in the neo-go framework.
// Input stubs the input of a NEO transaction.
// Input is an opaque data structure that can only be created by
// transaction.GetInputs and it represents transaction's input. It's similar
// to Neo .net framework's TransactionInput.
type Input struct{}
// GetHash returns the hash of the given input.
// GetHash returns the hash stored in the given input (which also is a
// transaction ID represented as 32 byte slice containing 256 bit BE value).
// It uses `Neo.Input.GetHash` syscall.
func GetHash(in Input) []byte {
return nil
}
// GetIndex returns the index of the given input.
// GetIndex returns the index stored in the given input (which is a
// transaction's output number). It uses `Neo.Input.GetIndex` syscall.
func GetIndex(in Input) int {
return 0
}