@vechain/sdk-errors
Advanced tools
Comparing version
@@ -590,4 +590,4 @@ /** | ||
readonly data: TErrorDataType; | ||
readonly innerError?: unknown | undefined; | ||
constructor(methodName: string, errorMessage: string, data: TErrorDataType, innerError?: unknown | undefined); | ||
readonly innerError?: unknown; | ||
constructor(methodName: string, errorMessage: string, data: TErrorDataType, innerError?: unknown); | ||
} | ||
@@ -601,5 +601,6 @@ | ||
/** | ||
* Invalid data to encode/decode abi. | ||
* Invalid data to encode/decode abi error | ||
* | ||
* This error is thrown when the data to encode or decode into abi is invalid. | ||
* WHEN TO USE: | ||
* * This error will be thrown when the data to encode or decode into abi is invalid. | ||
*/ | ||
@@ -609,5 +610,6 @@ declare class InvalidAbiDataToEncodeOrDecode extends VechainSDKError<ObjectErrorData> { | ||
/** | ||
* Invalid fragment type. | ||
* Invalid abi fragment error | ||
* | ||
* This error is thrown when the fragment type is invalid. | ||
* WHEN TO USE: | ||
* * This error will be thrown when the abi fragment is invalid. | ||
*/ | ||
@@ -620,5 +622,6 @@ declare class InvalidAbiFragment extends VechainSDKError<{ | ||
/** | ||
* Invalid abi signature format. | ||
* Invalid abi signature format error | ||
* | ||
* This error is thrown when the abi signature format is invalid. | ||
* WHEN TO USE: | ||
* * This error will be thrown when the abi signature format is invalid. | ||
*/ | ||
@@ -631,5 +634,6 @@ declare class InvalidAbiSignatureFormat extends VechainSDKError<{ | ||
/** | ||
* Invalid address error to be thrown when an invalid address is detected. | ||
* Invalid address error | ||
* | ||
* This error is thrown when an invalid address is detected. | ||
* WHEN TO USE: | ||
* * This error will be thrown when the address is invalid. | ||
*/ | ||
@@ -642,6 +646,35 @@ declare class InvalidAddress extends VechainSDKError<{ | ||
/** | ||
* Invalid data error to be thrown when invalid data is detected. | ||
* Invalid bloom error. | ||
* | ||
* This error is thrown when invalid data is detected. | ||
* WHEN TO USE: | ||
* * Error will be thrown when the bloom is invalid. | ||
*/ | ||
declare class InvalidBloom extends VechainSDKError<ObjectErrorData> { | ||
} | ||
/** | ||
* Invalid bloom params error. | ||
* | ||
* WHEN TO USE: | ||
* * Error will be thrown when the bloom params are invalid. | ||
*/ | ||
declare class InvalidBloomParams extends VechainSDKError<ObjectErrorData> { | ||
} | ||
/** | ||
* Certificate Signature error. | ||
* | ||
* WHEN TO USE: | ||
* * This error will be thrown when the certificate signature is invalid | ||
* OR the certificate is not signed, or has in general signature errors. | ||
*/ | ||
declare class CertificateSignature extends VechainSDKError<ObjectErrorData> { | ||
} | ||
/** | ||
* Invalid data type error. | ||
* | ||
* WHEN TO USE: | ||
* * This error will be thrown when the data type is invalid. | ||
* -e.g.- when the data type is not a string, number, boolean, or object. | ||
*/ | ||
declare class InvalidDataType extends VechainSDKError<ObjectErrorData> { | ||
@@ -651,6 +684,49 @@ } | ||
/** | ||
* Invalid RLP error is thrown. | ||
* Invalid HDNode mnemonic error. | ||
* | ||
* This error is thrown when an invalid RLP is detected. | ||
* WHEN TO USE: | ||
* * This error will be thrown when the HDNode mnemonic is invalid. | ||
* | ||
* @note Data (mnemonic) is undefined for security reasons, the mnemonic should not be logged! | ||
*/ | ||
declare class InvalidHDNodeMnemonic extends VechainSDKError<undefined | { | ||
wordlistSize: number; | ||
}> { | ||
} | ||
/** | ||
* Invalid HDNode error. | ||
* | ||
* WHEN TO USE: | ||
* * This error will be thrown when the HDNode is invalid (derivation path / chainCode / public key parameters). | ||
*/ | ||
declare class InvalidHDNode extends VechainSDKError<{ | ||
derivationPath?: string; | ||
chainCode?: Uint8Array; | ||
publicKey?: Uint8Array; | ||
}> { | ||
} | ||
/** | ||
* Invalid keystore error. | ||
* | ||
* WHEN TO USE: | ||
* * Error will be thrown when the keystore is invalid. | ||
*/ | ||
declare class InvalidKeystore extends VechainSDKError<ObjectErrorData> { | ||
} | ||
/** | ||
* Invalid keystore params error. | ||
* | ||
* WHEN TO USE: | ||
* * Error will be thrown when the keystore params are invalid. | ||
*/ | ||
declare class InvalidKeystoreParams extends VechainSDKError<ObjectErrorData> { | ||
} | ||
/** | ||
* Invalid RLP error. | ||
* | ||
* WHEN TO USE: | ||
* * Error will be thrown when the RLP is invalid. | ||
*/ | ||
declare class InvalidRLP extends VechainSDKError<{ | ||
@@ -663,7 +739,8 @@ context: string; | ||
/** | ||
* Invalid private error to be thrown when an invalid private key is detected. | ||
* Invalid secp256k1 private key error. | ||
* | ||
* This error is thrown when an invalid private key is detected. | ||
* WHEN TO USE: | ||
* * Error will be thrown when the secp256k1 private key is invalid. | ||
* | ||
* @note Data is null because for security reasons, the private key should not be logged! | ||
* @note Data (private key) is undefined for security reasons, the private key should not be logged! | ||
*/ | ||
@@ -673,5 +750,6 @@ declare class InvalidSecp256k1PrivateKey extends VechainSDKError<undefined> { | ||
/** | ||
* Invalid message hash error to be thrown when an invalid message hash is detected. | ||
* Invalid secp256k1 message hash error. | ||
* | ||
* This error is thrown when an invalid message hash is detected. | ||
* WHEN TO USE: | ||
* * Error will be thrown when the secp256k1 message hash is invalid. | ||
*/ | ||
@@ -682,9 +760,19 @@ declare class InvalidSecp256k1MessageHash extends VechainSDKError<{ | ||
} | ||
/** | ||
* Invalid secp256k1 signature error. | ||
* | ||
* WHEN TO USE: | ||
* * Error will be thrown when the secp256k1 signature is invalid. | ||
*/ | ||
declare class InvalidSecp256k1Signature extends VechainSDKError<{ | ||
signature: Uint8Array; | ||
recovery?: number; | ||
}> { | ||
} | ||
/** | ||
* Unavailable transaction field name. | ||
* Unavailable transaction field (field name) error. | ||
* | ||
* This error is thrown a field name in a transaction is unavailable. | ||
* | ||
* e.g. we want to get the value of 'delegator' or 'id' or 'origin' from a not signed transaction | ||
* WHEN TO USE: | ||
* * Error will be thrown when a transaction (field name) in a transaction is unavailable. | ||
*/ | ||
@@ -695,2 +783,20 @@ declare class UnavailableTransactionField extends VechainSDKError<{ | ||
} | ||
/** | ||
* Invalid transaction field (field name) error. | ||
* | ||
* WHEN TO USE: | ||
* * Error will be thrown when a transaction (field name) in a transaction is invalid. | ||
*/ | ||
declare class InvalidTransactionField extends VechainSDKError<{ | ||
fieldName: string; | ||
} & ObjectErrorData> { | ||
} | ||
/** | ||
* Not delegated transaction error. | ||
* | ||
* WHEN TO USE: | ||
* * Error will be thrown when the transaction is not delegated. | ||
*/ | ||
declare class NotDelegatedTransaction extends VechainSDKError<undefined> { | ||
} | ||
@@ -800,2 +906,4 @@ /** | ||
declare const errors_CertificateNotSignedError: typeof CertificateNotSignedError; | ||
type errors_CertificateSignature = CertificateSignature; | ||
declare const errors_CertificateSignature: typeof CertificateSignature; | ||
type errors_ContractDeploymentFailedError = ContractDeploymentFailedError; | ||
@@ -857,4 +965,8 @@ declare const errors_ContractDeploymentFailedError: typeof ContractDeploymentFailedError; | ||
declare const errors_InvalidAddressError: typeof InvalidAddressError; | ||
type errors_InvalidBloom = InvalidBloom; | ||
declare const errors_InvalidBloom: typeof InvalidBloom; | ||
type errors_InvalidBloomError = InvalidBloomError; | ||
declare const errors_InvalidBloomError: typeof InvalidBloomError; | ||
type errors_InvalidBloomParams = InvalidBloomParams; | ||
declare const errors_InvalidBloomParams: typeof InvalidBloomParams; | ||
type errors_InvalidDataReturnTypeError = InvalidDataReturnTypeError; | ||
@@ -866,2 +978,4 @@ declare const errors_InvalidDataReturnTypeError: typeof InvalidDataReturnTypeError; | ||
declare const errors_InvalidDataTypeError: typeof InvalidDataTypeError; | ||
type errors_InvalidHDNode = InvalidHDNode; | ||
declare const errors_InvalidHDNode: typeof InvalidHDNode; | ||
type errors_InvalidHDNodeChaincodeError = InvalidHDNodeChaincodeError; | ||
@@ -871,2 +985,4 @@ declare const errors_InvalidHDNodeChaincodeError: typeof InvalidHDNodeChaincodeError; | ||
declare const errors_InvalidHDNodeDerivationPathError: typeof InvalidHDNodeDerivationPathError; | ||
type errors_InvalidHDNodeMnemonic = InvalidHDNodeMnemonic; | ||
declare const errors_InvalidHDNodeMnemonic: typeof InvalidHDNodeMnemonic; | ||
type errors_InvalidHDNodeMnemonicsError = InvalidHDNodeMnemonicsError; | ||
@@ -880,4 +996,8 @@ declare const errors_InvalidHDNodeMnemonicsError: typeof InvalidHDNodeMnemonicsError; | ||
declare const errors_InvalidKError: typeof InvalidKError; | ||
type errors_InvalidKeystore = InvalidKeystore; | ||
declare const errors_InvalidKeystore: typeof InvalidKeystore; | ||
type errors_InvalidKeystoreError = InvalidKeystoreError; | ||
declare const errors_InvalidKeystoreError: typeof InvalidKeystoreError; | ||
type errors_InvalidKeystoreParams = InvalidKeystoreParams; | ||
declare const errors_InvalidKeystoreParams: typeof InvalidKeystoreParams; | ||
type errors_InvalidKeystorePasswordError = InvalidKeystorePasswordError; | ||
@@ -898,2 +1018,4 @@ declare const errors_InvalidKeystorePasswordError: typeof InvalidKeystorePasswordError; | ||
declare const errors_InvalidSecp256k1PrivateKeyError: typeof InvalidSecp256k1PrivateKeyError; | ||
type errors_InvalidSecp256k1Signature = InvalidSecp256k1Signature; | ||
declare const errors_InvalidSecp256k1Signature: typeof InvalidSecp256k1Signature; | ||
type errors_InvalidSecp256k1SignatureError = InvalidSecp256k1SignatureError; | ||
@@ -903,2 +1025,4 @@ declare const errors_InvalidSecp256k1SignatureError: typeof InvalidSecp256k1SignatureError; | ||
declare const errors_InvalidSecp256k1SignatureRecoveryError: typeof InvalidSecp256k1SignatureRecoveryError; | ||
type errors_InvalidTransactionField = InvalidTransactionField; | ||
declare const errors_InvalidTransactionField: typeof InvalidTransactionField; | ||
type errors_JSONRPC = JSONRPC; | ||
@@ -917,2 +1041,4 @@ declare const errors_JSONRPC: typeof JSONRPC; | ||
declare const errors_KEYSTORE: typeof KEYSTORE; | ||
type errors_NotDelegatedTransaction = NotDelegatedTransaction; | ||
declare const errors_NotDelegatedTransaction: typeof NotDelegatedTransaction; | ||
type errors_NotImplementedError = NotImplementedError; | ||
@@ -958,5 +1084,5 @@ declare const errors_NotImplementedError: typeof NotImplementedError; | ||
declare namespace errors { | ||
export { errors_ABI as ABI, errors_ADDRESS as ADDRESS, errors_BLOOM as BLOOM, errors_CERTIFICATE as CERTIFICATE, errors_CONTRACT as CONTRACT, errors_CertificateInvalidSignatureFormatError as CertificateInvalidSignatureFormatError, errors_CertificateInvalidSignerError as CertificateInvalidSignerError, errors_CertificateNotSignedError as CertificateNotSignedError, errors_ContractDeploymentFailedError as ContractDeploymentFailedError, errors_ContractInterfaceError as ContractInterfaceError, errors_DATA as DATA, type errors_DataType as DataType, type errors_DefaultErrorData as DefaultErrorData, errors_EIP1193 as EIP1193, errors_EIP1193ChainDisconnected as EIP1193ChainDisconnected, errors_EIP1193Disconnected as EIP1193Disconnected, type errors_EIP1193ProviderRpcErrorData as EIP1193ProviderRpcErrorData, errors_EIP1193Unauthorized as EIP1193Unauthorized, errors_EIP1193UnsupportedMethod as EIP1193UnsupportedMethod, errors_EIP1193UserRejectedRequest as EIP1193UserRejectedRequest, errors_ERROR_CODES as ERROR_CODES, errors_ErrorBase as ErrorBase, errors_ErrorClassMap as ErrorClassMap, type errors_ErrorCode as ErrorCode, type errors_ErrorType as ErrorType, errors_FUNCTION as FUNCTION, errors_HDNODE as HDNODE, errors_HTTPClientError as HTTPClientError, type errors_HTTPClientErrorData as HTTPClientErrorData, errors_HTTP_CLIENT as HTTP_CLIENT, errors_InvalidAbiDataToDecodeError as InvalidAbiDataToDecodeError, errors_InvalidAbiDataToEncodeError as InvalidAbiDataToEncodeError, errors_InvalidAbiDataToEncodeOrDecode as InvalidAbiDataToEncodeOrDecode, errors_InvalidAbiEventError as InvalidAbiEventError, errors_InvalidAbiFormatTypeError as InvalidAbiFormatTypeError, errors_InvalidAbiFragment as InvalidAbiFragment, errors_InvalidAbiFunctionError as InvalidAbiFunctionError, errors_InvalidAbiSignatureFormat as InvalidAbiSignatureFormat, errors_InvalidAddress as InvalidAddress, errors_InvalidAddressError as InvalidAddressError, errors_InvalidBloomError as InvalidBloomError, errors_InvalidDataReturnTypeError as InvalidDataReturnTypeError, errors_InvalidDataType as InvalidDataType, errors_InvalidDataTypeError as InvalidDataTypeError, errors_InvalidHDNodeChaincodeError as InvalidHDNodeChaincodeError, errors_InvalidHDNodeDerivationPathError as InvalidHDNodeDerivationPathError, errors_InvalidHDNodeMnemonicsError as InvalidHDNodeMnemonicsError, errors_InvalidHDNodePrivateKeyError as InvalidHDNodePrivateKeyError, errors_InvalidHDNodePublicKeyError as InvalidHDNodePublicKeyError, errors_InvalidKError as InvalidKError, errors_InvalidKeystoreError as InvalidKeystoreError, errors_InvalidKeystorePasswordError as InvalidKeystorePasswordError, errors_InvalidRLP as InvalidRLP, errors_InvalidRLPError as InvalidRLPError, type errors_InvalidRLPErrorData as InvalidRLPErrorData, errors_InvalidSecp256k1MessageHash as InvalidSecp256k1MessageHash, errors_InvalidSecp256k1MessageHashError as InvalidSecp256k1MessageHashError, errors_InvalidSecp256k1PrivateKey as InvalidSecp256k1PrivateKey, errors_InvalidSecp256k1PrivateKeyError as InvalidSecp256k1PrivateKeyError, errors_InvalidSecp256k1SignatureError as InvalidSecp256k1SignatureError, errors_InvalidSecp256k1SignatureRecoveryError as InvalidSecp256k1SignatureRecoveryError, errors_JSONRPC as JSONRPC, errors_JSONRPCDefaultError as JSONRPCDefaultError, type errors_JSONRPCErrorData as JSONRPCErrorData, errors_JSONRPCInternalError as JSONRPCInternalError, errors_JSONRPCInvalidParams as JSONRPCInvalidParams, errors_JSONRPCInvalidRequest as JSONRPCInvalidRequest, errors_KEYSTORE as KEYSTORE, errors_NotImplementedError as NotImplementedError, type errors_ObjectErrorData as ObjectErrorData, errors_POLL_ERROR as POLL_ERROR, type errors_PollErrorData as PollErrorData, errors_PollExecutionError as PollExecutionError, errors_ProviderRpcError as ProviderRpcError, errors_RLP_ERRORS as RLP_ERRORS, errors_SECP256K1 as SECP256K1, errors_TRANSACTION as TRANSACTION, errors_TransactionAlreadySignedError as TransactionAlreadySignedError, errors_TransactionBodyError as TransactionBodyError, errors_TransactionDelegationError as TransactionDelegationError, errors_TransactionMissingPrivateKeyError as TransactionMissingPrivateKeyError, errors_TransactionNotSignedError as TransactionNotSignedError, errors_UnavailableTransactionField as UnavailableTransactionField, errors_VechainSDKError as VechainSDKError, errors_assert as assert, errors_assertInnerError as assertInnerError, errors_buildError as buildError, errors_buildErrorMessage as buildErrorMessage, errors_buildProviderError as buildProviderError, errors_createErrorMessage as createErrorMessage, errors_getEIP1193ErrorCode as getEIP1193ErrorCode, errors_getJSONRPCErrorCode as getJSONRPCErrorCode, errors_stringifyData as stringifyData }; | ||
export { errors_ABI as ABI, errors_ADDRESS as ADDRESS, errors_BLOOM as BLOOM, errors_CERTIFICATE as CERTIFICATE, errors_CONTRACT as CONTRACT, errors_CertificateInvalidSignatureFormatError as CertificateInvalidSignatureFormatError, errors_CertificateInvalidSignerError as CertificateInvalidSignerError, errors_CertificateNotSignedError as CertificateNotSignedError, errors_CertificateSignature as CertificateSignature, errors_ContractDeploymentFailedError as ContractDeploymentFailedError, errors_ContractInterfaceError as ContractInterfaceError, errors_DATA as DATA, type errors_DataType as DataType, type errors_DefaultErrorData as DefaultErrorData, errors_EIP1193 as EIP1193, errors_EIP1193ChainDisconnected as EIP1193ChainDisconnected, errors_EIP1193Disconnected as EIP1193Disconnected, type errors_EIP1193ProviderRpcErrorData as EIP1193ProviderRpcErrorData, errors_EIP1193Unauthorized as EIP1193Unauthorized, errors_EIP1193UnsupportedMethod as EIP1193UnsupportedMethod, errors_EIP1193UserRejectedRequest as EIP1193UserRejectedRequest, errors_ERROR_CODES as ERROR_CODES, errors_ErrorBase as ErrorBase, errors_ErrorClassMap as ErrorClassMap, type errors_ErrorCode as ErrorCode, type errors_ErrorType as ErrorType, errors_FUNCTION as FUNCTION, errors_HDNODE as HDNODE, errors_HTTPClientError as HTTPClientError, type errors_HTTPClientErrorData as HTTPClientErrorData, errors_HTTP_CLIENT as HTTP_CLIENT, errors_InvalidAbiDataToDecodeError as InvalidAbiDataToDecodeError, errors_InvalidAbiDataToEncodeError as InvalidAbiDataToEncodeError, errors_InvalidAbiDataToEncodeOrDecode as InvalidAbiDataToEncodeOrDecode, errors_InvalidAbiEventError as InvalidAbiEventError, errors_InvalidAbiFormatTypeError as InvalidAbiFormatTypeError, errors_InvalidAbiFragment as InvalidAbiFragment, errors_InvalidAbiFunctionError as InvalidAbiFunctionError, errors_InvalidAbiSignatureFormat as InvalidAbiSignatureFormat, errors_InvalidAddress as InvalidAddress, errors_InvalidAddressError as InvalidAddressError, errors_InvalidBloom as InvalidBloom, errors_InvalidBloomError as InvalidBloomError, errors_InvalidBloomParams as InvalidBloomParams, errors_InvalidDataReturnTypeError as InvalidDataReturnTypeError, errors_InvalidDataType as InvalidDataType, errors_InvalidDataTypeError as InvalidDataTypeError, errors_InvalidHDNode as InvalidHDNode, errors_InvalidHDNodeChaincodeError as InvalidHDNodeChaincodeError, errors_InvalidHDNodeDerivationPathError as InvalidHDNodeDerivationPathError, errors_InvalidHDNodeMnemonic as InvalidHDNodeMnemonic, errors_InvalidHDNodeMnemonicsError as InvalidHDNodeMnemonicsError, errors_InvalidHDNodePrivateKeyError as InvalidHDNodePrivateKeyError, errors_InvalidHDNodePublicKeyError as InvalidHDNodePublicKeyError, errors_InvalidKError as InvalidKError, errors_InvalidKeystore as InvalidKeystore, errors_InvalidKeystoreError as InvalidKeystoreError, errors_InvalidKeystoreParams as InvalidKeystoreParams, errors_InvalidKeystorePasswordError as InvalidKeystorePasswordError, errors_InvalidRLP as InvalidRLP, errors_InvalidRLPError as InvalidRLPError, type errors_InvalidRLPErrorData as InvalidRLPErrorData, errors_InvalidSecp256k1MessageHash as InvalidSecp256k1MessageHash, errors_InvalidSecp256k1MessageHashError as InvalidSecp256k1MessageHashError, errors_InvalidSecp256k1PrivateKey as InvalidSecp256k1PrivateKey, errors_InvalidSecp256k1PrivateKeyError as InvalidSecp256k1PrivateKeyError, errors_InvalidSecp256k1Signature as InvalidSecp256k1Signature, errors_InvalidSecp256k1SignatureError as InvalidSecp256k1SignatureError, errors_InvalidSecp256k1SignatureRecoveryError as InvalidSecp256k1SignatureRecoveryError, errors_InvalidTransactionField as InvalidTransactionField, errors_JSONRPC as JSONRPC, errors_JSONRPCDefaultError as JSONRPCDefaultError, type errors_JSONRPCErrorData as JSONRPCErrorData, errors_JSONRPCInternalError as JSONRPCInternalError, errors_JSONRPCInvalidParams as JSONRPCInvalidParams, errors_JSONRPCInvalidRequest as JSONRPCInvalidRequest, errors_KEYSTORE as KEYSTORE, errors_NotDelegatedTransaction as NotDelegatedTransaction, errors_NotImplementedError as NotImplementedError, type errors_ObjectErrorData as ObjectErrorData, errors_POLL_ERROR as POLL_ERROR, type errors_PollErrorData as PollErrorData, errors_PollExecutionError as PollExecutionError, errors_ProviderRpcError as ProviderRpcError, errors_RLP_ERRORS as RLP_ERRORS, errors_SECP256K1 as SECP256K1, errors_TRANSACTION as TRANSACTION, errors_TransactionAlreadySignedError as TransactionAlreadySignedError, errors_TransactionBodyError as TransactionBodyError, errors_TransactionDelegationError as TransactionDelegationError, errors_TransactionMissingPrivateKeyError as TransactionMissingPrivateKeyError, errors_TransactionNotSignedError as TransactionNotSignedError, errors_UnavailableTransactionField as UnavailableTransactionField, errors_VechainSDKError as VechainSDKError, errors_assert as assert, errors_assertInnerError as assertInnerError, errors_buildError as buildError, errors_buildErrorMessage as buildErrorMessage, errors_buildProviderError as buildProviderError, errors_createErrorMessage as createErrorMessage, errors_getEIP1193ErrorCode as getEIP1193ErrorCode, errors_getJSONRPCErrorCode as getJSONRPCErrorCode, errors_stringifyData as stringifyData }; | ||
} | ||
export { ABI, ADDRESS, BLOOM, CERTIFICATE, CONTRACT, CertificateInvalidSignatureFormatError, CertificateInvalidSignerError, CertificateNotSignedError, ContractDeploymentFailedError, ContractInterfaceError, DATA, type DataType, type DefaultErrorData, EIP1193, EIP1193ChainDisconnected, EIP1193Disconnected, type EIP1193ProviderRpcErrorData, EIP1193Unauthorized, EIP1193UnsupportedMethod, EIP1193UserRejectedRequest, ERROR_CODES, ErrorBase, ErrorClassMap, type ErrorCode, type ErrorType, FUNCTION, HDNODE, HTTPClientError, type HTTPClientErrorData, HTTP_CLIENT, InvalidAbiDataToDecodeError, InvalidAbiDataToEncodeError, InvalidAbiDataToEncodeOrDecode, InvalidAbiEventError, InvalidAbiFormatTypeError, InvalidAbiFragment, InvalidAbiFunctionError, InvalidAbiSignatureFormat, InvalidAddress, InvalidAddressError, InvalidBloomError, InvalidDataReturnTypeError, InvalidDataType, InvalidDataTypeError, InvalidHDNodeChaincodeError, InvalidHDNodeDerivationPathError, InvalidHDNodeMnemonicsError, InvalidHDNodePrivateKeyError, InvalidHDNodePublicKeyError, InvalidKError, InvalidKeystoreError, InvalidKeystorePasswordError, InvalidRLP, InvalidRLPError, type InvalidRLPErrorData, InvalidSecp256k1MessageHash, InvalidSecp256k1MessageHashError, InvalidSecp256k1PrivateKey, InvalidSecp256k1PrivateKeyError, InvalidSecp256k1SignatureError, InvalidSecp256k1SignatureRecoveryError, JSONRPC, JSONRPCDefaultError, type JSONRPCErrorData, JSONRPCInternalError, JSONRPCInvalidParams, JSONRPCInvalidRequest, KEYSTORE, NotImplementedError, type ObjectErrorData, POLL_ERROR, type PollErrorData, PollExecutionError, ProviderRpcError, RLP_ERRORS, SECP256K1, TRANSACTION, TransactionAlreadySignedError, TransactionBodyError, TransactionDelegationError, TransactionMissingPrivateKeyError, TransactionNotSignedError, UnavailableTransactionField, VechainSDKError, assert, assertInnerError, buildError, buildErrorMessage, buildProviderError, createErrorMessage, errors, getEIP1193ErrorCode, getJSONRPCErrorCode, stringifyData }; | ||
export { ABI, ADDRESS, BLOOM, CERTIFICATE, CONTRACT, CertificateInvalidSignatureFormatError, CertificateInvalidSignerError, CertificateNotSignedError, CertificateSignature, ContractDeploymentFailedError, ContractInterfaceError, DATA, type DataType, type DefaultErrorData, EIP1193, EIP1193ChainDisconnected, EIP1193Disconnected, type EIP1193ProviderRpcErrorData, EIP1193Unauthorized, EIP1193UnsupportedMethod, EIP1193UserRejectedRequest, ERROR_CODES, ErrorBase, ErrorClassMap, type ErrorCode, type ErrorType, FUNCTION, HDNODE, HTTPClientError, type HTTPClientErrorData, HTTP_CLIENT, InvalidAbiDataToDecodeError, InvalidAbiDataToEncodeError, InvalidAbiDataToEncodeOrDecode, InvalidAbiEventError, InvalidAbiFormatTypeError, InvalidAbiFragment, InvalidAbiFunctionError, InvalidAbiSignatureFormat, InvalidAddress, InvalidAddressError, InvalidBloom, InvalidBloomError, InvalidBloomParams, InvalidDataReturnTypeError, InvalidDataType, InvalidDataTypeError, InvalidHDNode, InvalidHDNodeChaincodeError, InvalidHDNodeDerivationPathError, InvalidHDNodeMnemonic, InvalidHDNodeMnemonicsError, InvalidHDNodePrivateKeyError, InvalidHDNodePublicKeyError, InvalidKError, InvalidKeystore, InvalidKeystoreError, InvalidKeystoreParams, InvalidKeystorePasswordError, InvalidRLP, InvalidRLPError, type InvalidRLPErrorData, InvalidSecp256k1MessageHash, InvalidSecp256k1MessageHashError, InvalidSecp256k1PrivateKey, InvalidSecp256k1PrivateKeyError, InvalidSecp256k1Signature, InvalidSecp256k1SignatureError, InvalidSecp256k1SignatureRecoveryError, InvalidTransactionField, JSONRPC, JSONRPCDefaultError, type JSONRPCErrorData, JSONRPCInternalError, JSONRPCInvalidParams, JSONRPCInvalidRequest, KEYSTORE, NotDelegatedTransaction, NotImplementedError, type ObjectErrorData, POLL_ERROR, type PollErrorData, PollExecutionError, ProviderRpcError, RLP_ERRORS, SECP256K1, TRANSACTION, TransactionAlreadySignedError, TransactionBodyError, TransactionDelegationError, TransactionMissingPrivateKeyError, TransactionNotSignedError, UnavailableTransactionField, VechainSDKError, assert, assertInnerError, buildError, buildErrorMessage, buildProviderError, createErrorMessage, errors, getEIP1193ErrorCode, getJSONRPCErrorCode, stringifyData }; |
@@ -31,2 +31,3 @@ "use strict"; | ||
CertificateNotSignedError: () => CertificateNotSignedError, | ||
CertificateSignature: () => CertificateSignature, | ||
ContractDeploymentFailedError: () => ContractDeploymentFailedError, | ||
@@ -58,8 +59,12 @@ ContractInterfaceError: () => ContractInterfaceError, | ||
InvalidAddressError: () => InvalidAddressError, | ||
InvalidBloom: () => InvalidBloom, | ||
InvalidBloomError: () => InvalidBloomError, | ||
InvalidBloomParams: () => InvalidBloomParams, | ||
InvalidDataReturnTypeError: () => InvalidDataReturnTypeError, | ||
InvalidDataType: () => InvalidDataType, | ||
InvalidDataTypeError: () => InvalidDataTypeError, | ||
InvalidHDNode: () => InvalidHDNode, | ||
InvalidHDNodeChaincodeError: () => InvalidHDNodeChaincodeError, | ||
InvalidHDNodeDerivationPathError: () => InvalidHDNodeDerivationPathError, | ||
InvalidHDNodeMnemonic: () => InvalidHDNodeMnemonic, | ||
InvalidHDNodeMnemonicsError: () => InvalidHDNodeMnemonicsError, | ||
@@ -69,3 +74,5 @@ InvalidHDNodePrivateKeyError: () => InvalidHDNodePrivateKeyError, | ||
InvalidKError: () => InvalidKError, | ||
InvalidKeystore: () => InvalidKeystore, | ||
InvalidKeystoreError: () => InvalidKeystoreError, | ||
InvalidKeystoreParams: () => InvalidKeystoreParams, | ||
InvalidKeystorePasswordError: () => InvalidKeystorePasswordError, | ||
@@ -78,4 +85,6 @@ InvalidRLP: () => InvalidRLP, | ||
InvalidSecp256k1PrivateKeyError: () => InvalidSecp256k1PrivateKeyError, | ||
InvalidSecp256k1Signature: () => InvalidSecp256k1Signature, | ||
InvalidSecp256k1SignatureError: () => InvalidSecp256k1SignatureError, | ||
InvalidSecp256k1SignatureRecoveryError: () => InvalidSecp256k1SignatureRecoveryError, | ||
InvalidTransactionField: () => InvalidTransactionField, | ||
JSONRPC: () => JSONRPC, | ||
@@ -87,2 +96,3 @@ JSONRPCDefaultError: () => JSONRPCDefaultError, | ||
KEYSTORE: () => KEYSTORE, | ||
NotDelegatedTransaction: () => NotDelegatedTransaction, | ||
NotImplementedError: () => NotImplementedError, | ||
@@ -126,2 +136,3 @@ POLL_ERROR: () => POLL_ERROR, | ||
CertificateNotSignedError: () => CertificateNotSignedError, | ||
CertificateSignature: () => CertificateSignature, | ||
ContractDeploymentFailedError: () => ContractDeploymentFailedError, | ||
@@ -153,8 +164,12 @@ ContractInterfaceError: () => ContractInterfaceError, | ||
InvalidAddressError: () => InvalidAddressError, | ||
InvalidBloom: () => InvalidBloom, | ||
InvalidBloomError: () => InvalidBloomError, | ||
InvalidBloomParams: () => InvalidBloomParams, | ||
InvalidDataReturnTypeError: () => InvalidDataReturnTypeError, | ||
InvalidDataType: () => InvalidDataType, | ||
InvalidDataTypeError: () => InvalidDataTypeError, | ||
InvalidHDNode: () => InvalidHDNode, | ||
InvalidHDNodeChaincodeError: () => InvalidHDNodeChaincodeError, | ||
InvalidHDNodeDerivationPathError: () => InvalidHDNodeDerivationPathError, | ||
InvalidHDNodeMnemonic: () => InvalidHDNodeMnemonic, | ||
InvalidHDNodeMnemonicsError: () => InvalidHDNodeMnemonicsError, | ||
@@ -164,3 +179,5 @@ InvalidHDNodePrivateKeyError: () => InvalidHDNodePrivateKeyError, | ||
InvalidKError: () => InvalidKError, | ||
InvalidKeystore: () => InvalidKeystore, | ||
InvalidKeystoreError: () => InvalidKeystoreError, | ||
InvalidKeystoreParams: () => InvalidKeystoreParams, | ||
InvalidKeystorePasswordError: () => InvalidKeystorePasswordError, | ||
@@ -173,4 +190,6 @@ InvalidRLP: () => InvalidRLP, | ||
InvalidSecp256k1PrivateKeyError: () => InvalidSecp256k1PrivateKeyError, | ||
InvalidSecp256k1Signature: () => InvalidSecp256k1Signature, | ||
InvalidSecp256k1SignatureError: () => InvalidSecp256k1SignatureError, | ||
InvalidSecp256k1SignatureRecoveryError: () => InvalidSecp256k1SignatureRecoveryError, | ||
InvalidTransactionField: () => InvalidTransactionField, | ||
JSONRPC: () => JSONRPC, | ||
@@ -182,2 +201,3 @@ JSONRPCDefaultError: () => JSONRPCDefaultError, | ||
KEYSTORE: () => KEYSTORE, | ||
NotDelegatedTransaction: () => NotDelegatedTransaction, | ||
NotImplementedError: () => NotImplementedError, | ||
@@ -717,2 +737,12 @@ POLL_ERROR: () => POLL_ERROR, | ||
// src/available-errors/bloom/bloom.ts | ||
var InvalidBloom = class extends VechainSDKError { | ||
}; | ||
var InvalidBloomParams = class extends VechainSDKError { | ||
}; | ||
// src/available-errors/certificate/certificate.ts | ||
var CertificateSignature = class extends VechainSDKError { | ||
}; | ||
// src/available-errors/data/data.ts | ||
@@ -722,2 +752,14 @@ var InvalidDataType = class extends VechainSDKError { | ||
// src/available-errors/hdnode/hdnode.ts | ||
var InvalidHDNodeMnemonic = class extends VechainSDKError { | ||
}; | ||
var InvalidHDNode = class extends VechainSDKError { | ||
}; | ||
// src/available-errors/keystore/keystore.ts | ||
var InvalidKeystore = class extends VechainSDKError { | ||
}; | ||
var InvalidKeystoreParams = class extends VechainSDKError { | ||
}; | ||
// src/available-errors/rlp/rlp.ts | ||
@@ -732,2 +774,4 @@ var InvalidRLP = class extends VechainSDKError { | ||
}; | ||
var InvalidSecp256k1Signature = class extends VechainSDKError { | ||
}; | ||
@@ -737,2 +781,6 @@ // src/available-errors/transaction/transaction.ts | ||
}; | ||
var InvalidTransactionField = class extends VechainSDKError { | ||
}; | ||
var NotDelegatedTransaction = class extends VechainSDKError { | ||
}; | ||
// Annotate the CommonJS export names for ESM import in node: | ||
@@ -748,2 +796,3 @@ 0 && (module.exports = { | ||
CertificateNotSignedError, | ||
CertificateSignature, | ||
ContractDeploymentFailedError, | ||
@@ -775,8 +824,12 @@ ContractInterfaceError, | ||
InvalidAddressError, | ||
InvalidBloom, | ||
InvalidBloomError, | ||
InvalidBloomParams, | ||
InvalidDataReturnTypeError, | ||
InvalidDataType, | ||
InvalidDataTypeError, | ||
InvalidHDNode, | ||
InvalidHDNodeChaincodeError, | ||
InvalidHDNodeDerivationPathError, | ||
InvalidHDNodeMnemonic, | ||
InvalidHDNodeMnemonicsError, | ||
@@ -786,3 +839,5 @@ InvalidHDNodePrivateKeyError, | ||
InvalidKError, | ||
InvalidKeystore, | ||
InvalidKeystoreError, | ||
InvalidKeystoreParams, | ||
InvalidKeystorePasswordError, | ||
@@ -795,4 +850,6 @@ InvalidRLP, | ||
InvalidSecp256k1PrivateKeyError, | ||
InvalidSecp256k1Signature, | ||
InvalidSecp256k1SignatureError, | ||
InvalidSecp256k1SignatureRecoveryError, | ||
InvalidTransactionField, | ||
JSONRPC, | ||
@@ -804,2 +861,3 @@ JSONRPCDefaultError, | ||
KEYSTORE, | ||
NotDelegatedTransaction, | ||
NotImplementedError, | ||
@@ -806,0 +864,0 @@ POLL_ERROR, |
{ | ||
"name": "@vechain/sdk-errors", | ||
"version": "1.0.0-beta.22", | ||
"version": "1.0.0-beta.23", | ||
"description": "This module is dedicated to managing and customizing errors within the SDK", | ||
@@ -5,0 +5,0 @@ "author": "vechain Foundation", |
@@ -5,5 +5,6 @@ import { VechainSDKError } from '../sdk-error'; | ||
/** | ||
* Invalid data to encode/decode abi. | ||
* Invalid data to encode/decode abi error | ||
* | ||
* This error is thrown when the data to encode or decode into abi is invalid. | ||
* WHEN TO USE: | ||
* * This error will be thrown when the data to encode or decode into abi is invalid. | ||
*/ | ||
@@ -13,5 +14,6 @@ class InvalidAbiDataToEncodeOrDecode extends VechainSDKError<ObjectErrorData> {} | ||
/** | ||
* Invalid fragment type. | ||
* Invalid abi fragment error | ||
* | ||
* This error is thrown when the fragment type is invalid. | ||
* WHEN TO USE: | ||
* * This error will be thrown when the abi fragment is invalid. | ||
*/ | ||
@@ -24,5 +26,6 @@ class InvalidAbiFragment extends VechainSDKError<{ | ||
/** | ||
* Invalid abi signature format. | ||
* Invalid abi signature format error | ||
* | ||
* This error is thrown when the abi signature format is invalid. | ||
* WHEN TO USE: | ||
* * This error will be thrown when the abi signature format is invalid. | ||
*/ | ||
@@ -29,0 +32,0 @@ class InvalidAbiSignatureFormat extends VechainSDKError<{ |
import { VechainSDKError } from '../sdk-error'; | ||
/** | ||
* Invalid address error to be thrown when an invalid address is detected. | ||
* Invalid address error | ||
* | ||
* This error is thrown when an invalid address is detected. | ||
* WHEN TO USE: | ||
* * This error will be thrown when the address is invalid. | ||
*/ | ||
@@ -8,0 +9,0 @@ class InvalidAddress extends VechainSDKError<{ address: string }> {} |
@@ -5,5 +5,7 @@ import { VechainSDKError } from '../sdk-error'; | ||
/** | ||
* Invalid data error to be thrown when invalid data is detected. | ||
* Invalid data type error. | ||
* | ||
* This error is thrown when invalid data is detected. | ||
* WHEN TO USE: | ||
* * This error will be thrown when the data type is invalid. | ||
* -e.g.- when the data type is not a string, number, boolean, or object. | ||
*/ | ||
@@ -10,0 +12,0 @@ class InvalidDataType extends VechainSDKError<ObjectErrorData> {} |
export * from './abi'; | ||
export * from './address'; | ||
export * from './bloom'; | ||
export * from './certificate'; | ||
export * from './data'; | ||
export * from './hdnode'; | ||
export * from './keystore'; | ||
export * from './rlp'; | ||
@@ -5,0 +9,0 @@ export * from './secp256k1'; |
@@ -5,5 +5,6 @@ import { VechainSDKError } from '../sdk-error'; | ||
/** | ||
* Invalid RLP error is thrown. | ||
* Invalid RLP error. | ||
* | ||
* This error is thrown when an invalid RLP is detected. | ||
* WHEN TO USE: | ||
* * Error will be thrown when the RLP is invalid. | ||
*/ | ||
@@ -10,0 +11,0 @@ class InvalidRLP extends VechainSDKError<{ |
import { VechainSDKError } from '../sdk-error'; | ||
/** | ||
* Invalid private error to be thrown when an invalid private key is detected. | ||
* Invalid secp256k1 private key error. | ||
* | ||
* This error is thrown when an invalid private key is detected. | ||
* WHEN TO USE: | ||
* * Error will be thrown when the secp256k1 private key is invalid. | ||
* | ||
* @note Data is null because for security reasons, the private key should not be logged! | ||
* @note Data (private key) is undefined for security reasons, the private key should not be logged! | ||
*/ | ||
@@ -13,5 +14,6 @@ class InvalidSecp256k1PrivateKey extends VechainSDKError<undefined> {} | ||
/** | ||
* Invalid message hash error to be thrown when an invalid message hash is detected. | ||
* Invalid secp256k1 message hash error. | ||
* | ||
* This error is thrown when an invalid message hash is detected. | ||
* WHEN TO USE: | ||
* * Error will be thrown when the secp256k1 message hash is invalid. | ||
*/ | ||
@@ -22,2 +24,17 @@ class InvalidSecp256k1MessageHash extends VechainSDKError<{ | ||
export { InvalidSecp256k1PrivateKey, InvalidSecp256k1MessageHash }; | ||
/** | ||
* Invalid secp256k1 signature error. | ||
* | ||
* WHEN TO USE: | ||
* * Error will be thrown when the secp256k1 signature is invalid. | ||
*/ | ||
class InvalidSecp256k1Signature extends VechainSDKError<{ | ||
signature: Uint8Array; | ||
recovery?: number; | ||
}> {} | ||
export { | ||
InvalidSecp256k1PrivateKey, | ||
InvalidSecp256k1MessageHash, | ||
InvalidSecp256k1Signature | ||
}; |
import { VechainSDKError } from '../sdk-error'; | ||
import type { ObjectErrorData } from '../types'; | ||
/** | ||
* Unavailable transaction field name. | ||
* Unavailable transaction field (field name) error. | ||
* | ||
* This error is thrown a field name in a transaction is unavailable. | ||
* | ||
* e.g. we want to get the value of 'delegator' or 'id' or 'origin' from a not signed transaction | ||
* WHEN TO USE: | ||
* * Error will be thrown when a transaction (field name) in a transaction is unavailable. | ||
*/ | ||
@@ -14,2 +14,26 @@ class UnavailableTransactionField extends VechainSDKError<{ | ||
export { UnavailableTransactionField }; | ||
/** | ||
* Invalid transaction field (field name) error. | ||
* | ||
* WHEN TO USE: | ||
* * Error will be thrown when a transaction (field name) in a transaction is invalid. | ||
*/ | ||
class InvalidTransactionField extends VechainSDKError< | ||
{ | ||
fieldName: string; | ||
} & ObjectErrorData | ||
> {} | ||
/** | ||
* Not delegated transaction error. | ||
* | ||
* WHEN TO USE: | ||
* * Error will be thrown when the transaction is not delegated. | ||
*/ | ||
class NotDelegatedTransaction extends VechainSDKError<undefined> {} | ||
export { | ||
UnavailableTransactionField, | ||
InvalidTransactionField, | ||
NotDelegatedTransaction | ||
}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
215798
7.82%67
13.56%4264
8.8%