2024-05-08 13:16:23 +02:00
|
|
|
import ChatBase from './chat/ChatBase'
|
2024-05-10 18:00:47 +02:00
|
|
|
import { QORT_DECIMALS } from '../constants'
|
2021-12-25 14:39:47 +01:00
|
|
|
|
|
|
|
export default class PublicizeTransaction extends ChatBase {
|
2023-01-13 09:52:14 +01:00
|
|
|
constructor() {
|
|
|
|
super()
|
|
|
|
this.type = 19
|
|
|
|
this.fee = 0
|
|
|
|
}
|
2021-12-25 14:39:47 +01:00
|
|
|
|
2024-05-10 18:00:47 +02:00
|
|
|
set proofOfWorkNonce(proofOfWorkNonce) {
|
|
|
|
this._proofOfWorkNonce = this.constructor.utils.int32ToBytes(proofOfWorkNonce)
|
|
|
|
}
|
2024-05-08 13:16:23 +02:00
|
|
|
|
2024-05-10 18:00:47 +02:00
|
|
|
set fee(fee) {
|
|
|
|
this._fee = fee * QORT_DECIMALS
|
|
|
|
this._feeBytes = this.constructor.utils.int64ToBytes(this._fee)
|
|
|
|
}
|
2024-05-08 13:16:23 +02:00
|
|
|
|
2024-05-10 18:00:47 +02:00
|
|
|
get params() {
|
|
|
|
const params = super.params
|
|
|
|
params.push(
|
|
|
|
this._proofOfWorkNonce,
|
|
|
|
this._feeBytes
|
|
|
|
)
|
|
|
|
return params
|
|
|
|
}
|
2021-12-25 14:39:47 +01:00
|
|
|
}
|