@uniswap/client-data-api 0.0.1 → 0.0.2

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.
@@ -9,33 +9,33 @@ import { Message, proto3 } from "@bufbuild/protobuf";
9
9
  export var TokenType;
10
10
  (function (TokenType) {
11
11
  /**
12
- * @generated from enum value: UNKNOWN = 0;
12
+ * @generated from enum value: TOKEN_TYPE_UNKNOWN = 0;
13
13
  */
14
14
  TokenType[TokenType["UNKNOWN"] = 0] = "UNKNOWN";
15
15
  /**
16
- * @generated from enum value: NATIVE = 1;
16
+ * @generated from enum value: TOKEN_TYPE_NATIVE = 1;
17
17
  */
18
18
  TokenType[TokenType["NATIVE"] = 1] = "NATIVE";
19
19
  /**
20
- * @generated from enum value: ERC20 = 2;
20
+ * @generated from enum value: TOKEN_TYPE_ERC20 = 2;
21
21
  */
22
22
  TokenType[TokenType["ERC20"] = 2] = "ERC20";
23
23
  /**
24
- * @generated from enum value: ERC721 = 3;
24
+ * @generated from enum value: TOKEN_TYPE_ERC721 = 3;
25
25
  */
26
26
  TokenType[TokenType["ERC721"] = 3] = "ERC721";
27
27
  /**
28
- * @generated from enum value: ERC1155 = 4;
28
+ * @generated from enum value: TOKEN_TYPE_ERC1155 = 4;
29
29
  */
30
30
  TokenType[TokenType["ERC1155"] = 4] = "ERC1155";
31
31
  })(TokenType || (TokenType = {}));
32
32
  // Retrieve enum metadata with: proto3.getEnumType(TokenType)
33
33
  proto3.util.setEnumType(TokenType, "data.v1.TokenType", [
34
- { no: 0, name: "UNKNOWN" },
35
- { no: 1, name: "NATIVE" },
36
- { no: 2, name: "ERC20" },
37
- { no: 3, name: "ERC721" },
38
- { no: 4, name: "ERC1155" },
34
+ { no: 0, name: "TOKEN_TYPE_UNKNOWN" },
35
+ { no: 1, name: "TOKEN_TYPE_NATIVE" },
36
+ { no: 2, name: "TOKEN_TYPE_ERC20" },
37
+ { no: 3, name: "TOKEN_TYPE_ERC721" },
38
+ { no: 4, name: "TOKEN_TYPE_ERC1155" },
39
39
  ]);
40
40
  /**
41
41
  * @generated from enum data.v1.SpamCode
@@ -100,6 +100,279 @@ proto3.util.setEnumType(SafetyLevel, "data.v1.SafetyLevel", [
100
100
  { no: 3, name: "SAFETY_LEVEL_STRONG_WARNING" },
101
101
  { no: 4, name: "SAFETY_LEVEL_BLOCKED" },
102
102
  ]);
103
+ /**
104
+ * @generated from enum data.v1.TokenReportEventType
105
+ */
106
+ export var TokenReportEventType;
107
+ (function (TokenReportEventType) {
108
+ /**
109
+ * @generated from enum value: TOKEN_REPORT_EVENT_TYPE_UNSPECIFIED = 0;
110
+ */
111
+ TokenReportEventType[TokenReportEventType["UNSPECIFIED"] = 0] = "UNSPECIFIED";
112
+ /**
113
+ * @generated from enum value: TOKEN_REPORT_EVENT_TYPE_FALSE_POSITIVE = 1;
114
+ */
115
+ TokenReportEventType[TokenReportEventType["FALSE_POSITIVE"] = 1] = "FALSE_POSITIVE";
116
+ /**
117
+ * @generated from enum value: TOKEN_REPORT_EVENT_TYPE_FALSE_NEGATIVE = 2;
118
+ */
119
+ TokenReportEventType[TokenReportEventType["FALSE_NEGATIVE"] = 2] = "FALSE_NEGATIVE";
120
+ })(TokenReportEventType || (TokenReportEventType = {}));
121
+ // Retrieve enum metadata with: proto3.getEnumType(TokenReportEventType)
122
+ proto3.util.setEnumType(TokenReportEventType, "data.v1.TokenReportEventType", [
123
+ { no: 0, name: "TOKEN_REPORT_EVENT_TYPE_UNSPECIFIED" },
124
+ { no: 1, name: "TOKEN_REPORT_EVENT_TYPE_FALSE_POSITIVE" },
125
+ { no: 2, name: "TOKEN_REPORT_EVENT_TYPE_FALSE_NEGATIVE" },
126
+ ]);
127
+ /**
128
+ * @generated from enum data.v1.Direction
129
+ */
130
+ export var Direction;
131
+ (function (Direction) {
132
+ /**
133
+ * @generated from enum value: DIRECTION_SELF = 0;
134
+ */
135
+ Direction[Direction["SELF"] = 0] = "SELF";
136
+ /**
137
+ * @generated from enum value: DIRECTION_RECEIVE = 1;
138
+ */
139
+ Direction[Direction["RECEIVE"] = 1] = "RECEIVE";
140
+ /**
141
+ * @generated from enum value: DIRECTION_SEND = 2;
142
+ */
143
+ Direction[Direction["SEND"] = 2] = "SEND";
144
+ })(Direction || (Direction = {}));
145
+ // Retrieve enum metadata with: proto3.getEnumType(Direction)
146
+ proto3.util.setEnumType(Direction, "data.v1.Direction", [
147
+ { no: 0, name: "DIRECTION_SELF" },
148
+ { no: 1, name: "DIRECTION_RECEIVE" },
149
+ { no: 2, name: "DIRECTION_SEND" },
150
+ ]);
151
+ /**
152
+ * @generated from enum data.v1.OnChainTransactionLabel
153
+ */
154
+ export var OnChainTransactionLabel;
155
+ (function (OnChainTransactionLabel) {
156
+ /**
157
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_UNKNOWN = 0;
158
+ */
159
+ OnChainTransactionLabel[OnChainTransactionLabel["UNKNOWN"] = 0] = "UNKNOWN";
160
+ /**
161
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_APPROVE = 1;
162
+ */
163
+ OnChainTransactionLabel[OnChainTransactionLabel["APPROVE"] = 1] = "APPROVE";
164
+ /**
165
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_BORROW = 2;
166
+ */
167
+ OnChainTransactionLabel[OnChainTransactionLabel["BORROW"] = 2] = "BORROW";
168
+ /**
169
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_BRIDGE = 3;
170
+ */
171
+ OnChainTransactionLabel[OnChainTransactionLabel["BRIDGE"] = 3] = "BRIDGE";
172
+ /**
173
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_CANCEL = 4;
174
+ */
175
+ OnChainTransactionLabel[OnChainTransactionLabel["CANCEL"] = 4] = "CANCEL";
176
+ /**
177
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_CLAIM = 5;
178
+ */
179
+ OnChainTransactionLabel[OnChainTransactionLabel["CLAIM"] = 5] = "CLAIM";
180
+ /**
181
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_DEPLOY = 6;
182
+ */
183
+ OnChainTransactionLabel[OnChainTransactionLabel["DEPLOY"] = 6] = "DEPLOY";
184
+ /**
185
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_EXECUTE = 7;
186
+ */
187
+ OnChainTransactionLabel[OnChainTransactionLabel["EXECUTE"] = 7] = "EXECUTE";
188
+ /**
189
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_LEND = 8;
190
+ */
191
+ OnChainTransactionLabel[OnChainTransactionLabel["LEND"] = 8] = "LEND";
192
+ /**
193
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_MINT = 9;
194
+ */
195
+ OnChainTransactionLabel[OnChainTransactionLabel["MINT"] = 9] = "MINT";
196
+ /**
197
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_FIAT_ON_RAMP = 10;
198
+ */
199
+ OnChainTransactionLabel[OnChainTransactionLabel["FIAT_ON_RAMP"] = 10] = "FIAT_ON_RAMP";
200
+ /**
201
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_RECEIVE = 11;
202
+ */
203
+ OnChainTransactionLabel[OnChainTransactionLabel["RECEIVE"] = 11] = "RECEIVE";
204
+ /**
205
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_REPAY = 12;
206
+ */
207
+ OnChainTransactionLabel[OnChainTransactionLabel["REPAY"] = 12] = "REPAY";
208
+ /**
209
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_SEND = 13;
210
+ */
211
+ OnChainTransactionLabel[OnChainTransactionLabel["SEND"] = 13] = "SEND";
212
+ /**
213
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_STAKE = 14;
214
+ */
215
+ OnChainTransactionLabel[OnChainTransactionLabel["STAKE"] = 14] = "STAKE";
216
+ /**
217
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_SWAP = 15;
218
+ */
219
+ OnChainTransactionLabel[OnChainTransactionLabel["SWAP"] = 15] = "SWAP";
220
+ /**
221
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_UNISWAP_X = 16;
222
+ */
223
+ OnChainTransactionLabel[OnChainTransactionLabel["UNISWAP_X"] = 16] = "UNISWAP_X";
224
+ /**
225
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_TRANSFER = 17;
226
+ */
227
+ OnChainTransactionLabel[OnChainTransactionLabel["TRANSFER"] = 17] = "TRANSFER";
228
+ /**
229
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_UNSTAKE = 18;
230
+ */
231
+ OnChainTransactionLabel[OnChainTransactionLabel["UNSTAKE"] = 18] = "UNSTAKE";
232
+ /**
233
+ * @generated from enum value: ON_CHAIN_TRANSACTION_LABEL_WITHDRAW = 19;
234
+ */
235
+ OnChainTransactionLabel[OnChainTransactionLabel["WITHDRAW"] = 19] = "WITHDRAW";
236
+ })(OnChainTransactionLabel || (OnChainTransactionLabel = {}));
237
+ // Retrieve enum metadata with: proto3.getEnumType(OnChainTransactionLabel)
238
+ proto3.util.setEnumType(OnChainTransactionLabel, "data.v1.OnChainTransactionLabel", [
239
+ { no: 0, name: "ON_CHAIN_TRANSACTION_LABEL_UNKNOWN" },
240
+ { no: 1, name: "ON_CHAIN_TRANSACTION_LABEL_APPROVE" },
241
+ { no: 2, name: "ON_CHAIN_TRANSACTION_LABEL_BORROW" },
242
+ { no: 3, name: "ON_CHAIN_TRANSACTION_LABEL_BRIDGE" },
243
+ { no: 4, name: "ON_CHAIN_TRANSACTION_LABEL_CANCEL" },
244
+ { no: 5, name: "ON_CHAIN_TRANSACTION_LABEL_CLAIM" },
245
+ { no: 6, name: "ON_CHAIN_TRANSACTION_LABEL_DEPLOY" },
246
+ { no: 7, name: "ON_CHAIN_TRANSACTION_LABEL_EXECUTE" },
247
+ { no: 8, name: "ON_CHAIN_TRANSACTION_LABEL_LEND" },
248
+ { no: 9, name: "ON_CHAIN_TRANSACTION_LABEL_MINT" },
249
+ { no: 10, name: "ON_CHAIN_TRANSACTION_LABEL_FIAT_ON_RAMP" },
250
+ { no: 11, name: "ON_CHAIN_TRANSACTION_LABEL_RECEIVE" },
251
+ { no: 12, name: "ON_CHAIN_TRANSACTION_LABEL_REPAY" },
252
+ { no: 13, name: "ON_CHAIN_TRANSACTION_LABEL_SEND" },
253
+ { no: 14, name: "ON_CHAIN_TRANSACTION_LABEL_STAKE" },
254
+ { no: 15, name: "ON_CHAIN_TRANSACTION_LABEL_SWAP" },
255
+ { no: 16, name: "ON_CHAIN_TRANSACTION_LABEL_UNISWAP_X" },
256
+ { no: 17, name: "ON_CHAIN_TRANSACTION_LABEL_TRANSFER" },
257
+ { no: 18, name: "ON_CHAIN_TRANSACTION_LABEL_UNSTAKE" },
258
+ { no: 19, name: "ON_CHAIN_TRANSACTION_LABEL_WITHDRAW" },
259
+ ]);
260
+ /**
261
+ * @generated from enum data.v1.OnChainTransactionStatus
262
+ */
263
+ export var OnChainTransactionStatus;
264
+ (function (OnChainTransactionStatus) {
265
+ /**
266
+ * @generated from enum value: ON_CHAIN_TRANSACTION_STATUS_PENDING = 0;
267
+ */
268
+ OnChainTransactionStatus[OnChainTransactionStatus["PENDING"] = 0] = "PENDING";
269
+ /**
270
+ * @generated from enum value: ON_CHAIN_TRANSACTION_STATUS_CONFIRMED = 1;
271
+ */
272
+ OnChainTransactionStatus[OnChainTransactionStatus["CONFIRMED"] = 1] = "CONFIRMED";
273
+ /**
274
+ * @generated from enum value: ON_CHAIN_TRANSACTION_STATUS_FAILED = 2;
275
+ */
276
+ OnChainTransactionStatus[OnChainTransactionStatus["FAILED"] = 2] = "FAILED";
277
+ })(OnChainTransactionStatus || (OnChainTransactionStatus = {}));
278
+ // Retrieve enum metadata with: proto3.getEnumType(OnChainTransactionStatus)
279
+ proto3.util.setEnumType(OnChainTransactionStatus, "data.v1.OnChainTransactionStatus", [
280
+ { no: 0, name: "ON_CHAIN_TRANSACTION_STATUS_PENDING" },
281
+ { no: 1, name: "ON_CHAIN_TRANSACTION_STATUS_CONFIRMED" },
282
+ { no: 2, name: "ON_CHAIN_TRANSACTION_STATUS_FAILED" },
283
+ ]);
284
+ /**
285
+ * @generated from enum data.v1.UniswapXOrderType
286
+ */
287
+ export var UniswapXOrderType;
288
+ (function (UniswapXOrderType) {
289
+ /**
290
+ * @generated from enum value: UNISWAP_X_ORDER_TYPE_DUTCH = 0;
291
+ */
292
+ UniswapXOrderType[UniswapXOrderType["DUTCH"] = 0] = "DUTCH";
293
+ /**
294
+ * @generated from enum value: UNISWAP_X_ORDER_TYPE_LIMIT = 1;
295
+ */
296
+ UniswapXOrderType[UniswapXOrderType["LIMIT"] = 1] = "LIMIT";
297
+ /**
298
+ * @generated from enum value: UNISWAP_X_ORDER_TYPE_DUTCH_V2 = 2;
299
+ */
300
+ UniswapXOrderType[UniswapXOrderType["DUTCH_V2"] = 2] = "DUTCH_V2";
301
+ /**
302
+ * @generated from enum value: UNISWAP_X_ORDER_TYPE_PRIORITY = 3;
303
+ */
304
+ UniswapXOrderType[UniswapXOrderType["PRIORITY"] = 3] = "PRIORITY";
305
+ })(UniswapXOrderType || (UniswapXOrderType = {}));
306
+ // Retrieve enum metadata with: proto3.getEnumType(UniswapXOrderType)
307
+ proto3.util.setEnumType(UniswapXOrderType, "data.v1.UniswapXOrderType", [
308
+ { no: 0, name: "UNISWAP_X_ORDER_TYPE_DUTCH" },
309
+ { no: 1, name: "UNISWAP_X_ORDER_TYPE_LIMIT" },
310
+ { no: 2, name: "UNISWAP_X_ORDER_TYPE_DUTCH_V2" },
311
+ { no: 3, name: "UNISWAP_X_ORDER_TYPE_PRIORITY" },
312
+ ]);
313
+ /**
314
+ * @generated from enum data.v1.UniswapXTransactionStatus
315
+ */
316
+ export var UniswapXTransactionStatus;
317
+ (function (UniswapXTransactionStatus) {
318
+ /**
319
+ * @generated from enum value: UNISWAP_X_TRANSACTION_STATUS_OPEN = 0;
320
+ */
321
+ UniswapXTransactionStatus[UniswapXTransactionStatus["OPEN"] = 0] = "OPEN";
322
+ /**
323
+ * @generated from enum value: UNISWAP_X_TRANSACTION_STATUS_EXPIRED = 1;
324
+ */
325
+ UniswapXTransactionStatus[UniswapXTransactionStatus["EXPIRED"] = 1] = "EXPIRED";
326
+ /**
327
+ * @generated from enum value: UNISWAP_X_TRANSACTION_STATUS_ERROR = 2;
328
+ */
329
+ UniswapXTransactionStatus[UniswapXTransactionStatus["ERROR"] = 2] = "ERROR";
330
+ /**
331
+ * @generated from enum value: UNISWAP_X_TRANSACTION_STATUS_INSUFFICIENT_FUNDS = 3;
332
+ */
333
+ UniswapXTransactionStatus[UniswapXTransactionStatus["INSUFFICIENT_FUNDS"] = 3] = "INSUFFICIENT_FUNDS";
334
+ /**
335
+ * @generated from enum value: UNISWAP_X_TRANSACTION_STATUS_FILLED = 4;
336
+ */
337
+ UniswapXTransactionStatus[UniswapXTransactionStatus["FILLED"] = 4] = "FILLED";
338
+ /**
339
+ * @generated from enum value: UNISWAP_X_TRANSACTION_STATUS_CANCELLED = 5;
340
+ */
341
+ UniswapXTransactionStatus[UniswapXTransactionStatus["CANCELLED"] = 5] = "CANCELLED";
342
+ })(UniswapXTransactionStatus || (UniswapXTransactionStatus = {}));
343
+ // Retrieve enum metadata with: proto3.getEnumType(UniswapXTransactionStatus)
344
+ proto3.util.setEnumType(UniswapXTransactionStatus, "data.v1.UniswapXTransactionStatus", [
345
+ { no: 0, name: "UNISWAP_X_TRANSACTION_STATUS_OPEN" },
346
+ { no: 1, name: "UNISWAP_X_TRANSACTION_STATUS_EXPIRED" },
347
+ { no: 2, name: "UNISWAP_X_TRANSACTION_STATUS_ERROR" },
348
+ { no: 3, name: "UNISWAP_X_TRANSACTION_STATUS_INSUFFICIENT_FUNDS" },
349
+ { no: 4, name: "UNISWAP_X_TRANSACTION_STATUS_FILLED" },
350
+ { no: 5, name: "UNISWAP_X_TRANSACTION_STATUS_CANCELLED" },
351
+ ]);
352
+ /**
353
+ * @generated from enum data.v1.FiatOnRampTransactionStatus
354
+ */
355
+ export var FiatOnRampTransactionStatus;
356
+ (function (FiatOnRampTransactionStatus) {
357
+ /**
358
+ * @generated from enum value: FIAT_ON_RAMP_TRANSACTION_STATUS_FAILED = 0;
359
+ */
360
+ FiatOnRampTransactionStatus[FiatOnRampTransactionStatus["FAILED"] = 0] = "FAILED";
361
+ /**
362
+ * @generated from enum value: FIAT_ON_RAMP_TRANSACTION_STATUS_SETTLED = 1;
363
+ */
364
+ FiatOnRampTransactionStatus[FiatOnRampTransactionStatus["SETTLED"] = 1] = "SETTLED";
365
+ /**
366
+ * @generated from enum value: FIAT_ON_RAMP_TRANSACTION_STATUS_PENDING = 2;
367
+ */
368
+ FiatOnRampTransactionStatus[FiatOnRampTransactionStatus["PENDING"] = 2] = "PENDING";
369
+ })(FiatOnRampTransactionStatus || (FiatOnRampTransactionStatus = {}));
370
+ // Retrieve enum metadata with: proto3.getEnumType(FiatOnRampTransactionStatus)
371
+ proto3.util.setEnumType(FiatOnRampTransactionStatus, "data.v1.FiatOnRampTransactionStatus", [
372
+ { no: 0, name: "FIAT_ON_RAMP_TRANSACTION_STATUS_FAILED" },
373
+ { no: 1, name: "FIAT_ON_RAMP_TRANSACTION_STATUS_SETTLED" },
374
+ { no: 2, name: "FIAT_ON_RAMP_TRANSACTION_STATUS_PENDING" },
375
+ ]);
103
376
  /**
104
377
  * @generated from message data.v1.Token
105
378
  */
@@ -571,3 +844,539 @@ Contract.fields = proto3.util.newFieldList(() => [
571
844
  { no: 1, name: "chain_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
572
845
  { no: 2, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */ },
573
846
  ]);
847
+ /**
848
+ * @generated from message data.v1.Nft
849
+ */
850
+ export class Nft extends Message {
851
+ constructor(data) {
852
+ super();
853
+ /**
854
+ * @generated from field: uint32 chain_id = 1;
855
+ */
856
+ this.chainId = 0;
857
+ /**
858
+ * @generated from field: string address = 2;
859
+ */
860
+ this.address = "";
861
+ /**
862
+ * @generated from field: string token_id = 3;
863
+ */
864
+ this.tokenId = "";
865
+ /**
866
+ * @generated from field: string name = 4;
867
+ */
868
+ this.name = "";
869
+ /**
870
+ * @generated from field: string collection_name = 5;
871
+ */
872
+ this.collectionName = "";
873
+ /**
874
+ * @generated from field: data.v1.TokenType type = 6;
875
+ */
876
+ this.type = TokenType.UNKNOWN;
877
+ /**
878
+ * @generated from field: string image_url = 7;
879
+ */
880
+ this.imageUrl = "";
881
+ proto3.util.initPartial(data, this);
882
+ }
883
+ static fromBinary(bytes, options) {
884
+ return new Nft().fromBinary(bytes, options);
885
+ }
886
+ static fromJson(jsonValue, options) {
887
+ return new Nft().fromJson(jsonValue, options);
888
+ }
889
+ static fromJsonString(jsonString, options) {
890
+ return new Nft().fromJsonString(jsonString, options);
891
+ }
892
+ static equals(a, b) {
893
+ return proto3.util.equals(Nft, a, b);
894
+ }
895
+ }
896
+ Nft.runtime = proto3;
897
+ Nft.typeName = "data.v1.Nft";
898
+ Nft.fields = proto3.util.newFieldList(() => [
899
+ { no: 1, name: "chain_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
900
+ { no: 2, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */ },
901
+ { no: 3, name: "token_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
902
+ { no: 4, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
903
+ { no: 5, name: "collection_name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
904
+ { no: 6, name: "type", kind: "enum", T: proto3.getEnumType(TokenType) },
905
+ { no: 7, name: "image_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
906
+ ]);
907
+ /**
908
+ * @generated from message data.v1.Transaction
909
+ */
910
+ export class Transaction extends Message {
911
+ constructor(data) {
912
+ super();
913
+ /**
914
+ * @generated from oneof data.v1.Transaction.transaction
915
+ */
916
+ this.transaction = { case: undefined };
917
+ proto3.util.initPartial(data, this);
918
+ }
919
+ static fromBinary(bytes, options) {
920
+ return new Transaction().fromBinary(bytes, options);
921
+ }
922
+ static fromJson(jsonValue, options) {
923
+ return new Transaction().fromJson(jsonValue, options);
924
+ }
925
+ static fromJsonString(jsonString, options) {
926
+ return new Transaction().fromJsonString(jsonString, options);
927
+ }
928
+ static equals(a, b) {
929
+ return proto3.util.equals(Transaction, a, b);
930
+ }
931
+ }
932
+ Transaction.runtime = proto3;
933
+ Transaction.typeName = "data.v1.Transaction";
934
+ Transaction.fields = proto3.util.newFieldList(() => [
935
+ { no: 1, name: "on_chain", kind: "message", T: OnChainTransaction, oneof: "transaction" },
936
+ { no: 2, name: "uniswap_x", kind: "message", T: UniswapXTransaction, oneof: "transaction" },
937
+ { no: 3, name: "fiat_on_ramp", kind: "message", T: FiatOnRampTransaction, oneof: "transaction" },
938
+ ]);
939
+ /**
940
+ * @generated from message data.v1.OnChainTransaction
941
+ */
942
+ export class OnChainTransaction extends Message {
943
+ constructor(data) {
944
+ super();
945
+ /**
946
+ * @generated from field: uint32 chain_id = 1;
947
+ */
948
+ this.chainId = 0;
949
+ /**
950
+ * @generated from field: uint32 block_number = 2;
951
+ */
952
+ this.blockNumber = 0;
953
+ /**
954
+ * @generated from field: uint32 timestamp_millis = 3;
955
+ */
956
+ this.timestampMillis = 0;
957
+ /**
958
+ * @generated from field: string transaction_hash = 4;
959
+ */
960
+ this.transactionHash = "";
961
+ /**
962
+ * @generated from field: string from = 5;
963
+ */
964
+ this.from = "";
965
+ /**
966
+ * @generated from field: string to = 6;
967
+ */
968
+ this.to = "";
969
+ /**
970
+ * @generated from field: repeated data.v1.Transfer transfers = 7;
971
+ */
972
+ this.transfers = [];
973
+ /**
974
+ * @generated from field: repeated data.v1.Approval approvals = 8;
975
+ */
976
+ this.approvals = [];
977
+ /**
978
+ * @generated from field: data.v1.OnChainTransactionLabel label = 9;
979
+ */
980
+ this.label = OnChainTransactionLabel.UNKNOWN;
981
+ /**
982
+ * @generated from field: data.v1.OnChainTransactionStatus status = 10;
983
+ */
984
+ this.status = OnChainTransactionStatus.PENDING;
985
+ proto3.util.initPartial(data, this);
986
+ }
987
+ static fromBinary(bytes, options) {
988
+ return new OnChainTransaction().fromBinary(bytes, options);
989
+ }
990
+ static fromJson(jsonValue, options) {
991
+ return new OnChainTransaction().fromJson(jsonValue, options);
992
+ }
993
+ static fromJsonString(jsonString, options) {
994
+ return new OnChainTransaction().fromJsonString(jsonString, options);
995
+ }
996
+ static equals(a, b) {
997
+ return proto3.util.equals(OnChainTransaction, a, b);
998
+ }
999
+ }
1000
+ OnChainTransaction.runtime = proto3;
1001
+ OnChainTransaction.typeName = "data.v1.OnChainTransaction";
1002
+ OnChainTransaction.fields = proto3.util.newFieldList(() => [
1003
+ { no: 1, name: "chain_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1004
+ { no: 2, name: "block_number", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1005
+ { no: 3, name: "timestamp_millis", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1006
+ { no: 4, name: "transaction_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1007
+ { no: 5, name: "from", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1008
+ { no: 6, name: "to", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1009
+ { no: 7, name: "transfers", kind: "message", T: Transfer, repeated: true },
1010
+ { no: 8, name: "approvals", kind: "message", T: Approval, repeated: true },
1011
+ { no: 9, name: "label", kind: "enum", T: proto3.getEnumType(OnChainTransactionLabel) },
1012
+ { no: 10, name: "status", kind: "enum", T: proto3.getEnumType(OnChainTransactionStatus) },
1013
+ { no: 11, name: "protocol", kind: "message", T: ProtocolMetadata, opt: true },
1014
+ { no: 12, name: "fee", kind: "message", T: TransactionFee },
1015
+ ]);
1016
+ /**
1017
+ * @generated from message data.v1.Transfer
1018
+ */
1019
+ export class Transfer extends Message {
1020
+ constructor(data) {
1021
+ super();
1022
+ /**
1023
+ * @generated from field: data.v1.Direction direction = 1;
1024
+ */
1025
+ this.direction = Direction.SELF;
1026
+ /**
1027
+ * @generated from field: string from = 2;
1028
+ */
1029
+ this.from = "";
1030
+ /**
1031
+ * @generated from field: string to = 3;
1032
+ */
1033
+ this.to = "";
1034
+ /**
1035
+ * @generated from oneof data.v1.Transfer.asset
1036
+ */
1037
+ this.asset = { case: undefined };
1038
+ proto3.util.initPartial(data, this);
1039
+ }
1040
+ static fromBinary(bytes, options) {
1041
+ return new Transfer().fromBinary(bytes, options);
1042
+ }
1043
+ static fromJson(jsonValue, options) {
1044
+ return new Transfer().fromJson(jsonValue, options);
1045
+ }
1046
+ static fromJsonString(jsonString, options) {
1047
+ return new Transfer().fromJsonString(jsonString, options);
1048
+ }
1049
+ static equals(a, b) {
1050
+ return proto3.util.equals(Transfer, a, b);
1051
+ }
1052
+ }
1053
+ Transfer.runtime = proto3;
1054
+ Transfer.typeName = "data.v1.Transfer";
1055
+ Transfer.fields = proto3.util.newFieldList(() => [
1056
+ { no: 1, name: "direction", kind: "enum", T: proto3.getEnumType(Direction) },
1057
+ { no: 2, name: "from", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1058
+ { no: 3, name: "to", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1059
+ { no: 4, name: "token", kind: "message", T: Token, oneof: "asset" },
1060
+ { no: 5, name: "nft", kind: "message", T: Nft, oneof: "asset" },
1061
+ { no: 6, name: "amount", kind: "message", T: Amount },
1062
+ ]);
1063
+ /**
1064
+ * @generated from message data.v1.Approval
1065
+ */
1066
+ export class Approval extends Message {
1067
+ constructor(data) {
1068
+ super();
1069
+ /**
1070
+ * @generated from field: string approved_address = 1;
1071
+ */
1072
+ this.approvedAddress = "";
1073
+ /**
1074
+ * @generated from oneof data.v1.Approval.asset
1075
+ */
1076
+ this.asset = { case: undefined };
1077
+ proto3.util.initPartial(data, this);
1078
+ }
1079
+ static fromBinary(bytes, options) {
1080
+ return new Approval().fromBinary(bytes, options);
1081
+ }
1082
+ static fromJson(jsonValue, options) {
1083
+ return new Approval().fromJson(jsonValue, options);
1084
+ }
1085
+ static fromJsonString(jsonString, options) {
1086
+ return new Approval().fromJsonString(jsonString, options);
1087
+ }
1088
+ static equals(a, b) {
1089
+ return proto3.util.equals(Approval, a, b);
1090
+ }
1091
+ }
1092
+ Approval.runtime = proto3;
1093
+ Approval.typeName = "data.v1.Approval";
1094
+ Approval.fields = proto3.util.newFieldList(() => [
1095
+ { no: 1, name: "approved_address", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1096
+ { no: 2, name: "token", kind: "message", T: Token, oneof: "asset" },
1097
+ { no: 3, name: "nft", kind: "message", T: Nft, oneof: "asset" },
1098
+ { no: 4, name: "amount", kind: "message", T: Amount },
1099
+ ]);
1100
+ /**
1101
+ * @generated from message data.v1.ProtocolMetadata
1102
+ */
1103
+ export class ProtocolMetadata extends Message {
1104
+ constructor(data) {
1105
+ super();
1106
+ /**
1107
+ * @generated from field: string name = 1;
1108
+ */
1109
+ this.name = "";
1110
+ /**
1111
+ * @generated from field: string logo_url = 2;
1112
+ */
1113
+ this.logoUrl = "";
1114
+ proto3.util.initPartial(data, this);
1115
+ }
1116
+ static fromBinary(bytes, options) {
1117
+ return new ProtocolMetadata().fromBinary(bytes, options);
1118
+ }
1119
+ static fromJson(jsonValue, options) {
1120
+ return new ProtocolMetadata().fromJson(jsonValue, options);
1121
+ }
1122
+ static fromJsonString(jsonString, options) {
1123
+ return new ProtocolMetadata().fromJsonString(jsonString, options);
1124
+ }
1125
+ static equals(a, b) {
1126
+ return proto3.util.equals(ProtocolMetadata, a, b);
1127
+ }
1128
+ }
1129
+ ProtocolMetadata.runtime = proto3;
1130
+ ProtocolMetadata.typeName = "data.v1.ProtocolMetadata";
1131
+ ProtocolMetadata.fields = proto3.util.newFieldList(() => [
1132
+ { no: 1, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1133
+ { no: 2, name: "logo_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1134
+ ]);
1135
+ /**
1136
+ * @generated from message data.v1.UniswapXTransaction
1137
+ */
1138
+ export class UniswapXTransaction extends Message {
1139
+ constructor(data) {
1140
+ super();
1141
+ /**
1142
+ * @generated from field: uint32 chain_id = 1;
1143
+ */
1144
+ this.chainId = 0;
1145
+ /**
1146
+ * @generated from field: uint32 timestamp_millis = 2;
1147
+ */
1148
+ this.timestampMillis = 0;
1149
+ /**
1150
+ * @generated from field: string offerer = 3;
1151
+ */
1152
+ this.offerer = "";
1153
+ /**
1154
+ * @generated from field: string order_hash = 4;
1155
+ */
1156
+ this.orderHash = "";
1157
+ /**
1158
+ * @generated from field: uint32 expiry_millis = 9;
1159
+ */
1160
+ this.expiryMillis = 0;
1161
+ /**
1162
+ * @generated from field: string encoded_order = 10;
1163
+ */
1164
+ this.encodedOrder = "";
1165
+ /**
1166
+ * @generated from field: data.v1.UniswapXOrderType order_type = 11;
1167
+ */
1168
+ this.orderType = UniswapXOrderType.DUTCH;
1169
+ /**
1170
+ * @generated from field: data.v1.UniswapXTransactionStatus status = 12;
1171
+ */
1172
+ this.status = UniswapXTransactionStatus.OPEN;
1173
+ proto3.util.initPartial(data, this);
1174
+ }
1175
+ static fromBinary(bytes, options) {
1176
+ return new UniswapXTransaction().fromBinary(bytes, options);
1177
+ }
1178
+ static fromJson(jsonValue, options) {
1179
+ return new UniswapXTransaction().fromJson(jsonValue, options);
1180
+ }
1181
+ static fromJsonString(jsonString, options) {
1182
+ return new UniswapXTransaction().fromJsonString(jsonString, options);
1183
+ }
1184
+ static equals(a, b) {
1185
+ return proto3.util.equals(UniswapXTransaction, a, b);
1186
+ }
1187
+ }
1188
+ UniswapXTransaction.runtime = proto3;
1189
+ UniswapXTransaction.typeName = "data.v1.UniswapXTransaction";
1190
+ UniswapXTransaction.fields = proto3.util.newFieldList(() => [
1191
+ { no: 1, name: "chain_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1192
+ { no: 2, name: "timestamp_millis", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1193
+ { no: 3, name: "offerer", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1194
+ { no: 4, name: "order_hash", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1195
+ { no: 5, name: "input_token", kind: "message", T: Token },
1196
+ { no: 6, name: "input_token_amount", kind: "message", T: Amount },
1197
+ { no: 7, name: "output_token", kind: "message", T: Token },
1198
+ { no: 8, name: "output_token_amount", kind: "message", T: Amount },
1199
+ { no: 9, name: "expiry_millis", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1200
+ { no: 10, name: "encoded_order", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1201
+ { no: 11, name: "order_type", kind: "enum", T: proto3.getEnumType(UniswapXOrderType) },
1202
+ { no: 12, name: "status", kind: "enum", T: proto3.getEnumType(UniswapXTransactionStatus) },
1203
+ ]);
1204
+ /**
1205
+ * @generated from message data.v1.FiatOnRampTransaction
1206
+ */
1207
+ export class FiatOnRampTransaction extends Message {
1208
+ constructor(data) {
1209
+ super();
1210
+ /**
1211
+ * @generated from field: uint32 chain_id = 1;
1212
+ */
1213
+ this.chainId = 0;
1214
+ /**
1215
+ * @generated from field: uint32 timestamp_millis = 2;
1216
+ */
1217
+ this.timestampMillis = 0;
1218
+ /**
1219
+ * @generated from field: string wallet_address = 3;
1220
+ */
1221
+ this.walletAddress = "";
1222
+ /**
1223
+ * @generated from field: string fiat_currency = 6;
1224
+ */
1225
+ this.fiatCurrency = "";
1226
+ /**
1227
+ * @generated from field: double fiat_amount = 7;
1228
+ */
1229
+ this.fiatAmount = 0;
1230
+ /**
1231
+ * @generated from field: string transaction_reference_id = 9;
1232
+ */
1233
+ this.transactionReferenceId = "";
1234
+ /**
1235
+ * @generated from field: string external_session_id = 10;
1236
+ */
1237
+ this.externalSessionId = "";
1238
+ /**
1239
+ * @generated from field: double network_fee = 11;
1240
+ */
1241
+ this.networkFee = 0;
1242
+ /**
1243
+ * @generated from field: double transaction_fee = 12;
1244
+ */
1245
+ this.transactionFee = 0;
1246
+ /**
1247
+ * @generated from field: double total_fee = 13;
1248
+ */
1249
+ this.totalFee = 0;
1250
+ /**
1251
+ * @generated from field: data.v1.FiatOnRampTransactionStatus status = 14;
1252
+ */
1253
+ this.status = FiatOnRampTransactionStatus.FAILED;
1254
+ proto3.util.initPartial(data, this);
1255
+ }
1256
+ static fromBinary(bytes, options) {
1257
+ return new FiatOnRampTransaction().fromBinary(bytes, options);
1258
+ }
1259
+ static fromJson(jsonValue, options) {
1260
+ return new FiatOnRampTransaction().fromJson(jsonValue, options);
1261
+ }
1262
+ static fromJsonString(jsonString, options) {
1263
+ return new FiatOnRampTransaction().fromJsonString(jsonString, options);
1264
+ }
1265
+ static equals(a, b) {
1266
+ return proto3.util.equals(FiatOnRampTransaction, a, b);
1267
+ }
1268
+ }
1269
+ FiatOnRampTransaction.runtime = proto3;
1270
+ FiatOnRampTransaction.typeName = "data.v1.FiatOnRampTransaction";
1271
+ FiatOnRampTransaction.fields = proto3.util.newFieldList(() => [
1272
+ { no: 1, name: "chain_id", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1273
+ { no: 2, name: "timestamp_millis", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1274
+ { no: 3, name: "wallet_address", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1275
+ { no: 4, name: "token", kind: "message", T: Token },
1276
+ { no: 5, name: "token_amount", kind: "message", T: Amount },
1277
+ { no: 6, name: "fiat_currency", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1278
+ { no: 7, name: "fiat_amount", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1279
+ { no: 8, name: "service_provider", kind: "message", T: OnRampServiceProvider },
1280
+ { no: 9, name: "transaction_reference_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1281
+ { no: 10, name: "external_session_id", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1282
+ { no: 11, name: "network_fee", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1283
+ { no: 12, name: "transaction_fee", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1284
+ { no: 13, name: "total_fee", kind: "scalar", T: 1 /* ScalarType.DOUBLE */ },
1285
+ { no: 14, name: "status", kind: "enum", T: proto3.getEnumType(FiatOnRampTransactionStatus) },
1286
+ ]);
1287
+ /**
1288
+ * @generated from message data.v1.OnRampServiceProvider
1289
+ */
1290
+ export class OnRampServiceProvider extends Message {
1291
+ constructor(data) {
1292
+ super();
1293
+ /**
1294
+ * @generated from field: string service_provider = 1;
1295
+ */
1296
+ this.serviceProvider = "";
1297
+ /**
1298
+ * @generated from field: string name = 2;
1299
+ */
1300
+ this.name = "";
1301
+ /**
1302
+ * @generated from field: string url = 3;
1303
+ */
1304
+ this.url = "";
1305
+ /**
1306
+ * @generated from field: string logo_light_url = 4;
1307
+ */
1308
+ this.logoLightUrl = "";
1309
+ /**
1310
+ * @generated from field: string logo_dark_url = 5;
1311
+ */
1312
+ this.logoDarkUrl = "";
1313
+ /**
1314
+ * @generated from field: string support_url = 6;
1315
+ */
1316
+ this.supportUrl = "";
1317
+ proto3.util.initPartial(data, this);
1318
+ }
1319
+ static fromBinary(bytes, options) {
1320
+ return new OnRampServiceProvider().fromBinary(bytes, options);
1321
+ }
1322
+ static fromJson(jsonValue, options) {
1323
+ return new OnRampServiceProvider().fromJson(jsonValue, options);
1324
+ }
1325
+ static fromJsonString(jsonString, options) {
1326
+ return new OnRampServiceProvider().fromJsonString(jsonString, options);
1327
+ }
1328
+ static equals(a, b) {
1329
+ return proto3.util.equals(OnRampServiceProvider, a, b);
1330
+ }
1331
+ }
1332
+ OnRampServiceProvider.runtime = proto3;
1333
+ OnRampServiceProvider.typeName = "data.v1.OnRampServiceProvider";
1334
+ OnRampServiceProvider.fields = proto3.util.newFieldList(() => [
1335
+ { no: 1, name: "service_provider", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1336
+ { no: 2, name: "name", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1337
+ { no: 3, name: "url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1338
+ { no: 4, name: "logo_light_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1339
+ { no: 5, name: "logo_dark_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1340
+ { no: 6, name: "support_url", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1341
+ ]);
1342
+ /**
1343
+ * @generated from message data.v1.TransactionFee
1344
+ */
1345
+ export class TransactionFee extends Message {
1346
+ constructor(data) {
1347
+ super();
1348
+ /**
1349
+ * @generated from field: string address = 2;
1350
+ */
1351
+ this.address = "";
1352
+ /**
1353
+ * @generated from field: string symbol = 3;
1354
+ */
1355
+ this.symbol = "";
1356
+ /**
1357
+ * @generated from field: uint32 decimals = 4;
1358
+ */
1359
+ this.decimals = 0;
1360
+ proto3.util.initPartial(data, this);
1361
+ }
1362
+ static fromBinary(bytes, options) {
1363
+ return new TransactionFee().fromBinary(bytes, options);
1364
+ }
1365
+ static fromJson(jsonValue, options) {
1366
+ return new TransactionFee().fromJson(jsonValue, options);
1367
+ }
1368
+ static fromJsonString(jsonString, options) {
1369
+ return new TransactionFee().fromJsonString(jsonString, options);
1370
+ }
1371
+ static equals(a, b) {
1372
+ return proto3.util.equals(TransactionFee, a, b);
1373
+ }
1374
+ }
1375
+ TransactionFee.runtime = proto3;
1376
+ TransactionFee.typeName = "data.v1.TransactionFee";
1377
+ TransactionFee.fields = proto3.util.newFieldList(() => [
1378
+ { no: 1, name: "amount", kind: "message", T: Amount },
1379
+ { no: 2, name: "address", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1380
+ { no: 3, name: "symbol", kind: "scalar", T: 9 /* ScalarType.STRING */ },
1381
+ { no: 4, name: "decimals", kind: "scalar", T: 13 /* ScalarType.UINT32 */ },
1382
+ ]);