lisk-framework
Version:
Lisk blockchain application platform
74 lines • 2.33 kB
JavaScript
Object.defineProperty(exports, "__esModule", { value: true });
exports.getGeneratorPrivateKeyFromDefaultConfig = exports.getKeysFromDefaultConfig = exports.defaultConfig = void 0;
const lisk_cryptography_1 = require("@liskhq/lisk-cryptography");
const accountFixture = require("./keys_fixture.json");
exports.defaultConfig = {
system: {
version: '0.1.0',
logLevel: 'none',
keepEventsForHeights: -1,
keepInclusionProofsForHeights: -1,
inclusionProofKeys: [],
dataPath: '~/.lisk/default',
backup: {
height: 0,
},
enableMetrics: false,
},
genesis: {
block: {},
bftBatchSize: 103,
minimumCertifyHeight: 0,
blockTime: 10,
chainID: '10000000',
maxTransactionsSize: 15 * 1024,
},
network: {
version: '1.0',
seedPeers: [
{
ip: '127.0.0.1',
port: 5000,
},
],
port: 5000,
maxInboundConnections: 0,
},
transactionPool: {
maxTransactions: 4096,
maxTransactionsPerAccount: 64,
transactionExpiryTime: 3 * 60 * 60 * 1000,
minEntranceFeePriority: '0',
minReplacementFeeDifference: '10',
},
rpc: {
modes: [],
port: 8080,
host: '127.0.0.1',
accessControlAllowOrigin: '*',
},
legacy: {
sync: false,
brackets: [],
},
generator: {
keys: {},
},
modules: {},
plugins: {},
};
const getKeysFromDefaultConfig = (address) => {
const account = accountFixture.keys.find(key => lisk_cryptography_1.address.getAddressFromLisk32Address(key.address).equals(address));
if (!account) {
throw new Error(`Validator with address: ${lisk_cryptography_1.address.getLisk32AddressFromAddress(address)} does not exists in default config`);
}
return account;
};
exports.getKeysFromDefaultConfig = getKeysFromDefaultConfig;
const getGeneratorPrivateKeyFromDefaultConfig = (address) => {
const account = (0, exports.getKeysFromDefaultConfig)(address);
return Buffer.from(account.plain.generatorPrivateKey, 'hex');
};
exports.getGeneratorPrivateKeyFromDefaultConfig = getGeneratorPrivateKeyFromDefaultConfig;
//# sourceMappingURL=config.js.map
;