@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
65 lines • 2.72 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.aleoConfig = void 0;
const constants_1 = require("@ledgerhq/coin-aleo/constants");
const live_env_1 = require("@ledgerhq/live-env");
// API for fee estimation is not available yet, so for MVP we are using static fee configuration.
// source of hardcoded values: https://ledgerhq.atlassian.net/wiki/spaces/BI/pages/6218678344/ARCH+-+Aleo+integration+HLD
const DEFAULT_FEE_BY_TRANSACTION_TYPE = {
[constants_1.TRANSACTION_TYPE.TRANSFER_PUBLIC]: 34060,
[constants_1.TRANSACTION_TYPE.TRANSFER_PRIVATE]: 2308,
[constants_1.TRANSACTION_TYPE.CONVERT_PUBLIC_TO_PRIVATE]: 17972,
[constants_1.TRANSACTION_TYPE.CONVERT_PRIVATE_TO_PUBLIC]: 18494,
};
const DEFAULT_FEE_SAFETY_MULTIPLIER = 1;
/**
* Controls whether fee sponsorship for single-record private transactions
* is enabled (fees paid by a 3rd party on behalf of the user).
* @see https://ledgerhq.atlassian.net/browse/LIVE-27354
*/
const IS_FEE_SPONSORED = true;
/**
* Controls whether encrypted proving is used for broadcasting transactions.
* This is the target solution that should be enabled once fix on API side is done.
* @see https://ledgerhq.atlassian.net/browse/LIVE-27542
*/
const USE_ENCRYPTED_PROVE = false;
exports.aleoConfig = {
config_currency_aleo: {
type: "object",
default: {
status: {
type: "active",
},
nodeUrl: (0, live_env_1.getEnv)("ALEO_MAINNET_NODE_ENDPOINT"),
networkType: "mainnet",
apiUrls: {
node: (0, live_env_1.getEnv)("ALEO_MAINNET_NODE_ENDPOINT"),
sdk: (0, live_env_1.getEnv)("ALEO_MAINNET_SDK_ENDPOINT"),
},
feeByTransactionType: DEFAULT_FEE_BY_TRANSACTION_TYPE,
feeSafetyMultiplier: DEFAULT_FEE_SAFETY_MULTIPLIER,
isFeeSponsored: IS_FEE_SPONSORED,
useEncryptedProve: USE_ENCRYPTED_PROVE,
},
},
config_currency_aleo_testnet: {
type: "object",
default: {
status: {
type: "active",
},
nodeUrl: (0, live_env_1.getEnv)("ALEO_TESTNET_NODE_ENDPOINT"),
networkType: "testnet",
apiUrls: {
node: (0, live_env_1.getEnv)("ALEO_TESTNET_NODE_ENDPOINT"),
sdk: (0, live_env_1.getEnv)("ALEO_TESTNET_SDK_ENDPOINT"),
},
feeByTransactionType: DEFAULT_FEE_BY_TRANSACTION_TYPE,
feeSafetyMultiplier: DEFAULT_FEE_SAFETY_MULTIPLIER,
isFeeSponsored: IS_FEE_SPONSORED,
useEncryptedProve: USE_ENCRYPTED_PROVE,
},
},
};
//# sourceMappingURL=config.js.map