Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@cardano-sdk/core

Package Overview
Dependencies
Maintainers
1
Versions
144
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@cardano-sdk/core - npm Package Compare versions

Comparing version 0.6.0-nightly.8 to 0.6.0-nightly.9

7

dist/cjs/Cardano/types/TxSubmissionErrors.d.ts

@@ -1,5 +0,4 @@

import { CustomError } from 'ts-custom-error';
export declare class UnknownTxSubmissionError extends CustomError {
innerError: unknown;
constructor(innerError: unknown);
import { ComposableError } from '../../errors';
export declare class UnknownTxSubmissionError<InnerError = unknown> extends ComposableError<InnerError> {
constructor(innerError: InnerError);
}

@@ -6,0 +5,0 @@ export declare const TxSubmissionErrors: {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.TxSubmissionErrors = exports.UnknownTxSubmissionError = void 0;
const ts_custom_error_1 = require("ts-custom-error");
const errors_1 = require("../../errors");
const client_1 = require("@cardano-ogmios/client");
class UnknownTxSubmissionError extends ts_custom_error_1.CustomError {
class UnknownTxSubmissionError extends errors_1.ComposableError {
constructor(innerError) {
super('Unknown submission error. See "innerError".');
this.innerError = innerError;
super('Unknown submission error', innerError);
}

@@ -11,0 +10,0 @@ }

import { AcquirePointNotOnChainError, AcquirePointTooOldError, EraMismatchError, IntersectionNotFoundError, QueryUnavailableInCurrentEraError, ServerNotReady, TipIsOriginError, UnknownResultError, WebSocketClosed } from '@cardano-ogmios/client';
import { ComposableError } from '../../errors';
import { CustomError } from 'ts-custom-error';
export declare class UnknownCardanoNodeError extends CustomError {
innerError: unknown;
constructor(innerError: unknown);
export declare class UnknownCardanoNodeError<InnerError = unknown> extends ComposableError<InnerError> {
constructor(innerError: InnerError);
}

@@ -7,0 +7,0 @@ export declare class CardanoNodeNotInitializedError extends CustomError {

@@ -5,7 +5,7 @@ "use strict";

const client_1 = require("@cardano-ogmios/client");
const errors_1 = require("../../errors");
const ts_custom_error_1 = require("ts-custom-error");
class UnknownCardanoNodeError extends ts_custom_error_1.CustomError {
class UnknownCardanoNodeError extends errors_1.ComposableError {
constructor(innerError) {
super('Unknown CardanoNode error. See "innerError".');
this.innerError = innerError;
super('Unknown CardanoNode error', innerError);
}

@@ -12,0 +12,0 @@ }

@@ -11,7 +11,11 @@ import { CustomError } from 'ts-custom-error';

}
export declare class ProviderError<InnerError = unknown> extends CustomError {
export declare class ComposableError<InnerError = unknown> extends CustomError {
innerError?: InnerError | undefined;
private static stackDelimiter;
constructor(message: string, innerError?: InnerError | undefined);
}
export declare class ProviderError<InnerError = unknown> extends ComposableError<InnerError> {
reason: ProviderFailure;
innerError?: InnerError | undefined;
detail?: string | undefined;
constructor(reason: ProviderFailure, innerError?: InnerError | undefined, detail?: string | undefined);
constructor(reason: ProviderFailure, innerError?: InnerError, detail?: string | undefined);
}

@@ -26,7 +30,6 @@ export declare enum SerializationFailure {

}
export declare class SerializationError extends CustomError {
export declare class SerializationError<InnerError = unknown> extends ComposableError<InnerError> {
reason: SerializationFailure;
detail?: string | undefined;
innerError?: unknown;
constructor(reason: SerializationFailure, detail?: string | undefined, innerError?: unknown);
constructor(reason: SerializationFailure, detail?: string | undefined, innerError?: InnerError);
}

@@ -39,6 +42,5 @@ export declare class InvalidProtocolParametersError extends CustomError {

}
export declare class InvalidStringError extends CustomError {
innerError?: unknown;
constructor(expectation: string, innerError?: unknown);
export declare class InvalidStringError<InnerError = unknown> extends ComposableError<InnerError> {
constructor(expectation: string, innerError?: InnerError);
}
//# sourceMappingURL=errors.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.InvalidStringError = exports.NotImplementedError = exports.InvalidProtocolParametersError = exports.SerializationError = exports.SerializationFailure = exports.ProviderError = exports.ProviderFailure = void 0;
exports.InvalidStringError = exports.NotImplementedError = exports.InvalidProtocolParametersError = exports.SerializationError = exports.SerializationFailure = exports.ProviderError = exports.ComposableError = exports.ProviderFailure = void 0;
const ts_custom_error_1 = require("ts-custom-error");

@@ -16,7 +16,27 @@ var ProviderFailure;

const formatMessage = (reason, detail) => reason + (detail ? ` (${detail})` : '');
class ProviderError extends ts_custom_error_1.CustomError {
class ComposableError extends ts_custom_error_1.CustomError {
constructor(message, innerError) {
let firstLineOfInnerErrorStack = '';
let innerErrorStack = [];
if (innerError instanceof Error && innerError.stack) {
[firstLineOfInnerErrorStack, ...innerErrorStack] = innerError.stack.split(ComposableError.stackDelimiter);
message = `${message} due to\n ${firstLineOfInnerErrorStack}`;
}
super(message);
this.innerError = innerError;
if (!this.stack || innerErrorStack.length === 0)
return;
const [firstLineOfStack] = this.stack.split(ComposableError.stackDelimiter);
Object.defineProperty(this, 'stack', {
configurable: true,
value: `${firstLineOfStack}${innerErrorStack.join(ComposableError.stackDelimiter)}`
});
}
}
exports.ComposableError = ComposableError;
ComposableError.stackDelimiter = '\n at ';
class ProviderError extends ComposableError {
constructor(reason, innerError, detail) {
super(formatMessage(reason, detail));
super(formatMessage(reason, detail), innerError);
this.reason = reason;
this.innerError = innerError;
this.detail = detail;

@@ -35,8 +55,7 @@ }

})(SerializationFailure = exports.SerializationFailure || (exports.SerializationFailure = {}));
class SerializationError extends ts_custom_error_1.CustomError {
class SerializationError extends ComposableError {
constructor(reason, detail, innerError) {
super(formatMessage(reason, detail));
super(formatMessage(reason, detail), innerError);
this.reason = reason;
this.detail = detail;
this.innerError = innerError;
}

@@ -57,6 +76,5 @@ }

exports.NotImplementedError = NotImplementedError;
class InvalidStringError extends ts_custom_error_1.CustomError {
class InvalidStringError extends ComposableError {
constructor(expectation, innerError) {
super(`Invalid string: "${expectation}"`);
this.innerError = innerError;
super(`Invalid string: "${expectation}"`, innerError);
}

@@ -63,0 +81,0 @@ }

@@ -1,5 +0,4 @@

import { CustomError } from 'ts-custom-error';
export declare class UnknownTxSubmissionError extends CustomError {
innerError: unknown;
constructor(innerError: unknown);
import { ComposableError } from '../../errors';
export declare class UnknownTxSubmissionError<InnerError = unknown> extends ComposableError<InnerError> {
constructor(innerError: InnerError);
}

@@ -6,0 +5,0 @@ export declare const TxSubmissionErrors: {

@@ -1,7 +0,6 @@

import { CustomError } from 'ts-custom-error';
import { ComposableError } from '../../errors';
import { TxSubmission } from '@cardano-ogmios/client';
export class UnknownTxSubmissionError extends CustomError {
export class UnknownTxSubmissionError extends ComposableError {
constructor(innerError) {
super('Unknown submission error. See "innerError".');
this.innerError = innerError;
super('Unknown submission error', innerError);
}

@@ -8,0 +7,0 @@ }

import { AcquirePointNotOnChainError, AcquirePointTooOldError, EraMismatchError, IntersectionNotFoundError, QueryUnavailableInCurrentEraError, ServerNotReady, TipIsOriginError, UnknownResultError, WebSocketClosed } from '@cardano-ogmios/client';
import { ComposableError } from '../../errors';
import { CustomError } from 'ts-custom-error';
export declare class UnknownCardanoNodeError extends CustomError {
innerError: unknown;
constructor(innerError: unknown);
export declare class UnknownCardanoNodeError<InnerError = unknown> extends ComposableError<InnerError> {
constructor(innerError: InnerError);
}

@@ -7,0 +7,0 @@ export declare class CardanoNodeNotInitializedError extends CustomError {

import { AcquirePointNotOnChainError, AcquirePointTooOldError, EraMismatchError, IntersectionNotFoundError, QueryUnavailableInCurrentEraError, ServerNotReady, TipIsOriginError, UnknownResultError, WebSocketClosed } from '@cardano-ogmios/client';
import { ComposableError } from '../../errors';
import { CustomError } from 'ts-custom-error';
export class UnknownCardanoNodeError extends CustomError {
export class UnknownCardanoNodeError extends ComposableError {
constructor(innerError) {
super('Unknown CardanoNode error. See "innerError".');
this.innerError = innerError;
super('Unknown CardanoNode error', innerError);
}

@@ -8,0 +8,0 @@ }

@@ -11,7 +11,11 @@ import { CustomError } from 'ts-custom-error';

}
export declare class ProviderError<InnerError = unknown> extends CustomError {
export declare class ComposableError<InnerError = unknown> extends CustomError {
innerError?: InnerError | undefined;
private static stackDelimiter;
constructor(message: string, innerError?: InnerError | undefined);
}
export declare class ProviderError<InnerError = unknown> extends ComposableError<InnerError> {
reason: ProviderFailure;
innerError?: InnerError | undefined;
detail?: string | undefined;
constructor(reason: ProviderFailure, innerError?: InnerError | undefined, detail?: string | undefined);
constructor(reason: ProviderFailure, innerError?: InnerError, detail?: string | undefined);
}

@@ -26,7 +30,6 @@ export declare enum SerializationFailure {

}
export declare class SerializationError extends CustomError {
export declare class SerializationError<InnerError = unknown> extends ComposableError<InnerError> {
reason: SerializationFailure;
detail?: string | undefined;
innerError?: unknown;
constructor(reason: SerializationFailure, detail?: string | undefined, innerError?: unknown);
constructor(reason: SerializationFailure, detail?: string | undefined, innerError?: InnerError);
}

@@ -39,6 +42,5 @@ export declare class InvalidProtocolParametersError extends CustomError {

}
export declare class InvalidStringError extends CustomError {
innerError?: unknown;
constructor(expectation: string, innerError?: unknown);
export declare class InvalidStringError<InnerError = unknown> extends ComposableError<InnerError> {
constructor(expectation: string, innerError?: InnerError);
}
//# sourceMappingURL=errors.d.ts.map

@@ -13,7 +13,26 @@ import { CustomError } from 'ts-custom-error';

const formatMessage = (reason, detail) => reason + (detail ? ` (${detail})` : '');
export class ProviderError extends CustomError {
export class ComposableError extends CustomError {
constructor(message, innerError) {
let firstLineOfInnerErrorStack = '';
let innerErrorStack = [];
if (innerError instanceof Error && innerError.stack) {
[firstLineOfInnerErrorStack, ...innerErrorStack] = innerError.stack.split(ComposableError.stackDelimiter);
message = `${message} due to\n ${firstLineOfInnerErrorStack}`;
}
super(message);
this.innerError = innerError;
if (!this.stack || innerErrorStack.length === 0)
return;
const [firstLineOfStack] = this.stack.split(ComposableError.stackDelimiter);
Object.defineProperty(this, 'stack', {
configurable: true,
value: `${firstLineOfStack}${innerErrorStack.join(ComposableError.stackDelimiter)}`
});
}
}
ComposableError.stackDelimiter = '\n at ';
export class ProviderError extends ComposableError {
constructor(reason, innerError, detail) {
super(formatMessage(reason, detail));
super(formatMessage(reason, detail), innerError);
this.reason = reason;
this.innerError = innerError;
this.detail = detail;

@@ -31,8 +50,7 @@ }

})(SerializationFailure || (SerializationFailure = {}));
export class SerializationError extends CustomError {
export class SerializationError extends ComposableError {
constructor(reason, detail, innerError) {
super(formatMessage(reason, detail));
super(formatMessage(reason, detail), innerError);
this.reason = reason;
this.detail = detail;
this.innerError = innerError;
}

@@ -50,8 +68,7 @@ }

}
export class InvalidStringError extends CustomError {
export class InvalidStringError extends ComposableError {
constructor(expectation, innerError) {
super(`Invalid string: "${expectation}"`);
this.innerError = innerError;
super(`Invalid string: "${expectation}"`, innerError);
}
}
//# sourceMappingURL=errors.js.map
{
"name": "@cardano-sdk/core",
"version": "0.6.0-nightly.8",
"version": "0.6.0-nightly.9",
"description": "Core types and libraries for Cardano",

@@ -79,3 +79,3 @@ "engines": {

],
"gitHead": "74a9c8cfd34ed424eddf28b68af9ebd3115a2c4f"
"gitHead": "5cb619833e5efa783a13de422da613bb5e9367cc"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc