@tgsnake/skema 3.2.1-browser.0 → 3.2.1
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/dist/src/deps.d.ts +3 -4
- package/dist/src/deps.js +4 -4
- package/dist/src/raw/class/All.d.ts +1 -1
- package/dist/src/raw/class/All.js +2783 -2783
- package/dist/src/raw/class/Raw.d.ts +7601 -7601
- package/dist/src/raw/class/Raw.js +20676 -26781
- package/dist/src/raw/class/tl/account.d.ts +841 -841
- package/dist/src/raw/class/tl/account.js +1813 -1983
- package/dist/src/raw/class/tl/aicompose.d.ts +51 -51
- package/dist/src/raw/class/tl/aicompose.js +117 -128
- package/dist/src/raw/class/tl/auth.d.ts +296 -296
- package/dist/src/raw/class/tl/auth.js +714 -849
- package/dist/src/raw/class/tl/bots.d.ts +256 -256
- package/dist/src/raw/class/tl/bots.js +607 -661
- package/dist/src/raw/class/tl/channels.d.ts +336 -336
- package/dist/src/raw/class/tl/channels.js +745 -836
- package/dist/src/raw/class/tl/chatlists.d.ts +81 -81
- package/dist/src/raw/class/tl/chatlists.js +183 -196
- package/dist/src/raw/class/tl/communities.d.ts +56 -56
- package/dist/src/raw/class/tl/communities.js +138 -159
- package/dist/src/raw/class/tl/contacts.d.ts +216 -216
- package/dist/src/raw/class/tl/contacts.js +492 -537
- package/dist/src/raw/class/tl/ephemeral.d.ts +51 -51
- package/dist/src/raw/class/tl/ephemeral.js +152 -204
- package/dist/src/raw/class/tl/feed.d.ts +71 -71
- package/dist/src/raw/class/tl/feed.js +179 -214
- package/dist/src/raw/class/tl/folders.d.ts +6 -6
- package/dist/src/raw/class/tl/folders.js +11 -11
- package/dist/src/raw/class/tl/fragment.d.ts +11 -11
- package/dist/src/raw/class/tl/fragment.js +25 -32
- package/dist/src/raw/class/tl/help.d.ts +286 -286
- package/dist/src/raw/class/tl/help.js +618 -686
- package/dist/src/raw/class/tl/langpack.d.ts +26 -26
- package/dist/src/raw/class/tl/langpack.js +57 -57
- package/dist/src/raw/class/tl/messages.d.ts +1866 -1866
- package/dist/src/raw/class/tl/messages.js +4886 -5965
- package/dist/src/raw/class/tl/payments.d.ts +646 -646
- package/dist/src/raw/class/tl/payments.js +1766 -2254
- package/dist/src/raw/class/tl/phone.d.ts +256 -256
- package/dist/src/raw/class/tl/phone.js +644 -779
- package/dist/src/raw/class/tl/photos.d.ts +41 -41
- package/dist/src/raw/class/tl/photos.js +116 -139
- package/dist/src/raw/class/tl/premium.d.ts +41 -41
- package/dist/src/raw/class/tl/premium.js +111 -133
- package/dist/src/raw/class/tl/smsjobs.d.ts +46 -46
- package/dist/src/raw/class/tl/smsjobs.js +97 -115
- package/dist/src/raw/class/tl/stats.d.ts +71 -71
- package/dist/src/raw/class/tl/stats.js +169 -268
- package/dist/src/raw/class/tl/stickers.d.ts +61 -61
- package/dist/src/raw/class/tl/stickers.js +144 -173
- package/dist/src/raw/class/tl/storage.d.ts +51 -51
- package/dist/src/raw/class/tl/storage.js +71 -71
- package/dist/src/raw/class/tl/stories.d.ts +221 -221
- package/dist/src/raw/class/tl/stories.js +622 -781
- package/dist/src/raw/class/tl/toncenter.d.ts +21 -21
- package/dist/src/raw/class/tl/toncenter.js +47 -52
- package/dist/src/raw/class/tl/updates.d.ts +56 -56
- package/dist/src/raw/class/tl/updates.js +175 -246
- package/dist/src/raw/class/tl/upload.d.ts +66 -66
- package/dist/src/raw/class/tl/upload.js +155 -178
- package/dist/src/raw/class/tl/users.d.ts +61 -61
- package/dist/src/raw/class/tl/users.js +124 -124
- package/dist/src/raw/class/tl/wallet.d.ts +221 -221
- package/dist/src/raw/class/tl/wallet.js +558 -624
- package/dist/src/raw/class/types.d.ts +1 -1
- package/dist/src/raw/class/types.js +1 -1
- package/package.json +4 -6
|
@@ -6,7 +6,7 @@
|
|
|
6
6
|
*
|
|
7
7
|
* tgsnake is a free software: you can redistribute it and/or modify
|
|
8
8
|
* it under the terms of the MIT License as published.
|
|
9
|
-
|
|
9
|
+
*/
|
|
10
10
|
// This file is auto generate. All change made in this file will be lost!
|
|
11
11
|
import { TLObject, Primitive } from '../../core/index.js';
|
|
12
12
|
import { BytesIO } from '../../../deps.js';
|
|
@@ -15,36 +15,36 @@ export class UserAddresses extends TLObject {
|
|
|
15
15
|
users;
|
|
16
16
|
constructor(params) {
|
|
17
17
|
super();
|
|
18
|
-
this.classType =
|
|
19
|
-
this.className =
|
|
18
|
+
this.classType = "types";
|
|
19
|
+
this.className = "wallet.UserAddresses";
|
|
20
20
|
this.constructorId = 0x928e7b55;
|
|
21
21
|
this.subclassOfId = 0xd6496be3;
|
|
22
|
-
this._slots = [
|
|
22
|
+
this._slots = ["addresses", "users"];
|
|
23
23
|
this.addresses = params.addresses;
|
|
24
24
|
this.users = params.users;
|
|
25
25
|
}
|
|
26
26
|
/**
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
27
|
+
* Generate the TLObject from buffer.
|
|
28
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
29
|
+
*/
|
|
30
30
|
static async read(_data, ..._args) {
|
|
31
31
|
// no flags
|
|
32
32
|
let addresses = await TLObject.read(_data);
|
|
33
33
|
let users = await TLObject.read(_data);
|
|
34
|
-
return new UserAddresses({ addresses: addresses, users: users });
|
|
34
|
+
return new UserAddresses({ "addresses": addresses, "users": users });
|
|
35
35
|
}
|
|
36
36
|
/**
|
|
37
|
-
|
|
38
|
-
|
|
37
|
+
* Generate buffer from TLObject.
|
|
38
|
+
*/
|
|
39
39
|
write() {
|
|
40
40
|
const b = new BytesIO();
|
|
41
41
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
42
42
|
// no flags
|
|
43
43
|
if (this.addresses) {
|
|
44
|
-
b.write(Primitive.Vector.write(this.addresses));
|
|
44
|
+
b.write((Primitive.Vector.write(this.addresses)));
|
|
45
45
|
}
|
|
46
46
|
if (this.users) {
|
|
47
|
-
b.write(Primitive.Vector.write(this.users));
|
|
47
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
48
48
|
}
|
|
49
49
|
return b.buffer;
|
|
50
50
|
}
|
|
@@ -57,11 +57,11 @@ export class Transactions extends TLObject {
|
|
|
57
57
|
users;
|
|
58
58
|
constructor(params) {
|
|
59
59
|
super();
|
|
60
|
-
this.classType =
|
|
61
|
-
this.className =
|
|
60
|
+
this.classType = "types";
|
|
61
|
+
this.className = "wallet.Transactions";
|
|
62
62
|
this.constructorId = 0x4322d5a5;
|
|
63
63
|
this.subclassOfId = 0xda517b1b;
|
|
64
|
-
this._slots = [
|
|
64
|
+
this._slots = ["balance", "transactions", "nextOffset", "chats", "users"];
|
|
65
65
|
this.balance = params.balance;
|
|
66
66
|
this.transactions = params.transactions;
|
|
67
67
|
this.nextOffset = params.nextOffset;
|
|
@@ -69,49 +69,43 @@ export class Transactions extends TLObject {
|
|
|
69
69
|
this.users = params.users;
|
|
70
70
|
}
|
|
71
71
|
/**
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
72
|
+
* Generate the TLObject from buffer.
|
|
73
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
74
|
+
*/
|
|
75
75
|
static async read(_data, ..._args) {
|
|
76
76
|
// @ts-ignore
|
|
77
77
|
let flags = await Primitive.Int.read(_data);
|
|
78
78
|
let balance = await Primitive.Long.read(_data);
|
|
79
79
|
let transactions = await TLObject.read(_data);
|
|
80
|
-
let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
80
|
+
let nextOffset = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
81
81
|
let chats = await TLObject.read(_data);
|
|
82
82
|
let users = await TLObject.read(_data);
|
|
83
|
-
return new Transactions({
|
|
84
|
-
balance: balance,
|
|
85
|
-
transactions: transactions,
|
|
86
|
-
nextOffset: nextOffset,
|
|
87
|
-
chats: chats,
|
|
88
|
-
users: users,
|
|
89
|
-
});
|
|
83
|
+
return new Transactions({ "balance": balance, "transactions": transactions, "nextOffset": nextOffset, "chats": chats, "users": users });
|
|
90
84
|
}
|
|
91
85
|
/**
|
|
92
|
-
|
|
93
|
-
|
|
86
|
+
* Generate buffer from TLObject.
|
|
87
|
+
*/
|
|
94
88
|
write() {
|
|
95
89
|
const b = new BytesIO();
|
|
96
90
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
97
91
|
// @ts-ignore
|
|
98
92
|
let flags = 0;
|
|
99
|
-
flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
|
|
100
|
-
b.write(Primitive.Int.write(flags));
|
|
93
|
+
flags |= this.nextOffset !== undefined ? (1 << 0) : 0;
|
|
94
|
+
b.write((Primitive.Int.write(flags)));
|
|
101
95
|
if (this.balance !== undefined) {
|
|
102
|
-
b.write(Primitive.Long.write(this.balance));
|
|
96
|
+
b.write((Primitive.Long.write(this.balance)));
|
|
103
97
|
}
|
|
104
98
|
if (this.transactions) {
|
|
105
|
-
b.write(Primitive.Vector.write(this.transactions));
|
|
99
|
+
b.write((Primitive.Vector.write(this.transactions)));
|
|
106
100
|
}
|
|
107
101
|
if (this.nextOffset !== undefined) {
|
|
108
|
-
b.write(Primitive.String.write(this.nextOffset));
|
|
102
|
+
b.write((Primitive.String.write(this.nextOffset)));
|
|
109
103
|
}
|
|
110
104
|
if (this.chats) {
|
|
111
|
-
b.write(Primitive.Vector.write(this.chats));
|
|
105
|
+
b.write((Primitive.Vector.write(this.chats)));
|
|
112
106
|
}
|
|
113
107
|
if (this.users) {
|
|
114
|
-
b.write(Primitive.Vector.write(this.users));
|
|
108
|
+
b.write((Primitive.Vector.write(this.users)));
|
|
115
109
|
}
|
|
116
110
|
return b.buffer;
|
|
117
111
|
}
|
|
@@ -121,36 +115,36 @@ export class SecretPhraseParts extends TLObject {
|
|
|
121
115
|
dcs;
|
|
122
116
|
constructor(params) {
|
|
123
117
|
super();
|
|
124
|
-
this.classType =
|
|
125
|
-
this.className =
|
|
118
|
+
this.classType = "types";
|
|
119
|
+
this.className = "wallet.SecretPhraseParts";
|
|
126
120
|
this.constructorId = 0xe6d0ef01;
|
|
127
121
|
this.subclassOfId = 0x2e71bb10;
|
|
128
|
-
this._slots = [
|
|
122
|
+
this._slots = ["token", "dcs"];
|
|
129
123
|
this.token = params.token;
|
|
130
124
|
this.dcs = params.dcs;
|
|
131
125
|
}
|
|
132
126
|
/**
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
127
|
+
* Generate the TLObject from buffer.
|
|
128
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
129
|
+
*/
|
|
136
130
|
static async read(_data, ..._args) {
|
|
137
131
|
// no flags
|
|
138
132
|
let token = await Primitive.String.read(_data);
|
|
139
133
|
let dcs = await TLObject.read(_data, Primitive.Int);
|
|
140
|
-
return new SecretPhraseParts({ token: token, dcs: dcs });
|
|
134
|
+
return new SecretPhraseParts({ "token": token, "dcs": dcs });
|
|
141
135
|
}
|
|
142
136
|
/**
|
|
143
|
-
|
|
144
|
-
|
|
137
|
+
* Generate buffer from TLObject.
|
|
138
|
+
*/
|
|
145
139
|
write() {
|
|
146
140
|
const b = new BytesIO();
|
|
147
141
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
148
142
|
// no flags
|
|
149
143
|
if (this.token !== undefined) {
|
|
150
|
-
b.write(Primitive.String.write(this.token));
|
|
144
|
+
b.write((Primitive.String.write(this.token)));
|
|
151
145
|
}
|
|
152
146
|
if (this.dcs) {
|
|
153
|
-
b.write(Primitive.Vector.write(this.dcs, Primitive.Int));
|
|
147
|
+
b.write((Primitive.Vector.write(this.dcs, Primitive.Int)));
|
|
154
148
|
}
|
|
155
149
|
return b.buffer;
|
|
156
150
|
}
|
|
@@ -159,31 +153,31 @@ export class EncryptedSecretPhrasePart extends TLObject {
|
|
|
159
153
|
data;
|
|
160
154
|
constructor(params) {
|
|
161
155
|
super();
|
|
162
|
-
this.classType =
|
|
163
|
-
this.className =
|
|
156
|
+
this.classType = "types";
|
|
157
|
+
this.className = "wallet.EncryptedSecretPhrasePart";
|
|
164
158
|
this.constructorId = 0x18e82537;
|
|
165
159
|
this.subclassOfId = 0xed624c52;
|
|
166
|
-
this._slots = [
|
|
160
|
+
this._slots = ["data"];
|
|
167
161
|
this.data = params.data;
|
|
168
162
|
}
|
|
169
163
|
/**
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
164
|
+
* Generate the TLObject from buffer.
|
|
165
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
166
|
+
*/
|
|
173
167
|
static async read(_data, ..._args) {
|
|
174
168
|
// no flags
|
|
175
169
|
let data = await Primitive.Bytes.read(_data);
|
|
176
|
-
return new EncryptedSecretPhrasePart({ data: data });
|
|
170
|
+
return new EncryptedSecretPhrasePart({ "data": data });
|
|
177
171
|
}
|
|
178
172
|
/**
|
|
179
|
-
|
|
180
|
-
|
|
173
|
+
* Generate buffer from TLObject.
|
|
174
|
+
*/
|
|
181
175
|
write() {
|
|
182
176
|
const b = new BytesIO();
|
|
183
177
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
184
178
|
// no flags
|
|
185
179
|
if (this.data !== undefined) {
|
|
186
|
-
b.write(Primitive.Bytes.write(this.data));
|
|
180
|
+
b.write((Primitive.Bytes.write(this.data)));
|
|
187
181
|
}
|
|
188
182
|
return b.buffer;
|
|
189
183
|
}
|
|
@@ -193,36 +187,36 @@ export class HolderDc extends TLObject {
|
|
|
193
187
|
publicKey;
|
|
194
188
|
constructor(params) {
|
|
195
189
|
super();
|
|
196
|
-
this.classType =
|
|
197
|
-
this.className =
|
|
190
|
+
this.classType = "types";
|
|
191
|
+
this.className = "wallet.HolderDc";
|
|
198
192
|
this.constructorId = 0xf9d612ef;
|
|
199
193
|
this.subclassOfId = 0xf97e469f;
|
|
200
|
-
this._slots = [
|
|
194
|
+
this._slots = ["dc", "publicKey"];
|
|
201
195
|
this.dc = params.dc;
|
|
202
196
|
this.publicKey = params.publicKey;
|
|
203
197
|
}
|
|
204
198
|
/**
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
199
|
+
* Generate the TLObject from buffer.
|
|
200
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
201
|
+
*/
|
|
208
202
|
static async read(_data, ..._args) {
|
|
209
203
|
// no flags
|
|
210
204
|
let dc = await Primitive.Int.read(_data);
|
|
211
205
|
let publicKey = await Primitive.Bytes.read(_data);
|
|
212
|
-
return new HolderDc({ dc: dc, publicKey: publicKey });
|
|
206
|
+
return new HolderDc({ "dc": dc, "publicKey": publicKey });
|
|
213
207
|
}
|
|
214
208
|
/**
|
|
215
|
-
|
|
216
|
-
|
|
209
|
+
* Generate buffer from TLObject.
|
|
210
|
+
*/
|
|
217
211
|
write() {
|
|
218
212
|
const b = new BytesIO();
|
|
219
213
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
220
214
|
// no flags
|
|
221
215
|
if (this.dc !== undefined) {
|
|
222
|
-
b.write(Primitive.Int.write(this.dc));
|
|
216
|
+
b.write((Primitive.Int.write(this.dc)));
|
|
223
217
|
}
|
|
224
218
|
if (this.publicKey !== undefined) {
|
|
225
|
-
b.write(Primitive.Bytes.write(this.publicKey));
|
|
219
|
+
b.write((Primitive.Bytes.write(this.publicKey)));
|
|
226
220
|
}
|
|
227
221
|
return b.buffer;
|
|
228
222
|
}
|
|
@@ -233,41 +227,41 @@ export class ProofChallenge extends TLObject {
|
|
|
233
227
|
domain;
|
|
234
228
|
constructor(params) {
|
|
235
229
|
super();
|
|
236
|
-
this.classType =
|
|
237
|
-
this.className =
|
|
230
|
+
this.classType = "types";
|
|
231
|
+
this.className = "wallet.ProofChallenge";
|
|
238
232
|
this.constructorId = 0x99e41707;
|
|
239
233
|
this.subclassOfId = 0xd8d15305;
|
|
240
|
-
this._slots = [
|
|
234
|
+
this._slots = ["payload", "expires", "domain"];
|
|
241
235
|
this.payload = params.payload;
|
|
242
236
|
this.expires = params.expires;
|
|
243
237
|
this.domain = params.domain;
|
|
244
238
|
}
|
|
245
239
|
/**
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
240
|
+
* Generate the TLObject from buffer.
|
|
241
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
242
|
+
*/
|
|
249
243
|
static async read(_data, ..._args) {
|
|
250
244
|
// no flags
|
|
251
245
|
let payload = await Primitive.String.read(_data);
|
|
252
246
|
let expires = await Primitive.Int.read(_data);
|
|
253
247
|
let domain = await Primitive.String.read(_data);
|
|
254
|
-
return new ProofChallenge({ payload: payload, expires: expires, domain: domain });
|
|
248
|
+
return new ProofChallenge({ "payload": payload, "expires": expires, "domain": domain });
|
|
255
249
|
}
|
|
256
250
|
/**
|
|
257
|
-
|
|
258
|
-
|
|
251
|
+
* Generate buffer from TLObject.
|
|
252
|
+
*/
|
|
259
253
|
write() {
|
|
260
254
|
const b = new BytesIO();
|
|
261
255
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
262
256
|
// no flags
|
|
263
257
|
if (this.payload !== undefined) {
|
|
264
|
-
b.write(Primitive.String.write(this.payload));
|
|
258
|
+
b.write((Primitive.String.write(this.payload)));
|
|
265
259
|
}
|
|
266
260
|
if (this.expires !== undefined) {
|
|
267
|
-
b.write(Primitive.Int.write(this.expires));
|
|
261
|
+
b.write((Primitive.Int.write(this.expires)));
|
|
268
262
|
}
|
|
269
263
|
if (this.domain !== undefined) {
|
|
270
|
-
b.write(Primitive.String.write(this.domain));
|
|
264
|
+
b.write((Primitive.String.write(this.domain)));
|
|
271
265
|
}
|
|
272
266
|
return b.buffer;
|
|
273
267
|
}
|
|
@@ -277,36 +271,36 @@ export class TonConnectChallenge extends TLObject {
|
|
|
277
271
|
eventId;
|
|
278
272
|
constructor(params) {
|
|
279
273
|
super();
|
|
280
|
-
this.classType =
|
|
281
|
-
this.className =
|
|
274
|
+
this.classType = "types";
|
|
275
|
+
this.className = "wallet.TonConnectChallenge";
|
|
282
276
|
this.constructorId = 0x4bc89693;
|
|
283
277
|
this.subclassOfId = 0x6fc97efe;
|
|
284
|
-
this._slots = [
|
|
278
|
+
this._slots = ["challenge", "eventId"];
|
|
285
279
|
this.challenge = params.challenge;
|
|
286
280
|
this.eventId = params.eventId;
|
|
287
281
|
}
|
|
288
282
|
/**
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
283
|
+
* Generate the TLObject from buffer.
|
|
284
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
285
|
+
*/
|
|
292
286
|
static async read(_data, ..._args) {
|
|
293
287
|
// no flags
|
|
294
288
|
let challenge = await Primitive.Bytes.read(_data);
|
|
295
289
|
let eventId = await Primitive.Long.read(_data);
|
|
296
|
-
return new TonConnectChallenge({ challenge: challenge, eventId: eventId });
|
|
290
|
+
return new TonConnectChallenge({ "challenge": challenge, "eventId": eventId });
|
|
297
291
|
}
|
|
298
292
|
/**
|
|
299
|
-
|
|
300
|
-
|
|
293
|
+
* Generate buffer from TLObject.
|
|
294
|
+
*/
|
|
301
295
|
write() {
|
|
302
296
|
const b = new BytesIO();
|
|
303
297
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
304
298
|
// no flags
|
|
305
299
|
if (this.challenge !== undefined) {
|
|
306
|
-
b.write(Primitive.Bytes.write(this.challenge));
|
|
300
|
+
b.write((Primitive.Bytes.write(this.challenge)));
|
|
307
301
|
}
|
|
308
302
|
if (this.eventId !== undefined) {
|
|
309
|
-
b.write(Primitive.Long.write(this.eventId));
|
|
303
|
+
b.write((Primitive.Long.write(this.eventId)));
|
|
310
304
|
}
|
|
311
305
|
return b.buffer;
|
|
312
306
|
}
|
|
@@ -316,27 +310,27 @@ export class TonConnectPending extends TLObject {
|
|
|
316
310
|
requests;
|
|
317
311
|
constructor(params) {
|
|
318
312
|
super();
|
|
319
|
-
this.classType =
|
|
320
|
-
this.className =
|
|
313
|
+
this.classType = "types";
|
|
314
|
+
this.className = "wallet.TonConnectPending";
|
|
321
315
|
this.constructorId = 0x85c0f124;
|
|
322
316
|
this.subclassOfId = 0x81ebfc36;
|
|
323
|
-
this._slots = [
|
|
317
|
+
this._slots = ["session", "requests"];
|
|
324
318
|
this.session = params.session;
|
|
325
319
|
this.requests = params.requests;
|
|
326
320
|
}
|
|
327
321
|
/**
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
322
|
+
* Generate the TLObject from buffer.
|
|
323
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
324
|
+
*/
|
|
331
325
|
static async read(_data, ..._args) {
|
|
332
326
|
// no flags
|
|
333
327
|
let session = await TLObject.read(_data);
|
|
334
328
|
let requests = await TLObject.read(_data);
|
|
335
|
-
return new TonConnectPending({ session: session, requests: requests });
|
|
329
|
+
return new TonConnectPending({ "session": session, "requests": requests });
|
|
336
330
|
}
|
|
337
331
|
/**
|
|
338
|
-
|
|
339
|
-
|
|
332
|
+
* Generate buffer from TLObject.
|
|
333
|
+
*/
|
|
340
334
|
write() {
|
|
341
335
|
const b = new BytesIO();
|
|
342
336
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -345,7 +339,7 @@ export class TonConnectPending extends TLObject {
|
|
|
345
339
|
b.write(this.session.write());
|
|
346
340
|
}
|
|
347
341
|
if (this.requests) {
|
|
348
|
-
b.write(Primitive.Vector.write(this.requests));
|
|
342
|
+
b.write((Primitive.Vector.write(this.requests)));
|
|
349
343
|
}
|
|
350
344
|
return b.buffer;
|
|
351
345
|
}
|
|
@@ -354,31 +348,31 @@ export class TonConnectSessions extends TLObject {
|
|
|
354
348
|
sessions;
|
|
355
349
|
constructor(params) {
|
|
356
350
|
super();
|
|
357
|
-
this.classType =
|
|
358
|
-
this.className =
|
|
351
|
+
this.classType = "types";
|
|
352
|
+
this.className = "wallet.TonConnectSessions";
|
|
359
353
|
this.constructorId = 0xe1f6896;
|
|
360
354
|
this.subclassOfId = 0xe7323d24;
|
|
361
|
-
this._slots = [
|
|
355
|
+
this._slots = ["sessions"];
|
|
362
356
|
this.sessions = params.sessions;
|
|
363
357
|
}
|
|
364
358
|
/**
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
359
|
+
* Generate the TLObject from buffer.
|
|
360
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
361
|
+
*/
|
|
368
362
|
static async read(_data, ..._args) {
|
|
369
363
|
// no flags
|
|
370
364
|
let sessions = await TLObject.read(_data);
|
|
371
|
-
return new TonConnectSessions({ sessions: sessions });
|
|
365
|
+
return new TonConnectSessions({ "sessions": sessions });
|
|
372
366
|
}
|
|
373
367
|
/**
|
|
374
|
-
|
|
375
|
-
|
|
368
|
+
* Generate buffer from TLObject.
|
|
369
|
+
*/
|
|
376
370
|
write() {
|
|
377
371
|
const b = new BytesIO();
|
|
378
372
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
379
373
|
// no flags
|
|
380
374
|
if (this.sessions) {
|
|
381
|
-
b.write(Primitive.Vector.write(this.sessions));
|
|
375
|
+
b.write((Primitive.Vector.write(this.sessions)));
|
|
382
376
|
}
|
|
383
377
|
return b.buffer;
|
|
384
378
|
}
|
|
@@ -388,37 +382,37 @@ export class ExistingBalance extends TLObject {
|
|
|
388
382
|
url;
|
|
389
383
|
constructor(params) {
|
|
390
384
|
super();
|
|
391
|
-
this.classType =
|
|
392
|
-
this.className =
|
|
385
|
+
this.classType = "types";
|
|
386
|
+
this.className = "wallet.ExistingBalance";
|
|
393
387
|
this.constructorId = 0xbde90a8d;
|
|
394
388
|
this.subclassOfId = 0xa739fa56;
|
|
395
|
-
this._slots = [
|
|
389
|
+
this._slots = ["hasBalance", "url"];
|
|
396
390
|
this.hasBalance = params.hasBalance;
|
|
397
391
|
this.url = params.url;
|
|
398
392
|
}
|
|
399
393
|
/**
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
394
|
+
* Generate the TLObject from buffer.
|
|
395
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
396
|
+
*/
|
|
403
397
|
static async read(_data, ..._args) {
|
|
404
398
|
// @ts-ignore
|
|
405
399
|
let flags = await Primitive.Int.read(_data);
|
|
406
|
-
let hasBalance = flags & (1 << 0) ? true : false;
|
|
400
|
+
let hasBalance = (flags & (1 << 0)) ? true : false;
|
|
407
401
|
let url = await Primitive.String.read(_data);
|
|
408
|
-
return new ExistingBalance({ hasBalance: hasBalance, url: url });
|
|
402
|
+
return new ExistingBalance({ "hasBalance": hasBalance, "url": url });
|
|
409
403
|
}
|
|
410
404
|
/**
|
|
411
|
-
|
|
412
|
-
|
|
405
|
+
* Generate buffer from TLObject.
|
|
406
|
+
*/
|
|
413
407
|
write() {
|
|
414
408
|
const b = new BytesIO();
|
|
415
409
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
416
410
|
// @ts-ignore
|
|
417
411
|
let flags = 0;
|
|
418
|
-
flags |= this.hasBalance ? 1 << 0 : 0;
|
|
419
|
-
b.write(Primitive.Int.write(flags));
|
|
412
|
+
flags |= this.hasBalance ? (1 << 0) : 0;
|
|
413
|
+
b.write((Primitive.Int.write(flags)));
|
|
420
414
|
if (this.url !== undefined) {
|
|
421
|
-
b.write(Primitive.String.write(this.url));
|
|
415
|
+
b.write((Primitive.String.write(this.url)));
|
|
422
416
|
}
|
|
423
417
|
return b.buffer;
|
|
424
418
|
}
|
|
@@ -428,36 +422,36 @@ export class NftAttribute extends TLObject {
|
|
|
428
422
|
value;
|
|
429
423
|
constructor(params) {
|
|
430
424
|
super();
|
|
431
|
-
this.classType =
|
|
432
|
-
this.className =
|
|
425
|
+
this.classType = "types";
|
|
426
|
+
this.className = "wallet.NftAttribute";
|
|
433
427
|
this.constructorId = 0x4c1ef10e;
|
|
434
428
|
this.subclassOfId = 0x530e1841;
|
|
435
|
-
this._slots = [
|
|
429
|
+
this._slots = ["traitType", "value"];
|
|
436
430
|
this.traitType = params.traitType;
|
|
437
431
|
this.value = params.value;
|
|
438
432
|
}
|
|
439
433
|
/**
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
434
|
+
* Generate the TLObject from buffer.
|
|
435
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
436
|
+
*/
|
|
443
437
|
static async read(_data, ..._args) {
|
|
444
438
|
// no flags
|
|
445
439
|
let traitType = await Primitive.String.read(_data);
|
|
446
440
|
let value = await Primitive.String.read(_data);
|
|
447
|
-
return new NftAttribute({ traitType: traitType, value: value });
|
|
441
|
+
return new NftAttribute({ "traitType": traitType, "value": value });
|
|
448
442
|
}
|
|
449
443
|
/**
|
|
450
|
-
|
|
451
|
-
|
|
444
|
+
* Generate buffer from TLObject.
|
|
445
|
+
*/
|
|
452
446
|
write() {
|
|
453
447
|
const b = new BytesIO();
|
|
454
448
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
455
449
|
// no flags
|
|
456
450
|
if (this.traitType !== undefined) {
|
|
457
|
-
b.write(Primitive.String.write(this.traitType));
|
|
451
|
+
b.write((Primitive.String.write(this.traitType)));
|
|
458
452
|
}
|
|
459
453
|
if (this.value !== undefined) {
|
|
460
|
-
b.write(Primitive.String.write(this.value));
|
|
454
|
+
b.write((Primitive.String.write(this.value)));
|
|
461
455
|
}
|
|
462
456
|
return b.buffer;
|
|
463
457
|
}
|
|
@@ -478,25 +472,11 @@ export class NftItem extends TLObject {
|
|
|
478
472
|
gift;
|
|
479
473
|
constructor(params) {
|
|
480
474
|
super();
|
|
481
|
-
this.classType =
|
|
482
|
-
this.className =
|
|
475
|
+
this.classType = "types";
|
|
476
|
+
this.className = "wallet.NftItem";
|
|
483
477
|
this.constructorId = 0x173dfaf3;
|
|
484
478
|
this.subclassOfId = 0xd4319a36;
|
|
485
|
-
this._slots = [
|
|
486
|
-
'collectionAddress',
|
|
487
|
-
'address',
|
|
488
|
-
'ownerAddress',
|
|
489
|
-
'index',
|
|
490
|
-
'name',
|
|
491
|
-
'description',
|
|
492
|
-
'image',
|
|
493
|
-
'imageSmall',
|
|
494
|
-
'contentUrl',
|
|
495
|
-
'lottie',
|
|
496
|
-
'attributes',
|
|
497
|
-
'extra',
|
|
498
|
-
'gift',
|
|
499
|
-
];
|
|
479
|
+
this._slots = ["collectionAddress", "address", "ownerAddress", "index", "name", "description", "image", "imageSmall", "contentUrl", "lottie", "attributes", "extra", "gift"];
|
|
500
480
|
this.collectionAddress = params.collectionAddress;
|
|
501
481
|
this.address = params.address;
|
|
502
482
|
this.ownerAddress = params.ownerAddress;
|
|
@@ -512,77 +492,63 @@ export class NftItem extends TLObject {
|
|
|
512
492
|
this.gift = params.gift;
|
|
513
493
|
}
|
|
514
494
|
/**
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
495
|
+
* Generate the TLObject from buffer.
|
|
496
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
497
|
+
*/
|
|
518
498
|
static async read(_data, ..._args) {
|
|
519
499
|
// @ts-ignore
|
|
520
500
|
let flags = await Primitive.Int.read(_data);
|
|
521
|
-
let collectionAddress = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
501
|
+
let collectionAddress = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
522
502
|
let address = await Primitive.String.read(_data);
|
|
523
503
|
let ownerAddress = await Primitive.String.read(_data);
|
|
524
504
|
let index = await Primitive.String.read(_data);
|
|
525
|
-
let name = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
|
|
526
|
-
let description = flags & (1 << 2) ? await Primitive.String.read(_data) : undefined;
|
|
527
|
-
let image = flags & (1 << 3) ? await TLObject.read(_data) : undefined;
|
|
528
|
-
let imageSmall = flags & (1 << 4) ? await TLObject.read(_data) : undefined;
|
|
529
|
-
let contentUrl = flags & (1 << 5) ? await TLObject.read(_data) : undefined;
|
|
530
|
-
let lottie = flags & (1 << 6) ? await TLObject.read(_data) : undefined;
|
|
531
|
-
let attributes = flags & (1 << 7) ? await TLObject.read(_data) : [];
|
|
532
|
-
let extra = flags & (1 << 8) ? await TLObject.read(_data) : undefined;
|
|
533
|
-
let gift = flags & (1 << 9) ? await TLObject.read(_data) : undefined;
|
|
534
|
-
return new NftItem({
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
name: name,
|
|
540
|
-
description: description,
|
|
541
|
-
image: image,
|
|
542
|
-
imageSmall: imageSmall,
|
|
543
|
-
contentUrl: contentUrl,
|
|
544
|
-
lottie: lottie,
|
|
545
|
-
attributes: attributes,
|
|
546
|
-
extra: extra,
|
|
547
|
-
gift: gift,
|
|
548
|
-
});
|
|
549
|
-
}
|
|
550
|
-
/**
|
|
551
|
-
* Generate buffer from TLObject.
|
|
552
|
-
*/
|
|
505
|
+
let name = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
|
|
506
|
+
let description = (flags & (1 << 2)) ? await Primitive.String.read(_data) : undefined;
|
|
507
|
+
let image = (flags & (1 << 3)) ? await TLObject.read(_data) : undefined;
|
|
508
|
+
let imageSmall = (flags & (1 << 4)) ? await TLObject.read(_data) : undefined;
|
|
509
|
+
let contentUrl = (flags & (1 << 5)) ? await TLObject.read(_data) : undefined;
|
|
510
|
+
let lottie = (flags & (1 << 6)) ? await TLObject.read(_data) : undefined;
|
|
511
|
+
let attributes = (flags & (1 << 7)) ? await TLObject.read(_data) : [];
|
|
512
|
+
let extra = (flags & (1 << 8)) ? await TLObject.read(_data) : undefined;
|
|
513
|
+
let gift = (flags & (1 << 9)) ? await TLObject.read(_data) : undefined;
|
|
514
|
+
return new NftItem({ "collectionAddress": collectionAddress, "address": address, "ownerAddress": ownerAddress, "index": index, "name": name, "description": description, "image": image, "imageSmall": imageSmall, "contentUrl": contentUrl, "lottie": lottie, "attributes": attributes, "extra": extra, "gift": gift });
|
|
515
|
+
}
|
|
516
|
+
/**
|
|
517
|
+
* Generate buffer from TLObject.
|
|
518
|
+
*/
|
|
553
519
|
write() {
|
|
554
520
|
const b = new BytesIO();
|
|
555
521
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
556
522
|
// @ts-ignore
|
|
557
523
|
let flags = 0;
|
|
558
|
-
flags |= this.collectionAddress !== undefined ? 1 << 0 : 0;
|
|
559
|
-
flags |= this.name !== undefined ? 1 << 1 : 0;
|
|
560
|
-
flags |= this.description !== undefined ? 1 << 2 : 0;
|
|
561
|
-
flags |= this.image !== undefined ? 1 << 3 : 0;
|
|
562
|
-
flags |= this.imageSmall !== undefined ? 1 << 4 : 0;
|
|
563
|
-
flags |= this.contentUrl !== undefined ? 1 << 5 : 0;
|
|
564
|
-
flags |= this.lottie !== undefined ? 1 << 6 : 0;
|
|
565
|
-
flags |= this.attributes ? 1 << 7 : 0;
|
|
566
|
-
flags |= this.extra !== undefined ? 1 << 8 : 0;
|
|
567
|
-
flags |= this.gift !== undefined ? 1 << 9 : 0;
|
|
568
|
-
b.write(Primitive.Int.write(flags));
|
|
524
|
+
flags |= this.collectionAddress !== undefined ? (1 << 0) : 0;
|
|
525
|
+
flags |= this.name !== undefined ? (1 << 1) : 0;
|
|
526
|
+
flags |= this.description !== undefined ? (1 << 2) : 0;
|
|
527
|
+
flags |= this.image !== undefined ? (1 << 3) : 0;
|
|
528
|
+
flags |= this.imageSmall !== undefined ? (1 << 4) : 0;
|
|
529
|
+
flags |= this.contentUrl !== undefined ? (1 << 5) : 0;
|
|
530
|
+
flags |= this.lottie !== undefined ? (1 << 6) : 0;
|
|
531
|
+
flags |= this.attributes ? (1 << 7) : 0;
|
|
532
|
+
flags |= this.extra !== undefined ? (1 << 8) : 0;
|
|
533
|
+
flags |= this.gift !== undefined ? (1 << 9) : 0;
|
|
534
|
+
b.write((Primitive.Int.write(flags)));
|
|
569
535
|
if (this.collectionAddress !== undefined) {
|
|
570
|
-
b.write(Primitive.String.write(this.collectionAddress));
|
|
536
|
+
b.write((Primitive.String.write(this.collectionAddress)));
|
|
571
537
|
}
|
|
572
538
|
if (this.address !== undefined) {
|
|
573
|
-
b.write(Primitive.String.write(this.address));
|
|
539
|
+
b.write((Primitive.String.write(this.address)));
|
|
574
540
|
}
|
|
575
541
|
if (this.ownerAddress !== undefined) {
|
|
576
|
-
b.write(Primitive.String.write(this.ownerAddress));
|
|
542
|
+
b.write((Primitive.String.write(this.ownerAddress)));
|
|
577
543
|
}
|
|
578
544
|
if (this.index !== undefined) {
|
|
579
|
-
b.write(Primitive.String.write(this.index));
|
|
545
|
+
b.write((Primitive.String.write(this.index)));
|
|
580
546
|
}
|
|
581
547
|
if (this.name !== undefined) {
|
|
582
|
-
b.write(Primitive.String.write(this.name));
|
|
548
|
+
b.write((Primitive.String.write(this.name)));
|
|
583
549
|
}
|
|
584
550
|
if (this.description !== undefined) {
|
|
585
|
-
b.write(Primitive.String.write(this.description));
|
|
551
|
+
b.write((Primitive.String.write(this.description)));
|
|
586
552
|
}
|
|
587
553
|
if (this.image !== undefined) {
|
|
588
554
|
b.write(this.image.write());
|
|
@@ -597,7 +563,7 @@ export class NftItem extends TLObject {
|
|
|
597
563
|
b.write(this.lottie.write());
|
|
598
564
|
}
|
|
599
565
|
if (this.attributes) {
|
|
600
|
-
b.write(Primitive.Vector.write(this.attributes));
|
|
566
|
+
b.write((Primitive.Vector.write(this.attributes)));
|
|
601
567
|
}
|
|
602
568
|
if (this.extra !== undefined) {
|
|
603
569
|
b.write(this.extra.write());
|
|
@@ -613,40 +579,40 @@ export class NftItems extends TLObject {
|
|
|
613
579
|
nextOffset;
|
|
614
580
|
constructor(params) {
|
|
615
581
|
super();
|
|
616
|
-
this.classType =
|
|
617
|
-
this.className =
|
|
582
|
+
this.classType = "types";
|
|
583
|
+
this.className = "wallet.NftItems";
|
|
618
584
|
this.constructorId = 0x794d486f;
|
|
619
585
|
this.subclassOfId = 0xd4606b08;
|
|
620
|
-
this._slots = [
|
|
586
|
+
this._slots = ["items", "nextOffset"];
|
|
621
587
|
this.items = params.items;
|
|
622
588
|
this.nextOffset = params.nextOffset;
|
|
623
589
|
}
|
|
624
590
|
/**
|
|
625
|
-
|
|
626
|
-
|
|
627
|
-
|
|
591
|
+
* Generate the TLObject from buffer.
|
|
592
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
593
|
+
*/
|
|
628
594
|
static async read(_data, ..._args) {
|
|
629
595
|
// @ts-ignore
|
|
630
596
|
let flags = await Primitive.Int.read(_data);
|
|
631
597
|
let items = await TLObject.read(_data);
|
|
632
|
-
let nextOffset = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
633
|
-
return new NftItems({ items: items, nextOffset: nextOffset });
|
|
598
|
+
let nextOffset = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
599
|
+
return new NftItems({ "items": items, "nextOffset": nextOffset });
|
|
634
600
|
}
|
|
635
601
|
/**
|
|
636
|
-
|
|
637
|
-
|
|
602
|
+
* Generate buffer from TLObject.
|
|
603
|
+
*/
|
|
638
604
|
write() {
|
|
639
605
|
const b = new BytesIO();
|
|
640
606
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
641
607
|
// @ts-ignore
|
|
642
608
|
let flags = 0;
|
|
643
|
-
flags |= this.nextOffset !== undefined ? 1 << 0 : 0;
|
|
644
|
-
b.write(Primitive.Int.write(flags));
|
|
609
|
+
flags |= this.nextOffset !== undefined ? (1 << 0) : 0;
|
|
610
|
+
b.write((Primitive.Int.write(flags)));
|
|
645
611
|
if (this.items) {
|
|
646
|
-
b.write(Primitive.Vector.write(this.items));
|
|
612
|
+
b.write((Primitive.Vector.write(this.items)));
|
|
647
613
|
}
|
|
648
614
|
if (this.nextOffset !== undefined) {
|
|
649
|
-
b.write(Primitive.String.write(this.nextOffset));
|
|
615
|
+
b.write((Primitive.String.write(this.nextOffset)));
|
|
650
616
|
}
|
|
651
617
|
return b.buffer;
|
|
652
618
|
}
|
|
@@ -656,27 +622,27 @@ export class CardSticker extends TLObject {
|
|
|
656
622
|
nft;
|
|
657
623
|
constructor(params) {
|
|
658
624
|
super();
|
|
659
|
-
this.classType =
|
|
660
|
-
this.className =
|
|
625
|
+
this.classType = "types";
|
|
626
|
+
this.className = "wallet.CardSticker";
|
|
661
627
|
this.constructorId = 0xf3010cba;
|
|
662
628
|
this.subclassOfId = 0x87c28f79;
|
|
663
|
-
this._slots = [
|
|
629
|
+
this._slots = ["coordinates", "nft"];
|
|
664
630
|
this.coordinates = params.coordinates;
|
|
665
631
|
this.nft = params.nft;
|
|
666
632
|
}
|
|
667
633
|
/**
|
|
668
|
-
|
|
669
|
-
|
|
670
|
-
|
|
634
|
+
* Generate the TLObject from buffer.
|
|
635
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
636
|
+
*/
|
|
671
637
|
static async read(_data, ..._args) {
|
|
672
638
|
// no flags
|
|
673
639
|
let coordinates = await TLObject.read(_data);
|
|
674
640
|
let nft = await TLObject.read(_data);
|
|
675
|
-
return new CardSticker({ coordinates: coordinates, nft: nft });
|
|
641
|
+
return new CardSticker({ "coordinates": coordinates, "nft": nft });
|
|
676
642
|
}
|
|
677
643
|
/**
|
|
678
|
-
|
|
679
|
-
|
|
644
|
+
* Generate buffer from TLObject.
|
|
645
|
+
*/
|
|
680
646
|
write() {
|
|
681
647
|
const b = new BytesIO();
|
|
682
648
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -697,56 +663,51 @@ export class Card extends TLObject {
|
|
|
697
663
|
balance;
|
|
698
664
|
constructor(params) {
|
|
699
665
|
super();
|
|
700
|
-
this.classType =
|
|
701
|
-
this.className =
|
|
666
|
+
this.classType = "types";
|
|
667
|
+
this.className = "wallet.Card";
|
|
702
668
|
this.constructorId = 0x8ed043b1;
|
|
703
669
|
this.subclassOfId = 0x1f060b97;
|
|
704
|
-
this._slots = [
|
|
670
|
+
this._slots = ["stickers", "bgNftItem", "address", "balance"];
|
|
705
671
|
this.stickers = params.stickers;
|
|
706
672
|
this.bgNftItem = params.bgNftItem;
|
|
707
673
|
this.address = params.address;
|
|
708
674
|
this.balance = params.balance;
|
|
709
675
|
}
|
|
710
676
|
/**
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
677
|
+
* Generate the TLObject from buffer.
|
|
678
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
679
|
+
*/
|
|
714
680
|
static async read(_data, ..._args) {
|
|
715
681
|
// @ts-ignore
|
|
716
682
|
let flags = await Primitive.Int.read(_data);
|
|
717
|
-
let stickers = flags & (1 << 0) ? await TLObject.read(_data) : [];
|
|
718
|
-
let bgNftItem = flags & (1 << 1) ? await TLObject.read(_data) : undefined;
|
|
683
|
+
let stickers = (flags & (1 << 0)) ? await TLObject.read(_data) : [];
|
|
684
|
+
let bgNftItem = (flags & (1 << 1)) ? await TLObject.read(_data) : undefined;
|
|
719
685
|
let address = await Primitive.String.read(_data);
|
|
720
686
|
let balance = await Primitive.Long.read(_data);
|
|
721
|
-
return new Card({
|
|
722
|
-
stickers: stickers,
|
|
723
|
-
bgNftItem: bgNftItem,
|
|
724
|
-
address: address,
|
|
725
|
-
balance: balance,
|
|
726
|
-
});
|
|
687
|
+
return new Card({ "stickers": stickers, "bgNftItem": bgNftItem, "address": address, "balance": balance });
|
|
727
688
|
}
|
|
728
689
|
/**
|
|
729
|
-
|
|
730
|
-
|
|
690
|
+
* Generate buffer from TLObject.
|
|
691
|
+
*/
|
|
731
692
|
write() {
|
|
732
693
|
const b = new BytesIO();
|
|
733
694
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
734
695
|
// @ts-ignore
|
|
735
696
|
let flags = 0;
|
|
736
|
-
flags |= this.stickers ? 1 << 0 : 0;
|
|
737
|
-
flags |= this.bgNftItem !== undefined ? 1 << 1 : 0;
|
|
738
|
-
b.write(Primitive.Int.write(flags));
|
|
697
|
+
flags |= this.stickers ? (1 << 0) : 0;
|
|
698
|
+
flags |= this.bgNftItem !== undefined ? (1 << 1) : 0;
|
|
699
|
+
b.write((Primitive.Int.write(flags)));
|
|
739
700
|
if (this.stickers) {
|
|
740
|
-
b.write(Primitive.Vector.write(this.stickers));
|
|
701
|
+
b.write((Primitive.Vector.write(this.stickers)));
|
|
741
702
|
}
|
|
742
703
|
if (this.bgNftItem !== undefined) {
|
|
743
704
|
b.write(this.bgNftItem.write());
|
|
744
705
|
}
|
|
745
706
|
if (this.address !== undefined) {
|
|
746
|
-
b.write(Primitive.String.write(this.address));
|
|
707
|
+
b.write((Primitive.String.write(this.address)));
|
|
747
708
|
}
|
|
748
709
|
if (this.balance !== undefined) {
|
|
749
|
-
b.write(Primitive.Long.write(this.balance));
|
|
710
|
+
b.write((Primitive.Long.write(this.balance)));
|
|
750
711
|
}
|
|
751
712
|
return b.buffer;
|
|
752
713
|
}
|
|
@@ -755,23 +716,23 @@ export class GetState extends TLObject {
|
|
|
755
716
|
__response__;
|
|
756
717
|
constructor() {
|
|
757
718
|
super();
|
|
758
|
-
this.classType =
|
|
759
|
-
this.className =
|
|
719
|
+
this.classType = "functions";
|
|
720
|
+
this.className = "wallet.GetState";
|
|
760
721
|
this.constructorId = 0xab83b33a;
|
|
761
722
|
this.subclassOfId = 0xd479f736;
|
|
762
723
|
this._slots = [];
|
|
763
724
|
}
|
|
764
725
|
/**
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
726
|
+
* Generate the TLObject from buffer.
|
|
727
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
728
|
+
*/
|
|
768
729
|
static async read(_data, ..._args) {
|
|
769
730
|
// no flags
|
|
770
731
|
return new GetState();
|
|
771
732
|
}
|
|
772
733
|
/**
|
|
773
|
-
|
|
774
|
-
|
|
734
|
+
* Generate buffer from TLObject.
|
|
735
|
+
*/
|
|
775
736
|
write() {
|
|
776
737
|
const b = new BytesIO();
|
|
777
738
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -786,42 +747,42 @@ export class GetUserAddresses extends TLObject {
|
|
|
786
747
|
addresses;
|
|
787
748
|
constructor(params) {
|
|
788
749
|
super();
|
|
789
|
-
this.classType =
|
|
790
|
-
this.className =
|
|
750
|
+
this.classType = "functions";
|
|
751
|
+
this.className = "wallet.GetUserAddresses";
|
|
791
752
|
this.constructorId = 0x5275dfdd;
|
|
792
753
|
this.subclassOfId = 0xd6496be3;
|
|
793
|
-
this._slots = [
|
|
754
|
+
this._slots = ["force", "id", "addresses"];
|
|
794
755
|
this.force = params.force;
|
|
795
756
|
this.id = params.id;
|
|
796
757
|
this.addresses = params.addresses;
|
|
797
758
|
}
|
|
798
759
|
/**
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
760
|
+
* Generate the TLObject from buffer.
|
|
761
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
762
|
+
*/
|
|
802
763
|
static async read(_data, ..._args) {
|
|
803
764
|
// @ts-ignore
|
|
804
765
|
let flags = await Primitive.Int.read(_data);
|
|
805
|
-
let force = flags & (1 << 0) ? true : false;
|
|
766
|
+
let force = (flags & (1 << 0)) ? true : false;
|
|
806
767
|
let id = await TLObject.read(_data);
|
|
807
768
|
let addresses = await TLObject.read(_data, Primitive.String);
|
|
808
|
-
return new GetUserAddresses({ force: force, id: id, addresses: addresses });
|
|
769
|
+
return new GetUserAddresses({ "force": force, "id": id, "addresses": addresses });
|
|
809
770
|
}
|
|
810
771
|
/**
|
|
811
|
-
|
|
812
|
-
|
|
772
|
+
* Generate buffer from TLObject.
|
|
773
|
+
*/
|
|
813
774
|
write() {
|
|
814
775
|
const b = new BytesIO();
|
|
815
776
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
816
777
|
// @ts-ignore
|
|
817
778
|
let flags = 0;
|
|
818
|
-
flags |= this.force ? 1 << 0 : 0;
|
|
819
|
-
b.write(Primitive.Int.write(flags));
|
|
779
|
+
flags |= this.force ? (1 << 0) : 0;
|
|
780
|
+
b.write((Primitive.Int.write(flags)));
|
|
820
781
|
if (this.id) {
|
|
821
|
-
b.write(Primitive.Vector.write(this.id));
|
|
782
|
+
b.write((Primitive.Vector.write(this.id)));
|
|
822
783
|
}
|
|
823
784
|
if (this.addresses) {
|
|
824
|
-
b.write(Primitive.Vector.write(this.addresses, Primitive.String));
|
|
785
|
+
b.write((Primitive.Vector.write(this.addresses, Primitive.String)));
|
|
825
786
|
}
|
|
826
787
|
return b.buffer;
|
|
827
788
|
}
|
|
@@ -834,50 +795,45 @@ export class GetTransactions extends TLObject {
|
|
|
834
795
|
limit;
|
|
835
796
|
constructor(params) {
|
|
836
797
|
super();
|
|
837
|
-
this.classType =
|
|
838
|
-
this.className =
|
|
798
|
+
this.classType = "functions";
|
|
799
|
+
this.className = "wallet.GetTransactions";
|
|
839
800
|
this.constructorId = 0xa8830a83;
|
|
840
801
|
this.subclassOfId = 0xda517b1b;
|
|
841
|
-
this._slots = [
|
|
802
|
+
this._slots = ["inbound", "outbound", "offset", "limit"];
|
|
842
803
|
this.inbound = params.inbound;
|
|
843
804
|
this.outbound = params.outbound;
|
|
844
805
|
this.offset = params.offset;
|
|
845
806
|
this.limit = params.limit;
|
|
846
807
|
}
|
|
847
808
|
/**
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
|
|
809
|
+
* Generate the TLObject from buffer.
|
|
810
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
811
|
+
*/
|
|
851
812
|
static async read(_data, ..._args) {
|
|
852
813
|
// @ts-ignore
|
|
853
814
|
let flags = await Primitive.Int.read(_data);
|
|
854
|
-
let inbound = flags & (1 << 0) ? true : false;
|
|
855
|
-
let outbound = flags & (1 << 1) ? true : false;
|
|
815
|
+
let inbound = (flags & (1 << 0)) ? true : false;
|
|
816
|
+
let outbound = (flags & (1 << 1)) ? true : false;
|
|
856
817
|
let offset = await Primitive.String.read(_data);
|
|
857
818
|
let limit = await Primitive.Int.read(_data);
|
|
858
|
-
return new GetTransactions({
|
|
859
|
-
inbound: inbound,
|
|
860
|
-
outbound: outbound,
|
|
861
|
-
offset: offset,
|
|
862
|
-
limit: limit,
|
|
863
|
-
});
|
|
819
|
+
return new GetTransactions({ "inbound": inbound, "outbound": outbound, "offset": offset, "limit": limit });
|
|
864
820
|
}
|
|
865
821
|
/**
|
|
866
|
-
|
|
867
|
-
|
|
822
|
+
* Generate buffer from TLObject.
|
|
823
|
+
*/
|
|
868
824
|
write() {
|
|
869
825
|
const b = new BytesIO();
|
|
870
826
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
871
827
|
// @ts-ignore
|
|
872
828
|
let flags = 0;
|
|
873
|
-
flags |= this.inbound ? 1 << 0 : 0;
|
|
874
|
-
flags |= this.outbound ? 1 << 1 : 0;
|
|
875
|
-
b.write(Primitive.Int.write(flags));
|
|
829
|
+
flags |= this.inbound ? (1 << 0) : 0;
|
|
830
|
+
flags |= this.outbound ? (1 << 1) : 0;
|
|
831
|
+
b.write((Primitive.Int.write(flags)));
|
|
876
832
|
if (this.offset !== undefined) {
|
|
877
|
-
b.write(Primitive.String.write(this.offset));
|
|
833
|
+
b.write((Primitive.String.write(this.offset)));
|
|
878
834
|
}
|
|
879
835
|
if (this.limit !== undefined) {
|
|
880
|
-
b.write(Primitive.Int.write(this.limit));
|
|
836
|
+
b.write((Primitive.Int.write(this.limit)));
|
|
881
837
|
}
|
|
882
838
|
return b.buffer;
|
|
883
839
|
}
|
|
@@ -887,31 +843,31 @@ export class GetTransactionsByIDs extends TLObject {
|
|
|
887
843
|
id;
|
|
888
844
|
constructor(params) {
|
|
889
845
|
super();
|
|
890
|
-
this.classType =
|
|
891
|
-
this.className =
|
|
846
|
+
this.classType = "functions";
|
|
847
|
+
this.className = "wallet.GetTransactionsByIDs";
|
|
892
848
|
this.constructorId = 0x811ceab6;
|
|
893
849
|
this.subclassOfId = 0xda517b1b;
|
|
894
|
-
this._slots = [
|
|
850
|
+
this._slots = ["id"];
|
|
895
851
|
this.id = params.id;
|
|
896
852
|
}
|
|
897
853
|
/**
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
854
|
+
* Generate the TLObject from buffer.
|
|
855
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
856
|
+
*/
|
|
901
857
|
static async read(_data, ..._args) {
|
|
902
858
|
// no flags
|
|
903
859
|
let id = await TLObject.read(_data, Primitive.String);
|
|
904
|
-
return new GetTransactionsByIDs({ id: id });
|
|
860
|
+
return new GetTransactionsByIDs({ "id": id });
|
|
905
861
|
}
|
|
906
862
|
/**
|
|
907
|
-
|
|
908
|
-
|
|
863
|
+
* Generate buffer from TLObject.
|
|
864
|
+
*/
|
|
909
865
|
write() {
|
|
910
866
|
const b = new BytesIO();
|
|
911
867
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
912
868
|
// no flags
|
|
913
869
|
if (this.id) {
|
|
914
|
-
b.write(Primitive.Vector.write(this.id, Primitive.String));
|
|
870
|
+
b.write((Primitive.Vector.write(this.id, Primitive.String)));
|
|
915
871
|
}
|
|
916
872
|
return b.buffer;
|
|
917
873
|
}
|
|
@@ -921,31 +877,31 @@ export class GetTransactionsByMsgHash extends TLObject {
|
|
|
921
877
|
msgHash;
|
|
922
878
|
constructor(params) {
|
|
923
879
|
super();
|
|
924
|
-
this.classType =
|
|
925
|
-
this.className =
|
|
880
|
+
this.classType = "functions";
|
|
881
|
+
this.className = "wallet.GetTransactionsByMsgHash";
|
|
926
882
|
this.constructorId = 0xa6bb795d;
|
|
927
883
|
this.subclassOfId = 0xda517b1b;
|
|
928
|
-
this._slots = [
|
|
884
|
+
this._slots = ["msgHash"];
|
|
929
885
|
this.msgHash = params.msgHash;
|
|
930
886
|
}
|
|
931
887
|
/**
|
|
932
|
-
|
|
933
|
-
|
|
934
|
-
|
|
888
|
+
* Generate the TLObject from buffer.
|
|
889
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
890
|
+
*/
|
|
935
891
|
static async read(_data, ..._args) {
|
|
936
892
|
// no flags
|
|
937
893
|
let msgHash = await TLObject.read(_data, Primitive.String);
|
|
938
|
-
return new GetTransactionsByMsgHash({ msgHash: msgHash });
|
|
894
|
+
return new GetTransactionsByMsgHash({ "msgHash": msgHash });
|
|
939
895
|
}
|
|
940
896
|
/**
|
|
941
|
-
|
|
942
|
-
|
|
897
|
+
* Generate buffer from TLObject.
|
|
898
|
+
*/
|
|
943
899
|
write() {
|
|
944
900
|
const b = new BytesIO();
|
|
945
901
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
946
902
|
// no flags
|
|
947
903
|
if (this.msgHash) {
|
|
948
|
-
b.write(Primitive.Vector.write(this.msgHash, Primitive.String));
|
|
904
|
+
b.write((Primitive.Vector.write(this.msgHash, Primitive.String)));
|
|
949
905
|
}
|
|
950
906
|
return b.buffer;
|
|
951
907
|
}
|
|
@@ -955,33 +911,33 @@ export class ExportSecretPhrase extends TLObject {
|
|
|
955
911
|
password;
|
|
956
912
|
constructor(params) {
|
|
957
913
|
super();
|
|
958
|
-
this.classType =
|
|
959
|
-
this.className =
|
|
914
|
+
this.classType = "functions";
|
|
915
|
+
this.className = "wallet.ExportSecretPhrase";
|
|
960
916
|
this.constructorId = 0x9077c9ac;
|
|
961
917
|
this.subclassOfId = 0x2e71bb10;
|
|
962
|
-
this._slots = [
|
|
918
|
+
this._slots = ["password"];
|
|
963
919
|
this.password = params.password;
|
|
964
920
|
}
|
|
965
921
|
/**
|
|
966
|
-
|
|
967
|
-
|
|
968
|
-
|
|
922
|
+
* Generate the TLObject from buffer.
|
|
923
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
924
|
+
*/
|
|
969
925
|
static async read(_data, ..._args) {
|
|
970
926
|
// @ts-ignore
|
|
971
927
|
let flags = await Primitive.Int.read(_data);
|
|
972
|
-
let password = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
|
|
973
|
-
return new ExportSecretPhrase({ password: password });
|
|
928
|
+
let password = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
|
|
929
|
+
return new ExportSecretPhrase({ "password": password });
|
|
974
930
|
}
|
|
975
931
|
/**
|
|
976
|
-
|
|
977
|
-
|
|
932
|
+
* Generate buffer from TLObject.
|
|
933
|
+
*/
|
|
978
934
|
write() {
|
|
979
935
|
const b = new BytesIO();
|
|
980
936
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
981
937
|
// @ts-ignore
|
|
982
938
|
let flags = 0;
|
|
983
|
-
flags |= this.password !== undefined ? 1 << 0 : 0;
|
|
984
|
-
b.write(Primitive.Int.write(flags));
|
|
939
|
+
flags |= this.password !== undefined ? (1 << 0) : 0;
|
|
940
|
+
b.write((Primitive.Int.write(flags)));
|
|
985
941
|
if (this.password !== undefined) {
|
|
986
942
|
b.write(this.password.write());
|
|
987
943
|
}
|
|
@@ -994,36 +950,36 @@ export class FetchEncryptedSecretPhrasePart extends TLObject {
|
|
|
994
950
|
publicKey;
|
|
995
951
|
constructor(params) {
|
|
996
952
|
super();
|
|
997
|
-
this.classType =
|
|
998
|
-
this.className =
|
|
953
|
+
this.classType = "functions";
|
|
954
|
+
this.className = "wallet.FetchEncryptedSecretPhrasePart";
|
|
999
955
|
this.constructorId = 0xf53925cf;
|
|
1000
956
|
this.subclassOfId = 0xed624c52;
|
|
1001
|
-
this._slots = [
|
|
957
|
+
this._slots = ["token", "publicKey"];
|
|
1002
958
|
this.token = params.token;
|
|
1003
959
|
this.publicKey = params.publicKey;
|
|
1004
960
|
}
|
|
1005
961
|
/**
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
962
|
+
* Generate the TLObject from buffer.
|
|
963
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
964
|
+
*/
|
|
1009
965
|
static async read(_data, ..._args) {
|
|
1010
966
|
// no flags
|
|
1011
967
|
let token = await Primitive.String.read(_data);
|
|
1012
968
|
let publicKey = await Primitive.Bytes.read(_data);
|
|
1013
|
-
return new FetchEncryptedSecretPhrasePart({ token: token, publicKey: publicKey });
|
|
969
|
+
return new FetchEncryptedSecretPhrasePart({ "token": token, "publicKey": publicKey });
|
|
1014
970
|
}
|
|
1015
971
|
/**
|
|
1016
|
-
|
|
1017
|
-
|
|
972
|
+
* Generate buffer from TLObject.
|
|
973
|
+
*/
|
|
1018
974
|
write() {
|
|
1019
975
|
const b = new BytesIO();
|
|
1020
976
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1021
977
|
// no flags
|
|
1022
978
|
if (this.token !== undefined) {
|
|
1023
|
-
b.write(Primitive.String.write(this.token));
|
|
979
|
+
b.write((Primitive.String.write(this.token)));
|
|
1024
980
|
}
|
|
1025
981
|
if (this.publicKey !== undefined) {
|
|
1026
|
-
b.write(Primitive.Bytes.write(this.publicKey));
|
|
982
|
+
b.write((Primitive.Bytes.write(this.publicKey)));
|
|
1027
983
|
}
|
|
1028
984
|
return b.buffer;
|
|
1029
985
|
}
|
|
@@ -1034,35 +990,35 @@ export class ReplaceWallet extends TLObject {
|
|
|
1034
990
|
password;
|
|
1035
991
|
constructor(params) {
|
|
1036
992
|
super();
|
|
1037
|
-
this.classType =
|
|
1038
|
-
this.className =
|
|
993
|
+
this.classType = "functions";
|
|
994
|
+
this.className = "wallet.ReplaceWallet";
|
|
1039
995
|
this.constructorId = 0xd8c72eec;
|
|
1040
996
|
this.subclassOfId = 0xd479f736;
|
|
1041
|
-
this._slots = [
|
|
997
|
+
this._slots = ["wallet", "password"];
|
|
1042
998
|
this.wallet = params.wallet;
|
|
1043
999
|
this.password = params.password;
|
|
1044
1000
|
}
|
|
1045
1001
|
/**
|
|
1046
|
-
|
|
1047
|
-
|
|
1048
|
-
|
|
1002
|
+
* Generate the TLObject from buffer.
|
|
1003
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1004
|
+
*/
|
|
1049
1005
|
static async read(_data, ..._args) {
|
|
1050
1006
|
// @ts-ignore
|
|
1051
1007
|
let flags = await Primitive.Int.read(_data);
|
|
1052
1008
|
let wallet = await TLObject.read(_data);
|
|
1053
|
-
let password = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
|
|
1054
|
-
return new ReplaceWallet({ wallet: wallet, password: password });
|
|
1009
|
+
let password = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
|
|
1010
|
+
return new ReplaceWallet({ "wallet": wallet, "password": password });
|
|
1055
1011
|
}
|
|
1056
1012
|
/**
|
|
1057
|
-
|
|
1058
|
-
|
|
1013
|
+
* Generate buffer from TLObject.
|
|
1014
|
+
*/
|
|
1059
1015
|
write() {
|
|
1060
1016
|
const b = new BytesIO();
|
|
1061
1017
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1062
1018
|
// @ts-ignore
|
|
1063
1019
|
let flags = 0;
|
|
1064
|
-
flags |= this.password !== undefined ? 1 << 0 : 0;
|
|
1065
|
-
b.write(Primitive.Int.write(flags));
|
|
1020
|
+
flags |= this.password !== undefined ? (1 << 0) : 0;
|
|
1021
|
+
b.write((Primitive.Int.write(flags)));
|
|
1066
1022
|
if (this.wallet !== undefined) {
|
|
1067
1023
|
b.write(this.wallet.write());
|
|
1068
1024
|
}
|
|
@@ -1079,44 +1035,44 @@ export class DisableBackup extends TLObject {
|
|
|
1079
1035
|
proof;
|
|
1080
1036
|
constructor(params) {
|
|
1081
1037
|
super();
|
|
1082
|
-
this.classType =
|
|
1083
|
-
this.className =
|
|
1038
|
+
this.classType = "functions";
|
|
1039
|
+
this.className = "wallet.DisableBackup";
|
|
1084
1040
|
this.constructorId = 0xb0bf0da;
|
|
1085
1041
|
this.subclassOfId = 0xd479f736;
|
|
1086
|
-
this._slots = [
|
|
1042
|
+
this._slots = ["password", "newPublicKey", "proof"];
|
|
1087
1043
|
this.password = params.password;
|
|
1088
1044
|
this.newPublicKey = params.newPublicKey;
|
|
1089
1045
|
this.proof = params.proof;
|
|
1090
1046
|
}
|
|
1091
1047
|
/**
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1048
|
+
* Generate the TLObject from buffer.
|
|
1049
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1050
|
+
*/
|
|
1095
1051
|
static async read(_data, ..._args) {
|
|
1096
1052
|
// @ts-ignore
|
|
1097
1053
|
let flags = await Primitive.Int.read(_data);
|
|
1098
|
-
let password = flags & (1 << 0) ? await TLObject.read(_data) : undefined;
|
|
1099
|
-
let newPublicKey = flags & (1 << 1) ? await Primitive.Bytes.read(_data) : undefined;
|
|
1100
|
-
let proof = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
|
|
1101
|
-
return new DisableBackup({ password: password, newPublicKey: newPublicKey, proof: proof });
|
|
1054
|
+
let password = (flags & (1 << 0)) ? await TLObject.read(_data) : undefined;
|
|
1055
|
+
let newPublicKey = (flags & (1 << 1)) ? await Primitive.Bytes.read(_data) : undefined;
|
|
1056
|
+
let proof = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
|
|
1057
|
+
return new DisableBackup({ "password": password, "newPublicKey": newPublicKey, "proof": proof });
|
|
1102
1058
|
}
|
|
1103
1059
|
/**
|
|
1104
|
-
|
|
1105
|
-
|
|
1060
|
+
* Generate buffer from TLObject.
|
|
1061
|
+
*/
|
|
1106
1062
|
write() {
|
|
1107
1063
|
const b = new BytesIO();
|
|
1108
1064
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1109
1065
|
// @ts-ignore
|
|
1110
1066
|
let flags = 0;
|
|
1111
|
-
flags |= this.password !== undefined ? 1 << 0 : 0;
|
|
1112
|
-
flags |= this.newPublicKey !== undefined ? 1 << 1 : 0;
|
|
1113
|
-
flags |= this.proof !== undefined ? 1 << 2 : 0;
|
|
1114
|
-
b.write(Primitive.Int.write(flags));
|
|
1067
|
+
flags |= this.password !== undefined ? (1 << 0) : 0;
|
|
1068
|
+
flags |= this.newPublicKey !== undefined ? (1 << 1) : 0;
|
|
1069
|
+
flags |= this.proof !== undefined ? (1 << 2) : 0;
|
|
1070
|
+
b.write((Primitive.Int.write(flags)));
|
|
1115
1071
|
if (this.password !== undefined) {
|
|
1116
1072
|
b.write(this.password.write());
|
|
1117
1073
|
}
|
|
1118
1074
|
if (this.newPublicKey !== undefined) {
|
|
1119
|
-
b.write(Primitive.Bytes.write(this.newPublicKey));
|
|
1075
|
+
b.write((Primitive.Bytes.write(this.newPublicKey)));
|
|
1120
1076
|
}
|
|
1121
1077
|
if (this.proof !== undefined) {
|
|
1122
1078
|
b.write(this.proof.write());
|
|
@@ -1128,23 +1084,23 @@ export class GetBackupHolderDcs extends TLObject {
|
|
|
1128
1084
|
__response__;
|
|
1129
1085
|
constructor() {
|
|
1130
1086
|
super();
|
|
1131
|
-
this.classType =
|
|
1132
|
-
this.className =
|
|
1087
|
+
this.classType = "functions";
|
|
1088
|
+
this.className = "wallet.GetBackupHolderDcs";
|
|
1133
1089
|
this.constructorId = 0xd179d494;
|
|
1134
1090
|
this.subclassOfId = 0xdc46ac22;
|
|
1135
1091
|
this._slots = [];
|
|
1136
1092
|
}
|
|
1137
1093
|
/**
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1094
|
+
* Generate the TLObject from buffer.
|
|
1095
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1096
|
+
*/
|
|
1141
1097
|
static async read(_data, ..._args) {
|
|
1142
1098
|
// no flags
|
|
1143
1099
|
return new GetBackupHolderDcs();
|
|
1144
1100
|
}
|
|
1145
1101
|
/**
|
|
1146
|
-
|
|
1147
|
-
|
|
1102
|
+
* Generate buffer from TLObject.
|
|
1103
|
+
*/
|
|
1148
1104
|
write() {
|
|
1149
1105
|
const b = new BytesIO();
|
|
1150
1106
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1159,43 +1115,43 @@ export class EnableBackup extends TLObject {
|
|
|
1159
1115
|
proof;
|
|
1160
1116
|
constructor(params) {
|
|
1161
1117
|
super();
|
|
1162
|
-
this.classType =
|
|
1163
|
-
this.className =
|
|
1118
|
+
this.classType = "functions";
|
|
1119
|
+
this.className = "wallet.EnableBackup";
|
|
1164
1120
|
this.constructorId = 0x4500c525;
|
|
1165
1121
|
this.subclassOfId = 0xd479f736;
|
|
1166
|
-
this._slots = [
|
|
1122
|
+
this._slots = ["parts", "newPublicKey", "proof"];
|
|
1167
1123
|
this.parts = params.parts;
|
|
1168
1124
|
this.newPublicKey = params.newPublicKey;
|
|
1169
1125
|
this.proof = params.proof;
|
|
1170
1126
|
}
|
|
1171
1127
|
/**
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1128
|
+
* Generate the TLObject from buffer.
|
|
1129
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1130
|
+
*/
|
|
1175
1131
|
static async read(_data, ..._args) {
|
|
1176
1132
|
// @ts-ignore
|
|
1177
1133
|
let flags = await Primitive.Int.read(_data);
|
|
1178
1134
|
let parts = await TLObject.read(_data, Primitive.Bytes);
|
|
1179
|
-
let newPublicKey = flags & (1 << 1) ? await Primitive.Bytes.read(_data) : undefined;
|
|
1180
|
-
let proof = flags & (1 << 2) ? await TLObject.read(_data) : undefined;
|
|
1181
|
-
return new EnableBackup({ parts: parts, newPublicKey: newPublicKey, proof: proof });
|
|
1135
|
+
let newPublicKey = (flags & (1 << 1)) ? await Primitive.Bytes.read(_data) : undefined;
|
|
1136
|
+
let proof = (flags & (1 << 2)) ? await TLObject.read(_data) : undefined;
|
|
1137
|
+
return new EnableBackup({ "parts": parts, "newPublicKey": newPublicKey, "proof": proof });
|
|
1182
1138
|
}
|
|
1183
1139
|
/**
|
|
1184
|
-
|
|
1185
|
-
|
|
1140
|
+
* Generate buffer from TLObject.
|
|
1141
|
+
*/
|
|
1186
1142
|
write() {
|
|
1187
1143
|
const b = new BytesIO();
|
|
1188
1144
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1189
1145
|
// @ts-ignore
|
|
1190
1146
|
let flags = 0;
|
|
1191
|
-
flags |= this.newPublicKey !== undefined ? 1 << 1 : 0;
|
|
1192
|
-
flags |= this.proof !== undefined ? 1 << 2 : 0;
|
|
1193
|
-
b.write(Primitive.Int.write(flags));
|
|
1147
|
+
flags |= this.newPublicKey !== undefined ? (1 << 1) : 0;
|
|
1148
|
+
flags |= this.proof !== undefined ? (1 << 2) : 0;
|
|
1149
|
+
b.write((Primitive.Int.write(flags)));
|
|
1194
1150
|
if (this.parts) {
|
|
1195
|
-
b.write(Primitive.Vector.write(this.parts, Primitive.Bytes));
|
|
1151
|
+
b.write((Primitive.Vector.write(this.parts, Primitive.Bytes)));
|
|
1196
1152
|
}
|
|
1197
1153
|
if (this.newPublicKey !== undefined) {
|
|
1198
|
-
b.write(Primitive.Bytes.write(this.newPublicKey));
|
|
1154
|
+
b.write((Primitive.Bytes.write(this.newPublicKey)));
|
|
1199
1155
|
}
|
|
1200
1156
|
if (this.proof !== undefined) {
|
|
1201
1157
|
b.write(this.proof.write());
|
|
@@ -1207,23 +1163,23 @@ export class GetProofChallenge extends TLObject {
|
|
|
1207
1163
|
__response__;
|
|
1208
1164
|
constructor() {
|
|
1209
1165
|
super();
|
|
1210
|
-
this.classType =
|
|
1211
|
-
this.className =
|
|
1166
|
+
this.classType = "functions";
|
|
1167
|
+
this.className = "wallet.GetProofChallenge";
|
|
1212
1168
|
this.constructorId = 0x2025e697;
|
|
1213
1169
|
this.subclassOfId = 0xd8d15305;
|
|
1214
1170
|
this._slots = [];
|
|
1215
1171
|
}
|
|
1216
1172
|
/**
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1173
|
+
* Generate the TLObject from buffer.
|
|
1174
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1175
|
+
*/
|
|
1220
1176
|
static async read(_data, ..._args) {
|
|
1221
1177
|
// no flags
|
|
1222
1178
|
return new GetProofChallenge();
|
|
1223
1179
|
}
|
|
1224
1180
|
/**
|
|
1225
|
-
|
|
1226
|
-
|
|
1181
|
+
* Generate buffer from TLObject.
|
|
1182
|
+
*/
|
|
1227
1183
|
write() {
|
|
1228
1184
|
const b = new BytesIO();
|
|
1229
1185
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1239,55 +1195,50 @@ export class SendTransfer extends TLObject {
|
|
|
1239
1195
|
randomId;
|
|
1240
1196
|
constructor(params) {
|
|
1241
1197
|
super();
|
|
1242
|
-
this.classType =
|
|
1243
|
-
this.className =
|
|
1198
|
+
this.classType = "functions";
|
|
1199
|
+
this.className = "wallet.SendTransfer";
|
|
1244
1200
|
this.constructorId = 0xd9e5d9e2;
|
|
1245
1201
|
this.subclassOfId = 0x8af52aac;
|
|
1246
|
-
this._slots = [
|
|
1202
|
+
this._slots = ["dataNormal", "dataGasless", "userId", "randomId"];
|
|
1247
1203
|
this.dataNormal = params.dataNormal;
|
|
1248
1204
|
this.dataGasless = params.dataGasless;
|
|
1249
1205
|
this.userId = params.userId;
|
|
1250
1206
|
this.randomId = params.randomId;
|
|
1251
1207
|
}
|
|
1252
1208
|
/**
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1209
|
+
* Generate the TLObject from buffer.
|
|
1210
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1211
|
+
*/
|
|
1256
1212
|
static async read(_data, ..._args) {
|
|
1257
1213
|
// @ts-ignore
|
|
1258
1214
|
let flags = await Primitive.Int.read(_data);
|
|
1259
1215
|
let dataNormal = await Primitive.Bytes.read(_data);
|
|
1260
|
-
let dataGasless = flags & (1 << 0) ? await Primitive.Bytes.read(_data) : undefined;
|
|
1216
|
+
let dataGasless = (flags & (1 << 0)) ? await Primitive.Bytes.read(_data) : undefined;
|
|
1261
1217
|
let userId = await TLObject.read(_data);
|
|
1262
1218
|
let randomId = await Primitive.Long.read(_data);
|
|
1263
|
-
return new SendTransfer({
|
|
1264
|
-
dataNormal: dataNormal,
|
|
1265
|
-
dataGasless: dataGasless,
|
|
1266
|
-
userId: userId,
|
|
1267
|
-
randomId: randomId,
|
|
1268
|
-
});
|
|
1219
|
+
return new SendTransfer({ "dataNormal": dataNormal, "dataGasless": dataGasless, "userId": userId, "randomId": randomId });
|
|
1269
1220
|
}
|
|
1270
1221
|
/**
|
|
1271
|
-
|
|
1272
|
-
|
|
1222
|
+
* Generate buffer from TLObject.
|
|
1223
|
+
*/
|
|
1273
1224
|
write() {
|
|
1274
1225
|
const b = new BytesIO();
|
|
1275
1226
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1276
1227
|
// @ts-ignore
|
|
1277
1228
|
let flags = 0;
|
|
1278
|
-
flags |= this.dataGasless !== undefined ? 1 << 0 : 0;
|
|
1279
|
-
b.write(Primitive.Int.write(flags));
|
|
1229
|
+
flags |= this.dataGasless !== undefined ? (1 << 0) : 0;
|
|
1230
|
+
b.write((Primitive.Int.write(flags)));
|
|
1280
1231
|
if (this.dataNormal !== undefined) {
|
|
1281
|
-
b.write(Primitive.Bytes.write(this.dataNormal));
|
|
1232
|
+
b.write((Primitive.Bytes.write(this.dataNormal)));
|
|
1282
1233
|
}
|
|
1283
1234
|
if (this.dataGasless !== undefined) {
|
|
1284
|
-
b.write(Primitive.Bytes.write(this.dataGasless));
|
|
1235
|
+
b.write((Primitive.Bytes.write(this.dataGasless)));
|
|
1285
1236
|
}
|
|
1286
1237
|
if (this.userId !== undefined) {
|
|
1287
1238
|
b.write(this.userId.write());
|
|
1288
1239
|
}
|
|
1289
1240
|
if (this.randomId !== undefined) {
|
|
1290
|
-
b.write(Primitive.Long.write(this.randomId));
|
|
1241
|
+
b.write((Primitive.Long.write(this.randomId)));
|
|
1291
1242
|
}
|
|
1292
1243
|
return b.buffer;
|
|
1293
1244
|
}
|
|
@@ -1296,23 +1247,23 @@ export class GetGaslessInfo extends TLObject {
|
|
|
1296
1247
|
__response__;
|
|
1297
1248
|
constructor() {
|
|
1298
1249
|
super();
|
|
1299
|
-
this.classType =
|
|
1300
|
-
this.className =
|
|
1250
|
+
this.classType = "functions";
|
|
1251
|
+
this.className = "wallet.GetGaslessInfo";
|
|
1301
1252
|
this.constructorId = 0x742df0a1;
|
|
1302
1253
|
this.subclassOfId = 0x8af52aac;
|
|
1303
1254
|
this._slots = [];
|
|
1304
1255
|
}
|
|
1305
1256
|
/**
|
|
1306
|
-
|
|
1307
|
-
|
|
1308
|
-
|
|
1257
|
+
* Generate the TLObject from buffer.
|
|
1258
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1259
|
+
*/
|
|
1309
1260
|
static async read(_data, ..._args) {
|
|
1310
1261
|
// no flags
|
|
1311
1262
|
return new GetGaslessInfo();
|
|
1312
1263
|
}
|
|
1313
1264
|
/**
|
|
1314
|
-
|
|
1315
|
-
|
|
1265
|
+
* Generate buffer from TLObject.
|
|
1266
|
+
*/
|
|
1316
1267
|
write() {
|
|
1317
1268
|
const b = new BytesIO();
|
|
1318
1269
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1324,23 +1275,23 @@ export class GetExistingWaltBalance extends TLObject {
|
|
|
1324
1275
|
__response__;
|
|
1325
1276
|
constructor() {
|
|
1326
1277
|
super();
|
|
1327
|
-
this.classType =
|
|
1328
|
-
this.className =
|
|
1278
|
+
this.classType = "functions";
|
|
1279
|
+
this.className = "wallet.GetExistingWaltBalance";
|
|
1329
1280
|
this.constructorId = 0x691f4360;
|
|
1330
1281
|
this.subclassOfId = 0xa739fa56;
|
|
1331
1282
|
this._slots = [];
|
|
1332
1283
|
}
|
|
1333
1284
|
/**
|
|
1334
|
-
|
|
1335
|
-
|
|
1336
|
-
|
|
1285
|
+
* Generate the TLObject from buffer.
|
|
1286
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1287
|
+
*/
|
|
1337
1288
|
static async read(_data, ..._args) {
|
|
1338
1289
|
// no flags
|
|
1339
1290
|
return new GetExistingWaltBalance();
|
|
1340
1291
|
}
|
|
1341
1292
|
/**
|
|
1342
|
-
|
|
1343
|
-
|
|
1293
|
+
* Generate buffer from TLObject.
|
|
1294
|
+
*/
|
|
1344
1295
|
write() {
|
|
1345
1296
|
const b = new BytesIO();
|
|
1346
1297
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1354,36 +1305,36 @@ export class GetNfts extends TLObject {
|
|
|
1354
1305
|
limit;
|
|
1355
1306
|
constructor(params) {
|
|
1356
1307
|
super();
|
|
1357
|
-
this.classType =
|
|
1358
|
-
this.className =
|
|
1308
|
+
this.classType = "functions";
|
|
1309
|
+
this.className = "wallet.GetNfts";
|
|
1359
1310
|
this.constructorId = 0x8c12f3a4;
|
|
1360
1311
|
this.subclassOfId = 0xd4606b08;
|
|
1361
|
-
this._slots = [
|
|
1312
|
+
this._slots = ["offset", "limit"];
|
|
1362
1313
|
this.offset = params.offset;
|
|
1363
1314
|
this.limit = params.limit;
|
|
1364
1315
|
}
|
|
1365
1316
|
/**
|
|
1366
|
-
|
|
1367
|
-
|
|
1368
|
-
|
|
1317
|
+
* Generate the TLObject from buffer.
|
|
1318
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1319
|
+
*/
|
|
1369
1320
|
static async read(_data, ..._args) {
|
|
1370
1321
|
// no flags
|
|
1371
1322
|
let offset = await Primitive.String.read(_data);
|
|
1372
1323
|
let limit = await Primitive.Int.read(_data);
|
|
1373
|
-
return new GetNfts({ offset: offset, limit: limit });
|
|
1324
|
+
return new GetNfts({ "offset": offset, "limit": limit });
|
|
1374
1325
|
}
|
|
1375
1326
|
/**
|
|
1376
|
-
|
|
1377
|
-
|
|
1327
|
+
* Generate buffer from TLObject.
|
|
1328
|
+
*/
|
|
1378
1329
|
write() {
|
|
1379
1330
|
const b = new BytesIO();
|
|
1380
1331
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1381
1332
|
// no flags
|
|
1382
1333
|
if (this.offset !== undefined) {
|
|
1383
|
-
b.write(Primitive.String.write(this.offset));
|
|
1334
|
+
b.write((Primitive.String.write(this.offset)));
|
|
1384
1335
|
}
|
|
1385
1336
|
if (this.limit !== undefined) {
|
|
1386
|
-
b.write(Primitive.Int.write(this.limit));
|
|
1337
|
+
b.write((Primitive.Int.write(this.limit)));
|
|
1387
1338
|
}
|
|
1388
1339
|
return b.buffer;
|
|
1389
1340
|
}
|
|
@@ -1394,36 +1345,36 @@ export class TonConnectCreateSession extends TLObject {
|
|
|
1394
1345
|
manifestUrl;
|
|
1395
1346
|
constructor(params) {
|
|
1396
1347
|
super();
|
|
1397
|
-
this.classType =
|
|
1398
|
-
this.className =
|
|
1348
|
+
this.classType = "functions";
|
|
1349
|
+
this.className = "wallet.TonConnectCreateSession";
|
|
1399
1350
|
this.constructorId = 0xcc931046;
|
|
1400
1351
|
this.subclassOfId = 0xc7239cb0;
|
|
1401
|
-
this._slots = [
|
|
1352
|
+
this._slots = ["dappClientId", "manifestUrl"];
|
|
1402
1353
|
this.dappClientId = params.dappClientId;
|
|
1403
1354
|
this.manifestUrl = params.manifestUrl;
|
|
1404
1355
|
}
|
|
1405
1356
|
/**
|
|
1406
|
-
|
|
1407
|
-
|
|
1408
|
-
|
|
1357
|
+
* Generate the TLObject from buffer.
|
|
1358
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1359
|
+
*/
|
|
1409
1360
|
static async read(_data, ..._args) {
|
|
1410
1361
|
// no flags
|
|
1411
1362
|
let dappClientId = await Primitive.String.read(_data);
|
|
1412
1363
|
let manifestUrl = await Primitive.String.read(_data);
|
|
1413
|
-
return new TonConnectCreateSession({ dappClientId: dappClientId, manifestUrl: manifestUrl });
|
|
1364
|
+
return new TonConnectCreateSession({ "dappClientId": dappClientId, "manifestUrl": manifestUrl });
|
|
1414
1365
|
}
|
|
1415
1366
|
/**
|
|
1416
|
-
|
|
1417
|
-
|
|
1367
|
+
* Generate buffer from TLObject.
|
|
1368
|
+
*/
|
|
1418
1369
|
write() {
|
|
1419
1370
|
const b = new BytesIO();
|
|
1420
1371
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1421
1372
|
// no flags
|
|
1422
1373
|
if (this.dappClientId !== undefined) {
|
|
1423
|
-
b.write(Primitive.String.write(this.dappClientId));
|
|
1374
|
+
b.write((Primitive.String.write(this.dappClientId)));
|
|
1424
1375
|
}
|
|
1425
1376
|
if (this.manifestUrl !== undefined) {
|
|
1426
|
-
b.write(Primitive.String.write(this.manifestUrl));
|
|
1377
|
+
b.write((Primitive.String.write(this.manifestUrl)));
|
|
1427
1378
|
}
|
|
1428
1379
|
return b.buffer;
|
|
1429
1380
|
}
|
|
@@ -1434,36 +1385,36 @@ export class TonConnectRegisterKey extends TLObject {
|
|
|
1434
1385
|
clientId;
|
|
1435
1386
|
constructor(params) {
|
|
1436
1387
|
super();
|
|
1437
|
-
this.classType =
|
|
1438
|
-
this.className =
|
|
1388
|
+
this.classType = "functions";
|
|
1389
|
+
this.className = "wallet.TonConnectRegisterKey";
|
|
1439
1390
|
this.constructorId = 0x338bcf1c;
|
|
1440
1391
|
this.subclassOfId = 0x6fc97efe;
|
|
1441
|
-
this._slots = [
|
|
1392
|
+
this._slots = ["sessionId", "clientId"];
|
|
1442
1393
|
this.sessionId = params.sessionId;
|
|
1443
1394
|
this.clientId = params.clientId;
|
|
1444
1395
|
}
|
|
1445
1396
|
/**
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1397
|
+
* Generate the TLObject from buffer.
|
|
1398
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1399
|
+
*/
|
|
1449
1400
|
static async read(_data, ..._args) {
|
|
1450
1401
|
// no flags
|
|
1451
1402
|
let sessionId = await Primitive.Long.read(_data);
|
|
1452
1403
|
let clientId = await Primitive.String.read(_data);
|
|
1453
|
-
return new TonConnectRegisterKey({ sessionId: sessionId, clientId: clientId });
|
|
1404
|
+
return new TonConnectRegisterKey({ "sessionId": sessionId, "clientId": clientId });
|
|
1454
1405
|
}
|
|
1455
1406
|
/**
|
|
1456
|
-
|
|
1457
|
-
|
|
1407
|
+
* Generate buffer from TLObject.
|
|
1408
|
+
*/
|
|
1458
1409
|
write() {
|
|
1459
1410
|
const b = new BytesIO();
|
|
1460
1411
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1461
1412
|
// no flags
|
|
1462
1413
|
if (this.sessionId !== undefined) {
|
|
1463
|
-
b.write(Primitive.Long.write(this.sessionId));
|
|
1414
|
+
b.write((Primitive.Long.write(this.sessionId)));
|
|
1464
1415
|
}
|
|
1465
1416
|
if (this.clientId !== undefined) {
|
|
1466
|
-
b.write(Primitive.String.write(this.clientId));
|
|
1417
|
+
b.write((Primitive.String.write(this.clientId)));
|
|
1467
1418
|
}
|
|
1468
1419
|
return b.buffer;
|
|
1469
1420
|
}
|
|
@@ -1477,11 +1428,11 @@ export class TonConnectSubmitConnectResult extends TLObject {
|
|
|
1477
1428
|
traceId;
|
|
1478
1429
|
constructor(params) {
|
|
1479
1430
|
super();
|
|
1480
|
-
this.classType =
|
|
1481
|
-
this.className =
|
|
1431
|
+
this.classType = "functions";
|
|
1432
|
+
this.className = "wallet.TonConnectSubmitConnectResult";
|
|
1482
1433
|
this.constructorId = 0xc2c00779;
|
|
1483
1434
|
this.subclassOfId = 0xf5b399ac;
|
|
1484
|
-
this._slots = [
|
|
1435
|
+
this._slots = ["error", "sessionId", "challengeAnswer", "body", "traceId"];
|
|
1485
1436
|
this.error = params.error;
|
|
1486
1437
|
this.sessionId = params.sessionId;
|
|
1487
1438
|
this.challengeAnswer = params.challengeAnswer;
|
|
@@ -1489,47 +1440,41 @@ export class TonConnectSubmitConnectResult extends TLObject {
|
|
|
1489
1440
|
this.traceId = params.traceId;
|
|
1490
1441
|
}
|
|
1491
1442
|
/**
|
|
1492
|
-
|
|
1493
|
-
|
|
1494
|
-
|
|
1443
|
+
* Generate the TLObject from buffer.
|
|
1444
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1445
|
+
*/
|
|
1495
1446
|
static async read(_data, ..._args) {
|
|
1496
1447
|
// @ts-ignore
|
|
1497
1448
|
let flags = await Primitive.Int.read(_data);
|
|
1498
|
-
let error = flags & (1 << 0) ? true : false;
|
|
1449
|
+
let error = (flags & (1 << 0)) ? true : false;
|
|
1499
1450
|
let sessionId = await Primitive.Long.read(_data);
|
|
1500
1451
|
let challengeAnswer = await Primitive.Bytes.read(_data);
|
|
1501
1452
|
let body = await Primitive.Bytes.read(_data);
|
|
1502
|
-
let traceId = flags & (1 << 1) ? await Primitive.String.read(_data) : undefined;
|
|
1503
|
-
return new TonConnectSubmitConnectResult({
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
traceId: traceId,
|
|
1509
|
-
});
|
|
1510
|
-
}
|
|
1511
|
-
/**
|
|
1512
|
-
* Generate buffer from TLObject.
|
|
1513
|
-
*/
|
|
1453
|
+
let traceId = (flags & (1 << 1)) ? await Primitive.String.read(_data) : undefined;
|
|
1454
|
+
return new TonConnectSubmitConnectResult({ "error": error, "sessionId": sessionId, "challengeAnswer": challengeAnswer, "body": body, "traceId": traceId });
|
|
1455
|
+
}
|
|
1456
|
+
/**
|
|
1457
|
+
* Generate buffer from TLObject.
|
|
1458
|
+
*/
|
|
1514
1459
|
write() {
|
|
1515
1460
|
const b = new BytesIO();
|
|
1516
1461
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1517
1462
|
// @ts-ignore
|
|
1518
1463
|
let flags = 0;
|
|
1519
|
-
flags |= this.error ? 1 << 0 : 0;
|
|
1520
|
-
flags |= this.traceId !== undefined ? 1 << 1 : 0;
|
|
1521
|
-
b.write(Primitive.Int.write(flags));
|
|
1464
|
+
flags |= this.error ? (1 << 0) : 0;
|
|
1465
|
+
flags |= this.traceId !== undefined ? (1 << 1) : 0;
|
|
1466
|
+
b.write((Primitive.Int.write(flags)));
|
|
1522
1467
|
if (this.sessionId !== undefined) {
|
|
1523
|
-
b.write(Primitive.Long.write(this.sessionId));
|
|
1468
|
+
b.write((Primitive.Long.write(this.sessionId)));
|
|
1524
1469
|
}
|
|
1525
1470
|
if (this.challengeAnswer !== undefined) {
|
|
1526
|
-
b.write(Primitive.Bytes.write(this.challengeAnswer));
|
|
1471
|
+
b.write((Primitive.Bytes.write(this.challengeAnswer)));
|
|
1527
1472
|
}
|
|
1528
1473
|
if (this.body !== undefined) {
|
|
1529
|
-
b.write(Primitive.Bytes.write(this.body));
|
|
1474
|
+
b.write((Primitive.Bytes.write(this.body)));
|
|
1530
1475
|
}
|
|
1531
1476
|
if (this.traceId !== undefined) {
|
|
1532
|
-
b.write(Primitive.String.write(this.traceId));
|
|
1477
|
+
b.write((Primitive.String.write(this.traceId)));
|
|
1533
1478
|
}
|
|
1534
1479
|
return b.buffer;
|
|
1535
1480
|
}
|
|
@@ -1540,41 +1485,41 @@ export class TonConnectGetPending extends TLObject {
|
|
|
1540
1485
|
sessionId;
|
|
1541
1486
|
constructor(params) {
|
|
1542
1487
|
super();
|
|
1543
|
-
this.classType =
|
|
1544
|
-
this.className =
|
|
1488
|
+
this.classType = "functions";
|
|
1489
|
+
this.className = "wallet.TonConnectGetPending";
|
|
1545
1490
|
this.constructorId = 0x11aee065;
|
|
1546
1491
|
this.subclassOfId = 0x81ebfc36;
|
|
1547
|
-
this._slots = [
|
|
1492
|
+
this._slots = ["dappClientId", "sessionId"];
|
|
1548
1493
|
this.dappClientId = params.dappClientId;
|
|
1549
1494
|
this.sessionId = params.sessionId;
|
|
1550
1495
|
}
|
|
1551
1496
|
/**
|
|
1552
|
-
|
|
1553
|
-
|
|
1554
|
-
|
|
1497
|
+
* Generate the TLObject from buffer.
|
|
1498
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1499
|
+
*/
|
|
1555
1500
|
static async read(_data, ..._args) {
|
|
1556
1501
|
// @ts-ignore
|
|
1557
1502
|
let flags = await Primitive.Int.read(_data);
|
|
1558
|
-
let dappClientId = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
1559
|
-
let sessionId = flags & (1 << 1) ? await Primitive.Long.read(_data) : undefined;
|
|
1560
|
-
return new TonConnectGetPending({ dappClientId: dappClientId, sessionId: sessionId });
|
|
1503
|
+
let dappClientId = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
1504
|
+
let sessionId = (flags & (1 << 1)) ? await Primitive.Long.read(_data) : undefined;
|
|
1505
|
+
return new TonConnectGetPending({ "dappClientId": dappClientId, "sessionId": sessionId });
|
|
1561
1506
|
}
|
|
1562
1507
|
/**
|
|
1563
|
-
|
|
1564
|
-
|
|
1508
|
+
* Generate buffer from TLObject.
|
|
1509
|
+
*/
|
|
1565
1510
|
write() {
|
|
1566
1511
|
const b = new BytesIO();
|
|
1567
1512
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1568
1513
|
// @ts-ignore
|
|
1569
1514
|
let flags = 0;
|
|
1570
|
-
flags |= this.dappClientId !== undefined ? 1 << 0 : 0;
|
|
1571
|
-
flags |= this.sessionId !== undefined ? 1 << 1 : 0;
|
|
1572
|
-
b.write(Primitive.Int.write(flags));
|
|
1515
|
+
flags |= this.dappClientId !== undefined ? (1 << 0) : 0;
|
|
1516
|
+
flags |= this.sessionId !== undefined ? (1 << 1) : 0;
|
|
1517
|
+
b.write((Primitive.Int.write(flags)));
|
|
1573
1518
|
if (this.dappClientId !== undefined) {
|
|
1574
|
-
b.write(Primitive.String.write(this.dappClientId));
|
|
1519
|
+
b.write((Primitive.String.write(this.dappClientId)));
|
|
1575
1520
|
}
|
|
1576
1521
|
if (this.sessionId !== undefined) {
|
|
1577
|
-
b.write(Primitive.Long.write(this.sessionId));
|
|
1522
|
+
b.write((Primitive.Long.write(this.sessionId)));
|
|
1578
1523
|
}
|
|
1579
1524
|
return b.buffer;
|
|
1580
1525
|
}
|
|
@@ -1588,11 +1533,11 @@ export class TonConnectClaimRequest extends TLObject {
|
|
|
1588
1533
|
challengeAnswer;
|
|
1589
1534
|
constructor(params) {
|
|
1590
1535
|
super();
|
|
1591
|
-
this.classType =
|
|
1592
|
-
this.className =
|
|
1536
|
+
this.classType = "functions";
|
|
1537
|
+
this.className = "wallet.TonConnectClaimRequest";
|
|
1593
1538
|
this.constructorId = 0x66b57b41;
|
|
1594
1539
|
this.subclassOfId = 0xf5b399ac;
|
|
1595
|
-
this._slots = [
|
|
1540
|
+
this._slots = ["declined", "sessionId", "msgId", "appRequestId", "challengeAnswer"];
|
|
1596
1541
|
this.declined = params.declined;
|
|
1597
1542
|
this.sessionId = params.sessionId;
|
|
1598
1543
|
this.msgId = params.msgId;
|
|
@@ -1600,47 +1545,41 @@ export class TonConnectClaimRequest extends TLObject {
|
|
|
1600
1545
|
this.challengeAnswer = params.challengeAnswer;
|
|
1601
1546
|
}
|
|
1602
1547
|
/**
|
|
1603
|
-
|
|
1604
|
-
|
|
1605
|
-
|
|
1548
|
+
* Generate the TLObject from buffer.
|
|
1549
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1550
|
+
*/
|
|
1606
1551
|
static async read(_data, ..._args) {
|
|
1607
1552
|
// @ts-ignore
|
|
1608
1553
|
let flags = await Primitive.Int.read(_data);
|
|
1609
|
-
let declined = flags & (1 << 1) ? true : false;
|
|
1554
|
+
let declined = (flags & (1 << 1)) ? true : false;
|
|
1610
1555
|
let sessionId = await Primitive.Long.read(_data);
|
|
1611
1556
|
let msgId = await Primitive.Int.read(_data);
|
|
1612
1557
|
let appRequestId = await Primitive.String.read(_data);
|
|
1613
|
-
let challengeAnswer = flags & (1 << 0) ? await Primitive.Bytes.read(_data) : undefined;
|
|
1614
|
-
return new TonConnectClaimRequest({
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
challengeAnswer: challengeAnswer,
|
|
1620
|
-
});
|
|
1621
|
-
}
|
|
1622
|
-
/**
|
|
1623
|
-
* Generate buffer from TLObject.
|
|
1624
|
-
*/
|
|
1558
|
+
let challengeAnswer = (flags & (1 << 0)) ? await Primitive.Bytes.read(_data) : undefined;
|
|
1559
|
+
return new TonConnectClaimRequest({ "declined": declined, "sessionId": sessionId, "msgId": msgId, "appRequestId": appRequestId, "challengeAnswer": challengeAnswer });
|
|
1560
|
+
}
|
|
1561
|
+
/**
|
|
1562
|
+
* Generate buffer from TLObject.
|
|
1563
|
+
*/
|
|
1625
1564
|
write() {
|
|
1626
1565
|
const b = new BytesIO();
|
|
1627
1566
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1628
1567
|
// @ts-ignore
|
|
1629
1568
|
let flags = 0;
|
|
1630
|
-
flags |= this.declined ? 1 << 1 : 0;
|
|
1631
|
-
flags |= this.challengeAnswer !== undefined ? 1 << 0 : 0;
|
|
1632
|
-
b.write(Primitive.Int.write(flags));
|
|
1569
|
+
flags |= this.declined ? (1 << 1) : 0;
|
|
1570
|
+
flags |= this.challengeAnswer !== undefined ? (1 << 0) : 0;
|
|
1571
|
+
b.write((Primitive.Int.write(flags)));
|
|
1633
1572
|
if (this.sessionId !== undefined) {
|
|
1634
|
-
b.write(Primitive.Long.write(this.sessionId));
|
|
1573
|
+
b.write((Primitive.Long.write(this.sessionId)));
|
|
1635
1574
|
}
|
|
1636
1575
|
if (this.msgId !== undefined) {
|
|
1637
|
-
b.write(Primitive.Int.write(this.msgId));
|
|
1576
|
+
b.write((Primitive.Int.write(this.msgId)));
|
|
1638
1577
|
}
|
|
1639
1578
|
if (this.appRequestId !== undefined) {
|
|
1640
|
-
b.write(Primitive.String.write(this.appRequestId));
|
|
1579
|
+
b.write((Primitive.String.write(this.appRequestId)));
|
|
1641
1580
|
}
|
|
1642
1581
|
if (this.challengeAnswer !== undefined) {
|
|
1643
|
-
b.write(Primitive.Bytes.write(this.challengeAnswer));
|
|
1582
|
+
b.write((Primitive.Bytes.write(this.challengeAnswer)));
|
|
1644
1583
|
}
|
|
1645
1584
|
return b.buffer;
|
|
1646
1585
|
}
|
|
@@ -1653,55 +1592,50 @@ export class TonConnectSubmitResponse extends TLObject {
|
|
|
1653
1592
|
traceId;
|
|
1654
1593
|
constructor(params) {
|
|
1655
1594
|
super();
|
|
1656
|
-
this.classType =
|
|
1657
|
-
this.className =
|
|
1595
|
+
this.classType = "functions";
|
|
1596
|
+
this.className = "wallet.TonConnectSubmitResponse";
|
|
1658
1597
|
this.constructorId = 0xfac67d3c;
|
|
1659
1598
|
this.subclassOfId = 0xf5b399ac;
|
|
1660
|
-
this._slots = [
|
|
1599
|
+
this._slots = ["sessionId", "msgId", "body", "traceId"];
|
|
1661
1600
|
this.sessionId = params.sessionId;
|
|
1662
1601
|
this.msgId = params.msgId;
|
|
1663
1602
|
this.body = params.body;
|
|
1664
1603
|
this.traceId = params.traceId;
|
|
1665
1604
|
}
|
|
1666
1605
|
/**
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1606
|
+
* Generate the TLObject from buffer.
|
|
1607
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1608
|
+
*/
|
|
1670
1609
|
static async read(_data, ..._args) {
|
|
1671
1610
|
// @ts-ignore
|
|
1672
1611
|
let flags = await Primitive.Int.read(_data);
|
|
1673
1612
|
let sessionId = await Primitive.Long.read(_data);
|
|
1674
1613
|
let msgId = await Primitive.Int.read(_data);
|
|
1675
1614
|
let body = await Primitive.Bytes.read(_data);
|
|
1676
|
-
let traceId = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
1677
|
-
return new TonConnectSubmitResponse({
|
|
1678
|
-
sessionId: sessionId,
|
|
1679
|
-
msgId: msgId,
|
|
1680
|
-
body: body,
|
|
1681
|
-
traceId: traceId,
|
|
1682
|
-
});
|
|
1615
|
+
let traceId = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
1616
|
+
return new TonConnectSubmitResponse({ "sessionId": sessionId, "msgId": msgId, "body": body, "traceId": traceId });
|
|
1683
1617
|
}
|
|
1684
1618
|
/**
|
|
1685
|
-
|
|
1686
|
-
|
|
1619
|
+
* Generate buffer from TLObject.
|
|
1620
|
+
*/
|
|
1687
1621
|
write() {
|
|
1688
1622
|
const b = new BytesIO();
|
|
1689
1623
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1690
1624
|
// @ts-ignore
|
|
1691
1625
|
let flags = 0;
|
|
1692
|
-
flags |= this.traceId !== undefined ? 1 << 0 : 0;
|
|
1693
|
-
b.write(Primitive.Int.write(flags));
|
|
1626
|
+
flags |= this.traceId !== undefined ? (1 << 0) : 0;
|
|
1627
|
+
b.write((Primitive.Int.write(flags)));
|
|
1694
1628
|
if (this.sessionId !== undefined) {
|
|
1695
|
-
b.write(Primitive.Long.write(this.sessionId));
|
|
1629
|
+
b.write((Primitive.Long.write(this.sessionId)));
|
|
1696
1630
|
}
|
|
1697
1631
|
if (this.msgId !== undefined) {
|
|
1698
|
-
b.write(Primitive.Int.write(this.msgId));
|
|
1632
|
+
b.write((Primitive.Int.write(this.msgId)));
|
|
1699
1633
|
}
|
|
1700
1634
|
if (this.body !== undefined) {
|
|
1701
|
-
b.write(Primitive.Bytes.write(this.body));
|
|
1635
|
+
b.write((Primitive.Bytes.write(this.body)));
|
|
1702
1636
|
}
|
|
1703
1637
|
if (this.traceId !== undefined) {
|
|
1704
|
-
b.write(Primitive.String.write(this.traceId));
|
|
1638
|
+
b.write((Primitive.String.write(this.traceId)));
|
|
1705
1639
|
}
|
|
1706
1640
|
return b.buffer;
|
|
1707
1641
|
}
|
|
@@ -1711,31 +1645,31 @@ export class TonConnectNextEventId extends TLObject {
|
|
|
1711
1645
|
sessionId;
|
|
1712
1646
|
constructor(params) {
|
|
1713
1647
|
super();
|
|
1714
|
-
this.classType =
|
|
1715
|
-
this.className =
|
|
1648
|
+
this.classType = "functions";
|
|
1649
|
+
this.className = "wallet.TonConnectNextEventId";
|
|
1716
1650
|
this.constructorId = 0x775d7244;
|
|
1717
1651
|
this.subclassOfId = 0x2615ce73;
|
|
1718
|
-
this._slots = [
|
|
1652
|
+
this._slots = ["sessionId"];
|
|
1719
1653
|
this.sessionId = params.sessionId;
|
|
1720
1654
|
}
|
|
1721
1655
|
/**
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1656
|
+
* Generate the TLObject from buffer.
|
|
1657
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1658
|
+
*/
|
|
1725
1659
|
static async read(_data, ..._args) {
|
|
1726
1660
|
// no flags
|
|
1727
1661
|
let sessionId = await Primitive.Long.read(_data);
|
|
1728
|
-
return new TonConnectNextEventId({ sessionId: sessionId });
|
|
1662
|
+
return new TonConnectNextEventId({ "sessionId": sessionId });
|
|
1729
1663
|
}
|
|
1730
1664
|
/**
|
|
1731
|
-
|
|
1732
|
-
|
|
1665
|
+
* Generate buffer from TLObject.
|
|
1666
|
+
*/
|
|
1733
1667
|
write() {
|
|
1734
1668
|
const b = new BytesIO();
|
|
1735
1669
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1736
1670
|
// no flags
|
|
1737
1671
|
if (this.sessionId !== undefined) {
|
|
1738
|
-
b.write(Primitive.Long.write(this.sessionId));
|
|
1672
|
+
b.write((Primitive.Long.write(this.sessionId)));
|
|
1739
1673
|
}
|
|
1740
1674
|
return b.buffer;
|
|
1741
1675
|
}
|
|
@@ -1746,40 +1680,40 @@ export class TonConnectCloseSession extends TLObject {
|
|
|
1746
1680
|
body;
|
|
1747
1681
|
constructor(params) {
|
|
1748
1682
|
super();
|
|
1749
|
-
this.classType =
|
|
1750
|
-
this.className =
|
|
1683
|
+
this.classType = "functions";
|
|
1684
|
+
this.className = "wallet.TonConnectCloseSession";
|
|
1751
1685
|
this.constructorId = 0xd63f61ce;
|
|
1752
1686
|
this.subclassOfId = 0xf5b399ac;
|
|
1753
|
-
this._slots = [
|
|
1687
|
+
this._slots = ["sessionId", "body"];
|
|
1754
1688
|
this.sessionId = params.sessionId;
|
|
1755
1689
|
this.body = params.body;
|
|
1756
1690
|
}
|
|
1757
1691
|
/**
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1692
|
+
* Generate the TLObject from buffer.
|
|
1693
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1694
|
+
*/
|
|
1761
1695
|
static async read(_data, ..._args) {
|
|
1762
1696
|
// @ts-ignore
|
|
1763
1697
|
let flags = await Primitive.Int.read(_data);
|
|
1764
1698
|
let sessionId = await Primitive.Long.read(_data);
|
|
1765
|
-
let body = flags & (1 << 0) ? await Primitive.Bytes.read(_data) : undefined;
|
|
1766
|
-
return new TonConnectCloseSession({ sessionId: sessionId, body: body });
|
|
1699
|
+
let body = (flags & (1 << 0)) ? await Primitive.Bytes.read(_data) : undefined;
|
|
1700
|
+
return new TonConnectCloseSession({ "sessionId": sessionId, "body": body });
|
|
1767
1701
|
}
|
|
1768
1702
|
/**
|
|
1769
|
-
|
|
1770
|
-
|
|
1703
|
+
* Generate buffer from TLObject.
|
|
1704
|
+
*/
|
|
1771
1705
|
write() {
|
|
1772
1706
|
const b = new BytesIO();
|
|
1773
1707
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1774
1708
|
// @ts-ignore
|
|
1775
1709
|
let flags = 0;
|
|
1776
|
-
flags |= this.body !== undefined ? 1 << 0 : 0;
|
|
1777
|
-
b.write(Primitive.Int.write(flags));
|
|
1710
|
+
flags |= this.body !== undefined ? (1 << 0) : 0;
|
|
1711
|
+
b.write((Primitive.Int.write(flags)));
|
|
1778
1712
|
if (this.sessionId !== undefined) {
|
|
1779
|
-
b.write(Primitive.Long.write(this.sessionId));
|
|
1713
|
+
b.write((Primitive.Long.write(this.sessionId)));
|
|
1780
1714
|
}
|
|
1781
1715
|
if (this.body !== undefined) {
|
|
1782
|
-
b.write(Primitive.Bytes.write(this.body));
|
|
1716
|
+
b.write((Primitive.Bytes.write(this.body)));
|
|
1783
1717
|
}
|
|
1784
1718
|
return b.buffer;
|
|
1785
1719
|
}
|
|
@@ -1788,23 +1722,23 @@ export class TonConnectGetSessions extends TLObject {
|
|
|
1788
1722
|
__response__;
|
|
1789
1723
|
constructor() {
|
|
1790
1724
|
super();
|
|
1791
|
-
this.classType =
|
|
1792
|
-
this.className =
|
|
1725
|
+
this.classType = "functions";
|
|
1726
|
+
this.className = "wallet.TonConnectGetSessions";
|
|
1793
1727
|
this.constructorId = 0xa7ffb56e;
|
|
1794
1728
|
this.subclassOfId = 0xe7323d24;
|
|
1795
1729
|
this._slots = [];
|
|
1796
1730
|
}
|
|
1797
1731
|
/**
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1732
|
+
* Generate the TLObject from buffer.
|
|
1733
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1734
|
+
*/
|
|
1801
1735
|
static async read(_data, ..._args) {
|
|
1802
1736
|
// no flags
|
|
1803
1737
|
return new TonConnectGetSessions();
|
|
1804
1738
|
}
|
|
1805
1739
|
/**
|
|
1806
|
-
|
|
1807
|
-
|
|
1740
|
+
* Generate buffer from TLObject.
|
|
1741
|
+
*/
|
|
1808
1742
|
write() {
|
|
1809
1743
|
const b = new BytesIO();
|
|
1810
1744
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1818,40 +1752,40 @@ export class SetCardStickers extends TLObject {
|
|
|
1818
1752
|
bgNftAddress;
|
|
1819
1753
|
constructor(params) {
|
|
1820
1754
|
super();
|
|
1821
|
-
this.classType =
|
|
1822
|
-
this.className =
|
|
1755
|
+
this.classType = "functions";
|
|
1756
|
+
this.className = "wallet.SetCardStickers";
|
|
1823
1757
|
this.constructorId = 0x68509ac;
|
|
1824
1758
|
this.subclassOfId = 0x1f060b97;
|
|
1825
|
-
this._slots = [
|
|
1759
|
+
this._slots = ["stickers", "bgNftAddress"];
|
|
1826
1760
|
this.stickers = params.stickers;
|
|
1827
1761
|
this.bgNftAddress = params.bgNftAddress;
|
|
1828
1762
|
}
|
|
1829
1763
|
/**
|
|
1830
|
-
|
|
1831
|
-
|
|
1832
|
-
|
|
1764
|
+
* Generate the TLObject from buffer.
|
|
1765
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1766
|
+
*/
|
|
1833
1767
|
static async read(_data, ..._args) {
|
|
1834
1768
|
// @ts-ignore
|
|
1835
1769
|
let flags = await Primitive.Int.read(_data);
|
|
1836
1770
|
let stickers = await TLObject.read(_data);
|
|
1837
|
-
let bgNftAddress = flags & (1 << 0) ? await Primitive.String.read(_data) : undefined;
|
|
1838
|
-
return new SetCardStickers({ stickers: stickers, bgNftAddress: bgNftAddress });
|
|
1771
|
+
let bgNftAddress = (flags & (1 << 0)) ? await Primitive.String.read(_data) : undefined;
|
|
1772
|
+
return new SetCardStickers({ "stickers": stickers, "bgNftAddress": bgNftAddress });
|
|
1839
1773
|
}
|
|
1840
1774
|
/**
|
|
1841
|
-
|
|
1842
|
-
|
|
1775
|
+
* Generate buffer from TLObject.
|
|
1776
|
+
*/
|
|
1843
1777
|
write() {
|
|
1844
1778
|
const b = new BytesIO();
|
|
1845
1779
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1846
1780
|
// @ts-ignore
|
|
1847
1781
|
let flags = 0;
|
|
1848
|
-
flags |= this.bgNftAddress !== undefined ? 1 << 0 : 0;
|
|
1849
|
-
b.write(Primitive.Int.write(flags));
|
|
1782
|
+
flags |= this.bgNftAddress !== undefined ? (1 << 0) : 0;
|
|
1783
|
+
b.write((Primitive.Int.write(flags)));
|
|
1850
1784
|
if (this.stickers) {
|
|
1851
|
-
b.write(Primitive.Vector.write(this.stickers));
|
|
1785
|
+
b.write((Primitive.Vector.write(this.stickers)));
|
|
1852
1786
|
}
|
|
1853
1787
|
if (this.bgNftAddress !== undefined) {
|
|
1854
|
-
b.write(Primitive.String.write(this.bgNftAddress));
|
|
1788
|
+
b.write((Primitive.String.write(this.bgNftAddress)));
|
|
1855
1789
|
}
|
|
1856
1790
|
return b.buffer;
|
|
1857
1791
|
}
|
|
@@ -1860,23 +1794,23 @@ export class GetStakingInfo extends TLObject {
|
|
|
1860
1794
|
__response__;
|
|
1861
1795
|
constructor() {
|
|
1862
1796
|
super();
|
|
1863
|
-
this.classType =
|
|
1864
|
-
this.className =
|
|
1797
|
+
this.classType = "functions";
|
|
1798
|
+
this.className = "wallet.GetStakingInfo";
|
|
1865
1799
|
this.constructorId = 0xa75d90fb;
|
|
1866
1800
|
this.subclassOfId = 0x34dfba2d;
|
|
1867
1801
|
this._slots = [];
|
|
1868
1802
|
}
|
|
1869
1803
|
/**
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1804
|
+
* Generate the TLObject from buffer.
|
|
1805
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1806
|
+
*/
|
|
1873
1807
|
static async read(_data, ..._args) {
|
|
1874
1808
|
// no flags
|
|
1875
1809
|
return new GetStakingInfo();
|
|
1876
1810
|
}
|
|
1877
1811
|
/**
|
|
1878
|
-
|
|
1879
|
-
|
|
1812
|
+
* Generate buffer from TLObject.
|
|
1813
|
+
*/
|
|
1880
1814
|
write() {
|
|
1881
1815
|
const b = new BytesIO();
|
|
1882
1816
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
@@ -1890,37 +1824,37 @@ export class Stake extends TLObject {
|
|
|
1890
1824
|
amount;
|
|
1891
1825
|
constructor(params) {
|
|
1892
1826
|
super();
|
|
1893
|
-
this.classType =
|
|
1894
|
-
this.className =
|
|
1827
|
+
this.classType = "functions";
|
|
1828
|
+
this.className = "wallet.Stake";
|
|
1895
1829
|
this.constructorId = 0x321d6b4f;
|
|
1896
1830
|
this.subclassOfId = 0xbdd546e0;
|
|
1897
|
-
this._slots = [
|
|
1831
|
+
this._slots = ["stakeAll", "amount"];
|
|
1898
1832
|
this.stakeAll = params.stakeAll;
|
|
1899
1833
|
this.amount = params.amount;
|
|
1900
1834
|
}
|
|
1901
1835
|
/**
|
|
1902
|
-
|
|
1903
|
-
|
|
1904
|
-
|
|
1836
|
+
* Generate the TLObject from buffer.
|
|
1837
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1838
|
+
*/
|
|
1905
1839
|
static async read(_data, ..._args) {
|
|
1906
1840
|
// @ts-ignore
|
|
1907
1841
|
let flags = await Primitive.Int.read(_data);
|
|
1908
|
-
let stakeAll = flags & (1 << 0) ? true : false;
|
|
1842
|
+
let stakeAll = (flags & (1 << 0)) ? true : false;
|
|
1909
1843
|
let amount = await Primitive.Long.read(_data);
|
|
1910
|
-
return new Stake({ stakeAll: stakeAll, amount: amount });
|
|
1844
|
+
return new Stake({ "stakeAll": stakeAll, "amount": amount });
|
|
1911
1845
|
}
|
|
1912
1846
|
/**
|
|
1913
|
-
|
|
1914
|
-
|
|
1847
|
+
* Generate buffer from TLObject.
|
|
1848
|
+
*/
|
|
1915
1849
|
write() {
|
|
1916
1850
|
const b = new BytesIO();
|
|
1917
1851
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1918
1852
|
// @ts-ignore
|
|
1919
1853
|
let flags = 0;
|
|
1920
|
-
flags |= this.stakeAll ? 1 << 0 : 0;
|
|
1921
|
-
b.write(Primitive.Int.write(flags));
|
|
1854
|
+
flags |= this.stakeAll ? (1 << 0) : 0;
|
|
1855
|
+
b.write((Primitive.Int.write(flags)));
|
|
1922
1856
|
if (this.amount !== undefined) {
|
|
1923
|
-
b.write(Primitive.Long.write(this.amount));
|
|
1857
|
+
b.write((Primitive.Long.write(this.amount)));
|
|
1924
1858
|
}
|
|
1925
1859
|
return b.buffer;
|
|
1926
1860
|
}
|
|
@@ -1931,37 +1865,37 @@ export class Unstake extends TLObject {
|
|
|
1931
1865
|
amount;
|
|
1932
1866
|
constructor(params) {
|
|
1933
1867
|
super();
|
|
1934
|
-
this.classType =
|
|
1935
|
-
this.className =
|
|
1868
|
+
this.classType = "functions";
|
|
1869
|
+
this.className = "wallet.Unstake";
|
|
1936
1870
|
this.constructorId = 0xf46f432c;
|
|
1937
1871
|
this.subclassOfId = 0xbdd546e0;
|
|
1938
|
-
this._slots = [
|
|
1872
|
+
this._slots = ["withdrawAll", "amount"];
|
|
1939
1873
|
this.withdrawAll = params.withdrawAll;
|
|
1940
1874
|
this.amount = params.amount;
|
|
1941
1875
|
}
|
|
1942
1876
|
/**
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1877
|
+
* Generate the TLObject from buffer.
|
|
1878
|
+
* @param {Object} _data - BytesIO class from TLObject will be convert to TLObject class.
|
|
1879
|
+
*/
|
|
1946
1880
|
static async read(_data, ..._args) {
|
|
1947
1881
|
// @ts-ignore
|
|
1948
1882
|
let flags = await Primitive.Int.read(_data);
|
|
1949
|
-
let withdrawAll = flags & (1 << 0) ? true : false;
|
|
1883
|
+
let withdrawAll = (flags & (1 << 0)) ? true : false;
|
|
1950
1884
|
let amount = await Primitive.Long.read(_data);
|
|
1951
|
-
return new Unstake({ withdrawAll: withdrawAll, amount: amount });
|
|
1885
|
+
return new Unstake({ "withdrawAll": withdrawAll, "amount": amount });
|
|
1952
1886
|
}
|
|
1953
1887
|
/**
|
|
1954
|
-
|
|
1955
|
-
|
|
1888
|
+
* Generate buffer from TLObject.
|
|
1889
|
+
*/
|
|
1956
1890
|
write() {
|
|
1957
1891
|
const b = new BytesIO();
|
|
1958
1892
|
b.write(Primitive.Int.write(this.constructorId, false));
|
|
1959
1893
|
// @ts-ignore
|
|
1960
1894
|
let flags = 0;
|
|
1961
|
-
flags |= this.withdrawAll ? 1 << 0 : 0;
|
|
1962
|
-
b.write(Primitive.Int.write(flags));
|
|
1895
|
+
flags |= this.withdrawAll ? (1 << 0) : 0;
|
|
1896
|
+
b.write((Primitive.Int.write(flags)));
|
|
1963
1897
|
if (this.amount !== undefined) {
|
|
1964
|
-
b.write(Primitive.Long.write(this.amount));
|
|
1898
|
+
b.write((Primitive.Long.write(this.amount)));
|
|
1965
1899
|
}
|
|
1966
1900
|
return b.buffer;
|
|
1967
1901
|
}
|