Documentation ¶
Index ¶
- func MakeAmendment(name string, rules []model.Rule, key crypto.Keypair) model.Amendment
- func MakeApprovedClaim(c model.Claim, key crypto.Keypair) model.ApprovedClaim
- func MakeClaim(name string, role string, key crypto.Keypair) model.Claim
- func MakeTransaction(to string, amount int, key crypto.Keypair) model.Transaction
- func MakeVote(perm string, object string, value string, key crypto.Keypair) model.OpenBallot
- func StampAndSign(obj model.Signable, key crypto.Keypair)
- type BlockChainService
- func (cs BlockChainService) BackwardWalk(handler WalkHandler)
- func (cs *BlockChainService) ByIndex(id uint32) model.Block
- func (cs *BlockChainService) ChainBlock(newBlock model.Block) (model.Block, string, error)
- func (cs BlockChainService) Genesis(key crypto.Keypair, constitutionFile string) model.Block
- func (cs *BlockChainService) GetHead() UnpackedBlock
- func (cs *BlockChainService) HeadBlock() model.Block
- func (cs BlockChainService) IsBlockDeltaValid(new, old model.Block) bool
- func (cs BlockChainService) IsBlockValid(newBlock model.Block) bool
- type UnpackedBlock
- type WalkHandler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func MakeAmendment ¶
func MakeApprovedClaim ¶
func MakeTransaction ¶
Types ¶
type BlockChainService ¶
type BlockChainService struct { Head UnpackedBlock Store storage.Store // contains filtered or unexported fields }
func (BlockChainService) BackwardWalk ¶
func (cs BlockChainService) BackwardWalk(handler WalkHandler)
func (*BlockChainService) ChainBlock ¶
func (BlockChainService) Genesis ¶
build and publish the Genesis block using a keypair and a constitution file
returns its ipfs cid
func (*BlockChainService) GetHead ¶
func (cs *BlockChainService) GetHead() UnpackedBlock
func (*BlockChainService) HeadBlock ¶
func (cs *BlockChainService) HeadBlock() model.Block
func (BlockChainService) IsBlockDeltaValid ¶
func (cs BlockChainService) IsBlockDeltaValid(new, old model.Block) bool
func (BlockChainService) IsBlockValid ¶
func (cs BlockChainService) IsBlockValid(newBlock model.Block) bool
type UnpackedBlock ¶
type UnpackedBlock struct { Cid string Block model.Block Cratos model.Cratos Demos model.Demos Currency model.Currency model.ObservableList }
func (UnpackedBlock) Majority ¶
func (c UnpackedBlock) Majority() uint64
type WalkHandler ¶
Click to show internal directories.
Click to hide internal directories.