forked from TrueCloudLab/frostfs-node
[#1400] owner: Upgrade SDK package
Signed-off-by: Leonard Lyubich <leonard@nspcc.ru>
This commit is contained in:
parent
f8ac4632f8
commit
bb25ecbd15
60 changed files with 379 additions and 327 deletions
|
@ -6,13 +6,13 @@ import (
|
|||
|
||||
"github.com/nspcc-dev/neo-go/pkg/encoding/address"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/owner"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||
)
|
||||
|
||||
// BalanceOf receives the amount of funds in the client's account
|
||||
// through the Balance contract call, and returns it.
|
||||
func (c *Client) BalanceOf(id *owner.ID) (*big.Int, error) {
|
||||
h, err := address.StringToUint160(id.String())
|
||||
func (c *Client) BalanceOf(id *user.ID) (*big.Int, error) {
|
||||
h, err := address.StringToUint160(id.EncodeToString())
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
|
|
@ -5,14 +5,14 @@ import (
|
|||
|
||||
"github.com/nspcc-dev/neo-go/pkg/encoding/address"
|
||||
"github.com/nspcc-dev/neofs-node/pkg/morph/client"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/owner"
|
||||
"github.com/nspcc-dev/neofs-sdk-go/user"
|
||||
)
|
||||
|
||||
// TransferPrm groups parameters of TransferX method.
|
||||
type TransferPrm struct {
|
||||
Amount int64
|
||||
|
||||
From, To *owner.ID
|
||||
From, To *user.ID
|
||||
|
||||
Details []byte
|
||||
|
||||
|
@ -24,12 +24,12 @@ type TransferPrm struct {
|
|||
//
|
||||
// If TryNotary is provided, calls notary contract.
|
||||
func (c *Client) TransferX(p TransferPrm) error {
|
||||
from, err := address.StringToUint160(p.From.String())
|
||||
from, err := address.StringToUint160(p.From.EncodeToString())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
||||
to, err := address.StringToUint160(p.To.String())
|
||||
to, err := address.StringToUint160(p.To.EncodeToString())
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue