src/common/constants/defaultValues.ts
[key: string]:
|
|
Defined in src/common/constants/defaultValues.ts:12
|
import { DataFieldType } from "src/admin/EternalRegistry.interface";
import type { IBatch } from "../interfaces";
import { keccak256, hexlify, toUtf8Bytes } from "ethers";
export const defaultWalletLabel = "default wallet";
export const zeroAddress = "0x0000000000000000000000000000000000000000";
export const EncryptionAlgorithm = "RSAES_OAEP_SHA_256";
export const DEFAULT_USER_ADDRESS = "The address is not provided";
export const BLOCKCHAIN_EXPLORER = "https://blockscout.dev.librecapital.com";
export const DEFAULT_LIBRE_DEALER = "yehiatarek67@gmail.com";
interface IJurisdictionDefaultValues {
[key: string]: {
dataFieldCol: string;
dataFieldColHash: string;
type: DataFieldType.Bool | DataFieldType.Uint;
};
}
export const JurisdictionDefaultValues: IJurisdictionDefaultValues =
Object.freeze({
isKycEnabled: {
dataFieldCol: "KYC_PASSED",
dataFieldColHash: keccak256(hexlify(toUtf8Bytes("KYC_PASSED"))),
type: DataFieldType.Bool,
},
isAmlEnabled: {
dataFieldCol: "AML_PASSED",
dataFieldColHash: keccak256(hexlify(toUtf8Bytes("AML_PASSED"))),
type: DataFieldType.Bool,
},
isSanctionPassed: {
dataFieldCol: "SANCTIONS_PASSED",
dataFieldColHash: keccak256(hexlify(toUtf8Bytes("SANCTIONS_PASSED"))),
type: DataFieldType.Bool,
},
location: {
dataFieldCol: "LOCATION",
dataFieldColHash: keccak256(hexlify(toUtf8Bytes("LOCATION"))),
type: DataFieldType.Uint,
},
investorType: {
dataFieldCol: "INVESTOR_TYPE",
dataFieldColHash: keccak256(hexlify(toUtf8Bytes("INVESTOR_TYPE"))),
type: DataFieldType.Uint,
},
});
export const INIT_SET_BATCH: IBatch = Object.freeze({
_id: [],
_keys: [],
_boolValues: [],
_uintValues: [],
_addressValues: [],
_stringValues: [],
_bytesValues: [],
_senderRole: "",
});
export const ALL_DEALER = Object.freeze(
keccak256(hexlify(toUtf8Bytes("ALL_DEALER"))),
);
export const TypeToDefaultValue: Record<DataFieldType, string> = Object.freeze({
Uint: "0",
Bool: "false",
String: "",
Bytes: "0x",
Address: "0x",
AddressArrayIndexValue: "[]",
getAddressArray: "[]",
});