Documentation
¶
Overview ¶
* Copyright (C) 2020 The poly network Authors * This file is part of The poly network library. * * The poly network is free software: you can redistribute it and/or modify * it under the terms of the GNU Lesser General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * The poly network is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU Lesser General Public License for more details. * You should have received a copy of the GNU Lesser General Public License * along with The poly network . If not, see <http://www.gnu.org/licenses/>.
Index ¶
- Constants
- func ApproveQuitSideChain(native *native.NativeService) ([]byte, error)
- func ApproveRegisterSideChain(native *native.NativeService) ([]byte, error)
- func ApproveUpdateSideChain(native *native.NativeService) ([]byte, error)
- func GetBtcRedeemScriptBytes(native *native.NativeService, redeemScriptKey string, redeemChainId uint64) ([]byte, error)
- func PutSideChain(native *native.NativeService, sideChain *SideChain) error
- func QuitSideChain(native *native.NativeService) ([]byte, error)
- func RegisterRedeem(native *native.NativeService) ([]byte, error)
- func RegisterSideChain(native *native.NativeService) ([]byte, error)
- func RegisterSideChainManagerContract(native *native.NativeService)
- func SetBtcTxParam(native *native.NativeService) ([]byte, error)
- func UpdateSideChain(native *native.NativeService) ([]byte, error)
- type BindSignInfo
- type BtcTxParam
- type BtcTxParamDetial
- type ChainidParam
- type ContractBinded
- type RegisterRedeemParam
- type RegisterSideChainParam
- type SideChain
Constants ¶
const ( //function name REGISTER_SIDE_CHAIN = "registerSideChain" APPROVE_REGISTER_SIDE_CHAIN = "approveRegisterSideChain" UPDATE_SIDE_CHAIN = "updateSideChain" APPROVE_UPDATE_SIDE_CHAIN = "approveUpdateSideChain" QUIT_SIDE_CHAIN = "quitSideChain" APPROVE_QUIT_SIDE_CHAIN = "approveQuitSideChain" REGISTER_REDEEM = "registerRedeem" SET_BTC_TX_PARAM = "setBtcTxParam" //key prefix SIDE_CHAIN_APPLY = "sideChainApply" UPDATE_SIDE_CHAIN_REQUEST = "updateSideChainRequest" QUIT_SIDE_CHAIN_REQUEST = "quitSideChainRequest" SIDE_CHAIN = "sideChain" REDEEM_BIND = "redeemBind" BIND_SIGN_INFO = "bindSignInfo" BTC_TX_PARAM = "btcTxParam" REDEEM_SCRIPT = "redeemScript" )
Variables ¶
This section is empty.
Functions ¶
func ApproveQuitSideChain ¶
func ApproveQuitSideChain(native *native.NativeService) ([]byte, error)
func ApproveRegisterSideChain ¶
func ApproveRegisterSideChain(native *native.NativeService) ([]byte, error)
func ApproveUpdateSideChain ¶
func ApproveUpdateSideChain(native *native.NativeService) ([]byte, error)
func GetBtcRedeemScriptBytes ¶
func PutSideChain ¶
func PutSideChain(native *native.NativeService, sideChain *SideChain) error
func QuitSideChain ¶
func QuitSideChain(native *native.NativeService) ([]byte, error)
func RegisterRedeem ¶
func RegisterRedeem(native *native.NativeService) ([]byte, error)
func RegisterSideChain ¶
func RegisterSideChain(native *native.NativeService) ([]byte, error)
func RegisterSideChainManagerContract ¶
func RegisterSideChainManagerContract(native *native.NativeService)
Register methods of node_manager contract
func SetBtcTxParam ¶
func SetBtcTxParam(native *native.NativeService) ([]byte, error)
func UpdateSideChain ¶
func UpdateSideChain(native *native.NativeService) ([]byte, error)
Types ¶
type BindSignInfo ¶
func (*BindSignInfo) Deserialization ¶
func (this *BindSignInfo) Deserialization(source *common.ZeroCopySource) error
func (*BindSignInfo) Serialization ¶
func (this *BindSignInfo) Serialization(sink *common.ZeroCopySink)
type BtcTxParam ¶
type BtcTxParam struct {
Redeem []byte
RedeemChainId uint64
Sigs [][]byte
Detial *BtcTxParamDetial
}
func (*BtcTxParam) Deserialization ¶
func (this *BtcTxParam) Deserialization(source *common.ZeroCopySource) error
func (*BtcTxParam) Serialization ¶
func (this *BtcTxParam) Serialization(sink *common.ZeroCopySink)
type BtcTxParamDetial ¶
func GetBtcTxParam ¶
func GetBtcTxParam(native *native.NativeService, redeemKey []byte, redeemChainId uint64) (*BtcTxParamDetial, error)
func (*BtcTxParamDetial) Deserialization ¶
func (this *BtcTxParamDetial) Deserialization(source *common.ZeroCopySource) error
func (*BtcTxParamDetial) Serialization ¶
func (this *BtcTxParamDetial) Serialization(sink *common.ZeroCopySink)
type ChainidParam ¶
func (*ChainidParam) Deserialization ¶
func (this *ChainidParam) Deserialization(source *common.ZeroCopySource) error
func (*ChainidParam) Serialization ¶
func (this *ChainidParam) Serialization(sink *common.ZeroCopySink)
type ContractBinded ¶
func GetContractBind ¶
func GetContractBind(native *native.NativeService, redeemChainID, contractChainID uint64, redeemKey []byte) (*ContractBinded, error)
func (*ContractBinded) Deserialization ¶
func (this *ContractBinded) Deserialization(source *common.ZeroCopySource) error
func (*ContractBinded) Serialization ¶
func (this *ContractBinded) Serialization(sink *common.ZeroCopySink)
type RegisterRedeemParam ¶
type RegisterRedeemParam struct {
RedeemChainID uint64
ContractChainID uint64
Redeem []byte
CVersion uint64
ContractAddress []byte
Signs [][]byte
}
func (*RegisterRedeemParam) Deserialization ¶
func (this *RegisterRedeemParam) Deserialization(source *common.ZeroCopySource) error
func (*RegisterRedeemParam) Serialization ¶
func (this *RegisterRedeemParam) Serialization(sink *common.ZeroCopySink)
type RegisterSideChainParam ¶
type RegisterSideChainParam struct {
Address common.Address
ChainId uint64
Router uint64
Name string
BlocksToWait uint64
CCMCAddress []byte
ExtraInfo []byte
}
func (*RegisterSideChainParam) Deserialization ¶
func (this *RegisterSideChainParam) Deserialization(source *common.ZeroCopySource) error
func (*RegisterSideChainParam) Serialization ¶
func (this *RegisterSideChainParam) Serialization(sink *common.ZeroCopySink) error
type SideChain ¶
type SideChain struct {
Address common.Address
ChainId uint64
Router uint64
Name string
BlocksToWait uint64
CCMCAddress []byte
ExtraInfo []byte
}
func GetSideChain ¶
func GetSideChain(native *native.NativeService, chainID uint64) (*SideChain, error)
func (*SideChain) Deserialization ¶
func (this *SideChain) Deserialization(source *common.ZeroCopySource) error
func (*SideChain) Serialization ¶
func (this *SideChain) Serialization(sink *common.ZeroCopySink) error