@sparkdreamnft/sparkdreamjs 0.0.39 → 0.0.41
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/esm/sparkdream/federation/v1/genesis.js +397 -2
- package/esm/sparkdream/federation/v1/params.js +68 -92
- package/esm/sparkdream/federation/v1/query.js +49 -1
- package/esm/sparkdream/federation/v1/query.lcd.js +13 -3
- package/esm/sparkdream/federation/v1/query.rpc.Query.js +1 -3
- package/esm/sparkdream/federation/v1/tx.js +14 -2
- package/esm/sparkdream/federation/v1/types.js +164 -20
- package/esm/sparkdream/session/v1/tx.amino.js +205 -3
- package/package.json +1 -1
- package/sparkdream/bundle.d.ts +114 -2
- package/sparkdream/client.d.ts +64 -0
- package/sparkdream/federation/v1/genesis.d.ts +221 -1
- package/sparkdream/federation/v1/genesis.js +397 -2
- package/sparkdream/federation/v1/params.d.ts +0 -4
- package/sparkdream/federation/v1/params.js +68 -92
- package/sparkdream/federation/v1/query.d.ts +30 -0
- package/sparkdream/federation/v1/query.js +49 -1
- package/sparkdream/federation/v1/query.lcd.d.ts +1 -1
- package/sparkdream/federation/v1/query.lcd.js +13 -3
- package/sparkdream/federation/v1/query.rpc.Query.d.ts +3 -3
- package/sparkdream/federation/v1/query.rpc.Query.js +1 -3
- package/sparkdream/federation/v1/tx.d.ts +15 -1
- package/sparkdream/federation/v1/tx.js +13 -1
- package/sparkdream/federation/v1/types.d.ts +142 -2
- package/sparkdream/federation/v1/types.js +165 -21
- package/sparkdream/rpc.query.d.ts +1 -1
- package/sparkdream/session/v1/tx.amino.d.ts +65 -0
- package/sparkdream/session/v1/tx.amino.js +204 -2
|
@@ -1329,7 +1329,8 @@ function createBaseMsgSubmitFederatedContent() {
|
|
|
1329
1329
|
contentUri: "",
|
|
1330
1330
|
protocolMetadata: new Uint8Array(),
|
|
1331
1331
|
remoteCreatedAt: BigInt(0),
|
|
1332
|
-
contentHash: new Uint8Array()
|
|
1332
|
+
contentHash: new Uint8Array(),
|
|
1333
|
+
supersedes: undefined
|
|
1333
1334
|
};
|
|
1334
1335
|
}
|
|
1335
1336
|
/**
|
|
@@ -1377,6 +1378,9 @@ exports.MsgSubmitFederatedContent = {
|
|
|
1377
1378
|
if (message.contentHash.length !== 0) {
|
|
1378
1379
|
writer.uint32(98).bytes(message.contentHash);
|
|
1379
1380
|
}
|
|
1381
|
+
if (message.supersedes !== undefined) {
|
|
1382
|
+
types_1.ContentRef.encode(message.supersedes, writer.uint32(106).fork()).ldelim();
|
|
1383
|
+
}
|
|
1380
1384
|
return writer;
|
|
1381
1385
|
},
|
|
1382
1386
|
decode(input, length) {
|
|
@@ -1422,6 +1426,9 @@ exports.MsgSubmitFederatedContent = {
|
|
|
1422
1426
|
case 12:
|
|
1423
1427
|
message.contentHash = reader.bytes();
|
|
1424
1428
|
break;
|
|
1429
|
+
case 13:
|
|
1430
|
+
message.supersedes = types_1.ContentRef.decode(reader, reader.uint32());
|
|
1431
|
+
break;
|
|
1425
1432
|
default:
|
|
1426
1433
|
reader.skipType(tag & 7);
|
|
1427
1434
|
break;
|
|
@@ -1443,6 +1450,7 @@ exports.MsgSubmitFederatedContent = {
|
|
|
1443
1450
|
message.protocolMetadata = object.protocolMetadata ?? new Uint8Array();
|
|
1444
1451
|
message.remoteCreatedAt = object.remoteCreatedAt !== undefined && object.remoteCreatedAt !== null ? BigInt(object.remoteCreatedAt.toString()) : BigInt(0);
|
|
1445
1452
|
message.contentHash = object.contentHash ?? new Uint8Array();
|
|
1453
|
+
message.supersedes = object.supersedes !== undefined && object.supersedes !== null ? types_1.ContentRef.fromPartial(object.supersedes) : undefined;
|
|
1446
1454
|
return message;
|
|
1447
1455
|
},
|
|
1448
1456
|
fromAmino(object) {
|
|
@@ -1483,6 +1491,9 @@ exports.MsgSubmitFederatedContent = {
|
|
|
1483
1491
|
if (object.content_hash !== undefined && object.content_hash !== null) {
|
|
1484
1492
|
message.contentHash = (0, helpers_1.bytesFromBase64)(object.content_hash);
|
|
1485
1493
|
}
|
|
1494
|
+
if (object.supersedes !== undefined && object.supersedes !== null) {
|
|
1495
|
+
message.supersedes = types_1.ContentRef.fromAmino(object.supersedes);
|
|
1496
|
+
}
|
|
1486
1497
|
return message;
|
|
1487
1498
|
},
|
|
1488
1499
|
toAmino(message) {
|
|
@@ -1499,6 +1510,7 @@ exports.MsgSubmitFederatedContent = {
|
|
|
1499
1510
|
obj.protocol_metadata = message.protocolMetadata ? (0, helpers_1.base64FromBytes)(message.protocolMetadata) : undefined;
|
|
1500
1511
|
obj.remote_created_at = message.remoteCreatedAt !== BigInt(0) ? message.remoteCreatedAt?.toString() : undefined;
|
|
1501
1512
|
obj.content_hash = message.contentHash ? (0, helpers_1.base64FromBytes)(message.contentHash) : undefined;
|
|
1513
|
+
obj.supersedes = message.supersedes ? types_1.ContentRef.toAmino(message.supersedes) : undefined;
|
|
1502
1514
|
return obj;
|
|
1503
1515
|
},
|
|
1504
1516
|
fromAminoMsg(object) {
|
|
@@ -57,6 +57,30 @@ export declare enum FederatedContentStatus {
|
|
|
57
57
|
FEDERATED_CONTENT_STATUS_DISPUTED = 4,
|
|
58
58
|
FEDERATED_CONTENT_STATUS_CHALLENGED = 5,
|
|
59
59
|
FEDERATED_CONTENT_STATUS_REJECTED = 6,
|
|
60
|
+
/**
|
|
61
|
+
* FEDERATED_CONTENT_STATUS_UNRESOLVED - UNRESOLVED is system-assigned: the arbiter resolution window expired
|
|
62
|
+
* without quorum, so no finding was ever made about the content. It is
|
|
63
|
+
* terminal, deliberately excluded from MsgModerateContent (OpsComm
|
|
64
|
+
* moderates HIDDEN/ACTIVE/VERIFIED/REJECTED, not system states), and
|
|
65
|
+
* was chosen over reverting to PENDING_VERIFICATION because a revived
|
|
66
|
+
* record would have no VerificationWindow queue entry and a verification
|
|
67
|
+
* deadline already in the past — unverifiable and unreapable until
|
|
68
|
+
* content_ttl. Local state only: FederatedContentStatus never crosses
|
|
69
|
+
* the IBC wire (see packet_wire_compat_test.go).
|
|
70
|
+
*/
|
|
71
|
+
FEDERATED_CONTENT_STATUS_UNRESOLVED = 7,
|
|
72
|
+
/**
|
|
73
|
+
* FEDERATED_CONTENT_STATUS_SUPERSEDED - SUPERSEDED is system-assigned: the submitting operator anchored a newer
|
|
74
|
+
* version of the same content_uri (an edit) while this record was still
|
|
75
|
+
* PENDING_VERIFICATION. The anchored version no longer exists at the
|
|
76
|
+
* source, so no verifier can ever confirm it; retiring it here keeps it
|
|
77
|
+
* out of the verification-expiry sweep, which would otherwise count it
|
|
78
|
+
* against an honest operator as unverified. Terminal and excluded from
|
|
79
|
+
* MsgModerateContent for the same reason as UNRESOLVED: moderating it
|
|
80
|
+
* could manufacture a VERIFIED status for bytes nobody verified. Local
|
|
81
|
+
* state only; never crosses the IBC wire.
|
|
82
|
+
*/
|
|
83
|
+
FEDERATED_CONTENT_STATUS_SUPERSEDED = 8,
|
|
60
84
|
UNRECOGNIZED = -1
|
|
61
85
|
}
|
|
62
86
|
export declare const FederatedContentStatusAmino: typeof FederatedContentStatus;
|
|
@@ -217,12 +241,21 @@ export interface PeerPolicy {
|
|
|
217
241
|
*/
|
|
218
242
|
allowReputationQueries: boolean;
|
|
219
243
|
acceptReputationAttestations: boolean;
|
|
220
|
-
maxTrustCredit: number;
|
|
221
244
|
/**
|
|
222
245
|
* Moderation
|
|
223
246
|
*/
|
|
224
247
|
requireReview: boolean;
|
|
225
248
|
blockedIdentities: string[];
|
|
249
|
+
/**
|
|
250
|
+
* content_hosts lists hostnames, beyond the peer id itself, that may
|
|
251
|
+
* appear in an inbound content_uri. ActivityPub peers only. An instance
|
|
252
|
+
* whose AS2 ids live on a different host than its account domain (a
|
|
253
|
+
* WEB_DOMAIN split) lists that host here; otherwise leave it empty and
|
|
254
|
+
* only the peer id's own host is accepted. Without the check a bridge
|
|
255
|
+
* bonded for one peer could anchor another instance's posts under this
|
|
256
|
+
* peer's name.
|
|
257
|
+
*/
|
|
258
|
+
contentHosts: string[];
|
|
226
259
|
}
|
|
227
260
|
export interface PeerPolicyProtoMsg {
|
|
228
261
|
typeUrl: "/sparkdream.federation.v1.PeerPolicy";
|
|
@@ -249,12 +282,21 @@ export interface PeerPolicyAmino {
|
|
|
249
282
|
*/
|
|
250
283
|
allow_reputation_queries?: boolean;
|
|
251
284
|
accept_reputation_attestations?: boolean;
|
|
252
|
-
max_trust_credit?: number;
|
|
253
285
|
/**
|
|
254
286
|
* Moderation
|
|
255
287
|
*/
|
|
256
288
|
require_review?: boolean;
|
|
257
289
|
blocked_identities?: string[];
|
|
290
|
+
/**
|
|
291
|
+
* content_hosts lists hostnames, beyond the peer id itself, that may
|
|
292
|
+
* appear in an inbound content_uri. ActivityPub peers only. An instance
|
|
293
|
+
* whose AS2 ids live on a different host than its account domain (a
|
|
294
|
+
* WEB_DOMAIN split) lists that host here; otherwise leave it empty and
|
|
295
|
+
* only the peer id's own host is accepted. Without the check a bridge
|
|
296
|
+
* bonded for one peer could anchor another instance's posts under this
|
|
297
|
+
* peer's name.
|
|
298
|
+
*/
|
|
299
|
+
content_hosts?: string[];
|
|
258
300
|
}
|
|
259
301
|
export interface PeerPolicyAminoMsg {
|
|
260
302
|
type: "/sparkdream.federation.v1.PeerPolicy";
|
|
@@ -417,6 +459,19 @@ export interface VerificationRecord {
|
|
|
417
459
|
* clears it back to UNSPECIFIED, deferring resolution to the jury path.
|
|
418
460
|
*/
|
|
419
461
|
pendingVerifierVerdict: PendingVerifierVerdict;
|
|
462
|
+
/**
|
|
463
|
+
* commitment_released records that CommittedAmount was already given
|
|
464
|
+
* back to the verifier's available bond via x/rep ReleaseBond. The
|
|
465
|
+
* flag exists because the alternative — inferring from Outcome —
|
|
466
|
+
* cannot distinguish an upheld challenge (SlashBond already freed the
|
|
467
|
+
* commitment; a second release would silently eat a different
|
|
468
|
+
* concurrent commitment, since ReleaseBond is saturating) from the
|
|
469
|
+
* paths that owe a release, and the record outlives the content
|
|
470
|
+
* (pruneExpiredContent drops Content but never VerificationRecords).
|
|
471
|
+
* True means released; false means either not yet resolved or freed
|
|
472
|
+
* by SlashBond on the upheld path.
|
|
473
|
+
*/
|
|
474
|
+
commitmentReleased: boolean;
|
|
420
475
|
}
|
|
421
476
|
export interface VerificationRecordProtoMsg {
|
|
422
477
|
typeUrl: "/sparkdream.federation.v1.VerificationRecord";
|
|
@@ -457,6 +512,19 @@ export interface VerificationRecordAmino {
|
|
|
457
512
|
* clears it back to UNSPECIFIED, deferring resolution to the jury path.
|
|
458
513
|
*/
|
|
459
514
|
pending_verifier_verdict?: PendingVerifierVerdict;
|
|
515
|
+
/**
|
|
516
|
+
* commitment_released records that CommittedAmount was already given
|
|
517
|
+
* back to the verifier's available bond via x/rep ReleaseBond. The
|
|
518
|
+
* flag exists because the alternative — inferring from Outcome —
|
|
519
|
+
* cannot distinguish an upheld challenge (SlashBond already freed the
|
|
520
|
+
* commitment; a second release would silently eat a different
|
|
521
|
+
* concurrent commitment, since ReleaseBond is saturating) from the
|
|
522
|
+
* paths that owe a release, and the record outlives the content
|
|
523
|
+
* (pruneExpiredContent drops Content but never VerificationRecords).
|
|
524
|
+
* True means released; false means either not yet resolved or freed
|
|
525
|
+
* by SlashBond on the upheld path.
|
|
526
|
+
*/
|
|
527
|
+
commitment_released?: boolean;
|
|
460
528
|
}
|
|
461
529
|
export interface VerificationRecordAminoMsg {
|
|
462
530
|
type: "/sparkdream.federation.v1.VerificationRecord";
|
|
@@ -605,6 +673,17 @@ export interface FederatedContent {
|
|
|
605
673
|
status: FederatedContentStatus;
|
|
606
674
|
expiresAt: bigint;
|
|
607
675
|
contentHash: Uint8Array;
|
|
676
|
+
/**
|
|
677
|
+
* supersedes names the earlier record of the same content_uri that this
|
|
678
|
+
* one replaces (an edit). Unset for a first version.
|
|
679
|
+
*/
|
|
680
|
+
supersedes?: ContentRef;
|
|
681
|
+
/**
|
|
682
|
+
* superseded_by is the id of the newer record that replaced this one,
|
|
683
|
+
* 0 while none has. A successor is always allocated after its
|
|
684
|
+
* predecessor, so it is never content id 0 and 0 is unambiguous here.
|
|
685
|
+
*/
|
|
686
|
+
supersededBy: bigint;
|
|
608
687
|
}
|
|
609
688
|
export interface FederatedContentProtoMsg {
|
|
610
689
|
typeUrl: "/sparkdream.federation.v1.FederatedContent";
|
|
@@ -633,11 +712,52 @@ export interface FederatedContentAmino {
|
|
|
633
712
|
status?: FederatedContentStatus;
|
|
634
713
|
expires_at?: string;
|
|
635
714
|
content_hash?: string;
|
|
715
|
+
/**
|
|
716
|
+
* supersedes names the earlier record of the same content_uri that this
|
|
717
|
+
* one replaces (an edit). Unset for a first version.
|
|
718
|
+
*/
|
|
719
|
+
supersedes?: ContentRefAmino;
|
|
720
|
+
/**
|
|
721
|
+
* superseded_by is the id of the newer record that replaced this one,
|
|
722
|
+
* 0 while none has. A successor is always allocated after its
|
|
723
|
+
* predecessor, so it is never content id 0 and 0 is unambiguous here.
|
|
724
|
+
*/
|
|
725
|
+
superseded_by?: string;
|
|
636
726
|
}
|
|
637
727
|
export interface FederatedContentAminoMsg {
|
|
638
728
|
type: "/sparkdream.federation.v1.FederatedContent";
|
|
639
729
|
value: FederatedContentAmino;
|
|
640
730
|
}
|
|
731
|
+
/**
|
|
732
|
+
* ContentRef points at a FederatedContent record. A message rather than a
|
|
733
|
+
* bare uint64 because content ids start at 0: a nil ref is "none", which
|
|
734
|
+
* a zero id could not express.
|
|
735
|
+
* @name ContentRef
|
|
736
|
+
* @package sparkdream.federation.v1
|
|
737
|
+
* @see proto type: sparkdream.federation.v1.ContentRef
|
|
738
|
+
*/
|
|
739
|
+
export interface ContentRef {
|
|
740
|
+
contentId: bigint;
|
|
741
|
+
}
|
|
742
|
+
export interface ContentRefProtoMsg {
|
|
743
|
+
typeUrl: "/sparkdream.federation.v1.ContentRef";
|
|
744
|
+
value: Uint8Array;
|
|
745
|
+
}
|
|
746
|
+
/**
|
|
747
|
+
* ContentRef points at a FederatedContent record. A message rather than a
|
|
748
|
+
* bare uint64 because content ids start at 0: a nil ref is "none", which
|
|
749
|
+
* a zero id could not express.
|
|
750
|
+
* @name ContentRefAmino
|
|
751
|
+
* @package sparkdream.federation.v1
|
|
752
|
+
* @see proto type: sparkdream.federation.v1.ContentRef
|
|
753
|
+
*/
|
|
754
|
+
export interface ContentRefAmino {
|
|
755
|
+
content_id?: string;
|
|
756
|
+
}
|
|
757
|
+
export interface ContentRefAminoMsg {
|
|
758
|
+
type: "/sparkdream.federation.v1.ContentRef";
|
|
759
|
+
value: ContentRefAmino;
|
|
760
|
+
}
|
|
641
761
|
/**
|
|
642
762
|
* IdentityLink maps a local address to a remote identity on a federation peer.
|
|
643
763
|
* @name IdentityLink
|
|
@@ -1010,6 +1130,26 @@ export declare const FederatedContent: {
|
|
|
1010
1130
|
toProto(message: FederatedContent): Uint8Array;
|
|
1011
1131
|
toProtoMsg(message: FederatedContent): FederatedContentProtoMsg;
|
|
1012
1132
|
};
|
|
1133
|
+
/**
|
|
1134
|
+
* ContentRef points at a FederatedContent record. A message rather than a
|
|
1135
|
+
* bare uint64 because content ids start at 0: a nil ref is "none", which
|
|
1136
|
+
* a zero id could not express.
|
|
1137
|
+
* @name ContentRef
|
|
1138
|
+
* @package sparkdream.federation.v1
|
|
1139
|
+
* @see proto type: sparkdream.federation.v1.ContentRef
|
|
1140
|
+
*/
|
|
1141
|
+
export declare const ContentRef: {
|
|
1142
|
+
typeUrl: string;
|
|
1143
|
+
encode(message: ContentRef, writer?: BinaryWriter): BinaryWriter;
|
|
1144
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ContentRef;
|
|
1145
|
+
fromPartial(object: DeepPartial<ContentRef>): ContentRef;
|
|
1146
|
+
fromAmino(object: ContentRefAmino): ContentRef;
|
|
1147
|
+
toAmino(message: ContentRef): ContentRefAmino;
|
|
1148
|
+
fromAminoMsg(object: ContentRefAminoMsg): ContentRef;
|
|
1149
|
+
fromProtoMsg(message: ContentRefProtoMsg): ContentRef;
|
|
1150
|
+
toProto(message: ContentRef): Uint8Array;
|
|
1151
|
+
toProtoMsg(message: ContentRef): ContentRefProtoMsg;
|
|
1152
|
+
};
|
|
1013
1153
|
/**
|
|
1014
1154
|
* IdentityLink maps a local address to a remote identity on a federation peer.
|
|
1015
1155
|
* @name IdentityLink
|
|
@@ -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.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.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;
|
|
@@ -195,6 +195,30 @@ var FederatedContentStatus;
|
|
|
195
195
|
FederatedContentStatus[FederatedContentStatus["FEDERATED_CONTENT_STATUS_DISPUTED"] = 4] = "FEDERATED_CONTENT_STATUS_DISPUTED";
|
|
196
196
|
FederatedContentStatus[FederatedContentStatus["FEDERATED_CONTENT_STATUS_CHALLENGED"] = 5] = "FEDERATED_CONTENT_STATUS_CHALLENGED";
|
|
197
197
|
FederatedContentStatus[FederatedContentStatus["FEDERATED_CONTENT_STATUS_REJECTED"] = 6] = "FEDERATED_CONTENT_STATUS_REJECTED";
|
|
198
|
+
/**
|
|
199
|
+
* FEDERATED_CONTENT_STATUS_UNRESOLVED - UNRESOLVED is system-assigned: the arbiter resolution window expired
|
|
200
|
+
* without quorum, so no finding was ever made about the content. It is
|
|
201
|
+
* terminal, deliberately excluded from MsgModerateContent (OpsComm
|
|
202
|
+
* moderates HIDDEN/ACTIVE/VERIFIED/REJECTED, not system states), and
|
|
203
|
+
* was chosen over reverting to PENDING_VERIFICATION because a revived
|
|
204
|
+
* record would have no VerificationWindow queue entry and a verification
|
|
205
|
+
* deadline already in the past — unverifiable and unreapable until
|
|
206
|
+
* content_ttl. Local state only: FederatedContentStatus never crosses
|
|
207
|
+
* the IBC wire (see packet_wire_compat_test.go).
|
|
208
|
+
*/
|
|
209
|
+
FederatedContentStatus[FederatedContentStatus["FEDERATED_CONTENT_STATUS_UNRESOLVED"] = 7] = "FEDERATED_CONTENT_STATUS_UNRESOLVED";
|
|
210
|
+
/**
|
|
211
|
+
* FEDERATED_CONTENT_STATUS_SUPERSEDED - SUPERSEDED is system-assigned: the submitting operator anchored a newer
|
|
212
|
+
* version of the same content_uri (an edit) while this record was still
|
|
213
|
+
* PENDING_VERIFICATION. The anchored version no longer exists at the
|
|
214
|
+
* source, so no verifier can ever confirm it; retiring it here keeps it
|
|
215
|
+
* out of the verification-expiry sweep, which would otherwise count it
|
|
216
|
+
* against an honest operator as unverified. Terminal and excluded from
|
|
217
|
+
* MsgModerateContent for the same reason as UNRESOLVED: moderating it
|
|
218
|
+
* could manufacture a VERIFIED status for bytes nobody verified. Local
|
|
219
|
+
* state only; never crosses the IBC wire.
|
|
220
|
+
*/
|
|
221
|
+
FederatedContentStatus[FederatedContentStatus["FEDERATED_CONTENT_STATUS_SUPERSEDED"] = 8] = "FEDERATED_CONTENT_STATUS_SUPERSEDED";
|
|
198
222
|
FederatedContentStatus[FederatedContentStatus["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
|
|
199
223
|
})(FederatedContentStatus || (exports.FederatedContentStatus = FederatedContentStatus = {}));
|
|
200
224
|
exports.FederatedContentStatusAmino = FederatedContentStatus;
|
|
@@ -221,6 +245,12 @@ function federatedContentStatusFromJSON(object) {
|
|
|
221
245
|
case 6:
|
|
222
246
|
case "FEDERATED_CONTENT_STATUS_REJECTED":
|
|
223
247
|
return FederatedContentStatus.FEDERATED_CONTENT_STATUS_REJECTED;
|
|
248
|
+
case 7:
|
|
249
|
+
case "FEDERATED_CONTENT_STATUS_UNRESOLVED":
|
|
250
|
+
return FederatedContentStatus.FEDERATED_CONTENT_STATUS_UNRESOLVED;
|
|
251
|
+
case 8:
|
|
252
|
+
case "FEDERATED_CONTENT_STATUS_SUPERSEDED":
|
|
253
|
+
return FederatedContentStatus.FEDERATED_CONTENT_STATUS_SUPERSEDED;
|
|
224
254
|
case -1:
|
|
225
255
|
case "UNRECOGNIZED":
|
|
226
256
|
default:
|
|
@@ -243,6 +273,10 @@ function federatedContentStatusToJSON(object) {
|
|
|
243
273
|
return "FEDERATED_CONTENT_STATUS_CHALLENGED";
|
|
244
274
|
case FederatedContentStatus.FEDERATED_CONTENT_STATUS_REJECTED:
|
|
245
275
|
return "FEDERATED_CONTENT_STATUS_REJECTED";
|
|
276
|
+
case FederatedContentStatus.FEDERATED_CONTENT_STATUS_UNRESOLVED:
|
|
277
|
+
return "FEDERATED_CONTENT_STATUS_UNRESOLVED";
|
|
278
|
+
case FederatedContentStatus.FEDERATED_CONTENT_STATUS_SUPERSEDED:
|
|
279
|
+
return "FEDERATED_CONTENT_STATUS_SUPERSEDED";
|
|
246
280
|
case FederatedContentStatus.UNRECOGNIZED:
|
|
247
281
|
default:
|
|
248
282
|
return "UNRECOGNIZED";
|
|
@@ -647,9 +681,9 @@ function createBasePeerPolicy() {
|
|
|
647
681
|
outboundRateLimitPerEpoch: BigInt(0),
|
|
648
682
|
allowReputationQueries: false,
|
|
649
683
|
acceptReputationAttestations: false,
|
|
650
|
-
maxTrustCredit: 0,
|
|
651
684
|
requireReview: false,
|
|
652
|
-
blockedIdentities: []
|
|
685
|
+
blockedIdentities: [],
|
|
686
|
+
contentHosts: []
|
|
653
687
|
};
|
|
654
688
|
}
|
|
655
689
|
/**
|
|
@@ -677,7 +711,7 @@ exports.PeerPolicy = {
|
|
|
677
711
|
writer.uint32(40).uint64(message.inboundRateLimitPerEpoch);
|
|
678
712
|
}
|
|
679
713
|
if (message.outboundRateLimitPerEpoch !== BigInt(0)) {
|
|
680
|
-
writer.uint32(
|
|
714
|
+
writer.uint32(80).uint64(message.outboundRateLimitPerEpoch);
|
|
681
715
|
}
|
|
682
716
|
if (message.allowReputationQueries === true) {
|
|
683
717
|
writer.uint32(48).bool(message.allowReputationQueries);
|
|
@@ -685,14 +719,14 @@ exports.PeerPolicy = {
|
|
|
685
719
|
if (message.acceptReputationAttestations === true) {
|
|
686
720
|
writer.uint32(56).bool(message.acceptReputationAttestations);
|
|
687
721
|
}
|
|
688
|
-
if (message.maxTrustCredit !== 0) {
|
|
689
|
-
writer.uint32(64).uint32(message.maxTrustCredit);
|
|
690
|
-
}
|
|
691
722
|
if (message.requireReview === true) {
|
|
692
|
-
writer.uint32(
|
|
723
|
+
writer.uint32(64).bool(message.requireReview);
|
|
693
724
|
}
|
|
694
725
|
for (const v of message.blockedIdentities) {
|
|
695
|
-
writer.uint32(
|
|
726
|
+
writer.uint32(74).string(v);
|
|
727
|
+
}
|
|
728
|
+
for (const v of message.contentHosts) {
|
|
729
|
+
writer.uint32(90).string(v);
|
|
696
730
|
}
|
|
697
731
|
return writer;
|
|
698
732
|
},
|
|
@@ -718,7 +752,7 @@ exports.PeerPolicy = {
|
|
|
718
752
|
case 5:
|
|
719
753
|
message.inboundRateLimitPerEpoch = reader.uint64();
|
|
720
754
|
break;
|
|
721
|
-
case
|
|
755
|
+
case 10:
|
|
722
756
|
message.outboundRateLimitPerEpoch = reader.uint64();
|
|
723
757
|
break;
|
|
724
758
|
case 6:
|
|
@@ -728,14 +762,14 @@ exports.PeerPolicy = {
|
|
|
728
762
|
message.acceptReputationAttestations = reader.bool();
|
|
729
763
|
break;
|
|
730
764
|
case 8:
|
|
731
|
-
message.maxTrustCredit = reader.uint32();
|
|
732
|
-
break;
|
|
733
|
-
case 9:
|
|
734
765
|
message.requireReview = reader.bool();
|
|
735
766
|
break;
|
|
736
|
-
case
|
|
767
|
+
case 9:
|
|
737
768
|
message.blockedIdentities.push(reader.string());
|
|
738
769
|
break;
|
|
770
|
+
case 11:
|
|
771
|
+
message.contentHosts.push(reader.string());
|
|
772
|
+
break;
|
|
739
773
|
default:
|
|
740
774
|
reader.skipType(tag & 7);
|
|
741
775
|
break;
|
|
@@ -753,9 +787,9 @@ exports.PeerPolicy = {
|
|
|
753
787
|
message.outboundRateLimitPerEpoch = object.outboundRateLimitPerEpoch !== undefined && object.outboundRateLimitPerEpoch !== null ? BigInt(object.outboundRateLimitPerEpoch.toString()) : BigInt(0);
|
|
754
788
|
message.allowReputationQueries = object.allowReputationQueries ?? false;
|
|
755
789
|
message.acceptReputationAttestations = object.acceptReputationAttestations ?? false;
|
|
756
|
-
message.maxTrustCredit = object.maxTrustCredit ?? 0;
|
|
757
790
|
message.requireReview = object.requireReview ?? false;
|
|
758
791
|
message.blockedIdentities = object.blockedIdentities?.map(e => e) || [];
|
|
792
|
+
message.contentHosts = object.contentHosts?.map(e => e) || [];
|
|
759
793
|
return message;
|
|
760
794
|
},
|
|
761
795
|
fromAmino(object) {
|
|
@@ -780,13 +814,11 @@ exports.PeerPolicy = {
|
|
|
780
814
|
if (object.accept_reputation_attestations !== undefined && object.accept_reputation_attestations !== null) {
|
|
781
815
|
message.acceptReputationAttestations = object.accept_reputation_attestations;
|
|
782
816
|
}
|
|
783
|
-
if (object.max_trust_credit !== undefined && object.max_trust_credit !== null) {
|
|
784
|
-
message.maxTrustCredit = object.max_trust_credit;
|
|
785
|
-
}
|
|
786
817
|
if (object.require_review !== undefined && object.require_review !== null) {
|
|
787
818
|
message.requireReview = object.require_review;
|
|
788
819
|
}
|
|
789
820
|
message.blockedIdentities = object.blocked_identities?.map(e => e) || [];
|
|
821
|
+
message.contentHosts = object.content_hosts?.map(e => e) || [];
|
|
790
822
|
return message;
|
|
791
823
|
},
|
|
792
824
|
toAmino(message) {
|
|
@@ -809,7 +841,6 @@ exports.PeerPolicy = {
|
|
|
809
841
|
obj.outbound_rate_limit_per_epoch = message.outboundRateLimitPerEpoch !== BigInt(0) ? message.outboundRateLimitPerEpoch?.toString() : undefined;
|
|
810
842
|
obj.allow_reputation_queries = message.allowReputationQueries === false ? undefined : message.allowReputationQueries;
|
|
811
843
|
obj.accept_reputation_attestations = message.acceptReputationAttestations === false ? undefined : message.acceptReputationAttestations;
|
|
812
|
-
obj.max_trust_credit = message.maxTrustCredit === 0 ? undefined : message.maxTrustCredit;
|
|
813
844
|
obj.require_review = message.requireReview === false ? undefined : message.requireReview;
|
|
814
845
|
if (message.blockedIdentities) {
|
|
815
846
|
obj.blocked_identities = message.blockedIdentities.map(e => e);
|
|
@@ -817,6 +848,12 @@ exports.PeerPolicy = {
|
|
|
817
848
|
else {
|
|
818
849
|
obj.blocked_identities = message.blockedIdentities;
|
|
819
850
|
}
|
|
851
|
+
if (message.contentHosts) {
|
|
852
|
+
obj.content_hosts = message.contentHosts.map(e => e);
|
|
853
|
+
}
|
|
854
|
+
else {
|
|
855
|
+
obj.content_hosts = message.contentHosts;
|
|
856
|
+
}
|
|
820
857
|
return obj;
|
|
821
858
|
},
|
|
822
859
|
fromAminoMsg(object) {
|
|
@@ -1121,7 +1158,8 @@ function createBaseVerificationRecord() {
|
|
|
1121
1158
|
lastChallengeResolvedAt: BigInt(0),
|
|
1122
1159
|
challenger: "",
|
|
1123
1160
|
escrowedChallengeFee: "",
|
|
1124
|
-
pendingVerifierVerdict: 0
|
|
1161
|
+
pendingVerifierVerdict: 0,
|
|
1162
|
+
commitmentReleased: false
|
|
1125
1163
|
};
|
|
1126
1164
|
}
|
|
1127
1165
|
/**
|
|
@@ -1172,6 +1210,9 @@ exports.VerificationRecord = {
|
|
|
1172
1210
|
if (message.pendingVerifierVerdict !== 0) {
|
|
1173
1211
|
writer.uint32(104).int32(message.pendingVerifierVerdict);
|
|
1174
1212
|
}
|
|
1213
|
+
if (message.commitmentReleased === true) {
|
|
1214
|
+
writer.uint32(112).bool(message.commitmentReleased);
|
|
1215
|
+
}
|
|
1175
1216
|
return writer;
|
|
1176
1217
|
},
|
|
1177
1218
|
decode(input, length) {
|
|
@@ -1220,6 +1261,9 @@ exports.VerificationRecord = {
|
|
|
1220
1261
|
case 13:
|
|
1221
1262
|
message.pendingVerifierVerdict = reader.int32();
|
|
1222
1263
|
break;
|
|
1264
|
+
case 14:
|
|
1265
|
+
message.commitmentReleased = reader.bool();
|
|
1266
|
+
break;
|
|
1223
1267
|
default:
|
|
1224
1268
|
reader.skipType(tag & 7);
|
|
1225
1269
|
break;
|
|
@@ -1242,6 +1286,7 @@ exports.VerificationRecord = {
|
|
|
1242
1286
|
message.challenger = object.challenger ?? "";
|
|
1243
1287
|
message.escrowedChallengeFee = object.escrowedChallengeFee ?? "";
|
|
1244
1288
|
message.pendingVerifierVerdict = object.pendingVerifierVerdict ?? 0;
|
|
1289
|
+
message.commitmentReleased = object.commitmentReleased ?? false;
|
|
1245
1290
|
return message;
|
|
1246
1291
|
},
|
|
1247
1292
|
fromAmino(object) {
|
|
@@ -1285,6 +1330,9 @@ exports.VerificationRecord = {
|
|
|
1285
1330
|
if (object.pending_verifier_verdict !== undefined && object.pending_verifier_verdict !== null) {
|
|
1286
1331
|
message.pendingVerifierVerdict = object.pending_verifier_verdict;
|
|
1287
1332
|
}
|
|
1333
|
+
if (object.commitment_released !== undefined && object.commitment_released !== null) {
|
|
1334
|
+
message.commitmentReleased = object.commitment_released;
|
|
1335
|
+
}
|
|
1288
1336
|
return message;
|
|
1289
1337
|
},
|
|
1290
1338
|
toAmino(message) {
|
|
@@ -1302,6 +1350,7 @@ exports.VerificationRecord = {
|
|
|
1302
1350
|
obj.challenger = message.challenger === "" ? undefined : message.challenger;
|
|
1303
1351
|
obj.escrowed_challenge_fee = message.escrowedChallengeFee === "" ? undefined : message.escrowedChallengeFee;
|
|
1304
1352
|
obj.pending_verifier_verdict = message.pendingVerifierVerdict === 0 ? undefined : message.pendingVerifierVerdict;
|
|
1353
|
+
obj.commitment_released = message.commitmentReleased === false ? undefined : message.commitmentReleased;
|
|
1305
1354
|
return obj;
|
|
1306
1355
|
},
|
|
1307
1356
|
fromAminoMsg(object) {
|
|
@@ -1578,7 +1627,9 @@ function createBaseFederatedContent() {
|
|
|
1578
1627
|
submittedBy: "",
|
|
1579
1628
|
status: 0,
|
|
1580
1629
|
expiresAt: BigInt(0),
|
|
1581
|
-
contentHash: new Uint8Array()
|
|
1630
|
+
contentHash: new Uint8Array(),
|
|
1631
|
+
supersedes: undefined,
|
|
1632
|
+
supersededBy: BigInt(0)
|
|
1582
1633
|
};
|
|
1583
1634
|
}
|
|
1584
1635
|
/**
|
|
@@ -1638,6 +1689,12 @@ exports.FederatedContent = {
|
|
|
1638
1689
|
if (message.contentHash.length !== 0) {
|
|
1639
1690
|
writer.uint32(130).bytes(message.contentHash);
|
|
1640
1691
|
}
|
|
1692
|
+
if (message.supersedes !== undefined) {
|
|
1693
|
+
exports.ContentRef.encode(message.supersedes, writer.uint32(138).fork()).ldelim();
|
|
1694
|
+
}
|
|
1695
|
+
if (message.supersededBy !== BigInt(0)) {
|
|
1696
|
+
writer.uint32(144).uint64(message.supersededBy);
|
|
1697
|
+
}
|
|
1641
1698
|
return writer;
|
|
1642
1699
|
},
|
|
1643
1700
|
decode(input, length) {
|
|
@@ -1695,6 +1752,12 @@ exports.FederatedContent = {
|
|
|
1695
1752
|
case 16:
|
|
1696
1753
|
message.contentHash = reader.bytes();
|
|
1697
1754
|
break;
|
|
1755
|
+
case 17:
|
|
1756
|
+
message.supersedes = exports.ContentRef.decode(reader, reader.uint32());
|
|
1757
|
+
break;
|
|
1758
|
+
case 18:
|
|
1759
|
+
message.supersededBy = reader.uint64();
|
|
1760
|
+
break;
|
|
1698
1761
|
default:
|
|
1699
1762
|
reader.skipType(tag & 7);
|
|
1700
1763
|
break;
|
|
@@ -1720,6 +1783,8 @@ exports.FederatedContent = {
|
|
|
1720
1783
|
message.status = object.status ?? 0;
|
|
1721
1784
|
message.expiresAt = object.expiresAt !== undefined && object.expiresAt !== null ? BigInt(object.expiresAt.toString()) : BigInt(0);
|
|
1722
1785
|
message.contentHash = object.contentHash ?? new Uint8Array();
|
|
1786
|
+
message.supersedes = object.supersedes !== undefined && object.supersedes !== null ? exports.ContentRef.fromPartial(object.supersedes) : undefined;
|
|
1787
|
+
message.supersededBy = object.supersededBy !== undefined && object.supersededBy !== null ? BigInt(object.supersededBy.toString()) : BigInt(0);
|
|
1723
1788
|
return message;
|
|
1724
1789
|
},
|
|
1725
1790
|
fromAmino(object) {
|
|
@@ -1772,6 +1837,12 @@ exports.FederatedContent = {
|
|
|
1772
1837
|
if (object.content_hash !== undefined && object.content_hash !== null) {
|
|
1773
1838
|
message.contentHash = (0, helpers_1.bytesFromBase64)(object.content_hash);
|
|
1774
1839
|
}
|
|
1840
|
+
if (object.supersedes !== undefined && object.supersedes !== null) {
|
|
1841
|
+
message.supersedes = exports.ContentRef.fromAmino(object.supersedes);
|
|
1842
|
+
}
|
|
1843
|
+
if (object.superseded_by !== undefined && object.superseded_by !== null) {
|
|
1844
|
+
message.supersededBy = BigInt(object.superseded_by);
|
|
1845
|
+
}
|
|
1775
1846
|
return message;
|
|
1776
1847
|
},
|
|
1777
1848
|
toAmino(message) {
|
|
@@ -1792,6 +1863,8 @@ exports.FederatedContent = {
|
|
|
1792
1863
|
obj.status = message.status === 0 ? undefined : message.status;
|
|
1793
1864
|
obj.expires_at = message.expiresAt !== BigInt(0) ? message.expiresAt?.toString() : undefined;
|
|
1794
1865
|
obj.content_hash = message.contentHash ? (0, helpers_1.base64FromBytes)(message.contentHash) : undefined;
|
|
1866
|
+
obj.supersedes = message.supersedes ? exports.ContentRef.toAmino(message.supersedes) : undefined;
|
|
1867
|
+
obj.superseded_by = message.supersededBy !== BigInt(0) ? message.supersededBy?.toString() : undefined;
|
|
1795
1868
|
return obj;
|
|
1796
1869
|
},
|
|
1797
1870
|
fromAminoMsg(object) {
|
|
@@ -1810,6 +1883,77 @@ exports.FederatedContent = {
|
|
|
1810
1883
|
};
|
|
1811
1884
|
}
|
|
1812
1885
|
};
|
|
1886
|
+
function createBaseContentRef() {
|
|
1887
|
+
return {
|
|
1888
|
+
contentId: BigInt(0)
|
|
1889
|
+
};
|
|
1890
|
+
}
|
|
1891
|
+
/**
|
|
1892
|
+
* ContentRef points at a FederatedContent record. A message rather than a
|
|
1893
|
+
* bare uint64 because content ids start at 0: a nil ref is "none", which
|
|
1894
|
+
* a zero id could not express.
|
|
1895
|
+
* @name ContentRef
|
|
1896
|
+
* @package sparkdream.federation.v1
|
|
1897
|
+
* @see proto type: sparkdream.federation.v1.ContentRef
|
|
1898
|
+
*/
|
|
1899
|
+
exports.ContentRef = {
|
|
1900
|
+
typeUrl: "/sparkdream.federation.v1.ContentRef",
|
|
1901
|
+
encode(message, writer = binary_1.BinaryWriter.create()) {
|
|
1902
|
+
if (message.contentId !== BigInt(0)) {
|
|
1903
|
+
writer.uint32(8).uint64(message.contentId);
|
|
1904
|
+
}
|
|
1905
|
+
return writer;
|
|
1906
|
+
},
|
|
1907
|
+
decode(input, length) {
|
|
1908
|
+
const reader = input instanceof binary_1.BinaryReader ? input : new binary_1.BinaryReader(input);
|
|
1909
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
1910
|
+
const message = createBaseContentRef();
|
|
1911
|
+
while (reader.pos < end) {
|
|
1912
|
+
const tag = reader.uint32();
|
|
1913
|
+
switch (tag >>> 3) {
|
|
1914
|
+
case 1:
|
|
1915
|
+
message.contentId = reader.uint64();
|
|
1916
|
+
break;
|
|
1917
|
+
default:
|
|
1918
|
+
reader.skipType(tag & 7);
|
|
1919
|
+
break;
|
|
1920
|
+
}
|
|
1921
|
+
}
|
|
1922
|
+
return message;
|
|
1923
|
+
},
|
|
1924
|
+
fromPartial(object) {
|
|
1925
|
+
const message = createBaseContentRef();
|
|
1926
|
+
message.contentId = object.contentId !== undefined && object.contentId !== null ? BigInt(object.contentId.toString()) : BigInt(0);
|
|
1927
|
+
return message;
|
|
1928
|
+
},
|
|
1929
|
+
fromAmino(object) {
|
|
1930
|
+
const message = createBaseContentRef();
|
|
1931
|
+
if (object.content_id !== undefined && object.content_id !== null) {
|
|
1932
|
+
message.contentId = BigInt(object.content_id);
|
|
1933
|
+
}
|
|
1934
|
+
return message;
|
|
1935
|
+
},
|
|
1936
|
+
toAmino(message) {
|
|
1937
|
+
const obj = {};
|
|
1938
|
+
obj.content_id = message.contentId !== BigInt(0) ? message.contentId?.toString() : undefined;
|
|
1939
|
+
return obj;
|
|
1940
|
+
},
|
|
1941
|
+
fromAminoMsg(object) {
|
|
1942
|
+
return exports.ContentRef.fromAmino(object.value);
|
|
1943
|
+
},
|
|
1944
|
+
fromProtoMsg(message) {
|
|
1945
|
+
return exports.ContentRef.decode(message.value);
|
|
1946
|
+
},
|
|
1947
|
+
toProto(message) {
|
|
1948
|
+
return exports.ContentRef.encode(message).finish();
|
|
1949
|
+
},
|
|
1950
|
+
toProtoMsg(message) {
|
|
1951
|
+
return {
|
|
1952
|
+
typeUrl: "/sparkdream.federation.v1.ContentRef",
|
|
1953
|
+
value: exports.ContentRef.encode(message).finish()
|
|
1954
|
+
};
|
|
1955
|
+
}
|
|
1956
|
+
};
|
|
1813
1957
|
function createBaseIdentityLink() {
|
|
1814
1958
|
return {
|
|
1815
1959
|
localAddress: "",
|
|
@@ -276,7 +276,7 @@ export declare const createRPCQueryClient: ({ rpcEndpoint }: {
|
|
|
276
276
|
getBridgeBinding(request: import("./federation/v1/query").QueryGetBridgeBindingRequest): Promise<import("./federation/v1/query").QueryGetBridgeBindingResponse>;
|
|
277
277
|
listBridgeBindings(request?: import("./federation/v1/query").QueryListBridgeBindingsRequest): Promise<import("./federation/v1/query").QueryListBridgeBindingsResponse>;
|
|
278
278
|
getFederatedContent(request: import("./federation/v1/query").QueryGetFederatedContentRequest): Promise<import("./federation/v1/query").QueryGetFederatedContentResponse>;
|
|
279
|
-
listFederatedContent(request
|
|
279
|
+
listFederatedContent(request: import("./federation/v1/query").QueryListFederatedContentRequest): Promise<import("./federation/v1/query").QueryListFederatedContentResponse>;
|
|
280
280
|
getIdentityLink(request: import("./federation/v1/query").QueryGetIdentityLinkRequest): Promise<import("./federation/v1/query").QueryGetIdentityLinkResponse>;
|
|
281
281
|
listIdentityLinks(request?: import("./federation/v1/query").QueryListIdentityLinksRequest): Promise<import("./federation/v1/query").QueryListIdentityLinksResponse>;
|
|
282
282
|
resolveRemoteIdentity(request: import("./federation/v1/query").QueryResolveRemoteIdentityRequest): Promise<import("./federation/v1/query").QueryResolveRemoteIdentityResponse>;
|