tpkg client code