UNPKG

@ton3/liteclient

Version:
22 lines (19 loc) 621 B
import { StreamWriter } from '../../tl/stream'; import { crc32 } from '../../utils'; import { AccountId, accountId } from '../../dataTypes/liteServer'; const tag = crc32( 'liteServer.getTransactions count:# account:liteServer.accountId lt:long hash:int256 = liteServer.TransactionList', ); export const getTransactions = ( bufferWriter: StreamWriter, count: number, account: AccountId, lt: bigint, hash: Uint8Array, ) => { bufferWriter.writeInt32LE(tag); bufferWriter.writeUint32LE(count); accountId.write(bufferWriter, account); bufferWriter.writeUint64LE(lt); bufferWriter.writeBuffer(hash); };