public Address Decode(byte[] bytes) { byte[] addr = Rlp.Decode(bytes); return(new Address(addr)); }
public byte[] Encode(Address address) { return(Rlp.Encode(address.Bytes)); }
public AccountState Decode(byte[] bytes) { IList <byte[]> list = Rlp.DecodeList(bytes); return(new AccountState(BigIntegerEncoder.Instance.Decode(list[0]), UnsignedLongEncoder.Instance.Decode(list[1]))); }
public byte[] Encode(AccountState state) { return(Rlp.EncodeList(BigIntegerEncoder.Instance.Encode(state.Balance), UnsignedLongEncoder.Instance.Encode(state.Nonce))); }
public BigInteger Decode(byte[] bytes) { return(new BigInteger(Rlp.Decode(bytes))); }
public byte[] Encode(BigInteger value) { return(Rlp.Encode(value.ToByteArray())); }