public static string EncodeSignedTransaction(byte[] sig, byte[] binaryTx)
        {
            RLPEncoder enc = new RLPEncoder();

            enc.AddInt(Constants.SerializationTags.OBJECT_TAG_SIGNED_TRANSACTION);
            enc.AddInt(Constants.SerializationTags.VSN);
            RLPEncoder sublist = new RLPEncoder();

            sublist.AddByteArray(sig);
            enc.AddList(sublist);
            enc.AddByteArray(binaryTx);
            return(EncodeCheck(enc.Encode(), Constants.ApiIdentifiers.TRANSACTION));
        }
 public static string EncodeContractId(string publickey, ulong nonce)
 {
     return(HashEncode(DecodeCheckWithIdentifier(publickey).Concatenate(RLPEncoder.CheckZeroAndWriteValue(nonce)), Constants.ApiIdentifiers.CONTRACT_PUBKEY));
 }
Example #3
0
 public void AddList(RLPEncoder list)
 {
     acc.Add(RLP.EncodeList(list.acc.ToArray()));
 }