Documentation ¶
Index ¶
- func CallContract(to common.Address, data []byte) ([]byte, error)
- func Get4BytesFunctionSignature(sig string) []byte
- func GetActiveProviders(dataset common.Address) ([]common.Address, error)
- func GetAddress() (common.Address, error)
- func GetMappingLocation(slot int, key common.Address) common.Hash
- func GetNonce() (uint64, error)
- func GetStorageAt(contract common.Address, location common.Hash) (common.Hash, error)
- func IsActiveProvider(dataset, provider common.Address) (bool, error)
- func IsValidDataset(dataset common.Address) bool
- func SendTransaction(to common.Address, data []byte) (common.Hash, error)
- func SetPrivateKey(newPrivateKey string) error
- func SetRpcClient(rpcUrl string) error
- func VerifyMessage(message []byte, sig Signature, signer common.Address) bool
- type Signature
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Get4BytesFunctionSignature ¶
Get4BytesFunctionSignature return 4 bytes of function signature hash
func GetActiveProviders ¶
GetActiveProviders returns the set of currently active data provider addresses of the given dataset address.
func GetMappingLocation ¶
GetMappingLocation find hash of key in mapping
func GetStorageAt ¶
GetStorageAt returns the value at the given storage location of the given Ethereum contract address.
func IsActiveProvider ¶
IsActiveProvider checks if the given data provider address is active in the given dataset address. Returns true if that the case, and false otherwise.
func IsValidDataset ¶
IsValidDataset returns true if the given dataset address is valid, and false otherwise
func SendTransaction ¶
SendTransaction broadcasts the given message to the Ethereum network. This function also handles transaction signing.
func SetPrivateKey ¶
SetPrivateKey transform private key string to ECDSA Key
func SetRpcClient ¶
SetRpcClient receive url of ethereum node to initiate rpcClient
Types ¶
type Signature ¶
func SignMessage ¶
SignMessage returns the signature of signing the given message using Ethereum's message signing scheme.