You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

30 lines
449 B

package auth
import (
"io"
"github.com/gotd/td/tg"
)
// Client implements Telegram authentication.
type Client struct {
api *tg.Client
rand io.Reader
appID int
appHash string
}
// NewClient initializes and returns Telegram authentication client.
func NewClient(
api *tg.Client,
rand io.Reader,
appID int,
appHash string,
) *Client {
return &Client{
api: api,
rand: rand,
appID: appID,
appHash: appHash,
}
}