mirror of
https://github.com/nspcc-dev/neo-go.git
synced 2024-12-23 03:41:34 +00:00
add rpc.GetRawTransaction() method (#87)
This commit is contained in:
parent
f69451d36d
commit
4bd4635e49
2 changed files with 13 additions and 1 deletions
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
|||
0.44.4
|
||||
0.44.5
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue