@arbiwallet/contracts 1.0.13 → 1.0.15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/gen/auth.ts CHANGED
@@ -10,7 +10,11 @@ import { Observable } from "rxjs";
10
10
 
11
11
  export const protobufPackage = "auth";
12
12
 
13
- export interface TelegramAuthRequest {
13
+ export interface TelegramMiniAppAuthRequest {
14
+ initData: string;
15
+ }
16
+
17
+ export interface TelegramLoginWidgetAuthRequest {
14
18
  id: string;
15
19
  hash: string;
16
20
  username: string;
@@ -69,7 +73,11 @@ export interface MeResponse {
69
73
  export const AUTH_PACKAGE_NAME = "auth";
70
74
 
71
75
  export interface AuthServiceClient {
72
- telegramAuth(request: TelegramAuthRequest): Observable<AuthTokensResponse>;
76
+ telegramAuth(request: TelegramLoginWidgetAuthRequest): Observable<AuthTokensResponse>;
77
+
78
+ telegramMiniAppAuth(request: TelegramMiniAppAuthRequest): Observable<AuthTokensResponse>;
79
+
80
+ telegramLoginWidgetAuth(request: TelegramLoginWidgetAuthRequest): Observable<AuthTokensResponse>;
73
81
 
74
82
  googleAuth(request: GoogleAuthRequest): Observable<AuthTokensResponse>;
75
83
 
@@ -88,7 +96,15 @@ export interface AuthServiceClient {
88
96
 
89
97
  export interface AuthServiceController {
90
98
  telegramAuth(
91
- request: TelegramAuthRequest,
99
+ request: TelegramLoginWidgetAuthRequest,
100
+ ): Promise<AuthTokensResponse> | Observable<AuthTokensResponse> | AuthTokensResponse;
101
+
102
+ telegramMiniAppAuth(
103
+ request: TelegramMiniAppAuthRequest,
104
+ ): Promise<AuthTokensResponse> | Observable<AuthTokensResponse> | AuthTokensResponse;
105
+
106
+ telegramLoginWidgetAuth(
107
+ request: TelegramLoginWidgetAuthRequest,
92
108
  ): Promise<AuthTokensResponse> | Observable<AuthTokensResponse> | AuthTokensResponse;
93
109
 
94
110
  googleAuth(
@@ -120,6 +136,8 @@ export function AuthServiceControllerMethods() {
120
136
  return function (constructor: Function) {
121
137
  const grpcMethods: string[] = [
122
138
  "telegramAuth",
139
+ "telegramMiniAppAuth",
140
+ "telegramLoginWidgetAuth",
123
141
  "googleAuth",
124
142
  "appleAuth",
125
143
  "requestContactCode",
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@arbiwallet/contracts",
3
3
  "descriptions": "Generate and manage smart contracts for ArbiWallet",
4
- "version": "1.0.13",
4
+ "version": "1.0.15",
5
5
  "scripts": {
6
6
  "generate": "protoc -I ./proto ./proto/*.proto --ts_proto_out=./gen --ts_proto_opt=nestJs=true,package=omit"
7
7
  },
package/proto/auth.proto CHANGED
@@ -2,7 +2,9 @@ syntax = "proto3";
2
2
  package auth;
3
3
 
4
4
  service AuthService {
5
- rpc TelegramAuth (TelegramAuthRequest) returns (AuthTokensResponse);
5
+ rpc TelegramAuth (TelegramLoginWidgetAuthRequest) returns (AuthTokensResponse);
6
+ rpc TelegramMiniAppAuth (TelegramMiniAppAuthRequest) returns (AuthTokensResponse);
7
+ rpc TelegramLoginWidgetAuth (TelegramLoginWidgetAuthRequest) returns (AuthTokensResponse);
6
8
  rpc GoogleAuth (GoogleAuthRequest) returns (AuthTokensResponse);
7
9
  rpc AppleAuth (AppleAuthRequest) returns (AuthTokensResponse);
8
10
  rpc RequestContactCode (ContactCodeRequest) returns (MessageResponse);
@@ -12,7 +14,11 @@ service AuthService {
12
14
  rpc GetMe (AccessTokenRequest) returns (MeResponse);
13
15
  }
14
16
 
15
- message TelegramAuthRequest {
17
+ message TelegramMiniAppAuthRequest {
18
+ string init_data = 1;
19
+ }
20
+
21
+ message TelegramLoginWidgetAuthRequest {
16
22
  string id = 1;
17
23
  string hash = 2;
18
24
  string username = 3;