@hashgraph/sdk
Version:
3 lines (2 loc) • 1.02 kB
JavaScript
import t,{TRANSACTION_REGISTRY as o}from"../transaction/Transaction.js";import e from"./TopicId.js";class i extends t{constructor(t={}){super(),this._topicId=null,null!=t.topicId&&this.setTopicId(t.topicId)}static _fromProtobuf(o,s,r,n,c){const a=c[0].consensusDeleteTopic;return t._fromProtobufTransactions(new i({topicId:null!=a.topicID?e._fromProtobuf(a.topicID):void 0}),o,s,r,n,c)}get topicId(){return this._topicId}setTopicId(t){return this._requireNotFrozen(),this._topicId="string"==typeof t?e.fromString(t):t.clone(),this}_validateChecksums(t){null!=this._topicId&&this._topicId.validateChecksum(t)}_execute(t,o){return t.consensus.deleteTopic(o)}_getTransactionDataCase(){return"consensusDeleteTopic"}_makeTransactionData(){return{topicID:null!=this._topicId?this._topicId._toProtobuf():null}}_getLogId(){return`TopicDeleteTransaction:${this._transactionIds.current.validStart.toString()}`}}o.set("consensusDeleteTopic",i._fromProtobuf);export{i as default};
//# sourceMappingURL=TopicDeleteTransaction.js.map