@sentio/runtime 2.3.1 → 2.3.2-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -311,11 +311,15 @@ export interface Data_SuiEvent {
311
311
  transaction: {
312
312
  [key: string]: any;
313
313
  } | undefined;
314
+ timestamp: Date | undefined;
315
+ slot: bigint;
314
316
  }
315
317
  export interface Data_SuiCall {
316
318
  transaction: {
317
319
  [key: string]: any;
318
320
  } | undefined;
321
+ timestamp: Date | undefined;
322
+ slot: bigint;
319
323
  }
320
324
  export interface DataBinding {
321
325
  data: Data | undefined;
@@ -3351,13 +3351,19 @@ export const Data_AptResource = {
3351
3351
  },
3352
3352
  };
3353
3353
  function createBaseData_SuiEvent() {
3354
- return { transaction: undefined };
3354
+ return { transaction: undefined, timestamp: undefined, slot: BigInt("0") };
3355
3355
  }
3356
3356
  export const Data_SuiEvent = {
3357
3357
  encode(message, writer = _m0.Writer.create()) {
3358
3358
  if (message.transaction !== undefined) {
3359
3359
  Struct.encode(Struct.wrap(message.transaction), writer.uint32(10).fork()).ldelim();
3360
3360
  }
3361
+ if (message.timestamp !== undefined) {
3362
+ Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(18).fork()).ldelim();
3363
+ }
3364
+ if (message.slot !== BigInt("0")) {
3365
+ writer.uint32(24).uint64(message.slot.toString());
3366
+ }
3361
3367
  return writer;
3362
3368
  },
3363
3369
  decode(input, length) {
@@ -3370,6 +3376,12 @@ export const Data_SuiEvent = {
3370
3376
  case 1:
3371
3377
  message.transaction = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3372
3378
  break;
3379
+ case 2:
3380
+ message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3381
+ break;
3382
+ case 3:
3383
+ message.slot = longToBigint(reader.uint64());
3384
+ break;
3373
3385
  default:
3374
3386
  reader.skipType(tag & 7);
3375
3387
  break;
@@ -3378,11 +3390,17 @@ export const Data_SuiEvent = {
3378
3390
  return message;
3379
3391
  },
3380
3392
  fromJSON(object) {
3381
- return { transaction: isObject(object.transaction) ? object.transaction : undefined };
3393
+ return {
3394
+ transaction: isObject(object.transaction) ? object.transaction : undefined,
3395
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
3396
+ slot: isSet(object.slot) ? BigInt(object.slot) : BigInt("0"),
3397
+ };
3382
3398
  },
3383
3399
  toJSON(message) {
3384
3400
  const obj = {};
3385
3401
  message.transaction !== undefined && (obj.transaction = message.transaction);
3402
+ message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
3403
+ message.slot !== undefined && (obj.slot = message.slot.toString());
3386
3404
  return obj;
3387
3405
  },
3388
3406
  create(base) {
@@ -3391,17 +3409,25 @@ export const Data_SuiEvent = {
3391
3409
  fromPartial(object) {
3392
3410
  const message = createBaseData_SuiEvent();
3393
3411
  message.transaction = object.transaction ?? undefined;
3412
+ message.timestamp = object.timestamp ?? undefined;
3413
+ message.slot = object.slot ?? BigInt("0");
3394
3414
  return message;
3395
3415
  },
3396
3416
  };
3397
3417
  function createBaseData_SuiCall() {
3398
- return { transaction: undefined };
3418
+ return { transaction: undefined, timestamp: undefined, slot: BigInt("0") };
3399
3419
  }
3400
3420
  export const Data_SuiCall = {
3401
3421
  encode(message, writer = _m0.Writer.create()) {
3402
3422
  if (message.transaction !== undefined) {
3403
3423
  Struct.encode(Struct.wrap(message.transaction), writer.uint32(10).fork()).ldelim();
3404
3424
  }
3425
+ if (message.timestamp !== undefined) {
3426
+ Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(18).fork()).ldelim();
3427
+ }
3428
+ if (message.slot !== BigInt("0")) {
3429
+ writer.uint32(24).uint64(message.slot.toString());
3430
+ }
3405
3431
  return writer;
3406
3432
  },
3407
3433
  decode(input, length) {
@@ -3414,6 +3440,12 @@ export const Data_SuiCall = {
3414
3440
  case 1:
3415
3441
  message.transaction = Struct.unwrap(Struct.decode(reader, reader.uint32()));
3416
3442
  break;
3443
+ case 2:
3444
+ message.timestamp = fromTimestamp(Timestamp.decode(reader, reader.uint32()));
3445
+ break;
3446
+ case 3:
3447
+ message.slot = longToBigint(reader.uint64());
3448
+ break;
3417
3449
  default:
3418
3450
  reader.skipType(tag & 7);
3419
3451
  break;
@@ -3422,11 +3454,17 @@ export const Data_SuiCall = {
3422
3454
  return message;
3423
3455
  },
3424
3456
  fromJSON(object) {
3425
- return { transaction: isObject(object.transaction) ? object.transaction : undefined };
3457
+ return {
3458
+ transaction: isObject(object.transaction) ? object.transaction : undefined,
3459
+ timestamp: isSet(object.timestamp) ? fromJsonTimestamp(object.timestamp) : undefined,
3460
+ slot: isSet(object.slot) ? BigInt(object.slot) : BigInt("0"),
3461
+ };
3426
3462
  },
3427
3463
  toJSON(message) {
3428
3464
  const obj = {};
3429
3465
  message.transaction !== undefined && (obj.transaction = message.transaction);
3466
+ message.timestamp !== undefined && (obj.timestamp = message.timestamp.toISOString());
3467
+ message.slot !== undefined && (obj.slot = message.slot.toString());
3430
3468
  return obj;
3431
3469
  },
3432
3470
  create(base) {
@@ -3435,6 +3473,8 @@ export const Data_SuiCall = {
3435
3473
  fromPartial(object) {
3436
3474
  const message = createBaseData_SuiCall();
3437
3475
  message.transaction = object.transaction ?? undefined;
3476
+ message.timestamp = object.timestamp ?? undefined;
3477
+ message.slot = object.slot ?? BigInt("0");
3438
3478
  return message;
3439
3479
  },
3440
3480
  };