Versions in this module Expand all Collapse all v1 v1.1.0 Mar 19, 2024 Changes in this version + const HashLength + const PacketIdentifierBlock + const PacketIdentifierBlockHeader + const PacketIdentifierDataCommand + const PacketIdentifierGeneralParams + const PacketIdentifierGenesisParams + const PacketIdentifierTransaction + const PacketIdentifierTransactionBody + type Block struct + Header BlockHeader + Transactions []Transaction + func NewBlock() Block + func (b *Block) BlockHash() string + func (b *Block) IsGenesisBlock() bool + func (b *Block) PrevBlockHash() string + func (x *Block) PacketIdentifier() PacketIdentifier + func (x *Block) Read(viewer *BlockViewer, reader *karmem.Reader) + func (x *Block) ReadAsRoot(reader *karmem.Reader) + func (x *Block) Reset() + func (x *Block) Write(writer *karmem.Writer, start uint) (offset uint, err error) + func (x *Block) WriteAsRoot(writer *karmem.Writer) (offset uint, err error) + type BlockHeader struct + BlockHash [32]byte + GasLimit int64 + Height int64 + MerkleRoot [32]byte + Params []byte + PrevBlockHash [32]byte + PublicKey [33]byte + Timestamp int64 + func NewBlockHeader() BlockHeader + func (x *BlockHeader) PacketIdentifier() PacketIdentifier + func (x *BlockHeader) Read(viewer *BlockHeaderViewer, reader *karmem.Reader) + func (x *BlockHeader) ReadAsRoot(reader *karmem.Reader) + func (x *BlockHeader) Reset() + func (x *BlockHeader) Write(writer *karmem.Writer, start uint) (offset uint, err error) + func (x *BlockHeader) WriteAsRoot(writer *karmem.Writer) (offset uint, err error) + type BlockHeaderViewer struct + func NewBlockHeaderViewer(reader *karmem.Reader, offset uint32) (v *BlockHeaderViewer) + func (x *BlockHeaderViewer) BlockHash() (v []byte) + func (x *BlockHeaderViewer) GasLimit() (v int64) + func (x *BlockHeaderViewer) Height() (v int64) + func (x *BlockHeaderViewer) MerkleRoot() (v []byte) + func (x *BlockHeaderViewer) Params(reader *karmem.Reader) (v []byte) + func (x *BlockHeaderViewer) PrevBlockHash() (v []byte) + func (x *BlockHeaderViewer) PublicKey() (v []byte) + func (x *BlockHeaderViewer) Timestamp() (v int64) + type BlockViewer struct + func NewBlockViewer(reader *karmem.Reader, offset uint32) (v *BlockViewer) + func (x *BlockViewer) Header(reader *karmem.Reader) (v *BlockHeaderViewer) + func (x *BlockViewer) Transactions(reader *karmem.Reader) (v []TransactionViewer) + type DataCommand struct + Key []byte + Opt []byte + Value []byte + func NewDataCommand() DataCommand + func (x *DataCommand) PacketIdentifier() PacketIdentifier + func (x *DataCommand) Read(viewer *DataCommandViewer, reader *karmem.Reader) + func (x *DataCommand) ReadAsRoot(reader *karmem.Reader) + func (x *DataCommand) Reset() + func (x *DataCommand) Write(writer *karmem.Writer, start uint) (offset uint, err error) + func (x *DataCommand) WriteAsRoot(writer *karmem.Writer) (offset uint, err error) + type DataCommandViewer struct + func NewDataCommandViewer(reader *karmem.Reader, offset uint32) (v *DataCommandViewer) + func (x *DataCommandViewer) Key(reader *karmem.Reader) (v []byte) + func (x *DataCommandViewer) Opt(reader *karmem.Reader) (v []byte) + func (x *DataCommandViewer) Value(reader *karmem.Reader) (v []byte) + type GeneralParams struct + Proof []byte + RandomNumber [33]byte + Result []byte + S []byte + T []byte + func NewGeneralParams() GeneralParams + func (x *GeneralParams) PacketIdentifier() PacketIdentifier + func (x *GeneralParams) Read(viewer *GeneralParamsViewer, reader *karmem.Reader) + func (x *GeneralParams) ReadAsRoot(reader *karmem.Reader) + func (x *GeneralParams) Reset() + func (x *GeneralParams) Write(writer *karmem.Writer, start uint) (offset uint, err error) + func (x *GeneralParams) WriteAsRoot(writer *karmem.Writer) (offset uint, err error) + type GeneralParamsViewer struct + func NewGeneralParamsViewer(reader *karmem.Reader, offset uint32) (v *GeneralParamsViewer) + func (x *GeneralParamsViewer) Proof(reader *karmem.Reader) (v []byte) + func (x *GeneralParamsViewer) RandomNumber() (v []byte) + func (x *GeneralParamsViewer) Result(reader *karmem.Reader) (v []byte) + func (x *GeneralParamsViewer) S(reader *karmem.Reader) (v []byte) + func (x *GeneralParamsViewer) T(reader *karmem.Reader) (v []byte) + type GenesisParams struct + Order [128]byte + Seed [32]byte + TimeParam int64 + VerifyParam [32]byte + func NewGenesisParams() GenesisParams + func (x *GenesisParams) PacketIdentifier() PacketIdentifier + func (x *GenesisParams) Read(viewer *GenesisParamsViewer, reader *karmem.Reader) + func (x *GenesisParams) ReadAsRoot(reader *karmem.Reader) + func (x *GenesisParams) Reset() + func (x *GenesisParams) Write(writer *karmem.Writer, start uint) (offset uint, err error) + func (x *GenesisParams) WriteAsRoot(writer *karmem.Writer) (offset uint, err error) + type GenesisParamsViewer struct + func NewGenesisParamsViewer(reader *karmem.Reader, offset uint32) (v *GenesisParamsViewer) + func (x *GenesisParamsViewer) Order() (v []byte) + func (x *GenesisParamsViewer) Seed() (v []byte) + func (x *GenesisParamsViewer) TimeParam() (v int64) + func (x *GenesisParamsViewer) VerifyParam() (v []byte) + type Hash [HashLength]byte + type PacketIdentifier uint64 + type Transaction struct + Body TransactionBody + func NewTransaction() Transaction + func (tx *Transaction) Verify() bool + func (x *Transaction) PacketIdentifier() PacketIdentifier + func (x *Transaction) Read(viewer *TransactionViewer, reader *karmem.Reader) + func (x *Transaction) ReadAsRoot(reader *karmem.Reader) + func (x *Transaction) Reset() + func (x *Transaction) Write(writer *karmem.Writer, start uint) (offset uint, err error) + func (x *Transaction) WriteAsRoot(writer *karmem.Writer) (offset uint, err error) + type TransactionBody struct + Address [20]byte + BlockHash [32]byte + Data []byte + Event []byte + Expire int64 + Gas int64 + Hash [32]byte + Height int64 + Index int64 + Nonce int64 + Opt []byte + Public [33]byte + Receiver [20]byte + Signature []byte + State []byte + Timestamp int64 + func NewTransactionBody() TransactionBody + func (x *TransactionBody) PacketIdentifier() PacketIdentifier + func (x *TransactionBody) Read(viewer *TransactionBodyViewer, reader *karmem.Reader) + func (x *TransactionBody) ReadAsRoot(reader *karmem.Reader) + func (x *TransactionBody) Reset() + func (x *TransactionBody) Write(writer *karmem.Writer, start uint) (offset uint, err error) + func (x *TransactionBody) WriteAsRoot(writer *karmem.Writer) (offset uint, err error) + type TransactionBodyViewer struct + func NewTransactionBodyViewer(reader *karmem.Reader, offset uint32) (v *TransactionBodyViewer) + func (x *TransactionBodyViewer) Address() (v []byte) + func (x *TransactionBodyViewer) BlockHash() (v []byte) + func (x *TransactionBodyViewer) Data(reader *karmem.Reader) (v []byte) + func (x *TransactionBodyViewer) Event(reader *karmem.Reader) (v []byte) + func (x *TransactionBodyViewer) Expire() (v int64) + func (x *TransactionBodyViewer) Gas() (v int64) + func (x *TransactionBodyViewer) Hash() (v []byte) + func (x *TransactionBodyViewer) Height() (v int64) + func (x *TransactionBodyViewer) Index() (v int64) + func (x *TransactionBodyViewer) Nonce() (v int64) + func (x *TransactionBodyViewer) Opt(reader *karmem.Reader) (v []byte) + func (x *TransactionBodyViewer) Public() (v []byte) + func (x *TransactionBodyViewer) Receiver() (v []byte) + func (x *TransactionBodyViewer) Signature(reader *karmem.Reader) (v []byte) + func (x *TransactionBodyViewer) State(reader *karmem.Reader) (v []byte) + func (x *TransactionBodyViewer) Timestamp() (v int64) + type TransactionViewer struct + func NewTransactionViewer(reader *karmem.Reader, offset uint32) (v *TransactionViewer) + func (x *TransactionViewer) Body(reader *karmem.Reader) (v *TransactionBodyViewer)