UNPKG

@lucoadam/zebec-wormhole-sdk

Version:

This sdk can be use to transfer assets across chains and to interact with the Zebec's xchain bridge smart contracts for passing message from EVM chain to solana specially to utilize the features of Zebec Streaming and Zebec Multisig Streaming protocol.

50 lines (49 loc) 1.85 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.PayloadParseError = exports.NotSupportedError = exports.NotImplementedError = exports.NOT_SUPPORTED = exports.NOT_IMPLEMENTED = exports.InvalidArgumentError = exports.INVALID_ARGUMENT = exports.ArgumentNullOrUndefinedError = exports.ARGUMENT_NULL_UNDEFINED = void 0; const NOT_IMPLEMENTED = "Method not implemented."; exports.NOT_IMPLEMENTED = NOT_IMPLEMENTED; const ARGUMENT_NULL_UNDEFINED = "Argument is null or undefined."; exports.ARGUMENT_NULL_UNDEFINED = ARGUMENT_NULL_UNDEFINED; const INVALID_ARGUMENT = "Invalid argument."; exports.INVALID_ARGUMENT = INVALID_ARGUMENT; const NOT_SUPPORTED = "Not supported"; exports.NOT_SUPPORTED = NOT_SUPPORTED; class NotImplementedError extends Error { constructor() { super(NOT_IMPLEMENTED); } } exports.NotImplementedError = NotImplementedError; class ArgumentNullOrUndefinedError extends Error { constructor() { super(ARGUMENT_NULL_UNDEFINED); } } exports.ArgumentNullOrUndefinedError = ArgumentNullOrUndefinedError; class InvalidArgumentError extends Error { constructor(value, expected) { let message = INVALID_ARGUMENT; if (expected) message = message.concat(` Expected: ${expected} Value: ${value.toString()} `);else message = message.concat(` Value: ${value.toString()}`); super(message); this.value = value; this.expected = expected; } } exports.InvalidArgumentError = InvalidArgumentError; class PayloadParseError extends Error { constructor(message) { super(message); this.name = "Payload Parse Error"; } } exports.PayloadParseError = PayloadParseError; class NotSupportedError extends Error { constructor(message) { super(message ? message : NOT_SUPPORTED); } } exports.NotSupportedError = NotSupportedError; //# sourceMappingURL=errors.js.map