rpc: implement (*Client).GetClaimable()

This is needed to form correct Claim transaction.
This commit is contained in:
Evgenii Stratonikov 2020-02-27 15:46:50 +03:00
parent 45b8669b42
commit 37c2bc4733

View file

@ -43,6 +43,16 @@ func (c *Client) GetAccountState(address string) (*result.AccountState, error) {
return resp, nil return resp, nil
} }
// GetClaimable returns tx outputs which can be claimed.
func (c *Client) GetClaimable(address string) (*result.ClaimableInfo, error) {
params := request.NewRawParams(address)
resp := new(result.ClaimableInfo)
if err := c.performRequest("getclaimable", params, resp); err != nil {
return nil, err
}
return resp, nil
}
// GetUnspents returns UTXOs for the given NEO account. // GetUnspents returns UTXOs for the given NEO account.
func (c *Client) GetUnspents(address string) (*result.Unspents, error) { func (c *Client) GetUnspents(address string) (*result.Unspents, error) {
var ( var (