@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
62 lines • 2.47 kB
JavaScript
import { TRANSACTION_TYPE } from "@ledgerhq/coin-aleo/constants";
import { getEnv } from "@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 = {
[]: 34060,
[]: 2308,
[]: 17972,
[]: 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;
export const aleoConfig = {
config_currency_aleo: {
type: "object",
default: {
status: {
type: "active",
},
nodeUrl: getEnv("ALEO_MAINNET_NODE_ENDPOINT"),
networkType: "mainnet",
apiUrls: {
node: getEnv("ALEO_MAINNET_NODE_ENDPOINT"),
sdk: 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: getEnv("ALEO_TESTNET_NODE_ENDPOINT"),
networkType: "testnet",
apiUrls: {
node: getEnv("ALEO_TESTNET_NODE_ENDPOINT"),
sdk: 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