@sparkdreamnft/sparkdreamjs 0.0.42 → 0.0.43

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.
@@ -676,7 +676,9 @@ function createBasePeerPolicy() {
676
676
  acceptReputationAttestations: false,
677
677
  requireReview: false,
678
678
  blockedIdentities: [],
679
- contentHosts: []
679
+ contentHosts: [],
680
+ allowedIdentities: [],
681
+ curation: undefined
680
682
  };
681
683
  }
682
684
  /**
@@ -721,6 +723,12 @@ export const PeerPolicy = {
721
723
  for (const v of message.contentHosts) {
722
724
  writer.uint32(90).string(v);
723
725
  }
726
+ for (const v of message.allowedIdentities) {
727
+ writer.uint32(98).string(v);
728
+ }
729
+ if (message.curation !== undefined) {
730
+ IdentityCuration.encode(message.curation, writer.uint32(106).fork()).ldelim();
731
+ }
724
732
  return writer;
725
733
  },
726
734
  decode(input, length) {
@@ -763,6 +771,12 @@ export const PeerPolicy = {
763
771
  case 11:
764
772
  message.contentHosts.push(reader.string());
765
773
  break;
774
+ case 12:
775
+ message.allowedIdentities.push(reader.string());
776
+ break;
777
+ case 13:
778
+ message.curation = IdentityCuration.decode(reader, reader.uint32());
779
+ break;
766
780
  default:
767
781
  reader.skipType(tag & 7);
768
782
  break;
@@ -783,6 +797,8 @@ export const PeerPolicy = {
783
797
  message.requireReview = object.requireReview ?? false;
784
798
  message.blockedIdentities = object.blockedIdentities?.map(e => e) || [];
785
799
  message.contentHosts = object.contentHosts?.map(e => e) || [];
800
+ message.allowedIdentities = object.allowedIdentities?.map(e => e) || [];
801
+ message.curation = object.curation !== undefined && object.curation !== null ? IdentityCuration.fromPartial(object.curation) : undefined;
786
802
  return message;
787
803
  },
788
804
  fromAmino(object) {
@@ -812,6 +828,10 @@ export const PeerPolicy = {
812
828
  }
813
829
  message.blockedIdentities = object.blocked_identities?.map(e => e) || [];
814
830
  message.contentHosts = object.content_hosts?.map(e => e) || [];
831
+ message.allowedIdentities = object.allowed_identities?.map(e => e) || [];
832
+ if (object.curation !== undefined && object.curation !== null) {
833
+ message.curation = IdentityCuration.fromAmino(object.curation);
834
+ }
815
835
  return message;
816
836
  },
817
837
  toAmino(message) {
@@ -847,6 +867,13 @@ export const PeerPolicy = {
847
867
  else {
848
868
  obj.content_hosts = message.contentHosts;
849
869
  }
870
+ if (message.allowedIdentities) {
871
+ obj.allowed_identities = message.allowedIdentities.map(e => e);
872
+ }
873
+ else {
874
+ obj.allowed_identities = message.allowedIdentities;
875
+ }
876
+ obj.curation = message.curation ? IdentityCuration.toAmino(message.curation) : undefined;
850
877
  return obj;
851
878
  },
852
879
  fromAminoMsg(object) {
@@ -865,6 +892,75 @@ export const PeerPolicy = {
865
892
  };
866
893
  }
867
894
  };
895
+ function createBaseIdentityCuration() {
896
+ return {
897
+ collectionId: BigInt(0)
898
+ };
899
+ }
900
+ /**
901
+ * IdentityCuration points a peer's author gate at an x/collect collection.
902
+ * @name IdentityCuration
903
+ * @package sparkdream.federation.v1
904
+ * @see proto type: sparkdream.federation.v1.IdentityCuration
905
+ */
906
+ export const IdentityCuration = {
907
+ typeUrl: "/sparkdream.federation.v1.IdentityCuration",
908
+ encode(message, writer = BinaryWriter.create()) {
909
+ if (message.collectionId !== BigInt(0)) {
910
+ writer.uint32(8).uint64(message.collectionId);
911
+ }
912
+ return writer;
913
+ },
914
+ decode(input, length) {
915
+ const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
916
+ let end = length === undefined ? reader.len : reader.pos + length;
917
+ const message = createBaseIdentityCuration();
918
+ while (reader.pos < end) {
919
+ const tag = reader.uint32();
920
+ switch (tag >>> 3) {
921
+ case 1:
922
+ message.collectionId = reader.uint64();
923
+ break;
924
+ default:
925
+ reader.skipType(tag & 7);
926
+ break;
927
+ }
928
+ }
929
+ return message;
930
+ },
931
+ fromPartial(object) {
932
+ const message = createBaseIdentityCuration();
933
+ message.collectionId = object.collectionId !== undefined && object.collectionId !== null ? BigInt(object.collectionId.toString()) : BigInt(0);
934
+ return message;
935
+ },
936
+ fromAmino(object) {
937
+ const message = createBaseIdentityCuration();
938
+ if (object.collection_id !== undefined && object.collection_id !== null) {
939
+ message.collectionId = BigInt(object.collection_id);
940
+ }
941
+ return message;
942
+ },
943
+ toAmino(message) {
944
+ const obj = {};
945
+ obj.collection_id = message.collectionId !== BigInt(0) ? message.collectionId?.toString() : undefined;
946
+ return obj;
947
+ },
948
+ fromAminoMsg(object) {
949
+ return IdentityCuration.fromAmino(object.value);
950
+ },
951
+ fromProtoMsg(message) {
952
+ return IdentityCuration.decode(message.value);
953
+ },
954
+ toProto(message) {
955
+ return IdentityCuration.encode(message).finish();
956
+ },
957
+ toProtoMsg(message) {
958
+ return {
959
+ typeUrl: "/sparkdream.federation.v1.IdentityCuration",
960
+ value: IdentityCuration.encode(message).finish()
961
+ };
962
+ }
963
+ };
868
964
  function createBaseBridgeBinding() {
869
965
  return {
870
966
  address: "",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sparkdreamnft/sparkdreamjs",
3
- "version": "0.0.42",
3
+ "version": "0.0.43",
4
4
  "author": "kob <kob@sparkdream.io>",
5
5
  "description": "Spark Dream blockchain TypeScript library",
6
6
  "main": "index.js",
@@ -6219,6 +6219,18 @@ export declare namespace sparkdream {
6219
6219
  toProto(message: _393.PeerPolicy): Uint8Array;
6220
6220
  toProtoMsg(message: _393.PeerPolicy): _393.PeerPolicyProtoMsg;
6221
6221
  };
6222
+ IdentityCuration: {
6223
+ typeUrl: string;
6224
+ encode(message: _393.IdentityCuration, writer?: import("..").BinaryWriter): import("..").BinaryWriter;
6225
+ decode(input: import("..").BinaryReader | Uint8Array, length?: number): _393.IdentityCuration;
6226
+ fromPartial(object: import("../helpers").DeepPartial<_393.IdentityCuration>): _393.IdentityCuration;
6227
+ fromAmino(object: _393.IdentityCurationAmino): _393.IdentityCuration;
6228
+ toAmino(message: _393.IdentityCuration): _393.IdentityCurationAmino;
6229
+ fromAminoMsg(object: _393.IdentityCurationAminoMsg): _393.IdentityCuration;
6230
+ fromProtoMsg(message: _393.IdentityCurationProtoMsg): _393.IdentityCuration;
6231
+ toProto(message: _393.IdentityCuration): Uint8Array;
6232
+ toProtoMsg(message: _393.IdentityCuration): _393.IdentityCurationProtoMsg;
6233
+ };
6222
6234
  BridgeBinding: {
6223
6235
  typeUrl: string;
6224
6236
  encode(message: _393.BridgeBinding, writer?: import("..").BinaryWriter): import("..").BinaryWriter;
@@ -268,6 +268,26 @@ export interface PeerPolicy {
268
268
  * peer's name.
269
269
  */
270
270
  contentHosts: string[];
271
+ /**
272
+ * Author curation for bridged content (MsgSubmitFederatedContent, the
273
+ * external-protocol peers). An author is admitted only when BOTH gates
274
+ * pass, and blocked_identities still overrides both:
275
+ *
276
+ * allowed_identities the admitted authors ("@user@host"), or "*" for
277
+ * any author. Empty admits nobody: a new external
278
+ * peer anchors nothing until the Operations
279
+ * Committee decides who is in scope.
280
+ * curation an x/collect collection whose active link items
281
+ * name the admitted authors, curated by the
282
+ * collection's owner and collaborators without a
283
+ * proposal per author. Unset: no collection gate.
284
+ *
285
+ * So "*" plus a collection lets the collection alone decide, and a list
286
+ * without a collection lets the list alone decide. The author's own
287
+ * consent (following the bridge account) is a bridge-side rule on top.
288
+ */
289
+ allowedIdentities: string[];
290
+ curation?: IdentityCuration;
271
291
  }
272
292
  export interface PeerPolicyProtoMsg {
273
293
  typeUrl: "/sparkdream.federation.v1.PeerPolicy";
@@ -309,11 +329,67 @@ export interface PeerPolicyAmino {
309
329
  * peer's name.
310
330
  */
311
331
  content_hosts?: string[];
332
+ /**
333
+ * Author curation for bridged content (MsgSubmitFederatedContent, the
334
+ * external-protocol peers). An author is admitted only when BOTH gates
335
+ * pass, and blocked_identities still overrides both:
336
+ *
337
+ * allowed_identities the admitted authors ("@user@host"), or "*" for
338
+ * any author. Empty admits nobody: a new external
339
+ * peer anchors nothing until the Operations
340
+ * Committee decides who is in scope.
341
+ * curation an x/collect collection whose active link items
342
+ * name the admitted authors, curated by the
343
+ * collection's owner and collaborators without a
344
+ * proposal per author. Unset: no collection gate.
345
+ *
346
+ * So "*" plus a collection lets the collection alone decide, and a list
347
+ * without a collection lets the list alone decide. The author's own
348
+ * consent (following the bridge account) is a bridge-side rule on top.
349
+ */
350
+ allowed_identities?: string[];
351
+ curation?: IdentityCurationAmino;
312
352
  }
313
353
  export interface PeerPolicyAminoMsg {
314
354
  type: "/sparkdream.federation.v1.PeerPolicy";
315
355
  value: PeerPolicyAmino;
316
356
  }
357
+ /**
358
+ * IdentityCuration points a peer's author gate at an x/collect collection.
359
+ * @name IdentityCuration
360
+ * @package sparkdream.federation.v1
361
+ * @see proto type: sparkdream.federation.v1.IdentityCuration
362
+ */
363
+ export interface IdentityCuration {
364
+ /**
365
+ * collection_id is the x/collect collection listing admitted authors, one
366
+ * link item each: an "@user@host" handle or the profile URL
367
+ * ("https://host/@user"). Only active items in an active collection count.
368
+ */
369
+ collectionId: bigint;
370
+ }
371
+ export interface IdentityCurationProtoMsg {
372
+ typeUrl: "/sparkdream.federation.v1.IdentityCuration";
373
+ value: Uint8Array;
374
+ }
375
+ /**
376
+ * IdentityCuration points a peer's author gate at an x/collect collection.
377
+ * @name IdentityCurationAmino
378
+ * @package sparkdream.federation.v1
379
+ * @see proto type: sparkdream.federation.v1.IdentityCuration
380
+ */
381
+ export interface IdentityCurationAmino {
382
+ /**
383
+ * collection_id is the x/collect collection listing admitted authors, one
384
+ * link item each: an "@user@host" handle or the profile URL
385
+ * ("https://host/@user"). Only active items in an active collection count.
386
+ */
387
+ collection_id?: string;
388
+ }
389
+ export interface IdentityCurationAminoMsg {
390
+ type: "/sparkdream.federation.v1.IdentityCuration";
391
+ value: IdentityCurationAmino;
392
+ }
317
393
  /**
318
394
  * BridgeBinding represents the federation-owned binding between a bridge
319
395
  * operator and a peer. Economic state (bond, status, unbonding, slashing
@@ -1034,6 +1110,24 @@ export declare const PeerPolicy: {
1034
1110
  toProto(message: PeerPolicy): Uint8Array;
1035
1111
  toProtoMsg(message: PeerPolicy): PeerPolicyProtoMsg;
1036
1112
  };
1113
+ /**
1114
+ * IdentityCuration points a peer's author gate at an x/collect collection.
1115
+ * @name IdentityCuration
1116
+ * @package sparkdream.federation.v1
1117
+ * @see proto type: sparkdream.federation.v1.IdentityCuration
1118
+ */
1119
+ export declare const IdentityCuration: {
1120
+ typeUrl: string;
1121
+ encode(message: IdentityCuration, writer?: BinaryWriter): BinaryWriter;
1122
+ decode(input: BinaryReader | Uint8Array, length?: number): IdentityCuration;
1123
+ fromPartial(object: DeepPartial<IdentityCuration>): IdentityCuration;
1124
+ fromAmino(object: IdentityCurationAmino): IdentityCuration;
1125
+ toAmino(message: IdentityCuration): IdentityCurationAmino;
1126
+ fromAminoMsg(object: IdentityCurationAminoMsg): IdentityCuration;
1127
+ fromProtoMsg(message: IdentityCurationProtoMsg): IdentityCuration;
1128
+ toProto(message: IdentityCuration): Uint8Array;
1129
+ toProtoMsg(message: IdentityCuration): IdentityCurationProtoMsg;
1130
+ };
1037
1131
  /**
1038
1132
  * BridgeBinding represents the federation-owned binding between a bridge
1039
1133
  * operator and a peer. Economic state (bond, status, unbonding, slashing
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PeerRemovalState = exports.OutboundAttestation = exports.TagReputation = exports.ReputationAttestation = exports.PendingIdentityChallenge = exports.IdentityLink = exports.ContentRef = exports.FederatedContent = exports.ArbiterHashSubmission = exports.EscalatedChallenge = exports.VerificationRecord = exports.BridgeBinding = exports.PeerPolicy = exports.Peer = exports.JuryVerdictAmino = exports.JuryVerdict = exports.PendingVerifierVerdictAmino = exports.PendingVerifierVerdict = exports.VerificationOutcomeAmino = exports.VerificationOutcome = exports.IdentityLinkStatusAmino = exports.IdentityLinkStatus = exports.FederatedContentStatusAmino = exports.FederatedContentStatus = exports.BridgeStatusAmino = exports.BridgeStatus = exports.PeerStatusAmino = exports.PeerStatus = exports.PeerTypeAmino = exports.PeerType = void 0;
3
+ exports.PeerRemovalState = exports.OutboundAttestation = exports.TagReputation = exports.ReputationAttestation = exports.PendingIdentityChallenge = exports.IdentityLink = exports.ContentRef = exports.FederatedContent = exports.ArbiterHashSubmission = exports.EscalatedChallenge = exports.VerificationRecord = exports.BridgeBinding = exports.IdentityCuration = exports.PeerPolicy = exports.Peer = exports.JuryVerdictAmino = exports.JuryVerdict = exports.PendingVerifierVerdictAmino = exports.PendingVerifierVerdict = exports.VerificationOutcomeAmino = exports.VerificationOutcome = exports.IdentityLinkStatusAmino = exports.IdentityLinkStatus = exports.FederatedContentStatusAmino = exports.FederatedContentStatus = exports.BridgeStatusAmino = exports.BridgeStatus = exports.PeerStatusAmino = exports.PeerStatus = exports.PeerTypeAmino = exports.PeerType = void 0;
4
4
  exports.peerTypeFromJSON = peerTypeFromJSON;
5
5
  exports.peerTypeToJSON = peerTypeToJSON;
6
6
  exports.peerStatusFromJSON = peerStatusFromJSON;
@@ -695,7 +695,9 @@ function createBasePeerPolicy() {
695
695
  acceptReputationAttestations: false,
696
696
  requireReview: false,
697
697
  blockedIdentities: [],
698
- contentHosts: []
698
+ contentHosts: [],
699
+ allowedIdentities: [],
700
+ curation: undefined
699
701
  };
700
702
  }
701
703
  /**
@@ -740,6 +742,12 @@ exports.PeerPolicy = {
740
742
  for (const v of message.contentHosts) {
741
743
  writer.uint32(90).string(v);
742
744
  }
745
+ for (const v of message.allowedIdentities) {
746
+ writer.uint32(98).string(v);
747
+ }
748
+ if (message.curation !== undefined) {
749
+ exports.IdentityCuration.encode(message.curation, writer.uint32(106).fork()).ldelim();
750
+ }
743
751
  return writer;
744
752
  },
745
753
  decode(input, length) {
@@ -782,6 +790,12 @@ exports.PeerPolicy = {
782
790
  case 11:
783
791
  message.contentHosts.push(reader.string());
784
792
  break;
793
+ case 12:
794
+ message.allowedIdentities.push(reader.string());
795
+ break;
796
+ case 13:
797
+ message.curation = exports.IdentityCuration.decode(reader, reader.uint32());
798
+ break;
785
799
  default:
786
800
  reader.skipType(tag & 7);
787
801
  break;
@@ -802,6 +816,8 @@ exports.PeerPolicy = {
802
816
  message.requireReview = object.requireReview ?? false;
803
817
  message.blockedIdentities = object.blockedIdentities?.map(e => e) || [];
804
818
  message.contentHosts = object.contentHosts?.map(e => e) || [];
819
+ message.allowedIdentities = object.allowedIdentities?.map(e => e) || [];
820
+ message.curation = object.curation !== undefined && object.curation !== null ? exports.IdentityCuration.fromPartial(object.curation) : undefined;
805
821
  return message;
806
822
  },
807
823
  fromAmino(object) {
@@ -831,6 +847,10 @@ exports.PeerPolicy = {
831
847
  }
832
848
  message.blockedIdentities = object.blocked_identities?.map(e => e) || [];
833
849
  message.contentHosts = object.content_hosts?.map(e => e) || [];
850
+ message.allowedIdentities = object.allowed_identities?.map(e => e) || [];
851
+ if (object.curation !== undefined && object.curation !== null) {
852
+ message.curation = exports.IdentityCuration.fromAmino(object.curation);
853
+ }
834
854
  return message;
835
855
  },
836
856
  toAmino(message) {
@@ -866,6 +886,13 @@ exports.PeerPolicy = {
866
886
  else {
867
887
  obj.content_hosts = message.contentHosts;
868
888
  }
889
+ if (message.allowedIdentities) {
890
+ obj.allowed_identities = message.allowedIdentities.map(e => e);
891
+ }
892
+ else {
893
+ obj.allowed_identities = message.allowedIdentities;
894
+ }
895
+ obj.curation = message.curation ? exports.IdentityCuration.toAmino(message.curation) : undefined;
869
896
  return obj;
870
897
  },
871
898
  fromAminoMsg(object) {
@@ -884,6 +911,75 @@ exports.PeerPolicy = {
884
911
  };
885
912
  }
886
913
  };
914
+ function createBaseIdentityCuration() {
915
+ return {
916
+ collectionId: BigInt(0)
917
+ };
918
+ }
919
+ /**
920
+ * IdentityCuration points a peer's author gate at an x/collect collection.
921
+ * @name IdentityCuration
922
+ * @package sparkdream.federation.v1
923
+ * @see proto type: sparkdream.federation.v1.IdentityCuration
924
+ */
925
+ exports.IdentityCuration = {
926
+ typeUrl: "/sparkdream.federation.v1.IdentityCuration",
927
+ encode(message, writer = binary_1.BinaryWriter.create()) {
928
+ if (message.collectionId !== BigInt(0)) {
929
+ writer.uint32(8).uint64(message.collectionId);
930
+ }
931
+ return writer;
932
+ },
933
+ decode(input, length) {
934
+ const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
935
+ let end = length === undefined ? reader.len : reader.pos + length;
936
+ const message = createBaseIdentityCuration();
937
+ while (reader.pos < end) {
938
+ const tag = reader.uint32();
939
+ switch (tag >>> 3) {
940
+ case 1:
941
+ message.collectionId = reader.uint64();
942
+ break;
943
+ default:
944
+ reader.skipType(tag & 7);
945
+ break;
946
+ }
947
+ }
948
+ return message;
949
+ },
950
+ fromPartial(object) {
951
+ const message = createBaseIdentityCuration();
952
+ message.collectionId = object.collectionId !== undefined && object.collectionId !== null ? BigInt(object.collectionId.toString()) : BigInt(0);
953
+ return message;
954
+ },
955
+ fromAmino(object) {
956
+ const message = createBaseIdentityCuration();
957
+ if (object.collection_id !== undefined && object.collection_id !== null) {
958
+ message.collectionId = BigInt(object.collection_id);
959
+ }
960
+ return message;
961
+ },
962
+ toAmino(message) {
963
+ const obj = {};
964
+ obj.collection_id = message.collectionId !== BigInt(0) ? message.collectionId?.toString() : undefined;
965
+ return obj;
966
+ },
967
+ fromAminoMsg(object) {
968
+ return exports.IdentityCuration.fromAmino(object.value);
969
+ },
970
+ fromProtoMsg(message) {
971
+ return exports.IdentityCuration.decode(message.value);
972
+ },
973
+ toProto(message) {
974
+ return exports.IdentityCuration.encode(message).finish();
975
+ },
976
+ toProtoMsg(message) {
977
+ return {
978
+ typeUrl: "/sparkdream.federation.v1.IdentityCuration",
979
+ value: exports.IdentityCuration.encode(message).finish()
980
+ };
981
+ }
982
+ };
887
983
  function createBaseBridgeBinding() {
888
984
  return {
889
985
  address: "",