Documentation ¶
Index ¶
- Constants
- Variables
- func Delete(url string, requestBody string, params []KeyPair, headers []KeyPair) (string, error)
- func ExtendAddressTo256bit(address string) string
- func Get(url string, requestBody string, params []KeyPair, headers []KeyPair) (string, error)
- func JoinUrlPath(baseUrl string, subPath string) string
- func ParseHexToBigint(hex string) *big.Int
- func ParseHexToDecimal(hex string, exp int32) *decimal.Decimal
- func Post(url string, requestBody string, params []KeyPair, headers []KeyPair) (string, error)
- func PrivateKeyToAddress(privateKey string) string
- func SetDecimal(d decimal.Decimal, decimalNum int) decimal.Decimal
- func SetPrecision(d decimal.Decimal, precision int) decimal.Decimal
- func SignOrderId(privateKey string, orderId string) string
- func SignString(privateKey string, msg string) string
- func Stripe0xPrefix(str string) string
- func ToggleSide(side string) string
- func Web3Call(url string, contractAddress string, data string) (string, error)
- type ERC20
- type EthereumLog
- type EthereumReceipt
- type IJsonRpcBlockInfo
- type IJsonRpcResLogs
- type IJsonRpcResReceipt
- type IJsonRpcResString
- type KeyPair
- type NodeBlockNum
Constants ¶
View Source
const BUY = "buy"
View Source
const LIMIT = "limit"
View Source
const MARKET = "market"
View Source
const ORDER_CLOSE = "close"
View Source
const ORDER_OPEN = "open"
View Source
const SELL = "sell"
Variables ¶
View Source
var EmptyKeyPairList = []KeyPair{}
View Source
var HttpClient *http.Client
Functions ¶
func ExtendAddressTo256bit ¶
func JoinUrlPath ¶
func ParseHexToBigint ¶
func PrivateKeyToAddress ¶
func SignOrderId ¶
func SignString ¶
func Stripe0xPrefix ¶
func ToggleSide ¶
Types ¶
type EthereumLog ¶
type EthereumLog struct { Address string `json:"address"` BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` Data string `json:"data"` LogIndex string `json:"logIndex"` Removed bool `json:"removed"` Topics []string `json:"topics"` TransactionHash string `json:"transactionHash"` TransactionIndex string `json:"transactionIndex"` }
type EthereumReceipt ¶
type EthereumReceipt struct { BlockHash string `json:"blockHash"` BlockNumber string `json:"blockNumber"` ContractAddress interface{} `json:"contractAddress"` CumulativeGasUsed string `json:"cumulativeGasUsed"` From string `json:"from"` GasUsed string `json:"gasUsed"` Logs []EthereumLog `json:"logs"` LogsBloom string `json:"logsBloom"` Status string `json:"status"` To string `json:"to"` TransactionHash string `json:"transactionHash"` TransactionIndex string `json:"transactionIndex"` }
type IJsonRpcBlockInfo ¶
type IJsonRpcBlockInfo struct { ID int `json:"id"` Result struct { Difficulty string `json:"difficulty"` ExtraData string `json:"extraData"` GasLimit string `json:"gasLimit"` GasUsed string `json:"gasUsed"` Hash string `json:"hash"` LogsBloom string `json:"logsBloom"` Miner string `json:"miner"` MixHash string `json:"mixHash"` Nonce string `json:"nonce"` Number string `json:"number"` ParentHash string `json:"parentHash"` ReceiptsRoot string `json:"receiptsRoot"` Sha3Uncles string `json:"sha3Uncles"` Size string `json:"size"` StateRoot string `json:"stateRoot"` Timestamp string `json:"timestamp"` TotalDifficulty string `json:"totalDifficulty"` Transactions []string `json:"transactions"` TransactionsRoot string `json:"transactionsRoot"` Uncles []string `json:"uncles"` } `json:"result"` }
type IJsonRpcResLogs ¶
type IJsonRpcResLogs struct {
Result []EthereumLog `json:"result"`
}
type IJsonRpcResReceipt ¶
type IJsonRpcResReceipt struct {
Result EthereumReceipt `json:"result"`
}
type IJsonRpcResString ¶
type IJsonRpcResString struct {
Result string `json:"result"`
}
type NodeBlockNum ¶
type NodeBlockNum struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.