Documentation
¶
Index ¶
- func FetchMainchainBlock(bs bserv.BlockService, c *cid.Cid) (*mainchain.Block, error)
- func FetchMerkleTree(bs bserv.BlockService, c *cid.Cid) (*merkle.Tree, error)
- func FetchStateChainBlock(bs bserv.BlockService, c *cid.Cid) (*statechain.Block, error)
- func FetchStateChainDiff(bs bserv.BlockService, c *cid.Cid) (*statechain.Diff, error)
- func FetchStateChainTransaction(bs bserv.BlockService, c *cid.Cid) (*statechain.Transaction, error)
- func GetCID(v interface{}) (*cid.Cid, error)
- func GetCIDByHash(hash string) (*cid.Cid, error)
- func GetMainchainBlockCID(block *mainchain.Block) (*cid.Cid, error)
- func GetMerkleTreeCID(tree *merkle.Tree) (*cid.Cid, error)
- func GetStatechainBlockCID(block *statechain.Block) (*cid.Cid, error)
- func GetStatechainDiffCID(d *statechain.Diff) (*cid.Cid, error)
- func GetStatechainTransactionCID(tx *statechain.Transaction) (*cid.Cid, error)
- func Put(bs bserv.BlockService, v interface{}) (*cid.Cid, error)
- func PutMainchainBlock(bs bserv.BlockService, block *mainchain.Block) (*cid.Cid, error)
- func PutMerkleTree(bs bserv.BlockService, tree *merkle.Tree) (*cid.Cid, error)
- func PutStatechainBlock(bs bserv.BlockService, block *statechain.Block) (*cid.Cid, error)
- func PutStatechainDiff(bs bserv.BlockService, d *statechain.Diff) (*cid.Cid, error)
- func PutStatechainTransaction(bs bserv.BlockService, tx *statechain.Transaction) (*cid.Cid, error)
- type Interface
- type Props
- type Service
- func (s Service) FetchMostRecentStateBlock(imageHash string, block *mainchain.Block) (*statechain.Block, error)
- func (s Service) GetMainchainBlock(c *cid.Cid) (*mainchain.Block, error)
- func (s Service) GetMerkleTree(c *cid.Cid) (*merkle.Tree, error)
- func (s Service) GetStatechainBlock(c *cid.Cid) (*statechain.Block, error)
- func (s Service) GetStatechainDiff(c *cid.Cid) (*statechain.Diff, error)
- func (s Service) GetStatechainTransaction(c *cid.Cid) (*statechain.Transaction, error)
- func (s Service) Props() Props
- func (s Service) Set(v interface{}) (*cid.Cid, error)
- func (s Service) SetMainchainBlock(block *mainchain.Block) (*cid.Cid, error)
- func (s Service) SetMerkleTree(tree *merkle.Tree) (*cid.Cid, error)
- func (s Service) SetStatechainBlock(block *statechain.Block) (*cid.Cid, error)
- func (s Service) SetStatechainDiff(d *statechain.Diff) (*cid.Cid, error)
- func (s Service) SetStatechainTransaction(tx *statechain.Transaction) (*cid.Cid, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchMainchainBlock ¶
FetchMainchainBlock ...
func FetchMerkleTree ¶
FetchMerkleTree ...
func FetchStateChainBlock ¶
func FetchStateChainBlock(bs bserv.BlockService, c *cid.Cid) (*statechain.Block, error)
FetchStateChainBlock ...
func FetchStateChainDiff ¶
func FetchStateChainDiff(bs bserv.BlockService, c *cid.Cid) (*statechain.Diff, error)
FetchStateChainDiff ...
func FetchStateChainTransaction ¶
func FetchStateChainTransaction(bs bserv.BlockService, c *cid.Cid) (*statechain.Transaction, error)
FetchStateChainTransaction ...
func GetMainchainBlockCID ¶
GetMainchainBlockCID ...
func GetMerkleTreeCID ¶
GetMerkleTreeCID ...
func GetStatechainBlockCID ¶
func GetStatechainBlockCID(block *statechain.Block) (*cid.Cid, error)
GetStatechainBlockCID ...
func GetStatechainDiffCID ¶
func GetStatechainDiffCID(d *statechain.Diff) (*cid.Cid, error)
GetStatechainDiffCID ...
func GetStatechainTransactionCID ¶
func GetStatechainTransactionCID(tx *statechain.Transaction) (*cid.Cid, error)
GetStatechainTransactionCID ...
func PutMainchainBlock ¶
PutMainchainBlock ...
func PutMerkleTree ¶
PutMerkleTree ...
func PutStatechainBlock ¶
func PutStatechainBlock(bs bserv.BlockService, block *statechain.Block) (*cid.Cid, error)
PutStatechainBlock ...
func PutStatechainDiff ¶
func PutStatechainDiff(bs bserv.BlockService, d *statechain.Diff) (*cid.Cid, error)
PutStatechainDiff ...
func PutStatechainTransaction ¶
func PutStatechainTransaction(bs bserv.BlockService, tx *statechain.Transaction) (*cid.Cid, error)
PutStatechainTransaction ...
Types ¶
type Interface ¶
type Interface interface {
Props() Props
Set(v interface{}) (*cid.Cid, error)
SetMainchainBlock(block *mainchain.Block) (*cid.Cid, error)
SetStatechainBlock(block *statechain.Block) (*cid.Cid, error)
SetStatechainTransaction(tx *statechain.Transaction) (*cid.Cid, error)
SetStatechainDiff(d *statechain.Diff) (*cid.Cid, error)
SetMerkleTree(tree *merkle.Tree) (*cid.Cid, error)
//SaveLocal(v interface{}) (*cid.Cid, error)
//SaveLocalMainchainBlock(block *mainchain.Block) (*cid.Cid, error)
//SaveLocalStatechainBlock(block *statechain.Block) (*cid.Cid, error)
//SaveLocalStatechainTransaction(tx *statechain.Transaction) (*cid.Cid, error)
//SaveLocalStatechainDiff(d *statechain.Diff) (*cid.Cid, error)
//Get(c *cid.Cid) (interface{}, error)
GetMainchainBlock(c *cid.Cid) (*mainchain.Block, error)
GetStatechainBlock(c *cid.Cid) (*statechain.Block, error)
GetStatechainTransaction(c *cid.Cid) (*statechain.Transaction, error)
GetStatechainDiff(c *cid.Cid) (*statechain.Diff, error)
GetMerkleTree(c *cid.Cid) (*merkle.Tree, error)
FetchMostRecentStateBlock(imageHash string, block *mainchain.Block) (*statechain.Block, error)
}
Interface ...
type Props ¶
type Props struct {
BlockStore bstore.Blockstore // note: https://github.com/ipfs/go-ipfs/blob/master/docs/datastores.md
Host host.Host
Router routing.ContentRouting
}
Props ...
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
Service ...
func (Service) FetchMostRecentStateBlock ¶
func (s Service) FetchMostRecentStateBlock(imageHash string, block *mainchain.Block) (*statechain.Block, error)
FetchMostRecentStateBlock ...
func (Service) GetMainchainBlock ¶
GetMainchainBlock ...
func (Service) GetMerkleTree ¶
GetMerkleTree ...
func (Service) GetStatechainBlock ¶
GetStatechainBlock ...
func (Service) GetStatechainDiff ¶
GetStatechainDiff ...
func (Service) GetStatechainTransaction ¶
func (s Service) GetStatechainTransaction(c *cid.Cid) (*statechain.Transaction, error)
GetStatechainTransaction ...
func (Service) SetMainchainBlock ¶
SetMainchainBlock ... note: this function does not do any validation!
func (Service) SetMerkleTree ¶
SetMerkleTree ..
func (Service) SetStatechainBlock ¶
SetStatechainBlock ...
func (Service) SetStatechainDiff ¶
SetStatechainDiff ...
func (Service) SetStatechainTransaction ¶
func (s Service) SetStatechainTransaction(tx *statechain.Transaction) (*cid.Cid, error)
SetStatechainTransaction ...