@farcaster/hub-web 0.5.0 → 0.6.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 +1208 -619
- package/dist/index.js +683 -345
- package/dist/index.mjs +686 -349
- package/package.json +2 -2
package/dist/index.js
CHANGED
@@ -2646,8 +2646,7 @@ __export(src_exports, {
|
|
2646
2646
|
AdminServiceRebuildSyncTrieDesc: () => AdminServiceRebuildSyncTrieDesc,
|
2647
2647
|
AdminServiceSubmitIdRegistryEventDesc: () => AdminServiceSubmitIdRegistryEventDesc,
|
2648
2648
|
AdminServiceSubmitNameRegistryEventDesc: () => AdminServiceSubmitNameRegistryEventDesc,
|
2649
|
-
|
2650
|
-
AdminServiceSubmitStorageAdminRegistryEventDesc: () => AdminServiceSubmitStorageAdminRegistryEventDesc,
|
2649
|
+
AdminServiceSubmitOnChainEventDesc: () => AdminServiceSubmitOnChainEventDesc,
|
2651
2650
|
GrpcWebError: () => GrpcWebError,
|
2652
2651
|
GrpcWebImpl: () => GrpcWebImpl,
|
2653
2652
|
HubServiceClientImpl: () => HubServiceClientImpl,
|
@@ -2664,6 +2663,7 @@ __export(src_exports, {
|
|
2664
2663
|
HubServiceGetCastsByFidDesc: () => HubServiceGetCastsByFidDesc,
|
2665
2664
|
HubServiceGetCastsByMentionDesc: () => HubServiceGetCastsByMentionDesc,
|
2666
2665
|
HubServiceGetCastsByParentDesc: () => HubServiceGetCastsByParentDesc,
|
2666
|
+
HubServiceGetCurrentStorageLimitsByFidDesc: () => HubServiceGetCurrentStorageLimitsByFidDesc,
|
2667
2667
|
HubServiceGetEventDesc: () => HubServiceGetEventDesc,
|
2668
2668
|
HubServiceGetFidsDesc: () => HubServiceGetFidsDesc,
|
2669
2669
|
HubServiceGetIdRegistryEventByAddressDesc: () => HubServiceGetIdRegistryEventByAddressDesc,
|
@@ -2673,11 +2673,12 @@ __export(src_exports, {
|
|
2673
2673
|
HubServiceGetLinksByFidDesc: () => HubServiceGetLinksByFidDesc,
|
2674
2674
|
HubServiceGetLinksByTargetDesc: () => HubServiceGetLinksByTargetDesc,
|
2675
2675
|
HubServiceGetNameRegistryEventDesc: () => HubServiceGetNameRegistryEventDesc,
|
2676
|
+
HubServiceGetOnChainEventsDesc: () => HubServiceGetOnChainEventsDesc,
|
2677
|
+
HubServiceGetOnChainSignerDesc: () => HubServiceGetOnChainSignerDesc,
|
2676
2678
|
HubServiceGetReactionDesc: () => HubServiceGetReactionDesc,
|
2677
2679
|
HubServiceGetReactionsByCastDesc: () => HubServiceGetReactionsByCastDesc,
|
2678
2680
|
HubServiceGetReactionsByFidDesc: () => HubServiceGetReactionsByFidDesc,
|
2679
2681
|
HubServiceGetReactionsByTargetDesc: () => HubServiceGetReactionsByTargetDesc,
|
2680
|
-
HubServiceGetRentRegistryEventsDesc: () => HubServiceGetRentRegistryEventsDesc,
|
2681
2682
|
HubServiceGetSignerDesc: () => HubServiceGetSignerDesc,
|
2682
2683
|
HubServiceGetSignersByFidDesc: () => HubServiceGetSignersByFidDesc,
|
2683
2684
|
HubServiceGetSyncMetadataByPrefixDesc: () => HubServiceGetSyncMetadataByPrefixDesc,
|
@@ -2702,7 +2703,7 @@ __reExport(src_exports, require("@farcaster/core"), module.exports);
|
|
2702
2703
|
|
2703
2704
|
// src/generated/rpc.ts
|
2704
2705
|
init_cjs_shims();
|
2705
|
-
var import_grpc_web = require("@improbable-eng/grpc-web");
|
2706
|
+
var import_grpc_web = __toESM(require("@improbable-eng/grpc-web"));
|
2706
2707
|
var import_browser_headers = __toESM(require_browser_headers());
|
2707
2708
|
var import_rxjs = require("rxjs");
|
2708
2709
|
var import_operators = require("rxjs/operators");
|
@@ -4789,100 +4790,166 @@ function isSet4(value) {
|
|
4789
4790
|
return value !== null && value !== void 0;
|
4790
4791
|
}
|
4791
4792
|
|
4792
|
-
// src/generated/
|
4793
|
+
// src/generated/onchain_event.ts
|
4793
4794
|
init_cjs_shims();
|
4794
4795
|
var import_long4 = __toESM(require_long());
|
4795
4796
|
var import_minimal5 = __toESM(require_minimal2());
|
4796
|
-
function
|
4797
|
+
function onChainEventTypeFromJSON(object) {
|
4797
4798
|
switch (object) {
|
4798
4799
|
case 0:
|
4799
|
-
case "
|
4800
|
-
return 0 /*
|
4800
|
+
case "EVENT_TYPE_NONE":
|
4801
|
+
return 0 /* EVENT_TYPE_NONE */;
|
4801
4802
|
case 1:
|
4802
|
-
case "
|
4803
|
-
return 1 /*
|
4803
|
+
case "EVENT_TYPE_SIGNER":
|
4804
|
+
return 1 /* EVENT_TYPE_SIGNER */;
|
4804
4805
|
case 2:
|
4805
|
-
case "
|
4806
|
-
return 2 /*
|
4806
|
+
case "EVENT_TYPE_SIGNER_MIGRATED":
|
4807
|
+
return 2 /* EVENT_TYPE_SIGNER_MIGRATED */;
|
4807
4808
|
case 3:
|
4808
|
-
case "
|
4809
|
-
return 3 /*
|
4809
|
+
case "EVENT_TYPE_ID_REGISTER":
|
4810
|
+
return 3 /* EVENT_TYPE_ID_REGISTER */;
|
4810
4811
|
case 4:
|
4811
|
-
case "
|
4812
|
-
return 4 /*
|
4813
|
-
|
4814
|
-
|
4815
|
-
|
4812
|
+
case "EVENT_TYPE_STORAGE_RENT":
|
4813
|
+
return 4 /* EVENT_TYPE_STORAGE_RENT */;
|
4814
|
+
default:
|
4815
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum OnChainEventType");
|
4816
|
+
}
|
4817
|
+
}
|
4818
|
+
function onChainEventTypeToJSON(object) {
|
4819
|
+
switch (object) {
|
4820
|
+
case 0 /* EVENT_TYPE_NONE */:
|
4821
|
+
return "EVENT_TYPE_NONE";
|
4822
|
+
case 1 /* EVENT_TYPE_SIGNER */:
|
4823
|
+
return "EVENT_TYPE_SIGNER";
|
4824
|
+
case 2 /* EVENT_TYPE_SIGNER_MIGRATED */:
|
4825
|
+
return "EVENT_TYPE_SIGNER_MIGRATED";
|
4826
|
+
case 3 /* EVENT_TYPE_ID_REGISTER */:
|
4827
|
+
return "EVENT_TYPE_ID_REGISTER";
|
4828
|
+
case 4 /* EVENT_TYPE_STORAGE_RENT */:
|
4829
|
+
return "EVENT_TYPE_STORAGE_RENT";
|
4816
4830
|
default:
|
4817
|
-
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum
|
4831
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum OnChainEventType");
|
4818
4832
|
}
|
4819
4833
|
}
|
4820
|
-
function
|
4834
|
+
function signerEventTypeFromJSON(object) {
|
4835
|
+
switch (object) {
|
4836
|
+
case 0:
|
4837
|
+
case "SIGNER_EVENT_TYPE_NONE":
|
4838
|
+
return 0 /* NONE */;
|
4839
|
+
case 1:
|
4840
|
+
case "SIGNER_EVENT_TYPE_ADD":
|
4841
|
+
return 1 /* ADD */;
|
4842
|
+
case 2:
|
4843
|
+
case "SIGNER_EVENT_TYPE_REMOVE":
|
4844
|
+
return 2 /* REMOVE */;
|
4845
|
+
case 3:
|
4846
|
+
case "SIGNER_EVENT_TYPE_ADMIN_RESET":
|
4847
|
+
return 3 /* ADMIN_RESET */;
|
4848
|
+
default:
|
4849
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum SignerEventType");
|
4850
|
+
}
|
4851
|
+
}
|
4852
|
+
function signerEventTypeToJSON(object) {
|
4821
4853
|
switch (object) {
|
4822
4854
|
case 0 /* NONE */:
|
4823
|
-
return "
|
4824
|
-
case 1 /*
|
4825
|
-
return "
|
4826
|
-
case 2 /*
|
4827
|
-
return "
|
4828
|
-
case 3 /*
|
4829
|
-
return "
|
4830
|
-
case 4 /* SET_DEPRECATION_TIMESTAMP */:
|
4831
|
-
return "STORAGE_REGISTRY_EVENT_TYPE_SET_DEPRECATION_TIMESTAMP";
|
4832
|
-
case 5 /* SET_GRACE_PERIOD */:
|
4833
|
-
return "STORAGE_REGISTRY_EVENT_TYPE_SET_GRACE_PERIOD";
|
4855
|
+
return "SIGNER_EVENT_TYPE_NONE";
|
4856
|
+
case 1 /* ADD */:
|
4857
|
+
return "SIGNER_EVENT_TYPE_ADD";
|
4858
|
+
case 2 /* REMOVE */:
|
4859
|
+
return "SIGNER_EVENT_TYPE_REMOVE";
|
4860
|
+
case 3 /* ADMIN_RESET */:
|
4861
|
+
return "SIGNER_EVENT_TYPE_ADMIN_RESET";
|
4834
4862
|
default:
|
4835
|
-
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum
|
4863
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum SignerEventType");
|
4836
4864
|
}
|
4837
4865
|
}
|
4838
|
-
function
|
4866
|
+
function idRegisterEventTypeFromJSON(object) {
|
4867
|
+
switch (object) {
|
4868
|
+
case 0:
|
4869
|
+
case "ID_REGISTER_EVENT_TYPE_NONE":
|
4870
|
+
return 0 /* NONE */;
|
4871
|
+
case 1:
|
4872
|
+
case "ID_REGISTER_EVENT_TYPE_REGISTER":
|
4873
|
+
return 1 /* REGISTER */;
|
4874
|
+
case 2:
|
4875
|
+
case "ID_REGISTER_EVENT_TYPE_TRANSFER":
|
4876
|
+
return 2 /* TRANSFER */;
|
4877
|
+
default:
|
4878
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum IdRegisterEventType");
|
4879
|
+
}
|
4880
|
+
}
|
4881
|
+
function idRegisterEventTypeToJSON(object) {
|
4882
|
+
switch (object) {
|
4883
|
+
case 0 /* NONE */:
|
4884
|
+
return "ID_REGISTER_EVENT_TYPE_NONE";
|
4885
|
+
case 1 /* REGISTER */:
|
4886
|
+
return "ID_REGISTER_EVENT_TYPE_REGISTER";
|
4887
|
+
case 2 /* TRANSFER */:
|
4888
|
+
return "ID_REGISTER_EVENT_TYPE_TRANSFER";
|
4889
|
+
default:
|
4890
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum IdRegisterEventType");
|
4891
|
+
}
|
4892
|
+
}
|
4893
|
+
function createBaseOnChainEvent() {
|
4839
4894
|
return {
|
4895
|
+
type: 0,
|
4896
|
+
chainId: 0,
|
4840
4897
|
blockNumber: 0,
|
4841
4898
|
blockHash: new Uint8Array(),
|
4899
|
+
blockTimestamp: 0,
|
4842
4900
|
transactionHash: new Uint8Array(),
|
4843
4901
|
logIndex: 0,
|
4844
|
-
payer: new Uint8Array(),
|
4845
4902
|
fid: 0,
|
4846
|
-
|
4847
|
-
|
4848
|
-
|
4903
|
+
signerEventBody: void 0,
|
4904
|
+
signerMigratedEventBody: void 0,
|
4905
|
+
idRegisterEventBody: void 0,
|
4906
|
+
storageRentEventBody: void 0
|
4849
4907
|
};
|
4850
4908
|
}
|
4851
|
-
var
|
4909
|
+
var OnChainEvent = {
|
4852
4910
|
encode(message, writer = import_minimal5.default.Writer.create()) {
|
4911
|
+
if (message.type !== 0) {
|
4912
|
+
writer.uint32(8).int32(message.type);
|
4913
|
+
}
|
4914
|
+
if (message.chainId !== 0) {
|
4915
|
+
writer.uint32(16).uint32(message.chainId);
|
4916
|
+
}
|
4853
4917
|
if (message.blockNumber !== 0) {
|
4854
|
-
writer.uint32(
|
4918
|
+
writer.uint32(24).uint32(message.blockNumber);
|
4855
4919
|
}
|
4856
4920
|
if (message.blockHash.length !== 0) {
|
4857
|
-
writer.uint32(
|
4921
|
+
writer.uint32(34).bytes(message.blockHash);
|
4922
|
+
}
|
4923
|
+
if (message.blockTimestamp !== 0) {
|
4924
|
+
writer.uint32(40).uint64(message.blockTimestamp);
|
4858
4925
|
}
|
4859
4926
|
if (message.transactionHash.length !== 0) {
|
4860
|
-
writer.uint32(
|
4927
|
+
writer.uint32(50).bytes(message.transactionHash);
|
4861
4928
|
}
|
4862
4929
|
if (message.logIndex !== 0) {
|
4863
|
-
writer.uint32(
|
4864
|
-
}
|
4865
|
-
if (message.payer.length !== 0) {
|
4866
|
-
writer.uint32(42).bytes(message.payer);
|
4930
|
+
writer.uint32(56).uint32(message.logIndex);
|
4867
4931
|
}
|
4868
4932
|
if (message.fid !== 0) {
|
4869
|
-
writer.uint32(
|
4933
|
+
writer.uint32(64).uint64(message.fid);
|
4870
4934
|
}
|
4871
|
-
if (message.
|
4872
|
-
writer.uint32(
|
4935
|
+
if (message.signerEventBody !== void 0) {
|
4936
|
+
SignerEventBody.encode(message.signerEventBody, writer.uint32(74).fork()).ldelim();
|
4873
4937
|
}
|
4874
|
-
if (message.
|
4875
|
-
writer.uint32(
|
4938
|
+
if (message.signerMigratedEventBody !== void 0) {
|
4939
|
+
SignerMigratedEventBody.encode(message.signerMigratedEventBody, writer.uint32(82).fork()).ldelim();
|
4876
4940
|
}
|
4877
|
-
if (message.
|
4878
|
-
writer.uint32(
|
4941
|
+
if (message.idRegisterEventBody !== void 0) {
|
4942
|
+
IdRegisterEventBody.encode(message.idRegisterEventBody, writer.uint32(90).fork()).ldelim();
|
4943
|
+
}
|
4944
|
+
if (message.storageRentEventBody !== void 0) {
|
4945
|
+
StorageRentEventBody.encode(message.storageRentEventBody, writer.uint32(98).fork()).ldelim();
|
4879
4946
|
}
|
4880
4947
|
return writer;
|
4881
4948
|
},
|
4882
4949
|
decode(input, length) {
|
4883
4950
|
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
4884
4951
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
4885
|
-
const message =
|
4952
|
+
const message = createBaseOnChainEvent();
|
4886
4953
|
while (reader.pos < end) {
|
4887
4954
|
const tag = reader.uint32();
|
4888
4955
|
switch (tag >>> 3) {
|
@@ -4890,55 +4957,73 @@ var RentRegistryEvent = {
|
|
4890
4957
|
if (tag != 8) {
|
4891
4958
|
break;
|
4892
4959
|
}
|
4893
|
-
message.
|
4960
|
+
message.type = reader.int32();
|
4894
4961
|
continue;
|
4895
4962
|
case 2:
|
4896
|
-
if (tag !=
|
4963
|
+
if (tag != 16) {
|
4897
4964
|
break;
|
4898
4965
|
}
|
4899
|
-
message.
|
4966
|
+
message.chainId = reader.uint32();
|
4900
4967
|
continue;
|
4901
4968
|
case 3:
|
4902
|
-
if (tag !=
|
4969
|
+
if (tag != 24) {
|
4903
4970
|
break;
|
4904
4971
|
}
|
4905
|
-
message.
|
4972
|
+
message.blockNumber = reader.uint32();
|
4906
4973
|
continue;
|
4907
4974
|
case 4:
|
4908
|
-
if (tag !=
|
4975
|
+
if (tag != 34) {
|
4909
4976
|
break;
|
4910
4977
|
}
|
4911
|
-
message.
|
4978
|
+
message.blockHash = reader.bytes();
|
4912
4979
|
continue;
|
4913
4980
|
case 5:
|
4914
|
-
if (tag !=
|
4981
|
+
if (tag != 40) {
|
4915
4982
|
break;
|
4916
4983
|
}
|
4917
|
-
message.
|
4984
|
+
message.blockTimestamp = longToNumber4(reader.uint64());
|
4918
4985
|
continue;
|
4919
4986
|
case 6:
|
4920
|
-
if (tag !=
|
4987
|
+
if (tag != 50) {
|
4921
4988
|
break;
|
4922
4989
|
}
|
4923
|
-
message.
|
4990
|
+
message.transactionHash = reader.bytes();
|
4924
4991
|
continue;
|
4925
4992
|
case 7:
|
4926
4993
|
if (tag != 56) {
|
4927
4994
|
break;
|
4928
4995
|
}
|
4929
|
-
message.
|
4996
|
+
message.logIndex = reader.uint32();
|
4930
4997
|
continue;
|
4931
4998
|
case 8:
|
4932
4999
|
if (tag != 64) {
|
4933
5000
|
break;
|
4934
5001
|
}
|
4935
|
-
message.
|
5002
|
+
message.fid = longToNumber4(reader.uint64());
|
4936
5003
|
continue;
|
4937
5004
|
case 9:
|
4938
|
-
if (tag !=
|
5005
|
+
if (tag != 74) {
|
4939
5006
|
break;
|
4940
5007
|
}
|
4941
|
-
message.
|
5008
|
+
message.signerEventBody = SignerEventBody.decode(reader, reader.uint32());
|
5009
|
+
continue;
|
5010
|
+
case 10:
|
5011
|
+
if (tag != 82) {
|
5012
|
+
break;
|
5013
|
+
}
|
5014
|
+
message.signerMigratedEventBody = SignerMigratedEventBody.decode(reader, reader.uint32());
|
5015
|
+
continue;
|
5016
|
+
case 11:
|
5017
|
+
if (tag != 90) {
|
5018
|
+
break;
|
5019
|
+
}
|
5020
|
+
message.idRegisterEventBody = IdRegisterEventBody.decode(reader, reader.uint32());
|
5021
|
+
continue;
|
5022
|
+
case 12:
|
5023
|
+
if (tag != 98) {
|
5024
|
+
break;
|
5025
|
+
}
|
5026
|
+
message.storageRentEventBody = StorageRentEventBody.decode(reader, reader.uint32());
|
4942
5027
|
continue;
|
4943
5028
|
}
|
4944
5029
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -4950,144 +5035,298 @@ var RentRegistryEvent = {
|
|
4950
5035
|
},
|
4951
5036
|
fromJSON(object) {
|
4952
5037
|
return {
|
5038
|
+
type: isSet5(object.type) ? onChainEventTypeFromJSON(object.type) : 0,
|
5039
|
+
chainId: isSet5(object.chainId) ? Number(object.chainId) : 0,
|
4953
5040
|
blockNumber: isSet5(object.blockNumber) ? Number(object.blockNumber) : 0,
|
4954
5041
|
blockHash: isSet5(object.blockHash) ? bytesFromBase645(object.blockHash) : new Uint8Array(),
|
5042
|
+
blockTimestamp: isSet5(object.blockTimestamp) ? Number(object.blockTimestamp) : 0,
|
4955
5043
|
transactionHash: isSet5(object.transactionHash) ? bytesFromBase645(object.transactionHash) : new Uint8Array(),
|
4956
5044
|
logIndex: isSet5(object.logIndex) ? Number(object.logIndex) : 0,
|
4957
|
-
payer: isSet5(object.payer) ? bytesFromBase645(object.payer) : new Uint8Array(),
|
4958
5045
|
fid: isSet5(object.fid) ? Number(object.fid) : 0,
|
4959
|
-
|
4960
|
-
|
4961
|
-
|
5046
|
+
signerEventBody: isSet5(object.signerEventBody) ? SignerEventBody.fromJSON(object.signerEventBody) : void 0,
|
5047
|
+
signerMigratedEventBody: isSet5(object.signerMigratedEventBody) ? SignerMigratedEventBody.fromJSON(object.signerMigratedEventBody) : void 0,
|
5048
|
+
idRegisterEventBody: isSet5(object.idRegisterEventBody) ? IdRegisterEventBody.fromJSON(object.idRegisterEventBody) : void 0,
|
5049
|
+
storageRentEventBody: isSet5(object.storageRentEventBody) ? StorageRentEventBody.fromJSON(object.storageRentEventBody) : void 0
|
4962
5050
|
};
|
4963
5051
|
},
|
4964
5052
|
toJSON(message) {
|
4965
5053
|
const obj = {};
|
5054
|
+
message.type !== void 0 && (obj.type = onChainEventTypeToJSON(message.type));
|
5055
|
+
message.chainId !== void 0 && (obj.chainId = Math.round(message.chainId));
|
4966
5056
|
message.blockNumber !== void 0 && (obj.blockNumber = Math.round(message.blockNumber));
|
4967
5057
|
message.blockHash !== void 0 && (obj.blockHash = base64FromBytes5(message.blockHash !== void 0 ? message.blockHash : new Uint8Array()));
|
5058
|
+
message.blockTimestamp !== void 0 && (obj.blockTimestamp = Math.round(message.blockTimestamp));
|
4968
5059
|
message.transactionHash !== void 0 && (obj.transactionHash = base64FromBytes5(
|
4969
5060
|
message.transactionHash !== void 0 ? message.transactionHash : new Uint8Array()
|
4970
5061
|
));
|
4971
5062
|
message.logIndex !== void 0 && (obj.logIndex = Math.round(message.logIndex));
|
4972
|
-
message.payer !== void 0 && (obj.payer = base64FromBytes5(message.payer !== void 0 ? message.payer : new Uint8Array()));
|
4973
5063
|
message.fid !== void 0 && (obj.fid = Math.round(message.fid));
|
4974
|
-
message.
|
4975
|
-
message.
|
4976
|
-
message.
|
5064
|
+
message.signerEventBody !== void 0 && (obj.signerEventBody = message.signerEventBody ? SignerEventBody.toJSON(message.signerEventBody) : void 0);
|
5065
|
+
message.signerMigratedEventBody !== void 0 && (obj.signerMigratedEventBody = message.signerMigratedEventBody ? SignerMigratedEventBody.toJSON(message.signerMigratedEventBody) : void 0);
|
5066
|
+
message.idRegisterEventBody !== void 0 && (obj.idRegisterEventBody = message.idRegisterEventBody ? IdRegisterEventBody.toJSON(message.idRegisterEventBody) : void 0);
|
5067
|
+
message.storageRentEventBody !== void 0 && (obj.storageRentEventBody = message.storageRentEventBody ? StorageRentEventBody.toJSON(message.storageRentEventBody) : void 0);
|
4977
5068
|
return obj;
|
4978
5069
|
},
|
4979
5070
|
create(base) {
|
4980
|
-
return
|
5071
|
+
return OnChainEvent.fromPartial(base != null ? base : {});
|
4981
5072
|
},
|
4982
5073
|
fromPartial(object) {
|
4983
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
4984
|
-
const message =
|
4985
|
-
message.
|
4986
|
-
message.
|
4987
|
-
message.
|
4988
|
-
message.
|
4989
|
-
message.
|
4990
|
-
message.
|
4991
|
-
message.
|
4992
|
-
message.
|
4993
|
-
message.
|
5074
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
5075
|
+
const message = createBaseOnChainEvent();
|
5076
|
+
message.type = (_a = object.type) != null ? _a : 0;
|
5077
|
+
message.chainId = (_b = object.chainId) != null ? _b : 0;
|
5078
|
+
message.blockNumber = (_c = object.blockNumber) != null ? _c : 0;
|
5079
|
+
message.blockHash = (_d = object.blockHash) != null ? _d : new Uint8Array();
|
5080
|
+
message.blockTimestamp = (_e = object.blockTimestamp) != null ? _e : 0;
|
5081
|
+
message.transactionHash = (_f = object.transactionHash) != null ? _f : new Uint8Array();
|
5082
|
+
message.logIndex = (_g = object.logIndex) != null ? _g : 0;
|
5083
|
+
message.fid = (_h = object.fid) != null ? _h : 0;
|
5084
|
+
message.signerEventBody = object.signerEventBody !== void 0 && object.signerEventBody !== null ? SignerEventBody.fromPartial(object.signerEventBody) : void 0;
|
5085
|
+
message.signerMigratedEventBody = object.signerMigratedEventBody !== void 0 && object.signerMigratedEventBody !== null ? SignerMigratedEventBody.fromPartial(object.signerMigratedEventBody) : void 0;
|
5086
|
+
message.idRegisterEventBody = object.idRegisterEventBody !== void 0 && object.idRegisterEventBody !== null ? IdRegisterEventBody.fromPartial(object.idRegisterEventBody) : void 0;
|
5087
|
+
message.storageRentEventBody = object.storageRentEventBody !== void 0 && object.storageRentEventBody !== null ? StorageRentEventBody.fromPartial(object.storageRentEventBody) : void 0;
|
4994
5088
|
return message;
|
4995
5089
|
}
|
4996
5090
|
};
|
4997
|
-
function
|
4998
|
-
return {
|
4999
|
-
blockNumber: 0,
|
5000
|
-
blockHash: new Uint8Array(),
|
5001
|
-
transactionHash: new Uint8Array(),
|
5002
|
-
logIndex: 0,
|
5003
|
-
timestamp: 0,
|
5004
|
-
from: new Uint8Array(),
|
5005
|
-
type: 0,
|
5006
|
-
value: new Uint8Array()
|
5007
|
-
};
|
5091
|
+
function createBaseSignerEventBody() {
|
5092
|
+
return { key: new Uint8Array(), scheme: 0, eventType: 0 };
|
5008
5093
|
}
|
5009
|
-
var
|
5094
|
+
var SignerEventBody = {
|
5010
5095
|
encode(message, writer = import_minimal5.default.Writer.create()) {
|
5011
|
-
if (message.
|
5012
|
-
writer.uint32(
|
5096
|
+
if (message.key.length !== 0) {
|
5097
|
+
writer.uint32(10).bytes(message.key);
|
5013
5098
|
}
|
5014
|
-
if (message.
|
5015
|
-
writer.uint32(
|
5099
|
+
if (message.scheme !== 0) {
|
5100
|
+
writer.uint32(16).uint32(message.scheme);
|
5016
5101
|
}
|
5017
|
-
if (message.
|
5018
|
-
writer.uint32(
|
5019
|
-
}
|
5020
|
-
if (message.logIndex !== 0) {
|
5021
|
-
writer.uint32(32).uint32(message.logIndex);
|
5022
|
-
}
|
5023
|
-
if (message.timestamp !== 0) {
|
5024
|
-
writer.uint32(40).uint64(message.timestamp);
|
5025
|
-
}
|
5026
|
-
if (message.from.length !== 0) {
|
5027
|
-
writer.uint32(50).bytes(message.from);
|
5028
|
-
}
|
5029
|
-
if (message.type !== 0) {
|
5030
|
-
writer.uint32(56).int32(message.type);
|
5031
|
-
}
|
5032
|
-
if (message.value.length !== 0) {
|
5033
|
-
writer.uint32(66).bytes(message.value);
|
5102
|
+
if (message.eventType !== 0) {
|
5103
|
+
writer.uint32(24).int32(message.eventType);
|
5034
5104
|
}
|
5035
5105
|
return writer;
|
5036
5106
|
},
|
5037
5107
|
decode(input, length) {
|
5038
5108
|
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
5039
5109
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
5040
|
-
const message =
|
5110
|
+
const message = createBaseSignerEventBody();
|
5041
5111
|
while (reader.pos < end) {
|
5042
5112
|
const tag = reader.uint32();
|
5043
5113
|
switch (tag >>> 3) {
|
5044
5114
|
case 1:
|
5045
|
-
if (tag !=
|
5115
|
+
if (tag != 10) {
|
5046
5116
|
break;
|
5047
5117
|
}
|
5048
|
-
message.
|
5118
|
+
message.key = reader.bytes();
|
5049
5119
|
continue;
|
5050
5120
|
case 2:
|
5051
|
-
if (tag !=
|
5121
|
+
if (tag != 16) {
|
5052
5122
|
break;
|
5053
5123
|
}
|
5054
|
-
message.
|
5124
|
+
message.scheme = reader.uint32();
|
5055
5125
|
continue;
|
5056
5126
|
case 3:
|
5057
|
-
if (tag !=
|
5127
|
+
if (tag != 24) {
|
5058
5128
|
break;
|
5059
5129
|
}
|
5060
|
-
message.
|
5130
|
+
message.eventType = reader.int32();
|
5061
5131
|
continue;
|
5062
|
-
|
5063
|
-
|
5132
|
+
}
|
5133
|
+
if ((tag & 7) == 4 || tag == 0) {
|
5134
|
+
break;
|
5135
|
+
}
|
5136
|
+
reader.skipType(tag & 7);
|
5137
|
+
}
|
5138
|
+
return message;
|
5139
|
+
},
|
5140
|
+
fromJSON(object) {
|
5141
|
+
return {
|
5142
|
+
key: isSet5(object.key) ? bytesFromBase645(object.key) : new Uint8Array(),
|
5143
|
+
scheme: isSet5(object.scheme) ? Number(object.scheme) : 0,
|
5144
|
+
eventType: isSet5(object.eventType) ? signerEventTypeFromJSON(object.eventType) : 0
|
5145
|
+
};
|
5146
|
+
},
|
5147
|
+
toJSON(message) {
|
5148
|
+
const obj = {};
|
5149
|
+
message.key !== void 0 && (obj.key = base64FromBytes5(message.key !== void 0 ? message.key : new Uint8Array()));
|
5150
|
+
message.scheme !== void 0 && (obj.scheme = Math.round(message.scheme));
|
5151
|
+
message.eventType !== void 0 && (obj.eventType = signerEventTypeToJSON(message.eventType));
|
5152
|
+
return obj;
|
5153
|
+
},
|
5154
|
+
create(base) {
|
5155
|
+
return SignerEventBody.fromPartial(base != null ? base : {});
|
5156
|
+
},
|
5157
|
+
fromPartial(object) {
|
5158
|
+
var _a, _b, _c;
|
5159
|
+
const message = createBaseSignerEventBody();
|
5160
|
+
message.key = (_a = object.key) != null ? _a : new Uint8Array();
|
5161
|
+
message.scheme = (_b = object.scheme) != null ? _b : 0;
|
5162
|
+
message.eventType = (_c = object.eventType) != null ? _c : 0;
|
5163
|
+
return message;
|
5164
|
+
}
|
5165
|
+
};
|
5166
|
+
function createBaseSignerMigratedEventBody() {
|
5167
|
+
return { migratedAt: 0 };
|
5168
|
+
}
|
5169
|
+
var SignerMigratedEventBody = {
|
5170
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
5171
|
+
if (message.migratedAt !== 0) {
|
5172
|
+
writer.uint32(8).uint32(message.migratedAt);
|
5173
|
+
}
|
5174
|
+
return writer;
|
5175
|
+
},
|
5176
|
+
decode(input, length) {
|
5177
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
5178
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
5179
|
+
const message = createBaseSignerMigratedEventBody();
|
5180
|
+
while (reader.pos < end) {
|
5181
|
+
const tag = reader.uint32();
|
5182
|
+
switch (tag >>> 3) {
|
5183
|
+
case 1:
|
5184
|
+
if (tag != 8) {
|
5064
5185
|
break;
|
5065
5186
|
}
|
5066
|
-
message.
|
5187
|
+
message.migratedAt = reader.uint32();
|
5067
5188
|
continue;
|
5068
|
-
|
5069
|
-
|
5189
|
+
}
|
5190
|
+
if ((tag & 7) == 4 || tag == 0) {
|
5191
|
+
break;
|
5192
|
+
}
|
5193
|
+
reader.skipType(tag & 7);
|
5194
|
+
}
|
5195
|
+
return message;
|
5196
|
+
},
|
5197
|
+
fromJSON(object) {
|
5198
|
+
return { migratedAt: isSet5(object.migratedAt) ? Number(object.migratedAt) : 0 };
|
5199
|
+
},
|
5200
|
+
toJSON(message) {
|
5201
|
+
const obj = {};
|
5202
|
+
message.migratedAt !== void 0 && (obj.migratedAt = Math.round(message.migratedAt));
|
5203
|
+
return obj;
|
5204
|
+
},
|
5205
|
+
create(base) {
|
5206
|
+
return SignerMigratedEventBody.fromPartial(base != null ? base : {});
|
5207
|
+
},
|
5208
|
+
fromPartial(object) {
|
5209
|
+
var _a;
|
5210
|
+
const message = createBaseSignerMigratedEventBody();
|
5211
|
+
message.migratedAt = (_a = object.migratedAt) != null ? _a : 0;
|
5212
|
+
return message;
|
5213
|
+
}
|
5214
|
+
};
|
5215
|
+
function createBaseIdRegisterEventBody() {
|
5216
|
+
return { to: new Uint8Array(), eventType: 0, from: new Uint8Array() };
|
5217
|
+
}
|
5218
|
+
var IdRegisterEventBody = {
|
5219
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
5220
|
+
if (message.to.length !== 0) {
|
5221
|
+
writer.uint32(10).bytes(message.to);
|
5222
|
+
}
|
5223
|
+
if (message.eventType !== 0) {
|
5224
|
+
writer.uint32(16).int32(message.eventType);
|
5225
|
+
}
|
5226
|
+
if (message.from.length !== 0) {
|
5227
|
+
writer.uint32(26).bytes(message.from);
|
5228
|
+
}
|
5229
|
+
return writer;
|
5230
|
+
},
|
5231
|
+
decode(input, length) {
|
5232
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
5233
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
5234
|
+
const message = createBaseIdRegisterEventBody();
|
5235
|
+
while (reader.pos < end) {
|
5236
|
+
const tag = reader.uint32();
|
5237
|
+
switch (tag >>> 3) {
|
5238
|
+
case 1:
|
5239
|
+
if (tag != 10) {
|
5070
5240
|
break;
|
5071
5241
|
}
|
5072
|
-
message.
|
5242
|
+
message.to = reader.bytes();
|
5073
5243
|
continue;
|
5074
|
-
case
|
5075
|
-
if (tag !=
|
5244
|
+
case 2:
|
5245
|
+
if (tag != 16) {
|
5246
|
+
break;
|
5247
|
+
}
|
5248
|
+
message.eventType = reader.int32();
|
5249
|
+
continue;
|
5250
|
+
case 3:
|
5251
|
+
if (tag != 26) {
|
5076
5252
|
break;
|
5077
5253
|
}
|
5078
5254
|
message.from = reader.bytes();
|
5079
5255
|
continue;
|
5080
|
-
|
5081
|
-
|
5256
|
+
}
|
5257
|
+
if ((tag & 7) == 4 || tag == 0) {
|
5258
|
+
break;
|
5259
|
+
}
|
5260
|
+
reader.skipType(tag & 7);
|
5261
|
+
}
|
5262
|
+
return message;
|
5263
|
+
},
|
5264
|
+
fromJSON(object) {
|
5265
|
+
return {
|
5266
|
+
to: isSet5(object.to) ? bytesFromBase645(object.to) : new Uint8Array(),
|
5267
|
+
eventType: isSet5(object.eventType) ? idRegisterEventTypeFromJSON(object.eventType) : 0,
|
5268
|
+
from: isSet5(object.from) ? bytesFromBase645(object.from) : new Uint8Array()
|
5269
|
+
};
|
5270
|
+
},
|
5271
|
+
toJSON(message) {
|
5272
|
+
const obj = {};
|
5273
|
+
message.to !== void 0 && (obj.to = base64FromBytes5(message.to !== void 0 ? message.to : new Uint8Array()));
|
5274
|
+
message.eventType !== void 0 && (obj.eventType = idRegisterEventTypeToJSON(message.eventType));
|
5275
|
+
message.from !== void 0 && (obj.from = base64FromBytes5(message.from !== void 0 ? message.from : new Uint8Array()));
|
5276
|
+
return obj;
|
5277
|
+
},
|
5278
|
+
create(base) {
|
5279
|
+
return IdRegisterEventBody.fromPartial(base != null ? base : {});
|
5280
|
+
},
|
5281
|
+
fromPartial(object) {
|
5282
|
+
var _a, _b, _c;
|
5283
|
+
const message = createBaseIdRegisterEventBody();
|
5284
|
+
message.to = (_a = object.to) != null ? _a : new Uint8Array();
|
5285
|
+
message.eventType = (_b = object.eventType) != null ? _b : 0;
|
5286
|
+
message.from = (_c = object.from) != null ? _c : new Uint8Array();
|
5287
|
+
return message;
|
5288
|
+
}
|
5289
|
+
};
|
5290
|
+
function createBaseStorageRentEventBody() {
|
5291
|
+
return { payer: new Uint8Array(), units: 0, expiry: 0 };
|
5292
|
+
}
|
5293
|
+
var StorageRentEventBody = {
|
5294
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
5295
|
+
if (message.payer.length !== 0) {
|
5296
|
+
writer.uint32(10).bytes(message.payer);
|
5297
|
+
}
|
5298
|
+
if (message.units !== 0) {
|
5299
|
+
writer.uint32(16).uint32(message.units);
|
5300
|
+
}
|
5301
|
+
if (message.expiry !== 0) {
|
5302
|
+
writer.uint32(24).uint32(message.expiry);
|
5303
|
+
}
|
5304
|
+
return writer;
|
5305
|
+
},
|
5306
|
+
decode(input, length) {
|
5307
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
5308
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
5309
|
+
const message = createBaseStorageRentEventBody();
|
5310
|
+
while (reader.pos < end) {
|
5311
|
+
const tag = reader.uint32();
|
5312
|
+
switch (tag >>> 3) {
|
5313
|
+
case 1:
|
5314
|
+
if (tag != 10) {
|
5082
5315
|
break;
|
5083
5316
|
}
|
5084
|
-
message.
|
5317
|
+
message.payer = reader.bytes();
|
5085
5318
|
continue;
|
5086
|
-
case
|
5087
|
-
if (tag !=
|
5319
|
+
case 2:
|
5320
|
+
if (tag != 16) {
|
5321
|
+
break;
|
5322
|
+
}
|
5323
|
+
message.units = reader.uint32();
|
5324
|
+
continue;
|
5325
|
+
case 3:
|
5326
|
+
if (tag != 24) {
|
5088
5327
|
break;
|
5089
5328
|
}
|
5090
|
-
message.
|
5329
|
+
message.expiry = reader.uint32();
|
5091
5330
|
continue;
|
5092
5331
|
}
|
5093
5332
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -5099,44 +5338,27 @@ var StorageAdminRegistryEvent = {
|
|
5099
5338
|
},
|
5100
5339
|
fromJSON(object) {
|
5101
5340
|
return {
|
5102
|
-
|
5103
|
-
|
5104
|
-
|
5105
|
-
logIndex: isSet5(object.logIndex) ? Number(object.logIndex) : 0,
|
5106
|
-
timestamp: isSet5(object.timestamp) ? Number(object.timestamp) : 0,
|
5107
|
-
from: isSet5(object.from) ? bytesFromBase645(object.from) : new Uint8Array(),
|
5108
|
-
type: isSet5(object.type) ? storageRegistryEventTypeFromJSON(object.type) : 0,
|
5109
|
-
value: isSet5(object.value) ? bytesFromBase645(object.value) : new Uint8Array()
|
5341
|
+
payer: isSet5(object.payer) ? bytesFromBase645(object.payer) : new Uint8Array(),
|
5342
|
+
units: isSet5(object.units) ? Number(object.units) : 0,
|
5343
|
+
expiry: isSet5(object.expiry) ? Number(object.expiry) : 0
|
5110
5344
|
};
|
5111
5345
|
},
|
5112
5346
|
toJSON(message) {
|
5113
5347
|
const obj = {};
|
5114
|
-
message.
|
5115
|
-
message.
|
5116
|
-
message.
|
5117
|
-
message.transactionHash !== void 0 ? message.transactionHash : new Uint8Array()
|
5118
|
-
));
|
5119
|
-
message.logIndex !== void 0 && (obj.logIndex = Math.round(message.logIndex));
|
5120
|
-
message.timestamp !== void 0 && (obj.timestamp = Math.round(message.timestamp));
|
5121
|
-
message.from !== void 0 && (obj.from = base64FromBytes5(message.from !== void 0 ? message.from : new Uint8Array()));
|
5122
|
-
message.type !== void 0 && (obj.type = storageRegistryEventTypeToJSON(message.type));
|
5123
|
-
message.value !== void 0 && (obj.value = base64FromBytes5(message.value !== void 0 ? message.value : new Uint8Array()));
|
5348
|
+
message.payer !== void 0 && (obj.payer = base64FromBytes5(message.payer !== void 0 ? message.payer : new Uint8Array()));
|
5349
|
+
message.units !== void 0 && (obj.units = Math.round(message.units));
|
5350
|
+
message.expiry !== void 0 && (obj.expiry = Math.round(message.expiry));
|
5124
5351
|
return obj;
|
5125
5352
|
},
|
5126
5353
|
create(base) {
|
5127
|
-
return
|
5354
|
+
return StorageRentEventBody.fromPartial(base != null ? base : {});
|
5128
5355
|
},
|
5129
5356
|
fromPartial(object) {
|
5130
|
-
var _a, _b, _c
|
5131
|
-
const message =
|
5132
|
-
message.
|
5133
|
-
message.
|
5134
|
-
message.
|
5135
|
-
message.logIndex = (_d = object.logIndex) != null ? _d : 0;
|
5136
|
-
message.timestamp = (_e = object.timestamp) != null ? _e : 0;
|
5137
|
-
message.from = (_f = object.from) != null ? _f : new Uint8Array();
|
5138
|
-
message.type = (_g = object.type) != null ? _g : 0;
|
5139
|
-
message.value = (_h = object.value) != null ? _h : new Uint8Array();
|
5357
|
+
var _a, _b, _c;
|
5358
|
+
const message = createBaseStorageRentEventBody();
|
5359
|
+
message.payer = (_a = object.payer) != null ? _a : new Uint8Array();
|
5360
|
+
message.units = (_b = object.units) != null ? _b : 0;
|
5361
|
+
message.expiry = (_c = object.expiry) != null ? _c : 0;
|
5140
5362
|
return message;
|
5141
5363
|
}
|
5142
5364
|
};
|
@@ -5216,12 +5438,9 @@ function hubEventTypeFromJSON(object) {
|
|
5216
5438
|
case 6:
|
5217
5439
|
case "HUB_EVENT_TYPE_MERGE_USERNAME_PROOF":
|
5218
5440
|
return 6 /* MERGE_USERNAME_PROOF */;
|
5219
|
-
case
|
5220
|
-
case "
|
5221
|
-
return
|
5222
|
-
case 8:
|
5223
|
-
case "HUB_EVENT_TYPE_MERGE_STORAGE_ADMIN_REGISTRY_EVENT":
|
5224
|
-
return 8 /* MERGE_STORAGE_ADMIN_REGISTRY_EVENT */;
|
5441
|
+
case 9:
|
5442
|
+
case "HUB_EVENT_TYPE_MERGE_ON_CHAIN_EVENT":
|
5443
|
+
return 9 /* MERGE_ON_CHAIN_EVENT */;
|
5225
5444
|
default:
|
5226
5445
|
throw new tsProtoGlobalThis6.Error("Unrecognized enum value " + object + " for enum HubEventType");
|
5227
5446
|
}
|
@@ -5242,10 +5461,8 @@ function hubEventTypeToJSON(object) {
|
|
5242
5461
|
return "HUB_EVENT_TYPE_MERGE_NAME_REGISTRY_EVENT";
|
5243
5462
|
case 6 /* MERGE_USERNAME_PROOF */:
|
5244
5463
|
return "HUB_EVENT_TYPE_MERGE_USERNAME_PROOF";
|
5245
|
-
case
|
5246
|
-
return "
|
5247
|
-
case 8 /* MERGE_STORAGE_ADMIN_REGISTRY_EVENT */:
|
5248
|
-
return "HUB_EVENT_TYPE_MERGE_STORAGE_ADMIN_REGISTRY_EVENT";
|
5464
|
+
case 9 /* MERGE_ON_CHAIN_EVENT */:
|
5465
|
+
return "HUB_EVENT_TYPE_MERGE_ON_CHAIN_EVENT";
|
5249
5466
|
default:
|
5250
5467
|
throw new tsProtoGlobalThis6.Error("Unrecognized enum value " + object + " for enum HubEventType");
|
5251
5468
|
}
|
@@ -5513,70 +5730,20 @@ var MergeNameRegistryEventBody = {
|
|
5513
5730
|
return message;
|
5514
5731
|
}
|
5515
5732
|
};
|
5516
|
-
function
|
5517
|
-
return {
|
5518
|
-
}
|
5519
|
-
var MergeRentRegistryEventBody = {
|
5520
|
-
encode(message, writer = import_minimal6.default.Writer.create()) {
|
5521
|
-
if (message.rentRegistryEvent !== void 0) {
|
5522
|
-
RentRegistryEvent.encode(message.rentRegistryEvent, writer.uint32(10).fork()).ldelim();
|
5523
|
-
}
|
5524
|
-
return writer;
|
5525
|
-
},
|
5526
|
-
decode(input, length) {
|
5527
|
-
const reader = input instanceof import_minimal6.default.Reader ? input : import_minimal6.default.Reader.create(input);
|
5528
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
5529
|
-
const message = createBaseMergeRentRegistryEventBody();
|
5530
|
-
while (reader.pos < end) {
|
5531
|
-
const tag = reader.uint32();
|
5532
|
-
switch (tag >>> 3) {
|
5533
|
-
case 1:
|
5534
|
-
if (tag != 10) {
|
5535
|
-
break;
|
5536
|
-
}
|
5537
|
-
message.rentRegistryEvent = RentRegistryEvent.decode(reader, reader.uint32());
|
5538
|
-
continue;
|
5539
|
-
}
|
5540
|
-
if ((tag & 7) == 4 || tag == 0) {
|
5541
|
-
break;
|
5542
|
-
}
|
5543
|
-
reader.skipType(tag & 7);
|
5544
|
-
}
|
5545
|
-
return message;
|
5546
|
-
},
|
5547
|
-
fromJSON(object) {
|
5548
|
-
return {
|
5549
|
-
rentRegistryEvent: isSet6(object.rentRegistryEvent) ? RentRegistryEvent.fromJSON(object.rentRegistryEvent) : void 0
|
5550
|
-
};
|
5551
|
-
},
|
5552
|
-
toJSON(message) {
|
5553
|
-
const obj = {};
|
5554
|
-
message.rentRegistryEvent !== void 0 && (obj.rentRegistryEvent = message.rentRegistryEvent ? RentRegistryEvent.toJSON(message.rentRegistryEvent) : void 0);
|
5555
|
-
return obj;
|
5556
|
-
},
|
5557
|
-
create(base) {
|
5558
|
-
return MergeRentRegistryEventBody.fromPartial(base != null ? base : {});
|
5559
|
-
},
|
5560
|
-
fromPartial(object) {
|
5561
|
-
const message = createBaseMergeRentRegistryEventBody();
|
5562
|
-
message.rentRegistryEvent = object.rentRegistryEvent !== void 0 && object.rentRegistryEvent !== null ? RentRegistryEvent.fromPartial(object.rentRegistryEvent) : void 0;
|
5563
|
-
return message;
|
5564
|
-
}
|
5565
|
-
};
|
5566
|
-
function createBaseMergeStorageAdminRegistryEventBody() {
|
5567
|
-
return { storageAdminRegistryEvent: void 0 };
|
5733
|
+
function createBaseMergeOnChainEventBody() {
|
5734
|
+
return { onChainEvent: void 0 };
|
5568
5735
|
}
|
5569
|
-
var
|
5736
|
+
var MergeOnChainEventBody = {
|
5570
5737
|
encode(message, writer = import_minimal6.default.Writer.create()) {
|
5571
|
-
if (message.
|
5572
|
-
|
5738
|
+
if (message.onChainEvent !== void 0) {
|
5739
|
+
OnChainEvent.encode(message.onChainEvent, writer.uint32(10).fork()).ldelim();
|
5573
5740
|
}
|
5574
5741
|
return writer;
|
5575
5742
|
},
|
5576
5743
|
decode(input, length) {
|
5577
5744
|
const reader = input instanceof import_minimal6.default.Reader ? input : import_minimal6.default.Reader.create(input);
|
5578
5745
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
5579
|
-
const message =
|
5746
|
+
const message = createBaseMergeOnChainEventBody();
|
5580
5747
|
while (reader.pos < end) {
|
5581
5748
|
const tag = reader.uint32();
|
5582
5749
|
switch (tag >>> 3) {
|
@@ -5584,7 +5751,7 @@ var MergeStorageAdminRegistryEventBody = {
|
|
5584
5751
|
if (tag != 10) {
|
5585
5752
|
break;
|
5586
5753
|
}
|
5587
|
-
message.
|
5754
|
+
message.onChainEvent = OnChainEvent.decode(reader, reader.uint32());
|
5588
5755
|
continue;
|
5589
5756
|
}
|
5590
5757
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -5595,21 +5762,19 @@ var MergeStorageAdminRegistryEventBody = {
|
|
5595
5762
|
return message;
|
5596
5763
|
},
|
5597
5764
|
fromJSON(object) {
|
5598
|
-
return {
|
5599
|
-
storageAdminRegistryEvent: isSet6(object.storageAdminRegistryEvent) ? StorageAdminRegistryEvent.fromJSON(object.storageAdminRegistryEvent) : void 0
|
5600
|
-
};
|
5765
|
+
return { onChainEvent: isSet6(object.onChainEvent) ? OnChainEvent.fromJSON(object.onChainEvent) : void 0 };
|
5601
5766
|
},
|
5602
5767
|
toJSON(message) {
|
5603
5768
|
const obj = {};
|
5604
|
-
message.
|
5769
|
+
message.onChainEvent !== void 0 && (obj.onChainEvent = message.onChainEvent ? OnChainEvent.toJSON(message.onChainEvent) : void 0);
|
5605
5770
|
return obj;
|
5606
5771
|
},
|
5607
5772
|
create(base) {
|
5608
|
-
return
|
5773
|
+
return MergeOnChainEventBody.fromPartial(base != null ? base : {});
|
5609
5774
|
},
|
5610
5775
|
fromPartial(object) {
|
5611
|
-
const message =
|
5612
|
-
message.
|
5776
|
+
const message = createBaseMergeOnChainEventBody();
|
5777
|
+
message.onChainEvent = object.onChainEvent !== void 0 && object.onChainEvent !== null ? OnChainEvent.fromPartial(object.onChainEvent) : void 0;
|
5613
5778
|
return message;
|
5614
5779
|
}
|
5615
5780
|
};
|
@@ -5714,8 +5879,7 @@ function createBaseHubEvent() {
|
|
5714
5879
|
mergeIdRegistryEventBody: void 0,
|
5715
5880
|
mergeNameRegistryEventBody: void 0,
|
5716
5881
|
mergeUsernameProofBody: void 0,
|
5717
|
-
|
5718
|
-
mergeStorageAdminRegistryEventBody: void 0
|
5882
|
+
mergeOnChainEventBody: void 0
|
5719
5883
|
};
|
5720
5884
|
}
|
5721
5885
|
var HubEvent = {
|
@@ -5744,11 +5908,8 @@ var HubEvent = {
|
|
5744
5908
|
if (message.mergeUsernameProofBody !== void 0) {
|
5745
5909
|
MergeUserNameProofBody.encode(message.mergeUsernameProofBody, writer.uint32(66).fork()).ldelim();
|
5746
5910
|
}
|
5747
|
-
if (message.
|
5748
|
-
|
5749
|
-
}
|
5750
|
-
if (message.mergeStorageAdminRegistryEventBody !== void 0) {
|
5751
|
-
MergeStorageAdminRegistryEventBody.encode(message.mergeStorageAdminRegistryEventBody, writer.uint32(82).fork()).ldelim();
|
5911
|
+
if (message.mergeOnChainEventBody !== void 0) {
|
5912
|
+
MergeOnChainEventBody.encode(message.mergeOnChainEventBody, writer.uint32(90).fork()).ldelim();
|
5752
5913
|
}
|
5753
5914
|
return writer;
|
5754
5915
|
},
|
@@ -5807,20 +5968,11 @@ var HubEvent = {
|
|
5807
5968
|
}
|
5808
5969
|
message.mergeUsernameProofBody = MergeUserNameProofBody.decode(reader, reader.uint32());
|
5809
5970
|
continue;
|
5810
|
-
case
|
5811
|
-
if (tag !=
|
5812
|
-
break;
|
5813
|
-
}
|
5814
|
-
message.mergeRentRegistryEventBody = MergeRentRegistryEventBody.decode(reader, reader.uint32());
|
5815
|
-
continue;
|
5816
|
-
case 10:
|
5817
|
-
if (tag != 82) {
|
5971
|
+
case 11:
|
5972
|
+
if (tag != 90) {
|
5818
5973
|
break;
|
5819
5974
|
}
|
5820
|
-
message.
|
5821
|
-
reader,
|
5822
|
-
reader.uint32()
|
5823
|
-
);
|
5975
|
+
message.mergeOnChainEventBody = MergeOnChainEventBody.decode(reader, reader.uint32());
|
5824
5976
|
continue;
|
5825
5977
|
}
|
5826
5978
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -5840,8 +5992,7 @@ var HubEvent = {
|
|
5840
5992
|
mergeIdRegistryEventBody: isSet6(object.mergeIdRegistryEventBody) ? MergeIdRegistryEventBody.fromJSON(object.mergeIdRegistryEventBody) : void 0,
|
5841
5993
|
mergeNameRegistryEventBody: isSet6(object.mergeNameRegistryEventBody) ? MergeNameRegistryEventBody.fromJSON(object.mergeNameRegistryEventBody) : void 0,
|
5842
5994
|
mergeUsernameProofBody: isSet6(object.mergeUsernameProofBody) ? MergeUserNameProofBody.fromJSON(object.mergeUsernameProofBody) : void 0,
|
5843
|
-
|
5844
|
-
mergeStorageAdminRegistryEventBody: isSet6(object.mergeStorageAdminRegistryEventBody) ? MergeStorageAdminRegistryEventBody.fromJSON(object.mergeStorageAdminRegistryEventBody) : void 0
|
5995
|
+
mergeOnChainEventBody: isSet6(object.mergeOnChainEventBody) ? MergeOnChainEventBody.fromJSON(object.mergeOnChainEventBody) : void 0
|
5845
5996
|
};
|
5846
5997
|
},
|
5847
5998
|
toJSON(message) {
|
@@ -5854,8 +6005,7 @@ var HubEvent = {
|
|
5854
6005
|
message.mergeIdRegistryEventBody !== void 0 && (obj.mergeIdRegistryEventBody = message.mergeIdRegistryEventBody ? MergeIdRegistryEventBody.toJSON(message.mergeIdRegistryEventBody) : void 0);
|
5855
6006
|
message.mergeNameRegistryEventBody !== void 0 && (obj.mergeNameRegistryEventBody = message.mergeNameRegistryEventBody ? MergeNameRegistryEventBody.toJSON(message.mergeNameRegistryEventBody) : void 0);
|
5856
6007
|
message.mergeUsernameProofBody !== void 0 && (obj.mergeUsernameProofBody = message.mergeUsernameProofBody ? MergeUserNameProofBody.toJSON(message.mergeUsernameProofBody) : void 0);
|
5857
|
-
message.
|
5858
|
-
message.mergeStorageAdminRegistryEventBody !== void 0 && (obj.mergeStorageAdminRegistryEventBody = message.mergeStorageAdminRegistryEventBody ? MergeStorageAdminRegistryEventBody.toJSON(message.mergeStorageAdminRegistryEventBody) : void 0);
|
6008
|
+
message.mergeOnChainEventBody !== void 0 && (obj.mergeOnChainEventBody = message.mergeOnChainEventBody ? MergeOnChainEventBody.toJSON(message.mergeOnChainEventBody) : void 0);
|
5859
6009
|
return obj;
|
5860
6010
|
},
|
5861
6011
|
create(base) {
|
@@ -5872,8 +6022,7 @@ var HubEvent = {
|
|
5872
6022
|
message.mergeIdRegistryEventBody = object.mergeIdRegistryEventBody !== void 0 && object.mergeIdRegistryEventBody !== null ? MergeIdRegistryEventBody.fromPartial(object.mergeIdRegistryEventBody) : void 0;
|
5873
6023
|
message.mergeNameRegistryEventBody = object.mergeNameRegistryEventBody !== void 0 && object.mergeNameRegistryEventBody !== null ? MergeNameRegistryEventBody.fromPartial(object.mergeNameRegistryEventBody) : void 0;
|
5874
6024
|
message.mergeUsernameProofBody = object.mergeUsernameProofBody !== void 0 && object.mergeUsernameProofBody !== null ? MergeUserNameProofBody.fromPartial(object.mergeUsernameProofBody) : void 0;
|
5875
|
-
message.
|
5876
|
-
message.mergeStorageAdminRegistryEventBody = object.mergeStorageAdminRegistryEventBody !== void 0 && object.mergeStorageAdminRegistryEventBody !== null ? MergeStorageAdminRegistryEventBody.fromPartial(object.mergeStorageAdminRegistryEventBody) : void 0;
|
6025
|
+
message.mergeOnChainEventBody = object.mergeOnChainEventBody !== void 0 && object.mergeOnChainEventBody !== null ? MergeOnChainEventBody.fromPartial(object.mergeOnChainEventBody) : void 0;
|
5877
6026
|
return message;
|
5878
6027
|
}
|
5879
6028
|
};
|
@@ -5910,6 +6059,48 @@ function isSet6(value) {
|
|
5910
6059
|
init_cjs_shims();
|
5911
6060
|
var import_long6 = __toESM(require_long());
|
5912
6061
|
var import_minimal7 = __toESM(require_minimal2());
|
6062
|
+
function storeTypeFromJSON(object) {
|
6063
|
+
switch (object) {
|
6064
|
+
case 0:
|
6065
|
+
case "STORE_TYPE_NONE":
|
6066
|
+
return 0 /* NONE */;
|
6067
|
+
case 1:
|
6068
|
+
case "STORE_TYPE_CASTS":
|
6069
|
+
return 1 /* CASTS */;
|
6070
|
+
case 2:
|
6071
|
+
case "STORE_TYPE_LINKS":
|
6072
|
+
return 2 /* LINKS */;
|
6073
|
+
case 3:
|
6074
|
+
case "STORE_TYPE_REACTIONS":
|
6075
|
+
return 3 /* REACTIONS */;
|
6076
|
+
case 4:
|
6077
|
+
case "STORE_TYPE_USER_DATA":
|
6078
|
+
return 4 /* USER_DATA */;
|
6079
|
+
case 5:
|
6080
|
+
case "STORE_TYPE_VERIFICATIONS":
|
6081
|
+
return 5 /* VERIFICATIONS */;
|
6082
|
+
default:
|
6083
|
+
throw new tsProtoGlobalThis7.Error("Unrecognized enum value " + object + " for enum StoreType");
|
6084
|
+
}
|
6085
|
+
}
|
6086
|
+
function storeTypeToJSON(object) {
|
6087
|
+
switch (object) {
|
6088
|
+
case 0 /* NONE */:
|
6089
|
+
return "STORE_TYPE_NONE";
|
6090
|
+
case 1 /* CASTS */:
|
6091
|
+
return "STORE_TYPE_CASTS";
|
6092
|
+
case 2 /* LINKS */:
|
6093
|
+
return "STORE_TYPE_LINKS";
|
6094
|
+
case 3 /* REACTIONS */:
|
6095
|
+
return "STORE_TYPE_REACTIONS";
|
6096
|
+
case 4 /* USER_DATA */:
|
6097
|
+
return "STORE_TYPE_USER_DATA";
|
6098
|
+
case 5 /* VERIFICATIONS */:
|
6099
|
+
return "STORE_TYPE_VERIFICATIONS";
|
6100
|
+
default:
|
6101
|
+
throw new tsProtoGlobalThis7.Error("Unrecognized enum value " + object + " for enum StoreType");
|
6102
|
+
}
|
6103
|
+
}
|
5913
6104
|
function createBaseEmpty() {
|
5914
6105
|
return {};
|
5915
6106
|
}
|
@@ -7665,20 +7856,23 @@ var NameRegistryEventRequest = {
|
|
7665
7856
|
return message;
|
7666
7857
|
}
|
7667
7858
|
};
|
7668
|
-
function
|
7669
|
-
return { fid: 0 };
|
7859
|
+
function createBaseOnChainEventRequest() {
|
7860
|
+
return { fid: 0, eventType: 0 };
|
7670
7861
|
}
|
7671
|
-
var
|
7862
|
+
var OnChainEventRequest = {
|
7672
7863
|
encode(message, writer = import_minimal7.default.Writer.create()) {
|
7673
7864
|
if (message.fid !== 0) {
|
7674
7865
|
writer.uint32(8).uint64(message.fid);
|
7675
7866
|
}
|
7867
|
+
if (message.eventType !== 0) {
|
7868
|
+
writer.uint32(16).int32(message.eventType);
|
7869
|
+
}
|
7676
7870
|
return writer;
|
7677
7871
|
},
|
7678
7872
|
decode(input, length) {
|
7679
7873
|
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
7680
7874
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
7681
|
-
const message =
|
7875
|
+
const message = createBaseOnChainEventRequest();
|
7682
7876
|
while (reader.pos < end) {
|
7683
7877
|
const tag = reader.uint32();
|
7684
7878
|
switch (tag >>> 3) {
|
@@ -7688,6 +7882,12 @@ var RentRegistryEventsRequest = {
|
|
7688
7882
|
}
|
7689
7883
|
message.fid = longToNumber6(reader.uint64());
|
7690
7884
|
continue;
|
7885
|
+
case 2:
|
7886
|
+
if (tag != 16) {
|
7887
|
+
break;
|
7888
|
+
}
|
7889
|
+
message.eventType = reader.int32();
|
7890
|
+
continue;
|
7691
7891
|
}
|
7692
7892
|
if ((tag & 7) == 4 || tag == 0) {
|
7693
7893
|
break;
|
@@ -7697,37 +7897,42 @@ var RentRegistryEventsRequest = {
|
|
7697
7897
|
return message;
|
7698
7898
|
},
|
7699
7899
|
fromJSON(object) {
|
7700
|
-
return {
|
7900
|
+
return {
|
7901
|
+
fid: isSet7(object.fid) ? Number(object.fid) : 0,
|
7902
|
+
eventType: isSet7(object.eventType) ? onChainEventTypeFromJSON(object.eventType) : 0
|
7903
|
+
};
|
7701
7904
|
},
|
7702
7905
|
toJSON(message) {
|
7703
7906
|
const obj = {};
|
7704
7907
|
message.fid !== void 0 && (obj.fid = Math.round(message.fid));
|
7908
|
+
message.eventType !== void 0 && (obj.eventType = onChainEventTypeToJSON(message.eventType));
|
7705
7909
|
return obj;
|
7706
7910
|
},
|
7707
7911
|
create(base) {
|
7708
|
-
return
|
7912
|
+
return OnChainEventRequest.fromPartial(base != null ? base : {});
|
7709
7913
|
},
|
7710
7914
|
fromPartial(object) {
|
7711
|
-
var _a;
|
7712
|
-
const message =
|
7915
|
+
var _a, _b;
|
7916
|
+
const message = createBaseOnChainEventRequest();
|
7713
7917
|
message.fid = (_a = object.fid) != null ? _a : 0;
|
7918
|
+
message.eventType = (_b = object.eventType) != null ? _b : 0;
|
7714
7919
|
return message;
|
7715
7920
|
}
|
7716
7921
|
};
|
7717
|
-
function
|
7922
|
+
function createBaseOnChainEventResponse() {
|
7718
7923
|
return { events: [] };
|
7719
7924
|
}
|
7720
|
-
var
|
7925
|
+
var OnChainEventResponse = {
|
7721
7926
|
encode(message, writer = import_minimal7.default.Writer.create()) {
|
7722
7927
|
for (const v of message.events) {
|
7723
|
-
|
7928
|
+
OnChainEvent.encode(v, writer.uint32(10).fork()).ldelim();
|
7724
7929
|
}
|
7725
7930
|
return writer;
|
7726
7931
|
},
|
7727
7932
|
decode(input, length) {
|
7728
7933
|
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
7729
7934
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
7730
|
-
const message =
|
7935
|
+
const message = createBaseOnChainEventResponse();
|
7731
7936
|
while (reader.pos < end) {
|
7732
7937
|
const tag = reader.uint32();
|
7733
7938
|
switch (tag >>> 3) {
|
@@ -7735,7 +7940,7 @@ var RentRegistryEventsResponse = {
|
|
7735
7940
|
if (tag != 10) {
|
7736
7941
|
break;
|
7737
7942
|
}
|
7738
|
-
message.events.push(
|
7943
|
+
message.events.push(OnChainEvent.decode(reader, reader.uint32()));
|
7739
7944
|
continue;
|
7740
7945
|
}
|
7741
7946
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -7746,26 +7951,140 @@ var RentRegistryEventsResponse = {
|
|
7746
7951
|
return message;
|
7747
7952
|
},
|
7748
7953
|
fromJSON(object) {
|
7749
|
-
return {
|
7750
|
-
events: Array.isArray(object == null ? void 0 : object.events) ? object.events.map((e) => RentRegistryEvent.fromJSON(e)) : []
|
7751
|
-
};
|
7954
|
+
return { events: Array.isArray(object == null ? void 0 : object.events) ? object.events.map((e) => OnChainEvent.fromJSON(e)) : [] };
|
7752
7955
|
},
|
7753
7956
|
toJSON(message) {
|
7754
7957
|
const obj = {};
|
7755
7958
|
if (message.events) {
|
7756
|
-
obj.events = message.events.map((e) => e ?
|
7959
|
+
obj.events = message.events.map((e) => e ? OnChainEvent.toJSON(e) : void 0);
|
7757
7960
|
} else {
|
7758
7961
|
obj.events = [];
|
7759
7962
|
}
|
7760
7963
|
return obj;
|
7761
7964
|
},
|
7762
7965
|
create(base) {
|
7763
|
-
return
|
7966
|
+
return OnChainEventResponse.fromPartial(base != null ? base : {});
|
7967
|
+
},
|
7968
|
+
fromPartial(object) {
|
7969
|
+
var _a;
|
7970
|
+
const message = createBaseOnChainEventResponse();
|
7971
|
+
message.events = ((_a = object.events) == null ? void 0 : _a.map((e) => OnChainEvent.fromPartial(e))) || [];
|
7972
|
+
return message;
|
7973
|
+
}
|
7974
|
+
};
|
7975
|
+
function createBaseStorageLimitsResponse() {
|
7976
|
+
return { limits: [] };
|
7977
|
+
}
|
7978
|
+
var StorageLimitsResponse = {
|
7979
|
+
encode(message, writer = import_minimal7.default.Writer.create()) {
|
7980
|
+
for (const v of message.limits) {
|
7981
|
+
StorageLimit.encode(v, writer.uint32(10).fork()).ldelim();
|
7982
|
+
}
|
7983
|
+
return writer;
|
7984
|
+
},
|
7985
|
+
decode(input, length) {
|
7986
|
+
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
7987
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
7988
|
+
const message = createBaseStorageLimitsResponse();
|
7989
|
+
while (reader.pos < end) {
|
7990
|
+
const tag = reader.uint32();
|
7991
|
+
switch (tag >>> 3) {
|
7992
|
+
case 1:
|
7993
|
+
if (tag != 10) {
|
7994
|
+
break;
|
7995
|
+
}
|
7996
|
+
message.limits.push(StorageLimit.decode(reader, reader.uint32()));
|
7997
|
+
continue;
|
7998
|
+
}
|
7999
|
+
if ((tag & 7) == 4 || tag == 0) {
|
8000
|
+
break;
|
8001
|
+
}
|
8002
|
+
reader.skipType(tag & 7);
|
8003
|
+
}
|
8004
|
+
return message;
|
8005
|
+
},
|
8006
|
+
fromJSON(object) {
|
8007
|
+
return { limits: Array.isArray(object == null ? void 0 : object.limits) ? object.limits.map((e) => StorageLimit.fromJSON(e)) : [] };
|
8008
|
+
},
|
8009
|
+
toJSON(message) {
|
8010
|
+
const obj = {};
|
8011
|
+
if (message.limits) {
|
8012
|
+
obj.limits = message.limits.map((e) => e ? StorageLimit.toJSON(e) : void 0);
|
8013
|
+
} else {
|
8014
|
+
obj.limits = [];
|
8015
|
+
}
|
8016
|
+
return obj;
|
8017
|
+
},
|
8018
|
+
create(base) {
|
8019
|
+
return StorageLimitsResponse.fromPartial(base != null ? base : {});
|
7764
8020
|
},
|
7765
8021
|
fromPartial(object) {
|
7766
8022
|
var _a;
|
7767
|
-
const message =
|
7768
|
-
message.
|
8023
|
+
const message = createBaseStorageLimitsResponse();
|
8024
|
+
message.limits = ((_a = object.limits) == null ? void 0 : _a.map((e) => StorageLimit.fromPartial(e))) || [];
|
8025
|
+
return message;
|
8026
|
+
}
|
8027
|
+
};
|
8028
|
+
function createBaseStorageLimit() {
|
8029
|
+
return { storeType: 0, limit: 0 };
|
8030
|
+
}
|
8031
|
+
var StorageLimit = {
|
8032
|
+
encode(message, writer = import_minimal7.default.Writer.create()) {
|
8033
|
+
if (message.storeType !== 0) {
|
8034
|
+
writer.uint32(8).int32(message.storeType);
|
8035
|
+
}
|
8036
|
+
if (message.limit !== 0) {
|
8037
|
+
writer.uint32(16).uint64(message.limit);
|
8038
|
+
}
|
8039
|
+
return writer;
|
8040
|
+
},
|
8041
|
+
decode(input, length) {
|
8042
|
+
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
8043
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
8044
|
+
const message = createBaseStorageLimit();
|
8045
|
+
while (reader.pos < end) {
|
8046
|
+
const tag = reader.uint32();
|
8047
|
+
switch (tag >>> 3) {
|
8048
|
+
case 1:
|
8049
|
+
if (tag != 8) {
|
8050
|
+
break;
|
8051
|
+
}
|
8052
|
+
message.storeType = reader.int32();
|
8053
|
+
continue;
|
8054
|
+
case 2:
|
8055
|
+
if (tag != 16) {
|
8056
|
+
break;
|
8057
|
+
}
|
8058
|
+
message.limit = longToNumber6(reader.uint64());
|
8059
|
+
continue;
|
8060
|
+
}
|
8061
|
+
if ((tag & 7) == 4 || tag == 0) {
|
8062
|
+
break;
|
8063
|
+
}
|
8064
|
+
reader.skipType(tag & 7);
|
8065
|
+
}
|
8066
|
+
return message;
|
8067
|
+
},
|
8068
|
+
fromJSON(object) {
|
8069
|
+
return {
|
8070
|
+
storeType: isSet7(object.storeType) ? storeTypeFromJSON(object.storeType) : 0,
|
8071
|
+
limit: isSet7(object.limit) ? Number(object.limit) : 0
|
8072
|
+
};
|
8073
|
+
},
|
8074
|
+
toJSON(message) {
|
8075
|
+
const obj = {};
|
8076
|
+
message.storeType !== void 0 && (obj.storeType = storeTypeToJSON(message.storeType));
|
8077
|
+
message.limit !== void 0 && (obj.limit = Math.round(message.limit));
|
8078
|
+
return obj;
|
8079
|
+
},
|
8080
|
+
create(base) {
|
8081
|
+
return StorageLimit.fromPartial(base != null ? base : {});
|
8082
|
+
},
|
8083
|
+
fromPartial(object) {
|
8084
|
+
var _a, _b;
|
8085
|
+
const message = createBaseStorageLimit();
|
8086
|
+
message.storeType = (_a = object.storeType) != null ? _a : 0;
|
8087
|
+
message.limit = (_b = object.limit) != null ? _b : 0;
|
7769
8088
|
return message;
|
7770
8089
|
}
|
7771
8090
|
};
|
@@ -8439,12 +8758,14 @@ var HubServiceClientImpl = class {
|
|
8439
8758
|
this.getUserData = this.getUserData.bind(this);
|
8440
8759
|
this.getUserDataByFid = this.getUserDataByFid.bind(this);
|
8441
8760
|
this.getNameRegistryEvent = this.getNameRegistryEvent.bind(this);
|
8442
|
-
this.
|
8761
|
+
this.getOnChainEvents = this.getOnChainEvents.bind(this);
|
8762
|
+
this.getCurrentStorageLimitsByFid = this.getCurrentStorageLimitsByFid.bind(this);
|
8443
8763
|
this.getUsernameProof = this.getUsernameProof.bind(this);
|
8444
8764
|
this.getUserNameProofsByFid = this.getUserNameProofsByFid.bind(this);
|
8445
8765
|
this.getVerification = this.getVerification.bind(this);
|
8446
8766
|
this.getVerificationsByFid = this.getVerificationsByFid.bind(this);
|
8447
8767
|
this.getSigner = this.getSigner.bind(this);
|
8768
|
+
this.getOnChainSigner = this.getOnChainSigner.bind(this);
|
8448
8769
|
this.getSignersByFid = this.getSignersByFid.bind(this);
|
8449
8770
|
this.getIdRegistryEvent = this.getIdRegistryEvent.bind(this);
|
8450
8771
|
this.getIdRegistryEventByAddress = this.getIdRegistryEventByAddress.bind(this);
|
@@ -8507,12 +8828,11 @@ var HubServiceClientImpl = class {
|
|
8507
8828
|
getNameRegistryEvent(request, metadata) {
|
8508
8829
|
return this.rpc.unary(HubServiceGetNameRegistryEventDesc, NameRegistryEventRequest.fromPartial(request), metadata);
|
8509
8830
|
}
|
8510
|
-
|
8511
|
-
return this.rpc.unary(
|
8512
|
-
|
8513
|
-
|
8514
|
-
|
8515
|
-
);
|
8831
|
+
getOnChainEvents(request, metadata) {
|
8832
|
+
return this.rpc.unary(HubServiceGetOnChainEventsDesc, OnChainEventRequest.fromPartial(request), metadata);
|
8833
|
+
}
|
8834
|
+
getCurrentStorageLimitsByFid(request, metadata) {
|
8835
|
+
return this.rpc.unary(HubServiceGetCurrentStorageLimitsByFidDesc, FidRequest.fromPartial(request), metadata);
|
8516
8836
|
}
|
8517
8837
|
getUsernameProof(request, metadata) {
|
8518
8838
|
return this.rpc.unary(HubServiceGetUsernameProofDesc, UsernameProofRequest.fromPartial(request), metadata);
|
@@ -8529,6 +8849,9 @@ var HubServiceClientImpl = class {
|
|
8529
8849
|
getSigner(request, metadata) {
|
8530
8850
|
return this.rpc.unary(HubServiceGetSignerDesc, SignerRequest.fromPartial(request), metadata);
|
8531
8851
|
}
|
8852
|
+
getOnChainSigner(request, metadata) {
|
8853
|
+
return this.rpc.unary(HubServiceGetOnChainSignerDesc, SignerRequest.fromPartial(request), metadata);
|
8854
|
+
}
|
8532
8855
|
getSignersByFid(request, metadata) {
|
8533
8856
|
return this.rpc.unary(HubServiceGetSignersByFidDesc, FidRequest.fromPartial(request), metadata);
|
8534
8857
|
}
|
@@ -8900,19 +9223,41 @@ var HubServiceGetNameRegistryEventDesc = {
|
|
8900
9223
|
}
|
8901
9224
|
}
|
8902
9225
|
};
|
8903
|
-
var
|
8904
|
-
methodName: "
|
9226
|
+
var HubServiceGetOnChainEventsDesc = {
|
9227
|
+
methodName: "GetOnChainEvents",
|
9228
|
+
service: HubServiceDesc,
|
9229
|
+
requestStream: false,
|
9230
|
+
responseStream: false,
|
9231
|
+
requestType: {
|
9232
|
+
serializeBinary() {
|
9233
|
+
return OnChainEventRequest.encode(this).finish();
|
9234
|
+
}
|
9235
|
+
},
|
9236
|
+
responseType: {
|
9237
|
+
deserializeBinary(data) {
|
9238
|
+
const value = OnChainEventResponse.decode(data);
|
9239
|
+
return {
|
9240
|
+
...value,
|
9241
|
+
toObject() {
|
9242
|
+
return value;
|
9243
|
+
}
|
9244
|
+
};
|
9245
|
+
}
|
9246
|
+
}
|
9247
|
+
};
|
9248
|
+
var HubServiceGetCurrentStorageLimitsByFidDesc = {
|
9249
|
+
methodName: "GetCurrentStorageLimitsByFid",
|
8905
9250
|
service: HubServiceDesc,
|
8906
9251
|
requestStream: false,
|
8907
9252
|
responseStream: false,
|
8908
9253
|
requestType: {
|
8909
9254
|
serializeBinary() {
|
8910
|
-
return
|
9255
|
+
return FidRequest.encode(this).finish();
|
8911
9256
|
}
|
8912
9257
|
},
|
8913
9258
|
responseType: {
|
8914
9259
|
deserializeBinary(data) {
|
8915
|
-
const value =
|
9260
|
+
const value = StorageLimitsResponse.decode(data);
|
8916
9261
|
return {
|
8917
9262
|
...value,
|
8918
9263
|
toObject() {
|
@@ -9032,6 +9377,28 @@ var HubServiceGetSignerDesc = {
|
|
9032
9377
|
}
|
9033
9378
|
}
|
9034
9379
|
};
|
9380
|
+
var HubServiceGetOnChainSignerDesc = {
|
9381
|
+
methodName: "GetOnChainSigner",
|
9382
|
+
service: HubServiceDesc,
|
9383
|
+
requestStream: false,
|
9384
|
+
responseStream: false,
|
9385
|
+
requestType: {
|
9386
|
+
serializeBinary() {
|
9387
|
+
return SignerRequest.encode(this).finish();
|
9388
|
+
}
|
9389
|
+
},
|
9390
|
+
responseType: {
|
9391
|
+
deserializeBinary(data) {
|
9392
|
+
const value = OnChainEvent.decode(data);
|
9393
|
+
return {
|
9394
|
+
...value,
|
9395
|
+
toObject() {
|
9396
|
+
return value;
|
9397
|
+
}
|
9398
|
+
};
|
9399
|
+
}
|
9400
|
+
}
|
9401
|
+
};
|
9035
9402
|
var HubServiceGetSignersByFidDesc = {
|
9036
9403
|
methodName: "GetSignersByFid",
|
9037
9404
|
service: HubServiceDesc,
|
@@ -9458,8 +9825,7 @@ var AdminServiceClientImpl = class {
|
|
9458
9825
|
this.deleteAllMessagesFromDb = this.deleteAllMessagesFromDb.bind(this);
|
9459
9826
|
this.submitIdRegistryEvent = this.submitIdRegistryEvent.bind(this);
|
9460
9827
|
this.submitNameRegistryEvent = this.submitNameRegistryEvent.bind(this);
|
9461
|
-
this.
|
9462
|
-
this.submitStorageAdminRegistryEvent = this.submitStorageAdminRegistryEvent.bind(this);
|
9828
|
+
this.submitOnChainEvent = this.submitOnChainEvent.bind(this);
|
9463
9829
|
}
|
9464
9830
|
rebuildSyncTrie(request, metadata) {
|
9465
9831
|
return this.rpc.unary(AdminServiceRebuildSyncTrieDesc, Empty.fromPartial(request), metadata);
|
@@ -9473,15 +9839,8 @@ var AdminServiceClientImpl = class {
|
|
9473
9839
|
submitNameRegistryEvent(request, metadata) {
|
9474
9840
|
return this.rpc.unary(AdminServiceSubmitNameRegistryEventDesc, NameRegistryEvent.fromPartial(request), metadata);
|
9475
9841
|
}
|
9476
|
-
|
9477
|
-
return this.rpc.unary(
|
9478
|
-
}
|
9479
|
-
submitStorageAdminRegistryEvent(request, metadata) {
|
9480
|
-
return this.rpc.unary(
|
9481
|
-
AdminServiceSubmitStorageAdminRegistryEventDesc,
|
9482
|
-
StorageAdminRegistryEvent.fromPartial(request),
|
9483
|
-
metadata
|
9484
|
-
);
|
9842
|
+
submitOnChainEvent(request, metadata) {
|
9843
|
+
return this.rpc.unary(AdminServiceSubmitOnChainEventDesc, OnChainEvent.fromPartial(request), metadata);
|
9485
9844
|
}
|
9486
9845
|
};
|
9487
9846
|
var AdminServiceDesc = { serviceName: "AdminService" };
|
@@ -9573,41 +9932,19 @@ var AdminServiceSubmitNameRegistryEventDesc = {
|
|
9573
9932
|
}
|
9574
9933
|
}
|
9575
9934
|
};
|
9576
|
-
var
|
9577
|
-
methodName: "
|
9578
|
-
service: AdminServiceDesc,
|
9579
|
-
requestStream: false,
|
9580
|
-
responseStream: false,
|
9581
|
-
requestType: {
|
9582
|
-
serializeBinary() {
|
9583
|
-
return RentRegistryEvent.encode(this).finish();
|
9584
|
-
}
|
9585
|
-
},
|
9586
|
-
responseType: {
|
9587
|
-
deserializeBinary(data) {
|
9588
|
-
const value = RentRegistryEvent.decode(data);
|
9589
|
-
return {
|
9590
|
-
...value,
|
9591
|
-
toObject() {
|
9592
|
-
return value;
|
9593
|
-
}
|
9594
|
-
};
|
9595
|
-
}
|
9596
|
-
}
|
9597
|
-
};
|
9598
|
-
var AdminServiceSubmitStorageAdminRegistryEventDesc = {
|
9599
|
-
methodName: "SubmitStorageAdminRegistryEvent",
|
9935
|
+
var AdminServiceSubmitOnChainEventDesc = {
|
9936
|
+
methodName: "SubmitOnChainEvent",
|
9600
9937
|
service: AdminServiceDesc,
|
9601
9938
|
requestStream: false,
|
9602
9939
|
responseStream: false,
|
9603
9940
|
requestType: {
|
9604
9941
|
serializeBinary() {
|
9605
|
-
return
|
9942
|
+
return OnChainEvent.encode(this).finish();
|
9606
9943
|
}
|
9607
9944
|
},
|
9608
9945
|
responseType: {
|
9609
9946
|
deserializeBinary(data) {
|
9610
|
-
const value =
|
9947
|
+
const value = OnChainEvent.decode(data);
|
9611
9948
|
return {
|
9612
9949
|
...value,
|
9613
9950
|
toObject() {
|
@@ -9629,14 +9966,14 @@ var GrpcWebImpl = class {
|
|
9629
9966
|
const request = { ..._request, ...methodDesc.requestType };
|
9630
9967
|
const maybeCombinedMetadata = metadata && this.options.metadata ? new import_browser_headers.BrowserHeaders({ ...(_a = this.options) == null ? void 0 : _a.metadata.headersMap, ...metadata == null ? void 0 : metadata.headersMap }) : metadata || this.options.metadata;
|
9631
9968
|
return new Promise((resolve, reject) => {
|
9632
|
-
import_grpc_web.grpc.unary(methodDesc, {
|
9969
|
+
import_grpc_web.default.grpc.unary(methodDesc, {
|
9633
9970
|
request,
|
9634
9971
|
host: this.host,
|
9635
9972
|
metadata: maybeCombinedMetadata,
|
9636
9973
|
transport: this.options.transport,
|
9637
9974
|
debug: this.options.debug,
|
9638
9975
|
onEnd: function(response) {
|
9639
|
-
if (response.status === import_grpc_web.grpc.Code.OK) {
|
9976
|
+
if (response.status === import_grpc_web.default.grpc.Code.OK) {
|
9640
9977
|
resolve(response.message.toObject());
|
9641
9978
|
} else {
|
9642
9979
|
const err2 = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
@@ -9654,7 +9991,7 @@ var GrpcWebImpl = class {
|
|
9654
9991
|
const maybeCombinedMetadata = metadata && this.options.metadata ? new import_browser_headers.BrowserHeaders({ ...(_a = this.options) == null ? void 0 : _a.metadata.headersMap, ...metadata == null ? void 0 : metadata.headersMap }) : metadata || this.options.metadata;
|
9655
9992
|
return new import_rxjs.Observable((observer) => {
|
9656
9993
|
const upStream = () => {
|
9657
|
-
const client = import_grpc_web.grpc.invoke(methodDesc, {
|
9994
|
+
const client = import_grpc_web.default.grpc.invoke(methodDesc, {
|
9658
9995
|
host: this.host,
|
9659
9996
|
request,
|
9660
9997
|
transport: this.options.streamingTransport || this.options.transport,
|
@@ -10194,8 +10531,7 @@ var getAuthMetadata = (username, password) => {
|
|
10194
10531
|
AdminServiceRebuildSyncTrieDesc,
|
10195
10532
|
AdminServiceSubmitIdRegistryEventDesc,
|
10196
10533
|
AdminServiceSubmitNameRegistryEventDesc,
|
10197
|
-
|
10198
|
-
AdminServiceSubmitStorageAdminRegistryEventDesc,
|
10534
|
+
AdminServiceSubmitOnChainEventDesc,
|
10199
10535
|
GrpcWebError,
|
10200
10536
|
GrpcWebImpl,
|
10201
10537
|
HubServiceClientImpl,
|
@@ -10212,6 +10548,7 @@ var getAuthMetadata = (username, password) => {
|
|
10212
10548
|
HubServiceGetCastsByFidDesc,
|
10213
10549
|
HubServiceGetCastsByMentionDesc,
|
10214
10550
|
HubServiceGetCastsByParentDesc,
|
10551
|
+
HubServiceGetCurrentStorageLimitsByFidDesc,
|
10215
10552
|
HubServiceGetEventDesc,
|
10216
10553
|
HubServiceGetFidsDesc,
|
10217
10554
|
HubServiceGetIdRegistryEventByAddressDesc,
|
@@ -10221,11 +10558,12 @@ var getAuthMetadata = (username, password) => {
|
|
10221
10558
|
HubServiceGetLinksByFidDesc,
|
10222
10559
|
HubServiceGetLinksByTargetDesc,
|
10223
10560
|
HubServiceGetNameRegistryEventDesc,
|
10561
|
+
HubServiceGetOnChainEventsDesc,
|
10562
|
+
HubServiceGetOnChainSignerDesc,
|
10224
10563
|
HubServiceGetReactionDesc,
|
10225
10564
|
HubServiceGetReactionsByCastDesc,
|
10226
10565
|
HubServiceGetReactionsByFidDesc,
|
10227
10566
|
HubServiceGetReactionsByTargetDesc,
|
10228
|
-
HubServiceGetRentRegistryEventsDesc,
|
10229
10567
|
HubServiceGetSignerDesc,
|
10230
10568
|
HubServiceGetSignersByFidDesc,
|
10231
10569
|
HubServiceGetSyncMetadataByPrefixDesc,
|