add rpc.GetRawTransaction() method (#87)

This commit is contained in:
Evgenii Stratonikov 2018-06-27 08:48:39 +03:00 committed by Anthony De Meulemeester
parent f69451d36d
commit 4bd4635e49
2 changed files with 13 additions and 1 deletions

View file

@ -1 +1 @@
0.44.4
0.44.5

View file

@ -57,6 +57,18 @@ func (c *Client) InvokeFunction(script, operation string, params []smartcontract
return resp, nil
}
// GetRawTransaction queries a transaction by hash.
func (c *Client) GetRawTransaction(hash string, verbose bool) (*response, error) {
var (
params = newParams(hash, verbose)
resp = &response{}
)
if err := c.performRequest("getrawtransaction", params, resp); err != nil {
return nil, err
}
return resp, nil
}
// SendRawTransaction broadcasts a transaction over the NEO network.
// The given hex string needs to be signed with a keypair.
// When the result of the response object is true, the TX has successfully