tdjson

tdjson

TypeScript types for libtdjson.so

npm Coverage Status

TypeScript code is updated daily automatically from td_api.tl.

Usage

import { Tdjson } from 'tdjson';

class MyTdjson extends Tdjson {
protected async _request(message: any) {
// TODO: Call actual libtdjson.so binding here.
return { '@type': 'ok' };
}
}

const myTdjson = new MyTdjson();

// All methods typed and autocompleted with documentation 🎉
const proxy = await myTdjson.addProxy({
server: '127.0.0.1',
port: 1234,
enable: true,
type: {
'@type': 'proxyTypeSocks5',
username: 'username',
password: 'password',
},
});