@apibara/starknet 2.0.0-beta.6 → 2.0.0-beta.8
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/index.cjs +1464 -292
- package/dist/index.d.cts +967 -79
- package/dist/index.d.mts +967 -79
- package/dist/index.d.ts +967 -79
- package/dist/index.mjs +1452 -293
- package/package.json +9 -11
- package/src/block.ts +102 -0
- package/src/filter.test.ts +257 -9
- package/src/filter.ts +105 -7
- package/src/proto/common.ts +1 -1
- package/src/proto/data.ts +849 -5
- package/src/proto/filter.ts +595 -76
- package/src/proto/google/protobuf/timestamp.ts +1 -1
package/dist/index.cjs
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
const protocol = require('@apibara/protocol');
|
|
4
4
|
const schema = require('@effect/schema');
|
|
5
5
|
const Long = require('long');
|
|
6
|
-
const _m0 = require('protobufjs/minimal');
|
|
6
|
+
const _m0 = require('protobufjs/minimal.js');
|
|
7
7
|
|
|
8
8
|
function _interopDefaultCompat (e) { return e && typeof e === 'object' && 'default' in e ? e.default : e; }
|
|
9
9
|
|
|
@@ -440,7 +440,16 @@ function dataAvailabilityModeToJSON(object) {
|
|
|
440
440
|
}
|
|
441
441
|
}
|
|
442
442
|
function createBaseBlock() {
|
|
443
|
-
return {
|
|
443
|
+
return {
|
|
444
|
+
header: void 0,
|
|
445
|
+
transactions: [],
|
|
446
|
+
receipts: [],
|
|
447
|
+
events: [],
|
|
448
|
+
messages: [],
|
|
449
|
+
storageDiffs: [],
|
|
450
|
+
contractChanges: [],
|
|
451
|
+
nonceUpdates: []
|
|
452
|
+
};
|
|
444
453
|
}
|
|
445
454
|
const Block$1 = {
|
|
446
455
|
encode(message, writer = _m0__default.Writer.create()) {
|
|
@@ -467,6 +476,21 @@ const Block$1 = {
|
|
|
467
476
|
MessageToL1$1.encode(v, writer.uint32(42).fork()).ldelim();
|
|
468
477
|
}
|
|
469
478
|
}
|
|
479
|
+
if (message.storageDiffs !== void 0 && message.storageDiffs.length !== 0) {
|
|
480
|
+
for (const v of message.storageDiffs) {
|
|
481
|
+
StorageDiff$1.encode(v, writer.uint32(50).fork()).ldelim();
|
|
482
|
+
}
|
|
483
|
+
}
|
|
484
|
+
if (message.contractChanges !== void 0 && message.contractChanges.length !== 0) {
|
|
485
|
+
for (const v of message.contractChanges) {
|
|
486
|
+
ContractChange$1.encode(v, writer.uint32(58).fork()).ldelim();
|
|
487
|
+
}
|
|
488
|
+
}
|
|
489
|
+
if (message.nonceUpdates !== void 0 && message.nonceUpdates.length !== 0) {
|
|
490
|
+
for (const v of message.nonceUpdates) {
|
|
491
|
+
NonceUpdate$1.encode(v, writer.uint32(66).fork()).ldelim();
|
|
492
|
+
}
|
|
493
|
+
}
|
|
470
494
|
return writer;
|
|
471
495
|
},
|
|
472
496
|
decode(input, length) {
|
|
@@ -506,6 +530,24 @@ const Block$1 = {
|
|
|
506
530
|
}
|
|
507
531
|
message.messages.push(MessageToL1$1.decode(reader, reader.uint32()));
|
|
508
532
|
continue;
|
|
533
|
+
case 6:
|
|
534
|
+
if (tag !== 50) {
|
|
535
|
+
break;
|
|
536
|
+
}
|
|
537
|
+
message.storageDiffs.push(StorageDiff$1.decode(reader, reader.uint32()));
|
|
538
|
+
continue;
|
|
539
|
+
case 7:
|
|
540
|
+
if (tag !== 58) {
|
|
541
|
+
break;
|
|
542
|
+
}
|
|
543
|
+
message.contractChanges.push(ContractChange$1.decode(reader, reader.uint32()));
|
|
544
|
+
continue;
|
|
545
|
+
case 8:
|
|
546
|
+
if (tag !== 66) {
|
|
547
|
+
break;
|
|
548
|
+
}
|
|
549
|
+
message.nonceUpdates.push(NonceUpdate$1.decode(reader, reader.uint32()));
|
|
550
|
+
continue;
|
|
509
551
|
}
|
|
510
552
|
if ((tag & 7) === 4 || tag === 0) {
|
|
511
553
|
break;
|
|
@@ -520,7 +562,10 @@ const Block$1 = {
|
|
|
520
562
|
transactions: globalThis.Array.isArray(object?.transactions) ? object.transactions.map((e) => Transaction$1.fromJSON(e)) : [],
|
|
521
563
|
receipts: globalThis.Array.isArray(object?.receipts) ? object.receipts.map((e) => TransactionReceipt$1.fromJSON(e)) : [],
|
|
522
564
|
events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => Event$1.fromJSON(e)) : [],
|
|
523
|
-
messages: globalThis.Array.isArray(object?.messages) ? object.messages.map((e) => MessageToL1$1.fromJSON(e)) : []
|
|
565
|
+
messages: globalThis.Array.isArray(object?.messages) ? object.messages.map((e) => MessageToL1$1.fromJSON(e)) : [],
|
|
566
|
+
storageDiffs: globalThis.Array.isArray(object?.storageDiffs) ? object.storageDiffs.map((e) => StorageDiff$1.fromJSON(e)) : [],
|
|
567
|
+
contractChanges: globalThis.Array.isArray(object?.contractChanges) ? object.contractChanges.map((e) => ContractChange$1.fromJSON(e)) : [],
|
|
568
|
+
nonceUpdates: globalThis.Array.isArray(object?.nonceUpdates) ? object.nonceUpdates.map((e) => NonceUpdate$1.fromJSON(e)) : []
|
|
524
569
|
};
|
|
525
570
|
},
|
|
526
571
|
toJSON(message) {
|
|
@@ -540,6 +585,15 @@ const Block$1 = {
|
|
|
540
585
|
if (message.messages?.length) {
|
|
541
586
|
obj.messages = message.messages.map((e) => MessageToL1$1.toJSON(e));
|
|
542
587
|
}
|
|
588
|
+
if (message.storageDiffs?.length) {
|
|
589
|
+
obj.storageDiffs = message.storageDiffs.map((e) => StorageDiff$1.toJSON(e));
|
|
590
|
+
}
|
|
591
|
+
if (message.contractChanges?.length) {
|
|
592
|
+
obj.contractChanges = message.contractChanges.map((e) => ContractChange$1.toJSON(e));
|
|
593
|
+
}
|
|
594
|
+
if (message.nonceUpdates?.length) {
|
|
595
|
+
obj.nonceUpdates = message.nonceUpdates.map((e) => NonceUpdate$1.toJSON(e));
|
|
596
|
+
}
|
|
543
597
|
return obj;
|
|
544
598
|
},
|
|
545
599
|
create(base) {
|
|
@@ -552,6 +606,9 @@ const Block$1 = {
|
|
|
552
606
|
message.receipts = object.receipts?.map((e) => TransactionReceipt$1.fromPartial(e)) || [];
|
|
553
607
|
message.events = object.events?.map((e) => Event$1.fromPartial(e)) || [];
|
|
554
608
|
message.messages = object.messages?.map((e) => MessageToL1$1.fromPartial(e)) || [];
|
|
609
|
+
message.storageDiffs = object.storageDiffs?.map((e) => StorageDiff$1.fromPartial(e)) || [];
|
|
610
|
+
message.contractChanges = object.contractChanges?.map((e) => ContractChange$1.fromPartial(e)) || [];
|
|
611
|
+
message.nonceUpdates = object.nonceUpdates?.map((e) => NonceUpdate$1.fromPartial(e)) || [];
|
|
555
612
|
return message;
|
|
556
613
|
}
|
|
557
614
|
};
|
|
@@ -4266,178 +4323,24 @@ const Uint128 = {
|
|
|
4266
4323
|
return message;
|
|
4267
4324
|
}
|
|
4268
4325
|
};
|
|
4269
|
-
function
|
|
4270
|
-
|
|
4271
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
4272
|
-
} else {
|
|
4273
|
-
const bin = globalThis.atob(b64);
|
|
4274
|
-
const arr = new Uint8Array(bin.length);
|
|
4275
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
4276
|
-
arr[i] = bin.charCodeAt(i);
|
|
4277
|
-
}
|
|
4278
|
-
return arr;
|
|
4279
|
-
}
|
|
4280
|
-
}
|
|
4281
|
-
function base64FromBytes(arr) {
|
|
4282
|
-
if (globalThis.Buffer) {
|
|
4283
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
4284
|
-
} else {
|
|
4285
|
-
const bin = [];
|
|
4286
|
-
arr.forEach((byte) => {
|
|
4287
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
4288
|
-
});
|
|
4289
|
-
return globalThis.btoa(bin.join(""));
|
|
4290
|
-
}
|
|
4291
|
-
}
|
|
4292
|
-
function toTimestamp(date) {
|
|
4293
|
-
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
4294
|
-
const nanos = date.getTime() % 1e3 * 1e6;
|
|
4295
|
-
return { seconds, nanos };
|
|
4296
|
-
}
|
|
4297
|
-
function fromTimestamp(t) {
|
|
4298
|
-
let millis = (globalThis.Number(t.seconds?.toString()) || 0) * 1e3;
|
|
4299
|
-
millis += (t.nanos || 0) / 1e6;
|
|
4300
|
-
return new globalThis.Date(millis);
|
|
4301
|
-
}
|
|
4302
|
-
function fromJsonTimestamp(o) {
|
|
4303
|
-
if (o instanceof globalThis.Date) {
|
|
4304
|
-
return o;
|
|
4305
|
-
} else if (typeof o === "string") {
|
|
4306
|
-
return new globalThis.Date(o);
|
|
4307
|
-
} else {
|
|
4308
|
-
return fromTimestamp(Timestamp.fromJSON(o));
|
|
4309
|
-
}
|
|
4310
|
-
}
|
|
4311
|
-
function longToBigint(long) {
|
|
4312
|
-
return BigInt(long.toString());
|
|
4313
|
-
}
|
|
4314
|
-
if (_m0__default.util.Long !== Long__default) {
|
|
4315
|
-
_m0__default.util.Long = Long__default;
|
|
4316
|
-
_m0__default.configure();
|
|
4317
|
-
}
|
|
4318
|
-
function isSet$1(value) {
|
|
4319
|
-
return value !== null && value !== void 0;
|
|
4320
|
-
}
|
|
4321
|
-
|
|
4322
|
-
const data = {
|
|
4323
|
-
__proto__: null,
|
|
4324
|
-
Block: Block$1,
|
|
4325
|
-
BlockHeader: BlockHeader$1,
|
|
4326
|
-
ComputationResources: ComputationResources$1,
|
|
4327
|
-
DataAvailabilityMode: DataAvailabilityMode$1,
|
|
4328
|
-
DataAvailabilityResources: DataAvailabilityResources$1,
|
|
4329
|
-
DeclareTransactionReceipt: DeclareTransactionReceipt$1,
|
|
4330
|
-
DeclareTransactionV0: DeclareTransactionV0$1,
|
|
4331
|
-
DeclareTransactionV1: DeclareTransactionV1$1,
|
|
4332
|
-
DeclareTransactionV2: DeclareTransactionV2$1,
|
|
4333
|
-
DeclareTransactionV3: DeclareTransactionV3$1,
|
|
4334
|
-
DeployAccountTransactionReceipt: DeployAccountTransactionReceipt$1,
|
|
4335
|
-
DeployAccountTransactionV1: DeployAccountTransactionV1$1,
|
|
4336
|
-
DeployAccountTransactionV3: DeployAccountTransactionV3$1,
|
|
4337
|
-
DeployTransaction: DeployTransaction$1,
|
|
4338
|
-
DeployTransactionReceipt: DeployTransactionReceipt$1,
|
|
4339
|
-
Event: Event$1,
|
|
4340
|
-
ExecutionResources: ExecutionResources$1,
|
|
4341
|
-
ExecutionReverted: ExecutionReverted$1,
|
|
4342
|
-
ExecutionStatus: ExecutionStatus,
|
|
4343
|
-
ExecutionSucceeded: ExecutionSucceeded$1,
|
|
4344
|
-
FeePayment: FeePayment$1,
|
|
4345
|
-
InvokeTransactionReceipt: InvokeTransactionReceipt$1,
|
|
4346
|
-
InvokeTransactionV0: InvokeTransactionV0$1,
|
|
4347
|
-
InvokeTransactionV1: InvokeTransactionV1$1,
|
|
4348
|
-
InvokeTransactionV3: InvokeTransactionV3$1,
|
|
4349
|
-
L1DataAvailabilityMode: L1DataAvailabilityMode$1,
|
|
4350
|
-
L1HandlerTransaction: L1HandlerTransaction$1,
|
|
4351
|
-
L1HandlerTransactionReceipt: L1HandlerTransactionReceipt$1,
|
|
4352
|
-
MessageToL1: MessageToL1$1,
|
|
4353
|
-
PriceUnit: PriceUnit$1,
|
|
4354
|
-
ResourceBounds: ResourceBounds$1,
|
|
4355
|
-
ResourceBoundsMapping: ResourceBoundsMapping$1,
|
|
4356
|
-
ResourcePrice: ResourcePrice$1,
|
|
4357
|
-
Transaction: Transaction$1,
|
|
4358
|
-
TransactionMeta: TransactionMeta$1,
|
|
4359
|
-
TransactionReceipt: TransactionReceipt$1,
|
|
4360
|
-
TransactionReceiptMeta: TransactionReceiptMeta$1,
|
|
4361
|
-
TransactionStatus: TransactionStatus$1,
|
|
4362
|
-
Uint128: Uint128,
|
|
4363
|
-
dataAvailabilityModeFromJSON: dataAvailabilityModeFromJSON,
|
|
4364
|
-
dataAvailabilityModeToJSON: dataAvailabilityModeToJSON,
|
|
4365
|
-
executionStatusFromJSON: executionStatusFromJSON,
|
|
4366
|
-
executionStatusToJSON: executionStatusToJSON,
|
|
4367
|
-
l1DataAvailabilityModeFromJSON: l1DataAvailabilityModeFromJSON,
|
|
4368
|
-
l1DataAvailabilityModeToJSON: l1DataAvailabilityModeToJSON,
|
|
4369
|
-
priceUnitFromJSON: priceUnitFromJSON,
|
|
4370
|
-
priceUnitToJSON: priceUnitToJSON,
|
|
4371
|
-
protobufPackage: protobufPackage$1,
|
|
4372
|
-
transactionStatusFromJSON: transactionStatusFromJSON,
|
|
4373
|
-
transactionStatusToJSON: transactionStatusToJSON
|
|
4374
|
-
};
|
|
4375
|
-
|
|
4376
|
-
const protobufPackage = "starknet.v2";
|
|
4377
|
-
var TransactionStatusFilter$1 = /* @__PURE__ */ ((TransactionStatusFilter2) => {
|
|
4378
|
-
TransactionStatusFilter2[TransactionStatusFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
4379
|
-
TransactionStatusFilter2[TransactionStatusFilter2["SUCCEEDED"] = 1] = "SUCCEEDED";
|
|
4380
|
-
TransactionStatusFilter2[TransactionStatusFilter2["REVERTED"] = 2] = "REVERTED";
|
|
4381
|
-
TransactionStatusFilter2[TransactionStatusFilter2["ALL"] = 3] = "ALL";
|
|
4382
|
-
TransactionStatusFilter2[TransactionStatusFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
4383
|
-
return TransactionStatusFilter2;
|
|
4384
|
-
})(TransactionStatusFilter$1 || {});
|
|
4385
|
-
function transactionStatusFilterFromJSON(object) {
|
|
4386
|
-
switch (object) {
|
|
4387
|
-
case 0:
|
|
4388
|
-
case "TRANSACTION_STATUS_FILTER_UNSPECIFIED":
|
|
4389
|
-
return 0 /* UNSPECIFIED */;
|
|
4390
|
-
case 1:
|
|
4391
|
-
case "TRANSACTION_STATUS_FILTER_SUCCEEDED":
|
|
4392
|
-
return 1 /* SUCCEEDED */;
|
|
4393
|
-
case 2:
|
|
4394
|
-
case "TRANSACTION_STATUS_FILTER_REVERTED":
|
|
4395
|
-
return 2 /* REVERTED */;
|
|
4396
|
-
case 3:
|
|
4397
|
-
case "TRANSACTION_STATUS_FILTER_ALL":
|
|
4398
|
-
return 3 /* ALL */;
|
|
4399
|
-
case -1:
|
|
4400
|
-
case "UNRECOGNIZED":
|
|
4401
|
-
default:
|
|
4402
|
-
return -1 /* UNRECOGNIZED */;
|
|
4403
|
-
}
|
|
4404
|
-
}
|
|
4405
|
-
function transactionStatusFilterToJSON(object) {
|
|
4406
|
-
switch (object) {
|
|
4407
|
-
case 0 /* UNSPECIFIED */:
|
|
4408
|
-
return "TRANSACTION_STATUS_FILTER_UNSPECIFIED";
|
|
4409
|
-
case 1 /* SUCCEEDED */:
|
|
4410
|
-
return "TRANSACTION_STATUS_FILTER_SUCCEEDED";
|
|
4411
|
-
case 2 /* REVERTED */:
|
|
4412
|
-
return "TRANSACTION_STATUS_FILTER_REVERTED";
|
|
4413
|
-
case 3 /* ALL */:
|
|
4414
|
-
return "TRANSACTION_STATUS_FILTER_ALL";
|
|
4415
|
-
case -1 /* UNRECOGNIZED */:
|
|
4416
|
-
default:
|
|
4417
|
-
return "UNRECOGNIZED";
|
|
4418
|
-
}
|
|
4326
|
+
function createBaseStorageDiff() {
|
|
4327
|
+
return { filterIds: [], contractAddress: void 0, storageEntries: [] };
|
|
4419
4328
|
}
|
|
4420
|
-
|
|
4421
|
-
return { header: void 0, transactions: [], events: [], messages: [] };
|
|
4422
|
-
}
|
|
4423
|
-
const Filter$1 = {
|
|
4329
|
+
const StorageDiff$1 = {
|
|
4424
4330
|
encode(message, writer = _m0__default.Writer.create()) {
|
|
4425
|
-
if (message.
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
for (const v of message.transactions) {
|
|
4430
|
-
TransactionFilter$1.encode(v, writer.uint32(18).fork()).ldelim();
|
|
4331
|
+
if (message.filterIds !== void 0 && message.filterIds.length !== 0) {
|
|
4332
|
+
writer.uint32(10).fork();
|
|
4333
|
+
for (const v of message.filterIds) {
|
|
4334
|
+
writer.uint32(v);
|
|
4431
4335
|
}
|
|
4336
|
+
writer.ldelim();
|
|
4432
4337
|
}
|
|
4433
|
-
if (message.
|
|
4434
|
-
|
|
4435
|
-
EventFilter$1.encode(v, writer.uint32(26).fork()).ldelim();
|
|
4436
|
-
}
|
|
4338
|
+
if (message.contractAddress !== void 0) {
|
|
4339
|
+
FieldElement.encode(message.contractAddress, writer.uint32(18).fork()).ldelim();
|
|
4437
4340
|
}
|
|
4438
|
-
if (message.
|
|
4439
|
-
for (const v of message.
|
|
4440
|
-
|
|
4341
|
+
if (message.storageEntries !== void 0 && message.storageEntries.length !== 0) {
|
|
4342
|
+
for (const v of message.storageEntries) {
|
|
4343
|
+
StorageEntry$1.encode(v, writer.uint32(26).fork()).ldelim();
|
|
4441
4344
|
}
|
|
4442
4345
|
}
|
|
4443
4346
|
return writer;
|
|
@@ -4445,33 +4348,34 @@ const Filter$1 = {
|
|
|
4445
4348
|
decode(input, length) {
|
|
4446
4349
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
4447
4350
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4448
|
-
const message =
|
|
4351
|
+
const message = createBaseStorageDiff();
|
|
4449
4352
|
while (reader.pos < end) {
|
|
4450
4353
|
const tag = reader.uint32();
|
|
4451
4354
|
switch (tag >>> 3) {
|
|
4452
4355
|
case 1:
|
|
4453
|
-
if (tag
|
|
4454
|
-
|
|
4356
|
+
if (tag === 8) {
|
|
4357
|
+
message.filterIds.push(reader.uint32());
|
|
4358
|
+
continue;
|
|
4455
4359
|
}
|
|
4456
|
-
|
|
4457
|
-
|
|
4360
|
+
if (tag === 10) {
|
|
4361
|
+
const end2 = reader.uint32() + reader.pos;
|
|
4362
|
+
while (reader.pos < end2) {
|
|
4363
|
+
message.filterIds.push(reader.uint32());
|
|
4364
|
+
}
|
|
4365
|
+
continue;
|
|
4366
|
+
}
|
|
4367
|
+
break;
|
|
4458
4368
|
case 2:
|
|
4459
4369
|
if (tag !== 18) {
|
|
4460
4370
|
break;
|
|
4461
4371
|
}
|
|
4462
|
-
message.
|
|
4372
|
+
message.contractAddress = FieldElement.decode(reader, reader.uint32());
|
|
4463
4373
|
continue;
|
|
4464
4374
|
case 3:
|
|
4465
4375
|
if (tag !== 26) {
|
|
4466
4376
|
break;
|
|
4467
4377
|
}
|
|
4468
|
-
message.
|
|
4469
|
-
continue;
|
|
4470
|
-
case 4:
|
|
4471
|
-
if (tag !== 34) {
|
|
4472
|
-
break;
|
|
4473
|
-
}
|
|
4474
|
-
message.messages.push(MessageToL1Filter$1.decode(reader, reader.uint32()));
|
|
4378
|
+
message.storageEntries.push(StorageEntry$1.decode(reader, reader.uint32()));
|
|
4475
4379
|
continue;
|
|
4476
4380
|
}
|
|
4477
4381
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -4483,62 +4387,66 @@ const Filter$1 = {
|
|
|
4483
4387
|
},
|
|
4484
4388
|
fromJSON(object) {
|
|
4485
4389
|
return {
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
messages: globalThis.Array.isArray(object?.messages) ? object.messages.map((e) => MessageToL1Filter$1.fromJSON(e)) : []
|
|
4390
|
+
filterIds: globalThis.Array.isArray(object?.filterIds) ? object.filterIds.map((e) => globalThis.Number(e)) : [],
|
|
4391
|
+
contractAddress: isSet$1(object.contractAddress) ? FieldElement.fromJSON(object.contractAddress) : void 0,
|
|
4392
|
+
storageEntries: globalThis.Array.isArray(object?.storageEntries) ? object.storageEntries.map((e) => StorageEntry$1.fromJSON(e)) : []
|
|
4490
4393
|
};
|
|
4491
4394
|
},
|
|
4492
4395
|
toJSON(message) {
|
|
4493
4396
|
const obj = {};
|
|
4494
|
-
if (message.
|
|
4495
|
-
obj.
|
|
4496
|
-
}
|
|
4497
|
-
if (message.transactions?.length) {
|
|
4498
|
-
obj.transactions = message.transactions.map((e) => TransactionFilter$1.toJSON(e));
|
|
4397
|
+
if (message.filterIds?.length) {
|
|
4398
|
+
obj.filterIds = message.filterIds.map((e) => Math.round(e));
|
|
4499
4399
|
}
|
|
4500
|
-
if (message.
|
|
4501
|
-
obj.
|
|
4400
|
+
if (message.contractAddress !== void 0) {
|
|
4401
|
+
obj.contractAddress = FieldElement.toJSON(message.contractAddress);
|
|
4502
4402
|
}
|
|
4503
|
-
if (message.
|
|
4504
|
-
obj.
|
|
4403
|
+
if (message.storageEntries?.length) {
|
|
4404
|
+
obj.storageEntries = message.storageEntries.map((e) => StorageEntry$1.toJSON(e));
|
|
4505
4405
|
}
|
|
4506
4406
|
return obj;
|
|
4507
4407
|
},
|
|
4508
4408
|
create(base) {
|
|
4509
|
-
return
|
|
4409
|
+
return StorageDiff$1.fromPartial(base ?? {});
|
|
4510
4410
|
},
|
|
4511
4411
|
fromPartial(object) {
|
|
4512
|
-
const message =
|
|
4513
|
-
message.
|
|
4514
|
-
message.
|
|
4515
|
-
message.
|
|
4516
|
-
message.messages = object.messages?.map((e) => MessageToL1Filter$1.fromPartial(e)) || [];
|
|
4412
|
+
const message = createBaseStorageDiff();
|
|
4413
|
+
message.filterIds = object.filterIds?.map((e) => e) || [];
|
|
4414
|
+
message.contractAddress = object.contractAddress !== void 0 && object.contractAddress !== null ? FieldElement.fromPartial(object.contractAddress) : void 0;
|
|
4415
|
+
message.storageEntries = object.storageEntries?.map((e) => StorageEntry$1.fromPartial(e)) || [];
|
|
4517
4416
|
return message;
|
|
4518
4417
|
}
|
|
4519
4418
|
};
|
|
4520
|
-
function
|
|
4521
|
-
return {
|
|
4419
|
+
function createBaseStorageEntry() {
|
|
4420
|
+
return { key: void 0, value: void 0 };
|
|
4522
4421
|
}
|
|
4523
|
-
const
|
|
4422
|
+
const StorageEntry$1 = {
|
|
4524
4423
|
encode(message, writer = _m0__default.Writer.create()) {
|
|
4525
|
-
if (message.
|
|
4526
|
-
writer.uint32(
|
|
4424
|
+
if (message.key !== void 0) {
|
|
4425
|
+
FieldElement.encode(message.key, writer.uint32(10).fork()).ldelim();
|
|
4426
|
+
}
|
|
4427
|
+
if (message.value !== void 0) {
|
|
4428
|
+
FieldElement.encode(message.value, writer.uint32(18).fork()).ldelim();
|
|
4527
4429
|
}
|
|
4528
4430
|
return writer;
|
|
4529
4431
|
},
|
|
4530
4432
|
decode(input, length) {
|
|
4531
4433
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
4532
4434
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4533
|
-
const message =
|
|
4435
|
+
const message = createBaseStorageEntry();
|
|
4534
4436
|
while (reader.pos < end) {
|
|
4535
4437
|
const tag = reader.uint32();
|
|
4536
4438
|
switch (tag >>> 3) {
|
|
4537
4439
|
case 1:
|
|
4538
|
-
if (tag !==
|
|
4440
|
+
if (tag !== 10) {
|
|
4441
|
+
break;
|
|
4442
|
+
}
|
|
4443
|
+
message.key = FieldElement.decode(reader, reader.uint32());
|
|
4444
|
+
continue;
|
|
4445
|
+
case 2:
|
|
4446
|
+
if (tag !== 18) {
|
|
4539
4447
|
break;
|
|
4540
4448
|
}
|
|
4541
|
-
message.
|
|
4449
|
+
message.value = FieldElement.decode(reader, reader.uint32());
|
|
4542
4450
|
continue;
|
|
4543
4451
|
}
|
|
4544
4452
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -4549,21 +4457,797 @@ const HeaderFilter$1 = {
|
|
|
4549
4457
|
return message;
|
|
4550
4458
|
},
|
|
4551
4459
|
fromJSON(object) {
|
|
4552
|
-
return {
|
|
4553
|
-
|
|
4460
|
+
return {
|
|
4461
|
+
key: isSet$1(object.key) ? FieldElement.fromJSON(object.key) : void 0,
|
|
4462
|
+
value: isSet$1(object.value) ? FieldElement.fromJSON(object.value) : void 0
|
|
4463
|
+
};
|
|
4464
|
+
},
|
|
4465
|
+
toJSON(message) {
|
|
4466
|
+
const obj = {};
|
|
4467
|
+
if (message.key !== void 0) {
|
|
4468
|
+
obj.key = FieldElement.toJSON(message.key);
|
|
4469
|
+
}
|
|
4470
|
+
if (message.value !== void 0) {
|
|
4471
|
+
obj.value = FieldElement.toJSON(message.value);
|
|
4472
|
+
}
|
|
4473
|
+
return obj;
|
|
4474
|
+
},
|
|
4475
|
+
create(base) {
|
|
4476
|
+
return StorageEntry$1.fromPartial(base ?? {});
|
|
4477
|
+
},
|
|
4478
|
+
fromPartial(object) {
|
|
4479
|
+
const message = createBaseStorageEntry();
|
|
4480
|
+
message.key = object.key !== void 0 && object.key !== null ? FieldElement.fromPartial(object.key) : void 0;
|
|
4481
|
+
message.value = object.value !== void 0 && object.value !== null ? FieldElement.fromPartial(object.value) : void 0;
|
|
4482
|
+
return message;
|
|
4483
|
+
}
|
|
4484
|
+
};
|
|
4485
|
+
function createBaseContractChange() {
|
|
4486
|
+
return { filterIds: [], change: void 0 };
|
|
4487
|
+
}
|
|
4488
|
+
const ContractChange$1 = {
|
|
4489
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
4490
|
+
if (message.filterIds !== void 0 && message.filterIds.length !== 0) {
|
|
4491
|
+
writer.uint32(10).fork();
|
|
4492
|
+
for (const v of message.filterIds) {
|
|
4493
|
+
writer.uint32(v);
|
|
4494
|
+
}
|
|
4495
|
+
writer.ldelim();
|
|
4496
|
+
}
|
|
4497
|
+
switch (message.change?.$case) {
|
|
4498
|
+
case "declaredClass":
|
|
4499
|
+
DeclaredClass$1.encode(message.change.declaredClass, writer.uint32(18).fork()).ldelim();
|
|
4500
|
+
break;
|
|
4501
|
+
case "replacedClass":
|
|
4502
|
+
ReplacedClass$1.encode(message.change.replacedClass, writer.uint32(26).fork()).ldelim();
|
|
4503
|
+
break;
|
|
4504
|
+
case "deployedContract":
|
|
4505
|
+
DeployedContract$1.encode(message.change.deployedContract, writer.uint32(34).fork()).ldelim();
|
|
4506
|
+
break;
|
|
4507
|
+
}
|
|
4508
|
+
return writer;
|
|
4509
|
+
},
|
|
4510
|
+
decode(input, length) {
|
|
4511
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
4512
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4513
|
+
const message = createBaseContractChange();
|
|
4514
|
+
while (reader.pos < end) {
|
|
4515
|
+
const tag = reader.uint32();
|
|
4516
|
+
switch (tag >>> 3) {
|
|
4517
|
+
case 1:
|
|
4518
|
+
if (tag === 8) {
|
|
4519
|
+
message.filterIds.push(reader.uint32());
|
|
4520
|
+
continue;
|
|
4521
|
+
}
|
|
4522
|
+
if (tag === 10) {
|
|
4523
|
+
const end2 = reader.uint32() + reader.pos;
|
|
4524
|
+
while (reader.pos < end2) {
|
|
4525
|
+
message.filterIds.push(reader.uint32());
|
|
4526
|
+
}
|
|
4527
|
+
continue;
|
|
4528
|
+
}
|
|
4529
|
+
break;
|
|
4530
|
+
case 2:
|
|
4531
|
+
if (tag !== 18) {
|
|
4532
|
+
break;
|
|
4533
|
+
}
|
|
4534
|
+
message.change = { $case: "declaredClass", declaredClass: DeclaredClass$1.decode(reader, reader.uint32()) };
|
|
4535
|
+
continue;
|
|
4536
|
+
case 3:
|
|
4537
|
+
if (tag !== 26) {
|
|
4538
|
+
break;
|
|
4539
|
+
}
|
|
4540
|
+
message.change = { $case: "replacedClass", replacedClass: ReplacedClass$1.decode(reader, reader.uint32()) };
|
|
4541
|
+
continue;
|
|
4542
|
+
case 4:
|
|
4543
|
+
if (tag !== 34) {
|
|
4544
|
+
break;
|
|
4545
|
+
}
|
|
4546
|
+
message.change = {
|
|
4547
|
+
$case: "deployedContract",
|
|
4548
|
+
deployedContract: DeployedContract$1.decode(reader, reader.uint32())
|
|
4549
|
+
};
|
|
4550
|
+
continue;
|
|
4551
|
+
}
|
|
4552
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4553
|
+
break;
|
|
4554
|
+
}
|
|
4555
|
+
reader.skipType(tag & 7);
|
|
4556
|
+
}
|
|
4557
|
+
return message;
|
|
4558
|
+
},
|
|
4559
|
+
fromJSON(object) {
|
|
4560
|
+
return {
|
|
4561
|
+
filterIds: globalThis.Array.isArray(object?.filterIds) ? object.filterIds.map((e) => globalThis.Number(e)) : [],
|
|
4562
|
+
change: isSet$1(object.declaredClass) ? { $case: "declaredClass", declaredClass: DeclaredClass$1.fromJSON(object.declaredClass) } : isSet$1(object.replacedClass) ? { $case: "replacedClass", replacedClass: ReplacedClass$1.fromJSON(object.replacedClass) } : isSet$1(object.deployedContract) ? { $case: "deployedContract", deployedContract: DeployedContract$1.fromJSON(object.deployedContract) } : void 0
|
|
4563
|
+
};
|
|
4564
|
+
},
|
|
4565
|
+
toJSON(message) {
|
|
4566
|
+
const obj = {};
|
|
4567
|
+
if (message.filterIds?.length) {
|
|
4568
|
+
obj.filterIds = message.filterIds.map((e) => Math.round(e));
|
|
4569
|
+
}
|
|
4570
|
+
if (message.change?.$case === "declaredClass") {
|
|
4571
|
+
obj.declaredClass = DeclaredClass$1.toJSON(message.change.declaredClass);
|
|
4572
|
+
}
|
|
4573
|
+
if (message.change?.$case === "replacedClass") {
|
|
4574
|
+
obj.replacedClass = ReplacedClass$1.toJSON(message.change.replacedClass);
|
|
4575
|
+
}
|
|
4576
|
+
if (message.change?.$case === "deployedContract") {
|
|
4577
|
+
obj.deployedContract = DeployedContract$1.toJSON(message.change.deployedContract);
|
|
4578
|
+
}
|
|
4579
|
+
return obj;
|
|
4580
|
+
},
|
|
4581
|
+
create(base) {
|
|
4582
|
+
return ContractChange$1.fromPartial(base ?? {});
|
|
4583
|
+
},
|
|
4584
|
+
fromPartial(object) {
|
|
4585
|
+
const message = createBaseContractChange();
|
|
4586
|
+
message.filterIds = object.filterIds?.map((e) => e) || [];
|
|
4587
|
+
if (object.change?.$case === "declaredClass" && object.change?.declaredClass !== void 0 && object.change?.declaredClass !== null) {
|
|
4588
|
+
message.change = {
|
|
4589
|
+
$case: "declaredClass",
|
|
4590
|
+
declaredClass: DeclaredClass$1.fromPartial(object.change.declaredClass)
|
|
4591
|
+
};
|
|
4592
|
+
}
|
|
4593
|
+
if (object.change?.$case === "replacedClass" && object.change?.replacedClass !== void 0 && object.change?.replacedClass !== null) {
|
|
4594
|
+
message.change = {
|
|
4595
|
+
$case: "replacedClass",
|
|
4596
|
+
replacedClass: ReplacedClass$1.fromPartial(object.change.replacedClass)
|
|
4597
|
+
};
|
|
4598
|
+
}
|
|
4599
|
+
if (object.change?.$case === "deployedContract" && object.change?.deployedContract !== void 0 && object.change?.deployedContract !== null) {
|
|
4600
|
+
message.change = {
|
|
4601
|
+
$case: "deployedContract",
|
|
4602
|
+
deployedContract: DeployedContract$1.fromPartial(object.change.deployedContract)
|
|
4603
|
+
};
|
|
4604
|
+
}
|
|
4605
|
+
return message;
|
|
4606
|
+
}
|
|
4607
|
+
};
|
|
4608
|
+
function createBaseDeclaredClass() {
|
|
4609
|
+
return { classHash: void 0, compiledClassHash: void 0 };
|
|
4610
|
+
}
|
|
4611
|
+
const DeclaredClass$1 = {
|
|
4612
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
4613
|
+
if (message.classHash !== void 0) {
|
|
4614
|
+
FieldElement.encode(message.classHash, writer.uint32(10).fork()).ldelim();
|
|
4615
|
+
}
|
|
4616
|
+
if (message.compiledClassHash !== void 0) {
|
|
4617
|
+
FieldElement.encode(message.compiledClassHash, writer.uint32(18).fork()).ldelim();
|
|
4618
|
+
}
|
|
4619
|
+
return writer;
|
|
4620
|
+
},
|
|
4621
|
+
decode(input, length) {
|
|
4622
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
4623
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4624
|
+
const message = createBaseDeclaredClass();
|
|
4625
|
+
while (reader.pos < end) {
|
|
4626
|
+
const tag = reader.uint32();
|
|
4627
|
+
switch (tag >>> 3) {
|
|
4628
|
+
case 1:
|
|
4629
|
+
if (tag !== 10) {
|
|
4630
|
+
break;
|
|
4631
|
+
}
|
|
4632
|
+
message.classHash = FieldElement.decode(reader, reader.uint32());
|
|
4633
|
+
continue;
|
|
4634
|
+
case 2:
|
|
4635
|
+
if (tag !== 18) {
|
|
4636
|
+
break;
|
|
4637
|
+
}
|
|
4638
|
+
message.compiledClassHash = FieldElement.decode(reader, reader.uint32());
|
|
4639
|
+
continue;
|
|
4640
|
+
}
|
|
4641
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4642
|
+
break;
|
|
4643
|
+
}
|
|
4644
|
+
reader.skipType(tag & 7);
|
|
4645
|
+
}
|
|
4646
|
+
return message;
|
|
4647
|
+
},
|
|
4648
|
+
fromJSON(object) {
|
|
4649
|
+
return {
|
|
4650
|
+
classHash: isSet$1(object.classHash) ? FieldElement.fromJSON(object.classHash) : void 0,
|
|
4651
|
+
compiledClassHash: isSet$1(object.compiledClassHash) ? FieldElement.fromJSON(object.compiledClassHash) : void 0
|
|
4652
|
+
};
|
|
4653
|
+
},
|
|
4654
|
+
toJSON(message) {
|
|
4655
|
+
const obj = {};
|
|
4656
|
+
if (message.classHash !== void 0) {
|
|
4657
|
+
obj.classHash = FieldElement.toJSON(message.classHash);
|
|
4658
|
+
}
|
|
4659
|
+
if (message.compiledClassHash !== void 0) {
|
|
4660
|
+
obj.compiledClassHash = FieldElement.toJSON(message.compiledClassHash);
|
|
4661
|
+
}
|
|
4662
|
+
return obj;
|
|
4663
|
+
},
|
|
4664
|
+
create(base) {
|
|
4665
|
+
return DeclaredClass$1.fromPartial(base ?? {});
|
|
4666
|
+
},
|
|
4667
|
+
fromPartial(object) {
|
|
4668
|
+
const message = createBaseDeclaredClass();
|
|
4669
|
+
message.classHash = object.classHash !== void 0 && object.classHash !== null ? FieldElement.fromPartial(object.classHash) : void 0;
|
|
4670
|
+
message.compiledClassHash = object.compiledClassHash !== void 0 && object.compiledClassHash !== null ? FieldElement.fromPartial(object.compiledClassHash) : void 0;
|
|
4671
|
+
return message;
|
|
4672
|
+
}
|
|
4673
|
+
};
|
|
4674
|
+
function createBaseReplacedClass() {
|
|
4675
|
+
return { contractAddress: void 0, classHash: void 0 };
|
|
4676
|
+
}
|
|
4677
|
+
const ReplacedClass$1 = {
|
|
4678
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
4679
|
+
if (message.contractAddress !== void 0) {
|
|
4680
|
+
FieldElement.encode(message.contractAddress, writer.uint32(10).fork()).ldelim();
|
|
4681
|
+
}
|
|
4682
|
+
if (message.classHash !== void 0) {
|
|
4683
|
+
FieldElement.encode(message.classHash, writer.uint32(18).fork()).ldelim();
|
|
4684
|
+
}
|
|
4685
|
+
return writer;
|
|
4686
|
+
},
|
|
4687
|
+
decode(input, length) {
|
|
4688
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
4689
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4690
|
+
const message = createBaseReplacedClass();
|
|
4691
|
+
while (reader.pos < end) {
|
|
4692
|
+
const tag = reader.uint32();
|
|
4693
|
+
switch (tag >>> 3) {
|
|
4694
|
+
case 1:
|
|
4695
|
+
if (tag !== 10) {
|
|
4696
|
+
break;
|
|
4697
|
+
}
|
|
4698
|
+
message.contractAddress = FieldElement.decode(reader, reader.uint32());
|
|
4699
|
+
continue;
|
|
4700
|
+
case 2:
|
|
4701
|
+
if (tag !== 18) {
|
|
4702
|
+
break;
|
|
4703
|
+
}
|
|
4704
|
+
message.classHash = FieldElement.decode(reader, reader.uint32());
|
|
4705
|
+
continue;
|
|
4706
|
+
}
|
|
4707
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4708
|
+
break;
|
|
4709
|
+
}
|
|
4710
|
+
reader.skipType(tag & 7);
|
|
4711
|
+
}
|
|
4712
|
+
return message;
|
|
4713
|
+
},
|
|
4714
|
+
fromJSON(object) {
|
|
4715
|
+
return {
|
|
4716
|
+
contractAddress: isSet$1(object.contractAddress) ? FieldElement.fromJSON(object.contractAddress) : void 0,
|
|
4717
|
+
classHash: isSet$1(object.classHash) ? FieldElement.fromJSON(object.classHash) : void 0
|
|
4718
|
+
};
|
|
4719
|
+
},
|
|
4720
|
+
toJSON(message) {
|
|
4721
|
+
const obj = {};
|
|
4722
|
+
if (message.contractAddress !== void 0) {
|
|
4723
|
+
obj.contractAddress = FieldElement.toJSON(message.contractAddress);
|
|
4724
|
+
}
|
|
4725
|
+
if (message.classHash !== void 0) {
|
|
4726
|
+
obj.classHash = FieldElement.toJSON(message.classHash);
|
|
4727
|
+
}
|
|
4728
|
+
return obj;
|
|
4729
|
+
},
|
|
4730
|
+
create(base) {
|
|
4731
|
+
return ReplacedClass$1.fromPartial(base ?? {});
|
|
4732
|
+
},
|
|
4733
|
+
fromPartial(object) {
|
|
4734
|
+
const message = createBaseReplacedClass();
|
|
4735
|
+
message.contractAddress = object.contractAddress !== void 0 && object.contractAddress !== null ? FieldElement.fromPartial(object.contractAddress) : void 0;
|
|
4736
|
+
message.classHash = object.classHash !== void 0 && object.classHash !== null ? FieldElement.fromPartial(object.classHash) : void 0;
|
|
4737
|
+
return message;
|
|
4738
|
+
}
|
|
4739
|
+
};
|
|
4740
|
+
function createBaseDeployedContract() {
|
|
4741
|
+
return { contractAddress: void 0, classHash: void 0 };
|
|
4742
|
+
}
|
|
4743
|
+
const DeployedContract$1 = {
|
|
4744
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
4745
|
+
if (message.contractAddress !== void 0) {
|
|
4746
|
+
FieldElement.encode(message.contractAddress, writer.uint32(10).fork()).ldelim();
|
|
4747
|
+
}
|
|
4748
|
+
if (message.classHash !== void 0) {
|
|
4749
|
+
FieldElement.encode(message.classHash, writer.uint32(18).fork()).ldelim();
|
|
4750
|
+
}
|
|
4751
|
+
return writer;
|
|
4752
|
+
},
|
|
4753
|
+
decode(input, length) {
|
|
4754
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
4755
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4756
|
+
const message = createBaseDeployedContract();
|
|
4757
|
+
while (reader.pos < end) {
|
|
4758
|
+
const tag = reader.uint32();
|
|
4759
|
+
switch (tag >>> 3) {
|
|
4760
|
+
case 1:
|
|
4761
|
+
if (tag !== 10) {
|
|
4762
|
+
break;
|
|
4763
|
+
}
|
|
4764
|
+
message.contractAddress = FieldElement.decode(reader, reader.uint32());
|
|
4765
|
+
continue;
|
|
4766
|
+
case 2:
|
|
4767
|
+
if (tag !== 18) {
|
|
4768
|
+
break;
|
|
4769
|
+
}
|
|
4770
|
+
message.classHash = FieldElement.decode(reader, reader.uint32());
|
|
4771
|
+
continue;
|
|
4772
|
+
}
|
|
4773
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4774
|
+
break;
|
|
4775
|
+
}
|
|
4776
|
+
reader.skipType(tag & 7);
|
|
4777
|
+
}
|
|
4778
|
+
return message;
|
|
4779
|
+
},
|
|
4780
|
+
fromJSON(object) {
|
|
4781
|
+
return {
|
|
4782
|
+
contractAddress: isSet$1(object.contractAddress) ? FieldElement.fromJSON(object.contractAddress) : void 0,
|
|
4783
|
+
classHash: isSet$1(object.classHash) ? FieldElement.fromJSON(object.classHash) : void 0
|
|
4784
|
+
};
|
|
4785
|
+
},
|
|
4786
|
+
toJSON(message) {
|
|
4787
|
+
const obj = {};
|
|
4788
|
+
if (message.contractAddress !== void 0) {
|
|
4789
|
+
obj.contractAddress = FieldElement.toJSON(message.contractAddress);
|
|
4790
|
+
}
|
|
4791
|
+
if (message.classHash !== void 0) {
|
|
4792
|
+
obj.classHash = FieldElement.toJSON(message.classHash);
|
|
4793
|
+
}
|
|
4794
|
+
return obj;
|
|
4795
|
+
},
|
|
4796
|
+
create(base) {
|
|
4797
|
+
return DeployedContract$1.fromPartial(base ?? {});
|
|
4798
|
+
},
|
|
4799
|
+
fromPartial(object) {
|
|
4800
|
+
const message = createBaseDeployedContract();
|
|
4801
|
+
message.contractAddress = object.contractAddress !== void 0 && object.contractAddress !== null ? FieldElement.fromPartial(object.contractAddress) : void 0;
|
|
4802
|
+
message.classHash = object.classHash !== void 0 && object.classHash !== null ? FieldElement.fromPartial(object.classHash) : void 0;
|
|
4803
|
+
return message;
|
|
4804
|
+
}
|
|
4805
|
+
};
|
|
4806
|
+
function createBaseNonceUpdate() {
|
|
4807
|
+
return { filterIds: [], contractAddress: void 0, nonce: void 0 };
|
|
4808
|
+
}
|
|
4809
|
+
const NonceUpdate$1 = {
|
|
4810
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
4811
|
+
if (message.filterIds !== void 0 && message.filterIds.length !== 0) {
|
|
4812
|
+
writer.uint32(10).fork();
|
|
4813
|
+
for (const v of message.filterIds) {
|
|
4814
|
+
writer.uint32(v);
|
|
4815
|
+
}
|
|
4816
|
+
writer.ldelim();
|
|
4817
|
+
}
|
|
4818
|
+
if (message.contractAddress !== void 0) {
|
|
4819
|
+
FieldElement.encode(message.contractAddress, writer.uint32(18).fork()).ldelim();
|
|
4820
|
+
}
|
|
4821
|
+
if (message.nonce !== void 0) {
|
|
4822
|
+
FieldElement.encode(message.nonce, writer.uint32(26).fork()).ldelim();
|
|
4823
|
+
}
|
|
4824
|
+
return writer;
|
|
4825
|
+
},
|
|
4826
|
+
decode(input, length) {
|
|
4827
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
4828
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
4829
|
+
const message = createBaseNonceUpdate();
|
|
4830
|
+
while (reader.pos < end) {
|
|
4831
|
+
const tag = reader.uint32();
|
|
4832
|
+
switch (tag >>> 3) {
|
|
4833
|
+
case 1:
|
|
4834
|
+
if (tag === 8) {
|
|
4835
|
+
message.filterIds.push(reader.uint32());
|
|
4836
|
+
continue;
|
|
4837
|
+
}
|
|
4838
|
+
if (tag === 10) {
|
|
4839
|
+
const end2 = reader.uint32() + reader.pos;
|
|
4840
|
+
while (reader.pos < end2) {
|
|
4841
|
+
message.filterIds.push(reader.uint32());
|
|
4842
|
+
}
|
|
4843
|
+
continue;
|
|
4844
|
+
}
|
|
4845
|
+
break;
|
|
4846
|
+
case 2:
|
|
4847
|
+
if (tag !== 18) {
|
|
4848
|
+
break;
|
|
4849
|
+
}
|
|
4850
|
+
message.contractAddress = FieldElement.decode(reader, reader.uint32());
|
|
4851
|
+
continue;
|
|
4852
|
+
case 3:
|
|
4853
|
+
if (tag !== 26) {
|
|
4854
|
+
break;
|
|
4855
|
+
}
|
|
4856
|
+
message.nonce = FieldElement.decode(reader, reader.uint32());
|
|
4857
|
+
continue;
|
|
4858
|
+
}
|
|
4859
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
4860
|
+
break;
|
|
4861
|
+
}
|
|
4862
|
+
reader.skipType(tag & 7);
|
|
4863
|
+
}
|
|
4864
|
+
return message;
|
|
4865
|
+
},
|
|
4866
|
+
fromJSON(object) {
|
|
4867
|
+
return {
|
|
4868
|
+
filterIds: globalThis.Array.isArray(object?.filterIds) ? object.filterIds.map((e) => globalThis.Number(e)) : [],
|
|
4869
|
+
contractAddress: isSet$1(object.contractAddress) ? FieldElement.fromJSON(object.contractAddress) : void 0,
|
|
4870
|
+
nonce: isSet$1(object.nonce) ? FieldElement.fromJSON(object.nonce) : void 0
|
|
4871
|
+
};
|
|
4872
|
+
},
|
|
4873
|
+
toJSON(message) {
|
|
4874
|
+
const obj = {};
|
|
4875
|
+
if (message.filterIds?.length) {
|
|
4876
|
+
obj.filterIds = message.filterIds.map((e) => Math.round(e));
|
|
4877
|
+
}
|
|
4878
|
+
if (message.contractAddress !== void 0) {
|
|
4879
|
+
obj.contractAddress = FieldElement.toJSON(message.contractAddress);
|
|
4880
|
+
}
|
|
4881
|
+
if (message.nonce !== void 0) {
|
|
4882
|
+
obj.nonce = FieldElement.toJSON(message.nonce);
|
|
4883
|
+
}
|
|
4884
|
+
return obj;
|
|
4885
|
+
},
|
|
4886
|
+
create(base) {
|
|
4887
|
+
return NonceUpdate$1.fromPartial(base ?? {});
|
|
4888
|
+
},
|
|
4889
|
+
fromPartial(object) {
|
|
4890
|
+
const message = createBaseNonceUpdate();
|
|
4891
|
+
message.filterIds = object.filterIds?.map((e) => e) || [];
|
|
4892
|
+
message.contractAddress = object.contractAddress !== void 0 && object.contractAddress !== null ? FieldElement.fromPartial(object.contractAddress) : void 0;
|
|
4893
|
+
message.nonce = object.nonce !== void 0 && object.nonce !== null ? FieldElement.fromPartial(object.nonce) : void 0;
|
|
4894
|
+
return message;
|
|
4895
|
+
}
|
|
4896
|
+
};
|
|
4897
|
+
function bytesFromBase64(b64) {
|
|
4898
|
+
if (globalThis.Buffer) {
|
|
4899
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
4900
|
+
} else {
|
|
4901
|
+
const bin = globalThis.atob(b64);
|
|
4902
|
+
const arr = new Uint8Array(bin.length);
|
|
4903
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
4904
|
+
arr[i] = bin.charCodeAt(i);
|
|
4905
|
+
}
|
|
4906
|
+
return arr;
|
|
4907
|
+
}
|
|
4908
|
+
}
|
|
4909
|
+
function base64FromBytes(arr) {
|
|
4910
|
+
if (globalThis.Buffer) {
|
|
4911
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
4912
|
+
} else {
|
|
4913
|
+
const bin = [];
|
|
4914
|
+
arr.forEach((byte) => {
|
|
4915
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
4916
|
+
});
|
|
4917
|
+
return globalThis.btoa(bin.join(""));
|
|
4918
|
+
}
|
|
4919
|
+
}
|
|
4920
|
+
function toTimestamp(date) {
|
|
4921
|
+
const seconds = BigInt(Math.trunc(date.getTime() / 1e3));
|
|
4922
|
+
const nanos = date.getTime() % 1e3 * 1e6;
|
|
4923
|
+
return { seconds, nanos };
|
|
4924
|
+
}
|
|
4925
|
+
function fromTimestamp(t) {
|
|
4926
|
+
let millis = (globalThis.Number(t.seconds?.toString()) || 0) * 1e3;
|
|
4927
|
+
millis += (t.nanos || 0) / 1e6;
|
|
4928
|
+
return new globalThis.Date(millis);
|
|
4929
|
+
}
|
|
4930
|
+
function fromJsonTimestamp(o) {
|
|
4931
|
+
if (o instanceof globalThis.Date) {
|
|
4932
|
+
return o;
|
|
4933
|
+
} else if (typeof o === "string") {
|
|
4934
|
+
return new globalThis.Date(o);
|
|
4935
|
+
} else {
|
|
4936
|
+
return fromTimestamp(Timestamp.fromJSON(o));
|
|
4937
|
+
}
|
|
4938
|
+
}
|
|
4939
|
+
function longToBigint(long) {
|
|
4940
|
+
return BigInt(long.toString());
|
|
4941
|
+
}
|
|
4942
|
+
if (_m0__default.util.Long !== Long__default) {
|
|
4943
|
+
_m0__default.util.Long = Long__default;
|
|
4944
|
+
_m0__default.configure();
|
|
4945
|
+
}
|
|
4946
|
+
function isSet$1(value) {
|
|
4947
|
+
return value !== null && value !== void 0;
|
|
4948
|
+
}
|
|
4949
|
+
|
|
4950
|
+
const data = {
|
|
4951
|
+
__proto__: null,
|
|
4952
|
+
Block: Block$1,
|
|
4953
|
+
BlockHeader: BlockHeader$1,
|
|
4954
|
+
ComputationResources: ComputationResources$1,
|
|
4955
|
+
ContractChange: ContractChange$1,
|
|
4956
|
+
DataAvailabilityMode: DataAvailabilityMode$1,
|
|
4957
|
+
DataAvailabilityResources: DataAvailabilityResources$1,
|
|
4958
|
+
DeclareTransactionReceipt: DeclareTransactionReceipt$1,
|
|
4959
|
+
DeclareTransactionV0: DeclareTransactionV0$1,
|
|
4960
|
+
DeclareTransactionV1: DeclareTransactionV1$1,
|
|
4961
|
+
DeclareTransactionV2: DeclareTransactionV2$1,
|
|
4962
|
+
DeclareTransactionV3: DeclareTransactionV3$1,
|
|
4963
|
+
DeclaredClass: DeclaredClass$1,
|
|
4964
|
+
DeployAccountTransactionReceipt: DeployAccountTransactionReceipt$1,
|
|
4965
|
+
DeployAccountTransactionV1: DeployAccountTransactionV1$1,
|
|
4966
|
+
DeployAccountTransactionV3: DeployAccountTransactionV3$1,
|
|
4967
|
+
DeployTransaction: DeployTransaction$1,
|
|
4968
|
+
DeployTransactionReceipt: DeployTransactionReceipt$1,
|
|
4969
|
+
DeployedContract: DeployedContract$1,
|
|
4970
|
+
Event: Event$1,
|
|
4971
|
+
ExecutionResources: ExecutionResources$1,
|
|
4972
|
+
ExecutionReverted: ExecutionReverted$1,
|
|
4973
|
+
ExecutionStatus: ExecutionStatus,
|
|
4974
|
+
ExecutionSucceeded: ExecutionSucceeded$1,
|
|
4975
|
+
FeePayment: FeePayment$1,
|
|
4976
|
+
InvokeTransactionReceipt: InvokeTransactionReceipt$1,
|
|
4977
|
+
InvokeTransactionV0: InvokeTransactionV0$1,
|
|
4978
|
+
InvokeTransactionV1: InvokeTransactionV1$1,
|
|
4979
|
+
InvokeTransactionV3: InvokeTransactionV3$1,
|
|
4980
|
+
L1DataAvailabilityMode: L1DataAvailabilityMode$1,
|
|
4981
|
+
L1HandlerTransaction: L1HandlerTransaction$1,
|
|
4982
|
+
L1HandlerTransactionReceipt: L1HandlerTransactionReceipt$1,
|
|
4983
|
+
MessageToL1: MessageToL1$1,
|
|
4984
|
+
NonceUpdate: NonceUpdate$1,
|
|
4985
|
+
PriceUnit: PriceUnit$1,
|
|
4986
|
+
ReplacedClass: ReplacedClass$1,
|
|
4987
|
+
ResourceBounds: ResourceBounds$1,
|
|
4988
|
+
ResourceBoundsMapping: ResourceBoundsMapping$1,
|
|
4989
|
+
ResourcePrice: ResourcePrice$1,
|
|
4990
|
+
StorageDiff: StorageDiff$1,
|
|
4991
|
+
StorageEntry: StorageEntry$1,
|
|
4992
|
+
Transaction: Transaction$1,
|
|
4993
|
+
TransactionMeta: TransactionMeta$1,
|
|
4994
|
+
TransactionReceipt: TransactionReceipt$1,
|
|
4995
|
+
TransactionReceiptMeta: TransactionReceiptMeta$1,
|
|
4996
|
+
TransactionStatus: TransactionStatus$1,
|
|
4997
|
+
Uint128: Uint128,
|
|
4998
|
+
dataAvailabilityModeFromJSON: dataAvailabilityModeFromJSON,
|
|
4999
|
+
dataAvailabilityModeToJSON: dataAvailabilityModeToJSON,
|
|
5000
|
+
executionStatusFromJSON: executionStatusFromJSON,
|
|
5001
|
+
executionStatusToJSON: executionStatusToJSON,
|
|
5002
|
+
l1DataAvailabilityModeFromJSON: l1DataAvailabilityModeFromJSON,
|
|
5003
|
+
l1DataAvailabilityModeToJSON: l1DataAvailabilityModeToJSON,
|
|
5004
|
+
priceUnitFromJSON: priceUnitFromJSON,
|
|
5005
|
+
priceUnitToJSON: priceUnitToJSON,
|
|
5006
|
+
protobufPackage: protobufPackage$1,
|
|
5007
|
+
transactionStatusFromJSON: transactionStatusFromJSON,
|
|
5008
|
+
transactionStatusToJSON: transactionStatusToJSON
|
|
5009
|
+
};
|
|
5010
|
+
|
|
5011
|
+
const protobufPackage = "starknet.v2";
|
|
5012
|
+
var HeaderFilter$1 = /* @__PURE__ */ ((HeaderFilter2) => {
|
|
5013
|
+
HeaderFilter2[HeaderFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5014
|
+
HeaderFilter2[HeaderFilter2["ALWAYS"] = 1] = "ALWAYS";
|
|
5015
|
+
HeaderFilter2[HeaderFilter2["ON_DATA"] = 2] = "ON_DATA";
|
|
5016
|
+
HeaderFilter2[HeaderFilter2["ON_DATA_OR_ON_NEW_BLOCK"] = 3] = "ON_DATA_OR_ON_NEW_BLOCK";
|
|
5017
|
+
HeaderFilter2[HeaderFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
5018
|
+
return HeaderFilter2;
|
|
5019
|
+
})(HeaderFilter$1 || {});
|
|
5020
|
+
function headerFilterFromJSON(object) {
|
|
5021
|
+
switch (object) {
|
|
5022
|
+
case 0:
|
|
5023
|
+
case "HEADER_FILTER_UNSPECIFIED":
|
|
5024
|
+
return 0 /* UNSPECIFIED */;
|
|
5025
|
+
case 1:
|
|
5026
|
+
case "HEADER_FILTER_ALWAYS":
|
|
5027
|
+
return 1 /* ALWAYS */;
|
|
5028
|
+
case 2:
|
|
5029
|
+
case "HEADER_FILTER_ON_DATA":
|
|
5030
|
+
return 2 /* ON_DATA */;
|
|
5031
|
+
case 3:
|
|
5032
|
+
case "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK":
|
|
5033
|
+
return 3 /* ON_DATA_OR_ON_NEW_BLOCK */;
|
|
5034
|
+
case -1:
|
|
5035
|
+
case "UNRECOGNIZED":
|
|
5036
|
+
default:
|
|
5037
|
+
return -1 /* UNRECOGNIZED */;
|
|
5038
|
+
}
|
|
5039
|
+
}
|
|
5040
|
+
function headerFilterToJSON(object) {
|
|
5041
|
+
switch (object) {
|
|
5042
|
+
case 0 /* UNSPECIFIED */:
|
|
5043
|
+
return "HEADER_FILTER_UNSPECIFIED";
|
|
5044
|
+
case 1 /* ALWAYS */:
|
|
5045
|
+
return "HEADER_FILTER_ALWAYS";
|
|
5046
|
+
case 2 /* ON_DATA */:
|
|
5047
|
+
return "HEADER_FILTER_ON_DATA";
|
|
5048
|
+
case 3 /* ON_DATA_OR_ON_NEW_BLOCK */:
|
|
5049
|
+
return "HEADER_FILTER_ON_DATA_OR_ON_NEW_BLOCK";
|
|
5050
|
+
case -1 /* UNRECOGNIZED */:
|
|
5051
|
+
default:
|
|
5052
|
+
return "UNRECOGNIZED";
|
|
5053
|
+
}
|
|
5054
|
+
}
|
|
5055
|
+
var TransactionStatusFilter$1 = /* @__PURE__ */ ((TransactionStatusFilter2) => {
|
|
5056
|
+
TransactionStatusFilter2[TransactionStatusFilter2["UNSPECIFIED"] = 0] = "UNSPECIFIED";
|
|
5057
|
+
TransactionStatusFilter2[TransactionStatusFilter2["SUCCEEDED"] = 1] = "SUCCEEDED";
|
|
5058
|
+
TransactionStatusFilter2[TransactionStatusFilter2["REVERTED"] = 2] = "REVERTED";
|
|
5059
|
+
TransactionStatusFilter2[TransactionStatusFilter2["ALL"] = 3] = "ALL";
|
|
5060
|
+
TransactionStatusFilter2[TransactionStatusFilter2["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
5061
|
+
return TransactionStatusFilter2;
|
|
5062
|
+
})(TransactionStatusFilter$1 || {});
|
|
5063
|
+
function transactionStatusFilterFromJSON(object) {
|
|
5064
|
+
switch (object) {
|
|
5065
|
+
case 0:
|
|
5066
|
+
case "TRANSACTION_STATUS_FILTER_UNSPECIFIED":
|
|
5067
|
+
return 0 /* UNSPECIFIED */;
|
|
5068
|
+
case 1:
|
|
5069
|
+
case "TRANSACTION_STATUS_FILTER_SUCCEEDED":
|
|
5070
|
+
return 1 /* SUCCEEDED */;
|
|
5071
|
+
case 2:
|
|
5072
|
+
case "TRANSACTION_STATUS_FILTER_REVERTED":
|
|
5073
|
+
return 2 /* REVERTED */;
|
|
5074
|
+
case 3:
|
|
5075
|
+
case "TRANSACTION_STATUS_FILTER_ALL":
|
|
5076
|
+
return 3 /* ALL */;
|
|
5077
|
+
case -1:
|
|
5078
|
+
case "UNRECOGNIZED":
|
|
5079
|
+
default:
|
|
5080
|
+
return -1 /* UNRECOGNIZED */;
|
|
5081
|
+
}
|
|
5082
|
+
}
|
|
5083
|
+
function transactionStatusFilterToJSON(object) {
|
|
5084
|
+
switch (object) {
|
|
5085
|
+
case 0 /* UNSPECIFIED */:
|
|
5086
|
+
return "TRANSACTION_STATUS_FILTER_UNSPECIFIED";
|
|
5087
|
+
case 1 /* SUCCEEDED */:
|
|
5088
|
+
return "TRANSACTION_STATUS_FILTER_SUCCEEDED";
|
|
5089
|
+
case 2 /* REVERTED */:
|
|
5090
|
+
return "TRANSACTION_STATUS_FILTER_REVERTED";
|
|
5091
|
+
case 3 /* ALL */:
|
|
5092
|
+
return "TRANSACTION_STATUS_FILTER_ALL";
|
|
5093
|
+
case -1 /* UNRECOGNIZED */:
|
|
5094
|
+
default:
|
|
5095
|
+
return "UNRECOGNIZED";
|
|
5096
|
+
}
|
|
5097
|
+
}
|
|
5098
|
+
function createBaseFilter() {
|
|
5099
|
+
return {
|
|
5100
|
+
header: 0,
|
|
5101
|
+
transactions: [],
|
|
5102
|
+
events: [],
|
|
5103
|
+
messages: [],
|
|
5104
|
+
storageDiffs: [],
|
|
5105
|
+
contractChanges: [],
|
|
5106
|
+
nonceUpdates: []
|
|
5107
|
+
};
|
|
5108
|
+
}
|
|
5109
|
+
const Filter$1 = {
|
|
5110
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
5111
|
+
if (message.header !== void 0 && message.header !== 0) {
|
|
5112
|
+
writer.uint32(8).int32(message.header);
|
|
5113
|
+
}
|
|
5114
|
+
if (message.transactions !== void 0 && message.transactions.length !== 0) {
|
|
5115
|
+
for (const v of message.transactions) {
|
|
5116
|
+
TransactionFilter$1.encode(v, writer.uint32(18).fork()).ldelim();
|
|
5117
|
+
}
|
|
5118
|
+
}
|
|
5119
|
+
if (message.events !== void 0 && message.events.length !== 0) {
|
|
5120
|
+
for (const v of message.events) {
|
|
5121
|
+
EventFilter$1.encode(v, writer.uint32(26).fork()).ldelim();
|
|
5122
|
+
}
|
|
5123
|
+
}
|
|
5124
|
+
if (message.messages !== void 0 && message.messages.length !== 0) {
|
|
5125
|
+
for (const v of message.messages) {
|
|
5126
|
+
MessageToL1Filter$1.encode(v, writer.uint32(34).fork()).ldelim();
|
|
5127
|
+
}
|
|
5128
|
+
}
|
|
5129
|
+
if (message.storageDiffs !== void 0 && message.storageDiffs.length !== 0) {
|
|
5130
|
+
for (const v of message.storageDiffs) {
|
|
5131
|
+
StorageDiffFilter$1.encode(v, writer.uint32(42).fork()).ldelim();
|
|
5132
|
+
}
|
|
5133
|
+
}
|
|
5134
|
+
if (message.contractChanges !== void 0 && message.contractChanges.length !== 0) {
|
|
5135
|
+
for (const v of message.contractChanges) {
|
|
5136
|
+
ContractChangeFilter$1.encode(v, writer.uint32(50).fork()).ldelim();
|
|
5137
|
+
}
|
|
5138
|
+
}
|
|
5139
|
+
if (message.nonceUpdates !== void 0 && message.nonceUpdates.length !== 0) {
|
|
5140
|
+
for (const v of message.nonceUpdates) {
|
|
5141
|
+
NonceUpdateFilter$1.encode(v, writer.uint32(58).fork()).ldelim();
|
|
5142
|
+
}
|
|
5143
|
+
}
|
|
5144
|
+
return writer;
|
|
5145
|
+
},
|
|
5146
|
+
decode(input, length) {
|
|
5147
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5148
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5149
|
+
const message = createBaseFilter();
|
|
5150
|
+
while (reader.pos < end) {
|
|
5151
|
+
const tag = reader.uint32();
|
|
5152
|
+
switch (tag >>> 3) {
|
|
5153
|
+
case 1:
|
|
5154
|
+
if (tag !== 8) {
|
|
5155
|
+
break;
|
|
5156
|
+
}
|
|
5157
|
+
message.header = reader.int32();
|
|
5158
|
+
continue;
|
|
5159
|
+
case 2:
|
|
5160
|
+
if (tag !== 18) {
|
|
5161
|
+
break;
|
|
5162
|
+
}
|
|
5163
|
+
message.transactions.push(TransactionFilter$1.decode(reader, reader.uint32()));
|
|
5164
|
+
continue;
|
|
5165
|
+
case 3:
|
|
5166
|
+
if (tag !== 26) {
|
|
5167
|
+
break;
|
|
5168
|
+
}
|
|
5169
|
+
message.events.push(EventFilter$1.decode(reader, reader.uint32()));
|
|
5170
|
+
continue;
|
|
5171
|
+
case 4:
|
|
5172
|
+
if (tag !== 34) {
|
|
5173
|
+
break;
|
|
5174
|
+
}
|
|
5175
|
+
message.messages.push(MessageToL1Filter$1.decode(reader, reader.uint32()));
|
|
5176
|
+
continue;
|
|
5177
|
+
case 5:
|
|
5178
|
+
if (tag !== 42) {
|
|
5179
|
+
break;
|
|
5180
|
+
}
|
|
5181
|
+
message.storageDiffs.push(StorageDiffFilter$1.decode(reader, reader.uint32()));
|
|
5182
|
+
continue;
|
|
5183
|
+
case 6:
|
|
5184
|
+
if (tag !== 50) {
|
|
5185
|
+
break;
|
|
5186
|
+
}
|
|
5187
|
+
message.contractChanges.push(ContractChangeFilter$1.decode(reader, reader.uint32()));
|
|
5188
|
+
continue;
|
|
5189
|
+
case 7:
|
|
5190
|
+
if (tag !== 58) {
|
|
5191
|
+
break;
|
|
5192
|
+
}
|
|
5193
|
+
message.nonceUpdates.push(NonceUpdateFilter$1.decode(reader, reader.uint32()));
|
|
5194
|
+
continue;
|
|
5195
|
+
}
|
|
5196
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5197
|
+
break;
|
|
5198
|
+
}
|
|
5199
|
+
reader.skipType(tag & 7);
|
|
5200
|
+
}
|
|
5201
|
+
return message;
|
|
5202
|
+
},
|
|
5203
|
+
fromJSON(object) {
|
|
5204
|
+
return {
|
|
5205
|
+
header: isSet(object.header) ? headerFilterFromJSON(object.header) : 0,
|
|
5206
|
+
transactions: globalThis.Array.isArray(object?.transactions) ? object.transactions.map((e) => TransactionFilter$1.fromJSON(e)) : [],
|
|
5207
|
+
events: globalThis.Array.isArray(object?.events) ? object.events.map((e) => EventFilter$1.fromJSON(e)) : [],
|
|
5208
|
+
messages: globalThis.Array.isArray(object?.messages) ? object.messages.map((e) => MessageToL1Filter$1.fromJSON(e)) : [],
|
|
5209
|
+
storageDiffs: globalThis.Array.isArray(object?.storageDiffs) ? object.storageDiffs.map((e) => StorageDiffFilter$1.fromJSON(e)) : [],
|
|
5210
|
+
contractChanges: globalThis.Array.isArray(object?.contractChanges) ? object.contractChanges.map((e) => ContractChangeFilter$1.fromJSON(e)) : [],
|
|
5211
|
+
nonceUpdates: globalThis.Array.isArray(object?.nonceUpdates) ? object.nonceUpdates.map((e) => NonceUpdateFilter$1.fromJSON(e)) : []
|
|
5212
|
+
};
|
|
5213
|
+
},
|
|
4554
5214
|
toJSON(message) {
|
|
4555
5215
|
const obj = {};
|
|
4556
|
-
if (message.
|
|
4557
|
-
obj.
|
|
5216
|
+
if (message.header !== void 0 && message.header !== 0) {
|
|
5217
|
+
obj.header = headerFilterToJSON(message.header);
|
|
5218
|
+
}
|
|
5219
|
+
if (message.transactions?.length) {
|
|
5220
|
+
obj.transactions = message.transactions.map((e) => TransactionFilter$1.toJSON(e));
|
|
5221
|
+
}
|
|
5222
|
+
if (message.events?.length) {
|
|
5223
|
+
obj.events = message.events.map((e) => EventFilter$1.toJSON(e));
|
|
5224
|
+
}
|
|
5225
|
+
if (message.messages?.length) {
|
|
5226
|
+
obj.messages = message.messages.map((e) => MessageToL1Filter$1.toJSON(e));
|
|
5227
|
+
}
|
|
5228
|
+
if (message.storageDiffs?.length) {
|
|
5229
|
+
obj.storageDiffs = message.storageDiffs.map((e) => StorageDiffFilter$1.toJSON(e));
|
|
5230
|
+
}
|
|
5231
|
+
if (message.contractChanges?.length) {
|
|
5232
|
+
obj.contractChanges = message.contractChanges.map((e) => ContractChangeFilter$1.toJSON(e));
|
|
5233
|
+
}
|
|
5234
|
+
if (message.nonceUpdates?.length) {
|
|
5235
|
+
obj.nonceUpdates = message.nonceUpdates.map((e) => NonceUpdateFilter$1.toJSON(e));
|
|
4558
5236
|
}
|
|
4559
5237
|
return obj;
|
|
4560
5238
|
},
|
|
4561
5239
|
create(base) {
|
|
4562
|
-
return
|
|
5240
|
+
return Filter$1.fromPartial(base ?? {});
|
|
4563
5241
|
},
|
|
4564
5242
|
fromPartial(object) {
|
|
4565
|
-
const message =
|
|
4566
|
-
message.
|
|
5243
|
+
const message = createBaseFilter();
|
|
5244
|
+
message.header = object.header ?? 0;
|
|
5245
|
+
message.transactions = object.transactions?.map((e) => TransactionFilter$1.fromPartial(e)) || [];
|
|
5246
|
+
message.events = object.events?.map((e) => EventFilter$1.fromPartial(e)) || [];
|
|
5247
|
+
message.messages = object.messages?.map((e) => MessageToL1Filter$1.fromPartial(e)) || [];
|
|
5248
|
+
message.storageDiffs = object.storageDiffs?.map((e) => StorageDiffFilter$1.fromPartial(e)) || [];
|
|
5249
|
+
message.contractChanges = object.contractChanges?.map((e) => ContractChangeFilter$1.fromPartial(e)) || [];
|
|
5250
|
+
message.nonceUpdates = object.nonceUpdates?.map((e) => NonceUpdateFilter$1.fromPartial(e)) || [];
|
|
4567
5251
|
return message;
|
|
4568
5252
|
}
|
|
4569
5253
|
};
|
|
@@ -5298,7 +5982,217 @@ const InvokeTransactionV1Filter$1 = {
|
|
|
5298
5982
|
decode(input, length) {
|
|
5299
5983
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5300
5984
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5301
|
-
const message = createBaseInvokeTransactionV1Filter();
|
|
5985
|
+
const message = createBaseInvokeTransactionV1Filter();
|
|
5986
|
+
while (reader.pos < end) {
|
|
5987
|
+
const tag = reader.uint32();
|
|
5988
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
5989
|
+
break;
|
|
5990
|
+
}
|
|
5991
|
+
reader.skipType(tag & 7);
|
|
5992
|
+
}
|
|
5993
|
+
return message;
|
|
5994
|
+
},
|
|
5995
|
+
fromJSON(_) {
|
|
5996
|
+
return {};
|
|
5997
|
+
},
|
|
5998
|
+
toJSON(_) {
|
|
5999
|
+
const obj = {};
|
|
6000
|
+
return obj;
|
|
6001
|
+
},
|
|
6002
|
+
create(base) {
|
|
6003
|
+
return InvokeTransactionV1Filter$1.fromPartial(base ?? {});
|
|
6004
|
+
},
|
|
6005
|
+
fromPartial(_) {
|
|
6006
|
+
const message = createBaseInvokeTransactionV1Filter();
|
|
6007
|
+
return message;
|
|
6008
|
+
}
|
|
6009
|
+
};
|
|
6010
|
+
function createBaseInvokeTransactionV3Filter() {
|
|
6011
|
+
return {};
|
|
6012
|
+
}
|
|
6013
|
+
const InvokeTransactionV3Filter$1 = {
|
|
6014
|
+
encode(_, writer = _m0__default.Writer.create()) {
|
|
6015
|
+
return writer;
|
|
6016
|
+
},
|
|
6017
|
+
decode(input, length) {
|
|
6018
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
6019
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
6020
|
+
const message = createBaseInvokeTransactionV3Filter();
|
|
6021
|
+
while (reader.pos < end) {
|
|
6022
|
+
const tag = reader.uint32();
|
|
6023
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6024
|
+
break;
|
|
6025
|
+
}
|
|
6026
|
+
reader.skipType(tag & 7);
|
|
6027
|
+
}
|
|
6028
|
+
return message;
|
|
6029
|
+
},
|
|
6030
|
+
fromJSON(_) {
|
|
6031
|
+
return {};
|
|
6032
|
+
},
|
|
6033
|
+
toJSON(_) {
|
|
6034
|
+
const obj = {};
|
|
6035
|
+
return obj;
|
|
6036
|
+
},
|
|
6037
|
+
create(base) {
|
|
6038
|
+
return InvokeTransactionV3Filter$1.fromPartial(base ?? {});
|
|
6039
|
+
},
|
|
6040
|
+
fromPartial(_) {
|
|
6041
|
+
const message = createBaseInvokeTransactionV3Filter();
|
|
6042
|
+
return message;
|
|
6043
|
+
}
|
|
6044
|
+
};
|
|
6045
|
+
function createBaseDeployTransactionFilter() {
|
|
6046
|
+
return {};
|
|
6047
|
+
}
|
|
6048
|
+
const DeployTransactionFilter$1 = {
|
|
6049
|
+
encode(_, writer = _m0__default.Writer.create()) {
|
|
6050
|
+
return writer;
|
|
6051
|
+
},
|
|
6052
|
+
decode(input, length) {
|
|
6053
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
6054
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
6055
|
+
const message = createBaseDeployTransactionFilter();
|
|
6056
|
+
while (reader.pos < end) {
|
|
6057
|
+
const tag = reader.uint32();
|
|
6058
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6059
|
+
break;
|
|
6060
|
+
}
|
|
6061
|
+
reader.skipType(tag & 7);
|
|
6062
|
+
}
|
|
6063
|
+
return message;
|
|
6064
|
+
},
|
|
6065
|
+
fromJSON(_) {
|
|
6066
|
+
return {};
|
|
6067
|
+
},
|
|
6068
|
+
toJSON(_) {
|
|
6069
|
+
const obj = {};
|
|
6070
|
+
return obj;
|
|
6071
|
+
},
|
|
6072
|
+
create(base) {
|
|
6073
|
+
return DeployTransactionFilter$1.fromPartial(base ?? {});
|
|
6074
|
+
},
|
|
6075
|
+
fromPartial(_) {
|
|
6076
|
+
const message = createBaseDeployTransactionFilter();
|
|
6077
|
+
return message;
|
|
6078
|
+
}
|
|
6079
|
+
};
|
|
6080
|
+
function createBaseDeclareV0TransactionFilter() {
|
|
6081
|
+
return {};
|
|
6082
|
+
}
|
|
6083
|
+
const DeclareV0TransactionFilter$1 = {
|
|
6084
|
+
encode(_, writer = _m0__default.Writer.create()) {
|
|
6085
|
+
return writer;
|
|
6086
|
+
},
|
|
6087
|
+
decode(input, length) {
|
|
6088
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
6089
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
6090
|
+
const message = createBaseDeclareV0TransactionFilter();
|
|
6091
|
+
while (reader.pos < end) {
|
|
6092
|
+
const tag = reader.uint32();
|
|
6093
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6094
|
+
break;
|
|
6095
|
+
}
|
|
6096
|
+
reader.skipType(tag & 7);
|
|
6097
|
+
}
|
|
6098
|
+
return message;
|
|
6099
|
+
},
|
|
6100
|
+
fromJSON(_) {
|
|
6101
|
+
return {};
|
|
6102
|
+
},
|
|
6103
|
+
toJSON(_) {
|
|
6104
|
+
const obj = {};
|
|
6105
|
+
return obj;
|
|
6106
|
+
},
|
|
6107
|
+
create(base) {
|
|
6108
|
+
return DeclareV0TransactionFilter$1.fromPartial(base ?? {});
|
|
6109
|
+
},
|
|
6110
|
+
fromPartial(_) {
|
|
6111
|
+
const message = createBaseDeclareV0TransactionFilter();
|
|
6112
|
+
return message;
|
|
6113
|
+
}
|
|
6114
|
+
};
|
|
6115
|
+
function createBaseDeclareV1TransactionFilter() {
|
|
6116
|
+
return {};
|
|
6117
|
+
}
|
|
6118
|
+
const DeclareV1TransactionFilter$1 = {
|
|
6119
|
+
encode(_, writer = _m0__default.Writer.create()) {
|
|
6120
|
+
return writer;
|
|
6121
|
+
},
|
|
6122
|
+
decode(input, length) {
|
|
6123
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
6124
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
6125
|
+
const message = createBaseDeclareV1TransactionFilter();
|
|
6126
|
+
while (reader.pos < end) {
|
|
6127
|
+
const tag = reader.uint32();
|
|
6128
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6129
|
+
break;
|
|
6130
|
+
}
|
|
6131
|
+
reader.skipType(tag & 7);
|
|
6132
|
+
}
|
|
6133
|
+
return message;
|
|
6134
|
+
},
|
|
6135
|
+
fromJSON(_) {
|
|
6136
|
+
return {};
|
|
6137
|
+
},
|
|
6138
|
+
toJSON(_) {
|
|
6139
|
+
const obj = {};
|
|
6140
|
+
return obj;
|
|
6141
|
+
},
|
|
6142
|
+
create(base) {
|
|
6143
|
+
return DeclareV1TransactionFilter$1.fromPartial(base ?? {});
|
|
6144
|
+
},
|
|
6145
|
+
fromPartial(_) {
|
|
6146
|
+
const message = createBaseDeclareV1TransactionFilter();
|
|
6147
|
+
return message;
|
|
6148
|
+
}
|
|
6149
|
+
};
|
|
6150
|
+
function createBaseDeclareV2TransactionFilter() {
|
|
6151
|
+
return {};
|
|
6152
|
+
}
|
|
6153
|
+
const DeclareV2TransactionFilter$1 = {
|
|
6154
|
+
encode(_, writer = _m0__default.Writer.create()) {
|
|
6155
|
+
return writer;
|
|
6156
|
+
},
|
|
6157
|
+
decode(input, length) {
|
|
6158
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
6159
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
6160
|
+
const message = createBaseDeclareV2TransactionFilter();
|
|
6161
|
+
while (reader.pos < end) {
|
|
6162
|
+
const tag = reader.uint32();
|
|
6163
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
6164
|
+
break;
|
|
6165
|
+
}
|
|
6166
|
+
reader.skipType(tag & 7);
|
|
6167
|
+
}
|
|
6168
|
+
return message;
|
|
6169
|
+
},
|
|
6170
|
+
fromJSON(_) {
|
|
6171
|
+
return {};
|
|
6172
|
+
},
|
|
6173
|
+
toJSON(_) {
|
|
6174
|
+
const obj = {};
|
|
6175
|
+
return obj;
|
|
6176
|
+
},
|
|
6177
|
+
create(base) {
|
|
6178
|
+
return DeclareV2TransactionFilter$1.fromPartial(base ?? {});
|
|
6179
|
+
},
|
|
6180
|
+
fromPartial(_) {
|
|
6181
|
+
const message = createBaseDeclareV2TransactionFilter();
|
|
6182
|
+
return message;
|
|
6183
|
+
}
|
|
6184
|
+
};
|
|
6185
|
+
function createBaseDeclareV3TransactionFilter() {
|
|
6186
|
+
return {};
|
|
6187
|
+
}
|
|
6188
|
+
const DeclareV3TransactionFilter$1 = {
|
|
6189
|
+
encode(_, writer = _m0__default.Writer.create()) {
|
|
6190
|
+
return writer;
|
|
6191
|
+
},
|
|
6192
|
+
decode(input, length) {
|
|
6193
|
+
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
6194
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
6195
|
+
const message = createBaseDeclareV3TransactionFilter();
|
|
5302
6196
|
while (reader.pos < end) {
|
|
5303
6197
|
const tag = reader.uint32();
|
|
5304
6198
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -5316,24 +6210,24 @@ const InvokeTransactionV1Filter$1 = {
|
|
|
5316
6210
|
return obj;
|
|
5317
6211
|
},
|
|
5318
6212
|
create(base) {
|
|
5319
|
-
return
|
|
6213
|
+
return DeclareV3TransactionFilter$1.fromPartial(base ?? {});
|
|
5320
6214
|
},
|
|
5321
6215
|
fromPartial(_) {
|
|
5322
|
-
const message =
|
|
6216
|
+
const message = createBaseDeclareV3TransactionFilter();
|
|
5323
6217
|
return message;
|
|
5324
6218
|
}
|
|
5325
6219
|
};
|
|
5326
|
-
function
|
|
6220
|
+
function createBaseL1HandlerTransactionFilter() {
|
|
5327
6221
|
return {};
|
|
5328
6222
|
}
|
|
5329
|
-
const
|
|
6223
|
+
const L1HandlerTransactionFilter$1 = {
|
|
5330
6224
|
encode(_, writer = _m0__default.Writer.create()) {
|
|
5331
6225
|
return writer;
|
|
5332
6226
|
},
|
|
5333
6227
|
decode(input, length) {
|
|
5334
6228
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5335
6229
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5336
|
-
const message =
|
|
6230
|
+
const message = createBaseL1HandlerTransactionFilter();
|
|
5337
6231
|
while (reader.pos < end) {
|
|
5338
6232
|
const tag = reader.uint32();
|
|
5339
6233
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -5351,24 +6245,24 @@ const InvokeTransactionV3Filter$1 = {
|
|
|
5351
6245
|
return obj;
|
|
5352
6246
|
},
|
|
5353
6247
|
create(base) {
|
|
5354
|
-
return
|
|
6248
|
+
return L1HandlerTransactionFilter$1.fromPartial(base ?? {});
|
|
5355
6249
|
},
|
|
5356
6250
|
fromPartial(_) {
|
|
5357
|
-
const message =
|
|
6251
|
+
const message = createBaseL1HandlerTransactionFilter();
|
|
5358
6252
|
return message;
|
|
5359
6253
|
}
|
|
5360
6254
|
};
|
|
5361
|
-
function
|
|
6255
|
+
function createBaseDeployAccountV1TransactionFilter() {
|
|
5362
6256
|
return {};
|
|
5363
6257
|
}
|
|
5364
|
-
const
|
|
6258
|
+
const DeployAccountV1TransactionFilter$1 = {
|
|
5365
6259
|
encode(_, writer = _m0__default.Writer.create()) {
|
|
5366
6260
|
return writer;
|
|
5367
6261
|
},
|
|
5368
6262
|
decode(input, length) {
|
|
5369
6263
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5370
6264
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5371
|
-
const message =
|
|
6265
|
+
const message = createBaseDeployAccountV1TransactionFilter();
|
|
5372
6266
|
while (reader.pos < end) {
|
|
5373
6267
|
const tag = reader.uint32();
|
|
5374
6268
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -5386,24 +6280,24 @@ const DeployTransactionFilter$1 = {
|
|
|
5386
6280
|
return obj;
|
|
5387
6281
|
},
|
|
5388
6282
|
create(base) {
|
|
5389
|
-
return
|
|
6283
|
+
return DeployAccountV1TransactionFilter$1.fromPartial(base ?? {});
|
|
5390
6284
|
},
|
|
5391
6285
|
fromPartial(_) {
|
|
5392
|
-
const message =
|
|
6286
|
+
const message = createBaseDeployAccountV1TransactionFilter();
|
|
5393
6287
|
return message;
|
|
5394
6288
|
}
|
|
5395
6289
|
};
|
|
5396
|
-
function
|
|
6290
|
+
function createBaseDeployAccountV3TransactionFilter() {
|
|
5397
6291
|
return {};
|
|
5398
6292
|
}
|
|
5399
|
-
const
|
|
6293
|
+
const DeployAccountV3TransactionFilter$1 = {
|
|
5400
6294
|
encode(_, writer = _m0__default.Writer.create()) {
|
|
5401
6295
|
return writer;
|
|
5402
6296
|
},
|
|
5403
6297
|
decode(input, length) {
|
|
5404
6298
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5405
6299
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5406
|
-
const message =
|
|
6300
|
+
const message = createBaseDeployAccountV3TransactionFilter();
|
|
5407
6301
|
while (reader.pos < end) {
|
|
5408
6302
|
const tag = reader.uint32();
|
|
5409
6303
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -5421,26 +6315,46 @@ const DeclareV0TransactionFilter$1 = {
|
|
|
5421
6315
|
return obj;
|
|
5422
6316
|
},
|
|
5423
6317
|
create(base) {
|
|
5424
|
-
return
|
|
6318
|
+
return DeployAccountV3TransactionFilter$1.fromPartial(base ?? {});
|
|
5425
6319
|
},
|
|
5426
6320
|
fromPartial(_) {
|
|
5427
|
-
const message =
|
|
6321
|
+
const message = createBaseDeployAccountV3TransactionFilter();
|
|
5428
6322
|
return message;
|
|
5429
6323
|
}
|
|
5430
6324
|
};
|
|
5431
|
-
function
|
|
5432
|
-
return {};
|
|
6325
|
+
function createBaseStorageDiffFilter() {
|
|
6326
|
+
return { id: 0, contractAddress: void 0 };
|
|
5433
6327
|
}
|
|
5434
|
-
const
|
|
5435
|
-
encode(
|
|
6328
|
+
const StorageDiffFilter$1 = {
|
|
6329
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
6330
|
+
if (message.id !== void 0 && message.id !== 0) {
|
|
6331
|
+
writer.uint32(8).uint32(message.id);
|
|
6332
|
+
}
|
|
6333
|
+
if (message.contractAddress !== void 0) {
|
|
6334
|
+
FieldElement.encode(message.contractAddress, writer.uint32(18).fork()).ldelim();
|
|
6335
|
+
}
|
|
5436
6336
|
return writer;
|
|
5437
6337
|
},
|
|
5438
6338
|
decode(input, length) {
|
|
5439
6339
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5440
6340
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5441
|
-
const message =
|
|
6341
|
+
const message = createBaseStorageDiffFilter();
|
|
5442
6342
|
while (reader.pos < end) {
|
|
5443
6343
|
const tag = reader.uint32();
|
|
6344
|
+
switch (tag >>> 3) {
|
|
6345
|
+
case 1:
|
|
6346
|
+
if (tag !== 8) {
|
|
6347
|
+
break;
|
|
6348
|
+
}
|
|
6349
|
+
message.id = reader.uint32();
|
|
6350
|
+
continue;
|
|
6351
|
+
case 2:
|
|
6352
|
+
if (tag !== 18) {
|
|
6353
|
+
break;
|
|
6354
|
+
}
|
|
6355
|
+
message.contractAddress = FieldElement.decode(reader, reader.uint32());
|
|
6356
|
+
continue;
|
|
6357
|
+
}
|
|
5444
6358
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5445
6359
|
break;
|
|
5446
6360
|
}
|
|
@@ -5448,34 +6362,94 @@ const DeclareV1TransactionFilter$1 = {
|
|
|
5448
6362
|
}
|
|
5449
6363
|
return message;
|
|
5450
6364
|
},
|
|
5451
|
-
fromJSON(
|
|
5452
|
-
return {
|
|
6365
|
+
fromJSON(object) {
|
|
6366
|
+
return {
|
|
6367
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
6368
|
+
contractAddress: isSet(object.contractAddress) ? FieldElement.fromJSON(object.contractAddress) : void 0
|
|
6369
|
+
};
|
|
5453
6370
|
},
|
|
5454
|
-
toJSON(
|
|
6371
|
+
toJSON(message) {
|
|
5455
6372
|
const obj = {};
|
|
6373
|
+
if (message.id !== void 0 && message.id !== 0) {
|
|
6374
|
+
obj.id = Math.round(message.id);
|
|
6375
|
+
}
|
|
6376
|
+
if (message.contractAddress !== void 0) {
|
|
6377
|
+
obj.contractAddress = FieldElement.toJSON(message.contractAddress);
|
|
6378
|
+
}
|
|
5456
6379
|
return obj;
|
|
5457
6380
|
},
|
|
5458
6381
|
create(base) {
|
|
5459
|
-
return
|
|
6382
|
+
return StorageDiffFilter$1.fromPartial(base ?? {});
|
|
5460
6383
|
},
|
|
5461
|
-
fromPartial(
|
|
5462
|
-
const message =
|
|
6384
|
+
fromPartial(object) {
|
|
6385
|
+
const message = createBaseStorageDiffFilter();
|
|
6386
|
+
message.id = object.id ?? 0;
|
|
6387
|
+
message.contractAddress = object.contractAddress !== void 0 && object.contractAddress !== null ? FieldElement.fromPartial(object.contractAddress) : void 0;
|
|
5463
6388
|
return message;
|
|
5464
6389
|
}
|
|
5465
6390
|
};
|
|
5466
|
-
function
|
|
5467
|
-
return {};
|
|
6391
|
+
function createBaseContractChangeFilter() {
|
|
6392
|
+
return { id: 0, change: void 0 };
|
|
5468
6393
|
}
|
|
5469
|
-
const
|
|
5470
|
-
encode(
|
|
6394
|
+
const ContractChangeFilter$1 = {
|
|
6395
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
6396
|
+
if (message.id !== void 0 && message.id !== 0) {
|
|
6397
|
+
writer.uint32(8).uint32(message.id);
|
|
6398
|
+
}
|
|
6399
|
+
switch (message.change?.$case) {
|
|
6400
|
+
case "declaredClass":
|
|
6401
|
+
DeclaredClassFilter$1.encode(message.change.declaredClass, writer.uint32(18).fork()).ldelim();
|
|
6402
|
+
break;
|
|
6403
|
+
case "replacedClass":
|
|
6404
|
+
ReplacedClassFilter$1.encode(message.change.replacedClass, writer.uint32(26).fork()).ldelim();
|
|
6405
|
+
break;
|
|
6406
|
+
case "deployedContract":
|
|
6407
|
+
DeployedContractFilter$1.encode(message.change.deployedContract, writer.uint32(34).fork()).ldelim();
|
|
6408
|
+
break;
|
|
6409
|
+
}
|
|
5471
6410
|
return writer;
|
|
5472
6411
|
},
|
|
5473
6412
|
decode(input, length) {
|
|
5474
6413
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5475
6414
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5476
|
-
const message =
|
|
6415
|
+
const message = createBaseContractChangeFilter();
|
|
5477
6416
|
while (reader.pos < end) {
|
|
5478
6417
|
const tag = reader.uint32();
|
|
6418
|
+
switch (tag >>> 3) {
|
|
6419
|
+
case 1:
|
|
6420
|
+
if (tag !== 8) {
|
|
6421
|
+
break;
|
|
6422
|
+
}
|
|
6423
|
+
message.id = reader.uint32();
|
|
6424
|
+
continue;
|
|
6425
|
+
case 2:
|
|
6426
|
+
if (tag !== 18) {
|
|
6427
|
+
break;
|
|
6428
|
+
}
|
|
6429
|
+
message.change = {
|
|
6430
|
+
$case: "declaredClass",
|
|
6431
|
+
declaredClass: DeclaredClassFilter$1.decode(reader, reader.uint32())
|
|
6432
|
+
};
|
|
6433
|
+
continue;
|
|
6434
|
+
case 3:
|
|
6435
|
+
if (tag !== 26) {
|
|
6436
|
+
break;
|
|
6437
|
+
}
|
|
6438
|
+
message.change = {
|
|
6439
|
+
$case: "replacedClass",
|
|
6440
|
+
replacedClass: ReplacedClassFilter$1.decode(reader, reader.uint32())
|
|
6441
|
+
};
|
|
6442
|
+
continue;
|
|
6443
|
+
case 4:
|
|
6444
|
+
if (tag !== 34) {
|
|
6445
|
+
break;
|
|
6446
|
+
}
|
|
6447
|
+
message.change = {
|
|
6448
|
+
$case: "deployedContract",
|
|
6449
|
+
deployedContract: DeployedContractFilter$1.decode(reader, reader.uint32())
|
|
6450
|
+
};
|
|
6451
|
+
continue;
|
|
6452
|
+
}
|
|
5479
6453
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5480
6454
|
break;
|
|
5481
6455
|
}
|
|
@@ -5483,32 +6457,66 @@ const DeclareV2TransactionFilter$1 = {
|
|
|
5483
6457
|
}
|
|
5484
6458
|
return message;
|
|
5485
6459
|
},
|
|
5486
|
-
fromJSON(
|
|
5487
|
-
return {
|
|
6460
|
+
fromJSON(object) {
|
|
6461
|
+
return {
|
|
6462
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
6463
|
+
change: isSet(object.declaredClass) ? { $case: "declaredClass", declaredClass: DeclaredClassFilter$1.fromJSON(object.declaredClass) } : isSet(object.replacedClass) ? { $case: "replacedClass", replacedClass: ReplacedClassFilter$1.fromJSON(object.replacedClass) } : isSet(object.deployedContract) ? { $case: "deployedContract", deployedContract: DeployedContractFilter$1.fromJSON(object.deployedContract) } : void 0
|
|
6464
|
+
};
|
|
5488
6465
|
},
|
|
5489
|
-
toJSON(
|
|
6466
|
+
toJSON(message) {
|
|
5490
6467
|
const obj = {};
|
|
6468
|
+
if (message.id !== void 0 && message.id !== 0) {
|
|
6469
|
+
obj.id = Math.round(message.id);
|
|
6470
|
+
}
|
|
6471
|
+
if (message.change?.$case === "declaredClass") {
|
|
6472
|
+
obj.declaredClass = DeclaredClassFilter$1.toJSON(message.change.declaredClass);
|
|
6473
|
+
}
|
|
6474
|
+
if (message.change?.$case === "replacedClass") {
|
|
6475
|
+
obj.replacedClass = ReplacedClassFilter$1.toJSON(message.change.replacedClass);
|
|
6476
|
+
}
|
|
6477
|
+
if (message.change?.$case === "deployedContract") {
|
|
6478
|
+
obj.deployedContract = DeployedContractFilter$1.toJSON(message.change.deployedContract);
|
|
6479
|
+
}
|
|
5491
6480
|
return obj;
|
|
5492
6481
|
},
|
|
5493
6482
|
create(base) {
|
|
5494
|
-
return
|
|
6483
|
+
return ContractChangeFilter$1.fromPartial(base ?? {});
|
|
5495
6484
|
},
|
|
5496
|
-
fromPartial(
|
|
5497
|
-
const message =
|
|
6485
|
+
fromPartial(object) {
|
|
6486
|
+
const message = createBaseContractChangeFilter();
|
|
6487
|
+
message.id = object.id ?? 0;
|
|
6488
|
+
if (object.change?.$case === "declaredClass" && object.change?.declaredClass !== void 0 && object.change?.declaredClass !== null) {
|
|
6489
|
+
message.change = {
|
|
6490
|
+
$case: "declaredClass",
|
|
6491
|
+
declaredClass: DeclaredClassFilter$1.fromPartial(object.change.declaredClass)
|
|
6492
|
+
};
|
|
6493
|
+
}
|
|
6494
|
+
if (object.change?.$case === "replacedClass" && object.change?.replacedClass !== void 0 && object.change?.replacedClass !== null) {
|
|
6495
|
+
message.change = {
|
|
6496
|
+
$case: "replacedClass",
|
|
6497
|
+
replacedClass: ReplacedClassFilter$1.fromPartial(object.change.replacedClass)
|
|
6498
|
+
};
|
|
6499
|
+
}
|
|
6500
|
+
if (object.change?.$case === "deployedContract" && object.change?.deployedContract !== void 0 && object.change?.deployedContract !== null) {
|
|
6501
|
+
message.change = {
|
|
6502
|
+
$case: "deployedContract",
|
|
6503
|
+
deployedContract: DeployedContractFilter$1.fromPartial(object.change.deployedContract)
|
|
6504
|
+
};
|
|
6505
|
+
}
|
|
5498
6506
|
return message;
|
|
5499
6507
|
}
|
|
5500
6508
|
};
|
|
5501
|
-
function
|
|
6509
|
+
function createBaseDeclaredClassFilter() {
|
|
5502
6510
|
return {};
|
|
5503
6511
|
}
|
|
5504
|
-
const
|
|
6512
|
+
const DeclaredClassFilter$1 = {
|
|
5505
6513
|
encode(_, writer = _m0__default.Writer.create()) {
|
|
5506
6514
|
return writer;
|
|
5507
6515
|
},
|
|
5508
6516
|
decode(input, length) {
|
|
5509
6517
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5510
6518
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5511
|
-
const message =
|
|
6519
|
+
const message = createBaseDeclaredClassFilter();
|
|
5512
6520
|
while (reader.pos < end) {
|
|
5513
6521
|
const tag = reader.uint32();
|
|
5514
6522
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -5526,24 +6534,24 @@ const DeclareV3TransactionFilter$1 = {
|
|
|
5526
6534
|
return obj;
|
|
5527
6535
|
},
|
|
5528
6536
|
create(base) {
|
|
5529
|
-
return
|
|
6537
|
+
return DeclaredClassFilter$1.fromPartial(base ?? {});
|
|
5530
6538
|
},
|
|
5531
6539
|
fromPartial(_) {
|
|
5532
|
-
const message =
|
|
6540
|
+
const message = createBaseDeclaredClassFilter();
|
|
5533
6541
|
return message;
|
|
5534
6542
|
}
|
|
5535
6543
|
};
|
|
5536
|
-
function
|
|
6544
|
+
function createBaseReplacedClassFilter() {
|
|
5537
6545
|
return {};
|
|
5538
6546
|
}
|
|
5539
|
-
const
|
|
6547
|
+
const ReplacedClassFilter$1 = {
|
|
5540
6548
|
encode(_, writer = _m0__default.Writer.create()) {
|
|
5541
6549
|
return writer;
|
|
5542
6550
|
},
|
|
5543
6551
|
decode(input, length) {
|
|
5544
6552
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5545
6553
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5546
|
-
const message =
|
|
6554
|
+
const message = createBaseReplacedClassFilter();
|
|
5547
6555
|
while (reader.pos < end) {
|
|
5548
6556
|
const tag = reader.uint32();
|
|
5549
6557
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -5561,24 +6569,24 @@ const L1HandlerTransactionFilter$1 = {
|
|
|
5561
6569
|
return obj;
|
|
5562
6570
|
},
|
|
5563
6571
|
create(base) {
|
|
5564
|
-
return
|
|
6572
|
+
return ReplacedClassFilter$1.fromPartial(base ?? {});
|
|
5565
6573
|
},
|
|
5566
6574
|
fromPartial(_) {
|
|
5567
|
-
const message =
|
|
6575
|
+
const message = createBaseReplacedClassFilter();
|
|
5568
6576
|
return message;
|
|
5569
6577
|
}
|
|
5570
6578
|
};
|
|
5571
|
-
function
|
|
6579
|
+
function createBaseDeployedContractFilter() {
|
|
5572
6580
|
return {};
|
|
5573
6581
|
}
|
|
5574
|
-
const
|
|
6582
|
+
const DeployedContractFilter$1 = {
|
|
5575
6583
|
encode(_, writer = _m0__default.Writer.create()) {
|
|
5576
6584
|
return writer;
|
|
5577
6585
|
},
|
|
5578
6586
|
decode(input, length) {
|
|
5579
6587
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5580
6588
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5581
|
-
const message =
|
|
6589
|
+
const message = createBaseDeployedContractFilter();
|
|
5582
6590
|
while (reader.pos < end) {
|
|
5583
6591
|
const tag = reader.uint32();
|
|
5584
6592
|
if ((tag & 7) === 4 || tag === 0) {
|
|
@@ -5596,26 +6604,46 @@ const DeployAccountV1TransactionFilter$1 = {
|
|
|
5596
6604
|
return obj;
|
|
5597
6605
|
},
|
|
5598
6606
|
create(base) {
|
|
5599
|
-
return
|
|
6607
|
+
return DeployedContractFilter$1.fromPartial(base ?? {});
|
|
5600
6608
|
},
|
|
5601
6609
|
fromPartial(_) {
|
|
5602
|
-
const message =
|
|
6610
|
+
const message = createBaseDeployedContractFilter();
|
|
5603
6611
|
return message;
|
|
5604
6612
|
}
|
|
5605
6613
|
};
|
|
5606
|
-
function
|
|
5607
|
-
return {};
|
|
6614
|
+
function createBaseNonceUpdateFilter() {
|
|
6615
|
+
return { id: 0, contractAddress: void 0 };
|
|
5608
6616
|
}
|
|
5609
|
-
const
|
|
5610
|
-
encode(
|
|
6617
|
+
const NonceUpdateFilter$1 = {
|
|
6618
|
+
encode(message, writer = _m0__default.Writer.create()) {
|
|
6619
|
+
if (message.id !== void 0 && message.id !== 0) {
|
|
6620
|
+
writer.uint32(8).uint32(message.id);
|
|
6621
|
+
}
|
|
6622
|
+
if (message.contractAddress !== void 0) {
|
|
6623
|
+
FieldElement.encode(message.contractAddress, writer.uint32(18).fork()).ldelim();
|
|
6624
|
+
}
|
|
5611
6625
|
return writer;
|
|
5612
6626
|
},
|
|
5613
6627
|
decode(input, length) {
|
|
5614
6628
|
const reader = input instanceof _m0__default.Reader ? input : _m0__default.Reader.create(input);
|
|
5615
6629
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
|
5616
|
-
const message =
|
|
6630
|
+
const message = createBaseNonceUpdateFilter();
|
|
5617
6631
|
while (reader.pos < end) {
|
|
5618
6632
|
const tag = reader.uint32();
|
|
6633
|
+
switch (tag >>> 3) {
|
|
6634
|
+
case 1:
|
|
6635
|
+
if (tag !== 8) {
|
|
6636
|
+
break;
|
|
6637
|
+
}
|
|
6638
|
+
message.id = reader.uint32();
|
|
6639
|
+
continue;
|
|
6640
|
+
case 2:
|
|
6641
|
+
if (tag !== 18) {
|
|
6642
|
+
break;
|
|
6643
|
+
}
|
|
6644
|
+
message.contractAddress = FieldElement.decode(reader, reader.uint32());
|
|
6645
|
+
continue;
|
|
6646
|
+
}
|
|
5619
6647
|
if ((tag & 7) === 4 || tag === 0) {
|
|
5620
6648
|
break;
|
|
5621
6649
|
}
|
|
@@ -5623,18 +6651,29 @@ const DeployAccountV3TransactionFilter$1 = {
|
|
|
5623
6651
|
}
|
|
5624
6652
|
return message;
|
|
5625
6653
|
},
|
|
5626
|
-
fromJSON(
|
|
5627
|
-
return {
|
|
6654
|
+
fromJSON(object) {
|
|
6655
|
+
return {
|
|
6656
|
+
id: isSet(object.id) ? globalThis.Number(object.id) : 0,
|
|
6657
|
+
contractAddress: isSet(object.contractAddress) ? FieldElement.fromJSON(object.contractAddress) : void 0
|
|
6658
|
+
};
|
|
5628
6659
|
},
|
|
5629
|
-
toJSON(
|
|
6660
|
+
toJSON(message) {
|
|
5630
6661
|
const obj = {};
|
|
6662
|
+
if (message.id !== void 0 && message.id !== 0) {
|
|
6663
|
+
obj.id = Math.round(message.id);
|
|
6664
|
+
}
|
|
6665
|
+
if (message.contractAddress !== void 0) {
|
|
6666
|
+
obj.contractAddress = FieldElement.toJSON(message.contractAddress);
|
|
6667
|
+
}
|
|
5631
6668
|
return obj;
|
|
5632
6669
|
},
|
|
5633
6670
|
create(base) {
|
|
5634
|
-
return
|
|
6671
|
+
return NonceUpdateFilter$1.fromPartial(base ?? {});
|
|
5635
6672
|
},
|
|
5636
|
-
fromPartial(
|
|
5637
|
-
const message =
|
|
6673
|
+
fromPartial(object) {
|
|
6674
|
+
const message = createBaseNonceUpdateFilter();
|
|
6675
|
+
message.id = object.id ?? 0;
|
|
6676
|
+
message.contractAddress = object.contractAddress !== void 0 && object.contractAddress !== null ? FieldElement.fromPartial(object.contractAddress) : void 0;
|
|
5638
6677
|
return message;
|
|
5639
6678
|
}
|
|
5640
6679
|
};
|
|
@@ -5644,13 +6683,16 @@ function isSet(value) {
|
|
|
5644
6683
|
|
|
5645
6684
|
const filter = {
|
|
5646
6685
|
__proto__: null,
|
|
6686
|
+
ContractChangeFilter: ContractChangeFilter$1,
|
|
5647
6687
|
DeclareV0TransactionFilter: DeclareV0TransactionFilter$1,
|
|
5648
6688
|
DeclareV1TransactionFilter: DeclareV1TransactionFilter$1,
|
|
5649
6689
|
DeclareV2TransactionFilter: DeclareV2TransactionFilter$1,
|
|
5650
6690
|
DeclareV3TransactionFilter: DeclareV3TransactionFilter$1,
|
|
6691
|
+
DeclaredClassFilter: DeclaredClassFilter$1,
|
|
5651
6692
|
DeployAccountV1TransactionFilter: DeployAccountV1TransactionFilter$1,
|
|
5652
6693
|
DeployAccountV3TransactionFilter: DeployAccountV3TransactionFilter$1,
|
|
5653
6694
|
DeployTransactionFilter: DeployTransactionFilter$1,
|
|
6695
|
+
DeployedContractFilter: DeployedContractFilter$1,
|
|
5654
6696
|
EventFilter: EventFilter$1,
|
|
5655
6697
|
Filter: Filter$1,
|
|
5656
6698
|
HeaderFilter: HeaderFilter$1,
|
|
@@ -5660,8 +6702,13 @@ const filter = {
|
|
|
5660
6702
|
Key: Key$1,
|
|
5661
6703
|
L1HandlerTransactionFilter: L1HandlerTransactionFilter$1,
|
|
5662
6704
|
MessageToL1Filter: MessageToL1Filter$1,
|
|
6705
|
+
NonceUpdateFilter: NonceUpdateFilter$1,
|
|
6706
|
+
ReplacedClassFilter: ReplacedClassFilter$1,
|
|
6707
|
+
StorageDiffFilter: StorageDiffFilter$1,
|
|
5663
6708
|
TransactionFilter: TransactionFilter$1,
|
|
5664
6709
|
TransactionStatusFilter: TransactionStatusFilter$1,
|
|
6710
|
+
headerFilterFromJSON: headerFilterFromJSON,
|
|
6711
|
+
headerFilterToJSON: headerFilterToJSON,
|
|
5665
6712
|
protobufPackage: protobufPackage,
|
|
5666
6713
|
transactionStatusFilterFromJSON: transactionStatusFilterFromJSON,
|
|
5667
6714
|
transactionStatusFilterToJSON: transactionStatusFilterToJSON
|
|
@@ -6037,12 +7084,56 @@ const MessageToL1 = schema.Schema.Struct({
|
|
|
6037
7084
|
transactionHash: schema.Schema.optional(FieldElement$1),
|
|
6038
7085
|
transactionStatus: schema.Schema.optional(TransactionStatus)
|
|
6039
7086
|
});
|
|
7087
|
+
const StorageEntry = schema.Schema.Struct({
|
|
7088
|
+
key: schema.Schema.optional(FieldElement$1),
|
|
7089
|
+
value: schema.Schema.optional(FieldElement$1)
|
|
7090
|
+
});
|
|
7091
|
+
const StorageDiff = schema.Schema.Struct({
|
|
7092
|
+
filterIds: schema.Schema.optional(schema.Schema.Array(schema.Schema.Number)),
|
|
7093
|
+
contractAddress: schema.Schema.optional(FieldElement$1),
|
|
7094
|
+
storageEntries: schema.Schema.optional(schema.Schema.Array(StorageEntry))
|
|
7095
|
+
});
|
|
7096
|
+
const DeclaredClass = schema.Schema.Struct({
|
|
7097
|
+
_tag: tag("declaredClass"),
|
|
7098
|
+
declaredClass: schema.Schema.Struct({
|
|
7099
|
+
classHash: schema.Schema.optional(FieldElement$1),
|
|
7100
|
+
compiledClassHash: schema.Schema.optional(FieldElement$1)
|
|
7101
|
+
})
|
|
7102
|
+
});
|
|
7103
|
+
const ReplacedClass = schema.Schema.Struct({
|
|
7104
|
+
_tag: tag("replacedClass"),
|
|
7105
|
+
replacedClass: schema.Schema.Struct({
|
|
7106
|
+
contractAddress: schema.Schema.optional(FieldElement$1),
|
|
7107
|
+
classHash: schema.Schema.optional(FieldElement$1)
|
|
7108
|
+
})
|
|
7109
|
+
});
|
|
7110
|
+
const DeployedContract = schema.Schema.Struct({
|
|
7111
|
+
_tag: tag("deployedContract"),
|
|
7112
|
+
deployedContract: schema.Schema.Struct({
|
|
7113
|
+
contractAddress: schema.Schema.optional(FieldElement$1),
|
|
7114
|
+
classHash: schema.Schema.optional(FieldElement$1)
|
|
7115
|
+
})
|
|
7116
|
+
});
|
|
7117
|
+
const ContractChange = schema.Schema.Struct({
|
|
7118
|
+
filterIds: schema.Schema.optional(schema.Schema.Array(schema.Schema.Number)),
|
|
7119
|
+
change: schema.Schema.optional(
|
|
7120
|
+
schema.Schema.Union(DeclaredClass, ReplacedClass, DeployedContract)
|
|
7121
|
+
)
|
|
7122
|
+
});
|
|
7123
|
+
const NonceUpdate = schema.Schema.Struct({
|
|
7124
|
+
filterIds: schema.Schema.optional(schema.Schema.Array(schema.Schema.Number)),
|
|
7125
|
+
contractAddress: schema.Schema.optional(FieldElement$1),
|
|
7126
|
+
nonce: schema.Schema.optional(FieldElement$1)
|
|
7127
|
+
});
|
|
6040
7128
|
const Block = schema.Schema.Struct({
|
|
6041
7129
|
header: schema.Schema.optional(BlockHeader),
|
|
6042
7130
|
transactions: schema.Schema.Array(Transaction),
|
|
6043
7131
|
receipts: schema.Schema.Array(TransactionReceipt),
|
|
6044
7132
|
events: schema.Schema.Array(Event),
|
|
6045
|
-
messages: schema.Schema.Array(MessageToL1)
|
|
7133
|
+
messages: schema.Schema.Array(MessageToL1),
|
|
7134
|
+
storageDiffs: schema.Schema.Array(StorageDiff),
|
|
7135
|
+
contractChanges: schema.Schema.Array(ContractChange),
|
|
7136
|
+
nonceUpdates: schema.Schema.Array(NonceUpdate)
|
|
6046
7137
|
});
|
|
6047
7138
|
const BlockFromBytes = schema.Schema.transform(
|
|
6048
7139
|
schema.Schema.Uint8ArrayFromSelf,
|
|
@@ -6064,9 +7155,34 @@ const BlockFromBytes = schema.Schema.transform(
|
|
|
6064
7155
|
}
|
|
6065
7156
|
);
|
|
6066
7157
|
|
|
6067
|
-
const HeaderFilter = schema.Schema.
|
|
6068
|
-
|
|
6069
|
-
|
|
7158
|
+
const HeaderFilter = schema.Schema.transform(
|
|
7159
|
+
schema.Schema.Enums(HeaderFilter$1),
|
|
7160
|
+
schema.Schema.Literal("always", "on_data", "on_data_or_on_new_block", "unknown"),
|
|
7161
|
+
{
|
|
7162
|
+
decode(value) {
|
|
7163
|
+
const enumMap = {
|
|
7164
|
+
[HeaderFilter$1.ALWAYS]: "always",
|
|
7165
|
+
[HeaderFilter$1.ON_DATA]: "on_data",
|
|
7166
|
+
[HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK]: "on_data_or_on_new_block",
|
|
7167
|
+
[HeaderFilter$1.UNSPECIFIED]: "unknown",
|
|
7168
|
+
[HeaderFilter$1.UNRECOGNIZED]: "unknown"
|
|
7169
|
+
};
|
|
7170
|
+
return enumMap[value] ?? "unknown";
|
|
7171
|
+
},
|
|
7172
|
+
encode(value) {
|
|
7173
|
+
switch (value) {
|
|
7174
|
+
case "always":
|
|
7175
|
+
return HeaderFilter$1.ALWAYS;
|
|
7176
|
+
case "on_data":
|
|
7177
|
+
return HeaderFilter$1.ON_DATA;
|
|
7178
|
+
case "on_data_or_on_new_block":
|
|
7179
|
+
return HeaderFilter$1.ON_DATA_OR_ON_NEW_BLOCK;
|
|
7180
|
+
default:
|
|
7181
|
+
return HeaderFilter$1.UNSPECIFIED;
|
|
7182
|
+
}
|
|
7183
|
+
}
|
|
7184
|
+
}
|
|
7185
|
+
);
|
|
6070
7186
|
const Key = schema.Schema.transform(
|
|
6071
7187
|
schema.Schema.Struct({ value: schema.Schema.UndefinedOr(FieldElementProto) }),
|
|
6072
7188
|
schema.Schema.NullOr(FieldElement$1),
|
|
@@ -6200,11 +7316,44 @@ const TransactionFilter = schema.Schema.Struct({
|
|
|
6200
7316
|
)
|
|
6201
7317
|
)
|
|
6202
7318
|
});
|
|
7319
|
+
const StorageDiffFilter = schema.Schema.Struct({
|
|
7320
|
+
id: schema.Schema.optional(schema.Schema.Number),
|
|
7321
|
+
contractAddress: schema.Schema.optional(FieldElement$1)
|
|
7322
|
+
});
|
|
7323
|
+
const DeclaredClassFilter = schema.Schema.Struct({
|
|
7324
|
+
_tag: tag("declaredClass"),
|
|
7325
|
+
declaredClass: schema.Schema.Struct({})
|
|
7326
|
+
});
|
|
7327
|
+
const ReplacedClassFilter = schema.Schema.Struct({
|
|
7328
|
+
_tag: tag("replacedClass"),
|
|
7329
|
+
replacedClass: schema.Schema.Struct({})
|
|
7330
|
+
});
|
|
7331
|
+
const DeployedContractFilter = schema.Schema.Struct({
|
|
7332
|
+
_tag: tag("deployedContract"),
|
|
7333
|
+
deployedContract: schema.Schema.Struct({})
|
|
7334
|
+
});
|
|
7335
|
+
const ContractChangeFilter = schema.Schema.Struct({
|
|
7336
|
+
id: schema.Schema.optional(schema.Schema.Number),
|
|
7337
|
+
change: schema.Schema.optional(
|
|
7338
|
+
schema.Schema.Union(
|
|
7339
|
+
DeclaredClassFilter,
|
|
7340
|
+
ReplacedClassFilter,
|
|
7341
|
+
DeployedContractFilter
|
|
7342
|
+
)
|
|
7343
|
+
)
|
|
7344
|
+
});
|
|
7345
|
+
const NonceUpdateFilter = schema.Schema.Struct({
|
|
7346
|
+
id: schema.Schema.optional(schema.Schema.Number),
|
|
7347
|
+
contractAddress: schema.Schema.optional(FieldElement$1)
|
|
7348
|
+
});
|
|
6203
7349
|
const Filter = schema.Schema.Struct({
|
|
6204
7350
|
header: schema.Schema.optional(HeaderFilter),
|
|
6205
7351
|
transactions: schema.Schema.optional(schema.Schema.Array(TransactionFilter)),
|
|
6206
7352
|
events: schema.Schema.optional(schema.Schema.Array(EventFilter)),
|
|
6207
|
-
messages: schema.Schema.optional(schema.Schema.Array(MessageToL1Filter))
|
|
7353
|
+
messages: schema.Schema.optional(schema.Schema.Array(MessageToL1Filter)),
|
|
7354
|
+
storageDiffs: schema.Schema.optional(schema.Schema.Array(StorageDiffFilter)),
|
|
7355
|
+
contractChanges: schema.Schema.optional(schema.Schema.Array(ContractChangeFilter)),
|
|
7356
|
+
nonceUpdates: schema.Schema.optional(schema.Schema.Array(NonceUpdateFilter))
|
|
6208
7357
|
});
|
|
6209
7358
|
const filterToProto = schema.Schema.encodeSync(Filter);
|
|
6210
7359
|
const filterFromProto = schema.Schema.decodeSync(Filter);
|
|
@@ -6229,7 +7378,13 @@ function mergeFilter(a, b) {
|
|
|
6229
7378
|
header,
|
|
6230
7379
|
transactions: [...a.transactions ?? [], ...b.transactions ?? []],
|
|
6231
7380
|
events: [...a.events ?? [], ...b.events ?? []],
|
|
6232
|
-
messages: [...a.messages ?? [], ...b.messages ?? []]
|
|
7381
|
+
messages: [...a.messages ?? [], ...b.messages ?? []],
|
|
7382
|
+
storageDiffs: [...a.storageDiffs ?? [], ...b.storageDiffs ?? []],
|
|
7383
|
+
contractChanges: [
|
|
7384
|
+
...a.contractChanges ?? [],
|
|
7385
|
+
...b.contractChanges ?? []
|
|
7386
|
+
],
|
|
7387
|
+
nonceUpdates: [...a.nonceUpdates ?? [], ...b.nonceUpdates ?? []]
|
|
6233
7388
|
};
|
|
6234
7389
|
}
|
|
6235
7390
|
function mergeHeaderFilter(a, b) {
|
|
@@ -6239,9 +7394,13 @@ function mergeHeaderFilter(a, b) {
|
|
|
6239
7394
|
if (b === void 0) {
|
|
6240
7395
|
return a;
|
|
6241
7396
|
}
|
|
6242
|
-
|
|
6243
|
-
|
|
6244
|
-
}
|
|
7397
|
+
if (a === "always" || b === "always") {
|
|
7398
|
+
return "always";
|
|
7399
|
+
}
|
|
7400
|
+
if (a === "on_data_or_on_new_block" || b === "on_data_or_on_new_block") {
|
|
7401
|
+
return "on_data_or_on_new_block";
|
|
7402
|
+
}
|
|
7403
|
+
return "on_data";
|
|
6245
7404
|
}
|
|
6246
7405
|
|
|
6247
7406
|
function getReceipt(transactionIndex, receipts) {
|
|
@@ -6286,6 +7445,8 @@ exports.Block = Block;
|
|
|
6286
7445
|
exports.BlockFromBytes = BlockFromBytes;
|
|
6287
7446
|
exports.BlockHeader = BlockHeader;
|
|
6288
7447
|
exports.ComputationResources = ComputationResources;
|
|
7448
|
+
exports.ContractChange = ContractChange;
|
|
7449
|
+
exports.ContractChangeFilter = ContractChangeFilter;
|
|
6289
7450
|
exports.DataAvailabilityMode = DataAvailabilityMode;
|
|
6290
7451
|
exports.DataAvailabilityResources = DataAvailabilityResources;
|
|
6291
7452
|
exports.DeclareTransactionReceipt = DeclareTransactionReceipt;
|
|
@@ -6297,6 +7458,8 @@ exports.DeclareV0TransactionFilter = DeclareV0TransactionFilter;
|
|
|
6297
7458
|
exports.DeclareV1TransactionFilter = DeclareV1TransactionFilter;
|
|
6298
7459
|
exports.DeclareV2TransactionFilter = DeclareV2TransactionFilter;
|
|
6299
7460
|
exports.DeclareV3TransactionFilter = DeclareV3TransactionFilter;
|
|
7461
|
+
exports.DeclaredClass = DeclaredClass;
|
|
7462
|
+
exports.DeclaredClassFilter = DeclaredClassFilter;
|
|
6300
7463
|
exports.DeployAccountTransactionReceipt = DeployAccountTransactionReceipt;
|
|
6301
7464
|
exports.DeployAccountTransactionV1 = DeployAccountTransactionV1;
|
|
6302
7465
|
exports.DeployAccountTransactionV3 = DeployAccountTransactionV3;
|
|
@@ -6305,6 +7468,8 @@ exports.DeployAccountV3TransactionFilter = DeployAccountV3TransactionFilter;
|
|
|
6305
7468
|
exports.DeployTransaction = DeployTransaction;
|
|
6306
7469
|
exports.DeployTransactionFilter = DeployTransactionFilter;
|
|
6307
7470
|
exports.DeployTransactionReceipt = DeployTransactionReceipt;
|
|
7471
|
+
exports.DeployedContract = DeployedContract;
|
|
7472
|
+
exports.DeployedContractFilter = DeployedContractFilter;
|
|
6308
7473
|
exports.Event = Event;
|
|
6309
7474
|
exports.EventFilter = EventFilter;
|
|
6310
7475
|
exports.ExecutionResources = ExecutionResources;
|
|
@@ -6330,11 +7495,18 @@ exports.L1HandlerTransactionFilter = L1HandlerTransactionFilter;
|
|
|
6330
7495
|
exports.L1HandlerTransactionReceipt = L1HandlerTransactionReceipt;
|
|
6331
7496
|
exports.MessageToL1 = MessageToL1;
|
|
6332
7497
|
exports.MessageToL1Filter = MessageToL1Filter;
|
|
7498
|
+
exports.NonceUpdate = NonceUpdate;
|
|
7499
|
+
exports.NonceUpdateFilter = NonceUpdateFilter;
|
|
6333
7500
|
exports.PriceUnit = PriceUnit;
|
|
7501
|
+
exports.ReplacedClass = ReplacedClass;
|
|
7502
|
+
exports.ReplacedClassFilter = ReplacedClassFilter;
|
|
6334
7503
|
exports.ResourceBounds = ResourceBounds;
|
|
6335
7504
|
exports.ResourceBoundsMapping = ResourceBoundsMapping;
|
|
6336
7505
|
exports.ResourcePrice = ResourcePrice;
|
|
6337
7506
|
exports.StarknetStream = StarknetStream;
|
|
7507
|
+
exports.StorageDiff = StorageDiff;
|
|
7508
|
+
exports.StorageDiffFilter = StorageDiffFilter;
|
|
7509
|
+
exports.StorageEntry = StorageEntry;
|
|
6338
7510
|
exports.Transaction = Transaction;
|
|
6339
7511
|
exports.TransactionFilter = TransactionFilter;
|
|
6340
7512
|
exports.TransactionMeta = TransactionMeta;
|