Package-level declarations
Types
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
data class JsonRpcPayload(val jsonRpc: JsonRpcIdentifier = version, val id: JsonRpcId = 1, val method: String, val params: Array<Any>)
Link copied to clipboard
data class JsonRpcResponse<T>(val id: JsonRpcId, val jsonRpc: JsonRpcIdentifier, val result: T?, val error: JsonRpcError?)
Link copied to clipboard
data class Transaction(var number: Long, var parentHash: String, var daemonHash: String, var timestamp: Long = Instant.now().epochSecond, var owner: Address, var linker: Address? = Address(ZERO_LTC_ADDR), val type: TxTypeEnum, var hub: Array<String> = emptyArray(), var code: String? = null, val codeHash: String? = null, var payload: String? = "0x", var amount: Long = 0, var income: Long? = null, var joule: Long = 0, var sign: String? = null, var proofOfWork: String? = null, var version: Int = TxVersionEnum.LATEST.version(), var difficulty: Int? = 0)
交易数据类
Link copied to clipboard
交易类型枚举
Link copied to clipboard
链交易的版本号
Functions
Link copied to clipboard
fun Transaction.calculateTransactionHash(isGM: Boolean = true, useProofOfWork: Boolean = false): String
calculate transaction hash
Link copied to clipboard
fun Transaction.sign(privateKey: String, isGM: Boolean = true, chainId: Int = 1, useProofOfWork: Boolean = false): Pair<String, SignatureData>
签名交易
Link copied to clipboard
convert Transaction to SendTBlock
Link copied to clipboard
Link copied to clipboard