Documentation ¶
Index ¶
- func GenerateKeyPair() (string, string)
- func Hash256(s string) string
- func Hash256x2(s string) string
- func SortParams(params map[string]string) string
- type AddressInfo
- type AddressesInfo
- type ApiError
- type ApiSigner
- type Asset
- type CallDetail
- type Client
- func (c Client) BatchNewDepositAddress(coin string, count int, nativeSegwit bool) (CallDetail, RespNewAddresses, error)
- func (c Client) BatchVerifyDepositAddress(coin string, addresses []string) (CallDetail, RespNewAddresses, error)
- func (c Client) GetAccountInfo() (CallDetail, RespOrgInfo, error)
- func (c Client) GetAddressHistory(coin string) (CallDetail, RespAddressHistory, error)
- func (c Client) GetAddressHistoryWithPage(params map[string]string) (CallDetail, RespAddressHistory, error)
- func (c Client) GetCoinInfo(coin string) (CallDetail, RespCoinInfo, error)
- func (c Client) GetPendingTransaction(id string) (CallDetail, RespTransactions, error)
- func (c Client) GetPendingTransactions(params map[string]string) (CallDetail, RespTransactions, error)
- func (c Client) GetTransactionDetails(txId string) (CallDetail, RespTransaction, error)
- func (c Client) GetTransactionHistory(params map[string]string) (CallDetail, RespTransactions, error)
- func (c Client) GetTransactionsById(params map[string]string) (CallDetail, RespTransactions, error)
- func (c Client) GetTransactionsByTime(params map[string]string) (CallDetail, RespTransactions, error)
- func (c Client) GetTransactionsByTxid(txid string) (CallDetail, RespTransaction, error)
- func (c Client) NewDepositAddress(coin string, nativeSegwit bool) (CallDetail, RespNewAddress, error)
- func (c Client) QueryWithdrawInfo(requestId string) (CallDetail, RespTransaction, error)
- func (c Client) Request(method string, path string, params map[string]string) (callDetail CallDetail, body []byte, err error)
- func (c Client) VerifyDepositAddress(coin string, address string) (CallDetail, RespNewAddresses, error)
- func (c Client) VerifyEcc(message string, signature string) bool
- func (c Client) VerifyValidAddress(coin string, addresses string) (CallDetail, RespIsValidAddress, error)
- type Coin
- type CoinInfo
- type Config
- type Env
- type LocalSigner
- type OrgInfo
- type RequestInfo
- type RespAddressHistory
- type RespAddressInfo
- type RespAddressesInfo
- type RespCoinInfo
- type RespInfo
- type RespIsValidAddress
- type RespNewAddress
- type RespNewAddresses
- type RespOrgInfo
- type RespSupportedCoins
- type RespTransaction
- type RespTransactions
- type Transaction
- type TxDetail
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateKeyPair ¶
func SortParams ¶
Types ¶
type AddressInfo ¶
type AddressesInfo ¶
type Asset ¶
type Asset struct { Coin string `json:"coin"` DisplayCode string `json:"display_code"` Description string `json:"description"` Decimal int `json:"decimal"` CanDeposit bool `json:"can_deposit"` CanWithdraw bool `json:"can_withdraw"` Balance decimal.Decimal `json:"balance"` AbsBalance decimal.Decimal `json:"abs_balance"` FeeCoin string `json:"fee_coin"` AbsEstimateFee decimal.Decimal `json:"abs_estimate_fee"` ConfirmingThreshold int `json:"confirming_threshold"` DustThreshold int `json:"dust_threshold"` TokenAddress string `json:"token_address"` RequireMemo bool `json:"require_memo"` }
type CallDetail ¶ added in v0.0.3
type CallDetail struct { RequestInfo RequestInfo RespInfo RespInfo }
type Client ¶
func (Client) BatchNewDepositAddress ¶
func (c Client) BatchNewDepositAddress(coin string, count int, nativeSegwit bool) (CallDetail, RespNewAddresses, error)
func (Client) BatchVerifyDepositAddress ¶
func (c Client) BatchVerifyDepositAddress(coin string, addresses []string) (CallDetail, RespNewAddresses, error)
func (Client) GetAccountInfo ¶
func (c Client) GetAccountInfo() (CallDetail, RespOrgInfo, error)
func (Client) GetAddressHistory ¶
func (c Client) GetAddressHistory(coin string) (CallDetail, RespAddressHistory, error)
func (Client) GetAddressHistoryWithPage ¶
func (c Client) GetAddressHistoryWithPage(params map[string]string) (CallDetail, RespAddressHistory, error)
func (Client) GetCoinInfo ¶
func (c Client) GetCoinInfo(coin string) (CallDetail, RespCoinInfo, error)
func (Client) GetPendingTransaction ¶
func (c Client) GetPendingTransaction(id string) (CallDetail, RespTransactions, error)
func (Client) GetPendingTransactions ¶
func (c Client) GetPendingTransactions(params map[string]string) (CallDetail, RespTransactions, error)
func (Client) GetTransactionDetails ¶
func (c Client) GetTransactionDetails(txId string) (CallDetail, RespTransaction, error)
func (Client) GetTransactionHistory ¶
func (c Client) GetTransactionHistory(params map[string]string) (CallDetail, RespTransactions, error)
func (Client) GetTransactionsById ¶
func (c Client) GetTransactionsById(params map[string]string) (CallDetail, RespTransactions, error)
func (Client) GetTransactionsByTime ¶
func (c Client) GetTransactionsByTime(params map[string]string) (CallDetail, RespTransactions, error)
func (Client) GetTransactionsByTxid ¶
func (c Client) GetTransactionsByTxid(txid string) (CallDetail, RespTransaction, error)
func (Client) NewDepositAddress ¶
func (c Client) NewDepositAddress(coin string, nativeSegwit bool) (CallDetail, RespNewAddress, error)
func (Client) QueryWithdrawInfo ¶
func (c Client) QueryWithdrawInfo(requestId string) (CallDetail, RespTransaction, error)
func (Client) VerifyDepositAddress ¶
func (c Client) VerifyDepositAddress(coin string, address string) (CallDetail, RespNewAddresses, error)
func (Client) VerifyValidAddress ¶
func (c Client) VerifyValidAddress(coin string, addresses string) (CallDetail, RespIsValidAddress, error)
type CoinInfo ¶
type CoinInfo struct { Coin string `json:"coin"` DisplayCode string `json:"display_code"` Description string `json:"description"` Decimal int `json:"decimal"` CanDeposit bool `json:"can_deposit"` CanWithdraw bool `json:"can_withdraw"` RequireMemo bool `json:"require_memo"` Balance string `json:"balance"` AbsBalance string `json:"abs_balance"` FeeCoin string `json:"fee_coin"` AbsEstimateFee string `json:"abs_estimate_fee"` ConfirmingThreshold int `json:"confirming_threshold"` DustThreshold int `json:"dust_threshold"` TokenAddress string `json:"token_address"` }
type Config ¶
type Config struct { CoboId string TxId string WithdrawId string DeAddress map[string]string DeAddresses map[string]string LpAddress map[string]string LpAddresses map[string]string Withdraw map[string]string }
func ProdConfig ¶
func ProdConfig() Config
func SandboxConfig ¶
func SandboxConfig() Config
type LocalSigner ¶
type LocalSigner struct {
PrivateKey string
}
func (LocalSigner) GetPublicKey ¶
func (signer LocalSigner) GetPublicKey() string
func (LocalSigner) Sign ¶
func (signer LocalSigner) Sign(message string) string
type RequestInfo ¶ added in v0.0.2
type RespAddressHistory ¶
type RespAddressHistory struct { ApiError Success bool `json:"success"` Result []AddressInfo `json:"result"` }
type RespAddressInfo ¶
type RespAddressInfo struct { ApiError Success bool `json:"success"` Result AddressInfo `json:"result"` }
type RespAddressesInfo ¶
type RespAddressesInfo struct { ApiError Success bool `json:"success"` Result AddressesInfo `json:"result"` }
type RespCoinInfo ¶
type RespIsValidAddress ¶
type RespNewAddress ¶
type RespNewAddress struct { ApiError Success bool `json:"success"` Result AddressInfo `json:"result"` }
type RespNewAddresses ¶
type RespNewAddresses struct { ApiError Success bool `json:"success"` Result AddressesInfo `json:"result"` }
type RespOrgInfo ¶
type RespSupportedCoins ¶
type RespTransaction ¶
type RespTransaction struct { ApiError Success bool `json:"success"` Result Transaction `json:"result"` }
type RespTransactions ¶
type RespTransactions struct { ApiError Success bool `json:"success"` Result []Transaction `json:"result"` }
type Transaction ¶
type Transaction struct { ID string `json:"id"` Coin string `json:"coin"` DisplayCode string `json:"display_code"` Description string `json:"description"` Decimal int `json:"decimal"` Address string `json:"address"` SourceAddress string `json:"source_address"` Side string `json:"side"` Amount decimal.Decimal `json:"amount"` AbsAmount decimal.Decimal `json:"abs_amount"` Txid string `json:"txid"` VoutN int `json:"vout_n"` RequestID string `json:"request_id"` Status string `json:"status"` AbsCoboFee decimal.Decimal `json:"abs_cobo_fee"` CreatedTimestamp int64 `json:"created_time"` CreatedTime time.Time `json:"-"` LastTimestamp int64 `json:"last_time"` LastTime time.Time `json:"-"` ConfirmedNum int `json:"confirmed_num"` TxDetail TxDetail `json:"tx_detail"` SourceAddressDetail string `json:"source_address_detail"` Memo string `json:"memo"` ConfirmingThreshold int `json:"confirming_threshold"` FeeCoin string `json:"fee_coin"` FeeAmount int `json:"fee_amount"` FeeDecimal int `json:"fee_decimal"` Fee decimal.Decimal `json:"-"` Type string `json:"type"` }
Click to show internal directories.
Click to hide internal directories.