There is a need to analyze some response information in API client.
Define `ResponseMetaInfo` structure of response information. Add
`WithResponseInfoHandler` client option which allows to set the response
info callback. The callback is called right after any response is received.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Make `Client` to be the wrapper over raw protobuf client. Provide public
method to get the underlying raw client. Change implementations of all
methods with the new approach of the RPC execution.
Additional changes:
* key replaced from `New` argument to `WithDefaultPrivateKey` option;
* `GetSelfBalance` is removed as non-viable;
* `GetEACLWithSignature` is removed, `GetEACL` returns `EACLWithSignature`;
* `AttachSessionToken` / `AttachBearerToken` are removed as non-viable;
* redundant options are removed.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Make it easier to test API clients and mock specific methods.
Also add comments on exported methods.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
Allow to reuse underlying connection for requests
with different key. If no key is specified the one
provided on client creation is used.
Signed-off-by: Evgenii Stratonikov <evgeniy@nspcc.ru>
There is a need to set dial timeout in SDK client that is used in case of
internal connection opening. Add DialTimeout option constructor to support
this feature.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
Replace owner.NEO3Wallet usage with owner.ID usage. Functions that process
the wallet address convert it to the owner identifier through the public
method.
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>