Versions in this module Expand all Collapse all v0 v0.0.2 Sep 20, 2022 Changes in this version + var ErrAmountLessThanZero = errors.New("err: input amount value can not less than 0! ") + var ErrGetBlockStatus = errors.New("err: error when get status from chain! ") + var ErrInvalidAddress = errors.New("err: input address is not valid! ") + var ErrInvalidAuthClientParams = errors.New("err: auth cli params is not valid! ") + var ErrInvalidHashValue = errors.New("err: input hash value is not valid! ") + var ErrInvalidParams = errors.New("err: input params are not valid! ") + var ErrInvalidPrivateKey = errors.New("err: input private key is not valid! ") + var RinkebyChainId = big.NewInt(4) + func CreateAuthentication(privateKey *ecdsa.PrivateKey, nonce *big.Int, value *big.Int, ...) *bind.TransactOpts + func PrivateKeyToAddress(privateKey *ecdsa.PrivateKey) (address common.Address, err error) + func SignTx(authCli *AuthClient, tx *types.Transaction) (signedTx *types.Transaction, err error) + type AuthClient struct + Address common.Address + ChainId *big.Int + PrivateKey *ecdsa.PrivateKey + PublicKey *ecdsa.PublicKey + func NewAuthClient(priKey string, chainId *big.Int) (authCli *AuthClient, err error) + type ProviderClient struct + func NewClient(provider string) (cli *ProviderClient, err error) + func (cli *ProviderClient) DeployContract(authCli *AuthClient, gasPrice *big.Int, abiPath string, binPath string, ...) (contractAddress common.Address, txHash common.Hash, err error) + func (cli *ProviderClient) DeployContractUntil(authCli *AuthClient, gasPrice *big.Int, abiPath string, binPath string, ...) (status bool, contractAddress common.Address, txHash common.Hash, err error) + func (cli *ProviderClient) GetBalance(address string) (balance *big.Int, err error) + func (cli *ProviderClient) GetBlockHeaderByHash(blockHash string) (header *types.Header, err error) + func (cli *ProviderClient) GetBlockHeaderByNumber(height *big.Int) (header *types.Header, err error) + func (cli *ProviderClient) GetBlockInfoByHash(blockHash string) (blockInfo *types.Block, err error) + func (cli *ProviderClient) GetBlockInfoByNumber(height *big.Int) (blockInfo *types.Block, err error) + func (cli *ProviderClient) GetHeight() (height uint64, err error) + func (cli *ProviderClient) GetLatestBlockHeader() (header *types.Header, err error) + func (cli *ProviderClient) GetLatestBlockInfo() (blockInfo *types.Block, err error) + func (cli *ProviderClient) GetPendingNonce(address string) (nonce uint64, err error) + func (cli *ProviderClient) GetTransactionByHash(transactionHash string) (tx *types.Transaction, isPending bool, err error) + func (cli *ProviderClient) GetTransactionReceipt(transactionHash string) (receipt *types.Receipt, err error) + func (cli *ProviderClient) IsContract(address string) (isContract bool, err error) + func (cli *ProviderClient) Transfer(authCli *AuthClient, to string, amount *big.Int, data []byte, gasLimit uint64) (txHash string, err error) + func (cli *ProviderClient) WaitingTransactionStatus(txHash string) (status bool, err error)