@cruxpay/js-sdk
Version:
CruxPay Javascript SDK
71 lines (70 loc) • 6.81 kB
JavaScript
export var PackageErrorCode;
(function (PackageErrorCode) {
// 1000s: NameService errors
PackageErrorCode[PackageErrorCode["BnsResolutionFailed"] = 1001] = "BnsResolutionFailed";
PackageErrorCode[PackageErrorCode["UserDoesNotExist"] = 1002] = "UserDoesNotExist";
PackageErrorCode[PackageErrorCode["NameIntegrityCheckFailed"] = 1003] = "NameIntegrityCheckFailed";
PackageErrorCode[PackageErrorCode["BnsEmptyData"] = 1004] = "BnsEmptyData";
PackageErrorCode[PackageErrorCode["AddressNotAvailable"] = 1005] = "AddressNotAvailable";
PackageErrorCode[PackageErrorCode["AssetIDNotAvailable"] = 1006] = "AssetIDNotAvailable";
PackageErrorCode[PackageErrorCode["DecryptionFailed"] = 1007] = "DecryptionFailed";
PackageErrorCode[PackageErrorCode["IdentityMismatch"] = 1008] = "IdentityMismatch";
PackageErrorCode[PackageErrorCode["GetNamesByAddressFailed"] = 1009] = "GetNamesByAddressFailed";
PackageErrorCode[PackageErrorCode["KeyPairMismatch"] = 1010] = "KeyPairMismatch";
PackageErrorCode[PackageErrorCode["DifferentWalletCruxID"] = 1011] = "DifferentWalletCruxID";
PackageErrorCode[PackageErrorCode["GetAddressMapFailed"] = 1012] = "GetAddressMapFailed";
PackageErrorCode[PackageErrorCode["InvalidWalletClientName"] = 1013] = "InvalidWalletClientName";
// 2000s: Gaia errors
PackageErrorCode[PackageErrorCode["GaiaUploadFailed"] = 2001] = "GaiaUploadFailed";
PackageErrorCode[PackageErrorCode["GaiaCruxPayUploadFailed"] = 2002] = "GaiaCruxPayUploadFailed";
PackageErrorCode[PackageErrorCode["GaiaClientConfigUploadFailed"] = 2003] = "GaiaClientConfigUploadFailed";
PackageErrorCode[PackageErrorCode["GaiaProfileUploadFailed"] = 2005] = "GaiaProfileUploadFailed";
PackageErrorCode[PackageErrorCode["GaiaCruxPayGetFailed"] = 2102] = "GaiaCruxPayGetFailed";
PackageErrorCode[PackageErrorCode["GaiaClientConfigGetFailed"] = 2103] = "GaiaClientConfigGetFailed";
PackageErrorCode[PackageErrorCode["GaiaGetFileFailed"] = 2105] = "GaiaGetFileFailed";
PackageErrorCode[PackageErrorCode["GaiaRecordIntegrityFailed"] = 2106] = "GaiaRecordIntegrityFailed";
PackageErrorCode[PackageErrorCode["GaiaEmptyResponse"] = 2107] = "GaiaEmptyResponse";
PackageErrorCode[PackageErrorCode["FailedToGetGaiaUrlFromZonefile"] = 2018] = "FailedToGetGaiaUrlFromZonefile";
// 3000s: Registry errors
PackageErrorCode[PackageErrorCode["SubdomainRegistrationFailed"] = 3001] = "SubdomainRegistrationFailed";
PackageErrorCode[PackageErrorCode["SubdomainRegistrationAcknowledgementFailed"] = 3002] = "SubdomainRegistrationAcknowledgementFailed";
PackageErrorCode[PackageErrorCode["FetchPendingRegistrationsByAddressFailed"] = 3003] = "FetchPendingRegistrationsByAddressFailed";
// Validating user input errors
PackageErrorCode[PackageErrorCode["ExpectedEncryptionKeyValue"] = 4001] = "ExpectedEncryptionKeyValue";
PackageErrorCode[PackageErrorCode["SubdomainRegexMatchFailure"] = 4002] = "SubdomainRegexMatchFailure";
PackageErrorCode[PackageErrorCode["SubdomainLengthCheckFailure"] = 4003] = "SubdomainLengthCheckFailure";
PackageErrorCode[PackageErrorCode["AddressMappingDecodingFailure"] = 4004] = "AddressMappingDecodingFailure";
PackageErrorCode[PackageErrorCode["CruxIdNamespaceValidation"] = 4005] = "CruxIdNamespaceValidation";
PackageErrorCode[PackageErrorCode["CruxIdInvalidStructure"] = 4006] = "CruxIdInvalidStructure";
PackageErrorCode[PackageErrorCode["BlockstackIdNamespaceValidation"] = 4007] = "BlockstackIdNamespaceValidation";
PackageErrorCode[PackageErrorCode["BlockstackIdInvalidStructure"] = 4008] = "BlockstackIdInvalidStructure";
PackageErrorCode[PackageErrorCode["BlockstackIdInvalidSubdomainForTranslation"] = 4009] = "BlockstackIdInvalidSubdomainForTranslation";
PackageErrorCode[PackageErrorCode["InvalidBlockstackDomainForTranslation"] = 4010] = "InvalidBlockstackDomainForTranslation";
PackageErrorCode[PackageErrorCode["CurrencyDoesNotExistInClientMapping"] = 4011] = "CurrencyDoesNotExistInClientMapping";
PackageErrorCode[PackageErrorCode["ExistingCruxIDFound"] = 4012] = "ExistingCruxIDFound";
PackageErrorCode[PackageErrorCode["CruxIDUnavailable"] = 4013] = "CruxIDUnavailable";
PackageErrorCode[PackageErrorCode["InvalidPrivateKeyFormat"] = 4014] = "InvalidPrivateKeyFormat";
PackageErrorCode[PackageErrorCode["PrivateKeyRequired"] = 4015] = "PrivateKeyRequired";
PackageErrorCode[PackageErrorCode["ConfigKeyManagerRequired"] = 4016] = "ConfigKeyManagerRequired";
PackageErrorCode[PackageErrorCode["CruxDomainInvalidStructure"] = 4017] = "CruxDomainInvalidStructure";
PackageErrorCode[PackageErrorCode["CruxDomainNamespaceValidation"] = 4018] = "CruxDomainNamespaceValidation";
PackageErrorCode[PackageErrorCode["BlockstackDomainInvalidStructure"] = 4019] = "BlockstackDomainInvalidStructure";
PackageErrorCode[PackageErrorCode["BlockstackDomainNamespaceValidation"] = 4020] = "BlockstackDomainNamespaceValidation";
// Internal errors
PackageErrorCode[PackageErrorCode["CouldNotFindBlockstackConfigurationServiceClientConfig"] = 5001] = "CouldNotFindBlockstackConfigurationServiceClientConfig";
PackageErrorCode[PackageErrorCode["CouldNotFindKeyPairToRestoreIdentity"] = 5002] = "CouldNotFindKeyPairToRestoreIdentity";
// CouldNotValidateZoneFile = 5003,
PackageErrorCode[PackageErrorCode["CouldNotFindIdentityKeyPairToPutAddressMapping"] = 5004] = "CouldNotFindIdentityKeyPairToPutAddressMapping";
PackageErrorCode[PackageErrorCode["CouldNotFindAssetListInClientConfig"] = 5005] = "CouldNotFindAssetListInClientConfig";
PackageErrorCode[PackageErrorCode["CouldNotFindKeyPairToRegisterName"] = 5006] = "CouldNotFindKeyPairToRegisterName";
PackageErrorCode[PackageErrorCode["ClientNotInitialized"] = 5007] = "ClientNotInitialized";
PackageErrorCode[PackageErrorCode["InsecureNetworkCall"] = 5008] = "InsecureNetworkCall";
PackageErrorCode[PackageErrorCode["MissingCruxDomainInCruxOnBoardingClient"] = 5009] = "MissingCruxDomainInCruxOnBoardingClient";
PackageErrorCode[PackageErrorCode["IsNotSupported"] = 5010] = "IsNotSupported";
PackageErrorCode[PackageErrorCode["MissingCruxDomainInCruxWalletClient"] = 5011] = "MissingCruxDomainInCruxWalletClient";
PackageErrorCode[PackageErrorCode["MissingZoneFile"] = 5012] = "MissingZoneFile";
PackageErrorCode[PackageErrorCode["MissingNameOwnerAddress"] = 5013] = "MissingNameOwnerAddress";
PackageErrorCode[PackageErrorCode["MissingUserCruxAssetTranslator"] = 5014] = "MissingUserCruxAssetTranslator";
PackageErrorCode[PackageErrorCode["Response404"] = 5015] = "Response404";
PackageErrorCode[PackageErrorCode["Response401"] = 5016] = "Response401";
})(PackageErrorCode || (PackageErrorCode = {}));