4
1
mirror of https://github.com/Qortal/qortal-ui.git synced 2025-02-12 10:15:50 +00:00
qortal-ui/crypto/api/transactions/PublicizeTransaction.js

29 lines
587 B
JavaScript
Raw Normal View History

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