LiteServers

Libs Integration

integration tonpy has liteclient only in dev version (tonpy dev) at the moment from tonpy import test = liteclient(host=" ", port= , pubkey hex=" ", timeout=5) test get masterchain info ext() last learn more import requests from pytoniq import litebalancer config = requests get('link from bot') json() provider = litebalancer from config(config=config, trust level=2) await provider start up() result = await client run get method(address='eqbvw8z5hubkmjydnfaem5jqtnkuwx3diqyenkwsil0xgggg', method='seqno', stack=\[]) learn more package main import ( 	"context" 	"fmt" 	"log" 	"github com/xssnick/tonutils go/address" 	"github com/xssnick/tonutils go/liteclient" 	"github com/xssnick/tonutils go/ton" ) func main() { 	client = liteclient newconnectionpool() 	// connect to mainnet lite server 	err = client addconnection(context background(), "ip from bot\ port from bot", "base64 key from bot") 	if err != nil { 	 log fatalln("connection err ", err error()) 	 return 	} 	// initialize ton api lite connection wrapper 	api = ton newapiclient(client) 	// we need fresh block info to run get methods 	b, err = api currentmasterchaininfo(context background()) 	if err != nil { 	 log fatalln("get block err ", err error()) 	 return 	} 	/ 	 we will run such method of contract 	 cell mult(int a, int b) method id { 	 return begin cell() store uint(a b, 64) end cell(); 	 } 	 / 	res, err = api waitforblock(b seqno) rungetmethod(context background(), b, 	 address mustparseaddr("kqbl2 3lmiyywu17g or8n7v9hdmpcpttzbpe2isf2gtziky"), "mult", 7, 7) 	if err != nil { 	 log fatalln("run get method err ", err error()) 	 return 	} 	val, err = res mustcell(0) beginparse() loaduint(64) 	if err != nil { 	 println("err", err error()) 	 return 	} 	fmt printf("parsed result %d\n", val) } learn more