@xyo-network/xl1-protocol 5.0.3 → 5.0.6
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/dist/neutral/modules/network-model/staticRest/layout/index.d.ts +1 -0
- package/dist/neutral/modules/network-model/staticRest/layout/index.d.ts.map +1 -1
- package/dist/neutral/modules/network-model/staticRest/layout/transactionInclusionIndex.d.ts +100 -0
- package/dist/neutral/modules/network-model/staticRest/layout/transactionInclusionIndex.d.ts.map +1 -0
- package/dist/neutral/modules/network-model/staticRest/paths/index.d.ts +1 -0
- package/dist/neutral/modules/network-model/staticRest/paths/index.d.ts.map +1 -1
- package/dist/neutral/modules/network-model/staticRest/paths/transactionInclusionIndex.d.ts +8 -0
- package/dist/neutral/modules/network-model/staticRest/paths/transactionInclusionIndex.d.ts.map +1 -0
- package/dist/neutral/modules/network-model/staticRest/templates.d.ts +2 -0
- package/dist/neutral/modules/network-model/staticRest/templates.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-lib/viewers/Block.d.ts +2 -0
- package/dist/neutral/modules/protocol-lib/viewers/Block.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-lib/viewers/IndexViewer.d.ts +5 -3
- package/dist/neutral/modules/protocol-lib/viewers/IndexViewer.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-lib/viewers/WindowedBlock.d.ts +1 -1
- package/dist/neutral/modules/protocol-lib/viewers/WindowedBlock.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/model/TransactionInclusion.d.ts +48 -0
- package/dist/neutral/modules/protocol-model/model/TransactionInclusion.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/model/index.d.ts +1 -0
- package/dist/neutral/modules/protocol-model/model/index.d.ts.map +1 -1
- package/dist/neutral/network-model.mjs +99 -2
- package/dist/neutral/network-model.mjs.map +4 -4
- package/dist/neutral/protocol-lib.mjs.map +2 -2
- package/dist/neutral/protocol-model.mjs +44 -18
- package/dist/neutral/protocol-model.mjs.map +4 -4
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,+BAA+B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/layout/index.ts"],"names":[],"mappings":"AAAA,cAAc,4BAA4B,CAAA;AAC1C,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,oBAAoB,CAAA;AAClC,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA"}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Versioned identifier for the finalized transaction-inclusion index layout. */
|
|
3
|
+
export declare const TRANSACTION_INCLUSION_INDEX_LAYOUT: "transaction-inclusions-v1";
|
|
4
|
+
/** Static descriptor for the transaction-inclusion index. */
|
|
5
|
+
export declare const TransactionInclusionManifestZod: z.ZodObject<{
|
|
6
|
+
chain: import("zod/mini").ZodMiniPipe<import("zod/mini").ZodMiniString<string>, import("zod/mini").ZodMiniTransform<import("@ariestools/sdk").BrandedHex, string>>;
|
|
7
|
+
layout: z.ZodLiteral<"transaction-inclusions-v1">;
|
|
8
|
+
path: z.ZodString;
|
|
9
|
+
}, z.core.$strip>;
|
|
10
|
+
/** Static descriptor for the transaction-inclusion index. */
|
|
11
|
+
export type TransactionInclusionManifest = z.infer<typeof TransactionInclusionManifestZod>;
|
|
12
|
+
/** Mutable pointer written after every transaction inclusion through `block` is durable. */
|
|
13
|
+
export declare const TransactionInclusionHeadZod: z.ZodObject<{
|
|
14
|
+
block: z.ZodPipe<z.ZodInt, z.ZodTransform<import('../../../protocol-model/index.js').XL1BlockNumber, number>>;
|
|
15
|
+
blockHash: import("zod/mini").ZodMiniPipe<import("zod/mini").ZodMiniString<string>, import("zod/mini").ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>;
|
|
16
|
+
chain: import("zod/mini").ZodMiniPipe<import("zod/mini").ZodMiniString<string>, import("zod/mini").ZodMiniTransform<import("@ariestools/sdk").BrandedHex, string>>;
|
|
17
|
+
entries: z.ZodInt;
|
|
18
|
+
layout: z.ZodLiteral<"transaction-inclusions-v1">;
|
|
19
|
+
}, z.core.$strip>;
|
|
20
|
+
/** Mutable transaction-inclusion progress pointer. */
|
|
21
|
+
export type TransactionInclusionHead = z.infer<typeof TransactionInclusionHeadZod>;
|
|
22
|
+
/** Type guard that checks whether a value is a valid transaction-inclusion manifest. */
|
|
23
|
+
export declare const isTransactionInclusionManifest: <T>(value: T) => value is T & {
|
|
24
|
+
chain: import("@ariestools/sdk").BrandedHex;
|
|
25
|
+
layout: "transaction-inclusions-v1";
|
|
26
|
+
path: string;
|
|
27
|
+
};
|
|
28
|
+
/** Converts a value to a transaction-inclusion manifest, throwing when invalid. */
|
|
29
|
+
export declare const asTransactionInclusionManifest: {
|
|
30
|
+
<T>(value: T): (T & {
|
|
31
|
+
chain: import("@ariestools/sdk").BrandedHex;
|
|
32
|
+
layout: "transaction-inclusions-v1";
|
|
33
|
+
path: string;
|
|
34
|
+
}) | undefined;
|
|
35
|
+
<T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
|
|
36
|
+
chain: import("@ariestools/sdk").BrandedHex;
|
|
37
|
+
layout: "transaction-inclusions-v1";
|
|
38
|
+
path: string;
|
|
39
|
+
};
|
|
40
|
+
};
|
|
41
|
+
/** Converts a value to a transaction-inclusion manifest, returning undefined when invalid. */
|
|
42
|
+
export declare const toTransactionInclusionManifest: {
|
|
43
|
+
(value: unknown): {
|
|
44
|
+
chain: import("@ariestools/sdk").BrandedHex;
|
|
45
|
+
layout: "transaction-inclusions-v1";
|
|
46
|
+
path: string;
|
|
47
|
+
} | undefined;
|
|
48
|
+
(value: unknown, assert: import("@ariestools/sdk").ZodFactoryConfig): {
|
|
49
|
+
chain: import("@ariestools/sdk").BrandedHex;
|
|
50
|
+
layout: "transaction-inclusions-v1";
|
|
51
|
+
path: string;
|
|
52
|
+
};
|
|
53
|
+
};
|
|
54
|
+
/** Type guard that checks whether a value is a valid transaction-inclusion head. */
|
|
55
|
+
export declare const isTransactionInclusionHead: <T>(value: T) => value is T & {
|
|
56
|
+
block: import('../../../protocol-model/index.js').XL1BlockNumber;
|
|
57
|
+
blockHash: import("@ariestools/sdk").BrandedHash;
|
|
58
|
+
chain: import("@ariestools/sdk").BrandedHex;
|
|
59
|
+
entries: number;
|
|
60
|
+
layout: "transaction-inclusions-v1";
|
|
61
|
+
};
|
|
62
|
+
/** Converts a value to a transaction-inclusion head, throwing when invalid. */
|
|
63
|
+
export declare const asTransactionInclusionHead: {
|
|
64
|
+
<T>(value: T): (T & {
|
|
65
|
+
block: import('../../../protocol-model/index.js').XL1BlockNumber;
|
|
66
|
+
blockHash: import("@ariestools/sdk").BrandedHash;
|
|
67
|
+
chain: import("@ariestools/sdk").BrandedHex;
|
|
68
|
+
entries: number;
|
|
69
|
+
layout: "transaction-inclusions-v1";
|
|
70
|
+
}) | undefined;
|
|
71
|
+
<T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
|
|
72
|
+
block: import('../../../protocol-model/index.js').XL1BlockNumber;
|
|
73
|
+
blockHash: import("@ariestools/sdk").BrandedHash;
|
|
74
|
+
chain: import("@ariestools/sdk").BrandedHex;
|
|
75
|
+
entries: number;
|
|
76
|
+
layout: "transaction-inclusions-v1";
|
|
77
|
+
};
|
|
78
|
+
};
|
|
79
|
+
/** Converts a value to a transaction-inclusion head, returning undefined when invalid. */
|
|
80
|
+
export declare const toTransactionInclusionHead: {
|
|
81
|
+
(value: unknown): {
|
|
82
|
+
block: import('../../../protocol-model/index.js').XL1BlockNumber;
|
|
83
|
+
blockHash: import("@ariestools/sdk").BrandedHash;
|
|
84
|
+
chain: import("@ariestools/sdk").BrandedHex;
|
|
85
|
+
entries: number;
|
|
86
|
+
layout: "transaction-inclusions-v1";
|
|
87
|
+
} | undefined;
|
|
88
|
+
(value: unknown, assert: import("@ariestools/sdk").ZodFactoryConfig): {
|
|
89
|
+
block: import('../../../protocol-model/index.js').XL1BlockNumber;
|
|
90
|
+
blockHash: import("@ariestools/sdk").BrandedHash;
|
|
91
|
+
chain: import("@ariestools/sdk").BrandedHex;
|
|
92
|
+
entries: number;
|
|
93
|
+
layout: "transaction-inclusions-v1";
|
|
94
|
+
};
|
|
95
|
+
};
|
|
96
|
+
/** Builds the static descriptor for a chain's transaction-inclusion index. */
|
|
97
|
+
export declare function createTransactionInclusionManifest(chain: TransactionInclusionManifest['chain']): TransactionInclusionManifest;
|
|
98
|
+
/** Builds the mutable progress pointer for a transaction-inclusion index. */
|
|
99
|
+
export declare function createTransactionInclusionHead(head: Omit<TransactionInclusionHead, 'layout'>): TransactionInclusionHead;
|
|
100
|
+
//# sourceMappingURL=transactionInclusionIndex.d.ts.map
|
package/dist/neutral/modules/network-model/staticRest/layout/transactionInclusionIndex.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactionInclusionIndex.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/layout/transactionInclusionIndex.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAMvB,iFAAiF;AACjF,eAAO,MAAM,kCAAkC,EAAG,2BAAoC,CAAA;AAEtF,6DAA6D;AAC7D,eAAO,MAAM,+BAA+B;;;;iBAO1C,CAAA;AAEF,6DAA6D;AAC7D,MAAM,MAAM,4BAA4B,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,+BAA+B,CAAC,CAAA;AAE1F,4FAA4F;AAC5F,eAAO,MAAM,2BAA2B;;;;;;iBAWtC,CAAA;AAEF,sDAAsD;AACtD,MAAM,MAAM,wBAAwB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,2BAA2B,CAAC,CAAA;AAElF,wFAAwF;AACxF,eAAO,MAAM,8BAA8B;;;;CAAgD,CAAA;AAC3F,mFAAmF;AACnF,eAAO,MAAM,8BAA8B;;;;;;;;;;;CAG1C,CAAA;AACD,8FAA8F;AAC9F,eAAO,MAAM,8BAA8B;;;;;;;;;;;CAG1C,CAAA;AAED,oFAAoF;AACpF,eAAO,MAAM,0BAA0B;;;;;;CAA4C,CAAA;AACnF,+EAA+E;AAC/E,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;CAGtC,CAAA;AACD,0FAA0F;AAC1F,eAAO,MAAM,0BAA0B;;;;;;;;;;;;;;;CAGtC,CAAA;AAED,8EAA8E;AAC9E,wBAAgB,kCAAkC,CAChD,KAAK,EAAE,4BAA4B,CAAC,OAAO,CAAC,GAC3C,4BAA4B,CAM9B;AAED,6EAA6E;AAC7E,wBAAgB,8BAA8B,CAC5C,IAAI,EAAE,IAAI,CAAC,wBAAwB,EAAE,QAAQ,CAAC,GAC7C,wBAAwB,CAK1B"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/paths/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,+BAA+B,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/paths/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAA;AAC/B,cAAc,oBAAoB,CAAA;AAClC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,+BAA+B,CAAA;AAC7C,cAAc,gCAAgC,CAAA"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Hash } from '@ariestools/sdk';
|
|
2
|
+
/** Path of one immutable transaction-hash to finalized-block inclusion record. */
|
|
3
|
+
export declare function transactionInclusionPath(transactionHash: Hash): string;
|
|
4
|
+
/** Path of the mutable transaction-inclusion progress pointer. */
|
|
5
|
+
export declare function transactionInclusionHeadPath(): string;
|
|
6
|
+
/** Path of the transaction-inclusion layout descriptor. */
|
|
7
|
+
export declare function transactionInclusionManifestPath(): string;
|
|
8
|
+
//# sourceMappingURL=transactionInclusionIndex.d.ts.map
|
package/dist/neutral/modules/network-model/staticRest/paths/transactionInclusionIndex.d.ts.map
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"transactionInclusionIndex.d.ts","sourceRoot":"","sources":["../../../../../../src/modules/network-model/staticRest/paths/transactionInclusionIndex.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,MAAM,iBAAiB,CAAA;AAI3C,kFAAkF;AAClF,wBAAgB,wBAAwB,CAAC,eAAe,EAAE,IAAI,GAAG,MAAM,CAEtE;AAED,kEAAkE;AAClE,wBAAgB,4BAA4B,IAAI,MAAM,CAErD;AAED,2DAA2D;AAC3D,wBAAgB,gCAAgC,IAAI,MAAM,CAEzD"}
|
|
@@ -24,4 +24,6 @@ export declare function chainManifestPathTemplates(): {
|
|
|
24
24
|
};
|
|
25
25
|
/** Self-describing template for one index summary family, e.g. `blocks/{level}/{index}.json`. */
|
|
26
26
|
export declare function indexSummaryPathTemplate(family: IndexSummaryFamily): string;
|
|
27
|
+
/** Self-describing template for the hash-addressed transaction-inclusion lookup. */
|
|
28
|
+
export declare function transactionInclusionPathTemplate(): string;
|
|
27
29
|
//# sourceMappingURL=templates.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../../../src/modules/network-model/staticRest/templates.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"templates.d.ts","sourceRoot":"","sources":["../../../../../src/modules/network-model/staticRest/templates.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAA;AAiBvD;;;GAGG;AACH,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE;IAAE,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,MAAM,CAAA;CAAE,EAAE,GAAG,MAAM,CAS/F;AAED,6FAA6F;AAC7F,wBAAgB,uBAAuB,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,GAAG,MAAM,CAAC,GAAG,MAAM,CAMzG;AAED,sDAAsD;AACtD,eAAO,MAAM,uBAAuB,QAAO,MACwE,CAAA;AAEnH,oDAAoD;AACpD,eAAO,MAAM,qBAAqB,QAAO,MAC6D,CAAA;AAEtG,kDAAkD;AAClD,eAAO,MAAM,mBAAmB,QAAO,MAC6D,CAAA;AAEpG,iGAAiG;AACjG,wBAAgB,0BAA0B,IAAI;IAC5C,WAAW,EAAE,MAAM,CAAA;IACnB,aAAa,EAAE,MAAM,CAAA;IACrB,IAAI,EAAE,MAAM,CAAA;IACZ,OAAO,EAAE,MAAM,CAAA;CAChB,CAOA;AAED,iGAAiG;AACjG,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,kBAAkB,GAAG,MAAM,CAM3E;AAED,oFAAoF;AACpF,wBAAgB,gCAAgC,IAAI,MAAM,CAIzD"}
|
|
@@ -13,6 +13,8 @@ export interface BlockViewerEventData extends EventData {
|
|
|
13
13
|
}
|
|
14
14
|
/** Batch block and payload queries shared by block-viewer implementations. */
|
|
15
15
|
export interface BlockViewerMethods {
|
|
16
|
+
/** Returns the finalized block containing a transaction hash, or null when it is not indexed. */
|
|
17
|
+
blockByTransactionHash(transactionHash: Hash): Promisable<SignedHydratedBlockWithHashMeta | null>;
|
|
16
18
|
/**
|
|
17
19
|
* Up to `limit` blocks ending at the block with `hash`, walking **descending**
|
|
18
20
|
* via each block's `previous` link (newest first) — `hash` is the window's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Block.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/viewers/Block.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,SAAS,EAAE,YAAY,EAAE,IAAI,EAAE,UAAU,EAC1C,MAAM,iBAAiB,CAAA;AACxB,OAAO,KAAK,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAA;AAE7D,OAAO,KAAK,EACV,SAAS,EAAE,OAAO,EAClB,QAAQ,EAAE,eAAe,EAAE,+BAA+B,EAAE,gBAAgB,EAAE,aAAa,EAAE,cAAc,EAAE,aAAa,EAC3H,MAAM,iBAAiB,CAAA;AAExB,uDAAuD;AACvD,MAAM,WAAW,2BAA2B;IAC1C,0CAA0C;IAC1C,KAAK,EAAE,+BAA+B,CAAA;CACvC;AAED,2CAA2C;AAC3C,MAAM,WAAW,oBAAqB,SAAQ,SAAS;IACrD,0DAA0D;IAC1D,WAAW,EAAE,2BAA2B,CAAA;CACzC;AAED,8EAA8E;AAC9E,MAAM,WAAW,kBAAkB;IACjC;;;;OAIG;IACH,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,+BAA+B,EAAE,CAAC,CAAA;IACvF;;;;;;;;;;OAUG;IACH,cAAc,CAAC,KAAK,EAAE,cAAc,EAAE,KAAK,CAAC,EAAE,MAAM,GAAG,UAAU,CAAC,+BAA+B,EAAE,CAAC,CAAA;IACpG,0EAA0E;IAC1E,YAAY,CAAC,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,+BAA+B,EAAE,CAAC,CAAA;IACjG,0DAA0D;IAC1D,YAAY,IAAI,UAAU,CAAC,+BAA+B,CAAC,CAAA;IAC3D,kGAAkG;IACl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AAA;IACnD,kDAAkD;IAClD,gBAAgB,IAAI,UAAU,CAAC,IAAI,CAAC,CAAA;IACpC,oDAAoD;IACpD,kBAAkB,IAAI,UAAU,CAAC,cAAc,CAAC,CAAA;IAChD,8EAA8E;IAC9E,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAAC,YAAY,CAAC,OAAO,CAAC,GAAG,IAAI,CAAC,CAAA;IACnE,2DAA2D;IAC3D,IAAI,CAAC,KAAK,EAAE,aAAa,EAAE,QAAQ,CAAC,EAAE,MAAM,aAAa,GAAG,UAAU,CAAC,SAAS,CAAC,CAAA;IACjF,8EAA8E;IAC9E,YAAY,CAAC,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,EAAE,QAAQ,CAAC,EAAE,MAAM,aAAa,GAAG,UAAU,CAAC,SAAS,CAAC,CAAA;IAC7H,sEAAsE;IACtE,gBAAgB,CACd,UAAU,EAAE,gBAAgB,EAC5B,gBAAgB,CAAC,EAAE,cAAc,EACjC,QAAQ,CAAC,EAAE,MAAM,aAAa,EAC9B,WAAW,CAAC,EAAE,MAAM,EACpB,WAAW,CAAC,EAAE,MAAM,GACnB,UAAU,CAAC,SAAS,CAAC,CAAA;CACzB"}
|
|
@@ -1,16 +1,18 @@
|
|
|
1
|
-
import type { Promisable } from '@ariestools/sdk';
|
|
2
|
-
import type { Provider, ProviderMoniker } from '../../protocol-model/index.js';
|
|
1
|
+
import type { Hash, Promisable } from '@ariestools/sdk';
|
|
2
|
+
import type { Provider, ProviderMoniker, TransactionInclusion } from '../../protocol-model/index.js';
|
|
3
3
|
import type { IndexSummaryFamily } from '../runners/IndexPublish.js';
|
|
4
4
|
/** Operations exposed by the Index Viewer contract. */
|
|
5
5
|
export interface IndexViewerMethods {
|
|
6
6
|
/** The published summary for a completed step in the given family, or null when not (yet) published. */
|
|
7
7
|
stepSummary<T = unknown>(family: IndexSummaryFamily, stepLevel: number, stepIndex: number): Promisable<T | null>;
|
|
8
|
+
/** The finalized block position of a transaction, or null when it is not indexed. */
|
|
9
|
+
transactionInclusionByHash(transactionHash: Hash): Promisable<TransactionInclusion | null>;
|
|
8
10
|
}
|
|
9
11
|
/** Moniker identifier for the IndexViewer provider. */
|
|
10
12
|
export declare const IndexViewerMoniker: "IndexViewer";
|
|
11
13
|
/** Type literal for the IndexViewer provider moniker. */
|
|
12
14
|
export type IndexViewerMoniker = typeof IndexViewerMoniker;
|
|
13
|
-
/** Viewer interface for reading
|
|
15
|
+
/** Viewer interface for reading derived chain indexes. */
|
|
14
16
|
export interface IndexViewer<TMoniker extends ProviderMoniker = IndexViewerMoniker> extends IndexViewerMethods, Provider<TMoniker> {
|
|
15
17
|
}
|
|
16
18
|
//# sourceMappingURL=IndexViewer.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IndexViewer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/viewers/IndexViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;
|
|
1
|
+
{"version":3,"file":"IndexViewer.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/viewers/IndexViewer.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEvD,OAAO,KAAK,EACV,QAAQ,EAAE,eAAe,EAAE,oBAAoB,EAChD,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,4BAA4B,CAAA;AAEpE,uDAAuD;AACvD,MAAM,WAAW,kBAAkB;IACjC,wGAAwG;IACxG,WAAW,CAAC,CAAC,GAAG,OAAO,EAAE,MAAM,EAAE,kBAAkB,EAAE,SAAS,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,UAAU,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA;IAChH,qFAAqF;IACrF,0BAA0B,CAAC,eAAe,EAAE,IAAI,GAAG,UAAU,CAAC,oBAAoB,GAAG,IAAI,CAAC,CAAA;CAC3F;AAED,uDAAuD;AACvD,eAAO,MAAM,kBAAkB,EAAG,aAAsB,CAAA;AACxD,yDAAyD;AACzD,MAAM,MAAM,kBAAkB,GAAG,OAAO,kBAAkB,CAAA;AAE1D,0DAA0D;AAC1D,MAAM,WAAW,WAAW,CAAC,QAAQ,SAAS,eAAe,GAAG,kBAAkB,CAChF,SAAQ,kBAAkB,EAAE,QAAQ,CAAC,QAAQ,CAAC;CAAG"}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type { Hash, Promisable } from '@ariestools/sdk';
|
|
2
2
|
import type { HydratedBlockWithHashMeta, Provider, ProviderMoniker } from '../../protocol-model/index.js';
|
|
3
3
|
import type { BlockViewerMethods } from './Block.js';
|
|
4
|
-
type ExtendableBlockViewerMethods = Omit<BlockViewerMethods, 'rate' | 'stepSizeRate' | 'timeDurationRate'>;
|
|
4
|
+
type ExtendableBlockViewerMethods = Omit<BlockViewerMethods, 'blockByTransactionHash' | 'rate' | 'stepSizeRate' | 'timeDurationRate'>;
|
|
5
5
|
/** Operations exposed by the Windowed Block Viewer contract. */
|
|
6
6
|
export interface WindowedBlockViewerMethods extends ExtendableBlockViewerMethods {
|
|
7
7
|
/** Returns the result of the blocks by transaction hashes query. */
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WindowedBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/viewers/WindowedBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEvD,OAAO,KAAK,EACV,yBAAyB,EAAE,QAAQ,EAAE,eAAe,EACrD,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,KAAK,4BAA4B,GAAG,IAAI,CAAC,kBAAkB,EAAE,MAAM,GAAG,cAAc,GAAG,kBAAkB,CAAC,CAAA;
|
|
1
|
+
{"version":3,"file":"WindowedBlock.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-lib/viewers/WindowedBlock.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAA;AAEvD,OAAO,KAAK,EACV,yBAAyB,EAAE,QAAQ,EAAE,eAAe,EACrD,MAAM,iBAAiB,CAAA;AAExB,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEpD,KAAK,4BAA4B,GAAG,IAAI,CAAC,kBAAkB,EAAE,wBAAwB,GAAG,MAAM,GAAG,cAAc,GAAG,kBAAkB,CAAC,CAAA;AAErI,gEAAgE;AAChE,MAAM,WAAW,0BAA2B,SAAQ,4BAA4B;IAC9E,oEAAoE;IACpE,yBAAyB,CAAC,MAAM,EAAE,IAAI,EAAE,GAAG,UAAU,CAAC,yBAAyB,EAAE,CAAC,CAAA;CACnF;AAED,+DAA+D;AAC/D,eAAO,MAAM,0BAA0B,EAAG,qBAA8B,CAAA;AACxE,iEAAiE;AACjE,MAAM,MAAM,0BAA0B,GAAG,OAAO,0BAA0B,CAAA;AAE1E,uDAAuD;AACvD,MAAM,WAAW,mBAAmB,CAAC,QAAQ,SAAS,eAAe,GAAG,0BAA0B,CAAE,SAAQ,0BAA0B,EAAE,QAAQ,CAAC,QAAQ,CAAC;IACxJ,iEAAiE;IACjE,sBAAsB,CAAC,IAAI,EAAE,IAAI,GAAG,UAAU,CAAC,yBAAyB,GAAG,IAAI,CAAC,CAAA;CACjF"}
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { z } from 'zod';
|
|
2
|
+
/** Zod schema for the canonical position of a transaction in the finalized XL1 chain. */
|
|
3
|
+
export declare const TransactionInclusionZod: z.ZodObject<{
|
|
4
|
+
blockHash: import("zod/mini").ZodMiniPipe<import("zod/mini").ZodMiniString<string>, import("zod/mini").ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>;
|
|
5
|
+
blockNumber: z.ZodPipe<z.ZodInt, z.ZodTransform<import('../BlockNumber/xl1BlockNumber.js').XL1BlockNumber, number>>;
|
|
6
|
+
transactionHash: import("zod/mini").ZodMiniPipe<import("zod/mini").ZodMiniString<string>, import("zod/mini").ZodMiniTransform<import("@ariestools/sdk").BrandedHash, string>>;
|
|
7
|
+
transactionIndex: z.ZodInt;
|
|
8
|
+
}, z.core.$strip>;
|
|
9
|
+
/** Canonical position of a transaction in the finalized XL1 chain. */
|
|
10
|
+
export type TransactionInclusion = z.infer<typeof TransactionInclusionZod>;
|
|
11
|
+
/** Type guard that checks whether a value is a valid transaction inclusion. */
|
|
12
|
+
export declare const isTransactionInclusion: <T>(value: T) => value is T & {
|
|
13
|
+
blockHash: import("@ariestools/sdk").BrandedHash;
|
|
14
|
+
blockNumber: import('../BlockNumber/xl1BlockNumber.js').XL1BlockNumber;
|
|
15
|
+
transactionHash: import("@ariestools/sdk").BrandedHash;
|
|
16
|
+
transactionIndex: number;
|
|
17
|
+
};
|
|
18
|
+
/** Converts a value to a transaction inclusion, throwing when invalid. */
|
|
19
|
+
export declare const asTransactionInclusion: {
|
|
20
|
+
<T>(value: T): (T & {
|
|
21
|
+
blockHash: import("@ariestools/sdk").BrandedHash;
|
|
22
|
+
blockNumber: import('../BlockNumber/xl1BlockNumber.js').XL1BlockNumber;
|
|
23
|
+
transactionHash: import("@ariestools/sdk").BrandedHash;
|
|
24
|
+
transactionIndex: number;
|
|
25
|
+
}) | undefined;
|
|
26
|
+
<T>(value: T, assert: import("@ariestools/sdk").ZodFactoryConfig): T & {
|
|
27
|
+
blockHash: import("@ariestools/sdk").BrandedHash;
|
|
28
|
+
blockNumber: import('../BlockNumber/xl1BlockNumber.js').XL1BlockNumber;
|
|
29
|
+
transactionHash: import("@ariestools/sdk").BrandedHash;
|
|
30
|
+
transactionIndex: number;
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
/** Converts a value to a transaction inclusion, returning undefined when invalid. */
|
|
34
|
+
export declare const toTransactionInclusion: {
|
|
35
|
+
(value: unknown): {
|
|
36
|
+
blockHash: import("@ariestools/sdk").BrandedHash;
|
|
37
|
+
blockNumber: import('../BlockNumber/xl1BlockNumber.js').XL1BlockNumber;
|
|
38
|
+
transactionHash: import("@ariestools/sdk").BrandedHash;
|
|
39
|
+
transactionIndex: number;
|
|
40
|
+
} | undefined;
|
|
41
|
+
(value: unknown, assert: import("@ariestools/sdk").ZodFactoryConfig): {
|
|
42
|
+
blockHash: import("@ariestools/sdk").BrandedHash;
|
|
43
|
+
blockNumber: import('../BlockNumber/xl1BlockNumber.js').XL1BlockNumber;
|
|
44
|
+
transactionHash: import("@ariestools/sdk").BrandedHash;
|
|
45
|
+
transactionIndex: number;
|
|
46
|
+
};
|
|
47
|
+
};
|
|
48
|
+
//# sourceMappingURL=TransactionInclusion.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransactionInclusion.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-model/model/TransactionInclusion.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAA;AAIvB,yFAAyF;AACzF,eAAO,MAAM,uBAAuB;;;;;iBASlC,CAAA;AAEF,sEAAsE;AACtE,MAAM,MAAM,oBAAoB,GAAG,CAAC,CAAC,KAAK,CAAC,OAAO,uBAAuB,CAAC,CAAA;AAE1E,+EAA+E;AAC/E,eAAO,MAAM,sBAAsB;;;;;CAAwC,CAAA;AAC3E,0EAA0E;AAC1E,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;CAAkE,CAAA;AACrG,qFAAqF;AACrF,eAAO,MAAM,sBAAsB;;;;;;;;;;;;;CAAkE,CAAA"}
|
|
@@ -23,6 +23,7 @@ export * from './Sequence.js';
|
|
|
23
23
|
export * from './Stake.js';
|
|
24
24
|
export * from './SyncStepSummary.js';
|
|
25
25
|
export * from './TimeDomain.js';
|
|
26
|
+
export * from './TransactionInclusion.js';
|
|
26
27
|
export * from './TransferPair.js';
|
|
27
28
|
export * from './version.js';
|
|
28
29
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-model/model/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/modules/protocol-model/model/index.ts"],"names":[],"mappings":"AAAA,cAAc,qBAAqB,CAAA;AACnC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,kBAAkB,CAAA;AAChC,cAAc,uBAAuB,CAAA;AACrC,cAAc,gBAAgB,CAAA;AAC9B,cAAc,yBAAyB,CAAA;AACvC,cAAc,oBAAoB,CAAA;AAClC,cAAc,yBAAyB,CAAA;AACvC,cAAc,6BAA6B,CAAA;AAC3C,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,yBAAyB,CAAA;AACvC,cAAc,cAAc,CAAA;AAC5B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,eAAe,CAAA;AAC7B,cAAc,iBAAiB,CAAA;AAC/B,cAAc,uBAAuB,CAAA;AACrC,cAAc,cAAc,CAAA;AAC5B,cAAc,kBAAkB,CAAA;AAChC,cAAc,0BAA0B,CAAA;AACxC,cAAc,eAAe,CAAA;AAC7B,cAAc,YAAY,CAAA;AAC1B,cAAc,sBAAsB,CAAA;AACpC,cAAc,iBAAiB,CAAA;AAC/B,cAAc,2BAA2B,CAAA;AACzC,cAAc,mBAAmB,CAAA;AACjC,cAAc,cAAc,CAAA"}
|
|
@@ -151,6 +151,9 @@ import {
|
|
|
151
151
|
} from "@ariestools/sdk";
|
|
152
152
|
import { z as z2 } from "zod";
|
|
153
153
|
|
|
154
|
+
// src/modules/network-model/staticRest/templates.ts
|
|
155
|
+
import { asHash } from "@ariestools/sdk";
|
|
156
|
+
|
|
154
157
|
// src/modules/network-model/staticRest/paths/chainState.ts
|
|
155
158
|
var headPath = () => "chain/head.json";
|
|
156
159
|
var chainContractByIdPath = (chainId) => `chain/contracts/${chainId.toLowerCase()}.json`;
|
|
@@ -166,10 +169,22 @@ var indexSummaryPath = (family, stepLevel, stepIndex) => `${family}/${stepLevel}
|
|
|
166
169
|
var indexManifestPath = () => "manifest.json";
|
|
167
170
|
var indexHeadPath = () => "head.json";
|
|
168
171
|
|
|
172
|
+
// src/modules/network-model/staticRest/paths/transactionInclusionIndex.ts
|
|
173
|
+
var TRANSACTION_INCLUSION_ROOT = "transactions";
|
|
174
|
+
function transactionInclusionPath(transactionHash) {
|
|
175
|
+
return `${TRANSACTION_INCLUSION_ROOT}/by-hash/${transactionHash}.json`;
|
|
176
|
+
}
|
|
177
|
+
function transactionInclusionHeadPath() {
|
|
178
|
+
return `${TRANSACTION_INCLUSION_ROOT}/head.json`;
|
|
179
|
+
}
|
|
180
|
+
function transactionInclusionManifestPath() {
|
|
181
|
+
return `${TRANSACTION_INCLUSION_ROOT}/manifest.json`;
|
|
182
|
+
}
|
|
183
|
+
|
|
169
184
|
// src/modules/network-model/staticRest/templates.ts
|
|
170
185
|
var TEMPLATE_SLOTS = {
|
|
171
186
|
block: 0,
|
|
172
|
-
hash: "0".repeat(64),
|
|
187
|
+
hash: asHash("0".repeat(64), true),
|
|
173
188
|
index: 99,
|
|
174
189
|
level: 42
|
|
175
190
|
};
|
|
@@ -208,6 +223,11 @@ function indexSummaryPathTemplate(family) {
|
|
|
208
223
|
{ literal: String(TEMPLATE_SLOTS.index), name: "index" }
|
|
209
224
|
]);
|
|
210
225
|
}
|
|
226
|
+
function transactionInclusionPathTemplate() {
|
|
227
|
+
return toPathTemplate(transactionInclusionPath(TEMPLATE_SLOTS.hash), [
|
|
228
|
+
{ literal: TEMPLATE_SLOTS.hash, name: "hash" }
|
|
229
|
+
]);
|
|
230
|
+
}
|
|
211
231
|
|
|
212
232
|
// src/modules/network-model/staticRest/layout/chainManifest.ts
|
|
213
233
|
var CHAIN_LAYOUT_VERSION = 1;
|
|
@@ -437,6 +457,68 @@ var asNetworkStakeRewardsIndexHead = zodAsFactory5(
|
|
|
437
457
|
"asNetworkStakeRewardsIndexHead"
|
|
438
458
|
);
|
|
439
459
|
|
|
460
|
+
// src/modules/network-model/staticRest/layout/transactionInclusionIndex.ts
|
|
461
|
+
import {
|
|
462
|
+
HashZod,
|
|
463
|
+
zodAsFactory as zodAsFactory6,
|
|
464
|
+
zodIsFactory as zodIsFactory5,
|
|
465
|
+
zodToFactory as zodToFactory4
|
|
466
|
+
} from "@ariestools/sdk";
|
|
467
|
+
import { z as z6 } from "zod";
|
|
468
|
+
import { ChainIdZod as ChainIdZod2, XL1BlockNumberZod } from "#protocol-model";
|
|
469
|
+
var TRANSACTION_INCLUSION_INDEX_LAYOUT = "transaction-inclusions-v1";
|
|
470
|
+
var TransactionInclusionManifestZod = z6.object({
|
|
471
|
+
/** XL1 chain whose finalized transactions are indexed. */
|
|
472
|
+
chain: ChainIdZod2,
|
|
473
|
+
/** Versioned layout identifier. */
|
|
474
|
+
layout: z6.literal(TRANSACTION_INCLUSION_INDEX_LAYOUT),
|
|
475
|
+
/** Hash-addressed path template, for example `transactions/by-hash/{hash}.json`. */
|
|
476
|
+
path: z6.string()
|
|
477
|
+
});
|
|
478
|
+
var TransactionInclusionHeadZod = z6.object({
|
|
479
|
+
/** Highest finalized block fully represented by the lookup. */
|
|
480
|
+
block: XL1BlockNumberZod,
|
|
481
|
+
/** Hash of the highest finalized block fully represented by the lookup. */
|
|
482
|
+
blockHash: HashZod,
|
|
483
|
+
/** XL1 chain whose finalized transactions are indexed. */
|
|
484
|
+
chain: ChainIdZod2,
|
|
485
|
+
/** Number of transaction-inclusion records represented through `block`. */
|
|
486
|
+
entries: z6.int().nonnegative(),
|
|
487
|
+
/** Versioned layout identifier. */
|
|
488
|
+
layout: z6.literal(TRANSACTION_INCLUSION_INDEX_LAYOUT)
|
|
489
|
+
});
|
|
490
|
+
var isTransactionInclusionManifest = zodIsFactory5(TransactionInclusionManifestZod);
|
|
491
|
+
var asTransactionInclusionManifest = zodAsFactory6(
|
|
492
|
+
TransactionInclusionManifestZod,
|
|
493
|
+
"asTransactionInclusionManifest"
|
|
494
|
+
);
|
|
495
|
+
var toTransactionInclusionManifest = zodToFactory4(
|
|
496
|
+
TransactionInclusionManifestZod,
|
|
497
|
+
"toTransactionInclusionManifest"
|
|
498
|
+
);
|
|
499
|
+
var isTransactionInclusionHead = zodIsFactory5(TransactionInclusionHeadZod);
|
|
500
|
+
var asTransactionInclusionHead = zodAsFactory6(
|
|
501
|
+
TransactionInclusionHeadZod,
|
|
502
|
+
"asTransactionInclusionHead"
|
|
503
|
+
);
|
|
504
|
+
var toTransactionInclusionHead = zodToFactory4(
|
|
505
|
+
TransactionInclusionHeadZod,
|
|
506
|
+
"toTransactionInclusionHead"
|
|
507
|
+
);
|
|
508
|
+
function createTransactionInclusionManifest(chain) {
|
|
509
|
+
return asTransactionInclusionManifest({
|
|
510
|
+
chain,
|
|
511
|
+
layout: TRANSACTION_INCLUSION_INDEX_LAYOUT,
|
|
512
|
+
path: transactionInclusionPathTemplate()
|
|
513
|
+
}, true);
|
|
514
|
+
}
|
|
515
|
+
function createTransactionInclusionHead(head) {
|
|
516
|
+
return asTransactionInclusionHead({
|
|
517
|
+
...head,
|
|
518
|
+
layout: TRANSACTION_INCLUSION_INDEX_LAYOUT
|
|
519
|
+
}, true);
|
|
520
|
+
}
|
|
521
|
+
|
|
440
522
|
// src/modules/network-model/staticRest/paths/evmEventIndex.ts
|
|
441
523
|
function root(address) {
|
|
442
524
|
return `evm/events/${address.toLowerCase()}`;
|
|
@@ -566,6 +648,9 @@ export {
|
|
|
566
648
|
NetworkStakeRewardsPolicyIdZod,
|
|
567
649
|
SequenceNetwork,
|
|
568
650
|
testnet_default as SequenceNetworkIconString,
|
|
651
|
+
TRANSACTION_INCLUSION_INDEX_LAYOUT,
|
|
652
|
+
TransactionInclusionHeadZod,
|
|
653
|
+
TransactionInclusionManifestZod,
|
|
569
654
|
asChainContractManifest,
|
|
570
655
|
asChainManifest,
|
|
571
656
|
asEvmEventIndexFrame,
|
|
@@ -578,6 +663,8 @@ export {
|
|
|
578
663
|
asNetworkStakeRewardsIndexSnapshot,
|
|
579
664
|
asNetworkStakeRewardsIndexStep,
|
|
580
665
|
asOptionalNetwork,
|
|
666
|
+
asTransactionInclusionHead,
|
|
667
|
+
asTransactionInclusionManifest,
|
|
581
668
|
blockHashPath,
|
|
582
669
|
blockHashPathTemplate,
|
|
583
670
|
blockNumberPath,
|
|
@@ -589,6 +676,8 @@ export {
|
|
|
589
676
|
createIndexHead,
|
|
590
677
|
createIndexManifest,
|
|
591
678
|
createIndexManifestFamilies,
|
|
679
|
+
createTransactionInclusionHead,
|
|
680
|
+
createTransactionInclusionManifest,
|
|
592
681
|
evmEventIndexFramePath,
|
|
593
682
|
evmEventIndexHeadPath,
|
|
594
683
|
evmEventIndexManifestPath,
|
|
@@ -608,6 +697,8 @@ export {
|
|
|
608
697
|
isIndexManifest,
|
|
609
698
|
isNetworkBootstrap,
|
|
610
699
|
isNetworkStakeRewardsIndexManifest,
|
|
700
|
+
isTransactionInclusionHead,
|
|
701
|
+
isTransactionInclusionManifest,
|
|
611
702
|
manifestPath,
|
|
612
703
|
networkStakeRewardsIndexHeadPath,
|
|
613
704
|
networkStakeRewardsIndexManifestPath,
|
|
@@ -619,6 +710,12 @@ export {
|
|
|
619
710
|
toChainManifest,
|
|
620
711
|
toIndexHead,
|
|
621
712
|
toIndexManifest,
|
|
622
|
-
toPathTemplate
|
|
713
|
+
toPathTemplate,
|
|
714
|
+
toTransactionInclusionHead,
|
|
715
|
+
toTransactionInclusionManifest,
|
|
716
|
+
transactionInclusionHeadPath,
|
|
717
|
+
transactionInclusionManifestPath,
|
|
718
|
+
transactionInclusionPath,
|
|
719
|
+
transactionInclusionPathTemplate
|
|
623
720
|
};
|
|
624
721
|
//# sourceMappingURL=network-model.mjs.map
|