Beispiel #1
0
        public static PathPaymentStrictReceiveResult Decode(XdrDataInputStream stream)
        {
            PathPaymentStrictReceiveResult     decodedPathPaymentStrictReceiveResult = new PathPaymentStrictReceiveResult();
            PathPaymentStrictReceiveResultCode discriminant = PathPaymentStrictReceiveResultCode.Decode(stream);

            decodedPathPaymentStrictReceiveResult.Discriminant = discriminant;
            switch (decodedPathPaymentStrictReceiveResult.Discriminant.InnerValue)
            {
            case PathPaymentStrictReceiveResultCode.PathPaymentStrictReceiveResultCodeEnum
                .PATH_PAYMENT_STRICT_RECEIVE_SUCCESS:
                decodedPathPaymentStrictReceiveResult.Success =
                    PathPaymentStrictReceiveResultSuccess.Decode(stream);
                break;

            case PathPaymentStrictReceiveResultCode.PathPaymentStrictReceiveResultCodeEnum
                .PATH_PAYMENT_STRICT_RECEIVE_NO_ISSUER:
                decodedPathPaymentStrictReceiveResult.NoIssuer = Asset.Decode(stream);
                break;

            default:
                break;
            }

            return(decodedPathPaymentStrictReceiveResult);
        }
        public static ChangeTrustOp Decode(XdrDataInputStream stream)
        {
            ChangeTrustOp decodedChangeTrustOp = new ChangeTrustOp();

            decodedChangeTrustOp.Line  = Asset.Decode(stream);
            decodedChangeTrustOp.Limit = Int64.Decode(stream);
            return(decodedChangeTrustOp);
        }
        public static SimplePaymentResult Decode(XdrDataInputStream stream)
        {
            SimplePaymentResult decodedSimplePaymentResult = new SimplePaymentResult();

            decodedSimplePaymentResult.Destination = AccountID.Decode(stream);
            decodedSimplePaymentResult.Asset       = Asset.Decode(stream);
            decodedSimplePaymentResult.Amount      = Int64.Decode(stream);
            return(decodedSimplePaymentResult);
        }
Beispiel #4
0
        public static PaymentOp Decode(XdrDataInputStream stream)
        {
            PaymentOp decodedPaymentOp = new PaymentOp();

            decodedPaymentOp.Destination = MuxedAccount.Decode(stream);
            decodedPaymentOp.Asset       = Asset.Decode(stream);
            decodedPaymentOp.Amount      = Int64.Decode(stream);
            return(decodedPaymentOp);
        }
        public static ClawbackOp Decode(XdrDataInputStream stream)
        {
            ClawbackOp decodedClawbackOp = new ClawbackOp();

            decodedClawbackOp.Asset  = Asset.Decode(stream);
            decodedClawbackOp.From   = MuxedAccount.Decode(stream);
            decodedClawbackOp.Amount = Int64.Decode(stream);
            return(decodedClawbackOp);
        }
        public static CreatePassiveSellOfferOp Decode(XdrDataInputStream stream)
        {
            CreatePassiveSellOfferOp decodedCreatePassiveSellOfferOp = new CreatePassiveSellOfferOp();

            decodedCreatePassiveSellOfferOp.Selling = Asset.Decode(stream);
            decodedCreatePassiveSellOfferOp.Buying  = Asset.Decode(stream);
            decodedCreatePassiveSellOfferOp.Amount  = Int64.Decode(stream);
            decodedCreatePassiveSellOfferOp.Price   = Price.Decode(stream);
            return(decodedCreatePassiveSellOfferOp);
        }
        public static SetTrustLineFlagsOp Decode(XdrDataInputStream stream)
        {
            SetTrustLineFlagsOp decodedSetTrustLineFlagsOp = new SetTrustLineFlagsOp();

            decodedSetTrustLineFlagsOp.Trustor    = AccountID.Decode(stream);
            decodedSetTrustLineFlagsOp.Asset      = Asset.Decode(stream);
            decodedSetTrustLineFlagsOp.ClearFlags = Uint32.Decode(stream);
            decodedSetTrustLineFlagsOp.SetFlags   = Uint32.Decode(stream);
            return(decodedSetTrustLineFlagsOp);
        }
        public static ManageSellOfferOp Decode(XdrDataInputStream stream)
        {
            ManageSellOfferOp decodedManageSellOfferOp = new ManageSellOfferOp();

            decodedManageSellOfferOp.Selling = Asset.Decode(stream);
            decodedManageSellOfferOp.Buying  = Asset.Decode(stream);
            decodedManageSellOfferOp.Amount  = Int64.Decode(stream);
            decodedManageSellOfferOp.Price   = Price.Decode(stream);
            decodedManageSellOfferOp.OfferID = Int64.Decode(stream);
            return(decodedManageSellOfferOp);
        }
Beispiel #9
0
        public static TrustLineEntry Decode(XdrDataInputStream stream)
        {
            TrustLineEntry decodedTrustLineEntry = new TrustLineEntry();

            decodedTrustLineEntry.AccountID = AccountID.Decode(stream);
            decodedTrustLineEntry.Asset     = Asset.Decode(stream);
            decodedTrustLineEntry.Balance   = Int64.Decode(stream);
            decodedTrustLineEntry.Limit     = Int64.Decode(stream);
            decodedTrustLineEntry.Flags     = Uint32.Decode(stream);
            decodedTrustLineEntry.Ext       = TrustLineEntryExt.Decode(stream);
            return(decodedTrustLineEntry);
        }
Beispiel #10
0
        public static ClaimOfferAtom Decode(XdrDataInputStream stream)
        {
            ClaimOfferAtom decodedClaimOfferAtom = new ClaimOfferAtom();

            decodedClaimOfferAtom.SellerID     = AccountID.Decode(stream);
            decodedClaimOfferAtom.OfferID      = Int64.Decode(stream);
            decodedClaimOfferAtom.AssetSold    = Asset.Decode(stream);
            decodedClaimOfferAtom.AmountSold   = Int64.Decode(stream);
            decodedClaimOfferAtom.AssetBought  = Asset.Decode(stream);
            decodedClaimOfferAtom.AmountBought = Int64.Decode(stream);
            return(decodedClaimOfferAtom);
        }
Beispiel #11
0
        public static OfferEntry Decode(XdrDataInputStream stream)
        {
            OfferEntry decodedOfferEntry = new OfferEntry();

            decodedOfferEntry.SellerID = AccountID.Decode(stream);
            decodedOfferEntry.OfferID  = Int64.Decode(stream);
            decodedOfferEntry.Selling  = Asset.Decode(stream);
            decodedOfferEntry.Buying   = Asset.Decode(stream);
            decodedOfferEntry.Amount   = Int64.Decode(stream);
            decodedOfferEntry.Price    = Price.Decode(stream);
            decodedOfferEntry.Flags    = Uint32.Decode(stream);
            decodedOfferEntry.Ext      = OfferEntryExt.Decode(stream);
            return(decodedOfferEntry);
        }
Beispiel #12
0
        public static CreateClaimableBalanceOp Decode(XdrDataInputStream stream)
        {
            CreateClaimableBalanceOp decodedCreateClaimableBalanceOp = new CreateClaimableBalanceOp();

            decodedCreateClaimableBalanceOp.Asset  = Asset.Decode(stream);
            decodedCreateClaimableBalanceOp.Amount = Int64.Decode(stream);
            int claimantssize = stream.ReadInt();

            decodedCreateClaimableBalanceOp.Claimants = new Claimant[claimantssize];
            for (int i = 0; i < claimantssize; i++)
            {
                decodedCreateClaimableBalanceOp.Claimants[i] = Claimant.Decode(stream);
            }
            return(decodedCreateClaimableBalanceOp);
        }
        public static ClaimableBalanceEntry Decode(XdrDataInputStream stream)
        {
            ClaimableBalanceEntry decodedClaimableBalanceEntry = new ClaimableBalanceEntry();

            decodedClaimableBalanceEntry.BalanceID = ClaimableBalanceID.Decode(stream);
            int claimantssize = stream.ReadInt();

            decodedClaimableBalanceEntry.Claimants = new Claimant[claimantssize];
            for (int i = 0; i < claimantssize; i++)
            {
                decodedClaimableBalanceEntry.Claimants[i] = Claimant.Decode(stream);
            }
            decodedClaimableBalanceEntry.Asset  = Asset.Decode(stream);
            decodedClaimableBalanceEntry.Amount = Int64.Decode(stream);
            decodedClaimableBalanceEntry.Ext    = ClaimableBalanceEntryExt.Decode(stream);
            return(decodedClaimableBalanceEntry);
        }
        public static PathPaymentStrictReceiveOp Decode(XdrDataInputStream stream)
        {
            PathPaymentStrictReceiveOp decodedPathPaymentStrictReceiveOp = new PathPaymentStrictReceiveOp();

            decodedPathPaymentStrictReceiveOp.SendAsset   = Asset.Decode(stream);
            decodedPathPaymentStrictReceiveOp.SendMax     = Int64.Decode(stream);
            decodedPathPaymentStrictReceiveOp.Destination = AccountID.Decode(stream);
            decodedPathPaymentStrictReceiveOp.DestAsset   = Asset.Decode(stream);
            decodedPathPaymentStrictReceiveOp.DestAmount  = Int64.Decode(stream);
            int pathsize = stream.ReadInt();

            decodedPathPaymentStrictReceiveOp.Path = new Asset[pathsize];
            for (int i = 0; i < pathsize; i++)
            {
                decodedPathPaymentStrictReceiveOp.Path[i] = Asset.Decode(stream);
            }
            return(decodedPathPaymentStrictReceiveOp);
        }