frostfs-node/pkg/morph/client/balance/mint.go
Alex Vanin 20de74a505 Rename package name
Due to source code relocation from GitHub.

Signed-off-by: Alex Vanin <a.vanin@yadro.com>
2023-03-07 16:38:26 +03:00

40 lines
799 B
Go

package balance
import (
"git.frostfs.info/TrueCloudLab/frostfs-node/pkg/morph/client"
"github.com/nspcc-dev/neo-go/pkg/util"
)
// MintPrm groups parameters of Mint operation.
type MintPrm struct {
to util.Uint160
amount int64
id []byte
client.InvokePrmOptional
}
// SetTo sets receiver of the transfer.
func (m *MintPrm) SetTo(to util.Uint160) {
m.to = to
}
// SetAmount sets amount of the transfer.
func (m *MintPrm) SetAmount(amount int64) {
m.amount = amount
}
// SetID sets ID.
func (m *MintPrm) SetID(id []byte) {
m.id = id
}
// Mint sends funds to the account.
func (c *Client) Mint(p MintPrm) error {
prm := client.InvokePrm{}
prm.SetMethod(mintMethod)
prm.SetArgs(p.to, p.amount, p.id)
prm.InvokePrmOptional = p.InvokePrmOptional
return c.client.Invoke(prm)
}