Ejemplo n.º 1
0
  public CCommentPayload(String adr, String parent_type, long parentID, String mes)
      throws Exception {
    // Superclass
    super(adr);

    // Parent type
    this.parent_type = parent_type;

    // Parent ID
    this.parentID = parentID;

    // Message
    this.mes = mes;

    // Row ID
    this.comID = UTILS.BASIC.getID();

    // Hash
    hash =
        UTILS.BASIC.hash(this.getHash() + this.parent_type + this.parentID + this.comID + this.mes);

    // Sign
    this.sign();
  }
Ejemplo n.º 2
0
  public CIssueAssetPayload(
      String adr,
      String symbol,
      String title,
      String description,
      String how_buy,
      String how_sell,
      String web_page,
      String pic,
      long days,
      long qty,
      String trans_fee_adr,
      double trans_fee)
      throws Exception {
    super(adr);

    // Symbol
    this.symbol = symbol;

    // Title
    this.title = title;

    // Description
    this.description = description;

    // How to buy
    this.how_buy = how_buy;

    // How to sell
    this.how_sell = how_sell;

    // Web page
    this.web_page = web_page;

    // Pic
    this.pic = pic;

    // Market days
    this.days = days;

    // Qty
    this.qty = qty;

    // Transaction fee address
    this.trans_fee_adr = trans_fee_adr;

    // Transaction fee
    this.trans_fee = trans_fee;

    // Asset ID
    this.assetID = UTILS.BASIC.getID();

    // Hash
    hash =
        UTILS.BASIC.hash(
            this.getHash()
                + this.assetID
                + this.symbol
                + this.title
                + this.description
                + this.how_buy
                + this.how_sell
                + this.web_page
                + this.pic
                + this.days
                + this.qty
                + this.trans_fee_adr
                + UTILS.FORMAT_2.format(this.trans_fee));

    // Sign
    this.sign();
  }