interop/attribute: update documentation
This commit is contained in:
parent
6fac273d5d
commit
60bea7e224
1 changed files with 54 additions and 6 deletions
|
@ -1,17 +1,65 @@
|
||||||
|
/*
|
||||||
|
Package attribute provides getters for transaction attributes.
|
||||||
|
*/
|
||||||
package attribute
|
package attribute
|
||||||
|
|
||||||
// Package attribute provides function signatures that can be used inside
|
// Attribute represents transaction attribute in Neo, it's an opaque data
|
||||||
// smart contracts that are written in the neo-go framework.
|
// structure that you can get data from only using functions from this package.
|
||||||
|
// It's similar in function to the TransactionAttribute class in the Neo .net
|
||||||
// Attribute stubs a NEO transaction attribute type.
|
// framework. To use it you need to get is first using transaction.GetAttributes.
|
||||||
type Attribute struct{}
|
type Attribute struct{}
|
||||||
|
|
||||||
// GetUsage returns the usage of the given attribute.
|
// GetUsage returns the Usage field of the given attribute. It is an enumeration
|
||||||
|
// with the following possible values:
|
||||||
|
// ContractHash = 0x00
|
||||||
|
// ECDH02 = 0x02
|
||||||
|
// ECDH03 = 0x03
|
||||||
|
// Script = 0x20
|
||||||
|
// Vote = 0x30
|
||||||
|
// CertURL = 0x80
|
||||||
|
// DescriptionURL = 0x81
|
||||||
|
// Description = 0x90
|
||||||
|
//
|
||||||
|
// Hash1 = 0xa1
|
||||||
|
// Hash2 = 0xa2
|
||||||
|
// Hash3 = 0xa3
|
||||||
|
// Hash4 = 0xa4
|
||||||
|
// Hash5 = 0xa5
|
||||||
|
// Hash6 = 0xa6
|
||||||
|
// Hash7 = 0xa7
|
||||||
|
// Hash8 = 0xa8
|
||||||
|
// Hash9 = 0xa9
|
||||||
|
// Hash10 = 0xaa
|
||||||
|
// Hash11 = 0xab
|
||||||
|
// Hash12 = 0xac
|
||||||
|
// Hash13 = 0xad
|
||||||
|
// Hash14 = 0xae
|
||||||
|
// Hash15 = 0xaf
|
||||||
|
//
|
||||||
|
// Remark = 0xf0
|
||||||
|
// Remark1 = 0xf1
|
||||||
|
// Remark2 = 0xf2
|
||||||
|
// Remark3 = 0xf3
|
||||||
|
// Remark4 = 0xf4
|
||||||
|
// Remark5 = 0xf5
|
||||||
|
// Remark6 = 0xf6
|
||||||
|
// Remark7 = 0xf7
|
||||||
|
// Remark8 = 0xf8
|
||||||
|
// Remark9 = 0xf9
|
||||||
|
// Remark10 = 0xfa
|
||||||
|
// Remark11 = 0xfb
|
||||||
|
// Remark12 = 0xfc
|
||||||
|
// Remark13 = 0xfd
|
||||||
|
// Remark14 = 0xfe
|
||||||
|
// Remark15 = 0xff
|
||||||
|
// This function uses `Neo.Attribute.GetUsage` syscall internally.
|
||||||
func GetUsage(attr Attribute) byte {
|
func GetUsage(attr Attribute) byte {
|
||||||
return 0x00
|
return 0x00
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetData returns the data of the given attribute.
|
// GetData returns the data of the given attribute, exact interpretation of this
|
||||||
|
// data depends on attribute's Usage type. It uses `Neo.Attribute.GetData`
|
||||||
|
// syscall internally.
|
||||||
func GetData(attr Attribute) []byte {
|
func GetData(attr Attribute) []byte {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue