@farcaster/hub-web 0.7.5 → 0.8.0
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.d.ts +781 -408
- package/dist/index.js +75 -26
- package/dist/index.mjs +75 -26
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -3138,6 +3138,28 @@ function reactionTypeToJSON(object) {
|
|
3138
3138
|
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum ReactionType");
|
3139
3139
|
}
|
3140
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
|
+
}
|
3141
3163
|
function createBaseMessage() {
|
3142
3164
|
return {
|
3143
3165
|
data: void 0,
|
@@ -3278,7 +3300,7 @@ function createBaseMessageData() {
|
|
3278
3300
|
castAddBody: void 0,
|
3279
3301
|
castRemoveBody: void 0,
|
3280
3302
|
reactionBody: void 0,
|
3281
|
-
|
3303
|
+
verificationAddAddressBody: void 0,
|
3282
3304
|
verificationRemoveBody: void 0,
|
3283
3305
|
userDataBody: void 0,
|
3284
3306
|
linkBody: void 0,
|
@@ -3309,8 +3331,8 @@ var MessageData = {
|
|
3309
3331
|
if (message.reactionBody !== void 0) {
|
3310
3332
|
ReactionBody.encode(message.reactionBody, writer.uint32(58).fork()).ldelim();
|
3311
3333
|
}
|
3312
|
-
if (message.
|
3313
|
-
|
3334
|
+
if (message.verificationAddAddressBody !== void 0) {
|
3335
|
+
VerificationAddAddressBody.encode(message.verificationAddAddressBody, writer.uint32(74).fork()).ldelim();
|
3314
3336
|
}
|
3315
3337
|
if (message.verificationRemoveBody !== void 0) {
|
3316
3338
|
VerificationRemoveBody.encode(message.verificationRemoveBody, writer.uint32(82).fork()).ldelim();
|
@@ -3382,7 +3404,7 @@ var MessageData = {
|
|
3382
3404
|
if (tag != 74) {
|
3383
3405
|
break;
|
3384
3406
|
}
|
3385
|
-
message.
|
3407
|
+
message.verificationAddAddressBody = VerificationAddAddressBody.decode(reader, reader.uint32());
|
3386
3408
|
continue;
|
3387
3409
|
case 10:
|
3388
3410
|
if (tag != 82) {
|
@@ -3431,7 +3453,7 @@ var MessageData = {
|
|
3431
3453
|
castAddBody: isSet2(object.castAddBody) ? CastAddBody.fromJSON(object.castAddBody) : void 0,
|
3432
3454
|
castRemoveBody: isSet2(object.castRemoveBody) ? CastRemoveBody.fromJSON(object.castRemoveBody) : void 0,
|
3433
3455
|
reactionBody: isSet2(object.reactionBody) ? ReactionBody.fromJSON(object.reactionBody) : void 0,
|
3434
|
-
|
3456
|
+
verificationAddAddressBody: isSet2(object.verificationAddAddressBody) ? VerificationAddAddressBody.fromJSON(object.verificationAddAddressBody) : void 0,
|
3435
3457
|
verificationRemoveBody: isSet2(object.verificationRemoveBody) ? VerificationRemoveBody.fromJSON(object.verificationRemoveBody) : void 0,
|
3436
3458
|
userDataBody: isSet2(object.userDataBody) ? UserDataBody.fromJSON(object.userDataBody) : void 0,
|
3437
3459
|
linkBody: isSet2(object.linkBody) ? LinkBody.fromJSON(object.linkBody) : void 0,
|
@@ -3448,7 +3470,7 @@ var MessageData = {
|
|
3448
3470
|
message.castAddBody !== void 0 && (obj.castAddBody = message.castAddBody ? CastAddBody.toJSON(message.castAddBody) : void 0);
|
3449
3471
|
message.castRemoveBody !== void 0 && (obj.castRemoveBody = message.castRemoveBody ? CastRemoveBody.toJSON(message.castRemoveBody) : void 0);
|
3450
3472
|
message.reactionBody !== void 0 && (obj.reactionBody = message.reactionBody ? ReactionBody.toJSON(message.reactionBody) : void 0);
|
3451
|
-
message.
|
3473
|
+
message.verificationAddAddressBody !== void 0 && (obj.verificationAddAddressBody = message.verificationAddAddressBody ? VerificationAddAddressBody.toJSON(message.verificationAddAddressBody) : void 0);
|
3452
3474
|
message.verificationRemoveBody !== void 0 && (obj.verificationRemoveBody = message.verificationRemoveBody ? VerificationRemoveBody.toJSON(message.verificationRemoveBody) : void 0);
|
3453
3475
|
message.userDataBody !== void 0 && (obj.userDataBody = message.userDataBody ? UserDataBody.toJSON(message.userDataBody) : void 0);
|
3454
3476
|
message.linkBody !== void 0 && (obj.linkBody = message.linkBody ? LinkBody.toJSON(message.linkBody) : void 0);
|
@@ -3469,7 +3491,7 @@ var MessageData = {
|
|
3469
3491
|
message.castAddBody = object.castAddBody !== void 0 && object.castAddBody !== null ? CastAddBody.fromPartial(object.castAddBody) : void 0;
|
3470
3492
|
message.castRemoveBody = object.castRemoveBody !== void 0 && object.castRemoveBody !== null ? CastRemoveBody.fromPartial(object.castRemoveBody) : void 0;
|
3471
3493
|
message.reactionBody = object.reactionBody !== void 0 && object.reactionBody !== null ? ReactionBody.fromPartial(object.reactionBody) : void 0;
|
3472
|
-
message.
|
3494
|
+
message.verificationAddAddressBody = object.verificationAddAddressBody !== void 0 && object.verificationAddAddressBody !== null ? VerificationAddAddressBody.fromPartial(object.verificationAddAddressBody) : void 0;
|
3473
3495
|
message.verificationRemoveBody = object.verificationRemoveBody !== void 0 && object.verificationRemoveBody !== null ? VerificationRemoveBody.fromPartial(object.verificationRemoveBody) : void 0;
|
3474
3496
|
message.userDataBody = object.userDataBody !== void 0 && object.userDataBody !== null ? UserDataBody.fromPartial(object.userDataBody) : void 0;
|
3475
3497
|
message.linkBody = object.linkBody !== void 0 && object.linkBody !== null ? LinkBody.fromPartial(object.linkBody) : void 0;
|
@@ -3956,22 +3978,23 @@ var ReactionBody = {
|
|
3956
3978
|
return message;
|
3957
3979
|
}
|
3958
3980
|
};
|
3959
|
-
function
|
3981
|
+
function createBaseVerificationAddAddressBody() {
|
3960
3982
|
return {
|
3961
3983
|
address: new Uint8Array(),
|
3962
|
-
|
3984
|
+
claimSignature: new Uint8Array(),
|
3963
3985
|
blockHash: new Uint8Array(),
|
3964
3986
|
verificationType: 0,
|
3965
|
-
chainId: 0
|
3987
|
+
chainId: 0,
|
3988
|
+
protocol: 0
|
3966
3989
|
};
|
3967
3990
|
}
|
3968
|
-
var
|
3991
|
+
var VerificationAddAddressBody = {
|
3969
3992
|
encode(message, writer = import_minimal2.default.Writer.create()) {
|
3970
3993
|
if (message.address.length !== 0) {
|
3971
3994
|
writer.uint32(10).bytes(message.address);
|
3972
3995
|
}
|
3973
|
-
if (message.
|
3974
|
-
writer.uint32(18).bytes(message.
|
3996
|
+
if (message.claimSignature.length !== 0) {
|
3997
|
+
writer.uint32(18).bytes(message.claimSignature);
|
3975
3998
|
}
|
3976
3999
|
if (message.blockHash.length !== 0) {
|
3977
4000
|
writer.uint32(26).bytes(message.blockHash);
|
@@ -3982,12 +4005,15 @@ var VerificationAddEthAddressBody = {
|
|
3982
4005
|
if (message.chainId !== 0) {
|
3983
4006
|
writer.uint32(40).uint32(message.chainId);
|
3984
4007
|
}
|
4008
|
+
if (message.protocol !== 0) {
|
4009
|
+
writer.uint32(56).int32(message.protocol);
|
4010
|
+
}
|
3985
4011
|
return writer;
|
3986
4012
|
},
|
3987
4013
|
decode(input, length) {
|
3988
4014
|
const reader = input instanceof import_minimal2.default.Reader ? input : import_minimal2.default.Reader.create(input);
|
3989
4015
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
3990
|
-
const message =
|
4016
|
+
const message = createBaseVerificationAddAddressBody();
|
3991
4017
|
while (reader.pos < end) {
|
3992
4018
|
const tag = reader.uint32();
|
3993
4019
|
switch (tag >>> 3) {
|
@@ -4001,7 +4027,7 @@ var VerificationAddEthAddressBody = {
|
|
4001
4027
|
if (tag != 18) {
|
4002
4028
|
break;
|
4003
4029
|
}
|
4004
|
-
message.
|
4030
|
+
message.claimSignature = reader.bytes();
|
4005
4031
|
continue;
|
4006
4032
|
case 3:
|
4007
4033
|
if (tag != 26) {
|
@@ -4021,6 +4047,12 @@ var VerificationAddEthAddressBody = {
|
|
4021
4047
|
}
|
4022
4048
|
message.chainId = reader.uint32();
|
4023
4049
|
continue;
|
4050
|
+
case 7:
|
4051
|
+
if (tag != 56) {
|
4052
|
+
break;
|
4053
|
+
}
|
4054
|
+
message.protocol = reader.int32();
|
4055
|
+
continue;
|
4024
4056
|
}
|
4025
4057
|
if ((tag & 7) == 4 || tag == 0) {
|
4026
4058
|
break;
|
@@ -4032,45 +4064,51 @@ var VerificationAddEthAddressBody = {
|
|
4032
4064
|
fromJSON(object) {
|
4033
4065
|
return {
|
4034
4066
|
address: isSet2(object.address) ? bytesFromBase642(object.address) : new Uint8Array(),
|
4035
|
-
|
4067
|
+
claimSignature: isSet2(object.claimSignature) ? bytesFromBase642(object.claimSignature) : new Uint8Array(),
|
4036
4068
|
blockHash: isSet2(object.blockHash) ? bytesFromBase642(object.blockHash) : new Uint8Array(),
|
4037
4069
|
verificationType: isSet2(object.verificationType) ? Number(object.verificationType) : 0,
|
4038
|
-
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
|
4039
4072
|
};
|
4040
4073
|
},
|
4041
4074
|
toJSON(message) {
|
4042
4075
|
const obj = {};
|
4043
4076
|
message.address !== void 0 && (obj.address = base64FromBytes2(message.address !== void 0 ? message.address : new Uint8Array()));
|
4044
|
-
message.
|
4045
|
-
message.
|
4077
|
+
message.claimSignature !== void 0 && (obj.claimSignature = base64FromBytes2(
|
4078
|
+
message.claimSignature !== void 0 ? message.claimSignature : new Uint8Array()
|
4046
4079
|
));
|
4047
4080
|
message.blockHash !== void 0 && (obj.blockHash = base64FromBytes2(message.blockHash !== void 0 ? message.blockHash : new Uint8Array()));
|
4048
4081
|
message.verificationType !== void 0 && (obj.verificationType = Math.round(message.verificationType));
|
4049
4082
|
message.chainId !== void 0 && (obj.chainId = Math.round(message.chainId));
|
4083
|
+
message.protocol !== void 0 && (obj.protocol = protocolToJSON(message.protocol));
|
4050
4084
|
return obj;
|
4051
4085
|
},
|
4052
4086
|
create(base) {
|
4053
|
-
return
|
4087
|
+
return VerificationAddAddressBody.fromPartial(base != null ? base : {});
|
4054
4088
|
},
|
4055
4089
|
fromPartial(object) {
|
4056
|
-
var _a, _b, _c, _d, _e;
|
4057
|
-
const message =
|
4090
|
+
var _a, _b, _c, _d, _e, _f;
|
4091
|
+
const message = createBaseVerificationAddAddressBody();
|
4058
4092
|
message.address = (_a = object.address) != null ? _a : new Uint8Array();
|
4059
|
-
message.
|
4093
|
+
message.claimSignature = (_b = object.claimSignature) != null ? _b : new Uint8Array();
|
4060
4094
|
message.blockHash = (_c = object.blockHash) != null ? _c : new Uint8Array();
|
4061
4095
|
message.verificationType = (_d = object.verificationType) != null ? _d : 0;
|
4062
4096
|
message.chainId = (_e = object.chainId) != null ? _e : 0;
|
4097
|
+
message.protocol = (_f = object.protocol) != null ? _f : 0;
|
4063
4098
|
return message;
|
4064
4099
|
}
|
4065
4100
|
};
|
4066
4101
|
function createBaseVerificationRemoveBody() {
|
4067
|
-
return { address: new Uint8Array() };
|
4102
|
+
return { address: new Uint8Array(), protocol: 0 };
|
4068
4103
|
}
|
4069
4104
|
var VerificationRemoveBody = {
|
4070
4105
|
encode(message, writer = import_minimal2.default.Writer.create()) {
|
4071
4106
|
if (message.address.length !== 0) {
|
4072
4107
|
writer.uint32(10).bytes(message.address);
|
4073
4108
|
}
|
4109
|
+
if (message.protocol !== 0) {
|
4110
|
+
writer.uint32(16).int32(message.protocol);
|
4111
|
+
}
|
4074
4112
|
return writer;
|
4075
4113
|
},
|
4076
4114
|
decode(input, length) {
|
@@ -4086,6 +4124,12 @@ var VerificationRemoveBody = {
|
|
4086
4124
|
}
|
4087
4125
|
message.address = reader.bytes();
|
4088
4126
|
continue;
|
4127
|
+
case 2:
|
4128
|
+
if (tag != 16) {
|
4129
|
+
break;
|
4130
|
+
}
|
4131
|
+
message.protocol = reader.int32();
|
4132
|
+
continue;
|
4089
4133
|
}
|
4090
4134
|
if ((tag & 7) == 4 || tag == 0) {
|
4091
4135
|
break;
|
@@ -4095,20 +4139,25 @@ var VerificationRemoveBody = {
|
|
4095
4139
|
return message;
|
4096
4140
|
},
|
4097
4141
|
fromJSON(object) {
|
4098
|
-
return {
|
4142
|
+
return {
|
4143
|
+
address: isSet2(object.address) ? bytesFromBase642(object.address) : new Uint8Array(),
|
4144
|
+
protocol: isSet2(object.protocol) ? protocolFromJSON(object.protocol) : 0
|
4145
|
+
};
|
4099
4146
|
},
|
4100
4147
|
toJSON(message) {
|
4101
4148
|
const obj = {};
|
4102
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));
|
4103
4151
|
return obj;
|
4104
4152
|
},
|
4105
4153
|
create(base) {
|
4106
4154
|
return VerificationRemoveBody.fromPartial(base != null ? base : {});
|
4107
4155
|
},
|
4108
4156
|
fromPartial(object) {
|
4109
|
-
var _a;
|
4157
|
+
var _a, _b;
|
4110
4158
|
const message = createBaseVerificationRemoveBody();
|
4111
4159
|
message.address = (_a = object.address) != null ? _a : new Uint8Array();
|
4160
|
+
message.protocol = (_b = object.protocol) != null ? _b : 0;
|
4112
4161
|
return message;
|
4113
4162
|
}
|
4114
4163
|
};
|
package/dist/index.mjs
CHANGED
@@ -3075,6 +3075,28 @@ function reactionTypeToJSON(object) {
|
|
3075
3075
|
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum ReactionType");
|
3076
3076
|
}
|
3077
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
|
+
}
|
3078
3100
|
function createBaseMessage() {
|
3079
3101
|
return {
|
3080
3102
|
data: void 0,
|
@@ -3215,7 +3237,7 @@ function createBaseMessageData() {
|
|
3215
3237
|
castAddBody: void 0,
|
3216
3238
|
castRemoveBody: void 0,
|
3217
3239
|
reactionBody: void 0,
|
3218
|
-
|
3240
|
+
verificationAddAddressBody: void 0,
|
3219
3241
|
verificationRemoveBody: void 0,
|
3220
3242
|
userDataBody: void 0,
|
3221
3243
|
linkBody: void 0,
|
@@ -3246,8 +3268,8 @@ var MessageData = {
|
|
3246
3268
|
if (message.reactionBody !== void 0) {
|
3247
3269
|
ReactionBody.encode(message.reactionBody, writer.uint32(58).fork()).ldelim();
|
3248
3270
|
}
|
3249
|
-
if (message.
|
3250
|
-
|
3271
|
+
if (message.verificationAddAddressBody !== void 0) {
|
3272
|
+
VerificationAddAddressBody.encode(message.verificationAddAddressBody, writer.uint32(74).fork()).ldelim();
|
3251
3273
|
}
|
3252
3274
|
if (message.verificationRemoveBody !== void 0) {
|
3253
3275
|
VerificationRemoveBody.encode(message.verificationRemoveBody, writer.uint32(82).fork()).ldelim();
|
@@ -3319,7 +3341,7 @@ var MessageData = {
|
|
3319
3341
|
if (tag != 74) {
|
3320
3342
|
break;
|
3321
3343
|
}
|
3322
|
-
message.
|
3344
|
+
message.verificationAddAddressBody = VerificationAddAddressBody.decode(reader, reader.uint32());
|
3323
3345
|
continue;
|
3324
3346
|
case 10:
|
3325
3347
|
if (tag != 82) {
|
@@ -3368,7 +3390,7 @@ var MessageData = {
|
|
3368
3390
|
castAddBody: isSet2(object.castAddBody) ? CastAddBody.fromJSON(object.castAddBody) : void 0,
|
3369
3391
|
castRemoveBody: isSet2(object.castRemoveBody) ? CastRemoveBody.fromJSON(object.castRemoveBody) : void 0,
|
3370
3392
|
reactionBody: isSet2(object.reactionBody) ? ReactionBody.fromJSON(object.reactionBody) : void 0,
|
3371
|
-
|
3393
|
+
verificationAddAddressBody: isSet2(object.verificationAddAddressBody) ? VerificationAddAddressBody.fromJSON(object.verificationAddAddressBody) : void 0,
|
3372
3394
|
verificationRemoveBody: isSet2(object.verificationRemoveBody) ? VerificationRemoveBody.fromJSON(object.verificationRemoveBody) : void 0,
|
3373
3395
|
userDataBody: isSet2(object.userDataBody) ? UserDataBody.fromJSON(object.userDataBody) : void 0,
|
3374
3396
|
linkBody: isSet2(object.linkBody) ? LinkBody.fromJSON(object.linkBody) : void 0,
|
@@ -3385,7 +3407,7 @@ var MessageData = {
|
|
3385
3407
|
message.castAddBody !== void 0 && (obj.castAddBody = message.castAddBody ? CastAddBody.toJSON(message.castAddBody) : void 0);
|
3386
3408
|
message.castRemoveBody !== void 0 && (obj.castRemoveBody = message.castRemoveBody ? CastRemoveBody.toJSON(message.castRemoveBody) : void 0);
|
3387
3409
|
message.reactionBody !== void 0 && (obj.reactionBody = message.reactionBody ? ReactionBody.toJSON(message.reactionBody) : void 0);
|
3388
|
-
message.
|
3410
|
+
message.verificationAddAddressBody !== void 0 && (obj.verificationAddAddressBody = message.verificationAddAddressBody ? VerificationAddAddressBody.toJSON(message.verificationAddAddressBody) : void 0);
|
3389
3411
|
message.verificationRemoveBody !== void 0 && (obj.verificationRemoveBody = message.verificationRemoveBody ? VerificationRemoveBody.toJSON(message.verificationRemoveBody) : void 0);
|
3390
3412
|
message.userDataBody !== void 0 && (obj.userDataBody = message.userDataBody ? UserDataBody.toJSON(message.userDataBody) : void 0);
|
3391
3413
|
message.linkBody !== void 0 && (obj.linkBody = message.linkBody ? LinkBody.toJSON(message.linkBody) : void 0);
|
@@ -3406,7 +3428,7 @@ var MessageData = {
|
|
3406
3428
|
message.castAddBody = object.castAddBody !== void 0 && object.castAddBody !== null ? CastAddBody.fromPartial(object.castAddBody) : void 0;
|
3407
3429
|
message.castRemoveBody = object.castRemoveBody !== void 0 && object.castRemoveBody !== null ? CastRemoveBody.fromPartial(object.castRemoveBody) : void 0;
|
3408
3430
|
message.reactionBody = object.reactionBody !== void 0 && object.reactionBody !== null ? ReactionBody.fromPartial(object.reactionBody) : void 0;
|
3409
|
-
message.
|
3431
|
+
message.verificationAddAddressBody = object.verificationAddAddressBody !== void 0 && object.verificationAddAddressBody !== null ? VerificationAddAddressBody.fromPartial(object.verificationAddAddressBody) : void 0;
|
3410
3432
|
message.verificationRemoveBody = object.verificationRemoveBody !== void 0 && object.verificationRemoveBody !== null ? VerificationRemoveBody.fromPartial(object.verificationRemoveBody) : void 0;
|
3411
3433
|
message.userDataBody = object.userDataBody !== void 0 && object.userDataBody !== null ? UserDataBody.fromPartial(object.userDataBody) : void 0;
|
3412
3434
|
message.linkBody = object.linkBody !== void 0 && object.linkBody !== null ? LinkBody.fromPartial(object.linkBody) : void 0;
|
@@ -3893,22 +3915,23 @@ var ReactionBody = {
|
|
3893
3915
|
return message;
|
3894
3916
|
}
|
3895
3917
|
};
|
3896
|
-
function
|
3918
|
+
function createBaseVerificationAddAddressBody() {
|
3897
3919
|
return {
|
3898
3920
|
address: new Uint8Array(),
|
3899
|
-
|
3921
|
+
claimSignature: new Uint8Array(),
|
3900
3922
|
blockHash: new Uint8Array(),
|
3901
3923
|
verificationType: 0,
|
3902
|
-
chainId: 0
|
3924
|
+
chainId: 0,
|
3925
|
+
protocol: 0
|
3903
3926
|
};
|
3904
3927
|
}
|
3905
|
-
var
|
3928
|
+
var VerificationAddAddressBody = {
|
3906
3929
|
encode(message, writer = import_minimal2.default.Writer.create()) {
|
3907
3930
|
if (message.address.length !== 0) {
|
3908
3931
|
writer.uint32(10).bytes(message.address);
|
3909
3932
|
}
|
3910
|
-
if (message.
|
3911
|
-
writer.uint32(18).bytes(message.
|
3933
|
+
if (message.claimSignature.length !== 0) {
|
3934
|
+
writer.uint32(18).bytes(message.claimSignature);
|
3912
3935
|
}
|
3913
3936
|
if (message.blockHash.length !== 0) {
|
3914
3937
|
writer.uint32(26).bytes(message.blockHash);
|
@@ -3919,12 +3942,15 @@ var VerificationAddEthAddressBody = {
|
|
3919
3942
|
if (message.chainId !== 0) {
|
3920
3943
|
writer.uint32(40).uint32(message.chainId);
|
3921
3944
|
}
|
3945
|
+
if (message.protocol !== 0) {
|
3946
|
+
writer.uint32(56).int32(message.protocol);
|
3947
|
+
}
|
3922
3948
|
return writer;
|
3923
3949
|
},
|
3924
3950
|
decode(input, length) {
|
3925
3951
|
const reader = input instanceof import_minimal2.default.Reader ? input : import_minimal2.default.Reader.create(input);
|
3926
3952
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
3927
|
-
const message =
|
3953
|
+
const message = createBaseVerificationAddAddressBody();
|
3928
3954
|
while (reader.pos < end) {
|
3929
3955
|
const tag = reader.uint32();
|
3930
3956
|
switch (tag >>> 3) {
|
@@ -3938,7 +3964,7 @@ var VerificationAddEthAddressBody = {
|
|
3938
3964
|
if (tag != 18) {
|
3939
3965
|
break;
|
3940
3966
|
}
|
3941
|
-
message.
|
3967
|
+
message.claimSignature = reader.bytes();
|
3942
3968
|
continue;
|
3943
3969
|
case 3:
|
3944
3970
|
if (tag != 26) {
|
@@ -3958,6 +3984,12 @@ var VerificationAddEthAddressBody = {
|
|
3958
3984
|
}
|
3959
3985
|
message.chainId = reader.uint32();
|
3960
3986
|
continue;
|
3987
|
+
case 7:
|
3988
|
+
if (tag != 56) {
|
3989
|
+
break;
|
3990
|
+
}
|
3991
|
+
message.protocol = reader.int32();
|
3992
|
+
continue;
|
3961
3993
|
}
|
3962
3994
|
if ((tag & 7) == 4 || tag == 0) {
|
3963
3995
|
break;
|
@@ -3969,45 +4001,51 @@ var VerificationAddEthAddressBody = {
|
|
3969
4001
|
fromJSON(object) {
|
3970
4002
|
return {
|
3971
4003
|
address: isSet2(object.address) ? bytesFromBase642(object.address) : new Uint8Array(),
|
3972
|
-
|
4004
|
+
claimSignature: isSet2(object.claimSignature) ? bytesFromBase642(object.claimSignature) : new Uint8Array(),
|
3973
4005
|
blockHash: isSet2(object.blockHash) ? bytesFromBase642(object.blockHash) : new Uint8Array(),
|
3974
4006
|
verificationType: isSet2(object.verificationType) ? Number(object.verificationType) : 0,
|
3975
|
-
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
|
3976
4009
|
};
|
3977
4010
|
},
|
3978
4011
|
toJSON(message) {
|
3979
4012
|
const obj = {};
|
3980
4013
|
message.address !== void 0 && (obj.address = base64FromBytes2(message.address !== void 0 ? message.address : new Uint8Array()));
|
3981
|
-
message.
|
3982
|
-
message.
|
4014
|
+
message.claimSignature !== void 0 && (obj.claimSignature = base64FromBytes2(
|
4015
|
+
message.claimSignature !== void 0 ? message.claimSignature : new Uint8Array()
|
3983
4016
|
));
|
3984
4017
|
message.blockHash !== void 0 && (obj.blockHash = base64FromBytes2(message.blockHash !== void 0 ? message.blockHash : new Uint8Array()));
|
3985
4018
|
message.verificationType !== void 0 && (obj.verificationType = Math.round(message.verificationType));
|
3986
4019
|
message.chainId !== void 0 && (obj.chainId = Math.round(message.chainId));
|
4020
|
+
message.protocol !== void 0 && (obj.protocol = protocolToJSON(message.protocol));
|
3987
4021
|
return obj;
|
3988
4022
|
},
|
3989
4023
|
create(base) {
|
3990
|
-
return
|
4024
|
+
return VerificationAddAddressBody.fromPartial(base != null ? base : {});
|
3991
4025
|
},
|
3992
4026
|
fromPartial(object) {
|
3993
|
-
var _a, _b, _c, _d, _e;
|
3994
|
-
const message =
|
4027
|
+
var _a, _b, _c, _d, _e, _f;
|
4028
|
+
const message = createBaseVerificationAddAddressBody();
|
3995
4029
|
message.address = (_a = object.address) != null ? _a : new Uint8Array();
|
3996
|
-
message.
|
4030
|
+
message.claimSignature = (_b = object.claimSignature) != null ? _b : new Uint8Array();
|
3997
4031
|
message.blockHash = (_c = object.blockHash) != null ? _c : new Uint8Array();
|
3998
4032
|
message.verificationType = (_d = object.verificationType) != null ? _d : 0;
|
3999
4033
|
message.chainId = (_e = object.chainId) != null ? _e : 0;
|
4034
|
+
message.protocol = (_f = object.protocol) != null ? _f : 0;
|
4000
4035
|
return message;
|
4001
4036
|
}
|
4002
4037
|
};
|
4003
4038
|
function createBaseVerificationRemoveBody() {
|
4004
|
-
return { address: new Uint8Array() };
|
4039
|
+
return { address: new Uint8Array(), protocol: 0 };
|
4005
4040
|
}
|
4006
4041
|
var VerificationRemoveBody = {
|
4007
4042
|
encode(message, writer = import_minimal2.default.Writer.create()) {
|
4008
4043
|
if (message.address.length !== 0) {
|
4009
4044
|
writer.uint32(10).bytes(message.address);
|
4010
4045
|
}
|
4046
|
+
if (message.protocol !== 0) {
|
4047
|
+
writer.uint32(16).int32(message.protocol);
|
4048
|
+
}
|
4011
4049
|
return writer;
|
4012
4050
|
},
|
4013
4051
|
decode(input, length) {
|
@@ -4023,6 +4061,12 @@ var VerificationRemoveBody = {
|
|
4023
4061
|
}
|
4024
4062
|
message.address = reader.bytes();
|
4025
4063
|
continue;
|
4064
|
+
case 2:
|
4065
|
+
if (tag != 16) {
|
4066
|
+
break;
|
4067
|
+
}
|
4068
|
+
message.protocol = reader.int32();
|
4069
|
+
continue;
|
4026
4070
|
}
|
4027
4071
|
if ((tag & 7) == 4 || tag == 0) {
|
4028
4072
|
break;
|
@@ -4032,20 +4076,25 @@ var VerificationRemoveBody = {
|
|
4032
4076
|
return message;
|
4033
4077
|
},
|
4034
4078
|
fromJSON(object) {
|
4035
|
-
return {
|
4079
|
+
return {
|
4080
|
+
address: isSet2(object.address) ? bytesFromBase642(object.address) : new Uint8Array(),
|
4081
|
+
protocol: isSet2(object.protocol) ? protocolFromJSON(object.protocol) : 0
|
4082
|
+
};
|
4036
4083
|
},
|
4037
4084
|
toJSON(message) {
|
4038
4085
|
const obj = {};
|
4039
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));
|
4040
4088
|
return obj;
|
4041
4089
|
},
|
4042
4090
|
create(base) {
|
4043
4091
|
return VerificationRemoveBody.fromPartial(base != null ? base : {});
|
4044
4092
|
},
|
4045
4093
|
fromPartial(object) {
|
4046
|
-
var _a;
|
4094
|
+
var _a, _b;
|
4047
4095
|
const message = createBaseVerificationRemoveBody();
|
4048
4096
|
message.address = (_a = object.address) != null ? _a : new Uint8Array();
|
4097
|
+
message.protocol = (_b = object.protocol) != null ? _b : 0;
|
4049
4098
|
return message;
|
4050
4099
|
}
|
4051
4100
|
};
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@farcaster/hub-web",
|
3
|
-
"version": "0.
|
3
|
+
"version": "0.8.0",
|
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.
|
31
|
+
"@farcaster/core": "^0.14.0",
|
32
32
|
"@improbable-eng/grpc-web": "^0.15.0",
|
33
33
|
"rxjs": "^7.8.0"
|
34
34
|
}
|