2020-05-18 15:52:30 +00:00
|
|
|
/*
|
|
|
|
Package transaction provides functions to work with transactions.
|
|
|
|
*/
|
2018-08-21 10:57:48 +00:00
|
|
|
package transaction
|
|
|
|
|
|
|
|
import (
|
2020-03-03 14:21:42 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/attribute"
|
2020-05-18 16:04:20 +00:00
|
|
|
"github.com/nspcc-dev/neo-go/pkg/interop/witness"
|
2018-08-21 10:57:48 +00:00
|
|
|
)
|
|
|
|
|
2020-05-18 15:52:30 +00:00
|
|
|
// Transaction represents a NEO transaction, it's an opaque data structure
|
|
|
|
// that can be used with functions from this package. It's similar to
|
|
|
|
// Transaction class in Neo .net framework.
|
2018-08-21 10:57:48 +00:00
|
|
|
type Transaction struct{}
|
|
|
|
|
2020-05-18 15:52:30 +00:00
|
|
|
// GetHash returns the hash (256 bit BE value in a 32 byte slice) of the given
|
|
|
|
// transaction (which also is its ID). Is uses `Neo.Transaction.GetHash` syscall.
|
2018-08-21 10:57:48 +00:00
|
|
|
func GetHash(t Transaction) []byte {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
2020-05-18 15:52:30 +00:00
|
|
|
// GetAttributes returns a slice of attributes for agiven transaction. Refer to
|
|
|
|
// attribute package on how to use them. This function uses
|
|
|
|
// `Neo.Transaction.GetAttributes` syscall.
|
2018-08-21 10:57:48 +00:00
|
|
|
func GetAttributes(t Transaction) []attribute.Attribute {
|
|
|
|
return []attribute.Attribute{}
|
|
|
|
}
|
|
|
|
|
2020-05-18 16:04:20 +00:00
|
|
|
// GetWitnesses returns a slice of witnesses of a given Transaction. Refer to
|
|
|
|
// witness package on how to use them. This function uses
|
|
|
|
// `Neo.Transaction.GetWitnesses` syscall.
|
|
|
|
func GetWitnesses(t Transaction) []witness.Witness {
|
|
|
|
return []witness.Witness{}
|
|
|
|
}
|