Versions in this module Expand all Collapse all v0 v0.0.0 Apr 26, 2018 Changes in this version + const DefaultMaxMessageSize + const ErrDecode + const ErrInvalidMsgCode + const ErrMsgTooLarge + const ErrProtocolVersionMismatch + const MaxMessageSize + const ProtocolName + const ProtocolVersion + const ProtocolVersionStr + var DefaultConfig = Config + func GetAPIs(apiBackend Backend) []rpc.API + type Backend interface + ApplyTransaction func() + ChallangeExit func() + GetBlock func() + GetCurrentBlock func() + GetCurrentBlockNum func() + GetTransaction func() + StartExit func() + SubmitBlock func() + SubmitDeposit func() + type Block struct + BlockNumber *big.Int + Merkle *merkle.Merkle + Sig []byte + TransactionSet []*Transaction + func NewBlock() *Block + func (b *Block) Hash() common.Hash + func (b *Block) MarshalJSON() ([]byte, error) + func (b *Block) Seal() (common.Hash, error) + func (b *Block) Sender() (common.Address, error) + func (b *Block) Sign(privKey *ecdsa.PrivateKey) error + func (b *Block) ToRPCResponse() map[string]interface{} + type BlockChain struct + func NewBlockChain(config *Config) *BlockChain + type Config struct + ContractAddress common.Address + DataDir string + OnDisk bool + OperatorAddress common.Address + OperatorNode *Peer + OperatorNodeURL string + OperatorPrivateKey *ecdsa.PrivateKey + type Peer struct + func (p *Peer) ID() []byte + type Plasma struct + ApiBackend *Backend + func New(config *Config, accountManager *accounts.Manager) *Plasma + func (pls *Plasma) APIs() []rpc.API + func (pls *Plasma) CurrentBlockNumber() uint64 + func (pls *Plasma) HandlePeer(remote *p2p.Peer, rw p2p.MsgReadWriter) error + func (pls *Plasma) Protocols() []p2p.Protocol + func (pls *Plasma) RegisterClient(backend *ethclient.Client) + func (pls *Plasma) RegisterRpcClient(rpcClient *rpc.Client) + func (pls *Plasma) Start(server *p2p.Server) error + func (pls *Plasma) Stop() error + func (pls *Plasma) Version() uint + type PlasmaAPI struct + func NewPlasmaAPI() PlasmaAPI + type PlasmaOperatorAPI struct + func NewPlasmaOperatorAPI() PlasmaOperatorAPI + type PublicPlasmaAPI struct + func NewPublicPlasmaAPI(pls *Plasma) *PublicPlasmaAPI + func (api *PublicPlasmaAPI) ApplyTransaction(ctx context.Context, args TxArgs) (common.Hash, error) + func (api *PublicPlasmaAPI) CurrentBlockNumber(ctx context.Context) uint64 + func (api *PublicPlasmaAPI) Deposit(ctx context.Context) string + func (api *PublicPlasmaAPI) GetBlock(ctx context.Context, BlkNum *hexutil.Big) (map[string]interface{}, error) + func (api *PublicPlasmaAPI) GetTransaction(ctx context.Context, BlkNum, TxIndex *big.Int) (map[string]interface{}, error) + func (api *PublicPlasmaAPI) SubmitBlock(ctx context.Context) (common.Hash, error) + func (api *PublicPlasmaAPI) Version(ctx context.Context) string + type Transaction struct + func NewTransaction(blkNum1, txIndex1, oIndex1, blkNum2, txIndex2, oIndex2 *big.Int, ...) *Transaction + func (tx *Transaction) DecodeRLP(s *rlp.Stream) error + func (tx *Transaction) EncodeRLP(w io.Writer) error + func (tx *Transaction) Hash() (h common.Hash) + func (tx *Transaction) MarshalJSON() ([]byte, error) + func (tx *Transaction) Sender(oIndex *big.Int) (common.Address, error) + func (tx *Transaction) Sign1(privKey *ecdsa.PrivateKey) error + func (tx *Transaction) Sign2(privKey *ecdsa.PrivateKey) error + func (tx *Transaction) ToRPCResponse() map[string]interface{} + type TxArgs struct + Amount1 *hexutil.Big + Amount2 *hexutil.Big + BlkNum1 *hexutil.Big + BlkNum2 *hexutil.Big + Fee *hexutil.Big + From1 *common.Address + From2 *common.Address + NewOwner1 *common.Address + NewOwner2 *common.Address + OIndex1 *hexutil.Big + OIndex2 *hexutil.Big + TxIndex1 *hexutil.Big + TxIndex2 *hexutil.Big