how to get tx hash?

Why can’t I even get the hash of the transaction in the sample code? I’ve tried many methods but can’t get it correctly.

If I finish sending the transaction and call tonweb.getTransactions, the latest transaction obtained is not the transaction I just sent, and there is a delay here. And what I return after sending the transaction is not the meaning of the api design of the transaction hash.

Sep 6, 2023, 7:50 AM
your question answered
const tonwebMnemonic = require('tonweb-mnemonic');
const keyPair = await tonwebMnemonic.mnemonicToKeyPair(mnemonic.split(" "))
Sep 6, 2023, 9:19 AM
sorry I dont fount the require('tonweb-mnemonic');
Sep 6, 2023, 9:21 AM
you have to install package tonweb-mnemonic
Sep 6, 2023, 9:22 AM
but I use the web tonweb
Sep 6, 2023, 9:22 AM
its a different package you have to install it first
this package working with client and server both
Sep 6, 2023, 9:24 AM
I need to try first
thks
I use the html ,just require the tonweb-mnemonic ?
now is inactive
soloved
how to change to active ?
deploy but have one error ERR_UNHANDLED_REJECTION
Sep 6, 2023, 10:50 AM
Do you need that? Wallet is auto-deployed by TonWeb at first (UPD: outgoing) transaction.
Sep 6, 2023, 10:54 AM
I already transfered in one
Sep 6, 2023, 10:55 AM
In this case, insufficient TON. 0.009 TON is a bit little.
*at first outgoing transaction.
Sep 6, 2023, 10:55 AM
get it
so now I need transfer myself ?
transfer is show seqno need >=0.
now transfe with 0.1 ton but is error for ERR_UNHANDLED_REJECTION
tried is it
next problem the blockchain is not success
Sep 6, 2023, 11:10 AM
Do you have sufficient TON to send?
Sep 6, 2023, 11:12 AM
yes
just sent 0.01
but the hash is from to destination same address
Sep 6, 2023, 11:15 AM
Explorer shows incoming external message (empty)—>(your wallet).
Sep 6, 2023, 11:18 AM
yes ,but the balance is decre
just use it
Sep 6, 2023, 11:19 AM
There are small gas fees.
Sep 6, 2023, 11:19 AM
I know gas
Sep 6, 2023, 11:19 AM
Also, correct sendMode is not "3" but rather 3.
Sep 6, 2023, 11:19 AM
3 is error
use the await the 3 is correct but is same
Sep 6, 2023, 11:23 AM
What is the problem at the moment?
I understand that the message is not being sent to destination wallet though I could have missed something.
Sep 6, 2023, 11:24 AM
FROM https://tonscan.org/address/EQDvVzROo3HGv5BWWab9ICMb40ICx5hBUDlrCc7ni4fAHlO6

TO https://tonscan.org/address/EQAXSCOCPPNeJlj9bkcooZXJ9J8E98ACv_p_9xissvkL3myk

BUT THE reciver is not get the blance
Sep 6, 2023, 11:24 AM
Please check
toAddress: new Address(to_address),
let wallet = new tonweb.Wallets.all['v4R2']({address: from_address});
Sep 6, 2023, 11:35 AM
Sep 6, 2023, 11:37 AM
Also, please consider switching the mnemonic since you showed this one publicly (blurring also reveals mnemonic, it would be better to draw white rectangle on top of it).
Sep 6, 2023, 11:37 AM
thks just test it
Sep 6, 2023, 11:37 AM
let wallet = new TonWeb.Wallets.all['v4R2'](tonweb, {address: from_address});
Sep 6, 2023, 11:38 AM
Sep 6, 2023, 11:39 AM
In transfer,
seqno: seqno ?? 0,
though that shouldn't be the case.
Sep 6, 2023, 11:40 AM
address ir coreect
the seqno already to 6
Sep 6, 2023, 11:42 AM
This seems like TonWeb issue.
Sep 6, 2023, 11:42 AM
const tonweb = new TonWeb(new TonWeb.HttpProvider('https://toncenter.com/api/v2/jsonRPC', {apiKey: 'f89cd17ffe8a592dfd1e2da770523616d3f4a5436be33c89b1f570337656ecca'}));
I use this jsonRPC
Sep 6, 2023, 11:43 AM
let wallet = new TonWeb.Wallets.all['v4R2'](tonweb.provider, {address: from_address});
Sep 6, 2023, 11:45 AM
let wallet = tonweb.wallet.create({address: from_address}); // if your know only address at this moment


Tthis is right ?
I see this is publickey
Sep 6, 2023, 11:45 AM
No, it attempts to handle your wallet as v3r2 one.
Sep 6, 2023, 11:45 AM
good deal
thks lots
Sep 6, 2023, 11:46 AM

© 2024 Draquery.com All rights reserved.