@openzeppelin/guardian-client 0.16.2 → 0.17.0-rc.1
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/README.md +50 -2
- package/dist/conversion.d.ts +4 -2
- package/dist/conversion.d.ts.map +1 -1
- package/dist/conversion.js +37 -0
- package/dist/conversion.js.map +1 -1
- package/dist/error-codes.d.ts +1 -1
- package/dist/error-codes.d.ts.map +1 -1
- package/dist/error-codes.js +1 -0
- package/dist/error-codes.js.map +1 -1
- package/dist/http.d.ts +10 -1
- package/dist/http.d.ts.map +1 -1
- package/dist/http.js +34 -7
- package/dist/http.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/server-types.d.ts +36 -0
- package/dist/server-types.d.ts.map +1 -1
- package/dist/types.d.ts +82 -0
- package/dist/types.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/conversion.test.ts +34 -0
- package/src/conversion.ts +46 -0
- package/src/error-codes.ts +1 -0
- package/src/http.test.ts +272 -6
- package/src/http.ts +38 -6
- package/src/index.ts +10 -0
- package/src/server-types.ts +43 -0
- package/src/types.ts +98 -0
package/src/types.ts
CHANGED
|
@@ -105,6 +105,17 @@ export interface ProposalMetadata {
|
|
|
105
105
|
amount?: string;
|
|
106
106
|
/** P2ID note visibility, "public" or "private" (issue #322). Absent => public. */
|
|
107
107
|
noteType?: string;
|
|
108
|
+
/**
|
|
109
|
+
* Base64-serialized Miden `ChainAnchor` pinning the reference block the
|
|
110
|
+
* proposal's transaction summary was built at. Since protocol 0.16 the
|
|
111
|
+
* signed summary binds the reference block commitment, so cosigners and the
|
|
112
|
+
* executor need this anchor to reproduce the summary the proposer signed.
|
|
113
|
+
*/
|
|
114
|
+
chainAnchor?: string;
|
|
115
|
+
/** P2IDE reclaim block height (issue #366). Presence of either height means a P2IDE note. */
|
|
116
|
+
reclaimHeight?: number;
|
|
117
|
+
/** P2IDE timelock block height (issue #366). */
|
|
118
|
+
timelockHeight?: number;
|
|
108
119
|
}
|
|
109
120
|
|
|
110
121
|
export interface DeltaObject {
|
|
@@ -244,3 +255,90 @@ export interface LookupAccount {
|
|
|
244
255
|
export interface LookupResponse {
|
|
245
256
|
accounts: LookupAccount[];
|
|
246
257
|
}
|
|
258
|
+
|
|
259
|
+
/** Note classification decoded from the on-chain note script. */
|
|
260
|
+
export type HistoryNoteTag = 'p2id' | 'p2ide' | 'pswap' | 'mint' | 'burn' | 'custom';
|
|
261
|
+
|
|
262
|
+
/** On-chain note visibility from the note metadata. */
|
|
263
|
+
export type HistoryNoteVisibility = 'public' | 'private';
|
|
264
|
+
|
|
265
|
+
/** Which section of the persisted payload failed to decode. */
|
|
266
|
+
export type HistoryDecodeSection =
|
|
267
|
+
| 'tx_summary'
|
|
268
|
+
| 'metadata'
|
|
269
|
+
| 'input_notes'
|
|
270
|
+
| 'output_notes'
|
|
271
|
+
| 'vault'
|
|
272
|
+
| 'storage';
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* Delta lifecycle status of a history entry. Only `canonical` is
|
|
276
|
+
* emitted today; the set widens if the feed gains a status filter.
|
|
277
|
+
*/
|
|
278
|
+
export type HistoryEntryStatus = 'canonical';
|
|
279
|
+
|
|
280
|
+
/**
|
|
281
|
+
* One decoded asset inside a history note. `amount` is a base-10
|
|
282
|
+
* string for fungible assets, absent for non-fungible ones.
|
|
283
|
+
*/
|
|
284
|
+
export interface HistoryNoteAsset {
|
|
285
|
+
assetId: string;
|
|
286
|
+
kind: 'fungible' | 'non_fungible';
|
|
287
|
+
amount?: string;
|
|
288
|
+
}
|
|
289
|
+
|
|
290
|
+
/**
|
|
291
|
+
* One decoded note attached to a history entry. `sender` / `recipient`
|
|
292
|
+
* are account IDs when the note script exposes them.
|
|
293
|
+
*/
|
|
294
|
+
export interface HistoryNote {
|
|
295
|
+
noteId: string;
|
|
296
|
+
tag: HistoryNoteTag;
|
|
297
|
+
/** On-chain visibility from the note metadata. */
|
|
298
|
+
noteType: HistoryNoteVisibility;
|
|
299
|
+
assets: HistoryNoteAsset[];
|
|
300
|
+
sender?: string;
|
|
301
|
+
recipient?: string;
|
|
302
|
+
}
|
|
303
|
+
|
|
304
|
+
/**
|
|
305
|
+
* Why a history entry's note sections are empty: the persisted payload
|
|
306
|
+
* could not be decoded server-side (schema drift). The entry itself is
|
|
307
|
+
* still returned.
|
|
308
|
+
*/
|
|
309
|
+
export interface HistoryDecodeWarning {
|
|
310
|
+
section: HistoryDecodeSection;
|
|
311
|
+
reason: string;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
/** One canonical transaction in an account's history (issue #413). */
|
|
315
|
+
export interface HistoryEntry {
|
|
316
|
+
nonce: number;
|
|
317
|
+
/** Delta lifecycle status; always `canonical` today. */
|
|
318
|
+
status: HistoryEntryStatus;
|
|
319
|
+
/** RFC 3339 UTC timestamp at which the delta became canonical. */
|
|
320
|
+
timestamp: string;
|
|
321
|
+
/**
|
|
322
|
+
* Account commitment after this transaction; `undefined` when the
|
|
323
|
+
* stored row predates commitment recording.
|
|
324
|
+
*/
|
|
325
|
+
newCommitment?: string;
|
|
326
|
+
inputNotes: HistoryNote[];
|
|
327
|
+
outputNotes: HistoryNote[];
|
|
328
|
+
decodeWarnings: HistoryDecodeWarning[];
|
|
329
|
+
}
|
|
330
|
+
|
|
331
|
+
/** One page of canonical delta history, newest-first by nonce. */
|
|
332
|
+
export interface HistoryPage {
|
|
333
|
+
entries: HistoryEntry[];
|
|
334
|
+
/** Opaque resume token; `undefined` when the feed is exhausted. */
|
|
335
|
+
nextCursor?: string;
|
|
336
|
+
}
|
|
337
|
+
|
|
338
|
+
/** Options for `getDeltaHistory`. */
|
|
339
|
+
export interface HistoryOptions {
|
|
340
|
+
/** Page size in `[1, 500]`; server default 50 when omitted. */
|
|
341
|
+
limit?: number;
|
|
342
|
+
/** Opaque `nextCursor` from a previous page. */
|
|
343
|
+
cursor?: string;
|
|
344
|
+
}
|