We’ve encountered an issue with new accounts created via @klever/sdk-node.
Symptom:
Addresses created with new Account() can successfully receive incoming transactions, but the first outgoing transaction sent via SDK often fails - it does not broadcast or index (responses like “fetch failed” / “no hash”). After sending just one outgoing transaction from the Klever Wallet app, subsequent SDK transactions work consistently and without issues.
Request:
Could you please clarify what needs to be taken into account when building the very first transaction through the SDK (e.g. account initialization, correct nonce handling, ChainID/Version/fees, node-side account status, etc.), so that it works immediately without requiring this initial “activation” from the Wallet app?
The issue was caused by using an incorrect ChainID / low-level transaction packing combined with a hidden provider fallback to an inactive domain. The fix was to explicitly set providers, use the correct ChainID from the SDK, rely on high-level transaction builders, and handle nonce properly.
Please fix the fallback to the outdated domain in the next SDK update, so developers don’t run into this issue and don’t need manual workarounds. @Duka
Hello @Sovkosov_Ignat!
Thank you for reaching out. To better assist you, could you please provide the following information:
SDK Version
Which version of @klever/sdk-node are you currently using? This issue often occurs with outdated versions, as we’ve recently replaced deprecated domains in the latest releases.
Possible Causes
Your issue might be related to one of these common scenarios:
Outdated SDK: The deprecated domains have been fixed in recent versions, so updating might resolve your issue
Chain Mismatch: The “wrong chain ID” error typically occurs when:
Your provider is configured for testnet but the transaction targets mainnet (or vice versa)
Note: Mainnet is the default chain selection
Information Needed
To help us investigate further, please share:
Complete version listing of all relevant dependencies
The code snippet that resolved your issue
Any error messages you’re seeing
This will help us test the scenario internally and potentially improve the SDK if needed.
Let me know if you need any clarification or have additional questions!
Thanks for the examples! We found the issue regarding the “fetch failed” error when nonce=0, and we will soon deploy a version for the @klever/sdk-node package with this fix.
“Cold” Wallet Issue Explanation
Regarding the issue with the “Cold” wallet: in your example, as you noted in the comment: // fresh nonce from API (chain shows 0), we use nonce=1
What Happened:
A Tx1 with nonce=1 was broadcasted while the account had nonce=0
This means Tx1 would be stuck in the node transaction mempool waiting for a transaction with nonce=0
After broadcasting a transaction with nonce=0, both transactions would be processed and then indexed
Root Cause:
Since you were prevented from sending a transaction with nonce=0 because of the “fetch failed” issue, you couldn’t establish the proper nonce sequence.
Solution:
With the upcoming fix, you should be able to send the first transaction using the @klever/sdk-node package without encountering the nonce=0 fetch error.
I investigated the transaction with hash 89354657700c90f473bdf7b420e0501322f7c3af5f3baf8034a92fc5d53ede82 in the node’s transaction pool. The transaction was submitted with nonce=2, this appears to be the source of the issue.
The Problem:
The account currently has 3 pending transactions in the pool, with firstPendingNonce: 2. This indicates there’s a nonce gap in the transaction sequence.
Solution:
To resolve this issue and allow your transaction to be processed, you need to:
Submit a transaction with nonce=0 first
Then submit a transaction with nonce=1
Only after these are processed will your transaction with nonce=2 be executed
The blockchain requires transactions to be processed in sequential nonce order. Any gaps in the sequence will cause subsequent transactions to remain pending indefinitely.
Please try this solution and let me know if it resolves the issue.