public static void Encode(XdrDataOutputStream stream, FeeBumpTransaction encodedFeeBumpTransaction) { MuxedAccount.Encode(stream, encodedFeeBumpTransaction.FeeSource); Int64.Encode(stream, encodedFeeBumpTransaction.Fee); FeeBumpTransactionInnerTx.Encode(stream, encodedFeeBumpTransaction.InnerTx); FeeBumpTransactionExt.Encode(stream, encodedFeeBumpTransaction.Ext); }
public static void Encode(XdrDataOutputStream stream, Operation encodedOperation) { if (encodedOperation.SourceAccount != null) { stream.WriteInt(1); MuxedAccount.Encode(stream, encodedOperation.SourceAccount); } else { stream.WriteInt(0); } OperationBody.Encode(stream, encodedOperation.Body); }
public static void Encode(XdrDataOutputStream stream, PathPaymentStrictSendOp encodedPathPaymentStrictSendOp) { Asset.Encode(stream, encodedPathPaymentStrictSendOp.SendAsset); Int64.Encode(stream, encodedPathPaymentStrictSendOp.SendAmount); MuxedAccount.Encode(stream, encodedPathPaymentStrictSendOp.Destination); Asset.Encode(stream, encodedPathPaymentStrictSendOp.DestAsset); Int64.Encode(stream, encodedPathPaymentStrictSendOp.DestMin); int pathsize = encodedPathPaymentStrictSendOp.Path.Length; stream.WriteInt(pathsize); for (int i = 0; i < pathsize; i++) { Asset.Encode(stream, encodedPathPaymentStrictSendOp.Path[i]); } }
public static void Encode(XdrDataOutputStream stream, Transaction encodedTransaction) { MuxedAccount.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); }
public static void Encode(XdrDataOutputStream stream, PaymentOp encodedPaymentOp) { MuxedAccount.Encode(stream, encodedPaymentOp.Destination); Asset.Encode(stream, encodedPaymentOp.Asset); Int64.Encode(stream, encodedPaymentOp.Amount); }
public static void Encode(XdrDataOutputStream stream, OperationIDId encodedOperationIDId) { MuxedAccount.Encode(stream, encodedOperationIDId.SourceAccount); SequenceNumber.Encode(stream, encodedOperationIDId.SeqNum); Uint32.Encode(stream, encodedOperationIDId.OpNum); }
public static void Encode(XdrDataOutputStream stream, OperationBody encodedOperationBody) { stream.WriteInt((int)encodedOperationBody.Discriminant.InnerValue); switch (encodedOperationBody.Discriminant.InnerValue) { case OperationType.OperationTypeEnum.CREATE_ACCOUNT: CreateAccountOp.Encode(stream, encodedOperationBody.CreateAccountOp); break; case OperationType.OperationTypeEnum.PAYMENT: PaymentOp.Encode(stream, encodedOperationBody.PaymentOp); break; case OperationType.OperationTypeEnum.PATH_PAYMENT_STRICT_RECEIVE: PathPaymentStrictReceiveOp.Encode(stream, encodedOperationBody.PathPaymentStrictReceiveOp); break; case OperationType.OperationTypeEnum.MANAGE_SELL_OFFER: ManageSellOfferOp.Encode(stream, encodedOperationBody.ManageSellOfferOp); break; case OperationType.OperationTypeEnum.CREATE_PASSIVE_SELL_OFFER: CreatePassiveSellOfferOp.Encode(stream, encodedOperationBody.CreatePassiveSellOfferOp); break; case OperationType.OperationTypeEnum.SET_OPTIONS: SetOptionsOp.Encode(stream, encodedOperationBody.SetOptionsOp); break; case OperationType.OperationTypeEnum.CHANGE_TRUST: ChangeTrustOp.Encode(stream, encodedOperationBody.ChangeTrustOp); break; case OperationType.OperationTypeEnum.ALLOW_TRUST: AllowTrustOp.Encode(stream, encodedOperationBody.AllowTrustOp); break; case OperationType.OperationTypeEnum.ACCOUNT_MERGE: MuxedAccount.Encode(stream, encodedOperationBody.Destination); break; case OperationType.OperationTypeEnum.INFLATION: break; case OperationType.OperationTypeEnum.MANAGE_DATA: ManageDataOp.Encode(stream, encodedOperationBody.ManageDataOp); break; case OperationType.OperationTypeEnum.BUMP_SEQUENCE: BumpSequenceOp.Encode(stream, encodedOperationBody.BumpSequenceOp); break; case OperationType.OperationTypeEnum.MANAGE_BUY_OFFER: ManageBuyOfferOp.Encode(stream, encodedOperationBody.ManageBuyOfferOp); break; case OperationType.OperationTypeEnum.PATH_PAYMENT_STRICT_SEND: PathPaymentStrictSendOp.Encode(stream, encodedOperationBody.PathPaymentStrictSendOp); break; case OperationType.OperationTypeEnum.CREATE_CLAIMABLE_BALANCE: CreateClaimableBalanceOp.Encode(stream, encodedOperationBody.CreateClaimableBalanceOp); break; case OperationType.OperationTypeEnum.CLAIM_CLAIMABLE_BALANCE: ClaimClaimableBalanceOp.Encode(stream, encodedOperationBody.ClaimClaimableBalanceOp); break; case OperationType.OperationTypeEnum.BEGIN_SPONSORING_FUTURE_RESERVES: BeginSponsoringFutureReservesOp.Encode(stream, encodedOperationBody.BeginSponsoringFutureReservesOp); break; case OperationType.OperationTypeEnum.END_SPONSORING_FUTURE_RESERVES: break; case OperationType.OperationTypeEnum.REVOKE_SPONSORSHIP: RevokeSponsorshipOp.Encode(stream, encodedOperationBody.RevokeSponsorshipOp); break; } }