UNPKG

@hashgraphonline/standards-sdk

Version:

The Hashgraph Online Standards SDK provides a complete implementation of the Hashgraph Consensus Standards (HCS), giving developers all the tools needed to build applications on Hedera.

147 lines (146 loc) 4.1 kB
class HCS20Error extends Error { constructor(message) { super(message); this.name = "HCS20Error"; } } class PointsDeploymentError extends HCS20Error { constructor(message, tick) { super(message); this.tick = tick; this.name = "PointsDeploymentError"; } } class PointsMintError extends HCS20Error { constructor(message, tick, requestedAmount, availableSupply) { super(message); this.tick = tick; this.requestedAmount = requestedAmount; this.availableSupply = availableSupply; this.name = "PointsMintError"; } } class PointsTransferError extends HCS20Error { constructor(message, tick, from, to, amount, availableBalance) { super(message); this.tick = tick; this.from = from; this.to = to; this.amount = amount; this.availableBalance = availableBalance; this.name = "PointsTransferError"; } } class PointsBurnError extends HCS20Error { constructor(message, tick, from, amount, availableBalance) { super(message); this.tick = tick; this.from = from; this.amount = amount; this.availableBalance = availableBalance; this.name = "PointsBurnError"; } } class PointsValidationError extends HCS20Error { constructor(message, validationErrors) { super(message); this.validationErrors = validationErrors; this.name = "PointsValidationError"; } } class PointsNotFoundError extends HCS20Error { constructor(tick) { super(`Points with tick "${tick}" not found`); this.tick = tick; this.name = "PointsNotFoundError"; } } class TopicRegistrationError extends HCS20Error { constructor(message, topicId) { super(message); this.topicId = topicId; this.name = "TopicRegistrationError"; } } class InsufficientBalanceError extends HCS20Error { constructor(accountId, tick, required, available) { super( `Insufficient balance for ${tick}: required ${required}, available ${available}` ); this.accountId = accountId; this.tick = tick; this.required = required; this.available = available; this.name = "InsufficientBalanceError"; } } class SupplyLimitExceededError extends HCS20Error { constructor(tick, requested, maxSupply, currentSupply) { super( `Supply limit exceeded for ${tick}: max ${maxSupply}, current ${currentSupply}, requested ${requested}` ); this.tick = tick; this.requested = requested; this.maxSupply = maxSupply; this.currentSupply = currentSupply; this.name = "SupplyLimitExceededError"; } } class MintLimitExceededError extends HCS20Error { constructor(tick, requested, limit) { super( `Mint limit exceeded for ${tick}: requested ${requested}, limit ${limit}` ); this.tick = tick; this.requested = requested; this.limit = limit; this.name = "MintLimitExceededError"; } } class InvalidMessageFormatError extends HCS20Error { constructor(message, messageData) { super(message); this.messageData = messageData; this.name = "InvalidMessageFormatError"; } } class InvalidAccountFormatError extends HCS20Error { constructor(account) { super(`Invalid Hedera account format: ${account}`); this.account = account; this.name = "InvalidAccountFormatError"; } } class InvalidTickFormatError extends HCS20Error { constructor(tick) { super(`Invalid tick format: ${tick}`); this.tick = tick; this.name = "InvalidTickFormatError"; } } class InvalidNumberFormatError extends HCS20Error { constructor(value, field) { super(`Invalid number format for ${field}: ${value}`); this.value = value; this.field = field; this.name = "InvalidNumberFormatError"; } } export { HCS20Error, InsufficientBalanceError, InvalidAccountFormatError, InvalidMessageFormatError, InvalidNumberFormatError, InvalidTickFormatError, MintLimitExceededError, PointsBurnError, PointsDeploymentError, PointsMintError, PointsNotFoundError, PointsTransferError, PointsValidationError, SupplyLimitExceededError, TopicRegistrationError }; //# sourceMappingURL=standards-sdk.es17.js.map