Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Bytes32ToIpfsHash ¶
Types ¶
type ChainWrapper ¶
type ChainWrapper interface { Publish(txParams *chainoperations.TransactParams, price *big.Int, metaDataID []byte, proofDataIDs []string, proofNum int, detailsID string, supportVerify bool) (string, error) PrepareToBuy(txParams *chainoperations.TransactParams, publishId string, startVerify bool) error BuyData(txParams *chainoperations.TransactParams, txId *big.Int) error CancelTransaction(txParams *chainoperations.TransactParams, txId *big.Int) error SubmitMetaDataIdEncWithBuyer(txParams *chainoperations.TransactParams, txId *big.Int, encyptedMetaDataId []byte) error ConfirmDataTruth(txParams *chainoperations.TransactParams, txId *big.Int, truth bool) error ApproveTransfer(txParams *chainoperations.TransactParams, spender common.Address, value *big.Int) error Vote(txParams *chainoperations.TransactParams, txId *big.Int, judge bool, comments string) error RegisterAsVerifier(txParams *chainoperations.TransactParams) error CreditsToVerifier(txParams *chainoperations.TransactParams, txId *big.Int, index uint8, credit uint8) error TransferTokens(txParams *chainoperations.TransactParams, to common.Address, value *big.Int) error GetTokenBalance(txParams *chainoperations.TransactParams, owner common.Address) (*big.Int, error) TransferEth(from common.Address, password string, to common.Address, value *big.Int) (*types.Transaction, error) GetEthBalance(owner common.Address) (*big.Int, error) }
func NewChainWrapper ¶
type Client ¶
type Client interface { Account() *accounts.Account SubscribeEvent(eventName string, callback chainevents.EventCallback) error UnSubscribeEvent(eventName string) error Authenticate(password string) (bool, error) TransferEthFrom(from common.Address, password string, value *big.Int, ec *ethclient.Client) error TransferTokenFrom(from common.Address, password string, value *big.Int) error GetEth(owner common.Address, ec *ethclient.Client) (*big.Int, error) GetScryToken(owner common.Address) (*big.Int, error) }
func CreateScryClient ¶
func CreateScryClient(password string, chainWrapper ChainWrapper) (Client, error)
func NewScryClient ¶
func NewScryClient(publicKey string, chainWrapper ChainWrapper) Client
Click to show internal directories.
Click to hide internal directories.