Documentation
¶
Index ¶
- Constants
- func AssembleBCHTx(c *gin.Context)
- func BchHistory(c *gin.Context)
- func BroadcastBCHTx(c *gin.Context)
- func Challenge(c *gin.Context)
- func CheckAddressList(c *gin.Context) ([]string, error)
- func CheckAddressListReturnLegacy(c *gin.Context) ([]string, error)
- func Create(c *gin.Context)
- func FeeRate(c *gin.Context)
- func GetBCHBalance(c *gin.Context)
- func GetBalanceForAddress(c *gin.Context)
- func GetBalanceFromCache(addresses []string, refresh bool) (map[string][]commodel.BalanceForAddress, error)
- func GetCategories(c *gin.Context)
- func GetEnv(c *gin.Context)
- func GetHistory(c *gin.Context)
- func GetHistoryDetail(c *gin.Context)
- func GetHistoryDetailPending(c *gin.Context)
- func GetHistoryList(c *gin.Context)
- func GetNotification(c *gin.Context)
- func GetProperty(c *gin.Context)
- func GetPropertyByAddress(c *gin.Context)
- func GetPropertyByID(c *gin.Context)
- func GetPropertyByName(c *gin.Context)
- func GetPurchasedCrowdSaleTimes(c *gin.Context)
- func GetSubCategories(c *gin.Context)
- func GetUnsignedTx(c *gin.Context)
- func GetUtxoElectrumx(addr cashutil.Address, requireAmount decimal.Decimal, needAllUtxos bool) ([]btcjson.PrevTx, error)
- func InTxTypeArray(target int32, array []int32) bool
- func IsAvailablePropertyID(id uint64) bool
- func IsAvailablePropertyName(name string) bool
- func IsAvailableQueryForProperty(keyword string) bool
- func IsSupportPrecision(precision string) bool
- func ListActiveCrowdSales(c *gin.Context)
- func ListByOwner(c *gin.Context)
- func ListOwners(c *gin.Context)
- func ListProperties(c *gin.Context)
- func Login(c *gin.Context)
- func NewMfa(c *gin.Context)
- func NotifyBalanceUpdated(ctx *gin.Context)
- func OnAddressAdd(addrs []string)
- func PurchaseCrowdSaleList(c *gin.Context)
- func PushTx(c *gin.Context)
- func SyncBalanceForBCH(addr cashutil.Address)
- func Update(c *gin.Context)
- func UpdateSoftware(c *gin.Context)
- func Verify(c *gin.Context)
- type Balance
- type GetNotificationParam
- type HistoryListResult
- type ListByOwnerResult
- type OperateAddrsMsg
- type Response
- type TxHist
Constants ¶
View Source
const ( ErrUnSupportTxType errCode = 2000 + iota ErrUnSupportTxVersion ErrUnSupportEcosystem ErrUnSupportCrowdSaleSP ErrUnSupportPrecision )
consensus error
View Source
const ( ErrCreatePayload errCode = 2100 + iota ErrCreateRawTxInput ErrCreateRawTxReference ErrCreateRawTxOpReturn ErrCreateRawTxChange ErrSendRawTransaction ErrWhcDecodeTransaction ErrWhcGetTransaction ErrAssembleBCHTransaction )
RPC error
View Source
const ( ErrFormItems errCode = 2200 + iota ErrConvertFloat64 ErrEmptyAddressList ErrGetTxType ErrIncorrectAddress ErrConvertInt ErrIncorrectAmount ErrEmptyQueryParam ErrCategoryNotFound ErrHexStringFormat ErrHash256Format ErrIncorrectPropertyID ErrIncorrectPropertyName ErrIncorrectPropertyQueryByKeyword ErrExceedMaxAddressRequestLimit ErrExceedMaxNulldataLimit ErrEmptyDeviceName ErrParseVersionString ErrHightestVersionString )
User input error
View Source
const ( ErrGetHistoryList errCode = 2300 + iota ErrGetHistoryListCount ErrGetHistoryDetail ErrEmptyHistoryDetail ErrEmptyHistorySpDetail ErrGetPropertyByAddressIssuer ErrGetPropertyByAddressIssuerCount ErrGetPropertyByAddress ErrGetPropertyByID ErrGetPropertyByName ErrListProperties ErrListPropertiesCount ErrGetAllCrowdSale ErrGetActiveCrowdSale ErrGetActiveCrowdSaleCount ErrQueryTotal ErrQueryTransactions ErrGetBalanceFromRedis ErrGetBalanceFromDatabase ErrEmptyBalance ErrGetPurchasedCrowdSaleList ErrGetPurchasedCrowdSaleCount ErrGetNewestVersionFailed ErrGetNotification )
database error
View Source
const ( ErrChallenge errCode = 2400 + iota ErrCreateWallet ErrUpdateWallet ErrLogin ErrNotUUID ErrVerify ErrMfaToken ErrInsufficientBalance )
account error
View Source
const ( ErrInsertBCH errCode = 2500 + iota ErrInsertWhc ErrCanNotGetUtxo ErrCanNotGetInputs ErrDecodeRawTransaction ErrTxDeserialize ErrGetBCHBalance ErrVersionSetting ErrAmountString )
server or handle error
View Source
const (
ErrTransactionGet errCode = 2600 + iota
)
Variables ¶
This section is empty.
Functions ¶
func AssembleBCHTx ¶
func BchHistory ¶
func BroadcastBCHTx ¶
func CheckAddressList ¶
CheckAddressList check address number limit and encoded, and only apply for post request.
func GetBCHBalance ¶
func GetBalanceForAddress ¶
func GetBalanceFromCache ¶
func GetCategories ¶
func GetHistory ¶
func GetHistoryDetail ¶
func GetHistoryDetailPending ¶
func GetHistoryList ¶
func GetNotification ¶
func GetProperty ¶
GetProperty query property data via property name of property id. will return most ten items for select.
func GetPropertyByAddress ¶
func GetPropertyByID ¶
func GetPropertyByName ¶
func GetSubCategories ¶
func GetUnsignedTx ¶
func GetUtxoElectrumx ¶
func InTxTypeArray ¶
func IsAvailablePropertyID ¶
func IsAvailablePropertyName ¶
func IsSupportPrecision ¶
func ListActiveCrowdSales ¶
func ListByOwner ¶
func ListOwners ¶
func ListProperties ¶
func NotifyBalanceUpdated ¶
func OnAddressAdd ¶
func OnAddressAdd(addrs []string)
func PurchaseCrowdSaleList ¶
func SyncBalanceForBCH ¶
func UpdateSoftware ¶
Types ¶
type GetNotificationParam ¶
type HistoryListResult ¶
type HistoryListResult struct { TxHash string `json:"tx_hash"` TxType int32 `json:"tx_type"` TxState string `json:"tx_state"` Address string `json:"address"` AddressRole string `json:"address_role"` BalanceAvailableCreditDebit string `json:"balance_available_credit_debit"` PropertyID uint64 `json:"property_id"` PropertyName string `json:"property_name"` Created int64 `json:"created"` }
type ListByOwnerResult ¶
type OperateAddrsMsg ¶
type OperateAddrsMsg struct { Type action `json:"type"` Addresses []string `json:"addresses"` }
type only select from add/remove
Source Files
¶
Click to show internal directories.
Click to hide internal directories.