I’ve another issue, I need to get address balance through nodejs sdk and I found across the docs the getAccountInfo
function.
let mainAddr = new AccountAddress(
""
);
const lastFinalizedBlockHash = (await client.getConsensusStatus()).lastFinalizedBlock;
const accountInfo = await client.getAccountInfo(mainAddr, lastFinalizedBlockHash);
That’s how I’m using it but it returns undefined, also with trying with random account addresses found on ccdscan…
edit: using CredentialRegistrationId
with credential registration id found in the account-keys.json file instead of the AccountAddress
, worked.
Is there a way to scan incoming transactions through node sdk?
abizjak
October 15, 2022, 5:32pm
22
let mainAddr = new AccountAddress(
""
);
why are you setting the address to an empty string?
The incoming transactions are not available directly. You have to use the getBlockSummary
and check the transactions in blocks yourself.
That was an example not to share our address to the public, in any case we have solved it as it was necessary to use the CredentialId instead of just the address.
Ok, got it for listing the transactions; so apparently it is not possible to do so for a single address but we must scan the whole block.
what about qrcodes?
what are the guidelines to generate them? especially regarding setting the transaction amount?
abizjak
October 18, 2022, 9:22am
25
What information do you want to put in the QR code exactly?
I want to put the address and the amount so an user can easily pay the invoice
abizjak
October 18, 2022, 1:36pm
27
We do not have specific recommendations for QR codes like this.