@hashgraph/sdk
Version:
3 lines (2 loc) • 874 B
JavaScript
import*as e from"@hashgraph/proto";import t from"./TransactionFeeSchedule.js";import o from"./Timestamp.js";class r{constructor(e={}){this.transactionFeeSchedule=e.transactionFeeSchedule,this.expirationTime=e.expirationTime}static fromBytes(t){return r._fromProtobuf(e.proto.FeeSchedule.decode(t))}static _fromProtobuf(e){return new r({transactionFeeSchedule:null!=e.transactionFeeSchedule?e.transactionFeeSchedule.map(e=>t._fromProtobuf(e)):void 0,expirationTime:null!=e.expiryTime?o._fromProtobuf(e.expiryTime):void 0})}_toProtobuf(){return{transactionFeeSchedule:null!=this.transactionFeeSchedule?this.transactionFeeSchedule.map(e=>e._toProtobuf()):void 0,expiryTime:null!=this.expirationTime?this.expirationTime._toProtobuf():void 0}}toBytes(){return e.proto.FeeSchedule.encode(this._toProtobuf()).finish()}}export{r as default};
//# sourceMappingURL=FeeSchedule.js.map