btc

package
v0.18.15 Latest Latest
Warning

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

Go to latest
Published: May 17, 2022 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnableBTC

func EnableBTC(r action.Router) error

func EnableBTCInternalTx

func EnableBTCInternalTx(r action.Router) error

func ValidateExtLockStructure added in v0.14.0

func ValidateExtLockStructure(tracker *bitcoin.Tracker, tx *wire.MsgTx, params *chaincfg.Params) bool

Types

type AddSignature

type AddSignature struct {
	TrackerName string

	ValidatorPubKey []byte
	BTCSignature    []byte

	ValidatorAddress action.Address
	Memo             string
}

AddSignature is an internal transaction on the OneLedger Network. This transaction is used to add validator/witness signatures to the bitcoin lock or redeem transaction.

func (*AddSignature) Marshal

func (as *AddSignature) Marshal() ([]byte, error)

func (*AddSignature) Signers

func (as *AddSignature) Signers() []action.Address

func (*AddSignature) Tags

func (as *AddSignature) Tags() kv.Pairs

func (AddSignature) Type

func (AddSignature) Type() action.Type

func (*AddSignature) Unmarshal

func (as *AddSignature) Unmarshal(data []byte) error

type BroadcastSuccess

type BroadcastSuccess struct {
	TrackerName      string
	ValidatorAddress action.Address
	BTCTxID          chainhash.Hash
}

func (*BroadcastSuccess) Marshal

func (b *BroadcastSuccess) Marshal() ([]byte, error)

func (*BroadcastSuccess) Signers

func (b *BroadcastSuccess) Signers() []action.Address

func (*BroadcastSuccess) Tags

func (b *BroadcastSuccess) Tags() kv.Pairs

func (*BroadcastSuccess) Type

func (b *BroadcastSuccess) Type() action.Type

func (*BroadcastSuccess) Unmarshal

func (b *BroadcastSuccess) Unmarshal(data []byte) error

type FailedBroadcastReset

type FailedBroadcastReset struct {
	TrackerName      string
	ValidatorAddress action.Address
}

func (*FailedBroadcastReset) Marshal

func (fbr *FailedBroadcastReset) Marshal() ([]byte, error)

func (*FailedBroadcastReset) Signers

func (fbr *FailedBroadcastReset) Signers() []action.Address

func (*FailedBroadcastReset) Tags

func (fbr *FailedBroadcastReset) Tags() kv.Pairs

func (*FailedBroadcastReset) TagsFailed added in v0.14.0

func (fbr *FailedBroadcastReset) TagsFailed() kv.Pairs

func (*FailedBroadcastReset) Type

func (fbr *FailedBroadcastReset) Type() action.Type

func (*FailedBroadcastReset) Unmarshal

func (fbr *FailedBroadcastReset) Unmarshal(data []byte) error

type Lock

type Lock struct {
	// OLT address of the person locking the BTC
	Locker action.Address

	// Name of the tracker used to register this txn
	TrackerName string

	// BTC Txn as a byte array
	BTCTxn []byte

	// The amount in satoshi to lock
	LockAmount int64
}

func (Lock) Marshal

func (bl Lock) Marshal() ([]byte, error)

func (Lock) Signers

func (bl Lock) Signers() []action.Address

func (Lock) Tags

func (bl Lock) Tags() kv.Pairs

func (Lock) Type

func (bl Lock) Type() action.Type

func (*Lock) Unmarshal

func (bl *Lock) Unmarshal(data []byte) error

type Redeem

type Redeem struct {
	Redeemer     action.Address
	TrackerName  string
	BTCTxn       []byte
	RedeemAmount int64
}

func (Redeem) Marshal

func (bl Redeem) Marshal() ([]byte, error)

func (Redeem) Signers

func (bl Redeem) Signers() []action.Address

func (Redeem) Tags

func (bl Redeem) Tags() kv.Pairs

func (Redeem) Type

func (bl Redeem) Type() action.Type

func (*Redeem) Unmarshal

func (bl *Redeem) Unmarshal(data []byte) error

type ReportFinalityMint

type ReportFinalityMint struct {
	TrackerName      string
	OwnerAddress     action.Address
	ValidatorAddress action.Address
	RandomBytes      []byte
}

func (*ReportFinalityMint) Marshal

func (m *ReportFinalityMint) Marshal() ([]byte, error)

func (*ReportFinalityMint) Signers

func (m *ReportFinalityMint) Signers() []action.Address

func (*ReportFinalityMint) Tags

func (m *ReportFinalityMint) Tags() kv.Pairs

func (*ReportFinalityMint) TagsMinted added in v0.14.0

func (m *ReportFinalityMint) TagsMinted(processType string) kv.Pairs

func (*ReportFinalityMint) Type

func (m *ReportFinalityMint) Type() action.Type

func (*ReportFinalityMint) Unmarshal

func (m *ReportFinalityMint) Unmarshal(data []byte) error

Jump to

Keyboard shortcuts

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