Example #1
0
        public static ClaimClaimableBalanceOp Decode(XdrDataInputStream stream)
        {
            ClaimClaimableBalanceOp decodedClaimClaimableBalanceOp = new ClaimClaimableBalanceOp();

            decodedClaimClaimableBalanceOp.BalanceID = ClaimableBalanceID.Decode(stream);
            return(decodedClaimClaimableBalanceOp);
        }
Example #2
0
            public static LedgerKeyClaimableBalance Decode(XdrDataInputStream stream)
            {
                LedgerKeyClaimableBalance decodedLedgerKeyClaimableBalance = new LedgerKeyClaimableBalance();

                decodedLedgerKeyClaimableBalance.BalanceID = ClaimableBalanceID.Decode(stream);
                return(decodedLedgerKeyClaimableBalance);
            }
 public static void Encode(XdrDataOutputStream stream, ClaimableBalanceID encodedClaimableBalanceID)
 {
     stream.WriteInt((int)encodedClaimableBalanceID.Discriminant.InnerValue);
     switch (encodedClaimableBalanceID.Discriminant.InnerValue)
     {
     case ClaimableBalanceIDType.ClaimableBalanceIDTypeEnum.CLAIMABLE_BALANCE_ID_TYPE_V0:
         Hash.Encode(stream, encodedClaimableBalanceID.V0);
         break;
     }
 }
Example #4
0
        public static void Encode(XdrDataOutputStream stream, CreateClaimableBalanceResult encodedCreateClaimableBalanceResult)
        {
            stream.WriteInt((int)encodedCreateClaimableBalanceResult.Discriminant.InnerValue);
            switch (encodedCreateClaimableBalanceResult.Discriminant.InnerValue)
            {
            case CreateClaimableBalanceResultCode.CreateClaimableBalanceResultCodeEnum.CREATE_CLAIMABLE_BALANCE_SUCCESS:
                ClaimableBalanceID.Encode(stream, encodedCreateClaimableBalanceResult.BalanceID);
                break;

            default:
                break;
            }
        }
        public static void Encode(XdrDataOutputStream stream, ClaimableBalanceEntry encodedClaimableBalanceEntry)
        {
            ClaimableBalanceID.Encode(stream, encodedClaimableBalanceEntry.BalanceID);
            int claimantssize = encodedClaimableBalanceEntry.Claimants.Length;

            stream.WriteInt(claimantssize);
            for (int i = 0; i < claimantssize; i++)
            {
                Claimant.Encode(stream, encodedClaimableBalanceEntry.Claimants[i]);
            }
            Asset.Encode(stream, encodedClaimableBalanceEntry.Asset);
            Int64.Encode(stream, encodedClaimableBalanceEntry.Amount);
            ClaimableBalanceEntryExt.Encode(stream, encodedClaimableBalanceEntry.Ext);
        }
        public static ClaimableBalanceID Decode(XdrDataInputStream stream)
        {
            ClaimableBalanceID     decodedClaimableBalanceID = new ClaimableBalanceID();
            ClaimableBalanceIDType discriminant = ClaimableBalanceIDType.Decode(stream);

            decodedClaimableBalanceID.Discriminant = discriminant;
            switch (decodedClaimableBalanceID.Discriminant.InnerValue)
            {
            case ClaimableBalanceIDType.ClaimableBalanceIDTypeEnum.CLAIMABLE_BALANCE_ID_TYPE_V0:
                decodedClaimableBalanceID.V0 = Hash.Decode(stream);
                break;
            }
            return(decodedClaimableBalanceID);
        }
Example #7
0
        public static CreateClaimableBalanceResult Decode(XdrDataInputStream stream)
        {
            CreateClaimableBalanceResult     decodedCreateClaimableBalanceResult = new CreateClaimableBalanceResult();
            CreateClaimableBalanceResultCode discriminant = CreateClaimableBalanceResultCode.Decode(stream);

            decodedCreateClaimableBalanceResult.Discriminant = discriminant;
            switch (decodedCreateClaimableBalanceResult.Discriminant.InnerValue)
            {
            case CreateClaimableBalanceResultCode.CreateClaimableBalanceResultCodeEnum.CREATE_CLAIMABLE_BALANCE_SUCCESS:
                decodedCreateClaimableBalanceResult.BalanceID = ClaimableBalanceID.Decode(stream);
                break;

            default:
                break;
            }
            return(decodedCreateClaimableBalanceResult);
        }
        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);
        }
Example #9
0
 public static void Encode(XdrDataOutputStream stream, ClaimClaimableBalanceOp encodedClaimClaimableBalanceOp)
 {
     ClaimableBalanceID.Encode(stream, encodedClaimClaimableBalanceOp.BalanceID);
 }
Example #10
0
 public static void Encode(XdrDataOutputStream stream, LedgerKeyClaimableBalance encodedLedgerKeyClaimableBalance)
 {
     ClaimableBalanceID.Encode(stream, encodedLedgerKeyClaimableBalance.BalanceID);
 }