@sparkdreamnft/sparkdreamjs 0.0.40 → 0.0.42
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 +27 -3
- package/esm/sparkdream/federation/v1/types.js +172 -4
- 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 +31 -1
- package/sparkdream/federation/v1/tx.js +26 -2
- package/sparkdream/federation/v1/types.d.ts +154 -0
- package/sparkdream/federation/v1/types.js +173 -5
- 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 } from "./params";
|
|
2
|
-
import { Peer, PeerAmino, PeerPolicy, PeerPolicyAmino, BridgeBinding, BridgeBindingAmino, FederatedContent, FederatedContentAmino, IdentityLink, IdentityLinkAmino, ReputationAttestation, ReputationAttestationAmino, OutboundAttestation, OutboundAttestationAmino, VerificationRecord, VerificationRecordAmino } from "./types";
|
|
2
|
+
import { Peer, PeerAmino, PeerPolicy, PeerPolicyAmino, BridgeBinding, BridgeBindingAmino, FederatedContent, FederatedContentAmino, IdentityLink, IdentityLinkAmino, ReputationAttestation, ReputationAttestationAmino, OutboundAttestation, OutboundAttestationAmino, VerificationRecord, VerificationRecordAmino, EscalatedChallenge, EscalatedChallengeAmino, ArbiterHashSubmission, ArbiterHashSubmissionAmino } from "./types";
|
|
3
3
|
import { VerifierActivity, VerifierActivityAmino } from "./verifier_activity";
|
|
4
4
|
import { BinaryReader, BinaryWriter } from "../../../binary";
|
|
5
5
|
import { DeepPartial } from "../../../helpers";
|
|
@@ -33,6 +33,30 @@ export interface GenesisState {
|
|
|
33
33
|
* export. Mirrors x/rep's role_reward_day_funding_list.
|
|
34
34
|
*/
|
|
35
35
|
operatorRewardDayFundingList: OperatorRewardDayFunding[];
|
|
36
|
+
/**
|
|
37
|
+
* In-flight verification-lifecycle queues. These are NOT derivable from
|
|
38
|
+
* the records above: ArbiterResolutionQueue and ArbiterEscalationQueue
|
|
39
|
+
* hold deadlines that live nowhere else, and dropping them on an
|
|
40
|
+
* export/import upgrade strands every in-flight record — DISPUTED or
|
|
41
|
+
* CHALLENGED forever, with the verifier's committed bond unreleasable
|
|
42
|
+
* because the walk that would release it has no queue entry to walk.
|
|
43
|
+
* (VerificationWindow and ChallengeWindow are recomputable in principle,
|
|
44
|
+
* but exporting them keeps one rule for the whole lifecycle instead of
|
|
45
|
+
* two.)
|
|
46
|
+
*/
|
|
47
|
+
verificationWindowQueue: ContentDeadline[];
|
|
48
|
+
challengeWindowQueue: ContentDeadline[];
|
|
49
|
+
arbiterResolutionQueue: ContentDeadline[];
|
|
50
|
+
arbiterEscalationQueue: ContentDeadline[];
|
|
51
|
+
escalatedChallenges: EscalatedChallenge[];
|
|
52
|
+
escalatedChallengeDeadlineQueue: ContentDeadline[];
|
|
53
|
+
/**
|
|
54
|
+
* Partial arbiter quorum progress. Dropping these silently resets a
|
|
55
|
+
* dispute's vote tally to zero mid-window.
|
|
56
|
+
*/
|
|
57
|
+
arbiterSubmissions: ArbiterSubmissionEntry[];
|
|
58
|
+
arbiterHashCounts: ArbiterHashCount[];
|
|
59
|
+
nextArbiterAnonSubmissionId: bigint;
|
|
36
60
|
}
|
|
37
61
|
export interface GenesisStateProtoMsg {
|
|
38
62
|
typeUrl: "/sparkdream.federation.v1.GenesisState";
|
|
@@ -68,11 +92,145 @@ export interface GenesisStateAmino {
|
|
|
68
92
|
* export. Mirrors x/rep's role_reward_day_funding_list.
|
|
69
93
|
*/
|
|
70
94
|
operator_reward_day_funding_list?: OperatorRewardDayFundingAmino[];
|
|
95
|
+
/**
|
|
96
|
+
* In-flight verification-lifecycle queues. These are NOT derivable from
|
|
97
|
+
* the records above: ArbiterResolutionQueue and ArbiterEscalationQueue
|
|
98
|
+
* hold deadlines that live nowhere else, and dropping them on an
|
|
99
|
+
* export/import upgrade strands every in-flight record — DISPUTED or
|
|
100
|
+
* CHALLENGED forever, with the verifier's committed bond unreleasable
|
|
101
|
+
* because the walk that would release it has no queue entry to walk.
|
|
102
|
+
* (VerificationWindow and ChallengeWindow are recomputable in principle,
|
|
103
|
+
* but exporting them keeps one rule for the whole lifecycle instead of
|
|
104
|
+
* two.)
|
|
105
|
+
*/
|
|
106
|
+
verification_window_queue?: ContentDeadlineAmino[];
|
|
107
|
+
challenge_window_queue?: ContentDeadlineAmino[];
|
|
108
|
+
arbiter_resolution_queue?: ContentDeadlineAmino[];
|
|
109
|
+
arbiter_escalation_queue?: ContentDeadlineAmino[];
|
|
110
|
+
escalated_challenges?: EscalatedChallengeAmino[];
|
|
111
|
+
escalated_challenge_deadline_queue?: ContentDeadlineAmino[];
|
|
112
|
+
/**
|
|
113
|
+
* Partial arbiter quorum progress. Dropping these silently resets a
|
|
114
|
+
* dispute's vote tally to zero mid-window.
|
|
115
|
+
*/
|
|
116
|
+
arbiter_submissions?: ArbiterSubmissionEntryAmino[];
|
|
117
|
+
arbiter_hash_counts?: ArbiterHashCountAmino[];
|
|
118
|
+
next_arbiter_anon_submission_id?: string;
|
|
71
119
|
}
|
|
72
120
|
export interface GenesisStateAminoMsg {
|
|
73
121
|
type: "/sparkdream.federation.v1.GenesisState";
|
|
74
122
|
value: GenesisStateAmino;
|
|
75
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* ContentDeadline is one (deadline, content_id) entry of a federation
|
|
126
|
+
* EndBlocker time queue. All four verification-lifecycle queues share this
|
|
127
|
+
* shape, so they share this message.
|
|
128
|
+
* @name ContentDeadline
|
|
129
|
+
* @package sparkdream.federation.v1
|
|
130
|
+
* @see proto type: sparkdream.federation.v1.ContentDeadline
|
|
131
|
+
*/
|
|
132
|
+
export interface ContentDeadline {
|
|
133
|
+
deadline: bigint;
|
|
134
|
+
contentId: bigint;
|
|
135
|
+
}
|
|
136
|
+
export interface ContentDeadlineProtoMsg {
|
|
137
|
+
typeUrl: "/sparkdream.federation.v1.ContentDeadline";
|
|
138
|
+
value: Uint8Array;
|
|
139
|
+
}
|
|
140
|
+
/**
|
|
141
|
+
* ContentDeadline is one (deadline, content_id) entry of a federation
|
|
142
|
+
* EndBlocker time queue. All four verification-lifecycle queues share this
|
|
143
|
+
* shape, so they share this message.
|
|
144
|
+
* @name ContentDeadlineAmino
|
|
145
|
+
* @package sparkdream.federation.v1
|
|
146
|
+
* @see proto type: sparkdream.federation.v1.ContentDeadline
|
|
147
|
+
*/
|
|
148
|
+
export interface ContentDeadlineAmino {
|
|
149
|
+
deadline?: string;
|
|
150
|
+
content_id?: string;
|
|
151
|
+
}
|
|
152
|
+
export interface ContentDeadlineAminoMsg {
|
|
153
|
+
type: "/sparkdream.federation.v1.ContentDeadline";
|
|
154
|
+
value: ContentDeadlineAmino;
|
|
155
|
+
}
|
|
156
|
+
/**
|
|
157
|
+
* ArbiterSubmissionEntry is one ArbiterSubmissions map entry. The submitter
|
|
158
|
+
* key is part of the STATE key rather than of ArbiterHashSubmission —
|
|
159
|
+
* identified arbiters key by bech32 address, anonymous ones by "anon:<seq>"
|
|
160
|
+
* (where the Operator field holds the shield module address instead) — so it
|
|
161
|
+
* must be exported alongside the value or the "no double vote per operator"
|
|
162
|
+
* rule cannot be reconstructed.
|
|
163
|
+
* @name ArbiterSubmissionEntry
|
|
164
|
+
* @package sparkdream.federation.v1
|
|
165
|
+
* @see proto type: sparkdream.federation.v1.ArbiterSubmissionEntry
|
|
166
|
+
*/
|
|
167
|
+
export interface ArbiterSubmissionEntry {
|
|
168
|
+
submitterKey: string;
|
|
169
|
+
submission: ArbiterHashSubmission;
|
|
170
|
+
}
|
|
171
|
+
export interface ArbiterSubmissionEntryProtoMsg {
|
|
172
|
+
typeUrl: "/sparkdream.federation.v1.ArbiterSubmissionEntry";
|
|
173
|
+
value: Uint8Array;
|
|
174
|
+
}
|
|
175
|
+
/**
|
|
176
|
+
* ArbiterSubmissionEntry is one ArbiterSubmissions map entry. The submitter
|
|
177
|
+
* key is part of the STATE key rather than of ArbiterHashSubmission —
|
|
178
|
+
* identified arbiters key by bech32 address, anonymous ones by "anon:<seq>"
|
|
179
|
+
* (where the Operator field holds the shield module address instead) — so it
|
|
180
|
+
* must be exported alongside the value or the "no double vote per operator"
|
|
181
|
+
* rule cannot be reconstructed.
|
|
182
|
+
* @name ArbiterSubmissionEntryAmino
|
|
183
|
+
* @package sparkdream.federation.v1
|
|
184
|
+
* @see proto type: sparkdream.federation.v1.ArbiterSubmissionEntry
|
|
185
|
+
*/
|
|
186
|
+
export interface ArbiterSubmissionEntryAmino {
|
|
187
|
+
submitter_key?: string;
|
|
188
|
+
submission?: ArbiterHashSubmissionAmino;
|
|
189
|
+
}
|
|
190
|
+
export interface ArbiterSubmissionEntryAminoMsg {
|
|
191
|
+
type: "/sparkdream.federation.v1.ArbiterSubmissionEntry";
|
|
192
|
+
value: ArbiterSubmissionEntryAmino;
|
|
193
|
+
}
|
|
194
|
+
/**
|
|
195
|
+
* ArbiterHashCount is one (content_id, content_hash) -> votes tally from the
|
|
196
|
+
* arbiter quorum counter.
|
|
197
|
+
* @name ArbiterHashCount
|
|
198
|
+
* @package sparkdream.federation.v1
|
|
199
|
+
* @see proto type: sparkdream.federation.v1.ArbiterHashCount
|
|
200
|
+
*/
|
|
201
|
+
export interface ArbiterHashCount {
|
|
202
|
+
contentId: bigint;
|
|
203
|
+
/**
|
|
204
|
+
* content_hash is the lowercase hex encoding of the submitted hash, which
|
|
205
|
+
* is how ArbiterHashCounts keys it in state.
|
|
206
|
+
*/
|
|
207
|
+
contentHash: string;
|
|
208
|
+
count: number;
|
|
209
|
+
}
|
|
210
|
+
export interface ArbiterHashCountProtoMsg {
|
|
211
|
+
typeUrl: "/sparkdream.federation.v1.ArbiterHashCount";
|
|
212
|
+
value: Uint8Array;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* ArbiterHashCount is one (content_id, content_hash) -> votes tally from the
|
|
216
|
+
* arbiter quorum counter.
|
|
217
|
+
* @name ArbiterHashCountAmino
|
|
218
|
+
* @package sparkdream.federation.v1
|
|
219
|
+
* @see proto type: sparkdream.federation.v1.ArbiterHashCount
|
|
220
|
+
*/
|
|
221
|
+
export interface ArbiterHashCountAmino {
|
|
222
|
+
content_id?: string;
|
|
223
|
+
/**
|
|
224
|
+
* content_hash is the lowercase hex encoding of the submitted hash, which
|
|
225
|
+
* is how ArbiterHashCounts keys it in state.
|
|
226
|
+
*/
|
|
227
|
+
content_hash?: string;
|
|
228
|
+
count?: number;
|
|
229
|
+
}
|
|
230
|
+
export interface ArbiterHashCountAminoMsg {
|
|
231
|
+
type: "/sparkdream.federation.v1.ArbiterHashCount";
|
|
232
|
+
value: ArbiterHashCountAmino;
|
|
233
|
+
}
|
|
76
234
|
/**
|
|
77
235
|
* OperatorRewardDayFunding is one UTC day's community-pool draw for the
|
|
78
236
|
* bridge-operator reward pool, ledgered so the daily cap bounds a day rather
|
|
@@ -123,6 +281,68 @@ export declare const GenesisState: {
|
|
|
123
281
|
toProto(message: GenesisState): Uint8Array;
|
|
124
282
|
toProtoMsg(message: GenesisState): GenesisStateProtoMsg;
|
|
125
283
|
};
|
|
284
|
+
/**
|
|
285
|
+
* ContentDeadline is one (deadline, content_id) entry of a federation
|
|
286
|
+
* EndBlocker time queue. All four verification-lifecycle queues share this
|
|
287
|
+
* shape, so they share this message.
|
|
288
|
+
* @name ContentDeadline
|
|
289
|
+
* @package sparkdream.federation.v1
|
|
290
|
+
* @see proto type: sparkdream.federation.v1.ContentDeadline
|
|
291
|
+
*/
|
|
292
|
+
export declare const ContentDeadline: {
|
|
293
|
+
typeUrl: string;
|
|
294
|
+
encode(message: ContentDeadline, writer?: BinaryWriter): BinaryWriter;
|
|
295
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ContentDeadline;
|
|
296
|
+
fromPartial(object: DeepPartial<ContentDeadline>): ContentDeadline;
|
|
297
|
+
fromAmino(object: ContentDeadlineAmino): ContentDeadline;
|
|
298
|
+
toAmino(message: ContentDeadline): ContentDeadlineAmino;
|
|
299
|
+
fromAminoMsg(object: ContentDeadlineAminoMsg): ContentDeadline;
|
|
300
|
+
fromProtoMsg(message: ContentDeadlineProtoMsg): ContentDeadline;
|
|
301
|
+
toProto(message: ContentDeadline): Uint8Array;
|
|
302
|
+
toProtoMsg(message: ContentDeadline): ContentDeadlineProtoMsg;
|
|
303
|
+
};
|
|
304
|
+
/**
|
|
305
|
+
* ArbiterSubmissionEntry is one ArbiterSubmissions map entry. The submitter
|
|
306
|
+
* key is part of the STATE key rather than of ArbiterHashSubmission —
|
|
307
|
+
* identified arbiters key by bech32 address, anonymous ones by "anon:<seq>"
|
|
308
|
+
* (where the Operator field holds the shield module address instead) — so it
|
|
309
|
+
* must be exported alongside the value or the "no double vote per operator"
|
|
310
|
+
* rule cannot be reconstructed.
|
|
311
|
+
* @name ArbiterSubmissionEntry
|
|
312
|
+
* @package sparkdream.federation.v1
|
|
313
|
+
* @see proto type: sparkdream.federation.v1.ArbiterSubmissionEntry
|
|
314
|
+
*/
|
|
315
|
+
export declare const ArbiterSubmissionEntry: {
|
|
316
|
+
typeUrl: string;
|
|
317
|
+
encode(message: ArbiterSubmissionEntry, writer?: BinaryWriter): BinaryWriter;
|
|
318
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ArbiterSubmissionEntry;
|
|
319
|
+
fromPartial(object: DeepPartial<ArbiterSubmissionEntry>): ArbiterSubmissionEntry;
|
|
320
|
+
fromAmino(object: ArbiterSubmissionEntryAmino): ArbiterSubmissionEntry;
|
|
321
|
+
toAmino(message: ArbiterSubmissionEntry): ArbiterSubmissionEntryAmino;
|
|
322
|
+
fromAminoMsg(object: ArbiterSubmissionEntryAminoMsg): ArbiterSubmissionEntry;
|
|
323
|
+
fromProtoMsg(message: ArbiterSubmissionEntryProtoMsg): ArbiterSubmissionEntry;
|
|
324
|
+
toProto(message: ArbiterSubmissionEntry): Uint8Array;
|
|
325
|
+
toProtoMsg(message: ArbiterSubmissionEntry): ArbiterSubmissionEntryProtoMsg;
|
|
326
|
+
};
|
|
327
|
+
/**
|
|
328
|
+
* ArbiterHashCount is one (content_id, content_hash) -> votes tally from the
|
|
329
|
+
* arbiter quorum counter.
|
|
330
|
+
* @name ArbiterHashCount
|
|
331
|
+
* @package sparkdream.federation.v1
|
|
332
|
+
* @see proto type: sparkdream.federation.v1.ArbiterHashCount
|
|
333
|
+
*/
|
|
334
|
+
export declare const ArbiterHashCount: {
|
|
335
|
+
typeUrl: string;
|
|
336
|
+
encode(message: ArbiterHashCount, writer?: BinaryWriter): BinaryWriter;
|
|
337
|
+
decode(input: BinaryReader | Uint8Array, length?: number): ArbiterHashCount;
|
|
338
|
+
fromPartial(object: DeepPartial<ArbiterHashCount>): ArbiterHashCount;
|
|
339
|
+
fromAmino(object: ArbiterHashCountAmino): ArbiterHashCount;
|
|
340
|
+
toAmino(message: ArbiterHashCount): ArbiterHashCountAmino;
|
|
341
|
+
fromAminoMsg(object: ArbiterHashCountAminoMsg): ArbiterHashCount;
|
|
342
|
+
fromProtoMsg(message: ArbiterHashCountProtoMsg): ArbiterHashCount;
|
|
343
|
+
toProto(message: ArbiterHashCount): Uint8Array;
|
|
344
|
+
toProtoMsg(message: ArbiterHashCount): ArbiterHashCountProtoMsg;
|
|
345
|
+
};
|
|
126
346
|
/**
|
|
127
347
|
* OperatorRewardDayFunding is one UTC day's community-pool draw for the
|
|
128
348
|
* bridge-operator reward pool, ledgered so the daily cap bounds a day rather
|