Documentation ¶
Index ¶
- Constants
- func AssignWallet(chainId uint64, ...) (address, uuid string, expireTime uint64, err error)
- func Claim(chainId uint64) (totalClaimAmount uint64, err error)
- func GetARP(chainId, date uint64) (apr string, err error)
- func GetLastARP(chainId uint64) (apr string, err error)
- func GetRequestRedemptionWallets(chainId uint64, redeemAmount *big.Int) (redemptionWalletMap map[string]string, err error)
- func GetTVL(chainId uint64) (amount uint64, err error)
- func GetUserClaimableAmount(chainId uint64, address string) (userClaimableAmount uint64, err error)
- func GetWithdrawList(chainId uint64, address, orderby string, offset, limit int) ([]*dao.PftokenWithdrawDetail, error)
- func HandleWalletDeposit(chainId uint64, address string) error
- func IsWalletAssignable(chainId uint64, address string) (ok bool, err error)
- func IsWalletValid(chainId uint64, address string) (ok bool, err error)
- func PaymentNotifyReset(chainId uint64, uuid string) (err error)
- func Rebase(chainId uint64) error
- func RefundFromWallet(chainId uint64, address string) (refundAmount string, err error)
- func RequestRedemption(chainId uint64, redeemAmount uint64, redemptionWalletMap map[string]uint64) (claimableTime uint64, err error)
- func SwapMoney(chainId, amount uint64, address, invoiceNumber, notifyUrl string) (uuid string, err error)
- func SwapNotifyReset(chainId uint64, uuid string) (err error)
- func WalletCount(chainId uint64) (total uint64, err error)
- func WithdrawRefundTokens(chainId uint64, address, amount string) error
- type SwapRateResponse
- type SwapRateStr
- type Wallet
- type WalletService
- func (s *WalletService) AssignWallet(wallet *db.Wallet, assign *db.WalletAssign, blockTime uint64) (w *db.Wallet, a *db.WalletAssign, err error)
- func (s *WalletService) DoesCoinExistByCoinType(coinType uint64) (exists bool, err error)
- func (s *WalletService) GetAvailableWallet(chainId uint64) (wallet *db.Wallet, err error)
- func (s *WalletService) GetCoinByCoinType(coinType uint64) (coin *db.Coin, err error)
- func (s *WalletService) GetSwapRecordByUUID(uuid string) (swap *db.SwapRecord, err error)
- func (s *WalletService) GetWalletAssignByUUID(uuid string) (assign *db.WalletAssign, err error)
- func (s *WalletService) UpdateWallet(wallet *db.Wallet, assign *db.WalletAssign) (err error)
Constants ¶
View Source
const ( ONE = "1" ExpiredDuration = 1 )
Variables ¶
This section is empty.
Functions ¶
func AssignWallet ¶
func GetLastARP ¶
func GetUserClaimableAmount ¶
func GetWithdrawList ¶
func HandleWalletDeposit ¶
func IsWalletAssignable ¶
func PaymentNotifyReset ¶
func RefundFromWallet ¶
func RequestRedemption ¶
func SwapNotifyReset ¶
func WalletCount ¶
func WithdrawRefundTokens ¶
Types ¶
type SwapRateResponse ¶
type SwapRateResponse struct { Amount *big.Int `json:"amount"` ActualAmount *big.Int `json:"actual_amount"` LiquidityTarget *big.Int `json:"liquidity_target"` Reserve *big.Int `json:"reserve"` Fee *big.Int `json:"fee"` Decimals uint8 `json:"decimals"` FeeRate *big.Int `json:"fee_rate"` MinFee *big.Int `json:"min_fee"` MaxFee *big.Int `json:"max_fee"` FeeDecimals uint8 `json:"fee_decimals"` }
func SwapRate ¶
func SwapRate(chainId, amount uint64) (res *SwapRateResponse, err error)
type SwapRateStr ¶
type WalletService ¶
type WalletService struct {
// contains filtered or unexported fields
}
func GetWalletService ¶
func GetWalletService() *WalletService
func NewWalletService ¶
func NewWalletService() *WalletService
func (*WalletService) AssignWallet ¶
func (s *WalletService) AssignWallet(wallet *db.Wallet, assign *db.WalletAssign, blockTime uint64) ( w *db.Wallet, a *db.WalletAssign, err error)
func (*WalletService) DoesCoinExistByCoinType ¶
func (s *WalletService) DoesCoinExistByCoinType(coinType uint64) (exists bool, err error)
func (*WalletService) GetAvailableWallet ¶
func (s *WalletService) GetAvailableWallet(chainId uint64) (wallet *db.Wallet, err error)
func (*WalletService) GetCoinByCoinType ¶
func (s *WalletService) GetCoinByCoinType(coinType uint64) (coin *db.Coin, err error)
func (*WalletService) GetSwapRecordByUUID ¶
func (s *WalletService) GetSwapRecordByUUID(uuid string) (swap *db.SwapRecord, err error)
func (*WalletService) GetWalletAssignByUUID ¶
func (s *WalletService) GetWalletAssignByUUID(uuid string) (assign *db.WalletAssign, err error)
func (*WalletService) UpdateWallet ¶
func (s *WalletService) UpdateWallet(wallet *db.Wallet, assign *db.WalletAssign) (err error)
Click to show internal directories.
Click to hide internal directories.