// Transfer a certain amount of the given asset
Transfer a certain amount of the given asset
// Transfer a certain amount of the given asset
func (client *Client) Transfer(key string, from, to types.ObjectID, amount, fee types.AssetAmount) error {
	op := types.NewTransferOperation(from, to, amount, fee)
	fees, err := client.Database.GetRequiredFee([]types.Operation{op}, fee.AssetID.String())
	if err != nil {
		log.Println(err)
		return errors.Wrap(err, "can't get fees")
	}
	op.Fee.Amount = fees[0].Amount
	stx, err := client.sign([]string{key}, op)
	if err != nil {
		return err
	}
	return client.broadcast(stx)
}
func ( client * Client ) Transfer ( key string , from , to types . ObjectID , amount , fee types . AssetAmount ) error { op := types . NewTransferOperation ( from , to , amount , fee ) fees , err := client . Database . GetRequiredFee ( [ ] types . Operation { op } , fee . AssetID . String ( ) ) if err != nil { log . Println ( err ) return errors . Wrap ( err , " " ) } op . Fee . Amount = fees [ 0 ] . Amount stx , err := client . sign ( [ ] string { key } , op ) if err != nil { return err } return client . broadcast ( stx ) }
Transfer a certain amount of the given asset
Transfer a certain amount of the given asset