New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@meteorwallet/core-sdk

Package Overview
Dependencies
Maintainers
2
Versions
77
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@meteorwallet/core-sdk - npm Package Compare versions

Comparing version 0.0.12 to 0.0.13

4

dist/cjs/errors/by_feature/harvest_moon.errors.d.ts

@@ -13,3 +13,5 @@ export declare enum EErrorId_Meteor_HarvestMoon {

harvest_moon_vault_level_not_found = "harvest_moon_vault_level_not_found",
harvest_moon_gas_free_container_must_be_full = "harvest_moon_gas_free_container_must_be_full"
harvest_moon_gas_free_container_must_be_full = "harvest_moon_gas_free_container_must_be_full",
harvest_moon_last_harvest_less_than_a_day = "harvest_moon_last_harvest_less_than_a_day",
harvest_moon_last_remind_less_than_a_day = "harvest_moon_last_remind_less_than_a_day"
}

@@ -16,0 +18,0 @@ export interface IErrorContext_HarvestMoonTierUpgradeInsufficientTokens {

@@ -18,2 +18,4 @@ "use strict";

EErrorId_Meteor_HarvestMoon["harvest_moon_gas_free_container_must_be_full"] = "harvest_moon_gas_free_container_must_be_full";
EErrorId_Meteor_HarvestMoon["harvest_moon_last_harvest_less_than_a_day"] = "harvest_moon_last_harvest_less_than_a_day";
EErrorId_Meteor_HarvestMoon["harvest_moon_last_remind_less_than_a_day"] = "harvest_moon_last_remind_less_than_a_day";
})(EErrorId_Meteor_HarvestMoon || (exports.EErrorId_Meteor_HarvestMoon = EErrorId_Meteor_HarvestMoon = {}));
import { EErrorId_AccountSignerExecutor, EErrorId_Meteor_HarvestMoon } from "../by_feature";
import { EErrorId_GoogleRecaptcha, EErrorId_LedgerDevice, EErrorId_Telegram, EErrorId_Zod, TErrorId_Near } from "./index";
export type TErrorId = TErrorId_Near | EErrorId_GenericSdk | EErrorId_GenericApi | EErrorId_GenericData | EErrorId_MeteorApi | EErrorId_MeteorBackend | EErrorId_MeteorSignedMessage | EErrorId_MeteorPublicRelease | EErrorId_Relayer | EErrorId_Security | EErrorId_Transaction | EErrorId_BlockchainNetwork | EErrorId_BlockchainFeature_AccountSearch | EErrorId_Account | EErrorId_AccountFeature | EErrorId_Key | EErrorId_Signer | EErrorId_ListManager | EErrorId_AccountBuilder | EErrorId_Blockchain | EErrorId_Contract | EErrorId_Token | EErrorId_MeteorSdk | EErrorId_BlockchainFeature_CustomId | EErrorId_BlockchainFeature_CustomId_Formatting | EErrorId_Telegram | EErrorId_Zod | EErrorId_Meteor_HarvestMoon | EErrorId_Reward | EErrorId_Scheduler | EErrorId_GoogleRecaptcha | EErrorId_LedgerDevice | EErrorId_AccountSignerExecutor;
export type TErrorId = TErrorId_Near | EErrorId_GenericSdk | EErrorId_GenericApi | EErrorId_GenericData | EErrorId_MeteorApi | EErrorId_MeteorBackend | EErrorId_MeteorSignedMessage | EErrorId_MeteorPublicRelease | EErrorId_Relayer | EErrorId_Security | EErrorId_Transaction | EErrorId_BlockchainNetwork | EErrorId_BlockchainFeature_AccountSearch | EErrorId_Account | EErrorId_AccountFeature | EErrorId_Key | EErrorId_Signer | EErrorId_ListManager | EErrorId_AccountBuilder | EErrorId_Blockchain | EErrorId_Contract | EErrorId_Token | EErrorId_MeteorSdk | EErrorId_BlockchainFeature_CustomId | EErrorId_BlockchainFeature_CustomId_Formatting | EErrorId_Telegram | EErrorId_Zod | EErrorId_Meteor_HarvestMoon | EErrorId_Reward | EErrorId_Scheduler | EErrorId_GoogleRecaptcha | EErrorId_LedgerDevice | EErrorId_AccountSignerExecutor | EErrorId_AppEvent | EErrorId_Session | EErrorId_FeatureEnrollment;
export declare enum EErrorId_MeteorSdk {

@@ -125,2 +125,15 @@ no_blockchains_with_available_networks = "no_blockchains_with_available_networks"

}
export declare enum EErrorId_AppEvent {
fail_to_save_event = "fail_to_save_event"
}
export declare enum EErrorId_Session {
mismatch_session_id = "mismatch_session_id",
invalid_session_object = "invalid_session_object",
fail_to_create_session_id = "fail_to_create_session_id"
}
export declare enum EErrorId_FeatureEnrollment {
failed_to_create_feature_enrollment = "failed_to_create_feature_enrollment",
feature_enrollment_record_not_found = "feature_enrollment_record_not_found",
failed_to_update_feature_enrollment = "failed_to_update_feature_enrollment"
}
//# sourceMappingURL=MeteorErrorIds.d.ts.map
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.EErrorId_Scheduler = exports.EErrorId_Reward = exports.EErrorId_Relayer = exports.EErrorId_MeteorSignedMessage = exports.EErrorId_MeteorApi = exports.EErrorId_MeteorBackend = exports.EErrorId_MeteorPublicRelease = exports.EErrorId_ListManager = exports.EErrorId_Signer = exports.EErrorId_Key = exports.EErrorId_AccountFeature = exports.EErrorId_AccountBuilder = exports.EErrorId_Account = exports.EErrorId_BlockchainNetwork = exports.EErrorId_Token = exports.EErrorId_Contract = exports.EErrorId_BlockchainFeature_CustomId_Formatting = exports.EErrorId_BlockchainFeature_CustomId = exports.EErrorId_BlockchainFeature_AccountSearch = exports.EErrorId_Blockchain = exports.EErrorId_Transaction = exports.EErrorId_Security = exports.EErrorId_GenericData = exports.EErrorId_GenericApi = exports.EErrorId_GenericSdk = exports.EErrorId_MeteorSdk = void 0;
exports.EErrorId_FeatureEnrollment = exports.EErrorId_Session = exports.EErrorId_AppEvent = exports.EErrorId_Scheduler = exports.EErrorId_Reward = exports.EErrorId_Relayer = exports.EErrorId_MeteorSignedMessage = exports.EErrorId_MeteorApi = exports.EErrorId_MeteorBackend = exports.EErrorId_MeteorPublicRelease = exports.EErrorId_ListManager = exports.EErrorId_Signer = exports.EErrorId_Key = exports.EErrorId_AccountFeature = exports.EErrorId_AccountBuilder = exports.EErrorId_Account = exports.EErrorId_BlockchainNetwork = exports.EErrorId_Token = exports.EErrorId_Contract = exports.EErrorId_BlockchainFeature_CustomId_Formatting = exports.EErrorId_BlockchainFeature_CustomId = exports.EErrorId_BlockchainFeature_AccountSearch = exports.EErrorId_Blockchain = exports.EErrorId_Transaction = exports.EErrorId_Security = exports.EErrorId_GenericData = exports.EErrorId_GenericApi = exports.EErrorId_GenericSdk = exports.EErrorId_MeteorSdk = void 0;
var EErrorId_MeteorSdk;

@@ -151,1 +151,17 @@ (function (EErrorId_MeteorSdk) {

})(EErrorId_Scheduler || (exports.EErrorId_Scheduler = EErrorId_Scheduler = {}));
var EErrorId_AppEvent;
(function (EErrorId_AppEvent) {
EErrorId_AppEvent["fail_to_save_event"] = "fail_to_save_event";
})(EErrorId_AppEvent || (exports.EErrorId_AppEvent = EErrorId_AppEvent = {}));
var EErrorId_Session;
(function (EErrorId_Session) {
EErrorId_Session["mismatch_session_id"] = "mismatch_session_id";
EErrorId_Session["invalid_session_object"] = "invalid_session_object";
EErrorId_Session["fail_to_create_session_id"] = "fail_to_create_session_id";
})(EErrorId_Session || (exports.EErrorId_Session = EErrorId_Session = {}));
var EErrorId_FeatureEnrollment;
(function (EErrorId_FeatureEnrollment) {
EErrorId_FeatureEnrollment["failed_to_create_feature_enrollment"] = "failed_to_create_feature_enrollment";
EErrorId_FeatureEnrollment["feature_enrollment_record_not_found"] = "feature_enrollment_record_not_found";
EErrorId_FeatureEnrollment["failed_to_update_feature_enrollment"] = "failed_to_update_feature_enrollment";
})(EErrorId_FeatureEnrollment || (exports.EErrorId_FeatureEnrollment = EErrorId_FeatureEnrollment = {}));
import { IMeteorErrorDescriptor, IMeteorErrorResponseObject } from "./MeteorError.types";
import { IErrorIdWithContextData } from "./MeteorErrorContext";
import { TErrorId } from "./ids/MeteorErrorIds";
export declare class MeteorError<E extends string = TErrorId> extends Error {
export declare class MeteorError<E extends string = TErrorId> extends Error implements IMeteorErrorResponseObject {
isUnknownError: boolean;
private errorIds;
private context;
errorIds: TErrorId[];
context: Partial<IErrorIdWithContextData>;
message: string;
readonly name: string;
readonly name = "MeteorError";
constructor(message: string, ids: TErrorId[], context?: Partial<IErrorIdWithContextData>);

@@ -19,2 +19,4 @@ static meteorOrUnknownError(e: unknown, logMessage?: boolean): MeteorError;

static fromDescriptors(errorDescriptors: IMeteorErrorDescriptor[]): MeteorError;
static fromJsonObject(meteorObject: IMeteorErrorResponseObject): MeteorError;
toJsonObject(): IMeteorErrorResponseObject;
hasId(errorId: E | string): boolean;

@@ -21,0 +23,0 @@ hasOneOfIds(incomingErrorIds: (E | string)[]): boolean;

@@ -101,2 +101,16 @@ "use strict";

}
static fromJsonObject(meteorObject) {
const error = new MeteorError(meteorObject.message, meteorObject.errorIds, meteorObject.context);
error.isUnknownError = meteorObject.isUnknownError;
return error;
}
toJsonObject() {
return {
isUnknownError: this.isUnknownError,
errorIds: this.errorIds,
context: this.context,
message: this.message,
name: this.name,
};
}
hasId(errorId) {

@@ -103,0 +117,0 @@ return this.errorIds.includes(errorId);

@@ -13,3 +13,5 @@ export declare enum EErrorId_Meteor_HarvestMoon {

harvest_moon_vault_level_not_found = "harvest_moon_vault_level_not_found",
harvest_moon_gas_free_container_must_be_full = "harvest_moon_gas_free_container_must_be_full"
harvest_moon_gas_free_container_must_be_full = "harvest_moon_gas_free_container_must_be_full",
harvest_moon_last_harvest_less_than_a_day = "harvest_moon_last_harvest_less_than_a_day",
harvest_moon_last_remind_less_than_a_day = "harvest_moon_last_remind_less_than_a_day"
}

@@ -16,0 +18,0 @@ export interface IErrorContext_HarvestMoonTierUpgradeInsufficientTokens {

@@ -15,2 +15,4 @@ export var EErrorId_Meteor_HarvestMoon;

EErrorId_Meteor_HarvestMoon["harvest_moon_gas_free_container_must_be_full"] = "harvest_moon_gas_free_container_must_be_full";
EErrorId_Meteor_HarvestMoon["harvest_moon_last_harvest_less_than_a_day"] = "harvest_moon_last_harvest_less_than_a_day";
EErrorId_Meteor_HarvestMoon["harvest_moon_last_remind_less_than_a_day"] = "harvest_moon_last_remind_less_than_a_day";
})(EErrorId_Meteor_HarvestMoon || (EErrorId_Meteor_HarvestMoon = {}));
import { EErrorId_AccountSignerExecutor, EErrorId_Meteor_HarvestMoon } from "../by_feature";
import { EErrorId_GoogleRecaptcha, EErrorId_LedgerDevice, EErrorId_Telegram, EErrorId_Zod, TErrorId_Near } from "./index";
export type TErrorId = TErrorId_Near | EErrorId_GenericSdk | EErrorId_GenericApi | EErrorId_GenericData | EErrorId_MeteorApi | EErrorId_MeteorBackend | EErrorId_MeteorSignedMessage | EErrorId_MeteorPublicRelease | EErrorId_Relayer | EErrorId_Security | EErrorId_Transaction | EErrorId_BlockchainNetwork | EErrorId_BlockchainFeature_AccountSearch | EErrorId_Account | EErrorId_AccountFeature | EErrorId_Key | EErrorId_Signer | EErrorId_ListManager | EErrorId_AccountBuilder | EErrorId_Blockchain | EErrorId_Contract | EErrorId_Token | EErrorId_MeteorSdk | EErrorId_BlockchainFeature_CustomId | EErrorId_BlockchainFeature_CustomId_Formatting | EErrorId_Telegram | EErrorId_Zod | EErrorId_Meteor_HarvestMoon | EErrorId_Reward | EErrorId_Scheduler | EErrorId_GoogleRecaptcha | EErrorId_LedgerDevice | EErrorId_AccountSignerExecutor;
export type TErrorId = TErrorId_Near | EErrorId_GenericSdk | EErrorId_GenericApi | EErrorId_GenericData | EErrorId_MeteorApi | EErrorId_MeteorBackend | EErrorId_MeteorSignedMessage | EErrorId_MeteorPublicRelease | EErrorId_Relayer | EErrorId_Security | EErrorId_Transaction | EErrorId_BlockchainNetwork | EErrorId_BlockchainFeature_AccountSearch | EErrorId_Account | EErrorId_AccountFeature | EErrorId_Key | EErrorId_Signer | EErrorId_ListManager | EErrorId_AccountBuilder | EErrorId_Blockchain | EErrorId_Contract | EErrorId_Token | EErrorId_MeteorSdk | EErrorId_BlockchainFeature_CustomId | EErrorId_BlockchainFeature_CustomId_Formatting | EErrorId_Telegram | EErrorId_Zod | EErrorId_Meteor_HarvestMoon | EErrorId_Reward | EErrorId_Scheduler | EErrorId_GoogleRecaptcha | EErrorId_LedgerDevice | EErrorId_AccountSignerExecutor | EErrorId_AppEvent | EErrorId_Session | EErrorId_FeatureEnrollment;
export declare enum EErrorId_MeteorSdk {

@@ -125,2 +125,15 @@ no_blockchains_with_available_networks = "no_blockchains_with_available_networks"

}
export declare enum EErrorId_AppEvent {
fail_to_save_event = "fail_to_save_event"
}
export declare enum EErrorId_Session {
mismatch_session_id = "mismatch_session_id",
invalid_session_object = "invalid_session_object",
fail_to_create_session_id = "fail_to_create_session_id"
}
export declare enum EErrorId_FeatureEnrollment {
failed_to_create_feature_enrollment = "failed_to_create_feature_enrollment",
feature_enrollment_record_not_found = "feature_enrollment_record_not_found",
failed_to_update_feature_enrollment = "failed_to_update_feature_enrollment"
}
//# sourceMappingURL=MeteorErrorIds.d.ts.map

@@ -148,1 +148,17 @@ export var EErrorId_MeteorSdk;

})(EErrorId_Scheduler || (EErrorId_Scheduler = {}));
export var EErrorId_AppEvent;
(function (EErrorId_AppEvent) {
EErrorId_AppEvent["fail_to_save_event"] = "fail_to_save_event";
})(EErrorId_AppEvent || (EErrorId_AppEvent = {}));
export var EErrorId_Session;
(function (EErrorId_Session) {
EErrorId_Session["mismatch_session_id"] = "mismatch_session_id";
EErrorId_Session["invalid_session_object"] = "invalid_session_object";
EErrorId_Session["fail_to_create_session_id"] = "fail_to_create_session_id";
})(EErrorId_Session || (EErrorId_Session = {}));
export var EErrorId_FeatureEnrollment;
(function (EErrorId_FeatureEnrollment) {
EErrorId_FeatureEnrollment["failed_to_create_feature_enrollment"] = "failed_to_create_feature_enrollment";
EErrorId_FeatureEnrollment["feature_enrollment_record_not_found"] = "feature_enrollment_record_not_found";
EErrorId_FeatureEnrollment["failed_to_update_feature_enrollment"] = "failed_to_update_feature_enrollment";
})(EErrorId_FeatureEnrollment || (EErrorId_FeatureEnrollment = {}));
import { IMeteorErrorDescriptor, IMeteorErrorResponseObject } from "./MeteorError.types";
import { IErrorIdWithContextData } from "./MeteorErrorContext";
import { TErrorId } from "./ids/MeteorErrorIds";
export declare class MeteorError<E extends string = TErrorId> extends Error {
export declare class MeteorError<E extends string = TErrorId> extends Error implements IMeteorErrorResponseObject {
isUnknownError: boolean;
private errorIds;
private context;
errorIds: TErrorId[];
context: Partial<IErrorIdWithContextData>;
message: string;
readonly name: string;
readonly name = "MeteorError";
constructor(message: string, ids: TErrorId[], context?: Partial<IErrorIdWithContextData>);

@@ -19,2 +19,4 @@ static meteorOrUnknownError(e: unknown, logMessage?: boolean): MeteorError;

static fromDescriptors(errorDescriptors: IMeteorErrorDescriptor[]): MeteorError;
static fromJsonObject(meteorObject: IMeteorErrorResponseObject): MeteorError;
toJsonObject(): IMeteorErrorResponseObject;
hasId(errorId: E | string): boolean;

@@ -21,0 +23,0 @@ hasOneOfIds(incomingErrorIds: (E | string)[]): boolean;

@@ -98,2 +98,16 @@ import { notNullEmpty, nullEmpty } from "../utils/javascript_type_utils";

}
static fromJsonObject(meteorObject) {
const error = new MeteorError(meteorObject.message, meteorObject.errorIds, meteorObject.context);
error.isUnknownError = meteorObject.isUnknownError;
return error;
}
toJsonObject() {
return {
isUnknownError: this.isUnknownError,
errorIds: this.errorIds,
context: this.context,
message: this.message,
name: this.name,
};
}
hasId(errorId) {

@@ -100,0 +114,0 @@ return this.errorIds.includes(errorId);

{
"name": "@meteorwallet/core-sdk",
"version": "0.0.12",
"version": "0.0.13",
"description": "Meteor Wallet SDK for internal use and integrator use",

@@ -23,3 +23,3 @@ "main": "dist/cjs/index.js",

"build": "bun run clean && concurrently \"tsc -p tsconfig.cjs.json\" \"tsc -p tsconfig.esm.json\"",
"build-watch": "un run clean && tsc -w"
"build-watch": "bun run clean && tsc -w"
},

@@ -26,0 +26,0 @@ "repository": {

@@ -14,2 +14,4 @@ export enum EErrorId_Meteor_HarvestMoon {

harvest_moon_gas_free_container_must_be_full = "harvest_moon_gas_free_container_must_be_full",
harvest_moon_last_harvest_less_than_a_day = "harvest_moon_last_harvest_less_than_a_day",
harvest_moon_last_remind_less_than_a_day = "harvest_moon_last_remind_less_than_a_day",
}

@@ -16,0 +18,0 @@

@@ -0,0 +0,0 @@ export enum EErrorId_AccountSignerExecutor {

@@ -43,3 +43,6 @@ import { EErrorId_AccountSignerExecutor, EErrorId_Meteor_HarvestMoon } from "../by_feature";

| EErrorId_LedgerDevice
| EErrorId_AccountSignerExecutor;
| EErrorId_AccountSignerExecutor
| EErrorId_AppEvent
| EErrorId_Session
| EErrorId_FeatureEnrollment;

@@ -192,1 +195,17 @@ export enum EErrorId_MeteorSdk {

}
export enum EErrorId_AppEvent {
fail_to_save_event = "fail_to_save_event",
}
export enum EErrorId_Session {
mismatch_session_id = "mismatch_session_id",
invalid_session_object = "invalid_session_object",
fail_to_create_session_id = "fail_to_create_session_id",
}
export enum EErrorId_FeatureEnrollment {
failed_to_create_feature_enrollment = "failed_to_create_feature_enrollment",
feature_enrollment_record_not_found = "feature_enrollment_record_not_found",
failed_to_update_feature_enrollment = "failed_to_update_feature_enrollment",
}

@@ -6,8 +6,11 @@ import { notNullEmpty, nullEmpty } from "../utils/javascript_type_utils";

export class MeteorError<E extends string = TErrorId> extends Error {
export class MeteorError<E extends string = TErrorId>
extends Error
implements IMeteorErrorResponseObject
{
isUnknownError = false;
private errorIds: TErrorId[] = [];
private context: Partial<IErrorIdWithContextData> = {};
public errorIds: TErrorId[] = [];
public context: Partial<IErrorIdWithContextData> = {};
public message: string;
public readonly name: string = "MeteorError";
public readonly name = "MeteorError";

@@ -139,2 +142,22 @@ constructor(message: string, ids: TErrorId[], context?: Partial<IErrorIdWithContextData>) {

static fromJsonObject(meteorObject: IMeteorErrorResponseObject): MeteorError {
const error = new MeteorError(
meteorObject.message,
meteorObject.errorIds,
meteorObject.context,
);
error.isUnknownError = meteorObject.isUnknownError;
return error;
}
toJsonObject(): IMeteorErrorResponseObject {
return {
isUnknownError: this.isUnknownError,
errorIds: this.errorIds,
context: this.context,
message: this.message,
name: this.name,
};
}
hasId(errorId: E | string): boolean {

@@ -141,0 +164,0 @@ return this.errorIds.includes(errorId as TErrorId);

@@ -70,5 +70,3 @@ export interface INearBlockHeader {

export type TNearAccessKeyPermission =
| "FullAccess"
| INearAccessKeyPermission_FunctionCall;
export type TNearAccessKeyPermission = "FullAccess" | INearAccessKeyPermission_FunctionCall;

@@ -75,0 +73,0 @@ export interface INearAccessKeyData {

@@ -0,0 +0,0 @@ import { ExecutionError, ExecutionOutcome, FinalExecutionOutcome } from "@near-js/types";

export * from "./time_calculation.utils";

@@ -0,0 +0,0 @@ const timePeriodMillis = {

export * from "./date_and_time";
export * from "./javascript_type_utils";

@@ -9,3 +9,4 @@ {

"declarationMap": true
}
},
"exclude": ["src/core"]
}

@@ -9,3 +9,4 @@ {

"declarationMap": true
}
},
"exclude": ["src/core"]
}

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