diff --git a/stellar-dotnet-sdk-test/responses/OperationDeserializerTest.cs b/stellar-dotnet-sdk-test/responses/OperationDeserializerTest.cs index 645a84eed..f1f479bfd 100644 --- a/stellar-dotnet-sdk-test/responses/OperationDeserializerTest.cs +++ b/stellar-dotnet-sdk-test/responses/OperationDeserializerTest.cs @@ -380,38 +380,95 @@ private static void AssertManageBuyOfferData(OperationResponse instance) } [TestMethod] - public void TestDeserializePathPaymentOperation() + public void TestDeserializePathPaymentStrictReceiveOperation() { - var json = File.ReadAllText(Path.Combine("testdata", "operationPathPayment.json")); + var json = File.ReadAllText(Path.Combine("testdata", "operationPathPaymentStrictReceive.json")); var instance = JsonSingleton.GetInstance(json); - AssertPathPaymentData(instance); + AssertPathPaymentStrictReceiveData(instance); } [TestMethod] - public void TestSerializeDeserializePathPaymentOperation() + public void TestSerializeDeserializePathPaymentStrictReceiveOperation() { - var json = File.ReadAllText(Path.Combine("testdata", "operationPathPayment.json")); + var json = File.ReadAllText(Path.Combine("testdata", "operationPathPaymentStrictReceive.json")); var instance = JsonSingleton.GetInstance(json); var serialized = JsonConvert.SerializeObject(instance); var back = JsonConvert.DeserializeObject(serialized); - AssertPathPaymentData(back); + AssertPathPaymentStrictReceiveData(back); } - private static void AssertPathPaymentData(OperationResponse instance) + private static void AssertPathPaymentStrictReceiveData(OperationResponse instance) { //There is a JsonConverter called OperationDeserializer that instantiates the type based on the json type_i element... - Assert.IsTrue(instance is PathPaymentOperationResponse); - var operation = (PathPaymentOperationResponse) instance; - - Assert.AreEqual(operation.From, "GCXKG6RN4ONIEPCMNFB732A436Z5PNDSRLGWK7GBLCMQLIFO4S7EYWVU"); - Assert.AreEqual(operation.To, "GA5WBPYA5Y4WAEHXWR2UKO2UO4BUGHUQ74EUPKON2QHV4WRHOIRNKKH2"); - Assert.AreEqual(operation.Amount, "10.0"); - Assert.AreEqual(operation.SourceAmount, "1.173"); - Assert.AreEqual(operation.SourceMax, "100.0"); - Assert.AreEqual(operation.Asset, Asset.CreateNonNativeAsset("EUR", "GCQPYGH4K57XBDENKKX55KDTWOTK5WDWRQOH2LHEDX3EKVIQRLMESGBG")); - Assert.AreEqual(operation.SendAsset, Asset.CreateNonNativeAsset("USD", "GC23QF2HUE52AMXUFUH3AYJAXXGXXV2VHXYYR6EYXETPKDXZSAW67XO4")); + Assert.IsTrue(instance is PathPaymentStrictReceiveOperationResponse); + var operation = (PathPaymentStrictReceiveOperationResponse) instance; + + PathPaymentStrictReceiveOperationResponse operationTest = new PathPaymentStrictReceiveOperationResponse( + "GCXKG6RN4ONIEPCMNFB732A436Z5PNDSRLGWK7GBLCMQLIFO4S7EYWVU", + "GA5WBPYA5Y4WAEHXWR2UKO2UO4BUGHUQ74EUPKON2QHV4WRHOIRNKKH2", + "credit_alphanum4", "EUR", "GCQPYGH4K57XBDENKKX55KDTWOTK5WDWRQOH2LHEDX3EKVIQRLMESGBG", + "10.0", + "credit_alphanum4", "USD", "GC23QF2HUE52AMXUFUH3AYJAXXGXXV2VHXYYR6EYXETPKDXZSAW67XO4", + "10.0", + "10.0", + new Asset[] { } + ); + + Assert.AreEqual(operation.From, operationTest.From); + Assert.AreEqual(operation.To, operationTest.To); + Assert.AreEqual(operation.Amount, operationTest.Amount); + Assert.AreEqual(operation.SourceMax, operationTest.SourceMax); + Assert.AreEqual(operation.SourceAmount, operationTest.SourceAmount); + Assert.AreEqual(operation.DestinationAsset, Asset.CreateNonNativeAsset(operationTest.AssetType, operation.AssetIssuer, operationTest.AssetCode)); + Assert.AreEqual(operation.SourceAsset, Asset.CreateNonNativeAsset(operationTest.SourceAssetType, operation.SourceAssetIssuer, operationTest.SourceAssetCode)); + } + + [TestMethod] + public void TestDeserializePathPaymentStrictSendOperation() + { + var json = File.ReadAllText(Path.Combine("testdata", "operationPathPaymentStrictSend.json")); + var instance = JsonSingleton.GetInstance(json); + + AssertPathPaymentStrictSendData(instance); + } + + [TestMethod] + public void TestSerializeDeserializePathPaymentStrictSendOperation() + { + var json = File.ReadAllText(Path.Combine("testdata", "operationPathPaymentStrictSend.json")); + var instance = JsonSingleton.GetInstance(json); + var serialized = JsonConvert.SerializeObject(instance); + var back = JsonConvert.DeserializeObject(serialized); + + AssertPathPaymentStrictSendData(back); + } + + private static void AssertPathPaymentStrictSendData(OperationResponse instance) + { + //There is a JsonConverter called OperationDeserializer that instantiates the type based on the json type_i element... + Assert.IsTrue(instance is PathPaymentStrictSendOperationResponse); + var operation = (PathPaymentStrictSendOperationResponse)instance; + + PathPaymentStrictSendOperationResponse operationTest = new PathPaymentStrictSendOperationResponse( + "GCXVEEBWI4YMRK6AFJQSEUBYDQL4PZ24ECAPJE2ZIAPIQZLZIBAX3LIF", + "GCXVEEBWI4YMRK6AFJQSEUBYDQL4PZ24ECAPJE2ZIAPIQZLZIBAX3LIF", + "native", "", "", + "0.0859000", + "credit_alphanum4", "KIN", "GBDEVU63Y6NTHJQQZIKVTC23NWLQVP3WJ2RI2OTSJTNYOIGICST6DUXR", + "1000.0000000", + "0.0859000", + new Asset[] { } + ); + + Assert.AreEqual(operation.From, operationTest.From); + Assert.AreEqual(operation.To, operationTest.To); + Assert.AreEqual(operation.Amount, operationTest.Amount); + Assert.AreEqual(operation.SourceAmount, operationTest.SourceAmount); + Assert.AreEqual(operation.DestinationMin, operationTest.DestinationMin); + Assert.AreEqual(operation.DestinationAsset, Asset.Create(operationTest.AssetType, "", "")); + Assert.AreEqual(operation.SourceAsset, Asset.CreateNonNativeAsset(operationTest.SourceAssetType, operationTest.SourceAssetIssuer, operationTest.SourceAssetCode)); } [TestMethod] diff --git a/stellar-dotnet-sdk-test/stellar-dotnet-sdk-test.csproj b/stellar-dotnet-sdk-test/stellar-dotnet-sdk-test.csproj index a3ee80993..4d6435f90 100644 --- a/stellar-dotnet-sdk-test/stellar-dotnet-sdk-test.csproj +++ b/stellar-dotnet-sdk-test/stellar-dotnet-sdk-test.csproj @@ -182,7 +182,10 @@ PreserveNewest - + + PreserveNewest + + PreserveNewest diff --git a/stellar-dotnet-sdk-test/testdata/operationPathPayment.json b/stellar-dotnet-sdk-test/testdata/operationPathPaymentStrictReceive.json similarity index 60% rename from stellar-dotnet-sdk-test/testdata/operationPathPayment.json rename to stellar-dotnet-sdk-test/testdata/operationPathPaymentStrictReceive.json index d58627fc7..a77bd250e 100644 --- a/stellar-dotnet-sdk-test/testdata/operationPathPayment.json +++ b/stellar-dotnet-sdk-test/testdata/operationPathPaymentStrictReceive.json @@ -5,13 +5,13 @@ "templated": true }, "precedes": { - "href": "/operations?cursor=25769807873&order=asc" + "href": "/operations?cursor=25769807873\u0026order=asc" }, "self": { "href": "/operations/25769807873" }, "succeeds": { - "href": "/operations?cursor=25769807873&order=desc" + "href": "/operations?cursor=25769807873\u0026order=desc" }, "transaction": { "href": "/transactions/25769807872" @@ -22,14 +22,15 @@ "asset_issuer": "GCQPYGH4K57XBDENKKX55KDTWOTK5WDWRQOH2LHEDX3EKVIQRLMESGBG", "asset_type": "credit_alphanum4", "from": "GCXKG6RN4ONIEPCMNFB732A436Z5PNDSRLGWK7GBLCMQLIFO4S7EYWVU", - "id": 25769807873, + "id": "25769807873", "paging_token": "25769807873", - "send_asset_code": "USD", - "send_asset_issuer": "GC23QF2HUE52AMXUFUH3AYJAXXGXXV2VHXYYR6EYXETPKDXZSAW67XO4", - "send_asset_type": "credit_alphanum4", - "source_amount": "1.173", - "source_max": "100.0", + "source_asset_code": "USD", + "source_asset_issuer": "GC23QF2HUE52AMXUFUH3AYJAXXGXXV2VHXYYR6EYXETPKDXZSAW67XO4", + "source_asset_type": "credit_alphanum4", + "source_amount": "10.0", + "source_max": "10.0", "to": "GA5WBPYA5Y4WAEHXWR2UKO2UO4BUGHUQ74EUPKON2QHV4WRHOIRNKKH2", + "transaction_successful": true, "type_i": 2, - "type": "path_payment" + "type": "path_payment_strict_receive" } \ No newline at end of file diff --git a/stellar-dotnet-sdk-test/testdata/operationPathPaymentStrictSend.json b/stellar-dotnet-sdk-test/testdata/operationPathPaymentStrictSend.json new file mode 100644 index 000000000..ea11a1875 --- /dev/null +++ b/stellar-dotnet-sdk-test/testdata/operationPathPaymentStrictSend.json @@ -0,0 +1,39 @@ +{ + "_links": { + "self": { + "href": "/operations/120903307907612673" + }, + "transaction": { + "href": "/transactions/f60f32eff7f1dd0649cfe2986955d12f6ff45288357fe1526600642ea1b418aa" + }, + "effects": { + "href": "/operations/120903307907612673/effects" + }, + "succeeds": { + "href": "/effects?order=desc&cursor=120903307907612673" + }, + "precedes": { + "href": "/effects?order=asc&cursor=120903307907612673" + } + }, + "id": "120903307907612673", + "paging_token": "120903307907612673", + "transaction_successful": true, + "source_account": "GCXVEEBWI4YMRK6AFJQSEUBYDQL4PZ24ECAPJE2ZIAPIQZLZIBAX3LIF", + "type": "path_payment_strict_send", + "type_i": 13, + "created_at": "2020-02-09T20:32:53Z", + "transaction_hash": "f60f32eff7f1dd0649cfe2986955d12f6ff45288357fe1526600642ea1b418aa", + "asset_type": "native", + "from": "GCXVEEBWI4YMRK6AFJQSEUBYDQL4PZ24ECAPJE2ZIAPIQZLZIBAX3LIF", + "to": "GCXVEEBWI4YMRK6AFJQSEUBYDQL4PZ24ECAPJE2ZIAPIQZLZIBAX3LIF", + "amount": "0.0859000", + "path": [ + + ], + "source_amount": "1000.0000000", + "destination_min": "0.0859000", + "source_asset_type": "credit_alphanum4", + "source_asset_code": "KIN", + "source_asset_issuer": "GBDEVU63Y6NTHJQQZIKVTC23NWLQVP3WJ2RI2OTSJTNYOIGICST6DUXR" +} \ No newline at end of file diff --git a/stellar-dotnet-sdk/responses/OperationDeserializer.cs b/stellar-dotnet-sdk/responses/OperationDeserializer.cs index f5d29ec39..7c1f1dcd2 100644 --- a/stellar-dotnet-sdk/responses/OperationDeserializer.cs +++ b/stellar-dotnet-sdk/responses/OperationDeserializer.cs @@ -34,7 +34,7 @@ private static OperationResponse CreateResponse(int type) case 1: return new PaymentOperationResponse(); case 2: - return new PathPaymentOperationResponse(); + return new PathPaymentStrictReceiveOperationResponse(); case 3: return new ManageSellOfferOperationResponse(); case 4: @@ -55,6 +55,8 @@ private static OperationResponse CreateResponse(int type) return new BumpSequenceOperationResponse(); case 12: return new ManageBuyOfferOperationResponse(); + case 13: + return new PathPaymentStrictSendOperationResponse(); default: throw new JsonSerializationException($"Invalid operation 'type_i'='{type}'"); } diff --git a/stellar-dotnet-sdk/responses/operations/PathPaymentOperationResponse.cs b/stellar-dotnet-sdk/responses/operations/PathPaymentStrictReceiveOperationResponse.cs similarity index 50% rename from stellar-dotnet-sdk/responses/operations/PathPaymentOperationResponse.cs rename to stellar-dotnet-sdk/responses/operations/PathPaymentStrictReceiveOperationResponse.cs index d06804bc9..38dd7e087 100644 --- a/stellar-dotnet-sdk/responses/operations/PathPaymentOperationResponse.cs +++ b/stellar-dotnet-sdk/responses/operations/PathPaymentStrictReceiveOperationResponse.cs @@ -1,126 +1,136 @@ -using Newtonsoft.Json; - -namespace stellar_dotnet_sdk.responses.operations -{ - /// - /// - /// Sends an amount in a specific asset to a destination account through a path of offers. This allows the asset sent (e.g., 450 XLM) to be different from the asset received (e.g, 6 BTC). - /// See: https://www.stellar.org/developers/horizon/reference/resources/operation.html - /// - /// - /// - public class PathPaymentOperationResponse : OperationResponse - { - public PathPaymentOperationResponse() - { - - } - - /// - /// Sends an amount in a specific asset to a destination account through a path of offers. This allows the asset sent (e.g., 450 XLM) to be different from the asset received (e.g, 6 BTC). - /// - /// The amount of destination asset the destination account receives. - /// The amount of source asset deducted from senders account. - /// Account address that is sending the payment. - /// Account address that receives the payment. - /// Account address that receives the payment. - /// The asset code (Alpha4, Alpha12, etc.) - /// The account that created the asset - /// The asset type (USD, BTC, etc.) to be sent. - /// The asset code (Alpha4, Alpha12, etc.) to be sent - /// The account that created the asset to be sent. - public PathPaymentOperationResponse(string amount, string sourceAmount, string sourceMax, string from, string to, string assetType, string assetCode, - string assetIssuer, string sendAssetType, string sendAssetCode, string sendAssetIssuer) - { - Amount = amount; - SourceAmount = sourceAmount; - SourceMax = sourceMax; - From = from; - To = to; - AssetType = assetType; - AssetCode = assetCode; - AssetIssuer = assetIssuer; - SendAssetType = sendAssetType; - SendAssetCode = sendAssetCode; - SendAssetIssuer = sendAssetIssuer; - } - - public override int TypeId => 2; - - /// - /// The amount of destination asset the destination account receives. - /// - [JsonProperty(PropertyName = "amount")] - public string Amount { get; private set; } - - /// - /// The amount of source asset deducted from senders account. - /// - [JsonProperty(PropertyName = "source_amount")] - public string SourceAmount { get; private set; } - - /// - /// The amount of source asset deducted from senders account. - /// - [JsonProperty(PropertyName = "source_max")] - public string SourceMax { get; private set; } - - /// - /// Account address that is sending the payment. - /// - [JsonProperty(PropertyName = "from")] - public string From { get; private set; } - - /// - /// Account address that receives the payment. - /// - [JsonProperty(PropertyName = "to")] - public string To { get; private set; } - - /// - /// Account address that receives the payment. - /// - [JsonProperty(PropertyName = "asset_type")] - public string AssetType { get; private set; } - - /// - /// The asset code (Alpha4, Alpha12, etc.) - /// - [JsonProperty(PropertyName = "asset_code")] - public string AssetCode { get; private set; } - - /// - /// The account that created the asset - /// - [JsonProperty(PropertyName = "asset_issuer")] - public string AssetIssuer { get; private set; } - - /// - /// The asset type (USD, BTC, etc.) to be sent. - /// - [JsonProperty(PropertyName = "send_asset_type")] - public string SendAssetType { get; private set; } - - /// - /// The asset code (Alpha4, Alpha12, etc.) to be sent - /// - [JsonProperty(PropertyName = "send_asset_code")] - public string SendAssetCode { get; private set; } - - /// - /// The account that created the asset to be sent. - /// - [JsonProperty(PropertyName = "send_asset_issuer")] - public string SendAssetIssuer { get; private set; } - - /// - /// Asset from source to send. - /// - public Asset Asset => Asset.CreateNonNativeAsset(AssetType, AssetIssuer, AssetCode); - - /// - /// Asset to destination. - /// - public Asset SendAsset => Asset.CreateNonNativeAsset(SendAssetType, SendAssetIssuer, SendAssetCode); - } -} +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace stellar_dotnet_sdk.responses.operations +{ + /// + /// + /// A path payment strict receive operation represents a payment from one account to another through a path. + /// See: https://www.stellar.org/developers/horizon/reference/resources/operation.html#path-payment + /// + /// + /// + public class PathPaymentStrictReceiveOperationResponse : OperationResponse + { + public PathPaymentStrictReceiveOperationResponse() + { + + } + + /// + /// Sends an amount in a specific asset to a destination account through a path of offers. This allows the asset sent (e.g., 450 XLM) to be different from the asset received (e.g, 6 BTC). + /// + /// Account address that is sending the payment. + /// Account address that receives the payment. + /// Destination asset type. (Alpha4, Alpha12, etc.) + /// Destination asset code. + /// Destination asset issuer account + /// The amount of destination asset the destination account receives. + /// Source asset type. (Alpha4, Alpha12, etc.) + /// Source asset code. + /// Source asset issuer account. + /// The maximum send amount. + /// The amount sent. + /// Additional hops the operation went through to get to the destination asset. + public PathPaymentStrictReceiveOperationResponse(string from, string to, string assetType, string assetCode, string assetIssuer, string amount, string sourceAssetType, string sourceAssetCode, + string sourceAssetIssuer, string sourceMax, string sourceAmount, IEnumerable path) + { + From = from; + To = to; + AssetCode = assetCode; + AssetIssuer = assetIssuer; + AssetType = assetType; + Amount = amount; + SourceAssetCode = sourceAssetCode; + SourceAssetIssuer = sourceAssetIssuer; + SourceAssetType = sourceAssetType; + SourceMax = sourceMax; + SourceAmount = sourceAmount; + Path = path; + } + + public override int TypeId => 2; + + /// + /// Account address that is sending the payment. + /// + [JsonProperty(PropertyName = "from")] + public string From { get; private set; } + + /// + /// Account address that receives the payment. + /// + [JsonProperty(PropertyName = "to")] + public string To { get; private set; } + + /// + /// The destination asset code (Alpha4, Alpha12, etc.) + /// + [JsonProperty(PropertyName = "asset_code")] + public string AssetCode { get; private set; } + + /// + /// The destination asset issuer account. + /// + [JsonProperty(PropertyName = "asset_issuer")] + public string AssetIssuer { get; private set; } + + /// + /// The destination asset type. (Alpha4, Alpha12, etc.) + /// + [JsonProperty(PropertyName = "asset_type")] + public string AssetType { get; private set; } + + /// + /// The amount of destination asset the destination account receives. + /// + [JsonProperty(PropertyName = "amount")] + public string Amount { get; private set; } + + /// + /// The source asset code. + /// + [JsonProperty(PropertyName = "source_asset_code")] + public string SourceAssetCode { get; private set; } + + /// + /// The source asset issuer account. + /// + [JsonProperty(PropertyName = "source_asset_issuer")] + public string SourceAssetIssuer { get; private set; } + + /// + /// The source asset type. (Alpha4, Alpha12, etc.) + /// + [JsonProperty(PropertyName = "source_asset_type")] + public string SourceAssetType { get; private set; } + + /// + /// The maximum send amount. + /// + [JsonProperty(PropertyName = "source_max")] + public string SourceMax { get; private set; } + + /// + /// The amount sent. + /// + [JsonProperty(PropertyName = "source_amount")] + public string SourceAmount { get; private set; } + + /// + /// Additional hops the operation went through to get to the destination asset + /// + [JsonProperty(PropertyName = "path")] + public IEnumerable Path { get; private set; } + + /// + /// Destination Asset + /// + public Asset DestinationAsset => Asset.CreateNonNativeAsset(AssetType, AssetIssuer, AssetCode); + + /// + /// Source Asset + /// + public Asset SourceAsset => Asset.CreateNonNativeAsset(SourceAssetType, SourceAssetIssuer, SourceAssetCode); + } +} diff --git a/stellar-dotnet-sdk/responses/operations/PathPaymentStrictSendOperationResponse.cs b/stellar-dotnet-sdk/responses/operations/PathPaymentStrictSendOperationResponse.cs new file mode 100644 index 000000000..46f612e5a --- /dev/null +++ b/stellar-dotnet-sdk/responses/operations/PathPaymentStrictSendOperationResponse.cs @@ -0,0 +1,136 @@ +using Newtonsoft.Json; +using System.Collections.Generic; + +namespace stellar_dotnet_sdk.responses.operations +{ + /// + /// + /// A path payment strict send operation represents a payment from one account to another through a path. This type of payment starts as one type of asset and ends as another type of asset. + /// See: https://www.stellar.org/developers/horizon/reference/resources/operation.html#path-payment-strict-send + /// + /// + /// + public class PathPaymentStrictSendOperationResponse : OperationResponse + { + public PathPaymentStrictSendOperationResponse() + { + + } + + /// + /// Sends an amount in a specific asset to a destination account through a path of offers. This allows the asset sent (e.g., 450 XLM) to be different from the asset received (e.g, 6 BTC). + /// + /// Account address that is sending the payment. + /// Account address that receives the payment. + /// Destination asset type. (Alpha4, Alpha12, etc.) + /// Destination asset code. + /// Destination asset issuer account + /// The amount of destination asset the destination account receives. + /// Source asset type. (Alpha4, Alpha12, etc.) + /// Source asset code. + /// Source asset issuer account. + /// The amount of source asset deducted from senders account. + /// The minimum amount of destination asset expected to be received. + /// Additional hops the operation went through to get to the destination asset. + public PathPaymentStrictSendOperationResponse(string from, string to, string assetType, string assetCode, string assetIssuer, string amount, string sourceAssetType, string sourceAssetCode, + string sourceAssetIssuer, string sourceAmount, string destinationMin, IEnumerable path) + { + From = from; + To = to; + AssetType = assetType; + AssetCode = assetCode; + AssetIssuer = assetIssuer; + Amount = amount; + SourceAssetType = sourceAssetType; + SourceAssetCode = sourceAssetCode; + SourceAssetIssuer = sourceAssetIssuer; + SourceAmount = sourceAmount; + DestinationMin = destinationMin; + Path = path; + } + + public override int TypeId => 13; + + /// + /// Account address that is sending the payment. + /// + [JsonProperty(PropertyName = "from")] + public string From { get; private set; } + + /// + /// Account address that receives the payment. + /// + [JsonProperty(PropertyName = "to")] + public string To { get; private set; } + + /// + /// The destination asset type. (Alpha4, Alpha12, etc.) + /// + [JsonProperty(PropertyName = "asset_type")] + public string AssetType { get; private set; } + + /// + /// The destination asset code (Alpha4, Alpha12, etc.) + /// + [JsonProperty(PropertyName = "asset_code")] + public string AssetCode { get; private set; } + + /// + /// The destination asset issuer account. + /// + [JsonProperty(PropertyName = "asset_issuer")] + public string AssetIssuer { get; private set; } + + /// + /// The amount of destination asset the destination account receives. + /// + [JsonProperty(PropertyName = "amount")] + public string Amount { get; private set; } + + /// + /// The source asset type. (Alpha4, Alpha12, etc.) + /// + [JsonProperty(PropertyName = "source_asset_type")] + public string SourceAssetType { get; private set; } + + /// + /// The source asset code. + /// + [JsonProperty(PropertyName = "source_asset_code")] + public string SourceAssetCode { get; private set; } + + /// + /// The source asset issuer account. + /// + [JsonProperty(PropertyName = "source_asset_issuer")] + public string SourceAssetIssuer { get; private set; } + + /// + /// The amount sent. + /// + [JsonProperty(PropertyName = "source_amount")] + public string SourceAmount { get; private set; } + + /// + /// The maximum send amount. + /// + [JsonProperty(PropertyName = "destination_min")] + public string DestinationMin { get; private set; } + + /// + /// Additional hops the operation went through to get to the destination asset + /// + [JsonProperty(PropertyName = "path")] + public IEnumerable Path { get; private set; } + + /// + /// Destination Asset + /// + public Asset DestinationAsset => Asset.CreateNonNativeAsset(AssetType, AssetIssuer, AssetCode); + + /// + /// Source Asset + /// + public Asset SourceAsset => Asset.CreateNonNativeAsset(SourceAssetType, SourceAssetIssuer, SourceAssetCode); + } +}