Beispiel #1
0
        public static void Encode(IByteWriter stream, AccountEntry encodedAccountEntry)
        {
            AccountID.Encode(stream, encodedAccountEntry.AccountID);
            Int64.Encode(stream, encodedAccountEntry.Balance);
            SequenceNumber.Encode(stream, encodedAccountEntry.SeqNum);
            Uint32.Encode(stream, encodedAccountEntry.NumSubEntries);
            if (encodedAccountEntry.InflationDest != null)
            {
                XdrEncoding.EncodeInt32(1, stream);
                AccountID.Encode(stream, encodedAccountEntry.InflationDest);
            }
            else
            {
                XdrEncoding.EncodeInt32(0, stream);
            }
            Uint32.Encode(stream, encodedAccountEntry.Flags);
            String32.Encode(stream, encodedAccountEntry.HomeDomain);
            Thresholds.Encode(stream, encodedAccountEntry.Thresholds);
            int signerssize = encodedAccountEntry.Signers.Length;

            XdrEncoding.EncodeInt32(signerssize, stream);
            for (int i = 0; i < signerssize; i++)
            {
                Signer.Encode(stream, encodedAccountEntry.Signers[i]);
            }
            AccountEntryExt.Encode(stream, encodedAccountEntry.Ext);
        }
        public static void Encode(XdrDataOutputStream stream, AccountEntry encodedAccountEntry)
        {
            AccountID.Encode(stream, encodedAccountEntry.AccountID);
            Int64.Encode(stream, encodedAccountEntry.Balance);
            SequenceNumber.Encode(stream, encodedAccountEntry.SeqNum);
            Uint32.Encode(stream, encodedAccountEntry.NumSubEntries);

            if (encodedAccountEntry.InflationDest != null)
            {
                stream.WriteInt(1);
                AccountID.Encode(stream, encodedAccountEntry.InflationDest);
            }
            else
            {
                stream.WriteInt(0);
            }

            Uint32.Encode(stream, encodedAccountEntry.Flags);
            String32.Encode(stream, encodedAccountEntry.HomeDomain);
            Thresholds.Encode(stream, encodedAccountEntry.Thresholds);
            int signerssize = encodedAccountEntry.Signers.Length;

            stream.WriteInt(signerssize);

            for (int i = 0; i < signerssize; i++)
            {
                Signer.Encode(stream, encodedAccountEntry.Signers[i]);
            }

            AccountEntryExt.Encode(stream, encodedAccountEntry.Ext);
        }
        public static void Encode(XdrDataOutputStream stream, Transaction encodedTransaction)
        {
            AccountID.Encode(stream, encodedTransaction.SourceAccount);
            Uint32.Encode(stream, encodedTransaction.Fee);
            SequenceNumber.Encode(stream, encodedTransaction.SeqNum);

            if (encodedTransaction.TimeBounds != null)
            {
                stream.WriteInt(1);
                TimeBounds.Encode(stream, encodedTransaction.TimeBounds);
            }
            else
            {
                stream.WriteInt(0);
            }

            Memo.Encode(stream, encodedTransaction.Memo);
            int operationssize = encodedTransaction.Operations.Length;

            stream.WriteInt(operationssize);

            for (int i = 0; i < operationssize; i++)
            {
                Operation.Encode(stream, encodedTransaction.Operations[i]);
            }

            TransactionExt.Encode(stream, encodedTransaction.Ext);
        }
Beispiel #4
0
        public static void Encode(IByteWriter stream, Transaction encodedTransaction)
        {
            AccountID.Encode(stream, encodedTransaction.SourceAccount);
            Uint32.Encode(stream, encodedTransaction.Fee);
            SequenceNumber.Encode(stream, encodedTransaction.SeqNum);
            if (encodedTransaction.TimeBounds != null)
            {
                XdrEncoding.EncodeInt32(1, stream);
                TimeBounds.Encode(stream, encodedTransaction.TimeBounds);
            }
            else
            {
                XdrEncoding.EncodeInt32(0, stream);
            }
            Memo.Encode(stream, encodedTransaction.Memo);
            int operationssize = encodedTransaction.Operations.Length;

            XdrEncoding.EncodeInt32(operationssize, stream);
            for (int i = 0; i < operationssize; i++)
            {
                Operation.Encode(stream, encodedTransaction.Operations[i]);
            }
            TransactionExt.Encode(stream, encodedTransaction.Ext);
        }
 public static void Encode(XdrDataOutputStream stream, BumpSequenceOp encodedBumpSequenceOp)
 {
     SequenceNumber.Encode(stream, encodedBumpSequenceOp.BumpTo);
 }
 public static void Encode(XdrDataOutputStream stream, OperationIDId encodedOperationIDId)
 {
     MuxedAccount.Encode(stream, encodedOperationIDId.SourceAccount);
     SequenceNumber.Encode(stream, encodedOperationIDId.SeqNum);
     Uint32.Encode(stream, encodedOperationIDId.OpNum);
 }