ngtype

package module
v0.0.0-...-74cd83e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 30, 2020 License: MIT Imports: 19 Imported by: 0

README

ngtype

WRANNING: types are migrated to the ngcore monorepo ngtypes folder, this repo is desperated

GoDoc Go Report Card

block relating types for ngin network

Documentation

Overview

block is just a tx mass, but can be treat as a block it means that after the vault summary, the data in previous block chain can be throw we just need to keep the latest some block and treasuries to make the chain safe

Package ngtype implements the block structure and related types.

bare -(+ops&mtree)-> Unsealing -(+nonce)-> Sealed

Index

Constants

View Source
const (
	GenesisPK      = "" /* 132-byte string literal not displayed */
	GenesisBalance = math.MaxInt64
	GenesisData    = "NGIN TESTNET"
	GenesisHash    = "123"
)

Variables

View Source
var (
	ErrInvalidLengthAccount        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowAccount          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupAccount = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrBlockIsBare           = errors.New("the block is bare")
	ErrBlockIsUnsealing      = errors.New("the block is unsealing")
	ErrBlockHeightInvalid    = errors.New("the block's height is invalid")
	ErrBlockMTreeInvalid     = errors.New("the merkle tree in block is invalid")
	ErrBlockPrevBlockHash    = errors.New("the block's previous block hash is invalid")
	ErrBlockPrevTreasuryHash = errors.New("the block's backend vault is invalid")
	ErrBlockDiffInvalid      = errors.New("the block's difficulty is invalid")
	ErrBlockHashInvalid      = errors.New("the block's hash is invalid")
	ErrBlockNonceInvalid     = errors.New("the block's Nonce is invalid")
	ErrMalformedBlock        = errors.New("the block structure is malformed")
)
View Source
var (
	ErrInvalidLengthBlock        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowBlock          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupBlock = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	MaxDiff           = [32]byte{255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255, 255} // new(big.Int).Exp(big.NewInt(2), big.NewInt(256), big.NewInt(0)) // Target = MaxDiff / diff
	GenesisDifficulty = new(big.Int).SetBytes([]byte{0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 255})
	GenesisNonce      = new(big.Int).SetUint64(5577006791947779410)
	Big1              = big.NewInt(1)
	Big0              = big.NewInt(0)

	TargetTime = 1e10
)
View Source
var (
	OneNGIN = new(big.Int).SetUint64(1000000)
	//MinimalUnit = big.NewInt(1)
	OneBlockReward = new(big.Int).Mul(OneNGIN, big.NewInt(10)) // 10NG
)

Units

View Source
var (
	ErrInvalidOpNonce      = errors.New("the nonce in operation is smaller than the account's record")
	ErrIsNotSigned         = errors.New("the operation is not signed")
	ErrBalanceInsufficient = errors.New("balance is insufficient for payment")
	ErrWrongSign           = errors.New("the signer of operation is not the own of the account")
	ErrMalformedOperation  = errors.New("the operation structure is malformed")
)
View Source
var (
	ErrInvalidLengthOperation        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowOperation          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupOperation = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrAccountNotExists = errors.New("the account does not exist")
	ErrMalformedSheet   = errors.New("the sheet structure is malformed")
)
View Source
var (
	ErrInvalidLengthSheet        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowSheet          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupSheet = fmt.Errorf("proto: unexpected end of group")
)
View Source
var (
	ErrNotCheckpoint    = errors.New("not proper time for building new vault")
	ErrInvalidHookBlock = errors.New("the vault's hook_block is invalid")
	ErrMalformedVault   = errors.New("the vault structure is malformed")
)
View Source
var (
	ErrInvalidLengthVault        = fmt.Errorf("proto: negative length found during unmarshaling")
	ErrIntOverflowVault          = fmt.Errorf("proto: integer overflow")
	ErrUnexpectedEndOfGroupVault = fmt.Errorf("proto: unexpected end of group")
)
View Source
var OpType_name = map[int32]string{
	0: "TX",
}
View Source
var OpType_value = map[string]int32{
	"TX": 0,
}

Functions

func TotalFee

func TotalFee(ops []*Operation) (totalFee *big.Int)

TotalFee is a helper which helps calc the total fee among the ops

Types

type Account

type Account struct {
	ID                   uint64   `protobuf:"varint,1,opt,name=ID,proto3" json:"ID,omitempty"`
	Balance              []byte   `protobuf:"bytes,2,opt,name=balance,proto3" json:"balance,omitempty"`
	Owner                []byte   `protobuf:"bytes,3,opt,name=owner,proto3" json:"owner,omitempty"`
	Nonce                uint64   `protobuf:"varint,4,opt,name=nonce,proto3" json:"nonce,omitempty"`
	SubState             []byte   `protobuf:"bytes,5,opt,name=sub_state,json=subState,proto3" json:"sub_state,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func GetGenesisAccount

func GetGenesisAccount() *Account

func NewAccount

func NewAccount(id uint64, ownerKey []byte, balance *big.Int, subState []byte) *Account

AccountID will receive an ID and PK then return a Account without SubState and Balance(0

func NewRewardAccount

func NewRewardAccount(id uint64, ownerKey []byte, totalFeeReward *big.Int) *Account

func (*Account) Descriptor

func (*Account) Descriptor() ([]byte, []int)

func (*Account) GetBalance

func (m *Account) GetBalance() []byte

func (*Account) GetID

func (m *Account) GetID() uint64

func (*Account) GetNonce

func (m *Account) GetNonce() uint64

func (*Account) GetOwner

func (m *Account) GetOwner() []byte

func (*Account) GetSubState

func (m *Account) GetSubState() []byte

func (*Account) Marshal

func (m *Account) Marshal() (dAtA []byte, err error)

func (*Account) MarshalTo

func (m *Account) MarshalTo(dAtA []byte) (int, error)

func (*Account) MarshalToSizedBuffer

func (m *Account) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Account) ProtoMessage

func (*Account) ProtoMessage()

func (*Account) Reset

func (m *Account) Reset()

func (*Account) Size

func (m *Account) Size() (n int)

func (*Account) String

func (m *Account) String() string

func (*Account) Unmarshal

func (m *Account) Unmarshal(dAtA []byte) error

func (*Account) XXX_DiscardUnknown

func (m *Account) XXX_DiscardUnknown()

func (*Account) XXX_Marshal

func (m *Account) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Account) XXX_Merge

func (m *Account) XXX_Merge(src proto.Message)

func (*Account) XXX_Size

func (m *Account) XXX_Size() int

func (*Account) XXX_Unmarshal

func (m *Account) XXX_Unmarshal(b []byte) error

type Block

type Block struct {
	Height               uint64       `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	Timestamp            int64        `protobuf:"varint,2,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	TrieHash             []byte       `protobuf:"bytes,3,opt,name=trie_hash,json=trieHash,proto3" json:"trie_hash,omitempty"`
	PrevBlockHash        []byte       `protobuf:"bytes,4,opt,name=prev_block_hash,json=prevBlockHash,proto3" json:"prev_block_hash,omitempty"`
	PrevVaultHash        []byte       `protobuf:"bytes,5,opt,name=prev_vault_hash,json=prevVaultHash,proto3" json:"prev_vault_hash,omitempty"`
	Beneficiary          []byte       `protobuf:"bytes,6,opt,name=beneficiary,proto3" json:"beneficiary,omitempty"`
	Difficulty           []byte       `protobuf:"bytes,7,opt,name=difficulty,proto3" json:"difficulty,omitempty"`
	Nonce                []byte       `protobuf:"bytes,8,opt,name=nonce,proto3" json:"nonce,omitempty"`
	Operations           []*Operation `protobuf:"bytes,9,rep,name=operations,proto3" json:"operations,omitempty"`
	Hash                 []byte       `protobuf:"bytes,10,opt,name=hash,proto3" json:"hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{}     `json:"-"`
	XXX_unrecognized     []byte       `json:"-"`
	XXX_sizecache        int32        `json:"-"`
}

func GetGenesisBlock

func GetGenesisBlock() *Block

GetGenesisBlock will return a complete sealed GenesisBlock

func NewBareBlock

func NewBareBlock(height uint64, prevBlockHash, prevVaultHash []byte, PublicKey []byte, diff *big.Int) *Block

NewBareBlock will return an unsealing block and then you need to add ops and seal with the correct Nonce

func (*Block) CalculateHash

func (m *Block) CalculateHash() ([]byte, error)

GetHash will help you get the hash of block

func (*Block) CheckError

func (m *Block) CheckError() error

CheckError will check the errors in block inner fields

func (*Block) Copy

func (m *Block) Copy() *Block

func (*Block) Descriptor

func (*Block) Descriptor() ([]byte, []int)

func (*Block) GetBeneficiary

func (m *Block) GetBeneficiary() []byte

func (*Block) GetBlob

func (m *Block) GetBlob() ([]byte, error)

GetBlob will return a complete blob for block hash = PoWBlob + Nonce

func (*Block) GetDifficulty

func (m *Block) GetDifficulty() []byte

func (*Block) GetHash

func (m *Block) GetHash() []byte

func (*Block) GetHeight

func (m *Block) GetHeight() uint64

func (*Block) GetNonce

func (m *Block) GetNonce() []byte

func (*Block) GetOperations

func (m *Block) GetOperations() []*Operation

func (*Block) GetPrevBlockHash

func (m *Block) GetPrevBlockHash() []byte

func (*Block) GetPrevVaultHash

func (m *Block) GetPrevVaultHash() []byte

func (*Block) GetTimestamp

func (m *Block) GetTimestamp() int64

func (*Block) GetTrieHash

func (m *Block) GetTrieHash() []byte

func (*Block) IsCheckpoint

func (m *Block) IsCheckpoint() bool

IsCheckpoint will check whether the Block is the

func (*Block) IsGenesisBlock

func (m *Block) IsGenesisBlock() bool

func (*Block) IsSealed

func (m *Block) IsSealed() bool

func (*Block) IsUnsealing

func (m *Block) IsUnsealing() bool

func (*Block) Marshal

func (m *Block) Marshal() (dAtA []byte, err error)

func (*Block) MarshalTo

func (m *Block) MarshalTo(dAtA []byte) (int, error)

func (*Block) MarshalToSizedBuffer

func (m *Block) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Block) ProtoMessage

func (*Block) ProtoMessage()

func (*Block) Reset

func (m *Block) Reset()

func (*Block) Size

func (m *Block) Size() (n int)

func (*Block) String

func (m *Block) String() string

func (*Block) ToSealed

func (m *Block) ToSealed(nonce []byte, hash []byte) *Block

ToUnsealing converts an unsealing block to a sealed block

func (*Block) ToUnsealing

func (m *Block) ToUnsealing(ops []*Operation) *Block

ToUnsealing converts a bare block to an unsealing block

func (*Block) Unmarshal

func (m *Block) Unmarshal(dAtA []byte) error

func (*Block) VerifyHash

func (m *Block) VerifyHash() bool

GetHash will help you get the hash of block

func (*Block) XXX_DiscardUnknown

func (m *Block) XXX_DiscardUnknown()

func (*Block) XXX_Marshal

func (m *Block) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Block) XXX_Merge

func (m *Block) XXX_Merge(src proto.Message)

func (*Block) XXX_Size

func (m *Block) XXX_Size() int

func (*Block) XXX_Unmarshal

func (m *Block) XXX_Unmarshal(b []byte) error

type OpBucket

type OpBucket struct {
	Ops map[uint64]map[uint64]*Operation
}

OpBucket is an operation container with unfixed order, mainly for implementing queuing

func NewOpBucket

func NewOpBucket() *OpBucket

func (*OpBucket) Del

func (ops *OpBucket) Del(op *Operation) error

func (*OpBucket) Get

func (ops *OpBucket) Get(from uint64, nonce uint64) *Operation

func (*OpBucket) GetSortedTrie

func (ops *OpBucket) GetSortedTrie() *OpTrie

func (*OpBucket) Put

func (ops *OpBucket) Put(op *Operation)

type OpTrie

type OpTrie struct {
	Ops []*Operation
}

OpTrie is an fixed ordered operation container, mainly for pending OpTrie is an advanced type, aiming to get the trie root hash

func NewOpTrie

func NewOpTrie(ops []*Operation) *OpTrie

NewOpTrie receives ordered ops

func (*OpTrie) Append

func (ot *OpTrie) Append(op *Operation)

func (*OpTrie) Contain

func (ot *OpTrie) Contain(op *Operation) bool

func (*OpTrie) Copy

func (ot *OpTrie) Copy() *OpTrie

func (*OpTrie) Del

func (ot *OpTrie) Del(op *Operation) error

func (*OpTrie) Len

func (ot *OpTrie) Len() int

func (*OpTrie) Less

func (ot *OpTrie) Less(i, j int) bool

Less means that the op (I) has lower priority (than J)

func (*OpTrie) ReverseSort

func (ot *OpTrie) ReverseSort() *OpTrie

ReverseSort the ops from higher priority to lower priority

func (*OpTrie) Sort

func (ot *OpTrie) Sort() *OpTrie

Sort the ops from lower priority to higher priority

func (*OpTrie) Swap

func (ot *OpTrie) Swap(i, j int)

func (*OpTrie) TrieRoot

func (ot *OpTrie) TrieRoot() []byte

type OpType

type OpType int32
const (
	OpType_TX OpType = 0
)

func (OpType) EnumDescriptor

func (OpType) EnumDescriptor() ([]byte, []int)

func (OpType) String

func (x OpType) String() string

type Operation

type Operation struct {
	Type          OpType `protobuf:"varint,1,opt,name=type,proto3,enum=ngtype.OpType" json:"type,omitempty"`
	From          uint64 `protobuf:"varint,2,opt,name=from,proto3" json:"from,omitempty"`
	To            uint64 `protobuf:"varint,3,opt,name=to,proto3" json:"to,omitempty"`
	Fee           []byte `protobuf:"bytes,4,opt,name=fee,proto3" json:"fee,omitempty"`
	Value         []byte `protobuf:"bytes,5,opt,name=value,proto3" json:"value,omitempty"`
	Nonce         uint64 `protobuf:"varint,6,opt,name=nonce,proto3" json:"nonce,omitempty"`
	PrevVaultHash []byte `protobuf:"bytes,7,opt,name=prev_vault_hash,json=prevVaultHash,proto3" json:"prev_vault_hash,omitempty"`
	// sign
	R []byte `protobuf:"bytes,8,opt,name=r,proto3" json:"r,omitempty"`
	S []byte `protobuf:"bytes,9,opt,name=s,proto3" json:"s,omitempty"`
	// extension
	Extra                []byte   `protobuf:"bytes,10,opt,name=extra,proto3" json:"extra,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func NewUnsignedOperation

func NewUnsignedOperation(t OpType, sender, target, n uint64, value, fee *big.Int, prevVaultHash, extraData []byte) *Operation

NewUnsignedOperation will return an Unsigned Operation, must using Signature()

func (*Operation) CalculateHash

func (m *Operation) CalculateHash() ([]byte, error)

CalculateHash mainly for calculating the tire root of ops

func (*Operation) Copy

func (m *Operation) Copy() *Operation

func (*Operation) Descriptor

func (*Operation) Descriptor() ([]byte, []int)

func (*Operation) Equals

func (m *Operation) Equals(other merkletree.Content) (bool, error)

Equals mainly for calculating the tire root of ops

func (*Operation) GetExtra

func (m *Operation) GetExtra() []byte

func (*Operation) GetFee

func (m *Operation) GetFee() []byte

func (*Operation) GetFrom

func (m *Operation) GetFrom() uint64

func (*Operation) GetNonce

func (m *Operation) GetNonce() uint64

func (*Operation) GetPrevVaultHash

func (m *Operation) GetPrevVaultHash() []byte

func (*Operation) GetR

func (m *Operation) GetR() []byte

func (*Operation) GetS

func (m *Operation) GetS() []byte

func (*Operation) GetTo

func (m *Operation) GetTo() uint64

func (*Operation) GetType

func (m *Operation) GetType() OpType

func (*Operation) GetValue

func (m *Operation) GetValue() []byte

func (*Operation) IsSigned

func (m *Operation) IsSigned() bool

IsSigned will return whether the op has been signed

func (*Operation) Marshal

func (m *Operation) Marshal() (dAtA []byte, err error)

func (*Operation) MarshalTo

func (m *Operation) MarshalTo(dAtA []byte) (int, error)

func (*Operation) MarshalToSizedBuffer

func (m *Operation) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Operation) ProtoMessage

func (*Operation) ProtoMessage()

func (*Operation) ReadableHex

func (m *Operation) ReadableHex() string

ReadableID = txs in string

func (*Operation) Reset

func (m *Operation) Reset()

func (*Operation) Signature

func (m *Operation) Signature(privKey *ecdsa.PrivateKey) (R, S *big.Int, err error)

Sign will re-sign the Op with private key

func (*Operation) Size

func (m *Operation) Size() (n int)

func (*Operation) String

func (m *Operation) String() string

func (*Operation) Unmarshal

func (m *Operation) Unmarshal(dAtA []byte) error

func (*Operation) Verify

func (m *Operation) Verify(pubKey ecdsa.PublicKey) bool

Verify helps verify the operation whether signed by the public key owner

func (*Operation) XXX_DiscardUnknown

func (m *Operation) XXX_DiscardUnknown()

func (*Operation) XXX_Marshal

func (m *Operation) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Operation) XXX_Merge

func (m *Operation) XXX_Merge(src proto.Message)

func (*Operation) XXX_Size

func (m *Operation) XXX_Size() int

func (*Operation) XXX_Unmarshal

func (m *Operation) XXX_Unmarshal(b []byte) error

type Sheet

type Sheet struct {
	PrevVaultHash        []byte              `protobuf:"bytes,1,opt,name=prev_vault_hash,json=prevVaultHash,proto3" json:"prev_vault_hash,omitempty"`
	Rows                 map[uint64]*Account `` /* 150-byte string literal not displayed */
	XXX_NoUnkeyedLiteral struct{}            `json:"-"`
	XXX_unrecognized     []byte              `json:"-"`
	XXX_sizecache        int32               `json:"-"`
}

func NewEmptySheet

func NewEmptySheet(prevVaultHash []byte) *Sheet

func NewSheet

func NewSheet(prevVaultHash []byte, rows map[uint64]*Account) *Sheet

NewSheet gets the rows from db and return the sheet for transport/saving

func (*Sheet) ApplyBlock

func (m *Sheet) ApplyBlock(block *Block) (*Sheet, error)

func (*Sheet) Copy

func (m *Sheet) Copy() *Sheet

func (*Sheet) DelAccount

func (m *Sheet) DelAccount(accountID uint64) error

func (*Sheet) Descriptor

func (*Sheet) Descriptor() ([]byte, []int)

func (*Sheet) ExportAccounts

func (m *Sheet) ExportAccounts() []*Account

func (*Sheet) GetAccountByID

func (m *Sheet) GetAccountByID(accountID uint64) (*Account, error)

func (*Sheet) GetAccountByKey

func (m *Sheet) GetAccountByKey(publicKey ecdsa.PublicKey) ([]*Account, error)

func (*Sheet) GetAccountByKeyBytes

func (m *Sheet) GetAccountByKeyBytes(bPublicKey []byte) ([]*Account, error)

func (*Sheet) GetPrevVaultHash

func (m *Sheet) GetPrevVaultHash() []byte

func (*Sheet) GetRows

func (m *Sheet) GetRows() map[uint64]*Account

func (*Sheet) HasAccount

func (m *Sheet) HasAccount(accountID uint64) bool

func (*Sheet) Marshal

func (m *Sheet) Marshal() (dAtA []byte, err error)

func (*Sheet) MarshalTo

func (m *Sheet) MarshalTo(dAtA []byte) (int, error)

func (*Sheet) MarshalToSizedBuffer

func (m *Sheet) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Sheet) ProtoMessage

func (*Sheet) ProtoMessage()

func (*Sheet) RegisterAccount

func (m *Sheet) RegisterAccount(account *Account) error

func (*Sheet) Reset

func (m *Sheet) Reset()

func (*Sheet) Size

func (m *Sheet) Size() (n int)

func (*Sheet) String

func (m *Sheet) String() string

func (*Sheet) Unmarshal

func (m *Sheet) Unmarshal(dAtA []byte) error

func (*Sheet) XXX_DiscardUnknown

func (m *Sheet) XXX_DiscardUnknown()

func (*Sheet) XXX_Marshal

func (m *Sheet) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Sheet) XXX_Merge

func (m *Sheet) XXX_Merge(src proto.Message)

func (*Sheet) XXX_Size

func (m *Sheet) XXX_Size() int

func (*Sheet) XXX_Unmarshal

func (m *Sheet) XXX_Unmarshal(b []byte) error

type Vault

type Vault struct {
	Height               uint64   `protobuf:"varint,1,opt,name=height,proto3" json:"height,omitempty"`
	NewAccount           *Account `protobuf:"bytes,2,opt,name=new_account,json=newAccount,proto3" json:"new_account,omitempty"`
	Timestamp            int64    `protobuf:"varint,3,opt,name=timestamp,proto3" json:"timestamp,omitempty"`
	PrevVaultHash        []byte   `protobuf:"bytes,4,opt,name=prev_vault_hash,json=prevVaultHash,proto3" json:"prev_vault_hash,omitempty"`
	HookBlockHash        []byte   `protobuf:"bytes,5,opt,name=hook_block_hash,json=hookBlockHash,proto3" json:"hook_block_hash,omitempty"`
	Sheet                *Sheet   `protobuf:"bytes,6,opt,name=sheet,proto3" json:"sheet,omitempty"`
	Hash                 []byte   `protobuf:"bytes,7,opt,name=hash,proto3" json:"hash,omitempty"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func GetGenesisVault

func GetGenesisVault() *Vault

func NewVault

func NewVault(newAccountID uint64, prevVault *Vault, hookBlock *Block, currentSheet *Sheet) *Vault

func (*Vault) CalculateHash

func (m *Vault) CalculateHash() ([]byte, error)

func (*Vault) Copy

func (m *Vault) Copy() *Vault

func (*Vault) Descriptor

func (*Vault) Descriptor() ([]byte, []int)

func (*Vault) GetHash

func (m *Vault) GetHash() []byte

func (*Vault) GetHeight

func (m *Vault) GetHeight() uint64

func (*Vault) GetHookBlockHash

func (m *Vault) GetHookBlockHash() []byte

func (*Vault) GetNewAccount

func (m *Vault) GetNewAccount() *Account

func (*Vault) GetPrevVaultHash

func (m *Vault) GetPrevVaultHash() []byte

func (*Vault) GetSheet

func (m *Vault) GetSheet() *Sheet

func (*Vault) GetTimestamp

func (m *Vault) GetTimestamp() int64

func (*Vault) Marshal

func (m *Vault) Marshal() (dAtA []byte, err error)

func (*Vault) MarshalTo

func (m *Vault) MarshalTo(dAtA []byte) (int, error)

func (*Vault) MarshalToSizedBuffer

func (m *Vault) MarshalToSizedBuffer(dAtA []byte) (int, error)

func (*Vault) ProtoMessage

func (*Vault) ProtoMessage()

func (*Vault) Reset

func (m *Vault) Reset()

func (*Vault) Size

func (m *Vault) Size() (n int)

func (*Vault) String

func (m *Vault) String() string

func (*Vault) Unmarshal

func (m *Vault) Unmarshal(dAtA []byte) error

func (*Vault) XXX_DiscardUnknown

func (m *Vault) XXX_DiscardUnknown()

func (*Vault) XXX_Marshal

func (m *Vault) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Vault) XXX_Merge

func (m *Vault) XXX_Merge(src proto.Message)

func (*Vault) XXX_Size

func (m *Vault) XXX_Size() int

func (*Vault) XXX_Unmarshal

func (m *Vault) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL