@hashgraph/sdk
Version:
3 lines (2 loc) • 1.59 kB
JavaScript
import t from"./AccountId.js";import n,{TRANSACTION_REGISTRY as r}from"../transaction/Transaction.js";class c extends n{constructor(t={}){super(),this._accountId=null,this._transferAccountId=null,null!=t.accountId&&this.setAccountId(t.accountId),null!=t.transferAccountId&&this.setTransferAccountId(t.transferAccountId)}static _fromProtobuf(r,o,e,u,s){const a=s[0].cryptoDelete;return n._fromProtobufTransactions(new c({accountId:null!=a.deleteAccountID?t._fromProtobuf(a.deleteAccountID):void 0,transferAccountId:null!=a.transferAccountID?t._fromProtobuf(a.transferAccountID):void 0}),r,o,e,u,s)}get accountId(){return this._accountId}setAccountId(n){return this._requireNotFrozen(),this._accountId="string"==typeof n?t.fromString(n):n.clone(),this}get transferAccountId(){return this._transferAccountId}setTransferAccountId(n){return this._requireNotFrozen(),this._transferAccountId="string"==typeof n?t.fromString(n):n.clone(),this}_validateChecksums(t){null!=this._accountId&&this._accountId.validateChecksum(t),null!=this._transferAccountId&&this._transferAccountId.validateChecksum(t)}_execute(t,n){return t.crypto.cryptoDelete(n)}_getTransactionDataCase(){return"cryptoDelete"}_makeTransactionData(){return{deleteAccountID:null!=this._accountId?this._accountId._toProtobuf():null,transferAccountID:null!=this._transferAccountId?this._transferAccountId._toProtobuf():null}}_getLogId(){return`AccountDeleteTransaction:${this._transactionIds.current.validStart.toString()}`}}r.set("cryptoDelete",c._fromProtobuf);export{c as default};
//# sourceMappingURL=AccountDeleteTransaction.js.map