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 #2
0
 public static void Encode(XdrDataOutputStream stream, ClaimableBalanceIDType value)
 {
     stream.WriteInt((int)value.InnerValue);
 }