@farcaster/hub-web 0.7.2 → 0.7.4

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.js CHANGED
@@ -2687,6 +2687,7 @@ __export(src_exports, {
2687
2687
  HubServiceGetVerificationsByFidDesc: () => HubServiceGetVerificationsByFidDesc,
2688
2688
  HubServiceSubmitMessageDesc: () => HubServiceSubmitMessageDesc,
2689
2689
  HubServiceSubscribeDesc: () => HubServiceSubscribeDesc,
2690
+ HubServiceValidateMessageDesc: () => HubServiceValidateMessageDesc,
2690
2691
  Observable: () => import_rxjs2.Observable,
2691
2692
  getAdminRpcClient: () => getAdminRpcClient,
2692
2693
  getAuthMetadata: () => getAuthMetadata,
@@ -2988,8 +2989,8 @@ function messageTypeFromJSON(object) {
2988
2989
  case "MESSAGE_TYPE_LINK_REMOVE":
2989
2990
  return 6 /* LINK_REMOVE */;
2990
2991
  case 7:
2991
- case "MESSAGE_TYPE_VERIFICATION_ADD_ETH_ADDRESS":
2992
- return 7 /* VERIFICATION_ADD_ETH_ADDRESS */;
2992
+ case "MESSAGE_TYPE_VERIFICATION_ADD_ADDRESS":
2993
+ return 7 /* VERIFICATION_ADD_ADDRESS */;
2993
2994
  case 8:
2994
2995
  case "MESSAGE_TYPE_VERIFICATION_REMOVE":
2995
2996
  return 8 /* VERIFICATION_REMOVE */;
@@ -2999,6 +3000,9 @@ function messageTypeFromJSON(object) {
2999
3000
  case 12:
3000
3001
  case "MESSAGE_TYPE_USERNAME_PROOF":
3001
3002
  return 12 /* USERNAME_PROOF */;
3003
+ case 13:
3004
+ case "MESSAGE_TYPE_FRAME_ACTION":
3005
+ return 13 /* FRAME_ACTION */;
3002
3006
  default:
3003
3007
  throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum MessageType");
3004
3008
  }
@@ -3019,14 +3023,16 @@ function messageTypeToJSON(object) {
3019
3023
  return "MESSAGE_TYPE_LINK_ADD";
3020
3024
  case 6 /* LINK_REMOVE */:
3021
3025
  return "MESSAGE_TYPE_LINK_REMOVE";
3022
- case 7 /* VERIFICATION_ADD_ETH_ADDRESS */:
3023
- return "MESSAGE_TYPE_VERIFICATION_ADD_ETH_ADDRESS";
3026
+ case 7 /* VERIFICATION_ADD_ADDRESS */:
3027
+ return "MESSAGE_TYPE_VERIFICATION_ADD_ADDRESS";
3024
3028
  case 8 /* VERIFICATION_REMOVE */:
3025
3029
  return "MESSAGE_TYPE_VERIFICATION_REMOVE";
3026
3030
  case 11 /* USER_DATA_ADD */:
3027
3031
  return "MESSAGE_TYPE_USER_DATA_ADD";
3028
3032
  case 12 /* USERNAME_PROOF */:
3029
3033
  return "MESSAGE_TYPE_USERNAME_PROOF";
3034
+ case 13 /* FRAME_ACTION */:
3035
+ return "MESSAGE_TYPE_FRAME_ACTION";
3030
3036
  default:
3031
3037
  throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum MessageType");
3032
3038
  }
@@ -3132,6 +3138,28 @@ function reactionTypeToJSON(object) {
3132
3138
  throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum ReactionType");
3133
3139
  }
3134
3140
  }
3141
+ function protocolFromJSON(object) {
3142
+ switch (object) {
3143
+ case 0:
3144
+ case "PROTOCOL_ETHEREUM":
3145
+ return 0 /* ETHEREUM */;
3146
+ case 1:
3147
+ case "PROTOCOL_SOLANA":
3148
+ return 1 /* SOLANA */;
3149
+ default:
3150
+ throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum Protocol");
3151
+ }
3152
+ }
3153
+ function protocolToJSON(object) {
3154
+ switch (object) {
3155
+ case 0 /* ETHEREUM */:
3156
+ return "PROTOCOL_ETHEREUM";
3157
+ case 1 /* SOLANA */:
3158
+ return "PROTOCOL_SOLANA";
3159
+ default:
3160
+ throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum Protocol");
3161
+ }
3162
+ }
3135
3163
  function createBaseMessage() {
3136
3164
  return {
3137
3165
  data: void 0,
@@ -3272,11 +3300,12 @@ function createBaseMessageData() {
3272
3300
  castAddBody: void 0,
3273
3301
  castRemoveBody: void 0,
3274
3302
  reactionBody: void 0,
3275
- verificationAddEthAddressBody: void 0,
3303
+ verificationAddAddressBody: void 0,
3276
3304
  verificationRemoveBody: void 0,
3277
3305
  userDataBody: void 0,
3278
3306
  linkBody: void 0,
3279
- usernameProofBody: void 0
3307
+ usernameProofBody: void 0,
3308
+ frameActionBody: void 0
3280
3309
  };
3281
3310
  }
3282
3311
  var MessageData = {
@@ -3302,8 +3331,8 @@ var MessageData = {
3302
3331
  if (message.reactionBody !== void 0) {
3303
3332
  ReactionBody.encode(message.reactionBody, writer.uint32(58).fork()).ldelim();
3304
3333
  }
3305
- if (message.verificationAddEthAddressBody !== void 0) {
3306
- VerificationAddEthAddressBody.encode(message.verificationAddEthAddressBody, writer.uint32(74).fork()).ldelim();
3334
+ if (message.verificationAddAddressBody !== void 0) {
3335
+ VerificationAddAddressBody.encode(message.verificationAddAddressBody, writer.uint32(74).fork()).ldelim();
3307
3336
  }
3308
3337
  if (message.verificationRemoveBody !== void 0) {
3309
3338
  VerificationRemoveBody.encode(message.verificationRemoveBody, writer.uint32(82).fork()).ldelim();
@@ -3317,6 +3346,9 @@ var MessageData = {
3317
3346
  if (message.usernameProofBody !== void 0) {
3318
3347
  UserNameProof.encode(message.usernameProofBody, writer.uint32(122).fork()).ldelim();
3319
3348
  }
3349
+ if (message.frameActionBody !== void 0) {
3350
+ FrameActionBody.encode(message.frameActionBody, writer.uint32(130).fork()).ldelim();
3351
+ }
3320
3352
  return writer;
3321
3353
  },
3322
3354
  decode(input, length) {
@@ -3372,7 +3404,7 @@ var MessageData = {
3372
3404
  if (tag != 74) {
3373
3405
  break;
3374
3406
  }
3375
- message.verificationAddEthAddressBody = VerificationAddEthAddressBody.decode(reader, reader.uint32());
3407
+ message.verificationAddAddressBody = VerificationAddAddressBody.decode(reader, reader.uint32());
3376
3408
  continue;
3377
3409
  case 10:
3378
3410
  if (tag != 82) {
@@ -3398,6 +3430,12 @@ var MessageData = {
3398
3430
  }
3399
3431
  message.usernameProofBody = UserNameProof.decode(reader, reader.uint32());
3400
3432
  continue;
3433
+ case 16:
3434
+ if (tag != 130) {
3435
+ break;
3436
+ }
3437
+ message.frameActionBody = FrameActionBody.decode(reader, reader.uint32());
3438
+ continue;
3401
3439
  }
3402
3440
  if ((tag & 7) == 4 || tag == 0) {
3403
3441
  break;
@@ -3415,11 +3453,12 @@ var MessageData = {
3415
3453
  castAddBody: isSet2(object.castAddBody) ? CastAddBody.fromJSON(object.castAddBody) : void 0,
3416
3454
  castRemoveBody: isSet2(object.castRemoveBody) ? CastRemoveBody.fromJSON(object.castRemoveBody) : void 0,
3417
3455
  reactionBody: isSet2(object.reactionBody) ? ReactionBody.fromJSON(object.reactionBody) : void 0,
3418
- verificationAddEthAddressBody: isSet2(object.verificationAddEthAddressBody) ? VerificationAddEthAddressBody.fromJSON(object.verificationAddEthAddressBody) : void 0,
3456
+ verificationAddAddressBody: isSet2(object.verificationAddAddressBody) ? VerificationAddAddressBody.fromJSON(object.verificationAddAddressBody) : void 0,
3419
3457
  verificationRemoveBody: isSet2(object.verificationRemoveBody) ? VerificationRemoveBody.fromJSON(object.verificationRemoveBody) : void 0,
3420
3458
  userDataBody: isSet2(object.userDataBody) ? UserDataBody.fromJSON(object.userDataBody) : void 0,
3421
3459
  linkBody: isSet2(object.linkBody) ? LinkBody.fromJSON(object.linkBody) : void 0,
3422
- usernameProofBody: isSet2(object.usernameProofBody) ? UserNameProof.fromJSON(object.usernameProofBody) : void 0
3460
+ usernameProofBody: isSet2(object.usernameProofBody) ? UserNameProof.fromJSON(object.usernameProofBody) : void 0,
3461
+ frameActionBody: isSet2(object.frameActionBody) ? FrameActionBody.fromJSON(object.frameActionBody) : void 0
3423
3462
  };
3424
3463
  },
3425
3464
  toJSON(message) {
@@ -3431,11 +3470,12 @@ var MessageData = {
3431
3470
  message.castAddBody !== void 0 && (obj.castAddBody = message.castAddBody ? CastAddBody.toJSON(message.castAddBody) : void 0);
3432
3471
  message.castRemoveBody !== void 0 && (obj.castRemoveBody = message.castRemoveBody ? CastRemoveBody.toJSON(message.castRemoveBody) : void 0);
3433
3472
  message.reactionBody !== void 0 && (obj.reactionBody = message.reactionBody ? ReactionBody.toJSON(message.reactionBody) : void 0);
3434
- message.verificationAddEthAddressBody !== void 0 && (obj.verificationAddEthAddressBody = message.verificationAddEthAddressBody ? VerificationAddEthAddressBody.toJSON(message.verificationAddEthAddressBody) : void 0);
3473
+ message.verificationAddAddressBody !== void 0 && (obj.verificationAddAddressBody = message.verificationAddAddressBody ? VerificationAddAddressBody.toJSON(message.verificationAddAddressBody) : void 0);
3435
3474
  message.verificationRemoveBody !== void 0 && (obj.verificationRemoveBody = message.verificationRemoveBody ? VerificationRemoveBody.toJSON(message.verificationRemoveBody) : void 0);
3436
3475
  message.userDataBody !== void 0 && (obj.userDataBody = message.userDataBody ? UserDataBody.toJSON(message.userDataBody) : void 0);
3437
3476
  message.linkBody !== void 0 && (obj.linkBody = message.linkBody ? LinkBody.toJSON(message.linkBody) : void 0);
3438
3477
  message.usernameProofBody !== void 0 && (obj.usernameProofBody = message.usernameProofBody ? UserNameProof.toJSON(message.usernameProofBody) : void 0);
3478
+ message.frameActionBody !== void 0 && (obj.frameActionBody = message.frameActionBody ? FrameActionBody.toJSON(message.frameActionBody) : void 0);
3439
3479
  return obj;
3440
3480
  },
3441
3481
  create(base) {
@@ -3451,11 +3491,12 @@ var MessageData = {
3451
3491
  message.castAddBody = object.castAddBody !== void 0 && object.castAddBody !== null ? CastAddBody.fromPartial(object.castAddBody) : void 0;
3452
3492
  message.castRemoveBody = object.castRemoveBody !== void 0 && object.castRemoveBody !== null ? CastRemoveBody.fromPartial(object.castRemoveBody) : void 0;
3453
3493
  message.reactionBody = object.reactionBody !== void 0 && object.reactionBody !== null ? ReactionBody.fromPartial(object.reactionBody) : void 0;
3454
- message.verificationAddEthAddressBody = object.verificationAddEthAddressBody !== void 0 && object.verificationAddEthAddressBody !== null ? VerificationAddEthAddressBody.fromPartial(object.verificationAddEthAddressBody) : void 0;
3494
+ message.verificationAddAddressBody = object.verificationAddAddressBody !== void 0 && object.verificationAddAddressBody !== null ? VerificationAddAddressBody.fromPartial(object.verificationAddAddressBody) : void 0;
3455
3495
  message.verificationRemoveBody = object.verificationRemoveBody !== void 0 && object.verificationRemoveBody !== null ? VerificationRemoveBody.fromPartial(object.verificationRemoveBody) : void 0;
3456
3496
  message.userDataBody = object.userDataBody !== void 0 && object.userDataBody !== null ? UserDataBody.fromPartial(object.userDataBody) : void 0;
3457
3497
  message.linkBody = object.linkBody !== void 0 && object.linkBody !== null ? LinkBody.fromPartial(object.linkBody) : void 0;
3458
3498
  message.usernameProofBody = object.usernameProofBody !== void 0 && object.usernameProofBody !== null ? UserNameProof.fromPartial(object.usernameProofBody) : void 0;
3499
+ message.frameActionBody = object.frameActionBody !== void 0 && object.frameActionBody !== null ? FrameActionBody.fromPartial(object.frameActionBody) : void 0;
3459
3500
  return message;
3460
3501
  }
3461
3502
  };
@@ -3937,22 +3978,23 @@ var ReactionBody = {
3937
3978
  return message;
3938
3979
  }
3939
3980
  };
3940
- function createBaseVerificationAddEthAddressBody() {
3981
+ function createBaseVerificationAddAddressBody() {
3941
3982
  return {
3942
3983
  address: new Uint8Array(),
3943
- ethSignature: new Uint8Array(),
3984
+ protocolSignature: new Uint8Array(),
3944
3985
  blockHash: new Uint8Array(),
3945
3986
  verificationType: 0,
3946
- chainId: 0
3987
+ chainId: 0,
3988
+ protocol: 0
3947
3989
  };
3948
3990
  }
3949
- var VerificationAddEthAddressBody = {
3991
+ var VerificationAddAddressBody = {
3950
3992
  encode(message, writer = import_minimal2.default.Writer.create()) {
3951
3993
  if (message.address.length !== 0) {
3952
3994
  writer.uint32(10).bytes(message.address);
3953
3995
  }
3954
- if (message.ethSignature.length !== 0) {
3955
- writer.uint32(18).bytes(message.ethSignature);
3996
+ if (message.protocolSignature.length !== 0) {
3997
+ writer.uint32(18).bytes(message.protocolSignature);
3956
3998
  }
3957
3999
  if (message.blockHash.length !== 0) {
3958
4000
  writer.uint32(26).bytes(message.blockHash);
@@ -3963,12 +4005,15 @@ var VerificationAddEthAddressBody = {
3963
4005
  if (message.chainId !== 0) {
3964
4006
  writer.uint32(40).uint32(message.chainId);
3965
4007
  }
4008
+ if (message.protocol !== 0) {
4009
+ writer.uint32(56).int32(message.protocol);
4010
+ }
3966
4011
  return writer;
3967
4012
  },
3968
4013
  decode(input, length) {
3969
4014
  const reader = input instanceof import_minimal2.default.Reader ? input : import_minimal2.default.Reader.create(input);
3970
4015
  let end = length === void 0 ? reader.len : reader.pos + length;
3971
- const message = createBaseVerificationAddEthAddressBody();
4016
+ const message = createBaseVerificationAddAddressBody();
3972
4017
  while (reader.pos < end) {
3973
4018
  const tag = reader.uint32();
3974
4019
  switch (tag >>> 3) {
@@ -3982,7 +4027,7 @@ var VerificationAddEthAddressBody = {
3982
4027
  if (tag != 18) {
3983
4028
  break;
3984
4029
  }
3985
- message.ethSignature = reader.bytes();
4030
+ message.protocolSignature = reader.bytes();
3986
4031
  continue;
3987
4032
  case 3:
3988
4033
  if (tag != 26) {
@@ -4002,6 +4047,12 @@ var VerificationAddEthAddressBody = {
4002
4047
  }
4003
4048
  message.chainId = reader.uint32();
4004
4049
  continue;
4050
+ case 7:
4051
+ if (tag != 56) {
4052
+ break;
4053
+ }
4054
+ message.protocol = reader.int32();
4055
+ continue;
4005
4056
  }
4006
4057
  if ((tag & 7) == 4 || tag == 0) {
4007
4058
  break;
@@ -4013,45 +4064,51 @@ var VerificationAddEthAddressBody = {
4013
4064
  fromJSON(object) {
4014
4065
  return {
4015
4066
  address: isSet2(object.address) ? bytesFromBase642(object.address) : new Uint8Array(),
4016
- ethSignature: isSet2(object.ethSignature) ? bytesFromBase642(object.ethSignature) : new Uint8Array(),
4067
+ protocolSignature: isSet2(object.protocolSignature) ? bytesFromBase642(object.protocolSignature) : new Uint8Array(),
4017
4068
  blockHash: isSet2(object.blockHash) ? bytesFromBase642(object.blockHash) : new Uint8Array(),
4018
4069
  verificationType: isSet2(object.verificationType) ? Number(object.verificationType) : 0,
4019
- chainId: isSet2(object.chainId) ? Number(object.chainId) : 0
4070
+ chainId: isSet2(object.chainId) ? Number(object.chainId) : 0,
4071
+ protocol: isSet2(object.protocol) ? protocolFromJSON(object.protocol) : 0
4020
4072
  };
4021
4073
  },
4022
4074
  toJSON(message) {
4023
4075
  const obj = {};
4024
4076
  message.address !== void 0 && (obj.address = base64FromBytes2(message.address !== void 0 ? message.address : new Uint8Array()));
4025
- message.ethSignature !== void 0 && (obj.ethSignature = base64FromBytes2(
4026
- message.ethSignature !== void 0 ? message.ethSignature : new Uint8Array()
4077
+ message.protocolSignature !== void 0 && (obj.protocolSignature = base64FromBytes2(
4078
+ message.protocolSignature !== void 0 ? message.protocolSignature : new Uint8Array()
4027
4079
  ));
4028
4080
  message.blockHash !== void 0 && (obj.blockHash = base64FromBytes2(message.blockHash !== void 0 ? message.blockHash : new Uint8Array()));
4029
4081
  message.verificationType !== void 0 && (obj.verificationType = Math.round(message.verificationType));
4030
4082
  message.chainId !== void 0 && (obj.chainId = Math.round(message.chainId));
4083
+ message.protocol !== void 0 && (obj.protocol = protocolToJSON(message.protocol));
4031
4084
  return obj;
4032
4085
  },
4033
4086
  create(base) {
4034
- return VerificationAddEthAddressBody.fromPartial(base != null ? base : {});
4087
+ return VerificationAddAddressBody.fromPartial(base != null ? base : {});
4035
4088
  },
4036
4089
  fromPartial(object) {
4037
- var _a, _b, _c, _d, _e;
4038
- const message = createBaseVerificationAddEthAddressBody();
4090
+ var _a, _b, _c, _d, _e, _f;
4091
+ const message = createBaseVerificationAddAddressBody();
4039
4092
  message.address = (_a = object.address) != null ? _a : new Uint8Array();
4040
- message.ethSignature = (_b = object.ethSignature) != null ? _b : new Uint8Array();
4093
+ message.protocolSignature = (_b = object.protocolSignature) != null ? _b : new Uint8Array();
4041
4094
  message.blockHash = (_c = object.blockHash) != null ? _c : new Uint8Array();
4042
4095
  message.verificationType = (_d = object.verificationType) != null ? _d : 0;
4043
4096
  message.chainId = (_e = object.chainId) != null ? _e : 0;
4097
+ message.protocol = (_f = object.protocol) != null ? _f : 0;
4044
4098
  return message;
4045
4099
  }
4046
4100
  };
4047
4101
  function createBaseVerificationRemoveBody() {
4048
- return { address: new Uint8Array() };
4102
+ return { address: new Uint8Array(), protocol: 0 };
4049
4103
  }
4050
4104
  var VerificationRemoveBody = {
4051
4105
  encode(message, writer = import_minimal2.default.Writer.create()) {
4052
4106
  if (message.address.length !== 0) {
4053
4107
  writer.uint32(10).bytes(message.address);
4054
4108
  }
4109
+ if (message.protocol !== 0) {
4110
+ writer.uint32(16).int32(message.protocol);
4111
+ }
4055
4112
  return writer;
4056
4113
  },
4057
4114
  decode(input, length) {
@@ -4067,6 +4124,12 @@ var VerificationRemoveBody = {
4067
4124
  }
4068
4125
  message.address = reader.bytes();
4069
4126
  continue;
4127
+ case 2:
4128
+ if (tag != 16) {
4129
+ break;
4130
+ }
4131
+ message.protocol = reader.int32();
4132
+ continue;
4070
4133
  }
4071
4134
  if ((tag & 7) == 4 || tag == 0) {
4072
4135
  break;
@@ -4076,20 +4139,25 @@ var VerificationRemoveBody = {
4076
4139
  return message;
4077
4140
  },
4078
4141
  fromJSON(object) {
4079
- return { address: isSet2(object.address) ? bytesFromBase642(object.address) : new Uint8Array() };
4142
+ return {
4143
+ address: isSet2(object.address) ? bytesFromBase642(object.address) : new Uint8Array(),
4144
+ protocol: isSet2(object.protocol) ? protocolFromJSON(object.protocol) : 0
4145
+ };
4080
4146
  },
4081
4147
  toJSON(message) {
4082
4148
  const obj = {};
4083
4149
  message.address !== void 0 && (obj.address = base64FromBytes2(message.address !== void 0 ? message.address : new Uint8Array()));
4150
+ message.protocol !== void 0 && (obj.protocol = protocolToJSON(message.protocol));
4084
4151
  return obj;
4085
4152
  },
4086
4153
  create(base) {
4087
4154
  return VerificationRemoveBody.fromPartial(base != null ? base : {});
4088
4155
  },
4089
4156
  fromPartial(object) {
4090
- var _a;
4157
+ var _a, _b;
4091
4158
  const message = createBaseVerificationRemoveBody();
4092
4159
  message.address = (_a = object.address) != null ? _a : new Uint8Array();
4160
+ message.protocol = (_b = object.protocol) != null ? _b : 0;
4093
4161
  return message;
4094
4162
  }
4095
4163
  };
@@ -4168,6 +4236,93 @@ var LinkBody = {
4168
4236
  return message;
4169
4237
  }
4170
4238
  };
4239
+ function createBaseFrameActionBody() {
4240
+ return { url: new Uint8Array(), buttonIndex: 0, castId: void 0, inputText: new Uint8Array() };
4241
+ }
4242
+ var FrameActionBody = {
4243
+ encode(message, writer = import_minimal2.default.Writer.create()) {
4244
+ if (message.url.length !== 0) {
4245
+ writer.uint32(10).bytes(message.url);
4246
+ }
4247
+ if (message.buttonIndex !== 0) {
4248
+ writer.uint32(16).uint32(message.buttonIndex);
4249
+ }
4250
+ if (message.castId !== void 0) {
4251
+ CastId.encode(message.castId, writer.uint32(26).fork()).ldelim();
4252
+ }
4253
+ if (message.inputText.length !== 0) {
4254
+ writer.uint32(34).bytes(message.inputText);
4255
+ }
4256
+ return writer;
4257
+ },
4258
+ decode(input, length) {
4259
+ const reader = input instanceof import_minimal2.default.Reader ? input : import_minimal2.default.Reader.create(input);
4260
+ let end = length === void 0 ? reader.len : reader.pos + length;
4261
+ const message = createBaseFrameActionBody();
4262
+ while (reader.pos < end) {
4263
+ const tag = reader.uint32();
4264
+ switch (tag >>> 3) {
4265
+ case 1:
4266
+ if (tag != 10) {
4267
+ break;
4268
+ }
4269
+ message.url = reader.bytes();
4270
+ continue;
4271
+ case 2:
4272
+ if (tag != 16) {
4273
+ break;
4274
+ }
4275
+ message.buttonIndex = reader.uint32();
4276
+ continue;
4277
+ case 3:
4278
+ if (tag != 26) {
4279
+ break;
4280
+ }
4281
+ message.castId = CastId.decode(reader, reader.uint32());
4282
+ continue;
4283
+ case 4:
4284
+ if (tag != 34) {
4285
+ break;
4286
+ }
4287
+ message.inputText = reader.bytes();
4288
+ continue;
4289
+ }
4290
+ if ((tag & 7) == 4 || tag == 0) {
4291
+ break;
4292
+ }
4293
+ reader.skipType(tag & 7);
4294
+ }
4295
+ return message;
4296
+ },
4297
+ fromJSON(object) {
4298
+ return {
4299
+ url: isSet2(object.url) ? bytesFromBase642(object.url) : new Uint8Array(),
4300
+ buttonIndex: isSet2(object.buttonIndex) ? Number(object.buttonIndex) : 0,
4301
+ castId: isSet2(object.castId) ? CastId.fromJSON(object.castId) : void 0,
4302
+ inputText: isSet2(object.inputText) ? bytesFromBase642(object.inputText) : new Uint8Array()
4303
+ };
4304
+ },
4305
+ toJSON(message) {
4306
+ const obj = {};
4307
+ message.url !== void 0 && (obj.url = base64FromBytes2(message.url !== void 0 ? message.url : new Uint8Array()));
4308
+ message.buttonIndex !== void 0 && (obj.buttonIndex = Math.round(message.buttonIndex));
4309
+ message.castId !== void 0 && (obj.castId = message.castId ? CastId.toJSON(message.castId) : void 0);
4310
+ message.inputText !== void 0 && (obj.inputText = base64FromBytes2(message.inputText !== void 0 ? message.inputText : new Uint8Array()));
4311
+ return obj;
4312
+ },
4313
+ create(base) {
4314
+ return FrameActionBody.fromPartial(base != null ? base : {});
4315
+ },
4316
+ fromPartial(object) {
4317
+ var _a, _b, _c;
4318
+ const message = createBaseFrameActionBody();
4319
+ message.url = (_a = object.url) != null ? _a : new Uint8Array();
4320
+ message.buttonIndex = (_b = object.buttonIndex) != null ? _b : 0;
4321
+ message.castId = object.castId !== void 0 && object.castId !== null ? CastId.fromPartial(object.castId) : void 0;
4322
+ message.inputText = (_c = object.inputText) != null ? _c : new Uint8Array();
4323
+ return message;
4324
+ }
4325
+ };
4171
4326
  var tsProtoGlobalThis2 = (() => {
4172
4327
  if (typeof globalThis !== "undefined") {
4173
4328
  return globalThis;
@@ -8128,6 +8283,69 @@ var IdRegistryEventByAddressRequest = {
8128
8283
  return message;
8129
8284
  }
8130
8285
  };
8286
+ function createBaseValidationResponse() {
8287
+ return { valid: false, message: void 0 };
8288
+ }
8289
+ var ValidationResponse = {
8290
+ encode(message, writer = import_minimal5.default.Writer.create()) {
8291
+ if (message.valid === true) {
8292
+ writer.uint32(8).bool(message.valid);
8293
+ }
8294
+ if (message.message !== void 0) {
8295
+ Message.encode(message.message, writer.uint32(18).fork()).ldelim();
8296
+ }
8297
+ return writer;
8298
+ },
8299
+ decode(input, length) {
8300
+ const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
8301
+ let end = length === void 0 ? reader.len : reader.pos + length;
8302
+ const message = createBaseValidationResponse();
8303
+ while (reader.pos < end) {
8304
+ const tag = reader.uint32();
8305
+ switch (tag >>> 3) {
8306
+ case 1:
8307
+ if (tag != 8) {
8308
+ break;
8309
+ }
8310
+ message.valid = reader.bool();
8311
+ continue;
8312
+ case 2:
8313
+ if (tag != 18) {
8314
+ break;
8315
+ }
8316
+ message.message = Message.decode(reader, reader.uint32());
8317
+ continue;
8318
+ }
8319
+ if ((tag & 7) == 4 || tag == 0) {
8320
+ break;
8321
+ }
8322
+ reader.skipType(tag & 7);
8323
+ }
8324
+ return message;
8325
+ },
8326
+ fromJSON(object) {
8327
+ return {
8328
+ valid: isSet5(object.valid) ? Boolean(object.valid) : false,
8329
+ message: isSet5(object.message) ? Message.fromJSON(object.message) : void 0
8330
+ };
8331
+ },
8332
+ toJSON(message) {
8333
+ const obj = {};
8334
+ message.valid !== void 0 && (obj.valid = message.valid);
8335
+ message.message !== void 0 && (obj.message = message.message ? Message.toJSON(message.message) : void 0);
8336
+ return obj;
8337
+ },
8338
+ create(base) {
8339
+ return ValidationResponse.fromPartial(base != null ? base : {});
8340
+ },
8341
+ fromPartial(object) {
8342
+ var _a;
8343
+ const message = createBaseValidationResponse();
8344
+ message.valid = (_a = object.valid) != null ? _a : false;
8345
+ message.message = object.message !== void 0 && object.message !== null ? Message.fromPartial(object.message) : void 0;
8346
+ return message;
8347
+ }
8348
+ };
8131
8349
  var tsProtoGlobalThis5 = (() => {
8132
8350
  if (typeof globalThis !== "undefined") {
8133
8351
  return globalThis;
@@ -8186,6 +8404,7 @@ var HubServiceClientImpl = class {
8186
8404
  __publicField(this, "rpc");
8187
8405
  this.rpc = rpc;
8188
8406
  this.submitMessage = this.submitMessage.bind(this);
8407
+ this.validateMessage = this.validateMessage.bind(this);
8189
8408
  this.subscribe = this.subscribe.bind(this);
8190
8409
  this.getEvent = this.getEvent.bind(this);
8191
8410
  this.getCast = this.getCast.bind(this);
@@ -8227,6 +8446,9 @@ var HubServiceClientImpl = class {
8227
8446
  submitMessage(request, metadata) {
8228
8447
  return this.rpc.unary(HubServiceSubmitMessageDesc, Message.fromPartial(request), metadata);
8229
8448
  }
8449
+ validateMessage(request, metadata) {
8450
+ return this.rpc.unary(HubServiceValidateMessageDesc, Message.fromPartial(request), metadata);
8451
+ }
8230
8452
  subscribe(request, metadata) {
8231
8453
  return this.rpc.invoke(HubServiceSubscribeDesc, SubscribeRequest.fromPartial(request), metadata);
8232
8454
  }
@@ -8366,6 +8588,28 @@ var HubServiceSubmitMessageDesc = {
8366
8588
  }
8367
8589
  }
8368
8590
  };
8591
+ var HubServiceValidateMessageDesc = {
8592
+ methodName: "ValidateMessage",
8593
+ service: HubServiceDesc,
8594
+ requestStream: false,
8595
+ responseStream: false,
8596
+ requestType: {
8597
+ serializeBinary() {
8598
+ return Message.encode(this).finish();
8599
+ }
8600
+ },
8601
+ responseType: {
8602
+ deserializeBinary(data) {
8603
+ const value = ValidationResponse.decode(data);
8604
+ return {
8605
+ ...value,
8606
+ toObject() {
8607
+ return value;
8608
+ }
8609
+ };
8610
+ }
8611
+ }
8612
+ };
8369
8613
  var HubServiceSubscribeDesc = {
8370
8614
  methodName: "Subscribe",
8371
8615
  service: HubServiceDesc,
@@ -9883,6 +10127,7 @@ var getAuthMetadata = (username, password) => {
9883
10127
  HubServiceGetVerificationsByFidDesc,
9884
10128
  HubServiceSubmitMessageDesc,
9885
10129
  HubServiceSubscribeDesc,
10130
+ HubServiceValidateMessageDesc,
9886
10131
  Observable,
9887
10132
  getAdminRpcClient,
9888
10133
  getAuthMetadata,