@ton3/liteclient
Version:
TON Blockchain LiteClient
16 lines (13 loc) • 372 B
text/typescript
import { StreamWriter } from '../../tl/stream';
export interface BlockId {
workchain: number;
shard: bigint;
seqno: number;
}
export const blockId = {
write: (bufferWriter: StreamWriter, blockId: BlockId) => {
bufferWriter.writeInt32LE(blockId.workchain);
bufferWriter.writeUint64LE(blockId.shard);
bufferWriter.writeUint32LE(blockId.seqno);
},
};