@ton3/liteclient
Version:
TON Blockchain LiteClient
16 lines (13 loc) • 569 B
text/typescript
import { StreamWriter } from '../../tl/stream';
import { crc32 } from '../../utils';
import { BlockIdExt, blockIdExt } from '../../dataTypes/tonNode';
import { AccountId, accountId } from '../../dataTypes/liteServer';
export const getAccountState = (bufferWriter: StreamWriter, id: BlockIdExt, account: AccountId) => {
bufferWriter.writeInt32LE(
crc32(
'liteServer.getAccountState id:tonNode.blockIdExt account:liteServer.accountId = liteServer.AccountState',
),
);
blockIdExt.write(bufferWriter, id);
accountId.write(bufferWriter, account);
};