Versions in this module Expand all Collapse all v0 v0.0.40 Jul 20, 2019 Changes in this version + const DiscountedRate + const ERC20Allowance + const ERC20ApprovalEvent + const ERC20Approve + const ERC20BalanceOf + const ERC20Decimals + const ERC20Deposit + const ERC20DepositEvent + const ERC20Name + const ERC20Symbol + const ERC20TotalSupply + const ERC20Transfer + const ERC20TransferEvent + const ERC20TransferFrom + const ERC20Withdraw + const ERC20WithdrawalEvent + const FeeRateBase + var EIP712_DOMAIN_TYPEHASH []byte + var EIP712_ORDER_TYPE []byte + func GetHash(order *sdk.Order) []byte + func GetIsMakerOnlyFromOrderData(data string) bool + func GetOrderData(version uint64, isSell bool, isMarketOrder bool, ...) string + func GetOrderExpireTsFromOrderData(data string) uint64 + func GetRawMakerFeeRateFromOrderData(data string) uint16 + func GetRawMakerRebateRateFromOrderData(data string) uint16 + func GetRawTakerFeeRateFromOrderData(data string) uint16 + func IsValidSignature(address string, message string, signature string) (bool, error) + func PersonalSign(message []byte, privateKey string) ([]byte, error) + type Erc20Service struct + func (e *Erc20Service) AllowanceOf(tokenAddress, proxyAddress, address string) (error, *big.Int) + func (e *Erc20Service) BalanceOf(tokenAddress, address string) (error, *big.Int) + func (e *Erc20Service) Decimals(address string) (error, int) + func (e *Erc20Service) Name(address string) (error, string) + func (e *Erc20Service) Symbol(address string) (error, string) + func (e *Erc20Service) TotalSupply(address string) (error, *big.Int) + type Ethereum struct + func NewEthereum(rpcUrl string, hybridExAddr string) *Ethereum + func (e *Ethereum) BestAskList(pairName string) []byte + func (e *Ethereum) BestBidList(pairName string) []byte + func (e *Ethereum) CancelOrderbook(payload map[string]string) bool + func (e *Ethereum) EnableDebug(b bool) + func (e *Ethereum) GetBlockByNumber(number uint64) (sdk.Block, error) + func (e *Ethereum) GetBlockNumber() (uint64, error) + func (e *Ethereum) GetHotFeeDiscount(address string) decimal.Decimal + func (e *Ethereum) GetOrderbook(pairName, orderID string) []byte + func (e *Ethereum) GetTokenAllowance(tokenAddress, proxyAddress, address string) decimal.Decimal + func (e *Ethereum) GetTokenBalance(tokenAddress, address string) decimal.Decimal + func (e *Ethereum) GetTransaction(ID string) (sdk.Transaction, error) + func (e *Ethereum) GetTransactionAndReceipt(ID string) (sdk.Transaction, sdk.TransactionReceipt, error) + func (e *Ethereum) GetTransactionCount(address string) (int, error) + func (e *Ethereum) GetTransactionReceipt(ID string) (sdk.TransactionReceipt, error) + func (e *Ethereum) IsValidSignature(address string, message string, signature string) (bool, error) + func (e *Ethereum) ProcessOrderbook(payload map[string]string) []byte + func (e *Ethereum) SendRawTransaction(tx interface{}) (string, error) + func (e *Ethereum) SendTransaction(to string, amount *big.Int, data []byte, privateKey *ecdsa.PrivateKey) (transactionHash string, err error) + type EthereumBlock struct + func (block *EthereumBlock) GetTransactions() []sdk.Transaction + func (block *EthereumBlock) Hash() string + func (block *EthereumBlock) Number() uint64 + func (block *EthereumBlock) ParentHash() string + func (block *EthereumBlock) Timestamp() uint64 + type EthereumNova struct + func NewEthereumNova(rpcURL, hybridExAddr string) *EthereumNova + type EthereumNovaProtocol struct + func (*EthereumNovaProtocol) GenerateOrderData(version, expiredAtSeconds, salt int64, ...) string + func (*EthereumNovaProtocol) GetMatchOrderCallData(takerOrder *sdk.Order, makerOrders []*sdk.Order, ...) []byte + func (*EthereumNovaProtocol) GetOrderHash(order *sdk.Order) []byte + func (*EthereumNovaProtocol) IsValidOrderSignature(address string, orderID string, signature string) bool + type EthereumTransaction struct + func (t *EthereumTransaction) GetBlockHash() string + func (t *EthereumTransaction) GetBlockNumber() uint64 + func (t *EthereumTransaction) GetFrom() string + func (t *EthereumTransaction) GetGas() int + func (t *EthereumTransaction) GetGasPrice() big.Int + func (t *EthereumTransaction) GetHash() string + func (t *EthereumTransaction) GetTo() string + func (t *EthereumTransaction) GetValue() big.Int + type EthereumTransactionReceipt struct + func (r *EthereumTransactionReceipt) GetBlockHash() string + func (r *EthereumTransactionReceipt) GetBlockNumber() uint64 + func (r *EthereumTransactionReceipt) GetLogs() (rst []sdk.IReceiptLog) + func (r *EthereumTransactionReceipt) GetResult() bool + func (r *EthereumTransactionReceipt) GetTxHash() string + func (r *EthereumTransactionReceipt) GetTxIndex() int + type IErc20 interface + AllowanceOf func(tokenAddress, proxyAddress, address string) (error, *big.Int) + BalanceOf func(tokenAddress, address string) (error, *big.Int) + Decimals func(address string) (error, int) + Name func(address string) (error, string) + Symbol func(address string) (error, string) + TotalSupply func(address string) (error, *big.Int) + func NewErc20Service(client *ethrpc.EthRPC) IErc20 + type ReceiptLog struct + func (log ReceiptLog) GetAddress() string + func (log ReceiptLog) GetBlockHash() string + func (log ReceiptLog) GetBlockNum() int + func (log ReceiptLog) GetData() string + func (log ReceiptLog) GetLogIndex() int + func (log ReceiptLog) GetRemoved() bool + func (log ReceiptLog) GetTopics() []string + func (log ReceiptLog) GetTransactionHash() string + func (log ReceiptLog) GetTransactionIndex() int