akegaviar / ton-foo

MIT License
0 stars 0 forks source link

any example on how to decode the result form tonClient.getTransactions()? #497

Open akegaviar opened 4 months ago

akegaviar commented 4 months ago

https://ton-community.github.io/ton/classes/TonClient.html#getTransaction

it returns a list of transactions:Returns Promise<null | {address: bigint;description: TransactionDescription;endStatus: AccountStatus;inMessage: undefined | Message;lt: bigint;now: number;oldStatus: AccountStatus;outMessages: Dictionary<number, Message>;outMessagesCount: number;prevTransactionHash: bigint;prevTransactionLt: bigint;stateUpdate: HashUpdate;totalFees: CurrencyCollection;}>

I want to know how to decode the outMessage, inMessage and address from bigint to string address. Please help!

Answer

you can convert bigint to hex format


Original