common

package
v0.5.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 25, 2018 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Copyright 2017 - 2018 OneLedger

Copyright 2017 - 2018 OneLedger

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BigToHex

func BigToHex(bigInt big.Int) string

BigToHex covert big.Int to hexadecimal representation

func GetBTCAddressFromByteArray added in v0.5.0

func GetBTCAddressFromByteArray(chain data.ChainType, address []byte) *btcutil.AddressPubKeyHash

func GetETHAddressFromByteArray added in v0.5.0

func GetETHAddressFromByteArray(chain data.ChainType, address []byte) *common.Address

func GetSwapAddress added in v0.5.0

func GetSwapAddress(chain data.ChainType) []byte

func IntToHex

func IntToHex(i int) string

IntToHex convert int to hexadecimal representation

func ParseBigInt

func ParseBigInt(value string) (big.Int, error)

ParseBigInt parse hex string value to big.Int

func ParseInt

func ParseInt(value string) (int, error)

ParseInt parse hex string value to int

Types

type Contract added in v0.5.0

type Contract interface {
	ToMessage() []byte
}

type HttpClient

type HttpClient interface {
	Post(url string, contentType string, body io.Reader) (*http.Response, error)
}

type Logger

type Logger interface {
	Println(v ...interface{})
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL