How to use the lisk-elements.transaction function in lisk-elements

To help you get started, we’ve selected a few lisk-elements examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github LiskHQ / lisk-core / qa / support / lisk_util.js View on Github external
async castVotes(params, blocksToWait) {
		const trx = elements.transaction.castVotes({
			...params,
			networkIdentifier,
		});
		await from(this.broadcastAndValidateTransactionAndWait(trx, blocksToWait));
	}
github LiskHQ / lisk-core / qa / step_definitions / node / transaction_pool.js View on Github external
			const trxs = transfers.map(t => elements.transaction.transfer(t));
github LiskHQ / lisk-core / qa / utils / lisk_transactions.js View on Github external
accounts.map(a => {
		const options = createDappOptions();

		return elements.transaction.createDapp({
			...filterByKey(a, defaultFilter),
			options,
		});
	});
github LiskHQ / lisk-core / qa / step_definitions / node / constants.js View on Github external
const output = require('codeceptjs').output;
const { constants } = require('lisk-elements').transaction;

const I = actor();

let results = [];

When('I request for node constants', async () => {
	try {
		const api = await I.call();

		results = await Promise.all(
			api.peers.map(address => api.getNodeConstants(address))
		);
	} catch (error) {
		output.error(error);
		throw error;
	}
github LiskHQ / lisk-core / qa / support / lisk_util.js View on Github external
return accounts.map(account => {
			const signature = elements.transaction.createSignatureObject({
				transaction,
				passphrase: account.passphrase,
				networkIdentifier,
			}).signature;

			return {
				transactionId: transaction.id,
				publicKey: account.publicKey,
				signature,
			};
		});
	}
github LiskHQ / lisk-core / qa / step_definitions / node / transaction_pool.js View on Github external
async (userName, amount) => {
		try {
			const { passphrase } = getFixtureUser('username', userName);
			const { address } = await I.createAccount();

			multisignatureTrx = elements.transaction.transfer({
				recipientId: address,
				amount: TO_BEDDOWS(amount),
				passphrase,
			});

			response = await from(
				I.broadcastAndValidateTransaction(multisignatureTrx)
			);
		} catch (error) {
			output.error(error);
			throw error;
		}
	}
);