package org.bdware.sc.commParser;

public class BDLedgerAdapter {
    public Transaction tx;
    public org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction ledgerChain;

    public BDLedgerAdapter(org.bdware.bdledger.api.grpc.pb.CommonProto.Transaction chaintrans) {
        super();
        this.ledgerChain = chaintrans;
        this.tx = new Transaction();
        this.tx.Data = chaintrans.getData().toStringUtf8().getBytes();
        this.tx.SrcID = chaintrans.getFrom().toByteArray();  //本地库中SrcID可以是key
        this.tx.Txid = chaintrans.getHash().toByteArray();
    }
}
