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 ¶
const ( OP_RETURN_SCRIPT_FLAG = byte(0xcc) BTC_TX_PREFIX = "btctx" BTC_FROM_TX_PREFIX = "btcfromtx" UTXOS = "utxos" STXOS = "stxos" MULTI_SIGN_INFO = "multiSignInfo" MAX_FEE_COST_PERCENTS = 1.0 MAX_SELECTING_TRY_LIMIT = 1000000 SELECTING_K = 4.0 )
Variables ¶
This section is empty.
Functions ¶
func GetUtxoKey ¶
Types ¶
type Args ¶
func (*Args) Deserialization ¶
func (this *Args) Deserialization(source *common.ZeroCopySource) error
func (*Args) Serialization ¶
func (this *Args) Serialization(sink *common.ZeroCopySink)
type BTCHandler ¶
type BTCHandler struct { }
func NewBTCHandler ¶
func NewBTCHandler() *BTCHandler
func (*BTCHandler) MakeDepositProposal ¶
func (this *BTCHandler) MakeDepositProposal(service *native.NativeService) (*crosscommon.MakeTxParam, error)
func (*BTCHandler) MakeTransaction ¶
func (this *BTCHandler) MakeTransaction(service *native.NativeService, param *crosscommon.MakeTxParam, fromChainID uint64) error
func (*BTCHandler) MultiSign ¶
func (this *BTCHandler) MultiSign(service *native.NativeService) error
type BtcFromInfo ¶
func (*BtcFromInfo) Deserialization ¶
func (this *BtcFromInfo) Deserialization(source *common.ZeroCopySource) error
func (*BtcFromInfo) Serialization ¶
func (this *BtcFromInfo) Serialization(sink *common.ZeroCopySink)
type BtcProof ¶
func (*BtcProof) Deserialization ¶
func (this *BtcProof) Deserialization(source *common.ZeroCopySource) error
func (*BtcProof) Serialization ¶
func (this *BtcProof) Serialization(sink *common.ZeroCopySink)
type CoinSelector ¶
type CoinSelector struct {
// contains filtered or unexported fields
}
func (*CoinSelector) SimpleBnbSearch ¶
func (*CoinSelector) SortedSearch ¶
func (selector *CoinSelector) SortedSearch() ([]*Utxo, uint64, uint64)
type MultiSignInfo ¶
func (*MultiSignInfo) Deserialization ¶
func (this *MultiSignInfo) Deserialization(source *common.ZeroCopySource) error
func (*MultiSignInfo) Serialization ¶
func (this *MultiSignInfo) Serialization(sink *common.ZeroCopySink)
type OutPoint ¶
func (*OutPoint) Deserialization ¶
func (this *OutPoint) Deserialization(source *common.ZeroCopySource) error
func (*OutPoint) Serialization ¶
func (this *OutPoint) Serialization(sink *common.ZeroCopySink)
type Utxo ¶
type Utxo struct { // Previous txid and output index Op *OutPoint // Block height where this tx was confirmed, 0 for unconfirmed AtHeight uint32 // TODO: del ?? // The higher the better Value uint64 // Output script ScriptPubkey []byte }
func (*Utxo) Deserialization ¶
func (this *Utxo) Deserialization(source *common.ZeroCopySource) error
func (*Utxo) Serialization ¶
func (this *Utxo) Serialization(sink *common.ZeroCopySink)
type Utxos ¶
type Utxos struct {
Utxos []*Utxo
}
func (*Utxos) Deserialization ¶
func (this *Utxos) Deserialization(source *common.ZeroCopySource) error
func (*Utxos) Serialization ¶
func (this *Utxos) Serialization(sink *common.ZeroCopySink)