@hiero-ledger/sdk
Version:
3 lines (2 loc) • 1.36 kB
JavaScript
import t,{TRANSACTION_REGISTRY as e}from"../transaction/Transaction.js";import r from"../file/FileId.js";import n from"../contract/ContractId.js";class o extends t{constructor(t={}){super(),this._fileId=null,this._contractId=null,null!=t.fileId&&this.setFileId(t.fileId),null!=t.contractId&&this.setContractId(t.contractId)}static _fromProtobuf(e,s,i,l,a){const c=a[0].systemUndelete;return t._fromProtobufTransactions(new o({fileId:null!=c.fileID?r._fromProtobuf(c.fileID):void 0,contractId:null!=c.contractID?n._fromProtobuf(c.contractID):void 0}),e,s,i,l,a)}get fileId(){return this._fileId}setFileId(t){return this._requireNotFrozen(),this._fileId=t instanceof r?t:r.fromString(t),this}get contractId(){return this._contractId}setContractId(t){return this._requireNotFrozen(),this._contractId=t instanceof n?t:n.fromString(t),this}_execute(t,e){return null!=this._fileId?t.file.systemUndelete(e):t.smartContract.systemUndelete(e)}_getTransactionDataCase(){return"systemUndelete"}_makeTransactionData(){return{fileID:null!=this._fileId?this._fileId._toProtobuf():null,contractID:null!=this._contractId?this._contractId._toProtobuf():null}}_getLogId(){return`SystemUndeleteTransaction:${this._transactionIds.current.validStart.toString()}`}}e.set("systemUndelete",o._fromProtobuf);export{o as default};
//# sourceMappingURL=SystemUndeleteTransaction.js.map