UNPKG

@arkiv-network/sdk

Version:

TypeScript client library for Arkiv's blockchains interactions

63 lines (61 loc) • 1.93 kB
const require_consts = require('./consts-DKlf1_lP.cjs'); //#region src/errors.ts var EntityMutationError = class extends Error { txHash; constructor(message, options) { super(message, { cause: options?.cause }); this.name = "EntityMutationError"; this.txHash = options?.txHash; } }; var NoEntityFoundError = class extends Error { /** The key that matched nothing, when the lookup was by key. */ entityKey; constructor(entityKey) { super(entityKey === void 0 ? "No entity found" : `No live entity with key ${entityKey}. It was never created, or it has been deleted or has expired.`); this.name = "NoEntityFoundError"; this.entityKey = entityKey; } }; var EmptyPatchError = class extends Error { entityKey; constructor(entityKey) { super(`The patch for entity ${entityKey} has nothing to apply. Pass "set" to write columns, or "unset" to remove optional ones.`); this.name = "EmptyPatchError"; this.entityKey = entityKey; } }; var MissingAccessKeyError = class extends Error { /** The chain that was asked for without a key. */ chain; constructor(chain) { super(`${chain} needs an Arkiv access key: pass it as ${chain.toLowerCase()}({ accessKey }). Get a free one at ${require_consts.ACCESS_KEYS_URL}, or pass accessKey: "" to use the heavily rate-limited public endpoint.`); this.name = "MissingAccessKeyError"; this.chain = chain; } }; //#endregion Object.defineProperty(exports, 'EmptyPatchError', { enumerable: true, get: function () { return EmptyPatchError; } }); Object.defineProperty(exports, 'EntityMutationError', { enumerable: true, get: function () { return EntityMutationError; } }); Object.defineProperty(exports, 'MissingAccessKeyError', { enumerable: true, get: function () { return MissingAccessKeyError; } }); Object.defineProperty(exports, 'NoEntityFoundError', { enumerable: true, get: function () { return NoEntityFoundError; } });