Example #1
0
        public static FeeBumpTransactionEnvelope Decode(XdrDataInputStream stream)
        {
            FeeBumpTransactionEnvelope decodedFeeBumpTransactionEnvelope = new FeeBumpTransactionEnvelope();

            decodedFeeBumpTransactionEnvelope.Tx = FeeBumpTransaction.Decode(stream);
            int signaturessize = stream.ReadInt();

            decodedFeeBumpTransactionEnvelope.Signatures = new DecoratedSignature[signaturessize];
            for (int i = 0; i < signaturessize; i++)
            {
                decodedFeeBumpTransactionEnvelope.Signatures[i] = DecoratedSignature.Decode(stream);
            }
            return(decodedFeeBumpTransactionEnvelope);
        }
Example #2
0
            public static TransactionSignaturePayloadTaggedTransaction Decode(XdrDataInputStream stream)
            {
                TransactionSignaturePayloadTaggedTransaction decodedTransactionSignaturePayloadTaggedTransaction = new TransactionSignaturePayloadTaggedTransaction();
                EnvelopeType discriminant = EnvelopeType.Decode(stream);

                decodedTransactionSignaturePayloadTaggedTransaction.Discriminant = discriminant;
                switch (decodedTransactionSignaturePayloadTaggedTransaction.Discriminant.InnerValue)
                {
                case EnvelopeType.EnvelopeTypeEnum.ENVELOPE_TYPE_TX:
                    decodedTransactionSignaturePayloadTaggedTransaction.Tx = Transaction.Decode(stream);
                    break;

                case EnvelopeType.EnvelopeTypeEnum.ENVELOPE_TYPE_TX_FEE_BUMP:
                    decodedTransactionSignaturePayloadTaggedTransaction.FeeBump = FeeBumpTransaction.Decode(stream);
                    break;
                }
                return(decodedTransactionSignaturePayloadTaggedTransaction);
            }