common

package
v1.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 22, 2021 License: LGPL-3.0 Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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/>.

* 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

This section is empty.

Variables

View Source
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)

func PutDoneTx

func PutDoneTx(native *native.NativeService, crossChainID []byte, chainID uint64) error

func Replace0x

func Replace0x(s string) 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)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL