UNPKG

@ton3/liteclient

Version:
22 lines (18 loc) 659 B
import { StreamWriter } from '../../tl/stream'; import { crc32 } from '../../utils'; import { BlockIdExt, blockIdExt } from '../../dataTypes/tonNode'; import { AccountId, accountId } from '../../dataTypes/liteServer'; const tag = crc32( 'liteServer.getOneTransaction id:tonNode.blockIdExt account:liteServer.accountId lt:long = liteServer.TransactionInfo', ); export const getOneTransaction = ( bufferWriter: StreamWriter, id: BlockIdExt, account: AccountId, lt: bigint ) => { bufferWriter.writeInt32LE(tag); blockIdExt.write(bufferWriter, id); accountId.write(bufferWriter, account); bufferWriter.writeUint64LE(lt); };