@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.mjs CHANGED
@@ -2926,8 +2926,8 @@ function messageTypeFromJSON(object) {
2926
2926
  case "MESSAGE_TYPE_LINK_REMOVE":
2927
2927
  return 6 /* LINK_REMOVE */;
2928
2928
  case 7:
2929
- case "MESSAGE_TYPE_VERIFICATION_ADD_ETH_ADDRESS":
2930
- return 7 /* VERIFICATION_ADD_ETH_ADDRESS */;
2929
+ case "MESSAGE_TYPE_VERIFICATION_ADD_ADDRESS":
2930
+ return 7 /* VERIFICATION_ADD_ADDRESS */;
2931
2931
  case 8:
2932
2932
  case "MESSAGE_TYPE_VERIFICATION_REMOVE":
2933
2933
  return 8 /* VERIFICATION_REMOVE */;
@@ -2937,6 +2937,9 @@ function messageTypeFromJSON(object) {
2937
2937
  case 12:
2938
2938
  case "MESSAGE_TYPE_USERNAME_PROOF":
2939
2939
  return 12 /* USERNAME_PROOF */;
2940
+ case 13:
2941
+ case "MESSAGE_TYPE_FRAME_ACTION":
2942
+ return 13 /* FRAME_ACTION */;
2940
2943
  default:
2941
2944
  throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum MessageType");
2942
2945
  }
@@ -2957,14 +2960,16 @@ function messageTypeToJSON(object) {
2957
2960
  return "MESSAGE_TYPE_LINK_ADD";
2958
2961
  case 6 /* LINK_REMOVE */:
2959
2962
  return "MESSAGE_TYPE_LINK_REMOVE";
2960
- case 7 /* VERIFICATION_ADD_ETH_ADDRESS */:
2961
- return "MESSAGE_TYPE_VERIFICATION_ADD_ETH_ADDRESS";
2963
+ case 7 /* VERIFICATION_ADD_ADDRESS */:
2964
+ return "MESSAGE_TYPE_VERIFICATION_ADD_ADDRESS";
2962
2965
  case 8 /* VERIFICATION_REMOVE */:
2963
2966
  return "MESSAGE_TYPE_VERIFICATION_REMOVE";
2964
2967
  case 11 /* USER_DATA_ADD */:
2965
2968
  return "MESSAGE_TYPE_USER_DATA_ADD";
2966
2969
  case 12 /* USERNAME_PROOF */:
2967
2970
  return "MESSAGE_TYPE_USERNAME_PROOF";
2971
+ case 13 /* FRAME_ACTION */:
2972
+ return "MESSAGE_TYPE_FRAME_ACTION";
2968
2973
  default:
2969
2974
  throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum MessageType");
2970
2975
  }
@@ -3070,6 +3075,28 @@ function reactionTypeToJSON(object) {
3070
3075
  throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum ReactionType");
3071
3076
  }
3072
3077
  }
3078
+ function protocolFromJSON(object) {
3079
+ switch (object) {
3080
+ case 0:
3081
+ case "PROTOCOL_ETHEREUM":
3082
+ return 0 /* ETHEREUM */;
3083
+ case 1:
3084
+ case "PROTOCOL_SOLANA":
3085
+ return 1 /* SOLANA */;
3086
+ default:
3087
+ throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum Protocol");
3088
+ }
3089
+ }
3090
+ function protocolToJSON(object) {
3091
+ switch (object) {
3092
+ case 0 /* ETHEREUM */:
3093
+ return "PROTOCOL_ETHEREUM";
3094
+ case 1 /* SOLANA */:
3095
+ return "PROTOCOL_SOLANA";
3096
+ default:
3097
+ throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum Protocol");
3098
+ }
3099
+ }
3073
3100
  function createBaseMessage() {
3074
3101
  return {
3075
3102
  data: void 0,
@@ -3210,11 +3237,12 @@ function createBaseMessageData() {
3210
3237
  castAddBody: void 0,
3211
3238
  castRemoveBody: void 0,
3212
3239
  reactionBody: void 0,
3213
- verificationAddEthAddressBody: void 0,
3240
+ verificationAddAddressBody: void 0,
3214
3241
  verificationRemoveBody: void 0,
3215
3242
  userDataBody: void 0,
3216
3243
  linkBody: void 0,
3217
- usernameProofBody: void 0
3244
+ usernameProofBody: void 0,
3245
+ frameActionBody: void 0
3218
3246
  };
3219
3247
  }
3220
3248
  var MessageData = {
@@ -3240,8 +3268,8 @@ var MessageData = {
3240
3268
  if (message.reactionBody !== void 0) {
3241
3269
  ReactionBody.encode(message.reactionBody, writer.uint32(58).fork()).ldelim();
3242
3270
  }
3243
- if (message.verificationAddEthAddressBody !== void 0) {
3244
- VerificationAddEthAddressBody.encode(message.verificationAddEthAddressBody, writer.uint32(74).fork()).ldelim();
3271
+ if (message.verificationAddAddressBody !== void 0) {
3272
+ VerificationAddAddressBody.encode(message.verificationAddAddressBody, writer.uint32(74).fork()).ldelim();
3245
3273
  }
3246
3274
  if (message.verificationRemoveBody !== void 0) {
3247
3275
  VerificationRemoveBody.encode(message.verificationRemoveBody, writer.uint32(82).fork()).ldelim();
@@ -3255,6 +3283,9 @@ var MessageData = {
3255
3283
  if (message.usernameProofBody !== void 0) {
3256
3284
  UserNameProof.encode(message.usernameProofBody, writer.uint32(122).fork()).ldelim();
3257
3285
  }
3286
+ if (message.frameActionBody !== void 0) {
3287
+ FrameActionBody.encode(message.frameActionBody, writer.uint32(130).fork()).ldelim();
3288
+ }
3258
3289
  return writer;
3259
3290
  },
3260
3291
  decode(input, length) {
@@ -3310,7 +3341,7 @@ var MessageData = {
3310
3341
  if (tag != 74) {
3311
3342
  break;
3312
3343
  }
3313
- message.verificationAddEthAddressBody = VerificationAddEthAddressBody.decode(reader, reader.uint32());
3344
+ message.verificationAddAddressBody = VerificationAddAddressBody.decode(reader, reader.uint32());
3314
3345
  continue;
3315
3346
  case 10:
3316
3347
  if (tag != 82) {
@@ -3336,6 +3367,12 @@ var MessageData = {
3336
3367
  }
3337
3368
  message.usernameProofBody = UserNameProof.decode(reader, reader.uint32());
3338
3369
  continue;
3370
+ case 16:
3371
+ if (tag != 130) {
3372
+ break;
3373
+ }
3374
+ message.frameActionBody = FrameActionBody.decode(reader, reader.uint32());
3375
+ continue;
3339
3376
  }
3340
3377
  if ((tag & 7) == 4 || tag == 0) {
3341
3378
  break;
@@ -3353,11 +3390,12 @@ var MessageData = {
3353
3390
  castAddBody: isSet2(object.castAddBody) ? CastAddBody.fromJSON(object.castAddBody) : void 0,
3354
3391
  castRemoveBody: isSet2(object.castRemoveBody) ? CastRemoveBody.fromJSON(object.castRemoveBody) : void 0,
3355
3392
  reactionBody: isSet2(object.reactionBody) ? ReactionBody.fromJSON(object.reactionBody) : void 0,
3356
- verificationAddEthAddressBody: isSet2(object.verificationAddEthAddressBody) ? VerificationAddEthAddressBody.fromJSON(object.verificationAddEthAddressBody) : void 0,
3393
+ verificationAddAddressBody: isSet2(object.verificationAddAddressBody) ? VerificationAddAddressBody.fromJSON(object.verificationAddAddressBody) : void 0,
3357
3394
  verificationRemoveBody: isSet2(object.verificationRemoveBody) ? VerificationRemoveBody.fromJSON(object.verificationRemoveBody) : void 0,
3358
3395
  userDataBody: isSet2(object.userDataBody) ? UserDataBody.fromJSON(object.userDataBody) : void 0,
3359
3396
  linkBody: isSet2(object.linkBody) ? LinkBody.fromJSON(object.linkBody) : void 0,
3360
- usernameProofBody: isSet2(object.usernameProofBody) ? UserNameProof.fromJSON(object.usernameProofBody) : void 0
3397
+ usernameProofBody: isSet2(object.usernameProofBody) ? UserNameProof.fromJSON(object.usernameProofBody) : void 0,
3398
+ frameActionBody: isSet2(object.frameActionBody) ? FrameActionBody.fromJSON(object.frameActionBody) : void 0
3361
3399
  };
3362
3400
  },
3363
3401
  toJSON(message) {
@@ -3369,11 +3407,12 @@ var MessageData = {
3369
3407
  message.castAddBody !== void 0 && (obj.castAddBody = message.castAddBody ? CastAddBody.toJSON(message.castAddBody) : void 0);
3370
3408
  message.castRemoveBody !== void 0 && (obj.castRemoveBody = message.castRemoveBody ? CastRemoveBody.toJSON(message.castRemoveBody) : void 0);
3371
3409
  message.reactionBody !== void 0 && (obj.reactionBody = message.reactionBody ? ReactionBody.toJSON(message.reactionBody) : void 0);
3372
- message.verificationAddEthAddressBody !== void 0 && (obj.verificationAddEthAddressBody = message.verificationAddEthAddressBody ? VerificationAddEthAddressBody.toJSON(message.verificationAddEthAddressBody) : void 0);
3410
+ message.verificationAddAddressBody !== void 0 && (obj.verificationAddAddressBody = message.verificationAddAddressBody ? VerificationAddAddressBody.toJSON(message.verificationAddAddressBody) : void 0);
3373
3411
  message.verificationRemoveBody !== void 0 && (obj.verificationRemoveBody = message.verificationRemoveBody ? VerificationRemoveBody.toJSON(message.verificationRemoveBody) : void 0);
3374
3412
  message.userDataBody !== void 0 && (obj.userDataBody = message.userDataBody ? UserDataBody.toJSON(message.userDataBody) : void 0);
3375
3413
  message.linkBody !== void 0 && (obj.linkBody = message.linkBody ? LinkBody.toJSON(message.linkBody) : void 0);
3376
3414
  message.usernameProofBody !== void 0 && (obj.usernameProofBody = message.usernameProofBody ? UserNameProof.toJSON(message.usernameProofBody) : void 0);
3415
+ message.frameActionBody !== void 0 && (obj.frameActionBody = message.frameActionBody ? FrameActionBody.toJSON(message.frameActionBody) : void 0);
3377
3416
  return obj;
3378
3417
  },
3379
3418
  create(base) {
@@ -3389,11 +3428,12 @@ var MessageData = {
3389
3428
  message.castAddBody = object.castAddBody !== void 0 && object.castAddBody !== null ? CastAddBody.fromPartial(object.castAddBody) : void 0;
3390
3429
  message.castRemoveBody = object.castRemoveBody !== void 0 && object.castRemoveBody !== null ? CastRemoveBody.fromPartial(object.castRemoveBody) : void 0;
3391
3430
  message.reactionBody = object.reactionBody !== void 0 && object.reactionBody !== null ? ReactionBody.fromPartial(object.reactionBody) : void 0;
3392
- message.verificationAddEthAddressBody = object.verificationAddEthAddressBody !== void 0 && object.verificationAddEthAddressBody !== null ? VerificationAddEthAddressBody.fromPartial(object.verificationAddEthAddressBody) : void 0;
3431
+ message.verificationAddAddressBody = object.verificationAddAddressBody !== void 0 && object.verificationAddAddressBody !== null ? VerificationAddAddressBody.fromPartial(object.verificationAddAddressBody) : void 0;
3393
3432
  message.verificationRemoveBody = object.verificationRemoveBody !== void 0 && object.verificationRemoveBody !== null ? VerificationRemoveBody.fromPartial(object.verificationRemoveBody) : void 0;
3394
3433
  message.userDataBody = object.userDataBody !== void 0 && object.userDataBody !== null ? UserDataBody.fromPartial(object.userDataBody) : void 0;
3395
3434
  message.linkBody = object.linkBody !== void 0 && object.linkBody !== null ? LinkBody.fromPartial(object.linkBody) : void 0;
3396
3435
  message.usernameProofBody = object.usernameProofBody !== void 0 && object.usernameProofBody !== null ? UserNameProof.fromPartial(object.usernameProofBody) : void 0;
3436
+ message.frameActionBody = object.frameActionBody !== void 0 && object.frameActionBody !== null ? FrameActionBody.fromPartial(object.frameActionBody) : void 0;
3397
3437
  return message;
3398
3438
  }
3399
3439
  };
@@ -3875,22 +3915,23 @@ var ReactionBody = {
3875
3915
  return message;
3876
3916
  }
3877
3917
  };
3878
- function createBaseVerificationAddEthAddressBody() {
3918
+ function createBaseVerificationAddAddressBody() {
3879
3919
  return {
3880
3920
  address: new Uint8Array(),
3881
- ethSignature: new Uint8Array(),
3921
+ protocolSignature: new Uint8Array(),
3882
3922
  blockHash: new Uint8Array(),
3883
3923
  verificationType: 0,
3884
- chainId: 0
3924
+ chainId: 0,
3925
+ protocol: 0
3885
3926
  };
3886
3927
  }
3887
- var VerificationAddEthAddressBody = {
3928
+ var VerificationAddAddressBody = {
3888
3929
  encode(message, writer = import_minimal2.default.Writer.create()) {
3889
3930
  if (message.address.length !== 0) {
3890
3931
  writer.uint32(10).bytes(message.address);
3891
3932
  }
3892
- if (message.ethSignature.length !== 0) {
3893
- writer.uint32(18).bytes(message.ethSignature);
3933
+ if (message.protocolSignature.length !== 0) {
3934
+ writer.uint32(18).bytes(message.protocolSignature);
3894
3935
  }
3895
3936
  if (message.blockHash.length !== 0) {
3896
3937
  writer.uint32(26).bytes(message.blockHash);
@@ -3901,12 +3942,15 @@ var VerificationAddEthAddressBody = {
3901
3942
  if (message.chainId !== 0) {
3902
3943
  writer.uint32(40).uint32(message.chainId);
3903
3944
  }
3945
+ if (message.protocol !== 0) {
3946
+ writer.uint32(56).int32(message.protocol);
3947
+ }
3904
3948
  return writer;
3905
3949
  },
3906
3950
  decode(input, length) {
3907
3951
  const reader = input instanceof import_minimal2.default.Reader ? input : import_minimal2.default.Reader.create(input);
3908
3952
  let end = length === void 0 ? reader.len : reader.pos + length;
3909
- const message = createBaseVerificationAddEthAddressBody();
3953
+ const message = createBaseVerificationAddAddressBody();
3910
3954
  while (reader.pos < end) {
3911
3955
  const tag = reader.uint32();
3912
3956
  switch (tag >>> 3) {
@@ -3920,7 +3964,7 @@ var VerificationAddEthAddressBody = {
3920
3964
  if (tag != 18) {
3921
3965
  break;
3922
3966
  }
3923
- message.ethSignature = reader.bytes();
3967
+ message.protocolSignature = reader.bytes();
3924
3968
  continue;
3925
3969
  case 3:
3926
3970
  if (tag != 26) {
@@ -3940,6 +3984,12 @@ var VerificationAddEthAddressBody = {
3940
3984
  }
3941
3985
  message.chainId = reader.uint32();
3942
3986
  continue;
3987
+ case 7:
3988
+ if (tag != 56) {
3989
+ break;
3990
+ }
3991
+ message.protocol = reader.int32();
3992
+ continue;
3943
3993
  }
3944
3994
  if ((tag & 7) == 4 || tag == 0) {
3945
3995
  break;
@@ -3951,45 +4001,51 @@ var VerificationAddEthAddressBody = {
3951
4001
  fromJSON(object) {
3952
4002
  return {
3953
4003
  address: isSet2(object.address) ? bytesFromBase642(object.address) : new Uint8Array(),
3954
- ethSignature: isSet2(object.ethSignature) ? bytesFromBase642(object.ethSignature) : new Uint8Array(),
4004
+ protocolSignature: isSet2(object.protocolSignature) ? bytesFromBase642(object.protocolSignature) : new Uint8Array(),
3955
4005
  blockHash: isSet2(object.blockHash) ? bytesFromBase642(object.blockHash) : new Uint8Array(),
3956
4006
  verificationType: isSet2(object.verificationType) ? Number(object.verificationType) : 0,
3957
- chainId: isSet2(object.chainId) ? Number(object.chainId) : 0
4007
+ chainId: isSet2(object.chainId) ? Number(object.chainId) : 0,
4008
+ protocol: isSet2(object.protocol) ? protocolFromJSON(object.protocol) : 0
3958
4009
  };
3959
4010
  },
3960
4011
  toJSON(message) {
3961
4012
  const obj = {};
3962
4013
  message.address !== void 0 && (obj.address = base64FromBytes2(message.address !== void 0 ? message.address : new Uint8Array()));
3963
- message.ethSignature !== void 0 && (obj.ethSignature = base64FromBytes2(
3964
- message.ethSignature !== void 0 ? message.ethSignature : new Uint8Array()
4014
+ message.protocolSignature !== void 0 && (obj.protocolSignature = base64FromBytes2(
4015
+ message.protocolSignature !== void 0 ? message.protocolSignature : new Uint8Array()
3965
4016
  ));
3966
4017
  message.blockHash !== void 0 && (obj.blockHash = base64FromBytes2(message.blockHash !== void 0 ? message.blockHash : new Uint8Array()));
3967
4018
  message.verificationType !== void 0 && (obj.verificationType = Math.round(message.verificationType));
3968
4019
  message.chainId !== void 0 && (obj.chainId = Math.round(message.chainId));
4020
+ message.protocol !== void 0 && (obj.protocol = protocolToJSON(message.protocol));
3969
4021
  return obj;
3970
4022
  },
3971
4023
  create(base) {
3972
- return VerificationAddEthAddressBody.fromPartial(base != null ? base : {});
4024
+ return VerificationAddAddressBody.fromPartial(base != null ? base : {});
3973
4025
  },
3974
4026
  fromPartial(object) {
3975
- var _a, _b, _c, _d, _e;
3976
- const message = createBaseVerificationAddEthAddressBody();
4027
+ var _a, _b, _c, _d, _e, _f;
4028
+ const message = createBaseVerificationAddAddressBody();
3977
4029
  message.address = (_a = object.address) != null ? _a : new Uint8Array();
3978
- message.ethSignature = (_b = object.ethSignature) != null ? _b : new Uint8Array();
4030
+ message.protocolSignature = (_b = object.protocolSignature) != null ? _b : new Uint8Array();
3979
4031
  message.blockHash = (_c = object.blockHash) != null ? _c : new Uint8Array();
3980
4032
  message.verificationType = (_d = object.verificationType) != null ? _d : 0;
3981
4033
  message.chainId = (_e = object.chainId) != null ? _e : 0;
4034
+ message.protocol = (_f = object.protocol) != null ? _f : 0;
3982
4035
  return message;
3983
4036
  }
3984
4037
  };
3985
4038
  function createBaseVerificationRemoveBody() {
3986
- return { address: new Uint8Array() };
4039
+ return { address: new Uint8Array(), protocol: 0 };
3987
4040
  }
3988
4041
  var VerificationRemoveBody = {
3989
4042
  encode(message, writer = import_minimal2.default.Writer.create()) {
3990
4043
  if (message.address.length !== 0) {
3991
4044
  writer.uint32(10).bytes(message.address);
3992
4045
  }
4046
+ if (message.protocol !== 0) {
4047
+ writer.uint32(16).int32(message.protocol);
4048
+ }
3993
4049
  return writer;
3994
4050
  },
3995
4051
  decode(input, length) {
@@ -4005,6 +4061,12 @@ var VerificationRemoveBody = {
4005
4061
  }
4006
4062
  message.address = reader.bytes();
4007
4063
  continue;
4064
+ case 2:
4065
+ if (tag != 16) {
4066
+ break;
4067
+ }
4068
+ message.protocol = reader.int32();
4069
+ continue;
4008
4070
  }
4009
4071
  if ((tag & 7) == 4 || tag == 0) {
4010
4072
  break;
@@ -4014,20 +4076,25 @@ var VerificationRemoveBody = {
4014
4076
  return message;
4015
4077
  },
4016
4078
  fromJSON(object) {
4017
- return { address: isSet2(object.address) ? bytesFromBase642(object.address) : new Uint8Array() };
4079
+ return {
4080
+ address: isSet2(object.address) ? bytesFromBase642(object.address) : new Uint8Array(),
4081
+ protocol: isSet2(object.protocol) ? protocolFromJSON(object.protocol) : 0
4082
+ };
4018
4083
  },
4019
4084
  toJSON(message) {
4020
4085
  const obj = {};
4021
4086
  message.address !== void 0 && (obj.address = base64FromBytes2(message.address !== void 0 ? message.address : new Uint8Array()));
4087
+ message.protocol !== void 0 && (obj.protocol = protocolToJSON(message.protocol));
4022
4088
  return obj;
4023
4089
  },
4024
4090
  create(base) {
4025
4091
  return VerificationRemoveBody.fromPartial(base != null ? base : {});
4026
4092
  },
4027
4093
  fromPartial(object) {
4028
- var _a;
4094
+ var _a, _b;
4029
4095
  const message = createBaseVerificationRemoveBody();
4030
4096
  message.address = (_a = object.address) != null ? _a : new Uint8Array();
4097
+ message.protocol = (_b = object.protocol) != null ? _b : 0;
4031
4098
  return message;
4032
4099
  }
4033
4100
  };
@@ -4106,6 +4173,93 @@ var LinkBody = {
4106
4173
  return message;
4107
4174
  }
4108
4175
  };
4176
+ function createBaseFrameActionBody() {
4177
+ return { url: new Uint8Array(), buttonIndex: 0, castId: void 0, inputText: new Uint8Array() };
4178
+ }
4179
+ var FrameActionBody = {
4180
+ encode(message, writer = import_minimal2.default.Writer.create()) {
4181
+ if (message.url.length !== 0) {
4182
+ writer.uint32(10).bytes(message.url);
4183
+ }
4184
+ if (message.buttonIndex !== 0) {
4185
+ writer.uint32(16).uint32(message.buttonIndex);
4186
+ }
4187
+ if (message.castId !== void 0) {
4188
+ CastId.encode(message.castId, writer.uint32(26).fork()).ldelim();
4189
+ }
4190
+ if (message.inputText.length !== 0) {
4191
+ writer.uint32(34).bytes(message.inputText);
4192
+ }
4193
+ return writer;
4194
+ },
4195
+ decode(input, length) {
4196
+ const reader = input instanceof import_minimal2.default.Reader ? input : import_minimal2.default.Reader.create(input);
4197
+ let end = length === void 0 ? reader.len : reader.pos + length;
4198
+ const message = createBaseFrameActionBody();
4199
+ while (reader.pos < end) {
4200
+ const tag = reader.uint32();
4201
+ switch (tag >>> 3) {
4202
+ case 1:
4203
+ if (tag != 10) {
4204
+ break;
4205
+ }
4206
+ message.url = reader.bytes();
4207
+ continue;
4208
+ case 2:
4209
+ if (tag != 16) {
4210
+ break;
4211
+ }
4212
+ message.buttonIndex = reader.uint32();
4213
+ continue;
4214
+ case 3:
4215
+ if (tag != 26) {
4216
+ break;
4217
+ }
4218
+ message.castId = CastId.decode(reader, reader.uint32());
4219
+ continue;
4220
+ case 4:
4221
+ if (tag != 34) {
4222
+ break;
4223
+ }
4224
+ message.inputText = reader.bytes();
4225
+ continue;
4226
+ }
4227
+ if ((tag & 7) == 4 || tag == 0) {
4228
+ break;
4229
+ }
4230
+ reader.skipType(tag & 7);
4231
+ }
4232
+ return message;
4233
+ },
4234
+ fromJSON(object) {
4235
+ return {
4236
+ url: isSet2(object.url) ? bytesFromBase642(object.url) : new Uint8Array(),
4237
+ buttonIndex: isSet2(object.buttonIndex) ? Number(object.buttonIndex) : 0,
4238
+ castId: isSet2(object.castId) ? CastId.fromJSON(object.castId) : void 0,
4239
+ inputText: isSet2(object.inputText) ? bytesFromBase642(object.inputText) : new Uint8Array()
4240
+ };
4241
+ },
4242
+ toJSON(message) {
4243
+ const obj = {};
4244
+ message.url !== void 0 && (obj.url = base64FromBytes2(message.url !== void 0 ? message.url : new Uint8Array()));
4245
+ message.buttonIndex !== void 0 && (obj.buttonIndex = Math.round(message.buttonIndex));
4246
+ message.castId !== void 0 && (obj.castId = message.castId ? CastId.toJSON(message.castId) : void 0);
4247
+ message.inputText !== void 0 && (obj.inputText = base64FromBytes2(message.inputText !== void 0 ? message.inputText : new Uint8Array()));
4248
+ return obj;
4249
+ },
4250
+ create(base) {
4251
+ return FrameActionBody.fromPartial(base != null ? base : {});
4252
+ },
4253
+ fromPartial(object) {
4254
+ var _a, _b, _c;
4255
+ const message = createBaseFrameActionBody();
4256
+ message.url = (_a = object.url) != null ? _a : new Uint8Array();
4257
+ message.buttonIndex = (_b = object.buttonIndex) != null ? _b : 0;
4258
+ message.castId = object.castId !== void 0 && object.castId !== null ? CastId.fromPartial(object.castId) : void 0;
4259
+ message.inputText = (_c = object.inputText) != null ? _c : new Uint8Array();
4260
+ return message;
4261
+ }
4262
+ };
4109
4263
  var tsProtoGlobalThis2 = (() => {
4110
4264
  if (typeof globalThis !== "undefined") {
4111
4265
  return globalThis;
@@ -8066,6 +8220,69 @@ var IdRegistryEventByAddressRequest = {
8066
8220
  return message;
8067
8221
  }
8068
8222
  };
8223
+ function createBaseValidationResponse() {
8224
+ return { valid: false, message: void 0 };
8225
+ }
8226
+ var ValidationResponse = {
8227
+ encode(message, writer = import_minimal5.default.Writer.create()) {
8228
+ if (message.valid === true) {
8229
+ writer.uint32(8).bool(message.valid);
8230
+ }
8231
+ if (message.message !== void 0) {
8232
+ Message.encode(message.message, writer.uint32(18).fork()).ldelim();
8233
+ }
8234
+ return writer;
8235
+ },
8236
+ decode(input, length) {
8237
+ const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
8238
+ let end = length === void 0 ? reader.len : reader.pos + length;
8239
+ const message = createBaseValidationResponse();
8240
+ while (reader.pos < end) {
8241
+ const tag = reader.uint32();
8242
+ switch (tag >>> 3) {
8243
+ case 1:
8244
+ if (tag != 8) {
8245
+ break;
8246
+ }
8247
+ message.valid = reader.bool();
8248
+ continue;
8249
+ case 2:
8250
+ if (tag != 18) {
8251
+ break;
8252
+ }
8253
+ message.message = Message.decode(reader, reader.uint32());
8254
+ continue;
8255
+ }
8256
+ if ((tag & 7) == 4 || tag == 0) {
8257
+ break;
8258
+ }
8259
+ reader.skipType(tag & 7);
8260
+ }
8261
+ return message;
8262
+ },
8263
+ fromJSON(object) {
8264
+ return {
8265
+ valid: isSet5(object.valid) ? Boolean(object.valid) : false,
8266
+ message: isSet5(object.message) ? Message.fromJSON(object.message) : void 0
8267
+ };
8268
+ },
8269
+ toJSON(message) {
8270
+ const obj = {};
8271
+ message.valid !== void 0 && (obj.valid = message.valid);
8272
+ message.message !== void 0 && (obj.message = message.message ? Message.toJSON(message.message) : void 0);
8273
+ return obj;
8274
+ },
8275
+ create(base) {
8276
+ return ValidationResponse.fromPartial(base != null ? base : {});
8277
+ },
8278
+ fromPartial(object) {
8279
+ var _a;
8280
+ const message = createBaseValidationResponse();
8281
+ message.valid = (_a = object.valid) != null ? _a : false;
8282
+ message.message = object.message !== void 0 && object.message !== null ? Message.fromPartial(object.message) : void 0;
8283
+ return message;
8284
+ }
8285
+ };
8069
8286
  var tsProtoGlobalThis5 = (() => {
8070
8287
  if (typeof globalThis !== "undefined") {
8071
8288
  return globalThis;
@@ -8124,6 +8341,7 @@ var HubServiceClientImpl = class {
8124
8341
  __publicField(this, "rpc");
8125
8342
  this.rpc = rpc;
8126
8343
  this.submitMessage = this.submitMessage.bind(this);
8344
+ this.validateMessage = this.validateMessage.bind(this);
8127
8345
  this.subscribe = this.subscribe.bind(this);
8128
8346
  this.getEvent = this.getEvent.bind(this);
8129
8347
  this.getCast = this.getCast.bind(this);
@@ -8165,6 +8383,9 @@ var HubServiceClientImpl = class {
8165
8383
  submitMessage(request, metadata) {
8166
8384
  return this.rpc.unary(HubServiceSubmitMessageDesc, Message.fromPartial(request), metadata);
8167
8385
  }
8386
+ validateMessage(request, metadata) {
8387
+ return this.rpc.unary(HubServiceValidateMessageDesc, Message.fromPartial(request), metadata);
8388
+ }
8168
8389
  subscribe(request, metadata) {
8169
8390
  return this.rpc.invoke(HubServiceSubscribeDesc, SubscribeRequest.fromPartial(request), metadata);
8170
8391
  }
@@ -8304,6 +8525,28 @@ var HubServiceSubmitMessageDesc = {
8304
8525
  }
8305
8526
  }
8306
8527
  };
8528
+ var HubServiceValidateMessageDesc = {
8529
+ methodName: "ValidateMessage",
8530
+ service: HubServiceDesc,
8531
+ requestStream: false,
8532
+ responseStream: false,
8533
+ requestType: {
8534
+ serializeBinary() {
8535
+ return Message.encode(this).finish();
8536
+ }
8537
+ },
8538
+ responseType: {
8539
+ deserializeBinary(data) {
8540
+ const value = ValidationResponse.decode(data);
8541
+ return {
8542
+ ...value,
8543
+ toObject() {
8544
+ return value;
8545
+ }
8546
+ };
8547
+ }
8548
+ }
8549
+ };
8307
8550
  var HubServiceSubscribeDesc = {
8308
8551
  methodName: "Subscribe",
8309
8552
  service: HubServiceDesc,
@@ -9820,6 +10063,7 @@ export {
9820
10063
  HubServiceGetVerificationsByFidDesc,
9821
10064
  HubServiceSubmitMessageDesc,
9822
10065
  HubServiceSubscribeDesc,
10066
+ HubServiceValidateMessageDesc,
9823
10067
  Observable2 as Observable,
9824
10068
  getAdminRpcClient,
9825
10069
  getAuthMetadata,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@farcaster/hub-web",
3
- "version": "0.7.2",
3
+ "version": "0.7.4",
4
4
  "main": "./dist/index.js",
5
5
  "module": "./dist/index.mjs",
6
6
  "types": "./dist/index.d.ts",
@@ -28,7 +28,7 @@
28
28
  "ts-proto": "^1.146.0"
29
29
  },
30
30
  "dependencies": {
31
- "@farcaster/core": "^0.13.4",
31
+ "@farcaster/core": "^0.13.6",
32
32
  "@improbable-eng/grpc-web": "^0.15.0",
33
33
  "rxjs": "^7.8.0"
34
34
  }