@farcaster/hub-web 0.8.9 → 0.8.11
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 +257 -64
- package/dist/index.js +66 -3
- package/dist/index.mjs +65 -3
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -2667,6 +2667,7 @@ __export(src_exports, {
|
|
2667
2667
|
HubServiceGetIdRegistryOnChainEventByAddressDesc: () => HubServiceGetIdRegistryOnChainEventByAddressDesc,
|
2668
2668
|
HubServiceGetIdRegistryOnChainEventDesc: () => HubServiceGetIdRegistryOnChainEventDesc,
|
2669
2669
|
HubServiceGetInfoDesc: () => HubServiceGetInfoDesc,
|
2670
|
+
HubServiceGetLinkCompactStateMessageByFidDesc: () => HubServiceGetLinkCompactStateMessageByFidDesc,
|
2670
2671
|
HubServiceGetLinkDesc: () => HubServiceGetLinkDesc,
|
2671
2672
|
HubServiceGetLinksByFidDesc: () => HubServiceGetLinksByFidDesc,
|
2672
2673
|
HubServiceGetLinksByTargetDesc: () => HubServiceGetLinksByTargetDesc,
|
@@ -3117,6 +3118,28 @@ function userDataTypeToJSON(object) {
|
|
3117
3118
|
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum UserDataType");
|
3118
3119
|
}
|
3119
3120
|
}
|
3121
|
+
function castTypeFromJSON(object) {
|
3122
|
+
switch (object) {
|
3123
|
+
case 0:
|
3124
|
+
case "CAST":
|
3125
|
+
return 0 /* CAST */;
|
3126
|
+
case 1:
|
3127
|
+
case "LONG_CAST":
|
3128
|
+
return 1 /* LONG_CAST */;
|
3129
|
+
default:
|
3130
|
+
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum CastType");
|
3131
|
+
}
|
3132
|
+
}
|
3133
|
+
function castTypeToJSON(object) {
|
3134
|
+
switch (object) {
|
3135
|
+
case 0 /* CAST */:
|
3136
|
+
return "CAST";
|
3137
|
+
case 1 /* LONG_CAST */:
|
3138
|
+
return "LONG_CAST";
|
3139
|
+
default:
|
3140
|
+
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum CastType");
|
3141
|
+
}
|
3142
|
+
}
|
3120
3143
|
function reactionTypeFromJSON(object) {
|
3121
3144
|
switch (object) {
|
3122
3145
|
case 0:
|
@@ -3653,7 +3676,8 @@ function createBaseCastAddBody() {
|
|
3653
3676
|
parentUrl: void 0,
|
3654
3677
|
text: "",
|
3655
3678
|
mentionsPositions: [],
|
3656
|
-
embeds: []
|
3679
|
+
embeds: [],
|
3680
|
+
type: 0
|
3657
3681
|
};
|
3658
3682
|
}
|
3659
3683
|
var CastAddBody = {
|
@@ -3683,6 +3707,9 @@ var CastAddBody = {
|
|
3683
3707
|
for (const v of message.embeds) {
|
3684
3708
|
Embed.encode(v, writer.uint32(50).fork()).ldelim();
|
3685
3709
|
}
|
3710
|
+
if (message.type !== 0) {
|
3711
|
+
writer.uint32(64).int32(message.type);
|
3712
|
+
}
|
3686
3713
|
return writer;
|
3687
3714
|
},
|
3688
3715
|
decode(input, length) {
|
@@ -3748,6 +3775,12 @@ var CastAddBody = {
|
|
3748
3775
|
}
|
3749
3776
|
message.embeds.push(Embed.decode(reader, reader.uint32()));
|
3750
3777
|
continue;
|
3778
|
+
case 8:
|
3779
|
+
if (tag != 64) {
|
3780
|
+
break;
|
3781
|
+
}
|
3782
|
+
message.type = reader.int32();
|
3783
|
+
continue;
|
3751
3784
|
}
|
3752
3785
|
if ((tag & 7) == 4 || tag == 0) {
|
3753
3786
|
break;
|
@@ -3764,7 +3797,8 @@ var CastAddBody = {
|
|
3764
3797
|
parentUrl: isSet2(object.parentUrl) ? String(object.parentUrl) : void 0,
|
3765
3798
|
text: isSet2(object.text) ? String(object.text) : "",
|
3766
3799
|
mentionsPositions: Array.isArray(object == null ? void 0 : object.mentionsPositions) ? object.mentionsPositions.map((e) => Number(e)) : [],
|
3767
|
-
embeds: Array.isArray(object == null ? void 0 : object.embeds) ? object.embeds.map((e) => Embed.fromJSON(e)) : []
|
3800
|
+
embeds: Array.isArray(object == null ? void 0 : object.embeds) ? object.embeds.map((e) => Embed.fromJSON(e)) : [],
|
3801
|
+
type: isSet2(object.type) ? castTypeFromJSON(object.type) : 0
|
3768
3802
|
};
|
3769
3803
|
},
|
3770
3804
|
toJSON(message) {
|
@@ -3792,13 +3826,14 @@ var CastAddBody = {
|
|
3792
3826
|
} else {
|
3793
3827
|
obj.embeds = [];
|
3794
3828
|
}
|
3829
|
+
message.type !== void 0 && (obj.type = castTypeToJSON(message.type));
|
3795
3830
|
return obj;
|
3796
3831
|
},
|
3797
3832
|
create(base) {
|
3798
3833
|
return CastAddBody.fromPartial(base != null ? base : {});
|
3799
3834
|
},
|
3800
3835
|
fromPartial(object) {
|
3801
|
-
var _a, _b, _c, _d, _e, _f;
|
3836
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
3802
3837
|
const message = createBaseCastAddBody();
|
3803
3838
|
message.embedsDeprecated = ((_a = object.embedsDeprecated) == null ? void 0 : _a.map((e) => e)) || [];
|
3804
3839
|
message.mentions = ((_b = object.mentions) == null ? void 0 : _b.map((e) => e)) || [];
|
@@ -3807,6 +3842,7 @@ var CastAddBody = {
|
|
3807
3842
|
message.text = (_d = object.text) != null ? _d : "";
|
3808
3843
|
message.mentionsPositions = ((_e = object.mentionsPositions) == null ? void 0 : _e.map((e) => e)) || [];
|
3809
3844
|
message.embeds = ((_f = object.embeds) == null ? void 0 : _f.map((e) => Embed.fromPartial(e))) || [];
|
3845
|
+
message.type = (_g = object.type) != null ? _g : 0;
|
3810
3846
|
return message;
|
3811
3847
|
}
|
3812
3848
|
};
|
@@ -8938,6 +8974,7 @@ var HubServiceClientImpl = class {
|
|
8938
8974
|
this.getAllVerificationMessagesByFid = this.getAllVerificationMessagesByFid.bind(this);
|
8939
8975
|
this.getAllUserDataMessagesByFid = this.getAllUserDataMessagesByFid.bind(this);
|
8940
8976
|
this.getAllLinkMessagesByFid = this.getAllLinkMessagesByFid.bind(this);
|
8977
|
+
this.getLinkCompactStateMessageByFid = this.getLinkCompactStateMessageByFid.bind(this);
|
8941
8978
|
this.getInfo = this.getInfo.bind(this);
|
8942
8979
|
this.getCurrentPeers = this.getCurrentPeers.bind(this);
|
8943
8980
|
this.getSyncStatus = this.getSyncStatus.bind(this);
|
@@ -9049,6 +9086,9 @@ var HubServiceClientImpl = class {
|
|
9049
9086
|
getAllLinkMessagesByFid(request, metadata) {
|
9050
9087
|
return this.rpc.unary(HubServiceGetAllLinkMessagesByFidDesc, FidRequest.fromPartial(request), metadata);
|
9051
9088
|
}
|
9089
|
+
getLinkCompactStateMessageByFid(request, metadata) {
|
9090
|
+
return this.rpc.unary(HubServiceGetLinkCompactStateMessageByFidDesc, FidRequest.fromPartial(request), metadata);
|
9091
|
+
}
|
9052
9092
|
getInfo(request, metadata) {
|
9053
9093
|
return this.rpc.unary(HubServiceGetInfoDesc, HubInfoRequest.fromPartial(request), metadata);
|
9054
9094
|
}
|
@@ -9798,6 +9838,28 @@ var HubServiceGetAllLinkMessagesByFidDesc = {
|
|
9798
9838
|
}
|
9799
9839
|
}
|
9800
9840
|
};
|
9841
|
+
var HubServiceGetLinkCompactStateMessageByFidDesc = {
|
9842
|
+
methodName: "GetLinkCompactStateMessageByFid",
|
9843
|
+
service: HubServiceDesc,
|
9844
|
+
requestStream: false,
|
9845
|
+
responseStream: false,
|
9846
|
+
requestType: {
|
9847
|
+
serializeBinary() {
|
9848
|
+
return FidRequest.encode(this).finish();
|
9849
|
+
}
|
9850
|
+
},
|
9851
|
+
responseType: {
|
9852
|
+
deserializeBinary(data) {
|
9853
|
+
const value = MessagesResponse.decode(data);
|
9854
|
+
return {
|
9855
|
+
...value,
|
9856
|
+
toObject() {
|
9857
|
+
return value;
|
9858
|
+
}
|
9859
|
+
};
|
9860
|
+
}
|
9861
|
+
}
|
9862
|
+
};
|
9801
9863
|
var HubServiceGetInfoDesc = {
|
9802
9864
|
methodName: "GetInfo",
|
9803
9865
|
service: HubServiceDesc,
|
@@ -10635,6 +10697,7 @@ var getAuthMetadata = (username, password) => {
|
|
10635
10697
|
HubServiceGetIdRegistryOnChainEventByAddressDesc,
|
10636
10698
|
HubServiceGetIdRegistryOnChainEventDesc,
|
10637
10699
|
HubServiceGetInfoDesc,
|
10700
|
+
HubServiceGetLinkCompactStateMessageByFidDesc,
|
10638
10701
|
HubServiceGetLinkDesc,
|
10639
10702
|
HubServiceGetLinksByFidDesc,
|
10640
10703
|
HubServiceGetLinksByTargetDesc,
|
package/dist/index.mjs
CHANGED
@@ -3053,6 +3053,28 @@ function userDataTypeToJSON(object) {
|
|
3053
3053
|
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum UserDataType");
|
3054
3054
|
}
|
3055
3055
|
}
|
3056
|
+
function castTypeFromJSON(object) {
|
3057
|
+
switch (object) {
|
3058
|
+
case 0:
|
3059
|
+
case "CAST":
|
3060
|
+
return 0 /* CAST */;
|
3061
|
+
case 1:
|
3062
|
+
case "LONG_CAST":
|
3063
|
+
return 1 /* LONG_CAST */;
|
3064
|
+
default:
|
3065
|
+
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum CastType");
|
3066
|
+
}
|
3067
|
+
}
|
3068
|
+
function castTypeToJSON(object) {
|
3069
|
+
switch (object) {
|
3070
|
+
case 0 /* CAST */:
|
3071
|
+
return "CAST";
|
3072
|
+
case 1 /* LONG_CAST */:
|
3073
|
+
return "LONG_CAST";
|
3074
|
+
default:
|
3075
|
+
throw new tsProtoGlobalThis2.Error("Unrecognized enum value " + object + " for enum CastType");
|
3076
|
+
}
|
3077
|
+
}
|
3056
3078
|
function reactionTypeFromJSON(object) {
|
3057
3079
|
switch (object) {
|
3058
3080
|
case 0:
|
@@ -3589,7 +3611,8 @@ function createBaseCastAddBody() {
|
|
3589
3611
|
parentUrl: void 0,
|
3590
3612
|
text: "",
|
3591
3613
|
mentionsPositions: [],
|
3592
|
-
embeds: []
|
3614
|
+
embeds: [],
|
3615
|
+
type: 0
|
3593
3616
|
};
|
3594
3617
|
}
|
3595
3618
|
var CastAddBody = {
|
@@ -3619,6 +3642,9 @@ var CastAddBody = {
|
|
3619
3642
|
for (const v of message.embeds) {
|
3620
3643
|
Embed.encode(v, writer.uint32(50).fork()).ldelim();
|
3621
3644
|
}
|
3645
|
+
if (message.type !== 0) {
|
3646
|
+
writer.uint32(64).int32(message.type);
|
3647
|
+
}
|
3622
3648
|
return writer;
|
3623
3649
|
},
|
3624
3650
|
decode(input, length) {
|
@@ -3684,6 +3710,12 @@ var CastAddBody = {
|
|
3684
3710
|
}
|
3685
3711
|
message.embeds.push(Embed.decode(reader, reader.uint32()));
|
3686
3712
|
continue;
|
3713
|
+
case 8:
|
3714
|
+
if (tag != 64) {
|
3715
|
+
break;
|
3716
|
+
}
|
3717
|
+
message.type = reader.int32();
|
3718
|
+
continue;
|
3687
3719
|
}
|
3688
3720
|
if ((tag & 7) == 4 || tag == 0) {
|
3689
3721
|
break;
|
@@ -3700,7 +3732,8 @@ var CastAddBody = {
|
|
3700
3732
|
parentUrl: isSet2(object.parentUrl) ? String(object.parentUrl) : void 0,
|
3701
3733
|
text: isSet2(object.text) ? String(object.text) : "",
|
3702
3734
|
mentionsPositions: Array.isArray(object == null ? void 0 : object.mentionsPositions) ? object.mentionsPositions.map((e) => Number(e)) : [],
|
3703
|
-
embeds: Array.isArray(object == null ? void 0 : object.embeds) ? object.embeds.map((e) => Embed.fromJSON(e)) : []
|
3735
|
+
embeds: Array.isArray(object == null ? void 0 : object.embeds) ? object.embeds.map((e) => Embed.fromJSON(e)) : [],
|
3736
|
+
type: isSet2(object.type) ? castTypeFromJSON(object.type) : 0
|
3704
3737
|
};
|
3705
3738
|
},
|
3706
3739
|
toJSON(message) {
|
@@ -3728,13 +3761,14 @@ var CastAddBody = {
|
|
3728
3761
|
} else {
|
3729
3762
|
obj.embeds = [];
|
3730
3763
|
}
|
3764
|
+
message.type !== void 0 && (obj.type = castTypeToJSON(message.type));
|
3731
3765
|
return obj;
|
3732
3766
|
},
|
3733
3767
|
create(base) {
|
3734
3768
|
return CastAddBody.fromPartial(base != null ? base : {});
|
3735
3769
|
},
|
3736
3770
|
fromPartial(object) {
|
3737
|
-
var _a, _b, _c, _d, _e, _f;
|
3771
|
+
var _a, _b, _c, _d, _e, _f, _g;
|
3738
3772
|
const message = createBaseCastAddBody();
|
3739
3773
|
message.embedsDeprecated = ((_a = object.embedsDeprecated) == null ? void 0 : _a.map((e) => e)) || [];
|
3740
3774
|
message.mentions = ((_b = object.mentions) == null ? void 0 : _b.map((e) => e)) || [];
|
@@ -3743,6 +3777,7 @@ var CastAddBody = {
|
|
3743
3777
|
message.text = (_d = object.text) != null ? _d : "";
|
3744
3778
|
message.mentionsPositions = ((_e = object.mentionsPositions) == null ? void 0 : _e.map((e) => e)) || [];
|
3745
3779
|
message.embeds = ((_f = object.embeds) == null ? void 0 : _f.map((e) => Embed.fromPartial(e))) || [];
|
3780
|
+
message.type = (_g = object.type) != null ? _g : 0;
|
3746
3781
|
return message;
|
3747
3782
|
}
|
3748
3783
|
};
|
@@ -8874,6 +8909,7 @@ var HubServiceClientImpl = class {
|
|
8874
8909
|
this.getAllVerificationMessagesByFid = this.getAllVerificationMessagesByFid.bind(this);
|
8875
8910
|
this.getAllUserDataMessagesByFid = this.getAllUserDataMessagesByFid.bind(this);
|
8876
8911
|
this.getAllLinkMessagesByFid = this.getAllLinkMessagesByFid.bind(this);
|
8912
|
+
this.getLinkCompactStateMessageByFid = this.getLinkCompactStateMessageByFid.bind(this);
|
8877
8913
|
this.getInfo = this.getInfo.bind(this);
|
8878
8914
|
this.getCurrentPeers = this.getCurrentPeers.bind(this);
|
8879
8915
|
this.getSyncStatus = this.getSyncStatus.bind(this);
|
@@ -8985,6 +9021,9 @@ var HubServiceClientImpl = class {
|
|
8985
9021
|
getAllLinkMessagesByFid(request, metadata) {
|
8986
9022
|
return this.rpc.unary(HubServiceGetAllLinkMessagesByFidDesc, FidRequest.fromPartial(request), metadata);
|
8987
9023
|
}
|
9024
|
+
getLinkCompactStateMessageByFid(request, metadata) {
|
9025
|
+
return this.rpc.unary(HubServiceGetLinkCompactStateMessageByFidDesc, FidRequest.fromPartial(request), metadata);
|
9026
|
+
}
|
8988
9027
|
getInfo(request, metadata) {
|
8989
9028
|
return this.rpc.unary(HubServiceGetInfoDesc, HubInfoRequest.fromPartial(request), metadata);
|
8990
9029
|
}
|
@@ -9734,6 +9773,28 @@ var HubServiceGetAllLinkMessagesByFidDesc = {
|
|
9734
9773
|
}
|
9735
9774
|
}
|
9736
9775
|
};
|
9776
|
+
var HubServiceGetLinkCompactStateMessageByFidDesc = {
|
9777
|
+
methodName: "GetLinkCompactStateMessageByFid",
|
9778
|
+
service: HubServiceDesc,
|
9779
|
+
requestStream: false,
|
9780
|
+
responseStream: false,
|
9781
|
+
requestType: {
|
9782
|
+
serializeBinary() {
|
9783
|
+
return FidRequest.encode(this).finish();
|
9784
|
+
}
|
9785
|
+
},
|
9786
|
+
responseType: {
|
9787
|
+
deserializeBinary(data) {
|
9788
|
+
const value = MessagesResponse.decode(data);
|
9789
|
+
return {
|
9790
|
+
...value,
|
9791
|
+
toObject() {
|
9792
|
+
return value;
|
9793
|
+
}
|
9794
|
+
};
|
9795
|
+
}
|
9796
|
+
}
|
9797
|
+
};
|
9737
9798
|
var HubServiceGetInfoDesc = {
|
9738
9799
|
methodName: "GetInfo",
|
9739
9800
|
service: HubServiceDesc,
|
@@ -10570,6 +10631,7 @@ export {
|
|
10570
10631
|
HubServiceGetIdRegistryOnChainEventByAddressDesc,
|
10571
10632
|
HubServiceGetIdRegistryOnChainEventDesc,
|
10572
10633
|
HubServiceGetInfoDesc,
|
10634
|
+
HubServiceGetLinkCompactStateMessageByFidDesc,
|
10573
10635
|
HubServiceGetLinkDesc,
|
10574
10636
|
HubServiceGetLinksByFidDesc,
|
10575
10637
|
HubServiceGetLinksByTargetDesc,
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@farcaster/hub-web",
|
3
|
-
"version": "0.8.
|
3
|
+
"version": "0.8.11",
|
4
4
|
"main": "./dist/index.js",
|
5
5
|
"module": "./dist/index.mjs",
|
6
6
|
"types": "./dist/index.d.ts",
|
@@ -32,7 +32,7 @@
|
|
32
32
|
"ts-proto": "^1.146.0"
|
33
33
|
},
|
34
34
|
"dependencies": {
|
35
|
-
"@farcaster/core": "^0.14.
|
35
|
+
"@farcaster/core": "^0.14.16",
|
36
36
|
"@improbable-eng/grpc-web": "^0.15.0",
|
37
37
|
"rxjs": "^7.8.0"
|
38
38
|
}
|