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