UNPKG

@cruxpay/js-sdk

Version:

CruxPay Javascript SDK

67 lines (66 loc) 6.18 kB
var _a; import { PackageErrorCode } from "./package-error-code"; export var ERROR_STRINGS = (_a = {}, _a[PackageErrorCode.AddressMappingDecodingFailure] = "AddressMapping decoding failure", _a[PackageErrorCode.AddressNotAvailable] = "Currency address not available for user", _a[PackageErrorCode.AssetIDNotAvailable] = "AssetID doesn\'t exist in client mapping", _a[PackageErrorCode.BlockstackIdInvalidStructure] = "Invalid Blockstack ID", _a[PackageErrorCode.BlockstackDomainInvalidStructure] = "Invalid Blockstack Domain", _a[PackageErrorCode.BlockstackDomainNamespaceValidation] = "Invalid Blockstack Domain namespace: '{0}', should end with .id", _a[PackageErrorCode.BlockstackIdInvalidSubdomainForTranslation] = "Invalid Blockstack ID, subdomain must be non null to be translated", _a[PackageErrorCode.InvalidBlockstackDomainForTranslation] = "Only Blockstack Domains ending with _crux can be translated", _a[PackageErrorCode.BlockstackIdNamespaceValidation] = "Invalid Blockstack ID namespace: '{0}', should end with .id", _a[PackageErrorCode.BnsEmptyData] = "No name data available", _a[PackageErrorCode.BnsResolutionFailed] = "'{0}' node not available because '{1}'", _a[PackageErrorCode.ExistingCruxIDFound] = "keypair is already used in registration of CruxID: '{0}'", _a[PackageErrorCode.ClientNotInitialized] = "CRUX Client not initialized.", _a[PackageErrorCode.ConfigKeyManagerRequired] = "CruxOnBoardingClient should be instantiated with ConfigKeyManager", _a[PackageErrorCode.CouldNotFindAssetListInClientConfig] = "Missing global asset list", _a[PackageErrorCode.CouldNotFindBlockstackConfigurationServiceClientConfig] = "Missing client-config for: '{0}'", _a[PackageErrorCode.CouldNotFindIdentityKeyPairToPutAddressMapping] = "Missing IdentityKeyPair", _a[PackageErrorCode.CouldNotFindKeyPairToRestoreIdentity] = "Require keypair for restoring the identity", _a[PackageErrorCode.CouldNotFindKeyPairToRegisterName] = "Require keypair for registering name/subdomain", // [PackageErrorCode.CouldNotValidateZoneFile]: "Invalid zonefile", _a[PackageErrorCode.CruxDomainInvalidStructure] = "Invalid Crux Domian", _a[PackageErrorCode.CruxDomainNamespaceValidation] = "Invalid Crux Domain namespace: '{0}', should end with .crux", _a[PackageErrorCode.CruxIdNamespaceValidation] = "Invalid Crux ID namespace: '{0}', should end with .crux", _a[PackageErrorCode.CruxIdInvalidStructure] = "Invalid Crux ID", _a[PackageErrorCode.CruxIDUnavailable] = "'{0}' name is unavailable", _a[PackageErrorCode.CurrencyDoesNotExistInClientMapping] = "Currency does not exist in wallet's client mapping", _a[PackageErrorCode.DecryptionFailed] = "Decryption failed", _a[PackageErrorCode.DifferentWalletCruxID] = "Already has a Crux ID registered with different wallet", _a[PackageErrorCode.IsNotSupported] = "Method is not supported", _a[PackageErrorCode.ExpectedEncryptionKeyValue] = "Missing encryptionKey method", _a[PackageErrorCode.FetchPendingRegistrationsByAddressFailed] = "'{0}' failed with error '{1}'", _a[PackageErrorCode.GaiaClientConfigUploadFailed] = "Unable to upload '{0}' to gaia: '{1}'", _a[PackageErrorCode.GaiaCruxPayUploadFailed] = "Unable to upload '{0}' to gaia: '{1}'", _a[PackageErrorCode.GaiaEmptyResponse] = "Gaia sent empty response", _a[PackageErrorCode.GetAddressMapFailed] = "No address found for CRUX ID", _a[PackageErrorCode.GaiaCruxPayGetFailed] = "Unable to get from gaia: '{0}'", _a[PackageErrorCode.GaiaClientConfigGetFailed] = "Unable to get from gaia : '{0}'", _a[PackageErrorCode.GaiaGetFileFailed] = "Unable to get gaia file: '{0}'", _a[PackageErrorCode.GaiaProfileUploadFailed] = "Unable to upload '{0}' to gaia: '{1}'", _a[PackageErrorCode.GaiaUploadFailed] = "Unable to upload '{0}' to gaia: '{1}'", _a[PackageErrorCode.GetNamesByAddressFailed] = "'{0}' failed with error '{1}'", _a[PackageErrorCode.InvalidPrivateKeyFormat] = "Private key should be either hex encoded, base64 encoded or WIF (base58 - compressed) only", _a[PackageErrorCode.KeyPairMismatch] = "Invalid keyPair provided", _a[PackageErrorCode.MissingCruxDomainInCruxOnBoardingClient] = "No domain found with the key provided or missing key in the CruxOnBoardingClient", _a[PackageErrorCode.MissingCruxDomainInCruxWalletClient] = "No domain found with the key provided or missing key in the CruxWalletClient", _a[PackageErrorCode.MissingZoneFile] = "Missing zonefile for: '{0}'", _a[PackageErrorCode.MissingNameOwnerAddress] = "Missing owner address for: '{0}'", _a[PackageErrorCode.MissingUserCruxAssetTranslator] = "User client's assetTranslator is required while resolving with assetMatcher properties", _a[PackageErrorCode.NameIntegrityCheckFailed] = "Name resolution integrity check failed", _a[PackageErrorCode.PrivateKeyRequired] = "CruxClient should be intantiated with a private key", _a[PackageErrorCode.SubdomainLengthCheckFailure] = "Validation failed: Subdomain length must be between 4 to 20", _a[PackageErrorCode.SubdomainRegexMatchFailure] = "Validation failed: Subdomain should start with alphabet and end with alphabet or number. Allowed characters are lowercase alphabets, numbers, - and _", _a[PackageErrorCode.SubdomainRegistrationAcknowledgementFailed] = "Register call to registrar failed: '{0}'", _a[PackageErrorCode.SubdomainRegistrationFailed] = "Register call to registrar failed: '{0}'", _a[PackageErrorCode.GaiaRecordIntegrityFailed] = "Gaia record integrity failed for file '{0}' of '{1}'", _a[PackageErrorCode.UserDoesNotExist] = "ID does not exist", _a[PackageErrorCode.IdentityMismatch] = "Identity mismatch", _a[PackageErrorCode.InvalidWalletClientName] = "Invalid Wallet Client Name", _a[PackageErrorCode.InsecureNetworkCall] = "Insecure network call", _a[PackageErrorCode.FailedToGetGaiaUrlFromZonefile] = "Failed to get Gaia URL from user's zonefile: '{0}'", _a[PackageErrorCode.Response404] = "404 Response on : '{0}'", _a[PackageErrorCode.Response401] = "401 Response on : '{0}'", _a);