All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.jd.blockchain.ledger.TransactionPermission Maven / Gradle / Ivy

There is a newer version: 1.6.5.RELEASE
Show newest version
package com.jd.blockchain.ledger;

import com.jd.binaryproto.EnumContract;
import com.jd.binaryproto.EnumField;
import com.jd.binaryproto.PrimitiveType;
import com.jd.blockchain.consts.DataCodes;

import utils.Int8Code;

/**
 * TxPermission 交易权限表示一个用户可以发起的交易类型;
 * 
 * @author huanghaiquan
 *
 */
@EnumContract(code = DataCodes.ENUM_TX_PERMISSION)
public enum TransactionPermission implements Int8Code {

	/**
	 * 交易中包含指令操作;
	 */
	DIRECT_OPERATION((byte) 0x01),

	/**
	 * 交易中包含合约操作;
	 */
	CONTRACT_OPERATION((byte) 0x02);

	@EnumField(type = PrimitiveType.INT8)
	public final byte CODE;

	private TransactionPermission(byte code) {
		this.CODE = code;
	}

	@Override
	public byte getCode() {
		return CODE;
	}

}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy