Documentation ¶
Index ¶
- Variables
- func ConfigureRouter(router *web.Router)
- func GetRecomnededFee() (int, error)
- func GetUnspentBitcoinCashTransactions(w BitcoinCashWallet) ([]insight.Tx, error)
- func MigrateBTCToBCH()
- func PushBitcoinCashTransaction(rawtx string) error
- func SetupViews()
- func SweepBitcoinCashWallet(addressFrom string, addressTo string)
- func SweepCommissionAndPremiumBitcoinCashWallets(addressTo string)
- func TaskUpdateBitcoinCashTransactionFee()
- func TaskUpdateBitcoinCashWalletBalances()
- func UpdateBCHTransactionFee()
- func UpdateBitcoinCashWalletBalances()
- func ViewCreateBitcoinCashWallet(w web.ResponseWriter, r *web.Request)
- func ViewCreateMultisigBitcoinCashWallet(w web.ResponseWriter, r *web.Request)
- func ViewEstimateFeeFromMultipleBitcoinCashWalletsWithAmountSplit(w web.ResponseWriter, r *web.Request)
- func ViewListBitcoinCashWalletsWithPositiveBalance(w web.ResponseWriter, r *web.Request)
- func ViewSendFromMultipleBitcoinCashWalletsWithAmountSplit(w web.ResponseWriter, r *web.Request)
- func ViewSendFromSingleBitcoinCashWalletWithPercentSplit(w web.ResponseWriter, r *web.Request)
- func ViewShowBitcoinCashWallet(w web.ResponseWriter, r *web.Request)
- func ViewTableListBitcoinCashWalletsWithPositiveBalance(w web.ResponseWriter, r *web.Request)
- func ViewUpdateBitcoinCashWallets(w web.ResponseWriter, r *web.Request)
- type BCHPayment
- type BCHPaymentResult
- type BitcoinCashWallet
- func CreateBitcoinCashWallet(tp string) (BitcoinCashWallet, error)
- func CreateMultisigBitcoinCashWallet(buyerPublicKey, sellerPublicKey string) (BitcoinCashWallet, error)
- func FindAllBitcoinCashWallets() ([]BitcoinCashWallet, error)
- func FindBitcoinCashWalletByPublicKey(publicKey string) (*BitcoinCashWallet, error)
- func (w BitcoinCashWallet) CurrentBalance() (*BitcoinCashWalletBalance, error)
- func (w BitcoinCashWallet) Remove() error
- func (w BitcoinCashWallet) Save() error
- func (w BitcoinCashWallet) SaveToDatabase() error
- func (w BitcoinCashWallet) SendWithPercentSplit(payments []BCHPayment) (BCHPaymentResult, error)
- func (w BitcoinCashWallet) UpdateBalance() (*BitcoinCashWalletBalance, error)
- func (w BitcoinCashWallet) Validate() error
- type BitcoinCashWalletBalance
- func FindAllBitcoinCashWalletBalances() ([]BitcoinCashWalletBalance, error)
- func FindBitcoinCashWalletsWithNonZeroBalance() ([]BitcoinCashWalletBalance, error)
- func FindBitcoinCashWalletsWithNonZeroBalanceByType(tp string) ([]BitcoinCashWalletBalance, error)
- func GetBitcoinCashWalletBalance(w BitcoinCashWallet) (*BitcoinCashWalletBalance, error)
- type BitcoinCashWallets
- func (wts BitcoinCashWallets) BuildTransactionWithAmountSplit(payments []BCHPayment, feeOnly bool) (BCHPaymentResult, error)
- func (wts BitcoinCashWallets) BuildTransactionWithPercentSplit(payments []BCHPayment, txfeeOnly bool) (BCHPaymentResult, error)
- func (wts BitcoinCashWallets) SendWithAmountSplit(payments []BCHPayment) (BCHPaymentResult, error)
- func (wts BitcoinCashWallets) SendWithPercentSplit(payments []BCHPayment) (BCHPaymentResult, error)
- type DisplayBitcoinCashWallet
- type ViewListBitcoinCashWalletsWithPositiveBalanceResponse
Constants ¶
This section is empty.
Variables ¶
View Source
var ( BCH_FEE = 330 PAYMENT_GATE_SETTINGS = settings.LoadPaymentGateSettings() )
Functions ¶
func ConfigureRouter ¶
func GetRecomnededFee ¶
func GetUnspentBitcoinCashTransactions ¶
func GetUnspentBitcoinCashTransactions(w BitcoinCashWallet) ([]insight.Tx, error)
func MigrateBTCToBCH ¶
func MigrateBTCToBCH()
func SetupViews ¶
func SetupViews()
func SweepBitcoinCashWallet ¶
func SweepCommissionAndPremiumBitcoinCashWallets ¶
func SweepCommissionAndPremiumBitcoinCashWallets(addressTo string)
func TaskUpdateBitcoinCashTransactionFee ¶
func TaskUpdateBitcoinCashTransactionFee()
func TaskUpdateBitcoinCashWalletBalances ¶
func TaskUpdateBitcoinCashWalletBalances()
func UpdateBCHTransactionFee ¶
func UpdateBCHTransactionFee()
func UpdateBitcoinCashWalletBalances ¶
func UpdateBitcoinCashWalletBalances()
func ViewCreateBitcoinCashWallet ¶
func ViewCreateBitcoinCashWallet(w web.ResponseWriter, r *web.Request)
func ViewCreateMultisigBitcoinCashWallet ¶
func ViewCreateMultisigBitcoinCashWallet(w web.ResponseWriter, r *web.Request)
func ViewEstimateFeeFromMultipleBitcoinCashWalletsWithAmountSplit ¶
func ViewEstimateFeeFromMultipleBitcoinCashWalletsWithAmountSplit(w web.ResponseWriter, r *web.Request)
func ViewListBitcoinCashWalletsWithPositiveBalance ¶
func ViewListBitcoinCashWalletsWithPositiveBalance(w web.ResponseWriter, r *web.Request)
func ViewSendFromMultipleBitcoinCashWalletsWithAmountSplit ¶
func ViewSendFromMultipleBitcoinCashWalletsWithAmountSplit(w web.ResponseWriter, r *web.Request)
func ViewSendFromSingleBitcoinCashWalletWithPercentSplit ¶
func ViewSendFromSingleBitcoinCashWalletWithPercentSplit(w web.ResponseWriter, r *web.Request)
func ViewShowBitcoinCashWallet ¶
func ViewShowBitcoinCashWallet(w web.ResponseWriter, r *web.Request)
func ViewTableListBitcoinCashWalletsWithPositiveBalance ¶
func ViewTableListBitcoinCashWalletsWithPositiveBalance(w web.ResponseWriter, r *web.Request)
func ViewUpdateBitcoinCashWallets ¶
func ViewUpdateBitcoinCashWallets(w web.ResponseWriter, r *web.Request)
Types ¶
type BCHPayment ¶
type BCHPaymentResult ¶
type BitcoinCashWallet ¶
type BitcoinCashWallet struct { PublicKey string `json:"address" gorm:"primary_key"` PrivateKey string `json:"private_key,omitempty" sql:"type:varchar(1024)"` // Multisig BuyerPublicKey string `json:"buyer_public_key"` SellerPublicKey string `json:"seller_public_key"` MultisigPublicKey string `json:"multisig_public_key"` MultisigAddress string `json:"multisig_address"` Type string `json:"type"` CreatedAt *time.Time `json:"created_at,omitempty" gorm:"index"` UpdatedAt *time.Time `json:"updated_at,omitempty" gorm:"index"` DeletedAt *time.Time `json:"deleted_at,omitempty" gorm:"index"` }
func CreateBitcoinCashWallet ¶
func CreateBitcoinCashWallet(tp string) (BitcoinCashWallet, error)
func CreateMultisigBitcoinCashWallet ¶
func CreateMultisigBitcoinCashWallet(buyerPublicKey, sellerPublicKey string) (BitcoinCashWallet, error)
func FindAllBitcoinCashWallets ¶
func FindAllBitcoinCashWallets() ([]BitcoinCashWallet, error)
func FindBitcoinCashWalletByPublicKey ¶
func FindBitcoinCashWalletByPublicKey(publicKey string) (*BitcoinCashWallet, error)
func (BitcoinCashWallet) CurrentBalance ¶
func (w BitcoinCashWallet) CurrentBalance() (*BitcoinCashWalletBalance, error)
func (BitcoinCashWallet) Remove ¶
func (w BitcoinCashWallet) Remove() error
func (BitcoinCashWallet) Save ¶
func (w BitcoinCashWallet) Save() error
func (BitcoinCashWallet) SaveToDatabase ¶
func (w BitcoinCashWallet) SaveToDatabase() error
func (BitcoinCashWallet) SendWithPercentSplit ¶
func (w BitcoinCashWallet) SendWithPercentSplit(payments []BCHPayment) (BCHPaymentResult, error)
func (BitcoinCashWallet) UpdateBalance ¶
func (w BitcoinCashWallet) UpdateBalance() (*BitcoinCashWalletBalance, error)
func (BitcoinCashWallet) Validate ¶
func (w BitcoinCashWallet) Validate() error
type BitcoinCashWalletBalance ¶
type BitcoinCashWalletBalance struct { ID int `json:"id" gorm:"primary_key"` PublicKey string `json:"address" gorm:"index"` Balance float64 `json:"balance"` BalanceTxApperances int `json:"txApperances"` UnconfirmedBalance float64 `json:"unconfirmedBalance"` UnconfirmedBalanceTxApperances int `json:"unconfirmedTxApperances"` CreatedAt *time.Time `json:"created_at" gorm:"index"` UpdatedAt *time.Time `json:"updated_at" gorm:"index"` DeletedAt *time.Time `json:"deleted_at" gorm:"index"` BitcoinCashWallet BitcoinCashWallet `json:"-" gorm:"ForeignKey:PublicKey;AssociationForeignKey:PublicKey"` }
func FindAllBitcoinCashWalletBalances ¶
func FindAllBitcoinCashWalletBalances() ([]BitcoinCashWalletBalance, error)
func FindBitcoinCashWalletsWithNonZeroBalance ¶
func FindBitcoinCashWalletsWithNonZeroBalance() ([]BitcoinCashWalletBalance, error)
func FindBitcoinCashWalletsWithNonZeroBalanceByType ¶
func FindBitcoinCashWalletsWithNonZeroBalanceByType(tp string) ([]BitcoinCashWalletBalance, error)
func GetBitcoinCashWalletBalance ¶
func GetBitcoinCashWalletBalance(w BitcoinCashWallet) (*BitcoinCashWalletBalance, error)
func (BitcoinCashWalletBalance) DisplayBitcoinCashWallet ¶
func (w BitcoinCashWalletBalance) DisplayBitcoinCashWallet() DisplayBitcoinCashWallet
func (BitcoinCashWalletBalance) Remove ¶
func (w BitcoinCashWalletBalance) Remove() error
func (BitcoinCashWalletBalance) Save ¶
func (w BitcoinCashWalletBalance) Save() error
type BitcoinCashWallets ¶
type BitcoinCashWallets []BitcoinCashWallet
func (BitcoinCashWallets) BuildTransactionWithAmountSplit ¶
func (wts BitcoinCashWallets) BuildTransactionWithAmountSplit(payments []BCHPayment, feeOnly bool) (BCHPaymentResult, error)
func (BitcoinCashWallets) BuildTransactionWithPercentSplit ¶
func (wts BitcoinCashWallets) BuildTransactionWithPercentSplit( payments []BCHPayment, txfeeOnly bool, ) (BCHPaymentResult, error)
func (BitcoinCashWallets) SendWithAmountSplit ¶
func (wts BitcoinCashWallets) SendWithAmountSplit(payments []BCHPayment) (BCHPaymentResult, error)
func (BitcoinCashWallets) SendWithPercentSplit ¶
func (wts BitcoinCashWallets) SendWithPercentSplit(payments []BCHPayment) (BCHPaymentResult, error)
type DisplayBitcoinCashWallet ¶
type DisplayBitcoinCashWallet struct { PublicKey string `json:"address"` Balance float64 `json:"balance"` UnconfirmedBalance float64 `json:"unconfirmed_balance"` IsConfirmed bool `json:"-"` NumberOfConfirmations int `json:"-"` Type string `json:"type"` CreatedAt *time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` }
type ViewListBitcoinCashWalletsWithPositiveBalanceResponse ¶
type ViewListBitcoinCashWalletsWithPositiveBalanceResponse struct { DisplayBitcoinCashWallets []DisplayBitcoinCashWallet `json:"wallets"` SummaryBalance float64 `json:"balance"` }
Click to show internal directories.
Click to hide internal directories.