Documentation ¶
Index ¶
- Constants
- Variables
- 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 Ethereum
- 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) 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) SendRawTransaction(tx interface{}) (string, error)
- func (e *Ethereum) SendTransaction(txAttributes map[string]interface{}, privateKey []byte) (transactionHash string, err error)
- type EthereumBlock
- type EthereumHydro
- type EthereumHydroProtocol
- func (*EthereumHydroProtocol) GenerateOrderData(version, expiredAtSeconds, salt int64, ...) string
- func (*EthereumHydroProtocol) GetMatchOrderCallData(takerOrder *sdk.Order, makerOrders []*sdk.Order, ...) []byte
- func (*EthereumHydroProtocol) GetOrderHash(order *sdk.Order) []byte
- func (*EthereumHydroProtocol) IsValidOrderSignature(address string, orderID string, signature string) bool
- type EthereumTransaction
- type EthereumTransactionReceipt
Constants ¶
View Source
const FeeRateBase = 100000
Variables ¶
View Source
var EIP712_DOMAIN_TYPEHASH []byte
View Source
var EIP712_ORDER_TYPE []byte
Functions ¶
func GetOrderData ¶
func IsValidSignature ¶
Types ¶
type Ethereum ¶
type Ethereum struct {
// contains filtered or unexported fields
}
func NewEthereum ¶
func (*Ethereum) GetBlockByNumber ¶
func (*Ethereum) GetBlockNumber ¶
func (*Ethereum) GetHotFeeDiscount ¶
func (*Ethereum) GetTokenAllowance ¶
func (*Ethereum) GetTokenBalance ¶
func (*Ethereum) GetTransaction ¶
func (e *Ethereum) GetTransaction(ID string) (sdk.Transaction, error)
func (*Ethereum) GetTransactionAndReceipt ¶
func (e *Ethereum) GetTransactionAndReceipt(ID string) (sdk.Transaction, sdk.TransactionReceipt, error)
func (*Ethereum) GetTransactionCount ¶
func (*Ethereum) GetTransactionReceipt ¶
func (e *Ethereum) GetTransactionReceipt(ID string) (sdk.TransactionReceipt, error)
func (*Ethereum) IsValidSignature ¶
func (*Ethereum) SendRawTransaction ¶
type EthereumBlock ¶
func (*EthereumBlock) GetTransactions ¶
func (block *EthereumBlock) GetTransactions() []sdk.Transaction
func (*EthereumBlock) Number ¶
func (block *EthereumBlock) Number() uint64
func (*EthereumBlock) Timestamp ¶
func (block *EthereumBlock) Timestamp() uint64
type EthereumHydro ¶
type EthereumHydro struct { *Ethereum *EthereumHydroProtocol }
func NewEthereumHydro ¶
func NewEthereumHydro(rpcURL string) *EthereumHydro
type EthereumHydroProtocol ¶
type EthereumHydroProtocol struct{}
func (*EthereumHydroProtocol) GenerateOrderData ¶
func (*EthereumHydroProtocol) GetMatchOrderCallData ¶
func (*EthereumHydroProtocol) GetOrderHash ¶
func (*EthereumHydroProtocol) GetOrderHash(order *sdk.Order) []byte
func (*EthereumHydroProtocol) IsValidOrderSignature ¶
func (*EthereumHydroProtocol) IsValidOrderSignature(address string, orderID string, signature string) bool
type EthereumTransaction ¶
type EthereumTransaction struct {
*ethrpc.Transaction
}
func (*EthereumTransaction) GetHash ¶
func (t *EthereumTransaction) GetHash() string
type EthereumTransactionReceipt ¶
type EthereumTransactionReceipt struct {
*ethrpc.TransactionReceipt
}
func (*EthereumTransactionReceipt) GetBlockNumber ¶
func (r *EthereumTransactionReceipt) GetBlockNumber() uint64
func (*EthereumTransactionReceipt) GetResult ¶
func (r *EthereumTransactionReceipt) GetResult() bool
Click to show internal directories.
Click to hide internal directories.