@xyo-network/payload-model 4.1.1 → 4.1.3
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/PayloadBundle.d.ts +1 -1
- package/dist/neutral/StorageMeta/DataHash.d.ts +1 -1
- package/dist/neutral/StorageMeta/Hash.d.ts +1 -1
- package/dist/neutral/StorageMeta/Sequence.d.ts +1 -1
- package/dist/neutral/StorageMeta/StorageMeta.d.ts +1 -1
- package/dist/neutral/index.d.ts +15 -316
- package/package.json +8 -8
|
@@ -9,5 +9,5 @@ export interface PayloadBundleFields<T extends Payload = Payload> {
|
|
|
9
9
|
export type PayloadBundle = Payload<PayloadBundleFields, PayloadBundleSchema>;
|
|
10
10
|
export declare const isPayloadBundle: (x?: unknown | null) => x is PayloadBundle;
|
|
11
11
|
export declare const asPayloadBundle: import("@xylabs/object").AsTypeFunction<PayloadBundle>;
|
|
12
|
-
export declare const asOptionalPayloadBundle: (value: import(".store/@xylabs-promise-npm-4.13.
|
|
12
|
+
export declare const asOptionalPayloadBundle: (value: import(".store/@xylabs-promise-npm-4.13.16-6146e9e7d0/package").AnyNonPromise) => PayloadBundle | undefined;
|
|
13
13
|
//# sourceMappingURL=PayloadBundle.d.ts.map
|
|
@@ -7,5 +7,5 @@ export type WithDataHashStorageMeta<T extends Payload = Payload> = T & DataHashS
|
|
|
7
7
|
export type WithPartialDataHashStorageMeta<T extends Payload = Payload> = Partial<WithDataHashStorageMeta<T>>;
|
|
8
8
|
export declare const isDataHashStorageMeta: (value: unknown) => value is DataHashStorageMeta;
|
|
9
9
|
export declare const asDataHashStorageMeta: import("@xylabs/object").AsTypeFunction<DataHashStorageMeta>;
|
|
10
|
-
export declare const asOptionalDataHashStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.
|
|
10
|
+
export declare const asOptionalDataHashStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.16-6146e9e7d0/package").AnyNonPromise) => DataHashStorageMeta | undefined;
|
|
11
11
|
//# sourceMappingURL=DataHash.d.ts.map
|
|
@@ -8,5 +8,5 @@ export type WithHashStorageMeta<T extends Payload = Payload> = T & HashStorageMe
|
|
|
8
8
|
export type WithPartialHashStorageMeta<T extends Payload = Payload> = Partial<WithHashStorageMeta<T>>;
|
|
9
9
|
export declare const isHashStorageMeta: (value: unknown) => value is HashStorageMeta;
|
|
10
10
|
export declare const asHashStorageMeta: import("@xylabs/object").AsTypeFunction<HashStorageMeta>;
|
|
11
|
-
export declare const asOptionalHashStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.
|
|
11
|
+
export declare const asOptionalHashStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.16-6146e9e7d0/package").AnyNonPromise) => HashStorageMeta | undefined;
|
|
12
12
|
//# sourceMappingURL=Hash.d.ts.map
|
|
@@ -7,5 +7,5 @@ export type WithSequenceStorageMeta<T extends Payload = Payload> = T & SequenceS
|
|
|
7
7
|
export type WithPartialSequenceStorageMeta<T extends Payload = Payload> = Partial<WithSequenceStorageMeta<T>>;
|
|
8
8
|
export declare const isSequenceStorageMeta: (value: unknown) => value is SequenceStorageMeta;
|
|
9
9
|
export declare const asSequenceStorageMeta: import("@xylabs/object").AsTypeFunction<SequenceStorageMeta>;
|
|
10
|
-
export declare const asOptionalSequenceStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.
|
|
10
|
+
export declare const asOptionalSequenceStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.16-6146e9e7d0/package").AnyNonPromise) => SequenceStorageMeta | undefined;
|
|
11
11
|
//# sourceMappingURL=Sequence.d.ts.map
|
|
@@ -7,5 +7,5 @@ export type WithStorageMeta<T extends Payload = Payload> = T & StorageMeta;
|
|
|
7
7
|
export type WithPartialStorageMeta<T extends Payload = Payload> = T & Partial<StorageMeta>;
|
|
8
8
|
export declare const isStorageMeta: (value: unknown) => value is StorageMeta;
|
|
9
9
|
export declare const asStorageMeta: import("@xylabs/object").AsTypeFunction<StorageMeta>;
|
|
10
|
-
export declare const asOptionalStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.
|
|
10
|
+
export declare const asOptionalStorageMeta: (value: import(".store/@xylabs-promise-npm-4.13.16-6146e9e7d0/package").AnyNonPromise) => StorageMeta | undefined;
|
|
11
11
|
//# sourceMappingURL=StorageMeta.d.ts.map
|
package/dist/neutral/index.d.ts
CHANGED
|
@@ -1,316 +1,15 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
schema: Schema;
|
|
17
|
-
}
|
|
18
|
-
/** Add the Schema Fields to an object */
|
|
19
|
-
type WithSchema<T extends EmptyObject | void = void> = T extends EmptyObject ? SchemaFields & T : SchemaFields;
|
|
20
|
-
|
|
21
|
-
interface SchemaField<T extends Schema = Schema> {
|
|
22
|
-
schema: T;
|
|
23
|
-
}
|
|
24
|
-
/** Additional fields for a payload */
|
|
25
|
-
interface PayloadFields extends SchemaField {
|
|
26
|
-
}
|
|
27
|
-
interface SourcesMetaField {
|
|
28
|
-
$sources: Hash[];
|
|
29
|
-
}
|
|
30
|
-
interface PayloadMetaFields extends SourcesMetaField {
|
|
31
|
-
}
|
|
32
|
-
type WithPayload<T extends EmptyObject | void = void> = DeepRestrictToStringKeys<WithSchema<T extends EmptyObject ? PayloadFields & T : PayloadFields>>;
|
|
33
|
-
/** Base Type for Payloads */
|
|
34
|
-
type Payload<T extends void | EmptyObject | WithSchema = void, S extends Schema | void = void> = (T extends WithSchema ? S extends Schema ? WithPayload<Omit<T, 'schema'> & {
|
|
35
|
-
schema: S;
|
|
36
|
-
}> : WithPayload<T> : T extends object ? S extends Schema ? WithPayload<T & {
|
|
37
|
-
schema: S;
|
|
38
|
-
}> : WithPayload<T & PayloadFields> : WithPayload<{
|
|
39
|
-
schema: S extends Schema ? S : Schema;
|
|
40
|
-
}>) & Partial<PayloadMetaFields>;
|
|
41
|
-
type OverridablePayload<T extends Payload> = WithoutMeta<Omit<T, 'schema'> & PayloadFields>;
|
|
42
|
-
type WithSources<T extends EmptyObject> = T & SourcesMetaField;
|
|
43
|
-
/** @deprecated optional $sources are now optional in all Payloads */
|
|
44
|
-
type WithOptionalSources<T extends EmptyObject> = (T & SourcesMetaField) | T;
|
|
45
|
-
type PayloadWithSources<T extends void | EmptyObject | WithSchema = void, S extends Schema | void = void> = WithSources<Payload<T, S>>;
|
|
46
|
-
/** @deprecated optional $sources are now optional in all Payloads */
|
|
47
|
-
type PayloadWithOptionalSources<T extends void | EmptyObject | WithSchema = void, S extends Schema | void = void> = WithOptionalSources<Payload<T, S>>;
|
|
48
|
-
type WithAnySchema<T extends Payload> = OverridablePayload<T>;
|
|
49
|
-
type WithoutClientMeta<T extends EmptyObject> = DeepOmitStartsWith<T, '$'>;
|
|
50
|
-
type WithoutStorageMeta<T extends EmptyObject> = DeepOmitStartsWith<T, '_'>;
|
|
51
|
-
type WithoutPrivateStorageMeta<T extends EmptyObject> = DeepOmitStartsWith<T, '__'>;
|
|
52
|
-
type WithoutMeta<T extends EmptyObject> = WithoutClientMeta<WithoutStorageMeta<T>>;
|
|
53
|
-
type WithoutSchema<T extends WithOptionalSchema<Payload>> = Omit<T, 'schema'>;
|
|
54
|
-
type WithOptionalSchema<T extends EmptyObject = EmptyObject> = WithoutSchema<T> & Partial<T & SchemaField>;
|
|
55
|
-
type WithOnlyClientMeta<T extends EmptyObject> = DeepPickStartsWith<T, '$'>;
|
|
56
|
-
type AnyPayload = Payload<JsonObject, Schema>;
|
|
57
|
-
|
|
58
|
-
declare const ModuleErrorSchema: "network.xyo.error.module";
|
|
59
|
-
type ModuleErrorSchema = typeof ModuleErrorSchema;
|
|
60
|
-
type ModuleError = Payload<{
|
|
61
|
-
details?: JsonValue;
|
|
62
|
-
message?: string;
|
|
63
|
-
name?: string;
|
|
64
|
-
query?: Hash;
|
|
65
|
-
schema: ModuleErrorSchema;
|
|
66
|
-
}>;
|
|
67
|
-
declare const isModuleError: (x?: unknown | null) => x is ModuleError;
|
|
68
|
-
|
|
69
|
-
declare const isAnyPayload: (value: unknown) => value is Payload;
|
|
70
|
-
declare const asAnyPayload: _xylabs_object.AsTypeFunction<Payload>;
|
|
71
|
-
declare const isPayload: <T extends Payload>(schema: string[]) => (value: unknown) => value is T;
|
|
72
|
-
declare const asPayload: <T extends Payload>(schema: string[]) => _xylabs_object.AsTypeFunction<T>;
|
|
73
|
-
|
|
74
|
-
declare function isPayloadOfSchemaType<T extends Payload | never = never>(schema: T['schema']): (x?: unknown | null) => x is T;
|
|
75
|
-
declare const isPayloadOfSchemaTypeWithSources: <T extends Payload | never = never>(schema: T["schema"]) => (x?: unknown | null) => x is WithSources<T>;
|
|
76
|
-
declare const notPayloadOfSchemaType: <T extends Payload | never = never>(schema: T["schema"]) => (x?: unknown | null) => x is T;
|
|
77
|
-
|
|
78
|
-
declare const PayloadBundleSchema: "network.xyo.payload.bundle";
|
|
79
|
-
type PayloadBundleSchema = typeof PayloadBundleSchema;
|
|
80
|
-
interface PayloadBundleFields<T extends Payload = Payload> {
|
|
81
|
-
payloads: T[];
|
|
82
|
-
root: Hash;
|
|
83
|
-
}
|
|
84
|
-
type PayloadBundle = Payload<PayloadBundleFields, PayloadBundleSchema>;
|
|
85
|
-
declare const isPayloadBundle: (x?: unknown | null) => x is PayloadBundle;
|
|
86
|
-
declare const asPayloadBundle: _xylabs_object.AsTypeFunction<PayloadBundle>;
|
|
87
|
-
declare const asOptionalPayloadBundle: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => PayloadBundle | undefined;
|
|
88
|
-
|
|
89
|
-
interface PayloadFindFilter {
|
|
90
|
-
limit?: number;
|
|
91
|
-
order?: 'desc' | 'asc';
|
|
92
|
-
schema?: string | string[];
|
|
93
|
-
}
|
|
94
|
-
|
|
95
|
-
interface PayloadHashMap<TPayload extends Payload = Payload, TId extends string | number | symbol = Hash> {
|
|
96
|
-
dataHash: Record<TId, TId>;
|
|
97
|
-
hash: Record<TId, TPayload>;
|
|
98
|
-
}
|
|
99
|
-
|
|
100
|
-
declare const PayloadSetSchema: "network.xyo.payload.set";
|
|
101
|
-
type PayloadSetSchema = typeof PayloadSetSchema;
|
|
102
|
-
|
|
103
|
-
interface PayloadSet {
|
|
104
|
-
optional?: Record<string, number>;
|
|
105
|
-
required?: Record<string, number>;
|
|
106
|
-
}
|
|
107
|
-
type PayloadSetPayload = Payload<PayloadSet, PayloadSetSchema>;
|
|
108
|
-
|
|
109
|
-
/**
|
|
110
|
-
* A function that validates the supplied payload synchronously
|
|
111
|
-
*/
|
|
112
|
-
type SyncPayloadValidationFunction<T extends Payload = Payload> = (payload: T) => boolean;
|
|
113
|
-
/**
|
|
114
|
-
* A function that validates the supplied payload asynchronously
|
|
115
|
-
*/
|
|
116
|
-
type AsyncPayloadValidationFunction<T extends Payload = Payload> = (payload: T) => Promise<boolean>;
|
|
117
|
-
/**
|
|
118
|
-
* A function that validates the supplied payload
|
|
119
|
-
*/
|
|
120
|
-
type PayloadValidationFunction<T extends Payload = Payload> = SyncPayloadValidationFunction<T> | AsyncPayloadValidationFunction<T>;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Type corresponding to the properties of a payload
|
|
124
|
-
*/
|
|
125
|
-
type PayloadProperty<
|
|
126
|
-
/**
|
|
127
|
-
* The type of payload
|
|
128
|
-
*/
|
|
129
|
-
T extends Payload = Payload> = keyof T;
|
|
130
|
-
/**
|
|
131
|
-
* Type corresponding to the payload values
|
|
132
|
-
*/
|
|
133
|
-
type PayloadValue<
|
|
134
|
-
/**
|
|
135
|
-
* The type of payload
|
|
136
|
-
*/
|
|
137
|
-
T extends Payload = Payload,
|
|
138
|
-
/**
|
|
139
|
-
* The property of the payload to select
|
|
140
|
-
*/
|
|
141
|
-
Key extends PayloadProperty<T> = PayloadProperty<T>> = T[Key];
|
|
142
|
-
/**
|
|
143
|
-
* An expressions that selects a property value from the payload
|
|
144
|
-
*/
|
|
145
|
-
type PayloadValueExpression<
|
|
146
|
-
/**
|
|
147
|
-
* The type of payload
|
|
148
|
-
*/
|
|
149
|
-
T extends Payload = Payload,
|
|
150
|
-
/**
|
|
151
|
-
* The property of the payload to select
|
|
152
|
-
*/
|
|
153
|
-
Key extends PayloadProperty<T> = PayloadProperty<T>,
|
|
154
|
-
/**
|
|
155
|
-
* The type of the selected property's value
|
|
156
|
-
*/
|
|
157
|
-
TValue = PayloadValue<T, Key>> = (payload: T) => TValue;
|
|
158
|
-
|
|
159
|
-
interface QueryFields {
|
|
160
|
-
/** @field The addresses of the intended handlers */
|
|
161
|
-
address?: Address | Address[];
|
|
162
|
-
/** @field The maximum XYO that can be spent executing the query */
|
|
163
|
-
budget?: number;
|
|
164
|
-
/** @field The frequency on which this query can be rerun */
|
|
165
|
-
maxFrequency?: 'once' | 'second' | 'minute' | 'hour' | 'day' | 'week' | 'month' | 'year';
|
|
166
|
-
/** @field The starting point for the bidding on the query */
|
|
167
|
-
minBid?: number;
|
|
168
|
-
}
|
|
169
|
-
type Query<T extends void | EmptyObject | WithSchema = void, S extends Schema | void = void> = Payload<T extends void ? QueryFields : T & QueryFields, S extends void ? T extends WithSchema ? T['schema'] : T extends void ? Schema : void : S>;
|
|
170
|
-
|
|
171
|
-
interface DataHashStorageMeta {
|
|
172
|
-
_dataHash: Hash;
|
|
173
|
-
}
|
|
174
|
-
type WithDataHashStorageMeta<T extends Payload = Payload> = T & DataHashStorageMeta;
|
|
175
|
-
type WithPartialDataHashStorageMeta<T extends Payload = Payload> = Partial<WithDataHashStorageMeta<T>>;
|
|
176
|
-
declare const isDataHashStorageMeta: (value: unknown) => value is DataHashStorageMeta;
|
|
177
|
-
declare const asDataHashStorageMeta: _xylabs_object.AsTypeFunction<DataHashStorageMeta>;
|
|
178
|
-
declare const asOptionalDataHashStorageMeta: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => DataHashStorageMeta | undefined;
|
|
179
|
-
|
|
180
|
-
interface HashStorageMeta extends DataHashStorageMeta {
|
|
181
|
-
_hash: Hash;
|
|
182
|
-
}
|
|
183
|
-
type WithHashStorageMeta<T extends Payload = Payload> = T & HashStorageMeta;
|
|
184
|
-
type WithPartialHashStorageMeta<T extends Payload = Payload> = Partial<WithHashStorageMeta<T>>;
|
|
185
|
-
declare const isHashStorageMeta: (value: unknown) => value is HashStorageMeta;
|
|
186
|
-
declare const asHashStorageMeta: _xylabs_object.AsTypeFunction<HashStorageMeta>;
|
|
187
|
-
declare const asOptionalHashStorageMeta: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => HashStorageMeta | undefined;
|
|
188
|
-
|
|
189
|
-
declare const SequenceComparer: {
|
|
190
|
-
local: Compare<Lowercase<string>>;
|
|
191
|
-
qualified: Compare<Lowercase<string>>;
|
|
192
|
-
};
|
|
193
|
-
|
|
194
|
-
type LocalSequence = Hex & Exclude<string, 'reserved-local-sequence-value'>;
|
|
195
|
-
type QualifiedSequence = Hex & Exclude<string, 'reserved-qualified-sequence-value'>;
|
|
196
|
-
type Sequence = LocalSequence | QualifiedSequence;
|
|
197
|
-
type Epoch = Hex & Exclude<string, 'reserved-epoch-sequence-value'>;
|
|
198
|
-
declare const isEpoch: (value: unknown) => value is Epoch;
|
|
199
|
-
type Nonce = Hex & Exclude<string, 'reserved-nonce-sequence-value'>;
|
|
200
|
-
declare const isNonce: (value: unknown) => value is Epoch;
|
|
201
|
-
declare const isLocalSequence: (value: unknown) => value is Sequence;
|
|
202
|
-
declare const isQualifiedSequence: (value: unknown) => value is Sequence;
|
|
203
|
-
declare const isSequence: (value: unknown) => value is Sequence;
|
|
204
|
-
declare const SequenceNonceComponentLengths: {
|
|
205
|
-
nonceIndexBytes: number;
|
|
206
|
-
nonceHashBytes: number;
|
|
207
|
-
};
|
|
208
|
-
declare const SequenceComponentLengths: {
|
|
209
|
-
epochBytes: number;
|
|
210
|
-
nonceBytes: number;
|
|
211
|
-
addressBytes: number;
|
|
212
|
-
nonceIndexBytes: number;
|
|
213
|
-
nonceHashBytes: number;
|
|
214
|
-
};
|
|
215
|
-
declare const SequenceComponentMinMax: {
|
|
216
|
-
minEpoch: Epoch;
|
|
217
|
-
maxEpoch: Epoch;
|
|
218
|
-
minNonce: Nonce;
|
|
219
|
-
maxNonce: Nonce;
|
|
220
|
-
minAddress: Address;
|
|
221
|
-
maxAddress: Address;
|
|
222
|
-
};
|
|
223
|
-
declare const LocalSequenceConstants: {
|
|
224
|
-
localSequenceBytes: number;
|
|
225
|
-
minLocalSequence: LocalSequence;
|
|
226
|
-
maxLocalSequence: LocalSequence;
|
|
227
|
-
minEpoch: Epoch;
|
|
228
|
-
maxEpoch: Epoch;
|
|
229
|
-
minNonce: Nonce;
|
|
230
|
-
maxNonce: Nonce;
|
|
231
|
-
minAddress: Address;
|
|
232
|
-
maxAddress: Address;
|
|
233
|
-
epochBytes: number;
|
|
234
|
-
nonceBytes: number;
|
|
235
|
-
addressBytes: number;
|
|
236
|
-
nonceIndexBytes: number;
|
|
237
|
-
nonceHashBytes: number;
|
|
238
|
-
};
|
|
239
|
-
declare const QualifiedSequenceConstants: {
|
|
240
|
-
qualifiedSequenceBytes: number;
|
|
241
|
-
minQualifiedSequence: QualifiedSequence;
|
|
242
|
-
maxQualifiedSequence: QualifiedSequence;
|
|
243
|
-
};
|
|
244
|
-
declare const SequenceConstants: {
|
|
245
|
-
qualifiedSequenceBytes: number;
|
|
246
|
-
minQualifiedSequence: QualifiedSequence;
|
|
247
|
-
maxQualifiedSequence: QualifiedSequence;
|
|
248
|
-
localSequenceBytes: number;
|
|
249
|
-
minLocalSequence: LocalSequence;
|
|
250
|
-
maxLocalSequence: LocalSequence;
|
|
251
|
-
minEpoch: Epoch;
|
|
252
|
-
maxEpoch: Epoch;
|
|
253
|
-
minNonce: Nonce;
|
|
254
|
-
maxNonce: Nonce;
|
|
255
|
-
minAddress: Address;
|
|
256
|
-
maxAddress: Address;
|
|
257
|
-
epochBytes: number;
|
|
258
|
-
nonceBytes: number;
|
|
259
|
-
addressBytes: number;
|
|
260
|
-
nonceIndexBytes: number;
|
|
261
|
-
nonceHashBytes: number;
|
|
262
|
-
};
|
|
263
|
-
|
|
264
|
-
declare class SequenceParser {
|
|
265
|
-
protected static privateConstructorKey: string;
|
|
266
|
-
private readonly data;
|
|
267
|
-
protected constructor(privateConstructorKey: string, hex: Hex);
|
|
268
|
-
get address(): Address;
|
|
269
|
-
get epoch(): Epoch;
|
|
270
|
-
get localSequence(): LocalSequence;
|
|
271
|
-
get nonce(): Nonce;
|
|
272
|
-
get qualifiedSequence(): QualifiedSequence;
|
|
273
|
-
static from(sequence: Sequence, address?: Address): SequenceParser;
|
|
274
|
-
static from(timestamp: Hex, hash: Hash, address?: Address): SequenceParser;
|
|
275
|
-
static from(timestamp: Hex, hash: Hex, address?: Address): SequenceParser;
|
|
276
|
-
static from(timestamp: Hex, nonce: Nonce, address?: Address): SequenceParser;
|
|
277
|
-
static from(timestamp: Hex, hash: Hash, index?: number, address?: Address): SequenceParser;
|
|
278
|
-
static from(timestamp: Hex, hash: Hex, index?: number, address?: Address): SequenceParser;
|
|
279
|
-
static from(timestamp: Hex, nonce: Nonce, index?: number, address?: Address): SequenceParser;
|
|
280
|
-
static from(timestamp: number, hash: Hash, address?: Address): SequenceParser;
|
|
281
|
-
static from(timestamp: number, hash: Hex, address?: Address): SequenceParser;
|
|
282
|
-
static from(timestamp: number, nonce: Nonce, address?: Address): SequenceParser;
|
|
283
|
-
static from(timestamp: number, hash: Hash, index?: number, address?: Address): SequenceParser;
|
|
284
|
-
static from(timestamp: number, hash: Hex, index?: number, address?: Address): SequenceParser;
|
|
285
|
-
static from(timestamp: number, nonce: Nonce, index?: number, address?: Address): SequenceParser;
|
|
286
|
-
static parse(value: Hex | string | ArrayBufferLike): SequenceParser;
|
|
287
|
-
static toEpoch(value: number | Hex | Epoch): Epoch;
|
|
288
|
-
static toNonce(value: Hash | Hex, index?: number): Nonce;
|
|
289
|
-
}
|
|
290
|
-
|
|
291
|
-
interface SequenceStorageMeta {
|
|
292
|
-
_sequence: Sequence;
|
|
293
|
-
}
|
|
294
|
-
type WithSequenceStorageMeta<T extends Payload = Payload> = T & SequenceStorageMeta;
|
|
295
|
-
type WithPartialSequenceStorageMeta<T extends Payload = Payload> = Partial<WithSequenceStorageMeta<T>>;
|
|
296
|
-
declare const isSequenceStorageMeta: (value: unknown) => value is SequenceStorageMeta;
|
|
297
|
-
declare const asSequenceStorageMeta: _xylabs_object.AsTypeFunction<SequenceStorageMeta>;
|
|
298
|
-
declare const asOptionalSequenceStorageMeta: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => SequenceStorageMeta | undefined;
|
|
299
|
-
|
|
300
|
-
interface StorageMeta extends SequenceStorageMeta, HashStorageMeta {
|
|
301
|
-
}
|
|
302
|
-
type WithStorageMeta<T extends Payload = Payload> = T & StorageMeta;
|
|
303
|
-
type WithPartialStorageMeta<T extends Payload = Payload> = T & Partial<StorageMeta>;
|
|
304
|
-
declare const isStorageMeta: (value: unknown) => value is StorageMeta;
|
|
305
|
-
declare const asStorageMeta: _xylabs_object.AsTypeFunction<StorageMeta>;
|
|
306
|
-
declare const asOptionalStorageMeta: (value: _store__xylabs_promise_npm_4_13_15_8bdb7d384b_package.AnyNonPromise) => StorageMeta | undefined;
|
|
307
|
-
|
|
308
|
-
/** Object with a timestamp */
|
|
309
|
-
interface Timestamp {
|
|
310
|
-
timestamp: number;
|
|
311
|
-
}
|
|
312
|
-
/** Add a timestamp field to any object */
|
|
313
|
-
type WithTimestamp<T extends EmptyObject = EmptyObject> = T & Timestamp;
|
|
314
|
-
|
|
315
|
-
export { LocalSequenceConstants, ModuleErrorSchema, PayloadBundleSchema, PayloadSchema, PayloadSetSchema, QualifiedSequenceConstants, SchemaRegEx, SequenceComparer, SequenceComponentLengths, SequenceComponentMinMax, SequenceConstants, SequenceNonceComponentLengths, SequenceParser, asAnyPayload, asDataHashStorageMeta, asHashStorageMeta, asOptionalDataHashStorageMeta, asOptionalHashStorageMeta, asOptionalPayloadBundle, asOptionalSequenceStorageMeta, asOptionalStorageMeta, asPayload, asPayloadBundle, asSchema, asSequenceStorageMeta, asStorageMeta, isAnyPayload, isDataHashStorageMeta, isEpoch, isHashStorageMeta, isLocalSequence, isModuleError, isNonce, isPayload, isPayloadBundle, isPayloadOfSchemaType, isPayloadOfSchemaTypeWithSources, isQualifiedSequence, isSchema, isSequence, isSequenceStorageMeta, isStorageMeta, notPayloadOfSchemaType };
|
|
316
|
-
export type { AnyPayload, AsyncPayloadValidationFunction, DataHashStorageMeta, Epoch, HashStorageMeta, LocalSequence, ModuleError, Nonce, OverridablePayload, Payload, PayloadBundle, PayloadBundleFields, PayloadFields, PayloadFindFilter, PayloadHashMap, PayloadMetaFields, PayloadProperty, PayloadSet, PayloadSetPayload, PayloadValidationFunction, PayloadValue, PayloadValueExpression, PayloadWithOptionalSources, PayloadWithSources, QualifiedSequence, Query, QueryFields, Schema, SchemaField, SchemaFields, Sequence, SequenceStorageMeta, SourcesMetaField, StorageMeta, SyncPayloadValidationFunction, Timestamp, WithAnySchema, WithDataHashStorageMeta, WithHashStorageMeta, WithOnlyClientMeta, WithOptionalSchema, WithOptionalSources, WithPartialDataHashStorageMeta, WithPartialHashStorageMeta, WithPartialSequenceStorageMeta, WithPartialStorageMeta, WithPayload, WithSchema, WithSequenceStorageMeta, WithSources, WithStorageMeta, WithTimestamp, WithoutClientMeta, WithoutMeta, WithoutPrivateStorageMeta, WithoutSchema, WithoutStorageMeta };
|
|
1
|
+
export * from './Error.ts';
|
|
2
|
+
export * from './isPayload.ts';
|
|
3
|
+
export * from './isPayloadOfSchemaType.ts';
|
|
4
|
+
export * from './Payload.ts';
|
|
5
|
+
export * from './PayloadBundle.ts';
|
|
6
|
+
export * from './PayloadFindFilter.ts';
|
|
7
|
+
export * from './PayloadHashMap.ts';
|
|
8
|
+
export * from './PayloadSet/index.ts';
|
|
9
|
+
export * from './PayloadValidationFunction.ts';
|
|
10
|
+
export * from './PayloadValueExpression.ts';
|
|
11
|
+
export * from './Query.ts';
|
|
12
|
+
export * from './Schema.ts';
|
|
13
|
+
export * from './StorageMeta/index.ts';
|
|
14
|
+
export * from './Timestamp.ts';
|
|
15
|
+
//# sourceMappingURL=index.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@xyo-network/payload-model",
|
|
3
|
-
"version": "4.1.
|
|
3
|
+
"version": "4.1.3",
|
|
4
4
|
"description": "Primary SDK for using XYO Protocol 2.0",
|
|
5
5
|
"homepage": "https://xyo.network",
|
|
6
6
|
"bugs": {
|
|
@@ -29,15 +29,15 @@
|
|
|
29
29
|
"module": "dist/neutral/index.mjs",
|
|
30
30
|
"types": "dist/neutral/index.d.ts",
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@xylabs/arraybuffer": "^4.13.
|
|
33
|
-
"@xylabs/assert": "^4.13.
|
|
34
|
-
"@xylabs/hex": "^4.13.
|
|
35
|
-
"@xylabs/object": "^4.13.
|
|
32
|
+
"@xylabs/arraybuffer": "^4.13.16",
|
|
33
|
+
"@xylabs/assert": "^4.13.16",
|
|
34
|
+
"@xylabs/hex": "^4.13.16",
|
|
35
|
+
"@xylabs/object": "^4.13.16"
|
|
36
36
|
},
|
|
37
37
|
"devDependencies": {
|
|
38
|
-
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.
|
|
39
|
-
"@xylabs/tsconfig": "^7.0.0-rc.
|
|
40
|
-
"@xylabs/vitest-extended": "^4.13.
|
|
38
|
+
"@xylabs/ts-scripts-yarn3": "^7.0.0-rc.27",
|
|
39
|
+
"@xylabs/tsconfig": "^7.0.0-rc.27",
|
|
40
|
+
"@xylabs/vitest-extended": "^4.13.16",
|
|
41
41
|
"typescript": "^5.8.3",
|
|
42
42
|
"vitest": "^3.2.4"
|
|
43
43
|
},
|