Documentation ¶
Index ¶
Constants ¶
View Source
const ( SwapCreateProposalSubject = chanPrefix + "Swap.CreateProposal" SwapInfoProposalSubject = chanPrefix + "Swap.InfoProposal" SwapFinalizeProposalSubject = chanPrefix + "Swap.FinalizeProposal" SwapAcceptProposalSubject = chanPrefix + "Swap.AcceptProposal" )
View Source
const ( AssetIDLength = 64 DefaultFeeRate = 150 / 100000000.0 // BTC/Kb MinumumFeeRate = 150 / 100000000.0 // BTC/Kb AmountPrecision = 8 AmountPrecisionFormat = "%.8f" )
Variables ¶
Functions ¶
This section is empty.
Types ¶
type ConfidentialAddress ¶
type ConfidentialAddress string
type ProposalInfo ¶
type ProposalInfo struct { ProposerAsset AssetID ProposerAmount float64 ReceiverAsset AssetID ReceiverAmount float64 }
func (*ProposalInfo) Args ¶
func (p *ProposalInfo) Args() []string
func (*ProposalInfo) Valid ¶
func (p *ProposalInfo) Valid() bool
type SwapProposal ¶
type SwapProposal struct { Timestamp time.Time SwapID uint64 Address ConfidentialAddress Proposal ProposalInfo FeeRate float64 Payload Payload }
func (*SwapProposal) Decode ¶
func (p *SwapProposal) Decode(data []byte) error
func (*SwapProposal) Encode ¶
func (p *SwapProposal) Encode() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.