@wormhole-foundation/sdk-connect
Version:
The core package for the Connect SDK, used in conjunction with 1 or more of the chain packages
35 lines • 1.16 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.RelayFailedError = exports.UnavailableError = exports.MinAmountError = void 0;
const sdk_base_1 = require("@wormhole-foundation/sdk-base");
// Special error to return from quote() or validate() when the
// given transfer amount is too small. Used to helpfully
// show a minimum amount in the interface.
class MinAmountError extends Error {
min;
constructor(min) {
super(`Minimum transfer amount is ${sdk_base_1.amount.display(min)}`);
this.min = min;
}
minAmount() {
return this.min;
}
}
exports.MinAmountError = MinAmountError;
// Special error to return from quote() or validate() when the
// protocol can't provide a quote.
class UnavailableError extends Error {
internalError;
constructor(internalErr) {
super(`Unable to fetch a quote`);
this.internalError = internalErr;
}
}
exports.UnavailableError = UnavailableError;
class RelayFailedError extends Error {
constructor(message) {
super(message);
}
}
exports.RelayFailedError = RelayFailedError;
//# sourceMappingURL=types.js.map
;