@hashgraph/sdk
Version:
3 lines (2 loc) • 989 B
JavaScript
import t from"./TokenId.js";import e,{TRANSACTION_REGISTRY as o}from"../transaction/Transaction.js";class n extends e{constructor(t={}){super(),this._tokenId=null,null!=t.tokenId&&this.setTokenId(t.tokenId)}static _fromProtobuf(o,r,s,i,a){const k=a[0].tokenDeletion;return e._fromProtobufTransactions(new n({tokenId:null!=k.token?t._fromProtobuf(k.token):void 0}),o,r,s,i,a)}get tokenId(){return this._tokenId}setTokenId(e){return this._requireNotFrozen(),this._tokenId="string"==typeof e?t.fromString(e):e.clone(),this}_validateChecksums(t){null!=this._tokenId&&this._tokenId.validateChecksum(t)}_execute(t,e){return t.token.deleteToken(e)}_getTransactionDataCase(){return"tokenDeletion"}_makeTransactionData(){return{token:null!=this._tokenId?this._tokenId._toProtobuf():null}}_getLogId(){return`TokenDeleteTransaction:${this._transactionIds.current.validStart.toString()}`}}o.set("tokenDeletion",n._fromProtobuf);export{n as default};
//# sourceMappingURL=TokenDeleteTransaction.js.map