We will be sunsetting Advisor during Jan, 2026 and will instead be providing information in Snyk Security DB.

You can begin to take advantage of Snyk Security DB today for a unified, package-centric experience.

How to use the @nimiq/core.Account function in @nimiq/core

To help you get started, we’ve selected a few @nimiq/core 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 MatthewDLudwig / NimiqWrapper / releases / browser / NimiqWrapper.js View on Github external
}
			} else {
				txDetails.extraData = options.data;
			}
		}

		if (txDetails.fee == 0 && this.getRemainingFreeTransactionsFor(txDetails.sender) == 0) {
			this.theWrapper.callbacks.error("TransactionHelper:sendTransaction", NimiqWrapper.ERROR_MESSAGES.FREE_TX_LIMIT);
		} else {
			let tx = null;
			if (txDetails.extraData) {
				tx = new Nimiq.ExtendedTransaction(
					txDetails.sender.address,
					Nimiq.Account.Type.BASIC,
					txDetails.recipient,
					Nimiq.Account.Type.BASIC,
					txDetails.value,
					txDetails.fee,
					txDetails.validity,
					Nimiq.Transaction.Flag.NONE,
					txDetails.extraData
				);

				let keyPair = txDetails.sender._keyPair;
				let signature = Nimiq.Signature.create(
					keyPair.privateKey,
					keyPair.publicKey,
					tx.serializeContent()
				);
				let proof = Nimiq.SignatureProof.singleSig(keyPair.publicKey, signature);
				tx.proof = proof.serialize();
			} else {
github MatthewDLudwig / NimiqWrapper / releases / browser / NimiqWrapper.js View on Github external
if (options.data.trim().length > 0) {
					txDetails.extraData = Nimiq.BufferUtils.fromAscii(options.data.trim());
				}
			} else {
				txDetails.extraData = options.data;
			}
		}

		if (txDetails.fee == 0 && this.getRemainingFreeTransactionsFor(txDetails.sender) == 0) {
			this.theWrapper.callbacks.error("TransactionHelper:sendTransaction", NimiqWrapper.ERROR_MESSAGES.FREE_TX_LIMIT);
		} else {
			let tx = null;
			if (txDetails.extraData) {
				tx = new Nimiq.ExtendedTransaction(
					txDetails.sender.address,
					Nimiq.Account.Type.BASIC,
					txDetails.recipient,
					Nimiq.Account.Type.BASIC,
					txDetails.value,
					txDetails.fee,
					txDetails.validity,
					Nimiq.Transaction.Flag.NONE,
					txDetails.extraData
				);

				let keyPair = txDetails.sender._keyPair;
				let signature = Nimiq.Signature.create(
					keyPair.privateKey,
					keyPair.publicKey,
					tx.serializeContent()
				);
				let proof = Nimiq.SignatureProof.singleSig(keyPair.publicKey, signature);