@wormhole-foundation/sdk-connect
Version:
The core package for the Connect SDK, used in conjunction with 1 or more of the chain packages
29 lines • 868 B
JavaScript
import { amount } from "@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.
export class MinAmountError extends Error {
min;
constructor(min) {
super(`Minimum transfer amount is ${amount.display(min)}`);
this.min = min;
}
minAmount() {
return this.min;
}
}
// Special error to return from quote() or validate() when the
// protocol can't provide a quote.
export class UnavailableError extends Error {
internalError;
constructor(internalErr) {
super(`Unable to fetch a quote`);
this.internalError = internalErr;
}
}
export class RelayFailedError extends Error {
constructor(message) {
super(message);
}
}
//# sourceMappingURL=types.js.map