@toruslabs/constants
Version:
Contains constants for torus and web3auth
91 lines (87 loc) • 3.41 kB
JavaScript
const TORUS_LEGACY_NETWORK = {
MAINNET: "mainnet",
TESTNET: "testnet",
CYAN: "cyan",
AQUA: "aqua",
CELESTE: "celeste"
};
const TORUS_SAPPHIRE_NETWORK = {
SAPPHIRE_DEVNET: "sapphire_devnet",
SAPPHIRE_MAINNET: "sapphire_mainnet"
};
const BUILD_ENV = {
PRODUCTION: "production",
DEVELOPMENT: "development",
STAGING: "staging",
TESTING: "testing"
};
const LEGACY_NETWORKS_ROUTE_MAP = {
[]: {
networkIdentifier: "aqua",
networkMigratedTo: TORUS_SAPPHIRE_NETWORK.SAPPHIRE_MAINNET
},
[]: {
networkIdentifier: "celeste",
networkMigratedTo: TORUS_SAPPHIRE_NETWORK.SAPPHIRE_MAINNET
},
[]: {
networkIdentifier: "cyan",
networkMigratedTo: TORUS_SAPPHIRE_NETWORK.SAPPHIRE_MAINNET
},
[]: {
networkIdentifier: "mainnet",
networkMigratedTo: TORUS_SAPPHIRE_NETWORK.SAPPHIRE_MAINNET
},
[]: {
networkIdentifier: "teal",
networkMigratedTo: TORUS_SAPPHIRE_NETWORK.SAPPHIRE_DEVNET
}
};
const CITADEL_SERVER_MAP = {
[]: "https://api.web3auth.io/citadel-service",
[]: "https://api-develop.web3auth.io/citadel-service",
[]: "https://api.web3auth.io/citadel-service",
[]: "https://api-develop.web3auth.io/citadel-service"
};
const DASHBOARD_PUBLIC_API_MAP = {
[]: "https://api.web3auth.io/signer-service",
[]: "https://api-develop.web3auth.io/signer-service",
[]: "https://api.web3auth.io/signer-service",
[]: "https://api-develop.web3auth.io/signer-service"
};
const LEGACY_METADATA_MAP = {
[]: "https://api.web3auth.io/metadata-service",
[]: "https://api-develop.web3auth.io/metadata-service",
[]: "https://api.web3auth.io/metadata-service",
[]: "https://api-develop.web3auth.io/metadata-service"
};
// FND backend service
const FND_SERVER_MAP = {
[]: "https://api.web3auth.io/fnd-service",
[]: "https://api-develop.web3auth.io/fnd-service",
[]: "https://api.web3auth.io/fnd-service",
[]: "https://api-develop.web3auth.io/fnd-service"
};
// Storage backend service
const STORAGE_SERVER_MAP = {
[]: "https://api.web3auth.io/session-service",
[]: "https://api-develop.web3auth.io/session-service",
[]: "https://api.web3auth.io/session-service",
[]: "https://api-develop.web3auth.io/session-service"
};
const STORAGE_SERVER_SOCKET_URL_MAP = {
[]: "https://session.web3auth.io",
[]: "https://develop-session.web3auth.io",
[]: "https://session.web3auth.io",
[]: "https://develop-session.web3auth.io"
};
const KEY_TYPE = {
SECP256K1: "secp256k1",
ED25519: "ed25519"
};
const SIG_TYPE = {
ECDSA_SECP256K1: "ecdsa-secp256k1",
ED25519: "ed25519",
BIP340: "bip340"
};
export { BUILD_ENV, CITADEL_SERVER_MAP, DASHBOARD_PUBLIC_API_MAP, FND_SERVER_MAP, KEY_TYPE, LEGACY_METADATA_MAP, LEGACY_NETWORKS_ROUTE_MAP, SIG_TYPE, STORAGE_SERVER_MAP, STORAGE_SERVER_SOCKET_URL_MAP, TORUS_LEGACY_NETWORK, TORUS_SAPPHIRE_NETWORK };