public static String64 Decode(IByteReader stream) { String64 decodedString64 = new String64(); decodedString64.InnerValue = XdrEncoding.ReadString(stream); return(decodedString64); }
public static String32 Decode(IByteReader stream) { String32 decodedString32 = new String32(); decodedString32.InnerValue = XdrEncoding.ReadString(stream); return(decodedString32); }
public static Memo Decode(IByteReader stream) { Memo decodedMemo = new Memo(); decodedMemo.Discriminant = MemoType.Decode(stream); switch (decodedMemo.Discriminant.InnerValue) { case MemoType.MemoTypeEnum.MEMO_NONE: break; case MemoType.MemoTypeEnum.MEMO_TEXT: decodedMemo.Text = XdrEncoding.ReadString(stream); break; case MemoType.MemoTypeEnum.MEMO_ID: decodedMemo.Id = Uint64.Decode(stream); break; case MemoType.MemoTypeEnum.MEMO_HASH: decodedMemo.Hash = Hash.Decode(stream); break; case MemoType.MemoTypeEnum.MEMO_RETURN: decodedMemo.RetHash = Hash.Decode(stream); break; } return(decodedMemo); }
public static Error Decode(IByteReader stream) { Error decodedError = new Error(); decodedError.Code = ErrorCode.Decode(stream); decodedError.Msg = XdrEncoding.ReadString(stream); return(decodedError); }
public static Hello Decode(IByteReader stream) { Hello decodedHello = new Hello(); decodedHello.LedgerVersion = Uint32.Decode(stream); decodedHello.OverlayVersion = Uint32.Decode(stream); decodedHello.OverlayMinVersion = Uint32.Decode(stream); decodedHello.NetworkID = Hash.Decode(stream); decodedHello.VersionStr = XdrEncoding.ReadString(stream); decodedHello.ListeningPort = XdrEncoding.DecodeInt32(stream); decodedHello.PeerID = NodeID.Decode(stream); decodedHello.Cert = AuthCert.Decode(stream); decodedHello.Nonce = Uint256.Decode(stream); return(decodedHello); }