Documentation
¶
Index ¶
- Constants
- Variables
- func R(data interface{}) gin.H
- type ApiServer
- func (api *ApiServer) CreateAccount(c *gin.Context)
- func (api *ApiServer) GetAccountInfo(c *gin.Context)
- func (api *ApiServer) GetAddress(c *gin.Context)
- func (api *ApiServer) GetAddressesByAccount(c *gin.Context)
- func (api *ApiServer) GetBlockCount(c *gin.Context)
- func (api *ApiServer) GetNewAddress(c *gin.Context)
- func (api *ApiServer) HttpListen() error
- func (api *ApiServer) InitBtcClient(host, user, pass, logDir string) (err error)
- func (api *ApiServer) InitEthClient(host, walletDir, password, accountPath, logDir string) (err error)
- func (api *ApiServer) InitUsdtClient(host, user, pass, logDir string, propertyId int64) (err error)
- func (api *ApiServer) KeeperCheck() (err error)
- func (api *ApiServer) ListAccounts(c *gin.Context)
- func (api *ApiServer) ListUnspentMin(c *gin.Context)
- func (api *ApiServer) Move(c *gin.Context)
- func (api *ApiServer) SendFrom(c *gin.Context)
- func (api *ApiServer) SendToAddress(c *gin.Context)
- type Base
Constants ¶
View Source
const COIN_TYPE_HEADER = "CoinType"
View Source
const KEEPER_KEY = "keeper"
Variables ¶
View Source
var ACCOUNT_REGEXP = regexp.MustCompile("^([a-z|A-Z|0-9])+$")
View Source
var METHODS_SUPPORTED = map[string]string{
"/ping": "check if api service valid and backend bitcoin service healthy",
"/health": "check system status",
"/help": "display this message",
"/getaddress": "return address of specified account or default",
"/getbalance": "sum balances of all accounts",
"/listaccounts": "list accounts with amount, minconf is 6",
"/getaccountinfo": "return account with corresponding bablance and addresses",
"/createaccount": "create account and return receive address, error if account exists",
"/sendfrom": "send amount of satoshi from some account to targets address",
"/move": "move from one account to another",
}
http api list
Functions ¶
Types ¶
type ApiServer ¶
type ApiServer struct {
// contains filtered or unexported fields
}
func NewApiServer ¶
func (*ApiServer) GetAddress ¶
func (*ApiServer) GetAddressesByAccount ¶
func (*ApiServer) GetBlockCount ¶
func (*ApiServer) GetNewAddress ¶
func (*ApiServer) HttpListen ¶
func (*ApiServer) InitBtcClient ¶
TODO valid host is valid
func (*ApiServer) InitEthClient ¶
func (*ApiServer) InitUsdtClient ¶
func (*ApiServer) ListAccounts ¶
ListAccounts func
func (*ApiServer) ListUnspentMin ¶
func (*ApiServer) SendToAddress ¶
Click to show internal directories.
Click to hide internal directories.