@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.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,166 @@ 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";
|
4750
4795
|
default:
|
4751
|
-
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum
|
4796
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum SignerEventType");
|
4752
4797
|
}
|
4753
4798
|
}
|
4754
|
-
function
|
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
|
+
default:
|
4811
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum IdRegisterEventType");
|
4812
|
+
}
|
4813
|
+
}
|
4814
|
+
function idRegisterEventTypeToJSON(object) {
|
4755
4815
|
switch (object) {
|
4756
4816
|
case 0 /* NONE */:
|
4757
|
-
return "
|
4758
|
-
case 1 /*
|
4759
|
-
return "
|
4760
|
-
case 2 /*
|
4761
|
-
return "
|
4762
|
-
case 3 /* SET_MAX_UNITS */:
|
4763
|
-
return "STORAGE_REGISTRY_EVENT_TYPE_SET_MAX_UNITS";
|
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";
|
4817
|
+
return "ID_REGISTER_EVENT_TYPE_NONE";
|
4818
|
+
case 1 /* REGISTER */:
|
4819
|
+
return "ID_REGISTER_EVENT_TYPE_REGISTER";
|
4820
|
+
case 2 /* TRANSFER */:
|
4821
|
+
return "ID_REGISTER_EVENT_TYPE_TRANSFER";
|
4768
4822
|
default:
|
4769
|
-
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum
|
4823
|
+
throw new tsProtoGlobalThis5.Error("Unrecognized enum value " + object + " for enum IdRegisterEventType");
|
4770
4824
|
}
|
4771
4825
|
}
|
4772
|
-
function
|
4826
|
+
function createBaseOnChainEvent() {
|
4773
4827
|
return {
|
4828
|
+
type: 0,
|
4829
|
+
chainId: 0,
|
4774
4830
|
blockNumber: 0,
|
4775
4831
|
blockHash: new Uint8Array(),
|
4832
|
+
blockTimestamp: 0,
|
4776
4833
|
transactionHash: new Uint8Array(),
|
4777
4834
|
logIndex: 0,
|
4778
|
-
payer: new Uint8Array(),
|
4779
4835
|
fid: 0,
|
4780
|
-
|
4781
|
-
|
4782
|
-
|
4836
|
+
signerEventBody: void 0,
|
4837
|
+
signerMigratedEventBody: void 0,
|
4838
|
+
idRegisterEventBody: void 0,
|
4839
|
+
storageRentEventBody: void 0
|
4783
4840
|
};
|
4784
4841
|
}
|
4785
|
-
var
|
4842
|
+
var OnChainEvent = {
|
4786
4843
|
encode(message, writer = import_minimal5.default.Writer.create()) {
|
4844
|
+
if (message.type !== 0) {
|
4845
|
+
writer.uint32(8).int32(message.type);
|
4846
|
+
}
|
4847
|
+
if (message.chainId !== 0) {
|
4848
|
+
writer.uint32(16).uint32(message.chainId);
|
4849
|
+
}
|
4787
4850
|
if (message.blockNumber !== 0) {
|
4788
|
-
writer.uint32(
|
4851
|
+
writer.uint32(24).uint32(message.blockNumber);
|
4789
4852
|
}
|
4790
4853
|
if (message.blockHash.length !== 0) {
|
4791
|
-
writer.uint32(
|
4854
|
+
writer.uint32(34).bytes(message.blockHash);
|
4855
|
+
}
|
4856
|
+
if (message.blockTimestamp !== 0) {
|
4857
|
+
writer.uint32(40).uint64(message.blockTimestamp);
|
4792
4858
|
}
|
4793
4859
|
if (message.transactionHash.length !== 0) {
|
4794
|
-
writer.uint32(
|
4860
|
+
writer.uint32(50).bytes(message.transactionHash);
|
4795
4861
|
}
|
4796
4862
|
if (message.logIndex !== 0) {
|
4797
|
-
writer.uint32(
|
4798
|
-
}
|
4799
|
-
if (message.payer.length !== 0) {
|
4800
|
-
writer.uint32(42).bytes(message.payer);
|
4863
|
+
writer.uint32(56).uint32(message.logIndex);
|
4801
4864
|
}
|
4802
4865
|
if (message.fid !== 0) {
|
4803
|
-
writer.uint32(
|
4866
|
+
writer.uint32(64).uint64(message.fid);
|
4804
4867
|
}
|
4805
|
-
if (message.
|
4806
|
-
writer.uint32(
|
4868
|
+
if (message.signerEventBody !== void 0) {
|
4869
|
+
SignerEventBody.encode(message.signerEventBody, writer.uint32(74).fork()).ldelim();
|
4807
4870
|
}
|
4808
|
-
if (message.
|
4809
|
-
writer.uint32(
|
4871
|
+
if (message.signerMigratedEventBody !== void 0) {
|
4872
|
+
SignerMigratedEventBody.encode(message.signerMigratedEventBody, writer.uint32(82).fork()).ldelim();
|
4810
4873
|
}
|
4811
|
-
if (message.
|
4812
|
-
writer.uint32(
|
4874
|
+
if (message.idRegisterEventBody !== void 0) {
|
4875
|
+
IdRegisterEventBody.encode(message.idRegisterEventBody, writer.uint32(90).fork()).ldelim();
|
4876
|
+
}
|
4877
|
+
if (message.storageRentEventBody !== void 0) {
|
4878
|
+
StorageRentEventBody.encode(message.storageRentEventBody, writer.uint32(98).fork()).ldelim();
|
4813
4879
|
}
|
4814
4880
|
return writer;
|
4815
4881
|
},
|
4816
4882
|
decode(input, length) {
|
4817
4883
|
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
4818
4884
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
4819
|
-
const message =
|
4885
|
+
const message = createBaseOnChainEvent();
|
4820
4886
|
while (reader.pos < end) {
|
4821
4887
|
const tag = reader.uint32();
|
4822
4888
|
switch (tag >>> 3) {
|
@@ -4824,55 +4890,73 @@ var RentRegistryEvent = {
|
|
4824
4890
|
if (tag != 8) {
|
4825
4891
|
break;
|
4826
4892
|
}
|
4827
|
-
message.
|
4893
|
+
message.type = reader.int32();
|
4828
4894
|
continue;
|
4829
4895
|
case 2:
|
4830
|
-
if (tag !=
|
4896
|
+
if (tag != 16) {
|
4831
4897
|
break;
|
4832
4898
|
}
|
4833
|
-
message.
|
4899
|
+
message.chainId = reader.uint32();
|
4834
4900
|
continue;
|
4835
4901
|
case 3:
|
4836
|
-
if (tag !=
|
4902
|
+
if (tag != 24) {
|
4837
4903
|
break;
|
4838
4904
|
}
|
4839
|
-
message.
|
4905
|
+
message.blockNumber = reader.uint32();
|
4840
4906
|
continue;
|
4841
4907
|
case 4:
|
4842
|
-
if (tag !=
|
4908
|
+
if (tag != 34) {
|
4843
4909
|
break;
|
4844
4910
|
}
|
4845
|
-
message.
|
4911
|
+
message.blockHash = reader.bytes();
|
4846
4912
|
continue;
|
4847
4913
|
case 5:
|
4848
|
-
if (tag !=
|
4914
|
+
if (tag != 40) {
|
4849
4915
|
break;
|
4850
4916
|
}
|
4851
|
-
message.
|
4917
|
+
message.blockTimestamp = longToNumber4(reader.uint64());
|
4852
4918
|
continue;
|
4853
4919
|
case 6:
|
4854
|
-
if (tag !=
|
4920
|
+
if (tag != 50) {
|
4855
4921
|
break;
|
4856
4922
|
}
|
4857
|
-
message.
|
4923
|
+
message.transactionHash = reader.bytes();
|
4858
4924
|
continue;
|
4859
4925
|
case 7:
|
4860
4926
|
if (tag != 56) {
|
4861
4927
|
break;
|
4862
4928
|
}
|
4863
|
-
message.
|
4929
|
+
message.logIndex = reader.uint32();
|
4864
4930
|
continue;
|
4865
4931
|
case 8:
|
4866
4932
|
if (tag != 64) {
|
4867
4933
|
break;
|
4868
4934
|
}
|
4869
|
-
message.
|
4935
|
+
message.fid = longToNumber4(reader.uint64());
|
4870
4936
|
continue;
|
4871
4937
|
case 9:
|
4872
|
-
if (tag !=
|
4938
|
+
if (tag != 74) {
|
4873
4939
|
break;
|
4874
4940
|
}
|
4875
|
-
message.
|
4941
|
+
message.signerEventBody = SignerEventBody.decode(reader, reader.uint32());
|
4942
|
+
continue;
|
4943
|
+
case 10:
|
4944
|
+
if (tag != 82) {
|
4945
|
+
break;
|
4946
|
+
}
|
4947
|
+
message.signerMigratedEventBody = SignerMigratedEventBody.decode(reader, reader.uint32());
|
4948
|
+
continue;
|
4949
|
+
case 11:
|
4950
|
+
if (tag != 90) {
|
4951
|
+
break;
|
4952
|
+
}
|
4953
|
+
message.idRegisterEventBody = IdRegisterEventBody.decode(reader, reader.uint32());
|
4954
|
+
continue;
|
4955
|
+
case 12:
|
4956
|
+
if (tag != 98) {
|
4957
|
+
break;
|
4958
|
+
}
|
4959
|
+
message.storageRentEventBody = StorageRentEventBody.decode(reader, reader.uint32());
|
4876
4960
|
continue;
|
4877
4961
|
}
|
4878
4962
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -4884,144 +4968,298 @@ var RentRegistryEvent = {
|
|
4884
4968
|
},
|
4885
4969
|
fromJSON(object) {
|
4886
4970
|
return {
|
4971
|
+
type: isSet5(object.type) ? onChainEventTypeFromJSON(object.type) : 0,
|
4972
|
+
chainId: isSet5(object.chainId) ? Number(object.chainId) : 0,
|
4887
4973
|
blockNumber: isSet5(object.blockNumber) ? Number(object.blockNumber) : 0,
|
4888
4974
|
blockHash: isSet5(object.blockHash) ? bytesFromBase645(object.blockHash) : new Uint8Array(),
|
4975
|
+
blockTimestamp: isSet5(object.blockTimestamp) ? Number(object.blockTimestamp) : 0,
|
4889
4976
|
transactionHash: isSet5(object.transactionHash) ? bytesFromBase645(object.transactionHash) : new Uint8Array(),
|
4890
4977
|
logIndex: isSet5(object.logIndex) ? Number(object.logIndex) : 0,
|
4891
|
-
payer: isSet5(object.payer) ? bytesFromBase645(object.payer) : new Uint8Array(),
|
4892
4978
|
fid: isSet5(object.fid) ? Number(object.fid) : 0,
|
4893
|
-
|
4894
|
-
|
4895
|
-
|
4979
|
+
signerEventBody: isSet5(object.signerEventBody) ? SignerEventBody.fromJSON(object.signerEventBody) : void 0,
|
4980
|
+
signerMigratedEventBody: isSet5(object.signerMigratedEventBody) ? SignerMigratedEventBody.fromJSON(object.signerMigratedEventBody) : void 0,
|
4981
|
+
idRegisterEventBody: isSet5(object.idRegisterEventBody) ? IdRegisterEventBody.fromJSON(object.idRegisterEventBody) : void 0,
|
4982
|
+
storageRentEventBody: isSet5(object.storageRentEventBody) ? StorageRentEventBody.fromJSON(object.storageRentEventBody) : void 0
|
4896
4983
|
};
|
4897
4984
|
},
|
4898
4985
|
toJSON(message) {
|
4899
4986
|
const obj = {};
|
4987
|
+
message.type !== void 0 && (obj.type = onChainEventTypeToJSON(message.type));
|
4988
|
+
message.chainId !== void 0 && (obj.chainId = Math.round(message.chainId));
|
4900
4989
|
message.blockNumber !== void 0 && (obj.blockNumber = Math.round(message.blockNumber));
|
4901
4990
|
message.blockHash !== void 0 && (obj.blockHash = base64FromBytes5(message.blockHash !== void 0 ? message.blockHash : new Uint8Array()));
|
4991
|
+
message.blockTimestamp !== void 0 && (obj.blockTimestamp = Math.round(message.blockTimestamp));
|
4902
4992
|
message.transactionHash !== void 0 && (obj.transactionHash = base64FromBytes5(
|
4903
4993
|
message.transactionHash !== void 0 ? message.transactionHash : new Uint8Array()
|
4904
4994
|
));
|
4905
4995
|
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
4996
|
message.fid !== void 0 && (obj.fid = Math.round(message.fid));
|
4908
|
-
message.
|
4909
|
-
message.
|
4910
|
-
message.
|
4997
|
+
message.signerEventBody !== void 0 && (obj.signerEventBody = message.signerEventBody ? SignerEventBody.toJSON(message.signerEventBody) : void 0);
|
4998
|
+
message.signerMigratedEventBody !== void 0 && (obj.signerMigratedEventBody = message.signerMigratedEventBody ? SignerMigratedEventBody.toJSON(message.signerMigratedEventBody) : void 0);
|
4999
|
+
message.idRegisterEventBody !== void 0 && (obj.idRegisterEventBody = message.idRegisterEventBody ? IdRegisterEventBody.toJSON(message.idRegisterEventBody) : void 0);
|
5000
|
+
message.storageRentEventBody !== void 0 && (obj.storageRentEventBody = message.storageRentEventBody ? StorageRentEventBody.toJSON(message.storageRentEventBody) : void 0);
|
4911
5001
|
return obj;
|
4912
5002
|
},
|
4913
5003
|
create(base) {
|
4914
|
-
return
|
5004
|
+
return OnChainEvent.fromPartial(base != null ? base : {});
|
4915
5005
|
},
|
4916
5006
|
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.
|
5007
|
+
var _a, _b, _c, _d, _e, _f, _g, _h;
|
5008
|
+
const message = createBaseOnChainEvent();
|
5009
|
+
message.type = (_a = object.type) != null ? _a : 0;
|
5010
|
+
message.chainId = (_b = object.chainId) != null ? _b : 0;
|
5011
|
+
message.blockNumber = (_c = object.blockNumber) != null ? _c : 0;
|
5012
|
+
message.blockHash = (_d = object.blockHash) != null ? _d : new Uint8Array();
|
5013
|
+
message.blockTimestamp = (_e = object.blockTimestamp) != null ? _e : 0;
|
5014
|
+
message.transactionHash = (_f = object.transactionHash) != null ? _f : new Uint8Array();
|
5015
|
+
message.logIndex = (_g = object.logIndex) != null ? _g : 0;
|
5016
|
+
message.fid = (_h = object.fid) != null ? _h : 0;
|
5017
|
+
message.signerEventBody = object.signerEventBody !== void 0 && object.signerEventBody !== null ? SignerEventBody.fromPartial(object.signerEventBody) : void 0;
|
5018
|
+
message.signerMigratedEventBody = object.signerMigratedEventBody !== void 0 && object.signerMigratedEventBody !== null ? SignerMigratedEventBody.fromPartial(object.signerMigratedEventBody) : void 0;
|
5019
|
+
message.idRegisterEventBody = object.idRegisterEventBody !== void 0 && object.idRegisterEventBody !== null ? IdRegisterEventBody.fromPartial(object.idRegisterEventBody) : void 0;
|
5020
|
+
message.storageRentEventBody = object.storageRentEventBody !== void 0 && object.storageRentEventBody !== null ? StorageRentEventBody.fromPartial(object.storageRentEventBody) : void 0;
|
4928
5021
|
return message;
|
4929
5022
|
}
|
4930
5023
|
};
|
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
|
-
};
|
5024
|
+
function createBaseSignerEventBody() {
|
5025
|
+
return { key: new Uint8Array(), scheme: 0, eventType: 0 };
|
4942
5026
|
}
|
4943
|
-
var
|
5027
|
+
var SignerEventBody = {
|
4944
5028
|
encode(message, writer = import_minimal5.default.Writer.create()) {
|
4945
|
-
if (message.
|
4946
|
-
writer.uint32(
|
5029
|
+
if (message.key.length !== 0) {
|
5030
|
+
writer.uint32(10).bytes(message.key);
|
4947
5031
|
}
|
4948
|
-
if (message.
|
4949
|
-
writer.uint32(
|
5032
|
+
if (message.scheme !== 0) {
|
5033
|
+
writer.uint32(16).uint32(message.scheme);
|
4950
5034
|
}
|
4951
|
-
if (message.
|
4952
|
-
writer.uint32(
|
4953
|
-
}
|
4954
|
-
if (message.logIndex !== 0) {
|
4955
|
-
writer.uint32(32).uint32(message.logIndex);
|
4956
|
-
}
|
4957
|
-
if (message.timestamp !== 0) {
|
4958
|
-
writer.uint32(40).uint64(message.timestamp);
|
4959
|
-
}
|
4960
|
-
if (message.from.length !== 0) {
|
4961
|
-
writer.uint32(50).bytes(message.from);
|
4962
|
-
}
|
4963
|
-
if (message.type !== 0) {
|
4964
|
-
writer.uint32(56).int32(message.type);
|
4965
|
-
}
|
4966
|
-
if (message.value.length !== 0) {
|
4967
|
-
writer.uint32(66).bytes(message.value);
|
5035
|
+
if (message.eventType !== 0) {
|
5036
|
+
writer.uint32(24).int32(message.eventType);
|
4968
5037
|
}
|
4969
5038
|
return writer;
|
4970
5039
|
},
|
4971
5040
|
decode(input, length) {
|
4972
5041
|
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
4973
5042
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
4974
|
-
const message =
|
5043
|
+
const message = createBaseSignerEventBody();
|
4975
5044
|
while (reader.pos < end) {
|
4976
5045
|
const tag = reader.uint32();
|
4977
5046
|
switch (tag >>> 3) {
|
4978
5047
|
case 1:
|
4979
|
-
if (tag !=
|
5048
|
+
if (tag != 10) {
|
4980
5049
|
break;
|
4981
5050
|
}
|
4982
|
-
message.
|
5051
|
+
message.key = reader.bytes();
|
4983
5052
|
continue;
|
4984
5053
|
case 2:
|
4985
|
-
if (tag !=
|
5054
|
+
if (tag != 16) {
|
4986
5055
|
break;
|
4987
5056
|
}
|
4988
|
-
message.
|
5057
|
+
message.scheme = reader.uint32();
|
4989
5058
|
continue;
|
4990
5059
|
case 3:
|
4991
|
-
if (tag !=
|
5060
|
+
if (tag != 24) {
|
4992
5061
|
break;
|
4993
5062
|
}
|
4994
|
-
message.
|
5063
|
+
message.eventType = reader.int32();
|
4995
5064
|
continue;
|
4996
|
-
|
4997
|
-
|
5065
|
+
}
|
5066
|
+
if ((tag & 7) == 4 || tag == 0) {
|
5067
|
+
break;
|
5068
|
+
}
|
5069
|
+
reader.skipType(tag & 7);
|
5070
|
+
}
|
5071
|
+
return message;
|
5072
|
+
},
|
5073
|
+
fromJSON(object) {
|
5074
|
+
return {
|
5075
|
+
key: isSet5(object.key) ? bytesFromBase645(object.key) : new Uint8Array(),
|
5076
|
+
scheme: isSet5(object.scheme) ? Number(object.scheme) : 0,
|
5077
|
+
eventType: isSet5(object.eventType) ? signerEventTypeFromJSON(object.eventType) : 0
|
5078
|
+
};
|
5079
|
+
},
|
5080
|
+
toJSON(message) {
|
5081
|
+
const obj = {};
|
5082
|
+
message.key !== void 0 && (obj.key = base64FromBytes5(message.key !== void 0 ? message.key : new Uint8Array()));
|
5083
|
+
message.scheme !== void 0 && (obj.scheme = Math.round(message.scheme));
|
5084
|
+
message.eventType !== void 0 && (obj.eventType = signerEventTypeToJSON(message.eventType));
|
5085
|
+
return obj;
|
5086
|
+
},
|
5087
|
+
create(base) {
|
5088
|
+
return SignerEventBody.fromPartial(base != null ? base : {});
|
5089
|
+
},
|
5090
|
+
fromPartial(object) {
|
5091
|
+
var _a, _b, _c;
|
5092
|
+
const message = createBaseSignerEventBody();
|
5093
|
+
message.key = (_a = object.key) != null ? _a : new Uint8Array();
|
5094
|
+
message.scheme = (_b = object.scheme) != null ? _b : 0;
|
5095
|
+
message.eventType = (_c = object.eventType) != null ? _c : 0;
|
5096
|
+
return message;
|
5097
|
+
}
|
5098
|
+
};
|
5099
|
+
function createBaseSignerMigratedEventBody() {
|
5100
|
+
return { migratedAt: 0 };
|
5101
|
+
}
|
5102
|
+
var SignerMigratedEventBody = {
|
5103
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
5104
|
+
if (message.migratedAt !== 0) {
|
5105
|
+
writer.uint32(8).uint32(message.migratedAt);
|
5106
|
+
}
|
5107
|
+
return writer;
|
5108
|
+
},
|
5109
|
+
decode(input, length) {
|
5110
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
5111
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
5112
|
+
const message = createBaseSignerMigratedEventBody();
|
5113
|
+
while (reader.pos < end) {
|
5114
|
+
const tag = reader.uint32();
|
5115
|
+
switch (tag >>> 3) {
|
5116
|
+
case 1:
|
5117
|
+
if (tag != 8) {
|
4998
5118
|
break;
|
4999
5119
|
}
|
5000
|
-
message.
|
5120
|
+
message.migratedAt = reader.uint32();
|
5001
5121
|
continue;
|
5002
|
-
|
5003
|
-
|
5122
|
+
}
|
5123
|
+
if ((tag & 7) == 4 || tag == 0) {
|
5124
|
+
break;
|
5125
|
+
}
|
5126
|
+
reader.skipType(tag & 7);
|
5127
|
+
}
|
5128
|
+
return message;
|
5129
|
+
},
|
5130
|
+
fromJSON(object) {
|
5131
|
+
return { migratedAt: isSet5(object.migratedAt) ? Number(object.migratedAt) : 0 };
|
5132
|
+
},
|
5133
|
+
toJSON(message) {
|
5134
|
+
const obj = {};
|
5135
|
+
message.migratedAt !== void 0 && (obj.migratedAt = Math.round(message.migratedAt));
|
5136
|
+
return obj;
|
5137
|
+
},
|
5138
|
+
create(base) {
|
5139
|
+
return SignerMigratedEventBody.fromPartial(base != null ? base : {});
|
5140
|
+
},
|
5141
|
+
fromPartial(object) {
|
5142
|
+
var _a;
|
5143
|
+
const message = createBaseSignerMigratedEventBody();
|
5144
|
+
message.migratedAt = (_a = object.migratedAt) != null ? _a : 0;
|
5145
|
+
return message;
|
5146
|
+
}
|
5147
|
+
};
|
5148
|
+
function createBaseIdRegisterEventBody() {
|
5149
|
+
return { to: new Uint8Array(), eventType: 0, from: new Uint8Array() };
|
5150
|
+
}
|
5151
|
+
var IdRegisterEventBody = {
|
5152
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
5153
|
+
if (message.to.length !== 0) {
|
5154
|
+
writer.uint32(10).bytes(message.to);
|
5155
|
+
}
|
5156
|
+
if (message.eventType !== 0) {
|
5157
|
+
writer.uint32(16).int32(message.eventType);
|
5158
|
+
}
|
5159
|
+
if (message.from.length !== 0) {
|
5160
|
+
writer.uint32(26).bytes(message.from);
|
5161
|
+
}
|
5162
|
+
return writer;
|
5163
|
+
},
|
5164
|
+
decode(input, length) {
|
5165
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
5166
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
5167
|
+
const message = createBaseIdRegisterEventBody();
|
5168
|
+
while (reader.pos < end) {
|
5169
|
+
const tag = reader.uint32();
|
5170
|
+
switch (tag >>> 3) {
|
5171
|
+
case 1:
|
5172
|
+
if (tag != 10) {
|
5004
5173
|
break;
|
5005
5174
|
}
|
5006
|
-
message.
|
5175
|
+
message.to = reader.bytes();
|
5007
5176
|
continue;
|
5008
|
-
case
|
5009
|
-
if (tag !=
|
5177
|
+
case 2:
|
5178
|
+
if (tag != 16) {
|
5179
|
+
break;
|
5180
|
+
}
|
5181
|
+
message.eventType = reader.int32();
|
5182
|
+
continue;
|
5183
|
+
case 3:
|
5184
|
+
if (tag != 26) {
|
5010
5185
|
break;
|
5011
5186
|
}
|
5012
5187
|
message.from = reader.bytes();
|
5013
5188
|
continue;
|
5014
|
-
|
5015
|
-
|
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 {
|
5199
|
+
to: isSet5(object.to) ? bytesFromBase645(object.to) : new Uint8Array(),
|
5200
|
+
eventType: isSet5(object.eventType) ? idRegisterEventTypeFromJSON(object.eventType) : 0,
|
5201
|
+
from: isSet5(object.from) ? bytesFromBase645(object.from) : new Uint8Array()
|
5202
|
+
};
|
5203
|
+
},
|
5204
|
+
toJSON(message) {
|
5205
|
+
const obj = {};
|
5206
|
+
message.to !== void 0 && (obj.to = base64FromBytes5(message.to !== void 0 ? message.to : new Uint8Array()));
|
5207
|
+
message.eventType !== void 0 && (obj.eventType = idRegisterEventTypeToJSON(message.eventType));
|
5208
|
+
message.from !== void 0 && (obj.from = base64FromBytes5(message.from !== void 0 ? message.from : new Uint8Array()));
|
5209
|
+
return obj;
|
5210
|
+
},
|
5211
|
+
create(base) {
|
5212
|
+
return IdRegisterEventBody.fromPartial(base != null ? base : {});
|
5213
|
+
},
|
5214
|
+
fromPartial(object) {
|
5215
|
+
var _a, _b, _c;
|
5216
|
+
const message = createBaseIdRegisterEventBody();
|
5217
|
+
message.to = (_a = object.to) != null ? _a : new Uint8Array();
|
5218
|
+
message.eventType = (_b = object.eventType) != null ? _b : 0;
|
5219
|
+
message.from = (_c = object.from) != null ? _c : new Uint8Array();
|
5220
|
+
return message;
|
5221
|
+
}
|
5222
|
+
};
|
5223
|
+
function createBaseStorageRentEventBody() {
|
5224
|
+
return { payer: new Uint8Array(), units: 0, expiry: 0 };
|
5225
|
+
}
|
5226
|
+
var StorageRentEventBody = {
|
5227
|
+
encode(message, writer = import_minimal5.default.Writer.create()) {
|
5228
|
+
if (message.payer.length !== 0) {
|
5229
|
+
writer.uint32(10).bytes(message.payer);
|
5230
|
+
}
|
5231
|
+
if (message.units !== 0) {
|
5232
|
+
writer.uint32(16).uint32(message.units);
|
5233
|
+
}
|
5234
|
+
if (message.expiry !== 0) {
|
5235
|
+
writer.uint32(24).uint32(message.expiry);
|
5236
|
+
}
|
5237
|
+
return writer;
|
5238
|
+
},
|
5239
|
+
decode(input, length) {
|
5240
|
+
const reader = input instanceof import_minimal5.default.Reader ? input : import_minimal5.default.Reader.create(input);
|
5241
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
5242
|
+
const message = createBaseStorageRentEventBody();
|
5243
|
+
while (reader.pos < end) {
|
5244
|
+
const tag = reader.uint32();
|
5245
|
+
switch (tag >>> 3) {
|
5246
|
+
case 1:
|
5247
|
+
if (tag != 10) {
|
5016
5248
|
break;
|
5017
5249
|
}
|
5018
|
-
message.
|
5250
|
+
message.payer = reader.bytes();
|
5019
5251
|
continue;
|
5020
|
-
case
|
5021
|
-
if (tag !=
|
5252
|
+
case 2:
|
5253
|
+
if (tag != 16) {
|
5254
|
+
break;
|
5255
|
+
}
|
5256
|
+
message.units = reader.uint32();
|
5257
|
+
continue;
|
5258
|
+
case 3:
|
5259
|
+
if (tag != 24) {
|
5022
5260
|
break;
|
5023
5261
|
}
|
5024
|
-
message.
|
5262
|
+
message.expiry = reader.uint32();
|
5025
5263
|
continue;
|
5026
5264
|
}
|
5027
5265
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -5033,44 +5271,27 @@ var StorageAdminRegistryEvent = {
|
|
5033
5271
|
},
|
5034
5272
|
fromJSON(object) {
|
5035
5273
|
return {
|
5036
|
-
|
5037
|
-
|
5038
|
-
|
5039
|
-
logIndex: isSet5(object.logIndex) ? Number(object.logIndex) : 0,
|
5040
|
-
timestamp: isSet5(object.timestamp) ? Number(object.timestamp) : 0,
|
5041
|
-
from: isSet5(object.from) ? bytesFromBase645(object.from) : new Uint8Array(),
|
5042
|
-
type: isSet5(object.type) ? storageRegistryEventTypeFromJSON(object.type) : 0,
|
5043
|
-
value: isSet5(object.value) ? bytesFromBase645(object.value) : new Uint8Array()
|
5274
|
+
payer: isSet5(object.payer) ? bytesFromBase645(object.payer) : new Uint8Array(),
|
5275
|
+
units: isSet5(object.units) ? Number(object.units) : 0,
|
5276
|
+
expiry: isSet5(object.expiry) ? Number(object.expiry) : 0
|
5044
5277
|
};
|
5045
5278
|
},
|
5046
5279
|
toJSON(message) {
|
5047
5280
|
const obj = {};
|
5048
|
-
message.
|
5049
|
-
message.
|
5050
|
-
message.
|
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));
|
5055
|
-
message.from !== void 0 && (obj.from = base64FromBytes5(message.from !== void 0 ? message.from : new Uint8Array()));
|
5056
|
-
message.type !== void 0 && (obj.type = storageRegistryEventTypeToJSON(message.type));
|
5057
|
-
message.value !== void 0 && (obj.value = base64FromBytes5(message.value !== void 0 ? message.value : new Uint8Array()));
|
5281
|
+
message.payer !== void 0 && (obj.payer = base64FromBytes5(message.payer !== void 0 ? message.payer : new Uint8Array()));
|
5282
|
+
message.units !== void 0 && (obj.units = Math.round(message.units));
|
5283
|
+
message.expiry !== void 0 && (obj.expiry = Math.round(message.expiry));
|
5058
5284
|
return obj;
|
5059
5285
|
},
|
5060
5286
|
create(base) {
|
5061
|
-
return
|
5287
|
+
return StorageRentEventBody.fromPartial(base != null ? base : {});
|
5062
5288
|
},
|
5063
5289
|
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();
|
5290
|
+
var _a, _b, _c;
|
5291
|
+
const message = createBaseStorageRentEventBody();
|
5292
|
+
message.payer = (_a = object.payer) != null ? _a : new Uint8Array();
|
5293
|
+
message.units = (_b = object.units) != null ? _b : 0;
|
5294
|
+
message.expiry = (_c = object.expiry) != null ? _c : 0;
|
5074
5295
|
return message;
|
5075
5296
|
}
|
5076
5297
|
};
|
@@ -5150,12 +5371,9 @@ function hubEventTypeFromJSON(object) {
|
|
5150
5371
|
case 6:
|
5151
5372
|
case "HUB_EVENT_TYPE_MERGE_USERNAME_PROOF":
|
5152
5373
|
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 */;
|
5374
|
+
case 9:
|
5375
|
+
case "HUB_EVENT_TYPE_MERGE_ON_CHAIN_EVENT":
|
5376
|
+
return 9 /* MERGE_ON_CHAIN_EVENT */;
|
5159
5377
|
default:
|
5160
5378
|
throw new tsProtoGlobalThis6.Error("Unrecognized enum value " + object + " for enum HubEventType");
|
5161
5379
|
}
|
@@ -5176,10 +5394,8 @@ function hubEventTypeToJSON(object) {
|
|
5176
5394
|
return "HUB_EVENT_TYPE_MERGE_NAME_REGISTRY_EVENT";
|
5177
5395
|
case 6 /* MERGE_USERNAME_PROOF */:
|
5178
5396
|
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";
|
5397
|
+
case 9 /* MERGE_ON_CHAIN_EVENT */:
|
5398
|
+
return "HUB_EVENT_TYPE_MERGE_ON_CHAIN_EVENT";
|
5183
5399
|
default:
|
5184
5400
|
throw new tsProtoGlobalThis6.Error("Unrecognized enum value " + object + " for enum HubEventType");
|
5185
5401
|
}
|
@@ -5447,70 +5663,20 @@ var MergeNameRegistryEventBody = {
|
|
5447
5663
|
return message;
|
5448
5664
|
}
|
5449
5665
|
};
|
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 };
|
5666
|
+
function createBaseMergeOnChainEventBody() {
|
5667
|
+
return { onChainEvent: void 0 };
|
5502
5668
|
}
|
5503
|
-
var
|
5669
|
+
var MergeOnChainEventBody = {
|
5504
5670
|
encode(message, writer = import_minimal6.default.Writer.create()) {
|
5505
|
-
if (message.
|
5506
|
-
|
5671
|
+
if (message.onChainEvent !== void 0) {
|
5672
|
+
OnChainEvent.encode(message.onChainEvent, writer.uint32(10).fork()).ldelim();
|
5507
5673
|
}
|
5508
5674
|
return writer;
|
5509
5675
|
},
|
5510
5676
|
decode(input, length) {
|
5511
5677
|
const reader = input instanceof import_minimal6.default.Reader ? input : import_minimal6.default.Reader.create(input);
|
5512
5678
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
5513
|
-
const message =
|
5679
|
+
const message = createBaseMergeOnChainEventBody();
|
5514
5680
|
while (reader.pos < end) {
|
5515
5681
|
const tag = reader.uint32();
|
5516
5682
|
switch (tag >>> 3) {
|
@@ -5518,7 +5684,7 @@ var MergeStorageAdminRegistryEventBody = {
|
|
5518
5684
|
if (tag != 10) {
|
5519
5685
|
break;
|
5520
5686
|
}
|
5521
|
-
message.
|
5687
|
+
message.onChainEvent = OnChainEvent.decode(reader, reader.uint32());
|
5522
5688
|
continue;
|
5523
5689
|
}
|
5524
5690
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -5529,21 +5695,19 @@ var MergeStorageAdminRegistryEventBody = {
|
|
5529
5695
|
return message;
|
5530
5696
|
},
|
5531
5697
|
fromJSON(object) {
|
5532
|
-
return {
|
5533
|
-
storageAdminRegistryEvent: isSet6(object.storageAdminRegistryEvent) ? StorageAdminRegistryEvent.fromJSON(object.storageAdminRegistryEvent) : void 0
|
5534
|
-
};
|
5698
|
+
return { onChainEvent: isSet6(object.onChainEvent) ? OnChainEvent.fromJSON(object.onChainEvent) : void 0 };
|
5535
5699
|
},
|
5536
5700
|
toJSON(message) {
|
5537
5701
|
const obj = {};
|
5538
|
-
message.
|
5702
|
+
message.onChainEvent !== void 0 && (obj.onChainEvent = message.onChainEvent ? OnChainEvent.toJSON(message.onChainEvent) : void 0);
|
5539
5703
|
return obj;
|
5540
5704
|
},
|
5541
5705
|
create(base) {
|
5542
|
-
return
|
5706
|
+
return MergeOnChainEventBody.fromPartial(base != null ? base : {});
|
5543
5707
|
},
|
5544
5708
|
fromPartial(object) {
|
5545
|
-
const message =
|
5546
|
-
message.
|
5709
|
+
const message = createBaseMergeOnChainEventBody();
|
5710
|
+
message.onChainEvent = object.onChainEvent !== void 0 && object.onChainEvent !== null ? OnChainEvent.fromPartial(object.onChainEvent) : void 0;
|
5547
5711
|
return message;
|
5548
5712
|
}
|
5549
5713
|
};
|
@@ -5648,8 +5812,7 @@ function createBaseHubEvent() {
|
|
5648
5812
|
mergeIdRegistryEventBody: void 0,
|
5649
5813
|
mergeNameRegistryEventBody: void 0,
|
5650
5814
|
mergeUsernameProofBody: void 0,
|
5651
|
-
|
5652
|
-
mergeStorageAdminRegistryEventBody: void 0
|
5815
|
+
mergeOnChainEventBody: void 0
|
5653
5816
|
};
|
5654
5817
|
}
|
5655
5818
|
var HubEvent = {
|
@@ -5678,11 +5841,8 @@ var HubEvent = {
|
|
5678
5841
|
if (message.mergeUsernameProofBody !== void 0) {
|
5679
5842
|
MergeUserNameProofBody.encode(message.mergeUsernameProofBody, writer.uint32(66).fork()).ldelim();
|
5680
5843
|
}
|
5681
|
-
if (message.
|
5682
|
-
|
5683
|
-
}
|
5684
|
-
if (message.mergeStorageAdminRegistryEventBody !== void 0) {
|
5685
|
-
MergeStorageAdminRegistryEventBody.encode(message.mergeStorageAdminRegistryEventBody, writer.uint32(82).fork()).ldelim();
|
5844
|
+
if (message.mergeOnChainEventBody !== void 0) {
|
5845
|
+
MergeOnChainEventBody.encode(message.mergeOnChainEventBody, writer.uint32(90).fork()).ldelim();
|
5686
5846
|
}
|
5687
5847
|
return writer;
|
5688
5848
|
},
|
@@ -5741,20 +5901,11 @@ var HubEvent = {
|
|
5741
5901
|
}
|
5742
5902
|
message.mergeUsernameProofBody = MergeUserNameProofBody.decode(reader, reader.uint32());
|
5743
5903
|
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) {
|
5904
|
+
case 11:
|
5905
|
+
if (tag != 90) {
|
5752
5906
|
break;
|
5753
5907
|
}
|
5754
|
-
message.
|
5755
|
-
reader,
|
5756
|
-
reader.uint32()
|
5757
|
-
);
|
5908
|
+
message.mergeOnChainEventBody = MergeOnChainEventBody.decode(reader, reader.uint32());
|
5758
5909
|
continue;
|
5759
5910
|
}
|
5760
5911
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -5774,8 +5925,7 @@ var HubEvent = {
|
|
5774
5925
|
mergeIdRegistryEventBody: isSet6(object.mergeIdRegistryEventBody) ? MergeIdRegistryEventBody.fromJSON(object.mergeIdRegistryEventBody) : void 0,
|
5775
5926
|
mergeNameRegistryEventBody: isSet6(object.mergeNameRegistryEventBody) ? MergeNameRegistryEventBody.fromJSON(object.mergeNameRegistryEventBody) : void 0,
|
5776
5927
|
mergeUsernameProofBody: isSet6(object.mergeUsernameProofBody) ? MergeUserNameProofBody.fromJSON(object.mergeUsernameProofBody) : void 0,
|
5777
|
-
|
5778
|
-
mergeStorageAdminRegistryEventBody: isSet6(object.mergeStorageAdminRegistryEventBody) ? MergeStorageAdminRegistryEventBody.fromJSON(object.mergeStorageAdminRegistryEventBody) : void 0
|
5928
|
+
mergeOnChainEventBody: isSet6(object.mergeOnChainEventBody) ? MergeOnChainEventBody.fromJSON(object.mergeOnChainEventBody) : void 0
|
5779
5929
|
};
|
5780
5930
|
},
|
5781
5931
|
toJSON(message) {
|
@@ -5788,8 +5938,7 @@ var HubEvent = {
|
|
5788
5938
|
message.mergeIdRegistryEventBody !== void 0 && (obj.mergeIdRegistryEventBody = message.mergeIdRegistryEventBody ? MergeIdRegistryEventBody.toJSON(message.mergeIdRegistryEventBody) : void 0);
|
5789
5939
|
message.mergeNameRegistryEventBody !== void 0 && (obj.mergeNameRegistryEventBody = message.mergeNameRegistryEventBody ? MergeNameRegistryEventBody.toJSON(message.mergeNameRegistryEventBody) : void 0);
|
5790
5940
|
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);
|
5941
|
+
message.mergeOnChainEventBody !== void 0 && (obj.mergeOnChainEventBody = message.mergeOnChainEventBody ? MergeOnChainEventBody.toJSON(message.mergeOnChainEventBody) : void 0);
|
5793
5942
|
return obj;
|
5794
5943
|
},
|
5795
5944
|
create(base) {
|
@@ -5806,8 +5955,7 @@ var HubEvent = {
|
|
5806
5955
|
message.mergeIdRegistryEventBody = object.mergeIdRegistryEventBody !== void 0 && object.mergeIdRegistryEventBody !== null ? MergeIdRegistryEventBody.fromPartial(object.mergeIdRegistryEventBody) : void 0;
|
5807
5956
|
message.mergeNameRegistryEventBody = object.mergeNameRegistryEventBody !== void 0 && object.mergeNameRegistryEventBody !== null ? MergeNameRegistryEventBody.fromPartial(object.mergeNameRegistryEventBody) : void 0;
|
5808
5957
|
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;
|
5958
|
+
message.mergeOnChainEventBody = object.mergeOnChainEventBody !== void 0 && object.mergeOnChainEventBody !== null ? MergeOnChainEventBody.fromPartial(object.mergeOnChainEventBody) : void 0;
|
5811
5959
|
return message;
|
5812
5960
|
}
|
5813
5961
|
};
|
@@ -5844,6 +5992,48 @@ function isSet6(value) {
|
|
5844
5992
|
init_esm_shims();
|
5845
5993
|
var import_long6 = __toESM(require_long());
|
5846
5994
|
var import_minimal7 = __toESM(require_minimal2());
|
5995
|
+
function storeTypeFromJSON(object) {
|
5996
|
+
switch (object) {
|
5997
|
+
case 0:
|
5998
|
+
case "STORE_TYPE_NONE":
|
5999
|
+
return 0 /* NONE */;
|
6000
|
+
case 1:
|
6001
|
+
case "STORE_TYPE_CASTS":
|
6002
|
+
return 1 /* CASTS */;
|
6003
|
+
case 2:
|
6004
|
+
case "STORE_TYPE_LINKS":
|
6005
|
+
return 2 /* LINKS */;
|
6006
|
+
case 3:
|
6007
|
+
case "STORE_TYPE_REACTIONS":
|
6008
|
+
return 3 /* REACTIONS */;
|
6009
|
+
case 4:
|
6010
|
+
case "STORE_TYPE_USER_DATA":
|
6011
|
+
return 4 /* USER_DATA */;
|
6012
|
+
case 5:
|
6013
|
+
case "STORE_TYPE_VERIFICATIONS":
|
6014
|
+
return 5 /* VERIFICATIONS */;
|
6015
|
+
default:
|
6016
|
+
throw new tsProtoGlobalThis7.Error("Unrecognized enum value " + object + " for enum StoreType");
|
6017
|
+
}
|
6018
|
+
}
|
6019
|
+
function storeTypeToJSON(object) {
|
6020
|
+
switch (object) {
|
6021
|
+
case 0 /* NONE */:
|
6022
|
+
return "STORE_TYPE_NONE";
|
6023
|
+
case 1 /* CASTS */:
|
6024
|
+
return "STORE_TYPE_CASTS";
|
6025
|
+
case 2 /* LINKS */:
|
6026
|
+
return "STORE_TYPE_LINKS";
|
6027
|
+
case 3 /* REACTIONS */:
|
6028
|
+
return "STORE_TYPE_REACTIONS";
|
6029
|
+
case 4 /* USER_DATA */:
|
6030
|
+
return "STORE_TYPE_USER_DATA";
|
6031
|
+
case 5 /* VERIFICATIONS */:
|
6032
|
+
return "STORE_TYPE_VERIFICATIONS";
|
6033
|
+
default:
|
6034
|
+
throw new tsProtoGlobalThis7.Error("Unrecognized enum value " + object + " for enum StoreType");
|
6035
|
+
}
|
6036
|
+
}
|
5847
6037
|
function createBaseEmpty() {
|
5848
6038
|
return {};
|
5849
6039
|
}
|
@@ -7599,20 +7789,23 @@ var NameRegistryEventRequest = {
|
|
7599
7789
|
return message;
|
7600
7790
|
}
|
7601
7791
|
};
|
7602
|
-
function
|
7603
|
-
return { fid: 0 };
|
7792
|
+
function createBaseOnChainEventRequest() {
|
7793
|
+
return { fid: 0, eventType: 0 };
|
7604
7794
|
}
|
7605
|
-
var
|
7795
|
+
var OnChainEventRequest = {
|
7606
7796
|
encode(message, writer = import_minimal7.default.Writer.create()) {
|
7607
7797
|
if (message.fid !== 0) {
|
7608
7798
|
writer.uint32(8).uint64(message.fid);
|
7609
7799
|
}
|
7800
|
+
if (message.eventType !== 0) {
|
7801
|
+
writer.uint32(16).int32(message.eventType);
|
7802
|
+
}
|
7610
7803
|
return writer;
|
7611
7804
|
},
|
7612
7805
|
decode(input, length) {
|
7613
7806
|
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
7614
7807
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
7615
|
-
const message =
|
7808
|
+
const message = createBaseOnChainEventRequest();
|
7616
7809
|
while (reader.pos < end) {
|
7617
7810
|
const tag = reader.uint32();
|
7618
7811
|
switch (tag >>> 3) {
|
@@ -7622,6 +7815,12 @@ var RentRegistryEventsRequest = {
|
|
7622
7815
|
}
|
7623
7816
|
message.fid = longToNumber6(reader.uint64());
|
7624
7817
|
continue;
|
7818
|
+
case 2:
|
7819
|
+
if (tag != 16) {
|
7820
|
+
break;
|
7821
|
+
}
|
7822
|
+
message.eventType = reader.int32();
|
7823
|
+
continue;
|
7625
7824
|
}
|
7626
7825
|
if ((tag & 7) == 4 || tag == 0) {
|
7627
7826
|
break;
|
@@ -7631,37 +7830,42 @@ var RentRegistryEventsRequest = {
|
|
7631
7830
|
return message;
|
7632
7831
|
},
|
7633
7832
|
fromJSON(object) {
|
7634
|
-
return {
|
7833
|
+
return {
|
7834
|
+
fid: isSet7(object.fid) ? Number(object.fid) : 0,
|
7835
|
+
eventType: isSet7(object.eventType) ? onChainEventTypeFromJSON(object.eventType) : 0
|
7836
|
+
};
|
7635
7837
|
},
|
7636
7838
|
toJSON(message) {
|
7637
7839
|
const obj = {};
|
7638
7840
|
message.fid !== void 0 && (obj.fid = Math.round(message.fid));
|
7841
|
+
message.eventType !== void 0 && (obj.eventType = onChainEventTypeToJSON(message.eventType));
|
7639
7842
|
return obj;
|
7640
7843
|
},
|
7641
7844
|
create(base) {
|
7642
|
-
return
|
7845
|
+
return OnChainEventRequest.fromPartial(base != null ? base : {});
|
7643
7846
|
},
|
7644
7847
|
fromPartial(object) {
|
7645
|
-
var _a;
|
7646
|
-
const message =
|
7848
|
+
var _a, _b;
|
7849
|
+
const message = createBaseOnChainEventRequest();
|
7647
7850
|
message.fid = (_a = object.fid) != null ? _a : 0;
|
7851
|
+
message.eventType = (_b = object.eventType) != null ? _b : 0;
|
7648
7852
|
return message;
|
7649
7853
|
}
|
7650
7854
|
};
|
7651
|
-
function
|
7855
|
+
function createBaseOnChainEventResponse() {
|
7652
7856
|
return { events: [] };
|
7653
7857
|
}
|
7654
|
-
var
|
7858
|
+
var OnChainEventResponse = {
|
7655
7859
|
encode(message, writer = import_minimal7.default.Writer.create()) {
|
7656
7860
|
for (const v of message.events) {
|
7657
|
-
|
7861
|
+
OnChainEvent.encode(v, writer.uint32(10).fork()).ldelim();
|
7658
7862
|
}
|
7659
7863
|
return writer;
|
7660
7864
|
},
|
7661
7865
|
decode(input, length) {
|
7662
7866
|
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
7663
7867
|
let end = length === void 0 ? reader.len : reader.pos + length;
|
7664
|
-
const message =
|
7868
|
+
const message = createBaseOnChainEventResponse();
|
7665
7869
|
while (reader.pos < end) {
|
7666
7870
|
const tag = reader.uint32();
|
7667
7871
|
switch (tag >>> 3) {
|
@@ -7669,7 +7873,7 @@ var RentRegistryEventsResponse = {
|
|
7669
7873
|
if (tag != 10) {
|
7670
7874
|
break;
|
7671
7875
|
}
|
7672
|
-
message.events.push(
|
7876
|
+
message.events.push(OnChainEvent.decode(reader, reader.uint32()));
|
7673
7877
|
continue;
|
7674
7878
|
}
|
7675
7879
|
if ((tag & 7) == 4 || tag == 0) {
|
@@ -7680,26 +7884,140 @@ var RentRegistryEventsResponse = {
|
|
7680
7884
|
return message;
|
7681
7885
|
},
|
7682
7886
|
fromJSON(object) {
|
7683
|
-
return {
|
7684
|
-
events: Array.isArray(object == null ? void 0 : object.events) ? object.events.map((e) => RentRegistryEvent.fromJSON(e)) : []
|
7685
|
-
};
|
7887
|
+
return { events: Array.isArray(object == null ? void 0 : object.events) ? object.events.map((e) => OnChainEvent.fromJSON(e)) : [] };
|
7686
7888
|
},
|
7687
7889
|
toJSON(message) {
|
7688
7890
|
const obj = {};
|
7689
7891
|
if (message.events) {
|
7690
|
-
obj.events = message.events.map((e) => e ?
|
7892
|
+
obj.events = message.events.map((e) => e ? OnChainEvent.toJSON(e) : void 0);
|
7691
7893
|
} else {
|
7692
7894
|
obj.events = [];
|
7693
7895
|
}
|
7694
7896
|
return obj;
|
7695
7897
|
},
|
7696
7898
|
create(base) {
|
7697
|
-
return
|
7899
|
+
return OnChainEventResponse.fromPartial(base != null ? base : {});
|
7900
|
+
},
|
7901
|
+
fromPartial(object) {
|
7902
|
+
var _a;
|
7903
|
+
const message = createBaseOnChainEventResponse();
|
7904
|
+
message.events = ((_a = object.events) == null ? void 0 : _a.map((e) => OnChainEvent.fromPartial(e))) || [];
|
7905
|
+
return message;
|
7906
|
+
}
|
7907
|
+
};
|
7908
|
+
function createBaseStorageLimitsResponse() {
|
7909
|
+
return { limits: [] };
|
7910
|
+
}
|
7911
|
+
var StorageLimitsResponse = {
|
7912
|
+
encode(message, writer = import_minimal7.default.Writer.create()) {
|
7913
|
+
for (const v of message.limits) {
|
7914
|
+
StorageLimit.encode(v, writer.uint32(10).fork()).ldelim();
|
7915
|
+
}
|
7916
|
+
return writer;
|
7917
|
+
},
|
7918
|
+
decode(input, length) {
|
7919
|
+
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
7920
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
7921
|
+
const message = createBaseStorageLimitsResponse();
|
7922
|
+
while (reader.pos < end) {
|
7923
|
+
const tag = reader.uint32();
|
7924
|
+
switch (tag >>> 3) {
|
7925
|
+
case 1:
|
7926
|
+
if (tag != 10) {
|
7927
|
+
break;
|
7928
|
+
}
|
7929
|
+
message.limits.push(StorageLimit.decode(reader, reader.uint32()));
|
7930
|
+
continue;
|
7931
|
+
}
|
7932
|
+
if ((tag & 7) == 4 || tag == 0) {
|
7933
|
+
break;
|
7934
|
+
}
|
7935
|
+
reader.skipType(tag & 7);
|
7936
|
+
}
|
7937
|
+
return message;
|
7938
|
+
},
|
7939
|
+
fromJSON(object) {
|
7940
|
+
return { limits: Array.isArray(object == null ? void 0 : object.limits) ? object.limits.map((e) => StorageLimit.fromJSON(e)) : [] };
|
7941
|
+
},
|
7942
|
+
toJSON(message) {
|
7943
|
+
const obj = {};
|
7944
|
+
if (message.limits) {
|
7945
|
+
obj.limits = message.limits.map((e) => e ? StorageLimit.toJSON(e) : void 0);
|
7946
|
+
} else {
|
7947
|
+
obj.limits = [];
|
7948
|
+
}
|
7949
|
+
return obj;
|
7950
|
+
},
|
7951
|
+
create(base) {
|
7952
|
+
return StorageLimitsResponse.fromPartial(base != null ? base : {});
|
7698
7953
|
},
|
7699
7954
|
fromPartial(object) {
|
7700
7955
|
var _a;
|
7701
|
-
const message =
|
7702
|
-
message.
|
7956
|
+
const message = createBaseStorageLimitsResponse();
|
7957
|
+
message.limits = ((_a = object.limits) == null ? void 0 : _a.map((e) => StorageLimit.fromPartial(e))) || [];
|
7958
|
+
return message;
|
7959
|
+
}
|
7960
|
+
};
|
7961
|
+
function createBaseStorageLimit() {
|
7962
|
+
return { storeType: 0, limit: 0 };
|
7963
|
+
}
|
7964
|
+
var StorageLimit = {
|
7965
|
+
encode(message, writer = import_minimal7.default.Writer.create()) {
|
7966
|
+
if (message.storeType !== 0) {
|
7967
|
+
writer.uint32(8).int32(message.storeType);
|
7968
|
+
}
|
7969
|
+
if (message.limit !== 0) {
|
7970
|
+
writer.uint32(16).uint64(message.limit);
|
7971
|
+
}
|
7972
|
+
return writer;
|
7973
|
+
},
|
7974
|
+
decode(input, length) {
|
7975
|
+
const reader = input instanceof import_minimal7.default.Reader ? input : import_minimal7.default.Reader.create(input);
|
7976
|
+
let end = length === void 0 ? reader.len : reader.pos + length;
|
7977
|
+
const message = createBaseStorageLimit();
|
7978
|
+
while (reader.pos < end) {
|
7979
|
+
const tag = reader.uint32();
|
7980
|
+
switch (tag >>> 3) {
|
7981
|
+
case 1:
|
7982
|
+
if (tag != 8) {
|
7983
|
+
break;
|
7984
|
+
}
|
7985
|
+
message.storeType = reader.int32();
|
7986
|
+
continue;
|
7987
|
+
case 2:
|
7988
|
+
if (tag != 16) {
|
7989
|
+
break;
|
7990
|
+
}
|
7991
|
+
message.limit = longToNumber6(reader.uint64());
|
7992
|
+
continue;
|
7993
|
+
}
|
7994
|
+
if ((tag & 7) == 4 || tag == 0) {
|
7995
|
+
break;
|
7996
|
+
}
|
7997
|
+
reader.skipType(tag & 7);
|
7998
|
+
}
|
7999
|
+
return message;
|
8000
|
+
},
|
8001
|
+
fromJSON(object) {
|
8002
|
+
return {
|
8003
|
+
storeType: isSet7(object.storeType) ? storeTypeFromJSON(object.storeType) : 0,
|
8004
|
+
limit: isSet7(object.limit) ? Number(object.limit) : 0
|
8005
|
+
};
|
8006
|
+
},
|
8007
|
+
toJSON(message) {
|
8008
|
+
const obj = {};
|
8009
|
+
message.storeType !== void 0 && (obj.storeType = storeTypeToJSON(message.storeType));
|
8010
|
+
message.limit !== void 0 && (obj.limit = Math.round(message.limit));
|
8011
|
+
return obj;
|
8012
|
+
},
|
8013
|
+
create(base) {
|
8014
|
+
return StorageLimit.fromPartial(base != null ? base : {});
|
8015
|
+
},
|
8016
|
+
fromPartial(object) {
|
8017
|
+
var _a, _b;
|
8018
|
+
const message = createBaseStorageLimit();
|
8019
|
+
message.storeType = (_a = object.storeType) != null ? _a : 0;
|
8020
|
+
message.limit = (_b = object.limit) != null ? _b : 0;
|
7703
8021
|
return message;
|
7704
8022
|
}
|
7705
8023
|
};
|
@@ -8373,12 +8691,14 @@ var HubServiceClientImpl = class {
|
|
8373
8691
|
this.getUserData = this.getUserData.bind(this);
|
8374
8692
|
this.getUserDataByFid = this.getUserDataByFid.bind(this);
|
8375
8693
|
this.getNameRegistryEvent = this.getNameRegistryEvent.bind(this);
|
8376
|
-
this.
|
8694
|
+
this.getOnChainEvents = this.getOnChainEvents.bind(this);
|
8695
|
+
this.getCurrentStorageLimitsByFid = this.getCurrentStorageLimitsByFid.bind(this);
|
8377
8696
|
this.getUsernameProof = this.getUsernameProof.bind(this);
|
8378
8697
|
this.getUserNameProofsByFid = this.getUserNameProofsByFid.bind(this);
|
8379
8698
|
this.getVerification = this.getVerification.bind(this);
|
8380
8699
|
this.getVerificationsByFid = this.getVerificationsByFid.bind(this);
|
8381
8700
|
this.getSigner = this.getSigner.bind(this);
|
8701
|
+
this.getOnChainSigner = this.getOnChainSigner.bind(this);
|
8382
8702
|
this.getSignersByFid = this.getSignersByFid.bind(this);
|
8383
8703
|
this.getIdRegistryEvent = this.getIdRegistryEvent.bind(this);
|
8384
8704
|
this.getIdRegistryEventByAddress = this.getIdRegistryEventByAddress.bind(this);
|
@@ -8441,12 +8761,11 @@ var HubServiceClientImpl = class {
|
|
8441
8761
|
getNameRegistryEvent(request, metadata) {
|
8442
8762
|
return this.rpc.unary(HubServiceGetNameRegistryEventDesc, NameRegistryEventRequest.fromPartial(request), metadata);
|
8443
8763
|
}
|
8444
|
-
|
8445
|
-
return this.rpc.unary(
|
8446
|
-
|
8447
|
-
|
8448
|
-
|
8449
|
-
);
|
8764
|
+
getOnChainEvents(request, metadata) {
|
8765
|
+
return this.rpc.unary(HubServiceGetOnChainEventsDesc, OnChainEventRequest.fromPartial(request), metadata);
|
8766
|
+
}
|
8767
|
+
getCurrentStorageLimitsByFid(request, metadata) {
|
8768
|
+
return this.rpc.unary(HubServiceGetCurrentStorageLimitsByFidDesc, FidRequest.fromPartial(request), metadata);
|
8450
8769
|
}
|
8451
8770
|
getUsernameProof(request, metadata) {
|
8452
8771
|
return this.rpc.unary(HubServiceGetUsernameProofDesc, UsernameProofRequest.fromPartial(request), metadata);
|
@@ -8463,6 +8782,9 @@ var HubServiceClientImpl = class {
|
|
8463
8782
|
getSigner(request, metadata) {
|
8464
8783
|
return this.rpc.unary(HubServiceGetSignerDesc, SignerRequest.fromPartial(request), metadata);
|
8465
8784
|
}
|
8785
|
+
getOnChainSigner(request, metadata) {
|
8786
|
+
return this.rpc.unary(HubServiceGetOnChainSignerDesc, SignerRequest.fromPartial(request), metadata);
|
8787
|
+
}
|
8466
8788
|
getSignersByFid(request, metadata) {
|
8467
8789
|
return this.rpc.unary(HubServiceGetSignersByFidDesc, FidRequest.fromPartial(request), metadata);
|
8468
8790
|
}
|
@@ -8834,19 +9156,41 @@ var HubServiceGetNameRegistryEventDesc = {
|
|
8834
9156
|
}
|
8835
9157
|
}
|
8836
9158
|
};
|
8837
|
-
var
|
8838
|
-
methodName: "
|
9159
|
+
var HubServiceGetOnChainEventsDesc = {
|
9160
|
+
methodName: "GetOnChainEvents",
|
9161
|
+
service: HubServiceDesc,
|
9162
|
+
requestStream: false,
|
9163
|
+
responseStream: false,
|
9164
|
+
requestType: {
|
9165
|
+
serializeBinary() {
|
9166
|
+
return OnChainEventRequest.encode(this).finish();
|
9167
|
+
}
|
9168
|
+
},
|
9169
|
+
responseType: {
|
9170
|
+
deserializeBinary(data) {
|
9171
|
+
const value = OnChainEventResponse.decode(data);
|
9172
|
+
return {
|
9173
|
+
...value,
|
9174
|
+
toObject() {
|
9175
|
+
return value;
|
9176
|
+
}
|
9177
|
+
};
|
9178
|
+
}
|
9179
|
+
}
|
9180
|
+
};
|
9181
|
+
var HubServiceGetCurrentStorageLimitsByFidDesc = {
|
9182
|
+
methodName: "GetCurrentStorageLimitsByFid",
|
8839
9183
|
service: HubServiceDesc,
|
8840
9184
|
requestStream: false,
|
8841
9185
|
responseStream: false,
|
8842
9186
|
requestType: {
|
8843
9187
|
serializeBinary() {
|
8844
|
-
return
|
9188
|
+
return FidRequest.encode(this).finish();
|
8845
9189
|
}
|
8846
9190
|
},
|
8847
9191
|
responseType: {
|
8848
9192
|
deserializeBinary(data) {
|
8849
|
-
const value =
|
9193
|
+
const value = StorageLimitsResponse.decode(data);
|
8850
9194
|
return {
|
8851
9195
|
...value,
|
8852
9196
|
toObject() {
|
@@ -8966,6 +9310,28 @@ var HubServiceGetSignerDesc = {
|
|
8966
9310
|
}
|
8967
9311
|
}
|
8968
9312
|
};
|
9313
|
+
var HubServiceGetOnChainSignerDesc = {
|
9314
|
+
methodName: "GetOnChainSigner",
|
9315
|
+
service: HubServiceDesc,
|
9316
|
+
requestStream: false,
|
9317
|
+
responseStream: false,
|
9318
|
+
requestType: {
|
9319
|
+
serializeBinary() {
|
9320
|
+
return SignerRequest.encode(this).finish();
|
9321
|
+
}
|
9322
|
+
},
|
9323
|
+
responseType: {
|
9324
|
+
deserializeBinary(data) {
|
9325
|
+
const value = OnChainEvent.decode(data);
|
9326
|
+
return {
|
9327
|
+
...value,
|
9328
|
+
toObject() {
|
9329
|
+
return value;
|
9330
|
+
}
|
9331
|
+
};
|
9332
|
+
}
|
9333
|
+
}
|
9334
|
+
};
|
8969
9335
|
var HubServiceGetSignersByFidDesc = {
|
8970
9336
|
methodName: "GetSignersByFid",
|
8971
9337
|
service: HubServiceDesc,
|
@@ -9392,8 +9758,7 @@ var AdminServiceClientImpl = class {
|
|
9392
9758
|
this.deleteAllMessagesFromDb = this.deleteAllMessagesFromDb.bind(this);
|
9393
9759
|
this.submitIdRegistryEvent = this.submitIdRegistryEvent.bind(this);
|
9394
9760
|
this.submitNameRegistryEvent = this.submitNameRegistryEvent.bind(this);
|
9395
|
-
this.
|
9396
|
-
this.submitStorageAdminRegistryEvent = this.submitStorageAdminRegistryEvent.bind(this);
|
9761
|
+
this.submitOnChainEvent = this.submitOnChainEvent.bind(this);
|
9397
9762
|
}
|
9398
9763
|
rebuildSyncTrie(request, metadata) {
|
9399
9764
|
return this.rpc.unary(AdminServiceRebuildSyncTrieDesc, Empty.fromPartial(request), metadata);
|
@@ -9407,15 +9772,8 @@ var AdminServiceClientImpl = class {
|
|
9407
9772
|
submitNameRegistryEvent(request, metadata) {
|
9408
9773
|
return this.rpc.unary(AdminServiceSubmitNameRegistryEventDesc, NameRegistryEvent.fromPartial(request), metadata);
|
9409
9774
|
}
|
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
|
-
);
|
9775
|
+
submitOnChainEvent(request, metadata) {
|
9776
|
+
return this.rpc.unary(AdminServiceSubmitOnChainEventDesc, OnChainEvent.fromPartial(request), metadata);
|
9419
9777
|
}
|
9420
9778
|
};
|
9421
9779
|
var AdminServiceDesc = { serviceName: "AdminService" };
|
@@ -9507,41 +9865,19 @@ var AdminServiceSubmitNameRegistryEventDesc = {
|
|
9507
9865
|
}
|
9508
9866
|
}
|
9509
9867
|
};
|
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",
|
9868
|
+
var AdminServiceSubmitOnChainEventDesc = {
|
9869
|
+
methodName: "SubmitOnChainEvent",
|
9534
9870
|
service: AdminServiceDesc,
|
9535
9871
|
requestStream: false,
|
9536
9872
|
responseStream: false,
|
9537
9873
|
requestType: {
|
9538
9874
|
serializeBinary() {
|
9539
|
-
return
|
9875
|
+
return OnChainEvent.encode(this).finish();
|
9540
9876
|
}
|
9541
9877
|
},
|
9542
9878
|
responseType: {
|
9543
9879
|
deserializeBinary(data) {
|
9544
|
-
const value =
|
9880
|
+
const value = OnChainEvent.decode(data);
|
9545
9881
|
return {
|
9546
9882
|
...value,
|
9547
9883
|
toObject() {
|
@@ -9563,14 +9899,14 @@ var GrpcWebImpl = class {
|
|
9563
9899
|
const request = { ..._request, ...methodDesc.requestType };
|
9564
9900
|
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
9901
|
return new Promise((resolve, reject) => {
|
9566
|
-
grpc.unary(methodDesc, {
|
9902
|
+
grpcWeb.grpc.unary(methodDesc, {
|
9567
9903
|
request,
|
9568
9904
|
host: this.host,
|
9569
9905
|
metadata: maybeCombinedMetadata,
|
9570
9906
|
transport: this.options.transport,
|
9571
9907
|
debug: this.options.debug,
|
9572
9908
|
onEnd: function(response) {
|
9573
|
-
if (response.status === grpc.Code.OK) {
|
9909
|
+
if (response.status === grpcWeb.grpc.Code.OK) {
|
9574
9910
|
resolve(response.message.toObject());
|
9575
9911
|
} else {
|
9576
9912
|
const err2 = new GrpcWebError(response.statusMessage, response.status, response.trailers);
|
@@ -9588,7 +9924,7 @@ var GrpcWebImpl = class {
|
|
9588
9924
|
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
9925
|
return new Observable((observer) => {
|
9590
9926
|
const upStream = () => {
|
9591
|
-
const client = grpc.invoke(methodDesc, {
|
9927
|
+
const client = grpcWeb.grpc.invoke(methodDesc, {
|
9592
9928
|
host: this.host,
|
9593
9929
|
request,
|
9594
9930
|
transport: this.options.streamingTransport || this.options.transport,
|
@@ -9643,7 +9979,7 @@ var GrpcWebError = class extends tsProtoGlobalThis8.Error {
|
|
9643
9979
|
|
9644
9980
|
// src/client.ts
|
9645
9981
|
init_esm_shims();
|
9646
|
-
import
|
9982
|
+
import grpcWeb2 from "@improbable-eng/grpc-web";
|
9647
9983
|
|
9648
9984
|
// ../../node_modules/neverthrow/dist/index.es.js
|
9649
9985
|
init_esm_shims();
|
@@ -10056,15 +10392,15 @@ import { HubError } from "@farcaster/core";
|
|
10056
10392
|
import { Observable as Observable2 } from "rxjs";
|
10057
10393
|
var grpcCodeToHubErrorCode = (code) => {
|
10058
10394
|
switch (code) {
|
10059
|
-
case
|
10395
|
+
case grpcWeb2.grpc.Code.Unauthenticated:
|
10060
10396
|
return "unauthenticated";
|
10061
|
-
case
|
10397
|
+
case grpcWeb2.grpc.Code.PermissionDenied:
|
10062
10398
|
return "unauthorized";
|
10063
|
-
case
|
10399
|
+
case grpcWeb2.grpc.Code.InvalidArgument:
|
10064
10400
|
return "bad_request";
|
10065
|
-
case
|
10401
|
+
case grpcWeb2.grpc.Code.NotFound:
|
10066
10402
|
return "not_found";
|
10067
|
-
case
|
10403
|
+
case grpcWeb2.grpc.Code.Unavailable:
|
10068
10404
|
return "unavailable";
|
10069
10405
|
default:
|
10070
10406
|
return "unknown";
|
@@ -10112,7 +10448,7 @@ var getRpcWebClient = (...args) => {
|
|
10112
10448
|
return new GrpcWebImpl(...args);
|
10113
10449
|
};
|
10114
10450
|
var getAuthMetadata = (username, password) => {
|
10115
|
-
const metadata = new
|
10451
|
+
const metadata = new grpcWeb2.grpc.Metadata();
|
10116
10452
|
if (typeof btoa === "undefined") {
|
10117
10453
|
metadata.set("authorization", `Basic ${Buffer.from(`${username}:${password}`).toString("base64")}`);
|
10118
10454
|
} else {
|
@@ -10127,8 +10463,7 @@ export {
|
|
10127
10463
|
AdminServiceRebuildSyncTrieDesc,
|
10128
10464
|
AdminServiceSubmitIdRegistryEventDesc,
|
10129
10465
|
AdminServiceSubmitNameRegistryEventDesc,
|
10130
|
-
|
10131
|
-
AdminServiceSubmitStorageAdminRegistryEventDesc,
|
10466
|
+
AdminServiceSubmitOnChainEventDesc,
|
10132
10467
|
GrpcWebError,
|
10133
10468
|
GrpcWebImpl,
|
10134
10469
|
HubServiceClientImpl,
|
@@ -10145,6 +10480,7 @@ export {
|
|
10145
10480
|
HubServiceGetCastsByFidDesc,
|
10146
10481
|
HubServiceGetCastsByMentionDesc,
|
10147
10482
|
HubServiceGetCastsByParentDesc,
|
10483
|
+
HubServiceGetCurrentStorageLimitsByFidDesc,
|
10148
10484
|
HubServiceGetEventDesc,
|
10149
10485
|
HubServiceGetFidsDesc,
|
10150
10486
|
HubServiceGetIdRegistryEventByAddressDesc,
|
@@ -10154,11 +10490,12 @@ export {
|
|
10154
10490
|
HubServiceGetLinksByFidDesc,
|
10155
10491
|
HubServiceGetLinksByTargetDesc,
|
10156
10492
|
HubServiceGetNameRegistryEventDesc,
|
10493
|
+
HubServiceGetOnChainEventsDesc,
|
10494
|
+
HubServiceGetOnChainSignerDesc,
|
10157
10495
|
HubServiceGetReactionDesc,
|
10158
10496
|
HubServiceGetReactionsByCastDesc,
|
10159
10497
|
HubServiceGetReactionsByFidDesc,
|
10160
10498
|
HubServiceGetReactionsByTargetDesc,
|
10161
|
-
HubServiceGetRentRegistryEventsDesc,
|
10162
10499
|
HubServiceGetSignerDesc,
|
10163
10500
|
HubServiceGetSignersByFidDesc,
|
10164
10501
|
HubServiceGetSyncMetadataByPrefixDesc,
|