@sparkdreamnft/sparkdreamjs 0.0.40 → 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/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 +159 -3
- 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/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 -0
- package/sparkdream/federation/v1/types.js +160 -4
- 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
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Params, ParamsAmino, FederationOperationalParams, FederationOperationalParamsAmino } from "./params";
|
|
2
|
-
import { PeerType, PeerPolicy, PeerPolicyAmino, FederatedContentStatus, JuryVerdict } from "./types";
|
|
2
|
+
import { PeerType, PeerPolicy, PeerPolicyAmino, ContentRef, ContentRefAmino, FederatedContentStatus, JuryVerdict } from "./types";
|
|
3
3
|
import { ChainIdentity, ChainIdentityAmino } from "../../identity/v1/chain_identity";
|
|
4
4
|
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
5
5
|
import { DeepPartial } from "../../../helpers";
|
|
@@ -487,6 +487,13 @@ export interface MsgSubmitFederatedContent {
|
|
|
487
487
|
protocolMetadata: Uint8Array;
|
|
488
488
|
remoteCreatedAt: bigint;
|
|
489
489
|
contentHash: Uint8Array;
|
|
490
|
+
/**
|
|
491
|
+
* supersedes marks this submission as a new version of an earlier record
|
|
492
|
+
* the same operator anchored for the same peer and content_uri (an edit
|
|
493
|
+
* at the source). A PENDING_VERIFICATION predecessor is retired to
|
|
494
|
+
* SUPERSEDED; one already past verification only gains the forward link.
|
|
495
|
+
*/
|
|
496
|
+
supersedes?: ContentRef;
|
|
490
497
|
}
|
|
491
498
|
export interface MsgSubmitFederatedContentProtoMsg {
|
|
492
499
|
typeUrl: "/sparkdream.federation.v1.MsgSubmitFederatedContent";
|
|
@@ -510,6 +517,13 @@ export interface MsgSubmitFederatedContentAmino {
|
|
|
510
517
|
protocol_metadata?: string;
|
|
511
518
|
remote_created_at?: string;
|
|
512
519
|
content_hash?: string;
|
|
520
|
+
/**
|
|
521
|
+
* supersedes marks this submission as a new version of an earlier record
|
|
522
|
+
* the same operator anchored for the same peer and content_uri (an edit
|
|
523
|
+
* at the source). A PENDING_VERIFICATION predecessor is retired to
|
|
524
|
+
* SUPERSEDED; one already past verification only gains the forward link.
|
|
525
|
+
*/
|
|
526
|
+
supersedes?: ContentRefAmino;
|
|
513
527
|
}
|
|
514
528
|
export interface MsgSubmitFederatedContentAminoMsg {
|
|
515
529
|
type: "sparkdream/x/federation/MsgSubmitFederatedContent";
|
|
@@ -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;
|
|
@@ -222,6 +246,16 @@ export interface PeerPolicy {
|
|
|
222
246
|
*/
|
|
223
247
|
requireReview: boolean;
|
|
224
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[];
|
|
225
259
|
}
|
|
226
260
|
export interface PeerPolicyProtoMsg {
|
|
227
261
|
typeUrl: "/sparkdream.federation.v1.PeerPolicy";
|
|
@@ -253,6 +287,16 @@ export interface PeerPolicyAmino {
|
|
|
253
287
|
*/
|
|
254
288
|
require_review?: boolean;
|
|
255
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[];
|
|
256
300
|
}
|
|
257
301
|
export interface PeerPolicyAminoMsg {
|
|
258
302
|
type: "/sparkdream.federation.v1.PeerPolicy";
|
|
@@ -415,6 +459,19 @@ export interface VerificationRecord {
|
|
|
415
459
|
* clears it back to UNSPECIFIED, deferring resolution to the jury path.
|
|
416
460
|
*/
|
|
417
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;
|
|
418
475
|
}
|
|
419
476
|
export interface VerificationRecordProtoMsg {
|
|
420
477
|
typeUrl: "/sparkdream.federation.v1.VerificationRecord";
|
|
@@ -455,6 +512,19 @@ export interface VerificationRecordAmino {
|
|
|
455
512
|
* clears it back to UNSPECIFIED, deferring resolution to the jury path.
|
|
456
513
|
*/
|
|
457
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;
|
|
458
528
|
}
|
|
459
529
|
export interface VerificationRecordAminoMsg {
|
|
460
530
|
type: "/sparkdream.federation.v1.VerificationRecord";
|
|
@@ -603,6 +673,17 @@ export interface FederatedContent {
|
|
|
603
673
|
status: FederatedContentStatus;
|
|
604
674
|
expiresAt: bigint;
|
|
605
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;
|
|
606
687
|
}
|
|
607
688
|
export interface FederatedContentProtoMsg {
|
|
608
689
|
typeUrl: "/sparkdream.federation.v1.FederatedContent";
|
|
@@ -631,11 +712,52 @@ export interface FederatedContentAmino {
|
|
|
631
712
|
status?: FederatedContentStatus;
|
|
632
713
|
expires_at?: string;
|
|
633
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;
|
|
634
726
|
}
|
|
635
727
|
export interface FederatedContentAminoMsg {
|
|
636
728
|
type: "/sparkdream.federation.v1.FederatedContent";
|
|
637
729
|
value: FederatedContentAmino;
|
|
638
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
|
+
}
|
|
639
761
|
/**
|
|
640
762
|
* IdentityLink maps a local address to a remote identity on a federation peer.
|
|
641
763
|
* @name IdentityLink
|
|
@@ -1008,6 +1130,26 @@ export declare const FederatedContent: {
|
|
|
1008
1130
|
toProto(message: FederatedContent): Uint8Array;
|
|
1009
1131
|
toProtoMsg(message: FederatedContent): FederatedContentProtoMsg;
|
|
1010
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
|
+
};
|
|
1011
1153
|
/**
|
|
1012
1154
|
* IdentityLink maps a local address to a remote identity on a federation peer.
|
|
1013
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";
|
|
@@ -648,7 +682,8 @@ function createBasePeerPolicy() {
|
|
|
648
682
|
allowReputationQueries: false,
|
|
649
683
|
acceptReputationAttestations: false,
|
|
650
684
|
requireReview: false,
|
|
651
|
-
blockedIdentities: []
|
|
685
|
+
blockedIdentities: [],
|
|
686
|
+
contentHosts: []
|
|
652
687
|
};
|
|
653
688
|
}
|
|
654
689
|
/**
|
|
@@ -690,6 +725,9 @@ exports.PeerPolicy = {
|
|
|
690
725
|
for (const v of message.blockedIdentities) {
|
|
691
726
|
writer.uint32(74).string(v);
|
|
692
727
|
}
|
|
728
|
+
for (const v of message.contentHosts) {
|
|
729
|
+
writer.uint32(90).string(v);
|
|
730
|
+
}
|
|
693
731
|
return writer;
|
|
694
732
|
},
|
|
695
733
|
decode(input, length) {
|
|
@@ -729,6 +767,9 @@ exports.PeerPolicy = {
|
|
|
729
767
|
case 9:
|
|
730
768
|
message.blockedIdentities.push(reader.string());
|
|
731
769
|
break;
|
|
770
|
+
case 11:
|
|
771
|
+
message.contentHosts.push(reader.string());
|
|
772
|
+
break;
|
|
732
773
|
default:
|
|
733
774
|
reader.skipType(tag & 7);
|
|
734
775
|
break;
|
|
@@ -748,6 +789,7 @@ exports.PeerPolicy = {
|
|
|
748
789
|
message.acceptReputationAttestations = object.acceptReputationAttestations ?? false;
|
|
749
790
|
message.requireReview = object.requireReview ?? false;
|
|
750
791
|
message.blockedIdentities = object.blockedIdentities?.map(e => e) || [];
|
|
792
|
+
message.contentHosts = object.contentHosts?.map(e => e) || [];
|
|
751
793
|
return message;
|
|
752
794
|
},
|
|
753
795
|
fromAmino(object) {
|
|
@@ -776,6 +818,7 @@ exports.PeerPolicy = {
|
|
|
776
818
|
message.requireReview = object.require_review;
|
|
777
819
|
}
|
|
778
820
|
message.blockedIdentities = object.blocked_identities?.map(e => e) || [];
|
|
821
|
+
message.contentHosts = object.content_hosts?.map(e => e) || [];
|
|
779
822
|
return message;
|
|
780
823
|
},
|
|
781
824
|
toAmino(message) {
|
|
@@ -805,6 +848,12 @@ exports.PeerPolicy = {
|
|
|
805
848
|
else {
|
|
806
849
|
obj.blocked_identities = message.blockedIdentities;
|
|
807
850
|
}
|
|
851
|
+
if (message.contentHosts) {
|
|
852
|
+
obj.content_hosts = message.contentHosts.map(e => e);
|
|
853
|
+
}
|
|
854
|
+
else {
|
|
855
|
+
obj.content_hosts = message.contentHosts;
|
|
856
|
+
}
|
|
808
857
|
return obj;
|
|
809
858
|
},
|
|
810
859
|
fromAminoMsg(object) {
|
|
@@ -1109,7 +1158,8 @@ function createBaseVerificationRecord() {
|
|
|
1109
1158
|
lastChallengeResolvedAt: BigInt(0),
|
|
1110
1159
|
challenger: "",
|
|
1111
1160
|
escrowedChallengeFee: "",
|
|
1112
|
-
pendingVerifierVerdict: 0
|
|
1161
|
+
pendingVerifierVerdict: 0,
|
|
1162
|
+
commitmentReleased: false
|
|
1113
1163
|
};
|
|
1114
1164
|
}
|
|
1115
1165
|
/**
|
|
@@ -1160,6 +1210,9 @@ exports.VerificationRecord = {
|
|
|
1160
1210
|
if (message.pendingVerifierVerdict !== 0) {
|
|
1161
1211
|
writer.uint32(104).int32(message.pendingVerifierVerdict);
|
|
1162
1212
|
}
|
|
1213
|
+
if (message.commitmentReleased === true) {
|
|
1214
|
+
writer.uint32(112).bool(message.commitmentReleased);
|
|
1215
|
+
}
|
|
1163
1216
|
return writer;
|
|
1164
1217
|
},
|
|
1165
1218
|
decode(input, length) {
|
|
@@ -1208,6 +1261,9 @@ exports.VerificationRecord = {
|
|
|
1208
1261
|
case 13:
|
|
1209
1262
|
message.pendingVerifierVerdict = reader.int32();
|
|
1210
1263
|
break;
|
|
1264
|
+
case 14:
|
|
1265
|
+
message.commitmentReleased = reader.bool();
|
|
1266
|
+
break;
|
|
1211
1267
|
default:
|
|
1212
1268
|
reader.skipType(tag & 7);
|
|
1213
1269
|
break;
|
|
@@ -1230,6 +1286,7 @@ exports.VerificationRecord = {
|
|
|
1230
1286
|
message.challenger = object.challenger ?? "";
|
|
1231
1287
|
message.escrowedChallengeFee = object.escrowedChallengeFee ?? "";
|
|
1232
1288
|
message.pendingVerifierVerdict = object.pendingVerifierVerdict ?? 0;
|
|
1289
|
+
message.commitmentReleased = object.commitmentReleased ?? false;
|
|
1233
1290
|
return message;
|
|
1234
1291
|
},
|
|
1235
1292
|
fromAmino(object) {
|
|
@@ -1273,6 +1330,9 @@ exports.VerificationRecord = {
|
|
|
1273
1330
|
if (object.pending_verifier_verdict !== undefined && object.pending_verifier_verdict !== null) {
|
|
1274
1331
|
message.pendingVerifierVerdict = object.pending_verifier_verdict;
|
|
1275
1332
|
}
|
|
1333
|
+
if (object.commitment_released !== undefined && object.commitment_released !== null) {
|
|
1334
|
+
message.commitmentReleased = object.commitment_released;
|
|
1335
|
+
}
|
|
1276
1336
|
return message;
|
|
1277
1337
|
},
|
|
1278
1338
|
toAmino(message) {
|
|
@@ -1290,6 +1350,7 @@ exports.VerificationRecord = {
|
|
|
1290
1350
|
obj.challenger = message.challenger === "" ? undefined : message.challenger;
|
|
1291
1351
|
obj.escrowed_challenge_fee = message.escrowedChallengeFee === "" ? undefined : message.escrowedChallengeFee;
|
|
1292
1352
|
obj.pending_verifier_verdict = message.pendingVerifierVerdict === 0 ? undefined : message.pendingVerifierVerdict;
|
|
1353
|
+
obj.commitment_released = message.commitmentReleased === false ? undefined : message.commitmentReleased;
|
|
1293
1354
|
return obj;
|
|
1294
1355
|
},
|
|
1295
1356
|
fromAminoMsg(object) {
|
|
@@ -1566,7 +1627,9 @@ function createBaseFederatedContent() {
|
|
|
1566
1627
|
submittedBy: "",
|
|
1567
1628
|
status: 0,
|
|
1568
1629
|
expiresAt: BigInt(0),
|
|
1569
|
-
contentHash: new Uint8Array()
|
|
1630
|
+
contentHash: new Uint8Array(),
|
|
1631
|
+
supersedes: undefined,
|
|
1632
|
+
supersededBy: BigInt(0)
|
|
1570
1633
|
};
|
|
1571
1634
|
}
|
|
1572
1635
|
/**
|
|
@@ -1626,6 +1689,12 @@ exports.FederatedContent = {
|
|
|
1626
1689
|
if (message.contentHash.length !== 0) {
|
|
1627
1690
|
writer.uint32(130).bytes(message.contentHash);
|
|
1628
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
|
+
}
|
|
1629
1698
|
return writer;
|
|
1630
1699
|
},
|
|
1631
1700
|
decode(input, length) {
|
|
@@ -1683,6 +1752,12 @@ exports.FederatedContent = {
|
|
|
1683
1752
|
case 16:
|
|
1684
1753
|
message.contentHash = reader.bytes();
|
|
1685
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;
|
|
1686
1761
|
default:
|
|
1687
1762
|
reader.skipType(tag & 7);
|
|
1688
1763
|
break;
|
|
@@ -1708,6 +1783,8 @@ exports.FederatedContent = {
|
|
|
1708
1783
|
message.status = object.status ?? 0;
|
|
1709
1784
|
message.expiresAt = object.expiresAt !== undefined && object.expiresAt !== null ? BigInt(object.expiresAt.toString()) : BigInt(0);
|
|
1710
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);
|
|
1711
1788
|
return message;
|
|
1712
1789
|
},
|
|
1713
1790
|
fromAmino(object) {
|
|
@@ -1760,6 +1837,12 @@ exports.FederatedContent = {
|
|
|
1760
1837
|
if (object.content_hash !== undefined && object.content_hash !== null) {
|
|
1761
1838
|
message.contentHash = (0, helpers_1.bytesFromBase64)(object.content_hash);
|
|
1762
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
|
+
}
|
|
1763
1846
|
return message;
|
|
1764
1847
|
},
|
|
1765
1848
|
toAmino(message) {
|
|
@@ -1780,6 +1863,8 @@ exports.FederatedContent = {
|
|
|
1780
1863
|
obj.status = message.status === 0 ? undefined : message.status;
|
|
1781
1864
|
obj.expires_at = message.expiresAt !== BigInt(0) ? message.expiresAt?.toString() : undefined;
|
|
1782
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;
|
|
1783
1868
|
return obj;
|
|
1784
1869
|
},
|
|
1785
1870
|
fromAminoMsg(object) {
|
|
@@ -1798,6 +1883,77 @@ exports.FederatedContent = {
|
|
|
1798
1883
|
};
|
|
1799
1884
|
}
|
|
1800
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
|
+
};
|
|
1801
1957
|
function createBaseIdentityLink() {
|
|
1802
1958
|
return {
|
|
1803
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>;
|