[#770] pkg/morph: Add `Morph()` method

Add access to low-level morph client in
wrappers

Signed-off-by: Pavel Karpy <carpawell@nspcc.ru>
remotes/fyrchik/meta-pebble
Pavel Karpy 2021-09-03 20:19:16 +03:00 committed by Pavel Karpy
parent 4e5618aecb
commit 46df288d33
2 changed files with 10 additions and 0 deletions

View File

@ -112,6 +112,11 @@ func New(c *client.StaticClient, opts ...Option) (*Client, error) {
return res, nil
}
// Morph returns raw morph client.
func (c Client) Morph() *client.Client {
return c.client.Morph()
}
// WithPutMethod returns a client constructor option that
// specifies the method name of container storing operation.
//

View File

@ -71,6 +71,11 @@ func NewStatic(client *Client, scriptHash util.Uint160, fee fixedn.Fixed8, opts
}, nil
}
// Morph return wrapped raw morph client.
func (s StaticClient) Morph() *Client {
return s.client
}
// Invoke calls Invoke method of Client with static internal script hash and fee.
// Supported args types are the same as in Client.
//