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

@solana/errors

Package Overview
Dependencies
Maintainers
15
Versions
952
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@solana/errors - npm Package Compare versions

Comparing version 2.0.0-experimental.2d1d49c to 2.0.0-experimental.34c3228

6

dist/cli.js

@@ -13,6 +13,12 @@ // src/cli.ts

var SOLANA_ERROR__INVALID_KEYPAIR_BYTES = 4;
var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 5;
var SOLANA_ERROR__NONCE_INVALID = 6;
var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 7;
// src/messages.ts
var SolanaErrorMessages = {
[SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: "The network has progressed past the last block for which this transaction could have been committed.",
[SOLANA_ERROR__INVALID_KEYPAIR_BYTES]: "Key pair bytes must be of length 64, got $byteLength.",
[SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: "No nonce account could be found at address `$nonceAccountAddress`",
[SOLANA_ERROR__NONCE_INVALID]: "The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",
[SOLANA_ERROR__RPC_INTEGER_OVERFLOW]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",

@@ -19,0 +25,0 @@ [SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.",

8

dist/index.browser.js

@@ -9,6 +9,12 @@ // ../build-scripts/env-shim.ts

var SOLANA_ERROR__INVALID_KEYPAIR_BYTES = 4;
var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 5;
var SOLANA_ERROR__NONCE_INVALID = 6;
var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 7;
// src/messages.ts
var SolanaErrorMessages = {
[SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: "The network has progressed past the last block for which this transaction could have been committed.",
[SOLANA_ERROR__INVALID_KEYPAIR_BYTES]: "Key pair bytes must be of length 64, got $byteLength.",
[SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: "No nonce account could be found at address `$nonceAccountAddress`",
[SOLANA_ERROR__NONCE_INVALID]: "The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",
[SOLANA_ERROR__RPC_INTEGER_OVERFLOW]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",

@@ -96,4 +102,4 @@ [SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.",

export { SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, isSolanaError };
export { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, isSolanaError };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.browser.js.map

@@ -9,6 +9,12 @@ // ../build-scripts/env-shim.ts

var SOLANA_ERROR__INVALID_KEYPAIR_BYTES = 4;
var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 5;
var SOLANA_ERROR__NONCE_INVALID = 6;
var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 7;
// src/messages.ts
var SolanaErrorMessages = {
[SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: "The network has progressed past the last block for which this transaction could have been committed.",
[SOLANA_ERROR__INVALID_KEYPAIR_BYTES]: "Key pair bytes must be of length 64, got $byteLength.",
[SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: "No nonce account could be found at address `$nonceAccountAddress`",
[SOLANA_ERROR__NONCE_INVALID]: "The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",
[SOLANA_ERROR__RPC_INTEGER_OVERFLOW]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",

@@ -96,4 +102,4 @@ [SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.",

export { SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, isSolanaError };
export { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, isSolanaError };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.native.js.map

@@ -9,6 +9,12 @@ // ../build-scripts/env-shim.ts

var SOLANA_ERROR__INVALID_KEYPAIR_BYTES = 4;
var SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED = 5;
var SOLANA_ERROR__NONCE_INVALID = 6;
var SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND = 7;
// src/messages.ts
var SolanaErrorMessages = {
[SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: "The network has progressed past the last block for which this transaction could have been committed.",
[SOLANA_ERROR__INVALID_KEYPAIR_BYTES]: "Key pair bytes must be of length 64, got $byteLength.",
[SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: "No nonce account could be found at address `$nonceAccountAddress`",
[SOLANA_ERROR__NONCE_INVALID]: "The nonce `$expectedNonceValue` is no longer valid. It has advanced to `$actualNonceValue`",
[SOLANA_ERROR__RPC_INTEGER_OVERFLOW]: "The $argumentLabel argument to the `$methodName` RPC method$optionalPathLabel was `$value`. This number is unsafe for use with the Solana JSON-RPC because it exceeds `Number.MAX_SAFE_INTEGER`.",

@@ -96,4 +102,4 @@ [SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.",

export { SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, isSolanaError };
export { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE, SolanaError, isSolanaError };
//# sourceMappingURL=out.js.map
//# sourceMappingURL=index.node.js.map

5

dist/types/codes.d.ts

@@ -13,2 +13,5 @@ /**

export declare const SOLANA_ERROR__INVALID_KEYPAIR_BYTES: 4;
export declare const SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED: 5;
export declare const SOLANA_ERROR__NONCE_INVALID: 6;
export declare const SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND: 7;
/**

@@ -29,3 +32,3 @@ * A union of every Solana error code

*/
export type SolanaErrorCode = typeof SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES | typeof SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE | typeof SOLANA_ERROR__RPC_INTEGER_OVERFLOW | typeof SOLANA_ERROR__INVALID_KEYPAIR_BYTES;
export type SolanaErrorCode = typeof SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES | typeof SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE | typeof SOLANA_ERROR__RPC_INTEGER_OVERFLOW | typeof SOLANA_ERROR__INVALID_KEYPAIR_BYTES | typeof SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED | typeof SOLANA_ERROR__NONCE_INVALID | typeof SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND;
//# sourceMappingURL=codes.d.ts.map

@@ -1,2 +0,2 @@

import { SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SolanaErrorCode } from './codes.js';
import { SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED, SOLANA_ERROR__INVALID_KEYPAIR_BYTES, SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND, SOLANA_ERROR__NONCE_INVALID, SOLANA_ERROR__RPC_INTEGER_OVERFLOW, SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES, SolanaErrorCode } from './codes.js';
export type DefaultUnspecifiedErrorContextToUndefined<T> = {

@@ -13,2 +13,6 @@ [P in SolanaErrorCode]: P extends keyof T ? T[P] : undefined;

export type SolanaErrorContext = DefaultUnspecifiedErrorContextToUndefined<{
[SOLANA_ERROR__BLOCK_HEIGHT_EXCEEDED]: {
currentBlockHeight: bigint;
lastValidBlockHeight: bigint;
};
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: {

@@ -28,3 +32,10 @@ addresses: string[];

};
[SOLANA_ERROR__NONCE_ACCOUNT_NOT_FOUND]: {
nonceAccountAddress: string;
};
[SOLANA_ERROR__NONCE_INVALID]: {
actualNonceValue: string;
expectedNonceValue: string;
};
}>;
//# sourceMappingURL=context.d.ts.map
{
"name": "@solana/errors",
"version": "2.0.0-experimental.2d1d49c",
"version": "2.0.0-experimental.34c3228",
"description": "Throw, identify, and decode Solana JavaScript errors",

@@ -53,29 +53,5 @@ "exports": {

"dependencies": {
"commander": "^11.1.0",
"chalk": "^5.3.0"
"chalk": "^5.3.0",
"commander": "^11.1.0"
},
"devDependencies": {
"@solana/eslint-config-solana": "^1.0.2",
"@swc/jest": "^0.2.29",
"@types/jest": "^29.5.11",
"@types/node": "18.11.19",
"@typescript-eslint/eslint-plugin": "^6.13.2",
"@typescript-eslint/parser": "^6.3.0",
"agadoo": "^3.0.0",
"eslint": "^8.45.0",
"eslint-plugin-jest": "^27.4.2",
"eslint-plugin-sort-keys-fix": "^1.1.2",
"jest": "^29.7.0",
"jest-environment-jsdom": "^29.7.0",
"jest-runner-eslint": "^2.1.2",
"jest-runner-prettier": "^1.0.0",
"prettier": "^3.1",
"tsup": "^8.0.1",
"typescript": "^5.2.2",
"version-from-git": "^1.1.1",
"@solana/addresses": "2.0.0-experimental.2d1d49c",
"build-scripts": "0.0.0",
"test-config": "0.0.0",
"tsconfig": "0.0.0"
},
"bundlewatch": {

@@ -91,8 +67,9 @@ "defaultCompression": "gzip",

"compile:js": "tsup --config build-scripts/tsup.config.package.ts && tsup src/cli.ts --format esm",
"compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/build-scripts/add-js-extension-to-types.mjs",
"dev": "jest -c node_modules/test-config/jest-dev.config.ts --rootDir . --watch",
"publish-packages": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag experimental --access public --no-git-checks",
"compile:typedefs": "tsc -p ./tsconfig.declarations.json && node node_modules/@solana/build-scripts/add-js-extension-to-types.mjs",
"dev": "jest -c node_modules/@solana/test-config/jest-dev.config.ts --rootDir . --watch",
"publish-impl": "npm view $npm_package_name@$npm_package_version > /dev/null 2>&1 || pnpm publish --tag experimental --access public --no-git-checks",
"publish-packages": "pnpm prepublishOnly && pnpm publish-impl",
"style:fix": "pnpm eslint --fix src/* && pnpm prettier -w src/* package.json",
"test:lint": "jest -c node_modules/test-config/jest-lint.config.ts --rootDir . --silent",
"test:prettier": "jest -c node_modules/test-config/jest-prettier.config.ts --rootDir . --silent",
"test:lint": "jest -c node_modules/@solana/test-config/jest-lint.config.ts --rootDir . --silent",
"test:prettier": "jest -c node_modules/@solana/test-config/jest-prettier.config.ts --rootDir . --silent",
"test:treeshakability:browser": "agadoo dist/index.browser.js",

@@ -102,5 +79,5 @@ "test:treeshakability:native": "agadoo dist/index.native.js",

"test:typecheck": "tsc --noEmit",
"test:unit:browser": "jest -c node_modules/test-config/jest-unit.config.browser.ts --rootDir . --silent",
"test:unit:node": "jest -c node_modules/test-config/jest-unit.config.node.ts --rootDir . --silent"
"test:unit:browser": "jest -c node_modules/@solana/test-config/jest-unit.config.browser.ts --rootDir . --silent",
"test:unit:node": "jest -c node_modules/@solana/test-config/jest-unit.config.node.ts --rootDir . --silent"
}
}

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