Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrUnexpectedItemType = errors.New("unexpected item type")
)
Functions ¶
This section is empty.
Types ¶
type CompactArray ¶
CompactArray models the data structure described here: A compact-array is serialized as the array length, followed by each array item. Solana requires that the length be variant encoded over 3 bytes - i.e.: [ArrLenByte1, ArrLenByte2, ArrLenByte3, arrayContentsN, arrayContentsN+1,...] Source: https://docs.solana.com/developing/programming-model/transactions#compact-array-format
func (CompactArray) ToBytes ¶
func (c CompactArray) ToBytes() []byte
ToBytes gets the compact array as a byte array.
type Compactor ¶
type Compactor interface {
Compact() CompactArray
}
Compactor is the interface implemented by types that can Compact themselves into a CompactArray
Click to show internal directories.
Click to hide internal directories.