@solana/errors
Advanced tools
Comparing version 2.0.0-experimental.dd2096e to 2.0.0-experimental.e15a66f
@@ -12,7 +12,15 @@ // src/cli.ts | ||
var SOLANA_ERROR__RPC_INTEGER_OVERFLOW = 3; | ||
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__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`", | ||
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses", | ||
[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`.", | ||
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.", | ||
[SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer." | ||
@@ -19,0 +27,0 @@ }; |
@@ -8,7 +8,15 @@ // ../build-scripts/env-shim.ts | ||
var SOLANA_ERROR__RPC_INTEGER_OVERFLOW = 3; | ||
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__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`", | ||
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses", | ||
[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`.", | ||
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.", | ||
[SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer." | ||
@@ -94,4 +102,4 @@ }; | ||
export { 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 |
@@ -8,7 +8,15 @@ // ../build-scripts/env-shim.ts | ||
var SOLANA_ERROR__RPC_INTEGER_OVERFLOW = 3; | ||
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__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`", | ||
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses", | ||
[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`.", | ||
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.", | ||
[SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer." | ||
@@ -94,4 +102,4 @@ }; | ||
export { 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 |
@@ -8,7 +8,15 @@ // ../build-scripts/env-shim.ts | ||
var SOLANA_ERROR__RPC_INTEGER_OVERFLOW = 3; | ||
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__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`", | ||
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses", | ||
[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`.", | ||
[SOLANA_ERROR__TRANSACTION_MISSING_SIGNATURES]: "Transaction is missing signatures for addresses: $addresses.", | ||
[SOLANA_ERROR__TRANSACTION_SIGNATURE_NOT_COMPUTABLE]: "Could not determine this transaction's signature. Make sure that the transaction has been signed by its fee payer." | ||
@@ -94,4 +102,4 @@ }; | ||
export { 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 |
@@ -12,2 +12,6 @@ /** | ||
export declare const SOLANA_ERROR__RPC_INTEGER_OVERFLOW: 3; | ||
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; | ||
/** | ||
@@ -28,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; | ||
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__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]: { | ||
@@ -25,3 +29,13 @@ addresses: string[]; | ||
}; | ||
[SOLANA_ERROR__INVALID_KEYPAIR_BYTES]: { | ||
byteLength: number; | ||
}; | ||
[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.dd2096e", | ||
"version": "2.0.0-experimental.e15a66f", | ||
"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", | ||
"build-scripts": "0.0.0", | ||
"test-config": "0.0.0", | ||
"tsconfig": "0.0.0", | ||
"@solana/addresses": "2.0.0-experimental.dd2096e" | ||
}, | ||
"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": "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
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
97023
0
783