Documentation ¶
Overview ¶
* Copyright (C) 2021 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/>.
* Copyright (C) 2021 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 ¶
- Variables
- func CheckDoneTx(native *native.NativeService, crossChainID []byte, chainID uint64) error
- func NotifyMakeProof(native *native.NativeService, fromChainID, toChainID uint64, txHash string, ...)
- func PutDoneTx(native *native.NativeService, crossChainID []byte, chainID uint64) error
- func Replace0x(s string) string
- type ChainHandler
- type EntranceParam
- type InitRedeemScriptParam
- type MakeTxParam
- type MultiSignParam
- type ToMerkleValue
Constants ¶
This section is empty.
Variables ¶
var ( KEY_PREFIX_BTC = "btc" KEY_PREFIX_BTC_VOTE = "btcVote" REQUEST = "request" DONE_TX = "doneTx" NOTIFY_MAKE_PROOF = "makeProof" )
Functions ¶
func CheckDoneTx ¶
func CheckDoneTx(native *native.NativeService, crossChainID []byte, chainID uint64) error
func NotifyMakeProof ¶
func NotifyMakeProof(native *native.NativeService, fromChainID, toChainID uint64, txHash string, key string)
Types ¶
type ChainHandler ¶
type ChainHandler interface {
MakeDepositProposal(service *native.NativeService) (*MakeTxParam, error)
}
type EntranceParam ¶
type EntranceParam struct { SourceChainID uint64 `json:"sourceChainId"` Height uint32 `json:"height"` Proof []byte `json:"proof"` RelayerAddress []byte `json:"relayerAddress"` Extra []byte `json:"extra"` HeaderOrCrossChainMsg []byte `json:"headerOrCrossChainMsg"` }
func (*EntranceParam) Deserialization ¶
func (this *EntranceParam) Deserialization(source *common.ZeroCopySource) error
func (*EntranceParam) Serialization ¶
func (this *EntranceParam) Serialization(sink *common.ZeroCopySink)
type InitRedeemScriptParam ¶
type InitRedeemScriptParam struct {
RedeemScript string
}
func (*InitRedeemScriptParam) Deserialization ¶
func (this *InitRedeemScriptParam) Deserialization(source *common.ZeroCopySource) error
func (*InitRedeemScriptParam) Serialization ¶
func (this *InitRedeemScriptParam) Serialization(sink *common.ZeroCopySink)
type MakeTxParam ¶
type MakeTxParam struct { TxHash []byte CrossChainID []byte FromContractAddress []byte ToChainID uint64 ToContractAddress []byte Method string Args []byte }
func (*MakeTxParam) Deserialization ¶
func (this *MakeTxParam) Deserialization(source *common.ZeroCopySource) error
func (*MakeTxParam) Serialization ¶
func (this *MakeTxParam) Serialization(sink *common.ZeroCopySink)
type MultiSignParam ¶
type MultiSignParam struct { ChainID uint64 RedeemKey string TxHash []byte Address string Signs [][]byte }
func (*MultiSignParam) Deserialization ¶
func (this *MultiSignParam) Deserialization(source *common.ZeroCopySource) error
func (*MultiSignParam) Serialization ¶
func (this *MultiSignParam) Serialization(sink *common.ZeroCopySink)
type ToMerkleValue ¶
type ToMerkleValue struct { TxHash []byte FromChainID uint64 MakeTxParam *MakeTxParam }
func (*ToMerkleValue) Deserialization ¶
func (this *ToMerkleValue) Deserialization(source *common.ZeroCopySource) error
func (*ToMerkleValue) Serialization ¶
func (this *ToMerkleValue) Serialization(sink *common.ZeroCopySink)