@farcaster/hub-web 0.5.0 → 0.6.1
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 +1295 -618
- package/dist/index.js +726 -345
- package/dist/index.mjs +729 -349
- package/package.json +2 -2
package/dist/index.mjs
CHANGED
@@ -2637,7 +2637,7 @@ export * from "@farcaster/core";
|
|
2637
2637
|
// src/generated/rpc.ts
|
2638
2638
|
init_esm_shims();
|
2639
2639
|
var import_browser_headers = __toESM(require_browser_headers());
|
2640
|
-
import
|
2640
|
+
import grpcWeb from "@improbable-eng/grpc-web";
|
2641
2641
|
import { Observable } from "rxjs";
|
2642
2642
|
import { share } from "rxjs/operators";
|
2643
2643
|
|
@@ -4723,100 +4723,171 @@ function isSet4(value) {
|
|
4723
4723
|
return value !== null && value !== void 0;
|
4724
4724
|
}
|
4725
4725
|
|
4726
|
-
// src/generated/
|
4726
|
+
// src/generated/onchain_event.ts
|
4727
4727
|
init_esm_shims();
|
4728
4728
|
var import_long4 = __toESM(require_long());
|
4729
4729
|
var import_minimal5 = __toESM(require_minimal2());
|
4730
|
-
function
|
4730
|
+
function onChainEventTypeFromJSON(object) {
|
4731
4731
|
switch (object) {
|
4732
4732
|
case 0:
|
4733
|
-
case "
|
4734
|
-
return 0 /*
|
4733
|
+
case "EVENT_TYPE_NONE":
|
4734
|
+
return 0 /* EVENT_TYPE_NONE */;
|
4735
4735
|
case 1:
|
4736
|
-
case "
|
4737
|
-
return 1 /*
|
4736
|
+
case "EVENT_TYPE_SIGNER":
|
4737
|
+
return 1 /* EVENT_TYPE_SIGNER */;
|
4738
4738
|
case 2:
|
4739
|
-
case "
|
4740
|
-
return 2 /*
|
4739
|
+
case "EVENT_TYPE_SIGNER_MIGRATED":
|
4740
|
+
return 2 /* EVENT_TYPE_SIGNER_MIGRATED */;
|
4741
4741
|
case 3:
|
4742
|
-
case "
|
4743
|
-
return 3 /*
|
4742
|
+
case "EVENT_TYPE_ID_REGISTER":
|
4743
|
+
return 3 /* EVENT_TYPE_ID_REGISTER */;
|
4744
4744
|
case 4:
|
4745
|
-
case "
|
4746
|
-
return 4 /*
|
4747
|
-
|
4748
|
-
|
4749
|
-
|
4745
|
+
case "EVENT_TYPE_STORAGE_RENT":
|
4746
|
+
return 4 /* EVENT_TYPE_STORAGE_RENT */;
|
4747
|
+
default:
|
4748
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum OnChainEventType");
|
4749
|
+
}
|
4750
|
+
}
|
4751
|
+
function onChainEventTypeToJSON(object) {
|
4752
|
+
switch (object) {
|
4753
|
+
case 0 /* EVENT_TYPE_NONE */:
|
4754
|
+
return "EVENT_TYPE_NONE";
|
4755
|
+
case 1 /* EVENT_TYPE_SIGNER */:
|
4756
|
+
return "EVENT_TYPE_SIGNER";
|
4757
|
+
case 2 /* EVENT_TYPE_SIGNER_MIGRATED */:
|
4758
|
+
return "EVENT_TYPE_SIGNER_MIGRATED";
|
4759
|
+
case 3 /* EVENT_TYPE_ID_REGISTER */:
|
4760
|
+
return "EVENT_TYPE_ID_REGISTER";
|
4761
|
+
case 4 /* EVENT_TYPE_STORAGE_RENT */:
|
4762
|
+
return "EVENT_TYPE_STORAGE_RENT";
|
4763
|
+
default:
|
4764
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum OnChainEventType");
|
4765
|
+
}
|
4766
|
+
}
|
4767
|
+
function signerEventTypeFromJSON(object) {
|
4768
|
+
switch (object) {
|
4769
|
+
case 0:
|
4770
|
+
case "SIGNER_EVENT_TYPE_NONE":
|
4771
|
+
return 0 /* NONE */;
|
4772
|
+
case 1:
|
4773
|
+
case "SIGNER_EVENT_TYPE_ADD":
|
4774
|
+
return 1 /* ADD */;
|
4775
|
+
case 2:
|
4776
|
+
case "SIGNER_EVENT_TYPE_REMOVE":
|
4777
|
+
return 2 /* REMOVE */;
|
4778
|
+
case 3:
|
4779
|
+
case "SIGNER_EVENT_TYPE_ADMIN_RESET":
|
4780
|
+
return 3 /* ADMIN_RESET */;
|
4781
|
+
default:
|
4782
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum SignerEventType");
|
4783
|
+
}
|
4784
|
+
}
|
4785
|
+
function signerEventTypeToJSON(object) {
|
4786
|
+
switch (object) {
|
4787
|
+
case 0 /* NONE */:
|
4788
|
+
return "SIGNER_EVENT_TYPE_NONE";
|
4789
|
+
case 1 /* ADD */:
|
4790
|
+
return "SIGNER_EVENT_TYPE_ADD";
|
4791
|
+
case 2 /* REMOVE */:
|
4792
|
+
return "SIGNER_EVENT_TYPE_REMOVE";
|
4793
|
+
case 3 /* ADMIN_RESET */:
|
4794
|
+
return "SIGNER_EVENT_TYPE_ADMIN_RESET";
|
4795
|
+
default:
|
4796
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum SignerEventType");
|
4797
|
+
}
|
4798
|
+
}
|
4799
|
+
function idRegisterEventTypeFromJSON(object) {
|
4800
|
+
switch (object) {
|
4801
|
+
case 0:
|
4802
|
+
case "ID_REGISTER_EVENT_TYPE_NONE":
|
4803
|
+
return 0 /* NONE */;
|
4804
|
+
case 1:
|
4805
|
+
case "ID_REGISTER_EVENT_TYPE_REGISTER":
|
4806
|
+
return 1 /* REGISTER */;
|
4807
|
+
case 2:
|
4808
|
+
case "ID_REGISTER_EVENT_TYPE_TRANSFER":
|
4809
|
+
return 2 /* TRANSFER */;
|
4810
|
+
case 3:
|
4811
|
+
case "ID_REGISTER_EVENT_TYPE_CHANGE_RECOVERY":
|
4812
|
+
return 3 /* CHANGE_RECOVERY */;
|
4750
4813
|
default:
|
4751
|
-
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum
|
4814
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum IdRegisterEventType");
|
4752
4815
|
}
|
4753
4816
|
}
|
4754
|
-
function
|
4817
|
+
function idRegisterEventTypeToJSON(object) {
|
4755
4818
|
switch (object) {
|
4756
4819
|
case 0 /* NONE */:
|
4757
|
-
return "
|
4758
|
-
case 1 /*
|
4759
|
-
return "
|
4760
|
-
case 2 /*
|
4761
|
-
return "
|
4762
|
-
case 3 /*
|
4763
|
-
return "
|
4764
|
-
case 4 /* SET_DEPRECATION_TIMESTAMP */:
|
4765
|
-
return "STORAGE_REGISTRY_EVENT_TYPE_SET_DEPRECATION_TIMESTAMP";
|
4766
|
-
case 5 /* SET_GRACE_PERIOD */:
|
4767
|
-
return "STORAGE_REGISTRY_EVENT_TYPE_SET_GRACE_PERIOD";
|
4820
|
+
return "ID_REGISTER_EVENT_TYPE_NONE";
|
4821
|
+
case 1 /* REGISTER */:
|
4822
|
+
return "ID_REGISTER_EVENT_TYPE_REGISTER";
|
4823
|
+
case 2 /* TRANSFER */:
|
4824
|
+
return "ID_REGISTER_EVENT_TYPE_TRANSFER";
|
4825
|
+
case 3 /* CHANGE_RECOVERY */:
|
4826
|
+
return "ID_REGISTER_EVENT_TYPE_CHANGE_RECOVERY";
|
4768
4827
|
default:
|
4769
|
-
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum
|
4828
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum IdRegisterEventType");
|
4770
4829
|
}
|
4771
4830
|
}
|
4772
|
-
function
|
4831
|
+
function createBaseOnChainEvent() {
|
4773
4832
|
return {
|
4833
|
+
type: 0,
|
4834
|
+
chainId: 0,
|
4774
4835
|
blockNumber: 0,
|
4775
4836
|
blockHash: new Uint8Array(),
|
4837
|
+
blockTimestamp: 0,
|
4776
4838
|
transactionHash: new Uint8Array(),
|
4777
4839
|
logIndex: 0,
|
4778
|
-
payer: new Uint8Array(),
|
4779
4840
|
fid: 0,
|
4780
|
-
|
4781
|
-
|
4782
|
-
|
4841
|
+
signerEventBody: void 0,
|
4842
|
+
signerMigratedEventBody: void 0,
|
4843
|
+
idRegisterEventBody: void 0,
|
4844
|
+
storageRentEventBody: void 0
|
4783
4845
|
};
|
4784
4846
|
}
|
4785
|
-
var
|
4847
|
+
var OnChainEvent = {
|
4786
4848
|
encode(message, writer = import_minimal5.default.Writer.create()) {
|
4849
|
+
if (message.type !== 0) {
|
4850
|
+
writer.uint32(8).int32(message.type);
|
4851
|
+
}
|
4852
|
+
if (message.chainId !== 0) {
|
4853
|
+
writer.uint32(16).uint32(message.chainId);
|
4854
|
+
}
|
4787
4855
|
if (message.blockNumber !== 0) {
|
4788
|
-
writer.uint32(
|
4856
|
+
writer.uint32(24).uint32(message.blockNumber);
|
4789
4857
|
}
|
4790
4858
|
if (message.blockHash.length !== 0) {
|
4791
|
-
writer.uint32(
|
4859
|
+
writer.uint32(34).bytes(message.blockHash);
|
4860
|
+
}
|
4861
|
+
if (message.blockTimestamp !== 0) {
|
4862
|
+
writer.uint32(40).uint64(message.blockTimestamp);
|
4792
4863
|
}
|
4793
4864
|
if (message.transactionHash.length !== 0) {
|
4794
|
-
writer.uint32(
|
4865
|
+
writer.uint32(50).bytes(message.transactionHash);
|
4795
4866
|
}
|
4796
4867
|
if (message.logIndex !== 0) {
|
4797
|
-
writer.uint32(
|
4798
|
-
}
|
4799
|
-
if (message.payer.length !== 0) {
|
4800
|
-
writer.uint32(42).bytes(message.payer);
|
4868
|
+
writer.uint32(56).uint32(message.logIndex);
|
4801
4869
|
}
|
4802
4870
|
if (message.fid !== 0) {
|
4803
|
-
writer.uint32(
|
4871
|
+
writer.uint32(64).uint64(message.fid);
|
4804
4872
|
}
|
4805
|
-
if (message.
|
4806
|
-
writer.uint32(
|
4873
|
+
if (message.signerEventBody !== void 0) {
|
4874
|
+
SignerEventBody.encode(message.signerEventBody, writer.uint32(74).fork()).ldelim();
|
4807
4875
|
}
|
4808
|
-
if (message.
|
4809
|
-
writer.uint32(
|
4876
|
+
if (message.signerMigratedEventBody !== void 0) {
|
4877
|
+
SignerMigratedEventBody.encode(message.signerMigratedEventBody, writer.uint32(82).fork()).ldelim();
|
4810
4878
|
}
|
4811
|
-
if (message.
|
4812
|
-
writer.uint32(
|
4879
|
+
if (message.idRegisterEventBody !== void 0) {
|
4880
|
+
IdRegisterEventBody.encode(message.idRegisterEventBody, writer.uint32(90).fork()).ldelim();
|
4881
|
+
}
|
4882
|
+
if (message.storageRentEventBody !== void 0) {
|
4883
|
+
StorageRentEventBody.encode(message.storageRentEventBody, writer.uint32(98).fork()).ldelim();
|
4813
4884
|
}
|
4814
4885
|
return writer;
|
4815
4886
|
},
|
4816
4887
|
decode(input, length) {
|
4817
4888
|
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
4818
4889
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
4819
|
-
const message =
|
4890
|
+
const message = createBaseOnChainEvent();
|
4820
4891
|
while (reader.pos < end) {
|
4821
4892
|
const tag = reader.uint32();
|
4822
4893
|
switch (tag >>> 3) {
|
@@ -4824,55 +4895,73 @@ var RentRegistryEvent = {
|
|
4824
4895
|
if (tag != 8) {
|
4825
4896
|
break;
|
4826
4897
|
}
|
4827
|
-
message.
|
4898
|
+
message.type = reader.int32();
|
4828
4899
|
continue;
|
4829
4900
|
case 2:
|
4830
|
-
if (tag !=
|
4901
|
+
if (tag != 16) {
|
4831
4902
|
break;
|
4832
4903
|
}
|
4833
|
-
message.
|
4904
|
+
message.chainId = reader.uint32();
|
4834
4905
|
continue;
|
4835
4906
|
case 3:
|
4836
|
-
if (tag !=
|
4907
|
+
if (tag != 24) {
|
4837
4908
|
break;
|
4838
4909
|
}
|
4839
|
-
message.
|
4910
|
+
message.blockNumber = reader.uint32();
|
4840
4911
|
continue;
|
4841
4912
|
case 4:
|
4842
|
-
if (tag !=
|
4913
|
+
if (tag != 34) {
|
4843
4914
|
break;
|
4844
4915
|
}
|
4845
|
-
message.
|
4916
|
+
message.blockHash = reader.bytes();
|
4846
4917
|
continue;
|
4847
4918
|
case 5:
|
4848
|
-
if (tag !=
|
4919
|
+
if (tag != 40) {
|
4849
4920
|
break;
|
4850
4921
|
}
|
4851
|
-
message.
|
4922
|
+
message.blockTimestamp = longToNumber4(reader.uint64());
|
4852
4923
|
continue;
|
4853
4924
|
case 6:
|
4854
|
-
if (tag !=
|
4925
|
+
if (tag != 50) {
|
4855
4926
|
break;
|
4856
4927
|
}
|
4857
|
-
message.
|
4928
|
+
message.transactionHash = reader.bytes();
|
4858
4929
|
continue;
|
4859
4930
|
case 7:
|
4860
4931
|
if (tag != 56) {
|
4861
4932
|
break;
|
4862
4933
|
}
|
4863
|
-
message.
|
4934
|
+
message.logIndex = reader.uint32();
|
4864
4935
|
continue;
|
4865
4936
|
case 8:
|
4866
4937
|
if (tag != 64) {
|
4867
4938
|
break;
|
4868
4939
|
}
|
4869
|
-
message.
|
4940
|
+
message.fid = longToNumber4(reader.uint64());
|
4870
4941
|
continue;
|
4871
4942
|
case 9:
|
4872
|
-
if (tag !=
|
4943
|
+
if (tag != 74) {
|
4873
4944
|
break;
|
4874
4945
|
}
|
4875
|
-
message.
|
4946
|
+
message.signerEventBody = SignerEventBody.decode(reader, reader.uint32());
|
4947
|
+
continue;
|
4948
|
+
case 10:
|
4949
|
+
if (tag != 82) {
|
4950
|
+
break;
|
4951
|
+
}
|
4952
|
+
message.signerMigratedEventBody = SignerMigratedEventBody.decode(reader, reader.uint32());
|
4953
|
+
continue;
|
4954
|
+
case 11:
|
4955
|
+
if (tag != 90) {
|
4956
|
+
break;
|
4957
|
+
}
|
4958
|
+
message.idRegisterEventBody = IdRegisterEventBody.decode(reader, reader.uint32());
|
4959
|
+
continue;
|
4960
|
+
case 12:
|
4961
|
+
if (tag != 98) {
|
4962
|
+
break;
|
4963
|
+
}
|
4964
|
+
message.storageRentEventBody = StorageRentEventBody.decode(reader, reader.uint32());
|
4876
4965
|
continue;
|
4877
4966
|
}
|
4878
4967
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -4884,144 +4973,244 @@ var RentRegistryEvent = {
|
|
4884
4973
|
},
|
4885
4974
|
fromJSON(object) {
|
4886
4975
|
return {
|
4976
|
+
type: isSet5(object.type) ? onChainEventTypeFromJSON(object.type) : 0,
|
4977
|
+
chainId: isSet5(object.chainId) ? Number(object.chainId) : 0,
|
4887
4978
|
blockNumber: isSet5(object.blockNumber) ? Number(object.blockNumber) : 0,
|
4888
4979
|
blockHash: isSet5(object.blockHash) ? bytesFromBase645(object.blockHash) : new Uint8Array(),
|
4980
|
+
blockTimestamp: isSet5(object.blockTimestamp) ? Number(object.blockTimestamp) : 0,
|
4889
4981
|
transactionHash: isSet5(object.transactionHash) ? bytesFromBase645(object.transactionHash) : new Uint8Array(),
|
4890
4982
|
logIndex: isSet5(object.logIndex) ? Number(object.logIndex) : 0,
|
4891
|
-
payer: isSet5(object.payer) ? bytesFromBase645(object.payer) : new Uint8Array(),
|
4892
4983
|
fid: isSet5(object.fid) ? Number(object.fid) : 0,
|
4893
|
-
|
4894
|
-
|
4895
|
-
|
4984
|
+
signerEventBody: isSet5(object.signerEventBody) ? SignerEventBody.fromJSON(object.signerEventBody) : void 0,
|
4985
|
+
signerMigratedEventBody: isSet5(object.signerMigratedEventBody) ? SignerMigratedEventBody.fromJSON(object.signerMigratedEventBody) : void 0,
|
4986
|
+
idRegisterEventBody: isSet5(object.idRegisterEventBody) ? IdRegisterEventBody.fromJSON(object.idRegisterEventBody) : void 0,
|
4987
|
+
storageRentEventBody: isSet5(object.storageRentEventBody) ? StorageRentEventBody.fromJSON(object.storageRentEventBody) : void 0
|
4896
4988
|
};
|
4897
4989
|
},
|
4898
4990
|
toJSON(message) {
|
4899
4991
|
const obj = {};
|
4992
|
+
message.type !== void 0 && (obj.type = onChainEventTypeToJSON(message.type));
|
4993
|
+
message.chainId !== void 0 && (obj.chainId = Math.round(message.chainId));
|
4900
4994
|
message.blockNumber !== void 0 && (obj.blockNumber = Math.round(message.blockNumber));
|
4901
4995
|
message.blockHash !== void 0 && (obj.blockHash = base64FromBytes5(message.blockHash !== void 0 ? message.blockHash : new Uint8Array()));
|
4996
|
+
message.blockTimestamp !== void 0 && (obj.blockTimestamp = Math.round(message.blockTimestamp));
|
4902
4997
|
message.transactionHash !== void 0 && (obj.transactionHash = base64FromBytes5(
|
4903
4998
|
message.transactionHash !== void 0 ? message.transactionHash : new Uint8Array()
|
4904
4999
|
));
|
4905
5000
|
message.logIndex !== void 0 && (obj.logIndex = Math.round(message.logIndex));
|
4906
|
-
message.payer !== void 0 && (obj.payer = base64FromBytes5(message.payer !== void 0 ? message.payer : new Uint8Array()));
|
4907
5001
|
message.fid !== void 0 && (obj.fid = Math.round(message.fid));
|
4908
|
-
message.
|
4909
|
-
message.
|
4910
|
-
message.
|
5002
|
+
message.signerEventBody !== void 0 && (obj.signerEventBody = message.signerEventBody ? SignerEventBody.toJSON(message.signerEventBody) : void 0);
|
5003
|
+
message.signerMigratedEventBody !== void 0 && (obj.signerMigratedEventBody = message.signerMigratedEventBody ? SignerMigratedEventBody.toJSON(message.signerMigratedEventBody) : void 0);
|
5004
|
+
message.idRegisterEventBody !== void 0 && (obj.idRegisterEventBody = message.idRegisterEventBody ? IdRegisterEventBody.toJSON(message.idRegisterEventBody) : void 0);
|
5005
|
+
message.storageRentEventBody !== void 0 && (obj.storageRentEventBody = message.storageRentEventBody ? StorageRentEventBody.toJSON(message.storageRentEventBody) : void 0);
|
4911
5006
|
return obj;
|
4912
5007
|
},
|
4913
5008
|
create(base) {
|
4914
|
-
return
|
5009
|
+
return OnChainEvent.fromPartial(base != null ? base : {});
|
4915
5010
|
},
|
4916
5011
|
fromPartial(object) {
|
4917
|
-
var _a, _b, _c, _d, _e, _f, _g, _h
|
4918
|
-
const message =
|
4919
|
-
message.
|
4920
|
-
message.
|
4921
|
-
message.
|
4922
|
-
message.
|
4923
|
-
message.
|
4924
|
-
message.
|
4925
|
-
message.
|
4926
|
-
message.
|
4927
|
-
message.
|
5012
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
5013
|
+
const message = createBaseOnChainEvent();
|
5014
|
+
message.type = (_a = object.type) != null ? _a : 0;
|
5015
|
+
message.chainId = (_b = object.chainId) != null ? _b : 0;
|
5016
|
+
message.blockNumber = (_c = object.blockNumber) != null ? _c : 0;
|
5017
|
+
message.blockHash = (_d = object.blockHash) != null ? _d : new Uint8Array();
|
5018
|
+
message.blockTimestamp = (_e = object.blockTimestamp) != null ? _e : 0;
|
5019
|
+
message.transactionHash = (_f = object.transactionHash) != null ? _f : new Uint8Array();
|
5020
|
+
message.logIndex = (_g = object.logIndex) != null ? _g : 0;
|
5021
|
+
message.fid = (_h = object.fid) != null ? _h : 0;
|
5022
|
+
message.signerEventBody = object.signerEventBody !== void 0 && object.signerEventBody !== null ? SignerEventBody.fromPartial(object.signerEventBody) : void 0;
|
5023
|
+
message.signerMigratedEventBody = object.signerMigratedEventBody !== void 0 && object.signerMigratedEventBody !== null ? SignerMigratedEventBody.fromPartial(object.signerMigratedEventBody) : void 0;
|
5024
|
+
message.idRegisterEventBody = object.idRegisterEventBody !== void 0 && object.idRegisterEventBody !== null ? IdRegisterEventBody.fromPartial(object.idRegisterEventBody) : void 0;
|
5025
|
+
message.storageRentEventBody = object.storageRentEventBody !== void 0 && object.storageRentEventBody !== null ? StorageRentEventBody.fromPartial(object.storageRentEventBody) : void 0;
|
4928
5026
|
return message;
|
4929
5027
|
}
|
4930
5028
|
};
|
4931
|
-
function
|
4932
|
-
return {
|
4933
|
-
blockNumber: 0,
|
4934
|
-
blockHash: new Uint8Array(),
|
4935
|
-
transactionHash: new Uint8Array(),
|
4936
|
-
logIndex: 0,
|
4937
|
-
timestamp: 0,
|
4938
|
-
from: new Uint8Array(),
|
4939
|
-
type: 0,
|
4940
|
-
value: new Uint8Array()
|
4941
|
-
};
|
5029
|
+
function createBaseSignerEventBody() {
|
5030
|
+
return { key: new Uint8Array(), scheme: 0, eventType: 0, metadata: new Uint8Array() };
|
4942
5031
|
}
|
4943
|
-
var
|
5032
|
+
var SignerEventBody = {
|
4944
5033
|
encode(message, writer = import_minimal5.default.Writer.create()) {
|
4945
|
-
if (message.
|
4946
|
-
writer.uint32(
|
4947
|
-
}
|
4948
|
-
if (message.blockHash.length !== 0) {
|
4949
|
-
writer.uint32(18).bytes(message.blockHash);
|
4950
|
-
}
|
4951
|
-
if (message.transactionHash.length !== 0) {
|
4952
|
-
writer.uint32(26).bytes(message.transactionHash);
|
4953
|
-
}
|
4954
|
-
if (message.logIndex !== 0) {
|
4955
|
-
writer.uint32(32).uint32(message.logIndex);
|
5034
|
+
if (message.key.length !== 0) {
|
5035
|
+
writer.uint32(10).bytes(message.key);
|
4956
5036
|
}
|
4957
|
-
if (message.
|
4958
|
-
writer.uint32(
|
4959
|
-
}
|
4960
|
-
if (message.from.length !== 0) {
|
4961
|
-
writer.uint32(50).bytes(message.from);
|
5037
|
+
if (message.scheme !== 0) {
|
5038
|
+
writer.uint32(16).uint32(message.scheme);
|
4962
5039
|
}
|
4963
|
-
if (message.
|
4964
|
-
writer.uint32(
|
5040
|
+
if (message.eventType !== 0) {
|
5041
|
+
writer.uint32(24).int32(message.eventType);
|
4965
5042
|
}
|
4966
|
-
if (message.
|
4967
|
-
writer.uint32(
|
5043
|
+
if (message.metadata.length !== 0) {
|
5044
|
+
writer.uint32(34).bytes(message.metadata);
|
4968
5045
|
}
|
4969
5046
|
return writer;
|
4970
5047
|
},
|
4971
5048
|
decode(input, length) {
|
4972
5049
|
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
4973
5050
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
4974
|
-
const message =
|
5051
|
+
const message = createBaseSignerEventBody();
|
4975
5052
|
while (reader.pos < end) {
|
4976
5053
|
const tag = reader.uint32();
|
4977
5054
|
switch (tag >>> 3) {
|
4978
5055
|
case 1:
|
4979
|
-
if (tag !=
|
5056
|
+
if (tag != 10) {
|
4980
5057
|
break;
|
4981
5058
|
}
|
4982
|
-
message.
|
5059
|
+
message.key = reader.bytes();
|
4983
5060
|
continue;
|
4984
5061
|
case 2:
|
4985
|
-
if (tag !=
|
5062
|
+
if (tag != 16) {
|
4986
5063
|
break;
|
4987
5064
|
}
|
4988
|
-
message.
|
5065
|
+
message.scheme = reader.uint32();
|
4989
5066
|
continue;
|
4990
5067
|
case 3:
|
4991
|
-
if (tag !=
|
5068
|
+
if (tag != 24) {
|
4992
5069
|
break;
|
4993
5070
|
}
|
4994
|
-
message.
|
5071
|
+
message.eventType = reader.int32();
|
4995
5072
|
continue;
|
4996
5073
|
case 4:
|
4997
|
-
if (tag !=
|
5074
|
+
if (tag != 34) {
|
4998
5075
|
break;
|
4999
5076
|
}
|
5000
|
-
message.
|
5077
|
+
message.metadata = reader.bytes();
|
5001
5078
|
continue;
|
5002
|
-
|
5003
|
-
|
5079
|
+
}
|
5080
|
+
if ((tag & 7) == 4 || tag == 0) {
|
5081
|
+
break;
|
5082
|
+
}
|
5083
|
+
reader.skipType(tag & 7);
|
5084
|
+
}
|
5085
|
+
return message;
|
5086
|
+
},
|
5087
|
+
fromJSON(object) {
|
5088
|
+
return {
|
5089
|
+
key: isSet5(object.key) ? bytesFromBase645(object.key) : new Uint8Array(),
|
5090
|
+
scheme: isSet5(object.scheme) ? Number(object.scheme) : 0,
|
5091
|
+
eventType: isSet5(object.eventType) ? signerEventTypeFromJSON(object.eventType) : 0,
|
5092
|
+
metadata: isSet5(object.metadata) ? bytesFromBase645(object.metadata) : new Uint8Array()
|
5093
|
+
};
|
5094
|
+
},
|
5095
|
+
toJSON(message) {
|
5096
|
+
const obj = {};
|
5097
|
+
message.key !== void 0 && (obj.key = base64FromBytes5(message.key !== void 0 ? message.key : new Uint8Array()));
|
5098
|
+
message.scheme !== void 0 && (obj.scheme = Math.round(message.scheme));
|
5099
|
+
message.eventType !== void 0 && (obj.eventType = signerEventTypeToJSON(message.eventType));
|
5100
|
+
message.metadata !== void 0 && (obj.metadata = base64FromBytes5(message.metadata !== void 0 ? message.metadata : new Uint8Array()));
|
5101
|
+
return obj;
|
5102
|
+
},
|
5103
|
+
create(base) {
|
5104
|
+
return SignerEventBody.fromPartial(base != null ? base : {});
|
5105
|
+
},
|
5106
|
+
fromPartial(object) {
|
5107
|
+
var _a, _b, _c, _d;
|
5108
|
+
const message = createBaseSignerEventBody();
|
5109
|
+
message.key = (_a = object.key) != null ? _a : new Uint8Array();
|
5110
|
+
message.scheme = (_b = object.scheme) != null ? _b : 0;
|
5111
|
+
message.eventType = (_c = object.eventType) != null ? _c : 0;
|
5112
|
+
message.metadata = (_d = object.metadata) != null ? _d : new Uint8Array();
|
5113
|
+
return message;
|
5114
|
+
}
|
5115
|
+
};
|
5116
|
+
function createBaseSignerMigratedEventBody() {
|
5117
|
+
return { migratedAt: 0 };
|
5118
|
+
}
|
5119
|
+
var SignerMigratedEventBody = {
|
5120
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
5121
|
+
if (message.migratedAt !== 0) {
|
5122
|
+
writer.uint32(8).uint32(message.migratedAt);
|
5123
|
+
}
|
5124
|
+
return writer;
|
5125
|
+
},
|
5126
|
+
decode(input, length) {
|
5127
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
5128
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
5129
|
+
const message = createBaseSignerMigratedEventBody();
|
5130
|
+
while (reader.pos < end) {
|
5131
|
+
const tag = reader.uint32();
|
5132
|
+
switch (tag >>> 3) {
|
5133
|
+
case 1:
|
5134
|
+
if (tag != 8) {
|
5004
5135
|
break;
|
5005
5136
|
}
|
5006
|
-
message.
|
5137
|
+
message.migratedAt = reader.uint32();
|
5007
5138
|
continue;
|
5008
|
-
|
5009
|
-
|
5139
|
+
}
|
5140
|
+
if ((tag & 7) == 4 || tag == 0) {
|
5141
|
+
break;
|
5142
|
+
}
|
5143
|
+
reader.skipType(tag & 7);
|
5144
|
+
}
|
5145
|
+
return message;
|
5146
|
+
},
|
5147
|
+
fromJSON(object) {
|
5148
|
+
return { migratedAt: isSet5(object.migratedAt) ? Number(object.migratedAt) : 0 };
|
5149
|
+
},
|
5150
|
+
toJSON(message) {
|
5151
|
+
const obj = {};
|
5152
|
+
message.migratedAt !== void 0 && (obj.migratedAt = Math.round(message.migratedAt));
|
5153
|
+
return obj;
|
5154
|
+
},
|
5155
|
+
create(base) {
|
5156
|
+
return SignerMigratedEventBody.fromPartial(base != null ? base : {});
|
5157
|
+
},
|
5158
|
+
fromPartial(object) {
|
5159
|
+
var _a;
|
5160
|
+
const message = createBaseSignerMigratedEventBody();
|
5161
|
+
message.migratedAt = (_a = object.migratedAt) != null ? _a : 0;
|
5162
|
+
return message;
|
5163
|
+
}
|
5164
|
+
};
|
5165
|
+
function createBaseIdRegisterEventBody() {
|
5166
|
+
return { to: new Uint8Array(), eventType: 0, from: new Uint8Array(), recoveryAddress: new Uint8Array() };
|
5167
|
+
}
|
5168
|
+
var IdRegisterEventBody = {
|
5169
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
5170
|
+
if (message.to.length !== 0) {
|
5171
|
+
writer.uint32(10).bytes(message.to);
|
5172
|
+
}
|
5173
|
+
if (message.eventType !== 0) {
|
5174
|
+
writer.uint32(16).int32(message.eventType);
|
5175
|
+
}
|
5176
|
+
if (message.from.length !== 0) {
|
5177
|
+
writer.uint32(26).bytes(message.from);
|
5178
|
+
}
|
5179
|
+
if (message.recoveryAddress.length !== 0) {
|
5180
|
+
writer.uint32(34).bytes(message.recoveryAddress);
|
5181
|
+
}
|
5182
|
+
return writer;
|
5183
|
+
},
|
5184
|
+
decode(input, length) {
|
5185
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
5186
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
5187
|
+
const message = createBaseIdRegisterEventBody();
|
5188
|
+
while (reader.pos < end) {
|
5189
|
+
const tag = reader.uint32();
|
5190
|
+
switch (tag >>> 3) {
|
5191
|
+
case 1:
|
5192
|
+
if (tag != 10) {
|
5010
5193
|
break;
|
5011
5194
|
}
|
5012
|
-
message.
|
5195
|
+
message.to = reader.bytes();
|
5013
5196
|
continue;
|
5014
|
-
case
|
5015
|
-
if (tag !=
|
5197
|
+
case 2:
|
5198
|
+
if (tag != 16) {
|
5016
5199
|
break;
|
5017
5200
|
}
|
5018
|
-
message.
|
5201
|
+
message.eventType = reader.int32();
|
5019
5202
|
continue;
|
5020
|
-
case
|
5021
|
-
if (tag !=
|
5203
|
+
case 3:
|
5204
|
+
if (tag != 26) {
|
5205
|
+
break;
|
5206
|
+
}
|
5207
|
+
message.from = reader.bytes();
|
5208
|
+
continue;
|
5209
|
+
case 4:
|
5210
|
+
if (tag != 34) {
|
5022
5211
|
break;
|
5023
5212
|
}
|
5024
|
-
message.
|
5213
|
+
message.recoveryAddress = reader.bytes();
|
5025
5214
|
continue;
|
5026
5215
|
}
|
5027
5216
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -5033,44 +5222,107 @@ var StorageAdminRegistryEvent = {
|
|
5033
5222
|
},
|
5034
5223
|
fromJSON(object) {
|
5035
5224
|
return {
|
5036
|
-
|
5037
|
-
|
5038
|
-
transactionHash: isSet5(object.transactionHash) ? bytesFromBase645(object.transactionHash) : new Uint8Array(),
|
5039
|
-
logIndex: isSet5(object.logIndex) ? Number(object.logIndex) : 0,
|
5040
|
-
timestamp: isSet5(object.timestamp) ? Number(object.timestamp) : 0,
|
5225
|
+
to: isSet5(object.to) ? bytesFromBase645(object.to) : new Uint8Array(),
|
5226
|
+
eventType: isSet5(object.eventType) ? idRegisterEventTypeFromJSON(object.eventType) : 0,
|
5041
5227
|
from: isSet5(object.from) ? bytesFromBase645(object.from) : new Uint8Array(),
|
5042
|
-
|
5043
|
-
value: isSet5(object.value) ? bytesFromBase645(object.value) : new Uint8Array()
|
5228
|
+
recoveryAddress: isSet5(object.recoveryAddress) ? bytesFromBase645(object.recoveryAddress) : new Uint8Array()
|
5044
5229
|
};
|
5045
5230
|
},
|
5046
5231
|
toJSON(message) {
|
5047
5232
|
const obj = {};
|
5048
|
-
message.
|
5049
|
-
message.
|
5050
|
-
message.transactionHash !== void 0 && (obj.transactionHash = base64FromBytes5(
|
5051
|
-
message.transactionHash !== void 0 ? message.transactionHash : new Uint8Array()
|
5052
|
-
));
|
5053
|
-
message.logIndex !== void 0 && (obj.logIndex = Math.round(message.logIndex));
|
5054
|
-
message.timestamp !== void 0 && (obj.timestamp = Math.round(message.timestamp));
|
5233
|
+
message.to !== void 0 && (obj.to = base64FromBytes5(message.to !== void 0 ? message.to : new Uint8Array()));
|
5234
|
+
message.eventType !== void 0 && (obj.eventType = idRegisterEventTypeToJSON(message.eventType));
|
5055
5235
|
message.from !== void 0 && (obj.from = base64FromBytes5(message.from !== void 0 ? message.from : new Uint8Array()));
|
5056
|
-
message.
|
5057
|
-
|
5236
|
+
message.recoveryAddress !== void 0 && (obj.recoveryAddress = base64FromBytes5(
|
5237
|
+
message.recoveryAddress !== void 0 ? message.recoveryAddress : new Uint8Array()
|
5238
|
+
));
|
5239
|
+
return obj;
|
5240
|
+
},
|
5241
|
+
create(base) {
|
5242
|
+
return IdRegisterEventBody.fromPartial(base != null ? base : {});
|
5243
|
+
},
|
5244
|
+
fromPartial(object) {
|
5245
|
+
var _a, _b, _c, _d;
|
5246
|
+
const message = createBaseIdRegisterEventBody();
|
5247
|
+
message.to = (_a = object.to) != null ? _a : new Uint8Array();
|
5248
|
+
message.eventType = (_b = object.eventType) != null ? _b : 0;
|
5249
|
+
message.from = (_c = object.from) != null ? _c : new Uint8Array();
|
5250
|
+
message.recoveryAddress = (_d = object.recoveryAddress) != null ? _d : new Uint8Array();
|
5251
|
+
return message;
|
5252
|
+
}
|
5253
|
+
};
|
5254
|
+
function createBaseStorageRentEventBody() {
|
5255
|
+
return { payer: new Uint8Array(), units: 0, expiry: 0 };
|
5256
|
+
}
|
5257
|
+
var StorageRentEventBody = {
|
5258
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
5259
|
+
if (message.payer.length !== 0) {
|
5260
|
+
writer.uint32(10).bytes(message.payer);
|
5261
|
+
}
|
5262
|
+
if (message.units !== 0) {
|
5263
|
+
writer.uint32(16).uint32(message.units);
|
5264
|
+
}
|
5265
|
+
if (message.expiry !== 0) {
|
5266
|
+
writer.uint32(24).uint32(message.expiry);
|
5267
|
+
}
|
5268
|
+
return writer;
|
5269
|
+
},
|
5270
|
+
decode(input, length) {
|
5271
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
5272
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
5273
|
+
const message = createBaseStorageRentEventBody();
|
5274
|
+
while (reader.pos < end) {
|
5275
|
+
const tag = reader.uint32();
|
5276
|
+
switch (tag >>> 3) {
|
5277
|
+
case 1:
|
5278
|
+
if (tag != 10) {
|
5279
|
+
break;
|
5280
|
+
}
|
5281
|
+
message.payer = reader.bytes();
|
5282
|
+
continue;
|
5283
|
+
case 2:
|
5284
|
+
if (tag != 16) {
|
5285
|
+
break;
|
5286
|
+
}
|
5287
|
+
message.units = reader.uint32();
|
5288
|
+
continue;
|
5289
|
+
case 3:
|
5290
|
+
if (tag != 24) {
|
5291
|
+
break;
|
5292
|
+
}
|
5293
|
+
message.expiry = reader.uint32();
|
5294
|
+
continue;
|
5295
|
+
}
|
5296
|
+
if ((tag & 7) == 4 || tag == 0) {
|
5297
|
+
break;
|
5298
|
+
}
|
5299
|
+
reader.skipType(tag & 7);
|
5300
|
+
}
|
5301
|
+
return message;
|
5302
|
+
},
|
5303
|
+
fromJSON(object) {
|
5304
|
+
return {
|
5305
|
+
payer: isSet5(object.payer) ? bytesFromBase645(object.payer) : new Uint8Array(),
|
5306
|
+
units: isSet5(object.units) ? Number(object.units) : 0,
|
5307
|
+
expiry: isSet5(object.expiry) ? Number(object.expiry) : 0
|
5308
|
+
};
|
5309
|
+
},
|
5310
|
+
toJSON(message) {
|
5311
|
+
const obj = {};
|
5312
|
+
message.payer !== void 0 && (obj.payer = base64FromBytes5(message.payer !== void 0 ? message.payer : new Uint8Array()));
|
5313
|
+
message.units !== void 0 && (obj.units = Math.round(message.units));
|
5314
|
+
message.expiry !== void 0 && (obj.expiry = Math.round(message.expiry));
|
5058
5315
|
return obj;
|
5059
5316
|
},
|
5060
5317
|
create(base) {
|
5061
|
-
return
|
5318
|
+
return StorageRentEventBody.fromPartial(base != null ? base : {});
|
5062
5319
|
},
|
5063
5320
|
fromPartial(object) {
|
5064
|
-
var _a, _b, _c
|
5065
|
-
const message =
|
5066
|
-
message.
|
5067
|
-
message.
|
5068
|
-
message.
|
5069
|
-
message.logIndex = (_d = object.logIndex) != null ? _d : 0;
|
5070
|
-
message.timestamp = (_e = object.timestamp) != null ? _e : 0;
|
5071
|
-
message.from = (_f = object.from) != null ? _f : new Uint8Array();
|
5072
|
-
message.type = (_g = object.type) != null ? _g : 0;
|
5073
|
-
message.value = (_h = object.value) != null ? _h : new Uint8Array();
|
5321
|
+
var _a, _b, _c;
|
5322
|
+
const message = createBaseStorageRentEventBody();
|
5323
|
+
message.payer = (_a = object.payer) != null ? _a : new Uint8Array();
|
5324
|
+
message.units = (_b = object.units) != null ? _b : 0;
|
5325
|
+
message.expiry = (_c = object.expiry) != null ? _c : 0;
|
5074
5326
|
return message;
|
5075
5327
|
}
|
5076
5328
|
};
|
@@ -5150,12 +5402,9 @@ function hubEventTypeFromJSON(object) {
|
|
5150
5402
|
case 6:
|
5151
5403
|
case "HUB_EVENT_TYPE_MERGE_USERNAME_PROOF":
|
5152
5404
|
return 6 /* MERGE_USERNAME_PROOF */;
|
5153
|
-
case
|
5154
|
-
case "
|
5155
|
-
return
|
5156
|
-
case 8:
|
5157
|
-
case "HUB_EVENT_TYPE_MERGE_STORAGE_ADMIN_REGISTRY_EVENT":
|
5158
|
-
return 8 /* MERGE_STORAGE_ADMIN_REGISTRY_EVENT */;
|
5405
|
+
case 9:
|
5406
|
+
case "HUB_EVENT_TYPE_MERGE_ON_CHAIN_EVENT":
|
5407
|
+
return 9 /* MERGE_ON_CHAIN_EVENT */;
|
5159
5408
|
default:
|
5160
5409
|
throw new tsProtoGlobalThis6.Error("Unrecognized enum value " + object + " for enum HubEventType");
|
5161
5410
|
}
|
@@ -5176,10 +5425,8 @@ function hubEventTypeToJSON(object) {
|
|
5176
5425
|
return "HUB_EVENT_TYPE_MERGE_NAME_REGISTRY_EVENT";
|
5177
5426
|
case 6 /* MERGE_USERNAME_PROOF */:
|
5178
5427
|
return "HUB_EVENT_TYPE_MERGE_USERNAME_PROOF";
|
5179
|
-
case
|
5180
|
-
return "
|
5181
|
-
case 8 /* MERGE_STORAGE_ADMIN_REGISTRY_EVENT */:
|
5182
|
-
return "HUB_EVENT_TYPE_MERGE_STORAGE_ADMIN_REGISTRY_EVENT";
|
5428
|
+
case 9 /* MERGE_ON_CHAIN_EVENT */:
|
5429
|
+
return "HUB_EVENT_TYPE_MERGE_ON_CHAIN_EVENT";
|
5183
5430
|
default:
|
5184
5431
|
throw new tsProtoGlobalThis6.Error("Unrecognized enum value " + object + " for enum HubEventType");
|
5185
5432
|
}
|
@@ -5447,70 +5694,20 @@ var MergeNameRegistryEventBody = {
|
|
5447
5694
|
return message;
|
5448
5695
|
}
|
5449
5696
|
};
|
5450
|
-
function
|
5451
|
-
return {
|
5452
|
-
}
|
5453
|
-
var MergeRentRegistryEventBody = {
|
5454
|
-
encode(message, writer = import_minimal6.default.Writer.create()) {
|
5455
|
-
if (message.rentRegistryEvent !== void 0) {
|
5456
|
-
RentRegistryEvent.encode(message.rentRegistryEvent, writer.uint32(10).fork()).ldelim();
|
5457
|
-
}
|
5458
|
-
return writer;
|
5459
|
-
},
|
5460
|
-
decode(input, length) {
|
5461
|
-
const reader = input instanceof import_minimal6.default.Reader ? input : import_minimal6.default.Reader.create(input);
|
5462
|
-
let end = length === void 0 ? reader.len : reader.pos + length;
|
5463
|
-
const message = createBaseMergeRentRegistryEventBody();
|
5464
|
-
while (reader.pos < end) {
|
5465
|
-
const tag = reader.uint32();
|
5466
|
-
switch (tag >>> 3) {
|
5467
|
-
case 1:
|
5468
|
-
if (tag != 10) {
|
5469
|
-
break;
|
5470
|
-
}
|
5471
|
-
message.rentRegistryEvent = RentRegistryEvent.decode(reader, reader.uint32());
|
5472
|
-
continue;
|
5473
|
-
}
|
5474
|
-
if ((tag & 7) == 4 || tag == 0) {
|
5475
|
-
break;
|
5476
|
-
}
|
5477
|
-
reader.skipType(tag & 7);
|
5478
|
-
}
|
5479
|
-
return message;
|
5480
|
-
},
|
5481
|
-
fromJSON(object) {
|
5482
|
-
return {
|
5483
|
-
rentRegistryEvent: isSet6(object.rentRegistryEvent) ? RentRegistryEvent.fromJSON(object.rentRegistryEvent) : void 0
|
5484
|
-
};
|
5485
|
-
},
|
5486
|
-
toJSON(message) {
|
5487
|
-
const obj = {};
|
5488
|
-
message.rentRegistryEvent !== void 0 && (obj.rentRegistryEvent = message.rentRegistryEvent ? RentRegistryEvent.toJSON(message.rentRegistryEvent) : void 0);
|
5489
|
-
return obj;
|
5490
|
-
},
|
5491
|
-
create(base) {
|
5492
|
-
return MergeRentRegistryEventBody.fromPartial(base != null ? base : {});
|
5493
|
-
},
|
5494
|
-
fromPartial(object) {
|
5495
|
-
const message = createBaseMergeRentRegistryEventBody();
|
5496
|
-
message.rentRegistryEvent = object.rentRegistryEvent !== void 0 && object.rentRegistryEvent !== null ? RentRegistryEvent.fromPartial(object.rentRegistryEvent) : void 0;
|
5497
|
-
return message;
|
5498
|
-
}
|
5499
|
-
};
|
5500
|
-
function createBaseMergeStorageAdminRegistryEventBody() {
|
5501
|
-
return { storageAdminRegistryEvent: void 0 };
|
5697
|
+
function createBaseMergeOnChainEventBody() {
|
5698
|
+
return { onChainEvent: void 0 };
|
5502
5699
|
}
|
5503
|
-
var
|
5700
|
+
var MergeOnChainEventBody = {
|
5504
5701
|
encode(message, writer = import_minimal6.default.Writer.create()) {
|
5505
|
-
if (message.
|
5506
|
-
|
5702
|
+
if (message.onChainEvent !== void 0) {
|
5703
|
+
OnChainEvent.encode(message.onChainEvent, writer.uint32(10).fork()).ldelim();
|
5507
5704
|
}
|
5508
5705
|
return writer;
|
5509
5706
|
},
|
5510
5707
|
decode(input, length) {
|
5511
5708
|
const reader = input instanceof import_minimal6.default.Reader ? input : import_minimal6.default.Reader.create(input);
|
5512
5709
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
5513
|
-
const message =
|
5710
|
+
const message = createBaseMergeOnChainEventBody();
|
5514
5711
|
while (reader.pos < end) {
|
5515
5712
|
const tag = reader.uint32();
|
5516
5713
|
switch (tag >>> 3) {
|
@@ -5518,7 +5715,7 @@ var MergeStorageAdminRegistryEventBody = {
|
|
5518
5715
|
if (tag != 10) {
|
5519
5716
|
break;
|
5520
5717
|
}
|
5521
|
-
message.
|
5718
|
+
message.onChainEvent = OnChainEvent.decode(reader, reader.uint32());
|
5522
5719
|
continue;
|
5523
5720
|
}
|
5524
5721
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -5529,21 +5726,19 @@ var MergeStorageAdminRegistryEventBody = {
|
|
5529
5726
|
return message;
|
5530
5727
|
},
|
5531
5728
|
fromJSON(object) {
|
5532
|
-
return {
|
5533
|
-
storageAdminRegistryEvent: isSet6(object.storageAdminRegistryEvent) ? StorageAdminRegistryEvent.fromJSON(object.storageAdminRegistryEvent) : void 0
|
5534
|
-
};
|
5729
|
+
return { onChainEvent: isSet6(object.onChainEvent) ? OnChainEvent.fromJSON(object.onChainEvent) : void 0 };
|
5535
5730
|
},
|
5536
5731
|
toJSON(message) {
|
5537
5732
|
const obj = {};
|
5538
|
-
message.
|
5733
|
+
message.onChainEvent !== void 0 && (obj.onChainEvent = message.onChainEvent ? OnChainEvent.toJSON(message.onChainEvent) : void 0);
|
5539
5734
|
return obj;
|
5540
5735
|
},
|
5541
5736
|
create(base) {
|
5542
|
-
return
|
5737
|
+
return MergeOnChainEventBody.fromPartial(base != null ? base : {});
|
5543
5738
|
},
|
5544
5739
|
fromPartial(object) {
|
5545
|
-
const message =
|
5546
|
-
message.
|
5740
|
+
const message = createBaseMergeOnChainEventBody();
|
5741
|
+
message.onChainEvent = object.onChainEvent !== void 0 && object.onChainEvent !== null ? OnChainEvent.fromPartial(object.onChainEvent) : void 0;
|
5547
5742
|
return message;
|
5548
5743
|
}
|
5549
5744
|
};
|
@@ -5648,8 +5843,7 @@ function createBaseHubEvent() {
|
|
5648
5843
|
mergeIdRegistryEventBody: void 0,
|
5649
5844
|
mergeNameRegistryEventBody: void 0,
|
5650
5845
|
mergeUsernameProofBody: void 0,
|
5651
|
-
|
5652
|
-
mergeStorageAdminRegistryEventBody: void 0
|
5846
|
+
mergeOnChainEventBody: void 0
|
5653
5847
|
};
|
5654
5848
|
}
|
5655
5849
|
var HubEvent = {
|
@@ -5678,11 +5872,8 @@ var HubEvent = {
|
|
5678
5872
|
if (message.mergeUsernameProofBody !== void 0) {
|
5679
5873
|
MergeUserNameProofBody.encode(message.mergeUsernameProofBody, writer.uint32(66).fork()).ldelim();
|
5680
5874
|
}
|
5681
|
-
if (message.
|
5682
|
-
|
5683
|
-
}
|
5684
|
-
if (message.mergeStorageAdminRegistryEventBody !== void 0) {
|
5685
|
-
MergeStorageAdminRegistryEventBody.encode(message.mergeStorageAdminRegistryEventBody, writer.uint32(82).fork()).ldelim();
|
5875
|
+
if (message.mergeOnChainEventBody !== void 0) {
|
5876
|
+
MergeOnChainEventBody.encode(message.mergeOnChainEventBody, writer.uint32(90).fork()).ldelim();
|
5686
5877
|
}
|
5687
5878
|
return writer;
|
5688
5879
|
},
|
@@ -5741,20 +5932,11 @@ var HubEvent = {
|
|
5741
5932
|
}
|
5742
5933
|
message.mergeUsernameProofBody = MergeUserNameProofBody.decode(reader, reader.uint32());
|
5743
5934
|
continue;
|
5744
|
-
case
|
5745
|
-
if (tag !=
|
5746
|
-
break;
|
5747
|
-
}
|
5748
|
-
message.mergeRentRegistryEventBody = MergeRentRegistryEventBody.decode(reader, reader.uint32());
|
5749
|
-
continue;
|
5750
|
-
case 10:
|
5751
|
-
if (tag != 82) {
|
5935
|
+
case 11:
|
5936
|
+
if (tag != 90) {
|
5752
5937
|
break;
|
5753
5938
|
}
|
5754
|
-
message.
|
5755
|
-
reader,
|
5756
|
-
reader.uint32()
|
5757
|
-
);
|
5939
|
+
message.mergeOnChainEventBody = MergeOnChainEventBody.decode(reader, reader.uint32());
|
5758
5940
|
continue;
|
5759
5941
|
}
|
5760
5942
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -5774,8 +5956,7 @@ var HubEvent = {
|
|
5774
5956
|
mergeIdRegistryEventBody: isSet6(object.mergeIdRegistryEventBody) ? MergeIdRegistryEventBody.fromJSON(object.mergeIdRegistryEventBody) : void 0,
|
5775
5957
|
mergeNameRegistryEventBody: isSet6(object.mergeNameRegistryEventBody) ? MergeNameRegistryEventBody.fromJSON(object.mergeNameRegistryEventBody) : void 0,
|
5776
5958
|
mergeUsernameProofBody: isSet6(object.mergeUsernameProofBody) ? MergeUserNameProofBody.fromJSON(object.mergeUsernameProofBody) : void 0,
|
5777
|
-
|
5778
|
-
mergeStorageAdminRegistryEventBody: isSet6(object.mergeStorageAdminRegistryEventBody) ? MergeStorageAdminRegistryEventBody.fromJSON(object.mergeStorageAdminRegistryEventBody) : void 0
|
5959
|
+
mergeOnChainEventBody: isSet6(object.mergeOnChainEventBody) ? MergeOnChainEventBody.fromJSON(object.mergeOnChainEventBody) : void 0
|
5779
5960
|
};
|
5780
5961
|
},
|
5781
5962
|
toJSON(message) {
|
@@ -5788,8 +5969,7 @@ var HubEvent = {
|
|
5788
5969
|
message.mergeIdRegistryEventBody !== void 0 && (obj.mergeIdRegistryEventBody = message.mergeIdRegistryEventBody ? MergeIdRegistryEventBody.toJSON(message.mergeIdRegistryEventBody) : void 0);
|
5789
5970
|
message.mergeNameRegistryEventBody !== void 0 && (obj.mergeNameRegistryEventBody = message.mergeNameRegistryEventBody ? MergeNameRegistryEventBody.toJSON(message.mergeNameRegistryEventBody) : void 0);
|
5790
5971
|
message.mergeUsernameProofBody !== void 0 && (obj.mergeUsernameProofBody = message.mergeUsernameProofBody ? MergeUserNameProofBody.toJSON(message.mergeUsernameProofBody) : void 0);
|
5791
|
-
message.
|
5792
|
-
message.mergeStorageAdminRegistryEventBody !== void 0 && (obj.mergeStorageAdminRegistryEventBody = message.mergeStorageAdminRegistryEventBody ? MergeStorageAdminRegistryEventBody.toJSON(message.mergeStorageAdminRegistryEventBody) : void 0);
|
5972
|
+
message.mergeOnChainEventBody !== void 0 && (obj.mergeOnChainEventBody = message.mergeOnChainEventBody ? MergeOnChainEventBody.toJSON(message.mergeOnChainEventBody) : void 0);
|
5793
5973
|
return obj;
|
5794
5974
|
},
|
5795
5975
|
create(base) {
|
@@ -5806,8 +5986,7 @@ var HubEvent = {
|
|
5806
5986
|
message.mergeIdRegistryEventBody = object.mergeIdRegistryEventBody !== void 0 && object.mergeIdRegistryEventBody !== null ? MergeIdRegistryEventBody.fromPartial(object.mergeIdRegistryEventBody) : void 0;
|
5807
5987
|
message.mergeNameRegistryEventBody = object.mergeNameRegistryEventBody !== void 0 && object.mergeNameRegistryEventBody !== null ? MergeNameRegistryEventBody.fromPartial(object.mergeNameRegistryEventBody) : void 0;
|
5808
5988
|
message.mergeUsernameProofBody = object.mergeUsernameProofBody !== void 0 && object.mergeUsernameProofBody !== null ? MergeUserNameProofBody.fromPartial(object.mergeUsernameProofBody) : void 0;
|
5809
|
-
message.
|
5810
|
-
message.mergeStorageAdminRegistryEventBody = object.mergeStorageAdminRegistryEventBody !== void 0 && object.mergeStorageAdminRegistryEventBody !== null ? MergeStorageAdminRegistryEventBody.fromPartial(object.mergeStorageAdminRegistryEventBody) : void 0;
|
5989
|
+
message.mergeOnChainEventBody = object.mergeOnChainEventBody !== void 0 && object.mergeOnChainEventBody !== null ? MergeOnChainEventBody.fromPartial(object.mergeOnChainEventBody) : void 0;
|
5811
5990
|
return message;
|
5812
5991
|
}
|
5813
5992
|
};
|
@@ -5844,6 +6023,48 @@ function isSet6(value) {
|
|
5844
6023
|
init_esm_shims();
|
5845
6024
|
var import_long6 = __toESM(require_long());
|
5846
6025
|
var import_minimal7 = __toESM(require_minimal2());
|
6026
|
+
function storeTypeFromJSON(object) {
|
6027
|
+
switch (object) {
|
6028
|
+
case 0:
|
6029
|
+
case "STORE_TYPE_NONE":
|
6030
|
+
return 0 /* NONE */;
|
6031
|
+
case 1:
|
6032
|
+
case "STORE_TYPE_CASTS":
|
6033
|
+
return 1 /* CASTS */;
|
6034
|
+
case 2:
|
6035
|
+
case "STORE_TYPE_LINKS":
|
6036
|
+
return 2 /* LINKS */;
|
6037
|
+
case 3:
|
6038
|
+
case "STORE_TYPE_REACTIONS":
|
6039
|
+
return 3 /* REACTIONS */;
|
6040
|
+
case 4:
|
6041
|
+
case "STORE_TYPE_USER_DATA":
|
6042
|
+
return 4 /* USER_DATA */;
|
6043
|
+
case 5:
|
6044
|
+
case "STORE_TYPE_VERIFICATIONS":
|
6045
|
+
return 5 /* VERIFICATIONS */;
|
6046
|
+
default:
|
6047
|
+
throw new tsProtoGlobalThis7.Error("Unrecognized enum value " + object + " for enum StoreType");
|
6048
|
+
}
|
6049
|
+
}
|
6050
|
+
function storeTypeToJSON(object) {
|
6051
|
+
switch (object) {
|
6052
|
+
case 0 /* NONE */:
|
6053
|
+
return "STORE_TYPE_NONE";
|
6054
|
+
case 1 /* CASTS */:
|
6055
|
+
return "STORE_TYPE_CASTS";
|
6056
|
+
case 2 /* LINKS */:
|
6057
|
+
return "STORE_TYPE_LINKS";
|
6058
|
+
case 3 /* REACTIONS */:
|
6059
|
+
return "STORE_TYPE_REACTIONS";
|
6060
|
+
case 4 /* USER_DATA */:
|
6061
|
+
return "STORE_TYPE_USER_DATA";
|
6062
|
+
case 5 /* VERIFICATIONS */:
|
6063
|
+
return "STORE_TYPE_VERIFICATIONS";
|
6064
|
+
default:
|
6065
|
+
throw new tsProtoGlobalThis7.Error("Unrecognized enum value " + object + " for enum StoreType");
|
6066
|
+
}
|
6067
|
+
}
|
5847
6068
|
function createBaseEmpty() {
|
5848
6069
|
return {};
|
5849
6070
|
}
|
@@ -6279,7 +6500,7 @@ var SyncStatusRequest = {
|
|
6279
6500
|
}
|
6280
6501
|
};
|
6281
6502
|
function createBaseSyncStatusResponse() {
|
6282
|
-
return { isSyncing: false, syncStatus: [] };
|
6503
|
+
return { isSyncing: false, syncStatus: [], engineStarted: false };
|
6283
6504
|
}
|
6284
6505
|
var SyncStatusResponse = {
|
6285
6506
|
encode(message, writer = import_minimal7.default.Writer.create()) {
|
@@ -6289,6 +6510,9 @@ var SyncStatusResponse = {
|
|
6289
6510
|
for (const v of message.syncStatus) {
|
6290
6511
|
SyncStatus.encode(v, writer.uint32(18).fork()).ldelim();
|
6291
6512
|
}
|
6513
|
+
if (message.engineStarted === true) {
|
6514
|
+
writer.uint32(24).bool(message.engineStarted);
|
6515
|
+
}
|
6292
6516
|
return writer;
|
6293
6517
|
},
|
6294
6518
|
decode(input, length) {
|
@@ -6310,6 +6534,12 @@ var SyncStatusResponse = {
|
|
6310
6534
|
}
|
6311
6535
|
message.syncStatus.push(SyncStatus.decode(reader, reader.uint32()));
|
6312
6536
|
continue;
|
6537
|
+
case 3:
|
6538
|
+
if (tag != 24) {
|
6539
|
+
break;
|
6540
|
+
}
|
6541
|
+
message.engineStarted = reader.bool();
|
6542
|
+
continue;
|
6313
6543
|
}
|
6314
6544
|
if ((tag & 7) == 4 || tag == 0) {
|
6315
6545
|
break;
|
@@ -6321,7 +6551,8 @@ var SyncStatusResponse = {
|
|
6321
6551
|
fromJSON(object) {
|
6322
6552
|
return {
|
6323
6553
|
isSyncing: isSet7(object.isSyncing) ? Boolean(object.isSyncing) : false,
|
6324
|
-
syncStatus: Array.isArray(object == null ? void 0 : object.syncStatus) ? object.syncStatus.map((e) => SyncStatus.fromJSON(e)) : []
|
6554
|
+
syncStatus: Array.isArray(object == null ? void 0 : object.syncStatus) ? object.syncStatus.map((e) => SyncStatus.fromJSON(e)) : [],
|
6555
|
+
engineStarted: isSet7(object.engineStarted) ? Boolean(object.engineStarted) : false
|
6325
6556
|
};
|
6326
6557
|
},
|
6327
6558
|
toJSON(message) {
|
@@ -6332,16 +6563,18 @@ var SyncStatusResponse = {
|
|
6332
6563
|
} else {
|
6333
6564
|
obj.syncStatus = [];
|
6334
6565
|
}
|
6566
|
+
message.engineStarted !== void 0 && (obj.engineStarted = message.engineStarted);
|
6335
6567
|
return obj;
|
6336
6568
|
},
|
6337
6569
|
create(base) {
|
6338
6570
|
return SyncStatusResponse.fromPartial(base != null ? base : {});
|
6339
6571
|
},
|
6340
6572
|
fromPartial(object) {
|
6341
|
-
var _a, _b;
|
6573
|
+
var _a, _b, _c;
|
6342
6574
|
const message = createBaseSyncStatusResponse();
|
6343
6575
|
message.isSyncing = (_a = object.isSyncing) != null ? _a : false;
|
6344
6576
|
message.syncStatus = ((_b = object.syncStatus) == null ? void 0 : _b.map((e) => SyncStatus.fromPartial(e))) || [];
|
6577
|
+
message.engineStarted = (_c = object.engineStarted) != null ? _c : false;
|
6345
6578
|
return message;
|
6346
6579
|
}
|
6347
6580
|
};
|
@@ -7599,20 +7832,23 @@ var NameRegistryEventRequest = {
|
|
7599
7832
|
return message;
|
7600
7833
|
}
|
7601
7834
|
};
|
7602
|
-
function
|
7603
|
-
return { fid: 0 };
|
7835
|
+
function createBaseOnChainEventRequest() {
|
7836
|
+
return { fid: 0, eventType: 0 };
|
7604
7837
|
}
|
7605
|
-
var
|
7838
|
+
var OnChainEventRequest = {
|
7606
7839
|
encode(message, writer = import_minimal7.default.Writer.create()) {
|
7607
7840
|
if (message.fid !== 0) {
|
7608
7841
|
writer.uint32(8).uint64(message.fid);
|
7609
7842
|
}
|
7843
|
+
if (message.eventType !== 0) {
|
7844
|
+
writer.uint32(16).int32(message.eventType);
|
7845
|
+
}
|
7610
7846
|
return writer;
|
7611
7847
|
},
|
7612
7848
|
decode(input, length) {
|
7613
7849
|
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
7614
7850
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
7615
|
-
const message =
|
7851
|
+
const message = createBaseOnChainEventRequest();
|
7616
7852
|
while (reader.pos < end) {
|
7617
7853
|
const tag = reader.uint32();
|
7618
7854
|
switch (tag >>> 3) {
|
@@ -7622,6 +7858,12 @@ var RentRegistryEventsRequest = {
|
|
7622
7858
|
}
|
7623
7859
|
message.fid = longToNumber6(reader.uint64());
|
7624
7860
|
continue;
|
7861
|
+
case 2:
|
7862
|
+
if (tag != 16) {
|
7863
|
+
break;
|
7864
|
+
}
|
7865
|
+
message.eventType = reader.int32();
|
7866
|
+
continue;
|
7625
7867
|
}
|
7626
7868
|
if ((tag & 7) == 4 || tag == 0) {
|
7627
7869
|
break;
|
@@ -7631,37 +7873,42 @@ var RentRegistryEventsRequest = {
|
|
7631
7873
|
return message;
|
7632
7874
|
},
|
7633
7875
|
fromJSON(object) {
|
7634
|
-
return {
|
7876
|
+
return {
|
7877
|
+
fid: isSet7(object.fid) ? Number(object.fid) : 0,
|
7878
|
+
eventType: isSet7(object.eventType) ? onChainEventTypeFromJSON(object.eventType) : 0
|
7879
|
+
};
|
7635
7880
|
},
|
7636
7881
|
toJSON(message) {
|
7637
7882
|
const obj = {};
|
7638
7883
|
message.fid !== void 0 && (obj.fid = Math.round(message.fid));
|
7884
|
+
message.eventType !== void 0 && (obj.eventType = onChainEventTypeToJSON(message.eventType));
|
7639
7885
|
return obj;
|
7640
7886
|
},
|
7641
7887
|
create(base) {
|
7642
|
-
return
|
7888
|
+
return OnChainEventRequest.fromPartial(base != null ? base : {});
|
7643
7889
|
},
|
7644
7890
|
fromPartial(object) {
|
7645
|
-
var _a;
|
7646
|
-
const message =
|
7891
|
+
var _a, _b;
|
7892
|
+
const message = createBaseOnChainEventRequest();
|
7647
7893
|
message.fid = (_a = object.fid) != null ? _a : 0;
|
7894
|
+
message.eventType = (_b = object.eventType) != null ? _b : 0;
|
7648
7895
|
return message;
|
7649
7896
|
}
|
7650
7897
|
};
|
7651
|
-
function
|
7898
|
+
function createBaseOnChainEventResponse() {
|
7652
7899
|
return { events: [] };
|
7653
7900
|
}
|
7654
|
-
var
|
7901
|
+
var OnChainEventResponse = {
|
7655
7902
|
encode(message, writer = import_minimal7.default.Writer.create()) {
|
7656
7903
|
for (const v of message.events) {
|
7657
|
-
|
7904
|
+
OnChainEvent.encode(v, writer.uint32(10).fork()).ldelim();
|
7658
7905
|
}
|
7659
7906
|
return writer;
|
7660
7907
|
},
|
7661
7908
|
decode(input, length) {
|
7662
7909
|
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
7663
7910
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
7664
|
-
const message =
|
7911
|
+
const message = createBaseOnChainEventResponse();
|
7665
7912
|
while (reader.pos < end) {
|
7666
7913
|
const tag = reader.uint32();
|
7667
7914
|
switch (tag >>> 3) {
|
@@ -7669,7 +7916,7 @@ var RentRegistryEventsResponse = {
|
|
7669
7916
|
if (tag != 10) {
|
7670
7917
|
break;
|
7671
7918
|
}
|
7672
|
-
message.events.push(
|
7919
|
+
message.events.push(OnChainEvent.decode(reader, reader.uint32()));
|
7673
7920
|
continue;
|
7674
7921
|
}
|
7675
7922
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -7680,26 +7927,140 @@ var RentRegistryEventsResponse = {
|
|
7680
7927
|
return message;
|
7681
7928
|
},
|
7682
7929
|
fromJSON(object) {
|
7683
|
-
return {
|
7684
|
-
events: Array.isArray(object == null ? void 0 : object.events) ? object.events.map((e) => RentRegistryEvent.fromJSON(e)) : []
|
7685
|
-
};
|
7930
|
+
return { events: Array.isArray(object == null ? void 0 : object.events) ? object.events.map((e) => OnChainEvent.fromJSON(e)) : [] };
|
7686
7931
|
},
|
7687
7932
|
toJSON(message) {
|
7688
7933
|
const obj = {};
|
7689
7934
|
if (message.events) {
|
7690
|
-
obj.events = message.events.map((e) => e ?
|
7935
|
+
obj.events = message.events.map((e) => e ? OnChainEvent.toJSON(e) : void 0);
|
7691
7936
|
} else {
|
7692
7937
|
obj.events = [];
|
7693
7938
|
}
|
7694
7939
|
return obj;
|
7695
7940
|
},
|
7696
7941
|
create(base) {
|
7697
|
-
return
|
7942
|
+
return OnChainEventResponse.fromPartial(base != null ? base : {});
|
7943
|
+
},
|
7944
|
+
fromPartial(object) {
|
7945
|
+
var _a;
|
7946
|
+
const message = createBaseOnChainEventResponse();
|
7947
|
+
message.events = ((_a = object.events) == null ? void 0 : _a.map((e) => OnChainEvent.fromPartial(e))) || [];
|
7948
|
+
return message;
|
7949
|
+
}
|
7950
|
+
};
|
7951
|
+
function createBaseStorageLimitsResponse() {
|
7952
|
+
return { limits: [] };
|
7953
|
+
}
|
7954
|
+
var StorageLimitsResponse = {
|
7955
|
+
encode(message, writer = import_minimal7.default.Writer.create()) {
|
7956
|
+
for (const v of message.limits) {
|
7957
|
+
StorageLimit.encode(v, writer.uint32(10).fork()).ldelim();
|
7958
|
+
}
|
7959
|
+
return writer;
|
7960
|
+
},
|
7961
|
+
decode(input, length) {
|
7962
|
+
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
7963
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
7964
|
+
const message = createBaseStorageLimitsResponse();
|
7965
|
+
while (reader.pos < end) {
|
7966
|
+
const tag = reader.uint32();
|
7967
|
+
switch (tag >>> 3) {
|
7968
|
+
case 1:
|
7969
|
+
if (tag != 10) {
|
7970
|
+
break;
|
7971
|
+
}
|
7972
|
+
message.limits.push(StorageLimit.decode(reader, reader.uint32()));
|
7973
|
+
continue;
|
7974
|
+
}
|
7975
|
+
if ((tag & 7) == 4 || tag == 0) {
|
7976
|
+
break;
|
7977
|
+
}
|
7978
|
+
reader.skipType(tag & 7);
|
7979
|
+
}
|
7980
|
+
return message;
|
7981
|
+
},
|
7982
|
+
fromJSON(object) {
|
7983
|
+
return { limits: Array.isArray(object == null ? void 0 : object.limits) ? object.limits.map((e) => StorageLimit.fromJSON(e)) : [] };
|
7984
|
+
},
|
7985
|
+
toJSON(message) {
|
7986
|
+
const obj = {};
|
7987
|
+
if (message.limits) {
|
7988
|
+
obj.limits = message.limits.map((e) => e ? StorageLimit.toJSON(e) : void 0);
|
7989
|
+
} else {
|
7990
|
+
obj.limits = [];
|
7991
|
+
}
|
7992
|
+
return obj;
|
7993
|
+
},
|
7994
|
+
create(base) {
|
7995
|
+
return StorageLimitsResponse.fromPartial(base != null ? base : {});
|
7698
7996
|
},
|
7699
7997
|
fromPartial(object) {
|
7700
7998
|
var _a;
|
7701
|
-
const message =
|
7702
|
-
message.
|
7999
|
+
const message = createBaseStorageLimitsResponse();
|
8000
|
+
message.limits = ((_a = object.limits) == null ? void 0 : _a.map((e) => StorageLimit.fromPartial(e))) || [];
|
8001
|
+
return message;
|
8002
|
+
}
|
8003
|
+
};
|
8004
|
+
function createBaseStorageLimit() {
|
8005
|
+
return { storeType: 0, limit: 0 };
|
8006
|
+
}
|
8007
|
+
var StorageLimit = {
|
8008
|
+
encode(message, writer = import_minimal7.default.Writer.create()) {
|
8009
|
+
if (message.storeType !== 0) {
|
8010
|
+
writer.uint32(8).int32(message.storeType);
|
8011
|
+
}
|
8012
|
+
if (message.limit !== 0) {
|
8013
|
+
writer.uint32(16).uint64(message.limit);
|
8014
|
+
}
|
8015
|
+
return writer;
|
8016
|
+
},
|
8017
|
+
decode(input, length) {
|
8018
|
+
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
8019
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
8020
|
+
const message = createBaseStorageLimit();
|
8021
|
+
while (reader.pos < end) {
|
8022
|
+
const tag = reader.uint32();
|
8023
|
+
switch (tag >>> 3) {
|
8024
|
+
case 1:
|
8025
|
+
if (tag != 8) {
|
8026
|
+
break;
|
8027
|
+
}
|
8028
|
+
message.storeType = reader.int32();
|
8029
|
+
continue;
|
8030
|
+
case 2:
|
8031
|
+
if (tag != 16) {
|
8032
|
+
break;
|
8033
|
+
}
|
8034
|
+
message.limit = longToNumber6(reader.uint64());
|
8035
|
+
continue;
|
8036
|
+
}
|
8037
|
+
if ((tag & 7) == 4 || tag == 0) {
|
8038
|
+
break;
|
8039
|
+
}
|
8040
|
+
reader.skipType(tag & 7);
|
8041
|
+
}
|
8042
|
+
return message;
|
8043
|
+
},
|
8044
|
+
fromJSON(object) {
|
8045
|
+
return {
|
8046
|
+
storeType: isSet7(object.storeType) ? storeTypeFromJSON(object.storeType) : 0,
|
8047
|
+
limit: isSet7(object.limit) ? Number(object.limit) : 0
|
8048
|
+
};
|
8049
|
+
},
|
8050
|
+
toJSON(message) {
|
8051
|
+
const obj = {};
|
8052
|
+
message.storeType !== void 0 && (obj.storeType = storeTypeToJSON(message.storeType));
|
8053
|
+
message.limit !== void 0 && (obj.limit = Math.round(message.limit));
|
8054
|
+
return obj;
|
8055
|
+
},
|
8056
|
+
create(base) {
|
8057
|
+
return StorageLimit.fromPartial(base != null ? base : {});
|
8058
|
+
},
|
8059
|
+
fromPartial(object) {
|
8060
|
+
var _a, _b;
|
8061
|
+
const message = createBaseStorageLimit();
|
8062
|
+
message.storeType = (_a = object.storeType) != null ? _a : 0;
|
8063
|
+
message.limit = (_b = object.limit) != null ? _b : 0;
|
7703
8064
|
return message;
|
7704
8065
|
}
|
7705
8066
|
};
|
@@ -8373,12 +8734,14 @@ var HubServiceClientImpl = class {
|
|
8373
8734
|
this.getUserData = this.getUserData.bind(this);
|
8374
8735
|
this.getUserDataByFid = this.getUserDataByFid.bind(this);
|
8375
8736
|
this.getNameRegistryEvent = this.getNameRegistryEvent.bind(this);
|
8376
|
-
this.
|
8737
|
+
this.getOnChainEvents = this.getOnChainEvents.bind(this);
|
8738
|
+
this.getCurrentStorageLimitsByFid = this.getCurrentStorageLimitsByFid.bind(this);
|
8377
8739
|
this.getUsernameProof = this.getUsernameProof.bind(this);
|
8378
8740
|
this.getUserNameProofsByFid = this.getUserNameProofsByFid.bind(this);
|
8379
8741
|
this.getVerification = this.getVerification.bind(this);
|
8380
8742
|
this.getVerificationsByFid = this.getVerificationsByFid.bind(this);
|
8381
8743
|
this.getSigner = this.getSigner.bind(this);
|
8744
|
+
this.getOnChainSigner = this.getOnChainSigner.bind(this);
|
8382
8745
|
this.getSignersByFid = this.getSignersByFid.bind(this);
|
8383
8746
|
this.getIdRegistryEvent = this.getIdRegistryEvent.bind(this);
|
8384
8747
|
this.getIdRegistryEventByAddress = this.getIdRegistryEventByAddress.bind(this);
|
@@ -8441,12 +8804,11 @@ var HubServiceClientImpl = class {
|
|
8441
8804
|
getNameRegistryEvent(request, metadata) {
|
8442
8805
|
return this.rpc.unary(HubServiceGetNameRegistryEventDesc, NameRegistryEventRequest.fromPartial(request), metadata);
|
8443
8806
|
}
|
8444
|
-
|
8445
|
-
return this.rpc.unary(
|
8446
|
-
|
8447
|
-
|
8448
|
-
|
8449
|
-
);
|
8807
|
+
getOnChainEvents(request, metadata) {
|
8808
|
+
return this.rpc.unary(HubServiceGetOnChainEventsDesc, OnChainEventRequest.fromPartial(request), metadata);
|
8809
|
+
}
|
8810
|
+
getCurrentStorageLimitsByFid(request, metadata) {
|
8811
|
+
return this.rpc.unary(HubServiceGetCurrentStorageLimitsByFidDesc, FidRequest.fromPartial(request), metadata);
|
8450
8812
|
}
|
8451
8813
|
getUsernameProof(request, metadata) {
|
8452
8814
|
return this.rpc.unary(HubServiceGetUsernameProofDesc, UsernameProofRequest.fromPartial(request), metadata);
|
@@ -8463,6 +8825,9 @@ var HubServiceClientImpl = class {
|
|
8463
8825
|
getSigner(request, metadata) {
|
8464
8826
|
return this.rpc.unary(HubServiceGetSignerDesc, SignerRequest.fromPartial(request), metadata);
|
8465
8827
|
}
|
8828
|
+
getOnChainSigner(request, metadata) {
|
8829
|
+
return this.rpc.unary(HubServiceGetOnChainSignerDesc, SignerRequest.fromPartial(request), metadata);
|
8830
|
+
}
|
8466
8831
|
getSignersByFid(request, metadata) {
|
8467
8832
|
return this.rpc.unary(HubServiceGetSignersByFidDesc, FidRequest.fromPartial(request), metadata);
|
8468
8833
|
}
|
@@ -8834,19 +9199,41 @@ var HubServiceGetNameRegistryEventDesc = {
|
|
8834
9199
|
}
|
8835
9200
|
}
|
8836
9201
|
};
|
8837
|
-
var
|
8838
|
-
methodName: "
|
9202
|
+
var HubServiceGetOnChainEventsDesc = {
|
9203
|
+
methodName: "GetOnChainEvents",
|
9204
|
+
service: HubServiceDesc,
|
9205
|
+
requestStream: false,
|
9206
|
+
responseStream: false,
|
9207
|
+
requestType: {
|
9208
|
+
serializeBinary() {
|
9209
|
+
return OnChainEventRequest.encode(this).finish();
|
9210
|
+
}
|
9211
|
+
},
|
9212
|
+
responseType: {
|
9213
|
+
deserializeBinary(data) {
|
9214
|
+
const value = OnChainEventResponse.decode(data);
|
9215
|
+
return {
|
9216
|
+
...value,
|
9217
|
+
toObject() {
|
9218
|
+
return value;
|
9219
|
+
}
|
9220
|
+
};
|
9221
|
+
}
|
9222
|
+
}
|
9223
|
+
};
|
9224
|
+
var HubServiceGetCurrentStorageLimitsByFidDesc = {
|
9225
|
+
methodName: "GetCurrentStorageLimitsByFid",
|
8839
9226
|
service: HubServiceDesc,
|
8840
9227
|
requestStream: false,
|
8841
9228
|
responseStream: false,
|
8842
9229
|
requestType: {
|
8843
9230
|
serializeBinary() {
|
8844
|
-
return
|
9231
|
+
return FidRequest.encode(this).finish();
|
8845
9232
|
}
|
8846
9233
|
},
|
8847
9234
|
responseType: {
|
8848
9235
|
deserializeBinary(data) {
|
8849
|
-
const value =
|
9236
|
+
const value = StorageLimitsResponse.decode(data);
|
8850
9237
|
return {
|
8851
9238
|
...value,
|
8852
9239
|
toObject() {
|
@@ -8966,6 +9353,28 @@ var HubServiceGetSignerDesc = {
|
|
8966
9353
|
}
|
8967
9354
|
}
|
8968
9355
|
};
|
9356
|
+
var HubServiceGetOnChainSignerDesc = {
|
9357
|
+
methodName: "GetOnChainSigner",
|
9358
|
+
service: HubServiceDesc,
|
9359
|
+
requestStream: false,
|
9360
|
+
responseStream: false,
|
9361
|
+
requestType: {
|
9362
|
+
serializeBinary() {
|
9363
|
+
return SignerRequest.encode(this).finish();
|
9364
|
+
}
|
9365
|
+
},
|
9366
|
+
responseType: {
|
9367
|
+
deserializeBinary(data) {
|
9368
|
+
const value = OnChainEvent.decode(data);
|
9369
|
+
return {
|
9370
|
+
...value,
|
9371
|
+
toObject() {
|
9372
|
+
return value;
|
9373
|
+
}
|
9374
|
+
};
|
9375
|
+
}
|
9376
|
+
}
|
9377
|
+
};
|
8969
9378
|
var HubServiceGetSignersByFidDesc = {
|
8970
9379
|
methodName: "GetSignersByFid",
|
8971
9380
|
service: HubServiceDesc,
|
@@ -9392,8 +9801,7 @@ var AdminServiceClientImpl = class {
|
|
9392
9801
|
this.deleteAllMessagesFromDb = this.deleteAllMessagesFromDb.bind(this);
|
9393
9802
|
this.submitIdRegistryEvent = this.submitIdRegistryEvent.bind(this);
|
9394
9803
|
this.submitNameRegistryEvent = this.submitNameRegistryEvent.bind(this);
|
9395
|
-
this.
|
9396
|
-
this.submitStorageAdminRegistryEvent = this.submitStorageAdminRegistryEvent.bind(this);
|
9804
|
+
this.submitOnChainEvent = this.submitOnChainEvent.bind(this);
|
9397
9805
|
}
|
9398
9806
|
rebuildSyncTrie(request, metadata) {
|
9399
9807
|
return this.rpc.unary(AdminServiceRebuildSyncTrieDesc, Empty.fromPartial(request), metadata);
|
@@ -9407,15 +9815,8 @@ var AdminServiceClientImpl = class {
|
|
9407
9815
|
submitNameRegistryEvent(request, metadata) {
|
9408
9816
|
return this.rpc.unary(AdminServiceSubmitNameRegistryEventDesc, NameRegistryEvent.fromPartial(request), metadata);
|
9409
9817
|
}
|
9410
|
-
|
9411
|
-
return this.rpc.unary(
|
9412
|
-
}
|
9413
|
-
submitStorageAdminRegistryEvent(request, metadata) {
|
9414
|
-
return this.rpc.unary(
|
9415
|
-
AdminServiceSubmitStorageAdminRegistryEventDesc,
|
9416
|
-
StorageAdminRegistryEvent.fromPartial(request),
|
9417
|
-
metadata
|
9418
|
-
);
|
9818
|
+
submitOnChainEvent(request, metadata) {
|
9819
|
+
return this.rpc.unary(AdminServiceSubmitOnChainEventDesc, OnChainEvent.fromPartial(request), metadata);
|
9419
9820
|
}
|
9420
9821
|
};
|
9421
9822
|
var AdminServiceDesc = { serviceName: "AdminService" };
|
@@ -9507,41 +9908,19 @@ var AdminServiceSubmitNameRegistryEventDesc = {
|
|
9507
9908
|
}
|
9508
9909
|
}
|
9509
9910
|
};
|
9510
|
-
var
|
9511
|
-
methodName: "
|
9512
|
-
service: AdminServiceDesc,
|
9513
|
-
requestStream: false,
|
9514
|
-
responseStream: false,
|
9515
|
-
requestType: {
|
9516
|
-
serializeBinary() {
|
9517
|
-
return RentRegistryEvent.encode(this).finish();
|
9518
|
-
}
|
9519
|
-
},
|
9520
|
-
responseType: {
|
9521
|
-
deserializeBinary(data) {
|
9522
|
-
const value = RentRegistryEvent.decode(data);
|
9523
|
-
return {
|
9524
|
-
...value,
|
9525
|
-
toObject() {
|
9526
|
-
return value;
|
9527
|
-
}
|
9528
|
-
};
|
9529
|
-
}
|
9530
|
-
}
|
9531
|
-
};
|
9532
|
-
var AdminServiceSubmitStorageAdminRegistryEventDesc = {
|
9533
|
-
methodName: "SubmitStorageAdminRegistryEvent",
|
9911
|
+
var AdminServiceSubmitOnChainEventDesc = {
|
9912
|
+
methodName: "SubmitOnChainEvent",
|
9534
9913
|
service: AdminServiceDesc,
|
9535
9914
|
requestStream: false,
|
9536
9915
|
responseStream: false,
|
9537
9916
|
requestType: {
|
9538
9917
|
serializeBinary() {
|
9539
|
-
return
|
9918
|
+
return OnChainEvent.encode(this).finish();
|
9540
9919
|
}
|
9541
9920
|
},
|
9542
9921
|
responseType: {
|
9543
9922
|
deserializeBinary(data) {
|
9544
|
-
const value =
|
9923
|
+
const value = OnChainEvent.decode(data);
|
9545
9924
|
return {
|
9546
9925
|
...value,
|
9547
9926
|
toObject() {
|
@@ -9563,14 +9942,14 @@ var GrpcWebImpl = class {
|
|
9563
9942
|
const request = { ..._request, ...methodDesc.requestType };
|
9564
9943
|
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;
|
9565
9944
|
return new Promise((resolve, reject) => {
|
9566
|
-
grpc.unary(methodDesc, {
|
9945
|
+
grpcWeb.grpc.unary(methodDesc, {
|
9567
9946
|
request,
|
9568
9947
|
host: this.host,
|
9569
9948
|
metadata: maybeCombinedMetadata,
|
9570
9949
|
transport: this.options.transport,
|
9571
9950
|
debug: this.options.debug,
|
9572
9951
|
onEnd: function(response) {
|
9573
|
-
if (response.status === grpc.Code.OK) {
|
9952
|
+
if (response.status === grpcWeb.grpc.Code.OK) {
|
9574
9953
|
resolve(response.message.toObject());
|
9575
9954
|
} else {
|
9576
9955
|
const err2 = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
@@ -9588,7 +9967,7 @@ var GrpcWebImpl = class {
|
|
9588
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;
|
9589
9968
|
return new Observable((observer) => {
|
9590
9969
|
const upStream = () => {
|
9591
|
-
const client = grpc.invoke(methodDesc, {
|
9970
|
+
const client = grpcWeb.grpc.invoke(methodDesc, {
|
9592
9971
|
host: this.host,
|
9593
9972
|
request,
|
9594
9973
|
transport: this.options.streamingTransport || this.options.transport,
|
@@ -9643,7 +10022,7 @@ var GrpcWebError = class extends tsProtoGlobalThis8.Error {
|
|
9643
10022
|
|
9644
10023
|
// src/client.ts
|
9645
10024
|
init_esm_shims();
|
9646
|
-
import
|
10025
|
+
import grpcWeb2 from "@improbable-eng/grpc-web";
|
9647
10026
|
|
9648
10027
|
// ../../node_modules/neverthrow/dist/index.es.js
|
9649
10028
|
init_esm_shims();
|
@@ -10056,15 +10435,15 @@ import { HubError } from "@farcaster/core";
|
|
10056
10435
|
import { Observable as Observable2 } from "rxjs";
|
10057
10436
|
var grpcCodeToHubErrorCode = (code) => {
|
10058
10437
|
switch (code) {
|
10059
|
-
case
|
10438
|
+
case grpcWeb2.grpc.Code.Unauthenticated:
|
10060
10439
|
return "unauthenticated";
|
10061
|
-
case
|
10440
|
+
case grpcWeb2.grpc.Code.PermissionDenied:
|
10062
10441
|
return "unauthorized";
|
10063
|
-
case
|
10442
|
+
case grpcWeb2.grpc.Code.InvalidArgument:
|
10064
10443
|
return "bad_request";
|
10065
|
-
case
|
10444
|
+
case grpcWeb2.grpc.Code.NotFound:
|
10066
10445
|
return "not_found";
|
10067
|
-
case
|
10446
|
+
case grpcWeb2.grpc.Code.Unavailable:
|
10068
10447
|
return "unavailable";
|
10069
10448
|
default:
|
10070
10449
|
return "unknown";
|
@@ -10112,7 +10491,7 @@ var getRpcWebClient = (...args) => {
|
|
10112
10491
|
return new GrpcWebImpl(...args);
|
10113
10492
|
};
|
10114
10493
|
var getAuthMetadata = (username, password) => {
|
10115
|
-
const metadata = new
|
10494
|
+
const metadata = new grpcWeb2.grpc.Metadata();
|
10116
10495
|
if (typeof btoa === "undefined") {
|
10117
10496
|
metadata.set("authorization", `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`);
|
10118
10497
|
} else {
|
@@ -10127,8 +10506,7 @@ export {
|
|
10127
10506
|
AdminServiceRebuildSyncTrieDesc,
|
10128
10507
|
AdminServiceSubmitIdRegistryEventDesc,
|
10129
10508
|
AdminServiceSubmitNameRegistryEventDesc,
|
10130
|
-
|
10131
|
-
AdminServiceSubmitStorageAdminRegistryEventDesc,
|
10509
|
+
AdminServiceSubmitOnChainEventDesc,
|
10132
10510
|
GrpcWebError,
|
10133
10511
|
GrpcWebImpl,
|
10134
10512
|
HubServiceClientImpl,
|
@@ -10145,6 +10523,7 @@ export {
|
|
10145
10523
|
HubServiceGetCastsByFidDesc,
|
10146
10524
|
HubServiceGetCastsByMentionDesc,
|
10147
10525
|
HubServiceGetCastsByParentDesc,
|
10526
|
+
HubServiceGetCurrentStorageLimitsByFidDesc,
|
10148
10527
|
HubServiceGetEventDesc,
|
10149
10528
|
HubServiceGetFidsDesc,
|
10150
10529
|
HubServiceGetIdRegistryEventByAddressDesc,
|
@@ -10154,11 +10533,12 @@ export {
|
|
10154
10533
|
HubServiceGetLinksByFidDesc,
|
10155
10534
|
HubServiceGetLinksByTargetDesc,
|
10156
10535
|
HubServiceGetNameRegistryEventDesc,
|
10536
|
+
HubServiceGetOnChainEventsDesc,
|
10537
|
+
HubServiceGetOnChainSignerDesc,
|
10157
10538
|
HubServiceGetReactionDesc,
|
10158
10539
|
HubServiceGetReactionsByCastDesc,
|
10159
10540
|
HubServiceGetReactionsByFidDesc,
|
10160
10541
|
HubServiceGetReactionsByTargetDesc,
|
10161
|
-
HubServiceGetRentRegistryEventsDesc,
|
10162
10542
|
HubServiceGetSignerDesc,
|
10163
10543
|
HubServiceGetSignersByFidDesc,
|
10164
10544
|
HubServiceGetSyncMetadataByPrefixDesc,
|