UNPKG

@hashgraph/sdk

Version:
3 lines (2 loc) 1.31 kB
import t,{TRANSACTION_REGISTRY as e}from"../transaction/Transaction.js";import s from"./AccountId.js";class a extends t{constructor(t={}){super(),this._hash=null,this._accountId=null,null!=t.hash&&this.setHash(t.hash),null!=t.accountId&&this.setAccountId(t.accountId)}static _fromProtobuf(e,o,n,r,c){const h=c[0].cryptoDeleteLiveHash;return t._fromProtobufTransactions(new a({hash:null!=h.liveHashToDelete?h.liveHashToDelete:void 0,accountId:null!=h.accountOfLiveHash?s._fromProtobuf(h.accountOfLiveHash):void 0}),e,o,n,r,c)}get hash(){return this._hash}setHash(t){return this._requireNotFrozen(),this._hash=t,this}get accountId(){return this._accountId}setAccountId(t){return this._requireNotFrozen(),this._accountId="string"==typeof t?s.fromString(t):t.clone(),this}_validateChecksums(t){null!=this._accountId&&this._accountId.validateChecksum(t)}_execute(t,e){return t.crypto.deleteLiveHash(e)}_getTransactionDataCase(){return"cryptoDeleteLiveHash"}_makeTransactionData(){return{liveHashToDelete:this._hash,accountOfLiveHash:null!=this._accountId?this._accountId._toProtobuf():null}}_getLogId(){return`LiveHashDeleteTransaction:${this._transactionIds.current.validStart.toString()}`}}e.set("cryptoDeleteLiveHash",a._fromProtobuf);export{a as default}; //# sourceMappingURL=LiveHashDeleteTransaction.js.map