public static TransactionV0 Decode(XdrDataInputStream stream)
        {
            TransactionV0 decodedTransactionV0 = new TransactionV0();

            decodedTransactionV0.SourceAccountEd25519 = Uint256.Decode(stream);
            decodedTransactionV0.Fee    = Uint32.Decode(stream);
            decodedTransactionV0.SeqNum = SequenceNumber.Decode(stream);
            int TimeBoundsPresent = stream.ReadInt();

            if (TimeBoundsPresent != 0)
            {
                decodedTransactionV0.TimeBounds = TimeBounds.Decode(stream);
            }

            decodedTransactionV0.Memo = Memo.Decode(stream);
            int operationssize = stream.ReadInt();

            decodedTransactionV0.Operations = new Operation[operationssize];
            for (int i = 0; i < operationssize; i++)
            {
                decodedTransactionV0.Operations[i] = Operation.Decode(stream);
            }

            decodedTransactionV0.Ext = TransactionV0Ext.Decode(stream);
            return(decodedTransactionV0);
        }
示例#2
0
        public static Transaction Decode(XdrDataInputStream stream)
        {
            Transaction decodedTransaction = new Transaction();

            decodedTransaction.SourceAccount = MuxedAccount.Decode(stream);
            decodedTransaction.Fee           = Uint32.Decode(stream);
            decodedTransaction.SeqNum        = SequenceNumber.Decode(stream);
            int TimeBoundsPresent = stream.ReadInt();

            if (TimeBoundsPresent != 0)
            {
                decodedTransaction.TimeBounds = TimeBounds.Decode(stream);
            }

            decodedTransaction.Memo = Memo.Decode(stream);
            int operationssize = stream.ReadInt();

            decodedTransaction.Operations = new Operation[operationssize];
            for (int i = 0; i < operationssize; i++)
            {
                decodedTransaction.Operations[i] = Operation.Decode(stream);
            }

            decodedTransaction.Ext = TransactionExt.Decode(stream);
            return(decodedTransaction);
        }