UNPKG

@hiero-ledger/sdk

Version:
3 lines (2 loc) 1.49 kB
class e{constructor(e){this._code=e,Object.freeze(this)}toString(){switch(this){case e.Default:return"DEFAULT";case e.TokenFungibleCommon:return"TOKEN_FUNGIBLE_COMMON";case e.TokenNonFungibleUnique:return"TOKEN_NON_FUNGIBLE_UNIQUE";case e.TokenFungibleCommonWithCustomFees:return"TOKEN_FUNGIBLE_COMMON_WITH_CUSTOM_FEES";case e.TokenNonFungibleUniqueWithCustomFees:return"TOKEN_NON_FUNGIBLE_UNIQUE_WITH_CUSTOM_FEES";case e.ScheduleCreateContractCall:return"SCHEDULE_CREATE_CONTRACT_CALL";case e.TopicCreateWithCustomFees:return"TOPIC_CREATE_WITH_CUSTOM_FEES";case e.SubmitMessageWithCustomFees:return"SUBMIT_MESSAGE_WITH_CUSTOM_FEES";default:return`UNKNOWN (${this._code})`}}static _fromCode(t){switch(t){case 0:return e.Default;case 1:return e.TokenFungibleCommon;case 2:return e.TokenNonFungibleUnique;case 3:return e.TokenFungibleCommonWithCustomFees;case 4:return e.TokenNonFungibleUniqueWithCustomFees;case 5:return e.ScheduleCreateContractCall;case 6:return e.TopicCreateWithCustomFees;case 7:return e.SubmitMessageWithCustomFees}throw new Error(`(BUG) SubType.fromCode() does not handle code: ${t}`)}valueOf(){return this._code}}e.Default=new e(0),e.TokenFungibleCommon=new e(1),e.TokenNonFungibleUnique=new e(2),e.TokenFungibleCommonWithCustomFees=new e(3),e.TokenNonFungibleUniqueWithCustomFees=new e(4),e.ScheduleCreateContractCall=new e(5),e.TopicCreateWithCustomFees=new e(6),e.SubmitMessageWithCustomFees=new e(7);export{e as default}; //# sourceMappingURL=FeeDataType.js.map