Documentation ¶
Index ¶
- Constants
- func GenerateHashTreeRoot(g *generateContainer) (*generatedCode, error)
- func GenerateMarshalSSZ(g *generateContainer) (*generatedCode, error)
- func GenerateSizeSSZ(g *generateContainer) (*generatedCode, error)
- func GenerateUnmarshalSSZ(g *generateContainer) (*generatedCode, error)
- func RenderedPackageName(n string) string
- type Generator
- type ImportNamer
Constants ¶
View Source
const ByteChunkSize = 32
View Source
const ChunkSize = 32
ChunkSize is used to check if packed bytes align to the chunk sized used by the merkleization algorithm. If not, the bytes should be zero-padded to the nearest multiple of ChunkSize.
Variables ¶
This section is empty.
Functions ¶
func GenerateHashTreeRoot ¶
func GenerateHashTreeRoot(g *generateContainer) (*generatedCode, error)
func GenerateMarshalSSZ ¶
func GenerateMarshalSSZ(g *generateContainer) (*generatedCode, error)
func GenerateSizeSSZ ¶
func GenerateSizeSSZ(g *generateContainer) (*generatedCode, error)
func GenerateUnmarshalSSZ ¶
func GenerateUnmarshalSSZ(g *generateContainer) (*generatedCode, error)
func RenderedPackageName ¶
RenderedPackageName reduces the fully qualified package name to the relative package name, ie github.com/prysmaticlabs/prysm/v3/proto/eth/v1 -> v1
Types ¶
type Generator ¶
type Generator struct {
// contains filtered or unexported fields
}
Generator needs to be initialized with the package name, so use the new NewGenerator func for proper setup.
func NewGenerator ¶
type ImportNamer ¶
type ImportNamer struct {
// contains filtered or unexported fields
}
func NewImportNamer ¶
func NewImportNamer(source string, defaults map[string]string) *ImportNamer
func (*ImportNamer) ImportPairs ¶
func (n *ImportNamer) ImportPairs() string
func (*ImportNamer) ImportSource ¶
func (n *ImportNamer) ImportSource() string
func (*ImportNamer) NameString ¶
func (n *ImportNamer) NameString(p string) string
Click to show internal directories.
Click to hide internal directories.