package
1.1.0
Repository: https://github.com/chainsql/go-chainsql-api.git
Documentation: pkg.go.dev

# Packages

Package hexutil implements hex encoding with 0x prefix.
Package math provides integer math utilities.

# Functions

BigToAddress returns Address with byte values of b.
BigToHash sets byte representation of b to hash.
Bytes2Hex returns the hexadecimal encoding of d.
BytesToAddress returns Address with value b.
BytesToHash sets b to hash.
CopyBytes returns an exact copy of the provided bytes.
FromHex returns the bytes represented by the hexadecimal string s.
Hex2Bytes returns the bytes represented by the hexadecimal string str.
Hex2BytesFixed returns bytes of a specified fixed length flen.
HexToAddress returns Address with byte values of s.
HexToHash sets byte representation of s to hash.
IsHexAddress verifies whether a string can represent a valid hex-encoded Ethereum address or not.
LeftPadBytes zero-pads slice to the left up to length l.
NewMixedcaseAddress constructor (mainly for testing).
NewMixedcaseAddressFromString is mainly meant for unit-testing.
ParseHexOrString tries to hexdecode b, but if the prefix is missing, it instead just returns the raw bytes.
RightPadBytes zero-pads slice to the right up to length l.
TrimLeftZeroes returns a subslice of s without leading zeroes.
TrimRightZeroes returns a subslice of s without trailing zeroes.

# Constants

AddressLength is the expected length of the address.
No description provided by the author
No description provided by the author
HashLength is the expected length of the hash.
No description provided by the author

# Variables

Common big integers often used.
Common big integers often used.
Common big integers often used.
Common big integers often used.
Common big integers often used.
Common big integers often used.
Common big integers often used.

# Structs

Auth is the type with ws connection infomations.
MixedcaseAddress retains the original string, which may or may not be correctly checksummed.
RequestBase contains fields that all requests will have.
TxResult is tx submit response.

# Interfaces

IRequest define interface for request.

# Type aliases

Address represents the 20 byte address of an Ethereum account.
Hash represents the 32 byte Keccak256 hash of arbitrary data.
No description provided by the author
UnprefixedAddress allows marshaling an Address without 0x prefix.
UnprefixedHash allows marshaling a Hash without 0x prefix.