@xyo-network/xl1-protocol 5.3.6 → 5.3.8
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/protocol-model/block/AllowedBlockPayload.d.ts +4 -2
- package/dist/neutral/modules/protocol-model/block/AllowedBlockPayload.d.ts.map +1 -1
- package/dist/neutral/modules/protocol-model/payload/elevatable/Claim.d.ts +89 -0
- package/dist/neutral/modules/protocol-model/payload/elevatable/Claim.d.ts.map +1 -0
- package/dist/neutral/modules/protocol-model/payload/elevatable/index.d.ts +1 -0
- package/dist/neutral/modules/protocol-model/payload/elevatable/index.d.ts.map +1 -1
- package/dist/neutral/modules/schema/payload/ClaimPayload.d.ts +18 -0
- package/dist/neutral/modules/schema/payload/ClaimPayload.d.ts.map +1 -0
- package/dist/neutral/modules/schema/payload/index.d.ts +1 -0
- package/dist/neutral/modules/schema/payload/index.d.ts.map +1 -1
- package/dist/neutral/protocol-model.mjs +480 -439
- package/dist/neutral/protocol-model.mjs.map +4 -4
- package/dist/neutral/schema.mjs +51 -18
- package/dist/neutral/schema.mjs.map +4 -4
- package/package.json +1 -1
package/dist/neutral/schema.mjs
CHANGED
|
@@ -186,57 +186,88 @@ var ChainStakeIntentPayloadJsonSchema = {
|
|
|
186
186
|
var chainStakeIntentPayloadJsonSchemaBuilder = new PayloadBuilder5({ schema: SchemaSchema5 });
|
|
187
187
|
var ChainStakeIntentPayloadJsonSchemaPayload = chainStakeIntentPayloadJsonSchemaBuilder.fields({ definition: ChainStakeIntentPayloadJsonSchema }).build();
|
|
188
188
|
|
|
189
|
-
// src/modules/schema/payload/
|
|
189
|
+
// src/modules/schema/payload/ClaimPayload.ts
|
|
190
190
|
import { HashRegEx as HashRegEx3 } from "@ariestools/sdk";
|
|
191
191
|
import {
|
|
192
192
|
PayloadBuilder as PayloadBuilder6,
|
|
193
193
|
payloadJsonSchema as payloadJsonSchema2,
|
|
194
|
-
SchemaSchema as SchemaSchema6
|
|
194
|
+
SchemaSchema as SchemaSchema6,
|
|
195
|
+
XyoAddressRegEx as XyoAddressRegEx3
|
|
196
|
+
} from "@xyo-network/sdk";
|
|
197
|
+
import { ClaimSchema, MAX_CLAIM_HASHES } from "#protocol-lib";
|
|
198
|
+
var ClaimPayloadJsonSchema = {
|
|
199
|
+
...payloadJsonSchema2,
|
|
200
|
+
$id: "https://schemas.xyo.network/2.0/payload/statement-claim",
|
|
201
|
+
additionalProperties: false,
|
|
202
|
+
properties: {
|
|
203
|
+
...payloadJsonSchema2.properties,
|
|
204
|
+
hashes: {
|
|
205
|
+
type: "array",
|
|
206
|
+
items: { type: "string", pattern: HashRegEx3.source },
|
|
207
|
+
maxItems: MAX_CLAIM_HASHES,
|
|
208
|
+
minItems: 1,
|
|
209
|
+
uniqueItems: true
|
|
210
|
+
},
|
|
211
|
+
schema: { type: "string", pattern: ClaimSchema },
|
|
212
|
+
source: { type: "string", pattern: XyoAddressRegEx3.source }
|
|
213
|
+
},
|
|
214
|
+
required: mergeJsonSchemaRequired(payloadJsonSchema2.required, "source", "hashes"),
|
|
215
|
+
type: "object"
|
|
216
|
+
};
|
|
217
|
+
var claimPayloadJsonSchemaBuilder = new PayloadBuilder6({ schema: SchemaSchema6 });
|
|
218
|
+
var ClaimPayloadJsonSchemaPayload = claimPayloadJsonSchemaBuilder.fields({ definition: ClaimPayloadJsonSchema }).build();
|
|
219
|
+
|
|
220
|
+
// src/modules/schema/payload/HashPayload.ts
|
|
221
|
+
import { HashRegEx as HashRegEx4 } from "@ariestools/sdk";
|
|
222
|
+
import {
|
|
223
|
+
PayloadBuilder as PayloadBuilder7,
|
|
224
|
+
payloadJsonSchema as payloadJsonSchema3,
|
|
225
|
+
SchemaSchema as SchemaSchema7
|
|
195
226
|
} from "@xyo-network/sdk";
|
|
196
227
|
import { HashSchema } from "#protocol-lib";
|
|
197
228
|
var HashPayloadJsonSchema = {
|
|
198
|
-
...
|
|
229
|
+
...payloadJsonSchema3,
|
|
199
230
|
$id: "https://schemas.xyo.network/2.0/payload/hash",
|
|
200
231
|
additionalProperties: false,
|
|
201
232
|
properties: {
|
|
202
|
-
...
|
|
203
|
-
hash: { type: "string", pattern:
|
|
233
|
+
...payloadJsonSchema3.properties,
|
|
234
|
+
hash: { type: "string", pattern: HashRegEx4.source },
|
|
204
235
|
schema: { type: "string", pattern: HashSchema }
|
|
205
236
|
},
|
|
206
|
-
required: mergeJsonSchemaRequired(
|
|
237
|
+
required: mergeJsonSchemaRequired(payloadJsonSchema3.required, "hash"),
|
|
207
238
|
type: "object"
|
|
208
239
|
};
|
|
209
|
-
var hashPayloadJsonSchemaBuilder = new
|
|
240
|
+
var hashPayloadJsonSchemaBuilder = new PayloadBuilder7({ schema: SchemaSchema7 });
|
|
210
241
|
var HashPayloadJsonSchemaPayload = hashPayloadJsonSchemaBuilder.fields({ definition: HashPayloadJsonSchema }).build();
|
|
211
242
|
|
|
212
243
|
// src/modules/schema/payload/TransferPayload.ts
|
|
213
244
|
import {
|
|
214
|
-
PayloadBuilder as
|
|
215
|
-
payloadJsonSchema as
|
|
216
|
-
SchemaSchema as
|
|
245
|
+
PayloadBuilder as PayloadBuilder8,
|
|
246
|
+
payloadJsonSchema as payloadJsonSchema4,
|
|
247
|
+
SchemaSchema as SchemaSchema8,
|
|
217
248
|
Uint256RegEx as Uint256RegEx3,
|
|
218
|
-
XyoAddressRegEx as
|
|
249
|
+
XyoAddressRegEx as XyoAddressRegEx4
|
|
219
250
|
} from "@xyo-network/sdk";
|
|
220
251
|
import { TransferSchema } from "#protocol-lib";
|
|
221
252
|
var TransferPayloadJsonSchema = {
|
|
222
|
-
...
|
|
253
|
+
...payloadJsonSchema4,
|
|
223
254
|
$id: "https://schemas.xyo.network/2.0/payload/transfer",
|
|
224
255
|
additionalProperties: false,
|
|
225
256
|
properties: {
|
|
226
|
-
...
|
|
227
|
-
from: { type: "string", pattern:
|
|
257
|
+
...payloadJsonSchema4.properties,
|
|
258
|
+
from: { type: "string", pattern: XyoAddressRegEx4.source },
|
|
228
259
|
epoch: { type: "number" },
|
|
229
260
|
transfers: {
|
|
230
261
|
type: "object",
|
|
231
|
-
propertyNames: { pattern:
|
|
232
|
-
patternProperties: { [
|
|
262
|
+
propertyNames: { pattern: XyoAddressRegEx4.source },
|
|
263
|
+
patternProperties: { [XyoAddressRegEx4.source]: { type: "string", pattern: Uint256RegEx3.source } }
|
|
233
264
|
},
|
|
234
265
|
schema: { type: "string", pattern: TransferSchema }
|
|
235
266
|
},
|
|
236
|
-
required: mergeJsonSchemaRequired(
|
|
267
|
+
required: mergeJsonSchemaRequired(payloadJsonSchema4.required, "transfers", "epoch"),
|
|
237
268
|
type: "object"
|
|
238
269
|
};
|
|
239
|
-
var transferPayloadJsonSchemaBuilder = new
|
|
270
|
+
var transferPayloadJsonSchemaBuilder = new PayloadBuilder8({ schema: SchemaSchema8 });
|
|
240
271
|
var TransferPayloadJsonSchemaPayload = transferPayloadJsonSchemaBuilder.fields({ definition: TransferPayloadJsonSchema }).build();
|
|
241
272
|
export {
|
|
242
273
|
BlockBoundWitnessJsonSchema,
|
|
@@ -245,6 +276,8 @@ export {
|
|
|
245
276
|
BlockBoundWitnessWithStorageMetaSchemaPayload,
|
|
246
277
|
ChainStakeIntentPayloadJsonSchema,
|
|
247
278
|
ChainStakeIntentPayloadJsonSchemaPayload,
|
|
279
|
+
ClaimPayloadJsonSchema,
|
|
280
|
+
ClaimPayloadJsonSchemaPayload,
|
|
248
281
|
ExecutableJsonSchema,
|
|
249
282
|
HashPayloadJsonSchema,
|
|
250
283
|
HashPayloadJsonSchemaPayload,
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"version": 3,
|
|
3
|
-
"sources": ["../../src/modules/schema/boundwitness/BlockBoundWitness.ts", "../../src/modules/schema/mergeJsonSchemaRequired.ts", "../../src/modules/schema/boundwitness/BlockBoundWitnessWithStorageMeta.ts", "../../src/modules/schema/StorageMeta.ts", "../../src/modules/schema/boundwitness/TransactionBoundWitness.ts", "../../src/modules/schema/Executable.ts", "../../src/modules/schema/boundwitness/TransactionBoundWitnessWithStorageMeta.ts", "../../src/modules/schema/payload/ChainStakeIntent.ts", "../../src/modules/schema/payload/HashPayload.ts", "../../src/modules/schema/payload/TransferPayload.ts"],
|
|
4
|
-
"sourcesContent": ["import { AddressRegEx, HashRegEx } from '@ariestools/sdk'\nimport type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n boundWitnessJsonSchema, boundWitnessProperties, BoundWitnessSchema,\n PayloadBuilder, SchemaSchema,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { BlockBoundWitness } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\n\n/** JSON schema for validating BlockBoundWitness payloads. */\nexport const BlockBoundWitnessJsonSchema: JSONSchemaType<BlockBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/block',\n properties: {\n ...boundWitnessProperties,\n block: { type: 'integer' },\n chain: { type: 'string', pattern: AddressRegEx.source },\n previous: {\n type: 'string', pattern: HashRegEx.source, nullable: true,\n },\n step_hashes: {\n items: { type: 'string', pattern: HashRegEx.source },\n type: 'array',\n },\n $epoch: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n\n required: mergeJsonSchemaRequired<BlockBoundWitness>(boundWitnessJsonSchema.required, 'block', 'chain', 'step_hashes', 'previous', '$epoch'),\n type: 'object',\n} as const\n\n/** Pre-built schema payload for BlockBoundWitness validation. */\nconst blockBoundWitnessSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes {@link BlockBoundWitnessJsonSchema} for registry-based validation. */\nexport const BlockBoundWitnessSchemaPayload = blockBoundWitnessSchemaBuilder\n .fields({ definition: BlockBoundWitnessJsonSchema }).build()\n", "import type { JSONSchemaType } from 'ajv'\n\n/**\n * Normalizes an AJV `required` value to a readonly string array.\n *\n * @param required Candidate value from a JSON-schema definition.\n * @returns The string itself as one item, its string array items, or an empty array.\n */\nexport const asRequiredStrings = (required: unknown): readonly string[] => {\n if (typeof required === 'string') return [required]\n if (!Array.isArray(required)) return []\n return required.filter((item): item is string => typeof item === 'string')\n}\n\n/** Merge JSON schema `required` arrays without spreading untyped sdk-js values. */\nexport const mergeJsonSchemaRequired = <T>(\n ...groups: readonly unknown[]\n): JSONSchemaType<T> extends { required: infer R } ? R : never => (\n [...new Set(groups.flatMap(asRequiredStrings))] as JSONSchemaType<T> extends { required: infer R } ? R : never\n)\n", "import type { SchemaPayload, WithStorageMeta } from '@xyo-network/sdk'\nimport {\n boundWitnessJsonSchema, boundWitnessProperties, BoundWitnessSchema,\n PayloadBuilder, SchemaSchema,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { BlockBoundWitness } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\nimport { StorageMetaJsonSchema } from '../StorageMeta.ts'\nimport { BlockBoundWitnessJsonSchema } from './BlockBoundWitness.ts'\n\n/** JSON schema for validating BlockBoundWitness payloads including storage metadata. */\nexport const BlockBoundWitnessWithStorageMetaJsonSchema: JSONSchemaType<WithStorageMeta<BlockBoundWitness>> = {\n $id: 'https://schemas.xyo.network/2.0/block-with-storage-meta',\n properties: {\n ...boundWitnessProperties,\n ...BlockBoundWitnessJsonSchema.properties,\n ...StorageMetaJsonSchema.properties,\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n\n required: mergeJsonSchemaRequired<WithStorageMeta<BlockBoundWitness>>(\n boundWitnessJsonSchema.required,\n BlockBoundWitnessJsonSchema.required,\n StorageMetaJsonSchema.required,\n ),\n type: 'object',\n} as const\n\n/** Pre-built schema payload for BlockBoundWitness with storage meta validation. */\nconst blockBoundWitnessWithStorageMetaSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes the storage-meta block definition for registry-based validation. */\nexport const BlockBoundWitnessWithStorageMetaSchemaPayload = blockBoundWitnessWithStorageMetaSchemaBuilder\n .fields({ definition: BlockBoundWitnessWithStorageMetaJsonSchema }).build()\n", "import { HashRegEx, HexRegEx } from '@ariestools/sdk'\nimport type { StorageMeta } from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\n/** JSON schema for validating storage metadata fields (_sequence, _hash, _dataHash). */\nexport const StorageMetaJsonSchema: JSONSchemaType<StorageMeta> = {\n $id: 'https://schemas.xyo.network/2.0/storage-meta',\n properties: {\n _sequence: { type: 'string', pattern: HexRegEx.source },\n _hash: { type: 'string', pattern: HashRegEx.source },\n _dataHash: { type: 'string', pattern: HashRegEx.source },\n },\n required: ['_sequence', '_hash', '_dataHash'],\n type: 'object',\n} as const\n", "import { AddressRegEx } from '@ariestools/sdk'\nimport type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n boundWitnessJsonSchema, BoundWitnessSchema,\n PayloadBuilder, SchemaSchema,\n Uint256RegEx, XyoAddressRegEx,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { TransactionBoundWitness } from '#protocol-lib'\n\nimport { ExecutableJsonSchema } from '../Executable.ts'\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\n\n/** JSON schema for validating TransactionBoundWitness payloads. */\nexport const TransactionBoundWitnessJsonSchema: JSONSchemaType<TransactionBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/transaction',\n additionalProperties: false,\n properties: {\n ...boundWitnessJsonSchema.properties,\n ...ExecutableJsonSchema.properties,\n chain: { type: 'string', pattern: AddressRegEx.source },\n fees: {\n type: 'object',\n properties: {\n base: { type: 'string', pattern: Uint256RegEx.source },\n gasLimit: { type: 'string', pattern: Uint256RegEx.source },\n gasPrice: { type: 'string', pattern: Uint256RegEx.source },\n priority: { type: 'string', pattern: Uint256RegEx.source },\n },\n required: ['base'],\n additionalProperties: false,\n },\n from: { type: 'string', pattern: XyoAddressRegEx.source },\n nbf: { type: 'integer' },\n exp: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n\n required: mergeJsonSchemaRequired<TransactionBoundWitness>(boundWitnessJsonSchema.required, 'chain', 'fees', 'nbf', 'exp'),\n type: 'object',\n} as const\n\n/** Pre-built schema payload for TransactionBoundWitness validation. */\nconst transactionBoundWitnessSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes {@link TransactionBoundWitnessJsonSchema} for registry-based validation. */\nexport const TransactionBoundWitnessSchemaPayload = transactionBoundWitnessSchemaBuilder\n .fields({ definition: TransactionBoundWitnessJsonSchema }).build()\n", "import type { JSONSchemaType } from 'ajv'\n\nimport type { Executable } from '#protocol-lib'\n\n/** JSON schema for validating Executable payloads containing elevation scripts. */\nexport const ExecutableJsonSchema: JSONSchemaType<Executable> = {\n $id: 'https://schemas.xyo.network/2.0/executable',\n additionalProperties: true,\n properties: { script: { items: { type: 'string', pattern: String.raw`^elevate\\|` }, type: 'array' } },\n required: ['script'],\n type: 'object',\n} as const\n", "import { AddressRegEx } from '@ariestools/sdk'\nimport type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n boundWitnessJsonSchema, BoundWitnessSchema,\n PayloadBuilder, SchemaSchema,\n Uint256RegEx,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { TransactionBoundWitness } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\nimport { StorageMetaJsonSchema } from '../StorageMeta.ts'\n\n/** JSON schema for validating TransactionBoundWitness payloads including storage metadata. */\nexport const TransactionBoundWitnessWithStorageMetaJsonSchema: JSONSchemaType<TransactionBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/transaction-with-storage-meta',\n additionalProperties: false,\n properties: {\n ...boundWitnessJsonSchema.properties,\n ...StorageMetaJsonSchema.properties,\n chain: { type: 'string', pattern: AddressRegEx.source },\n gas: { type: 'string', pattern: Uint256RegEx.source },\n nbf: { type: 'integer' },\n exp: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n\n required: mergeJsonSchemaRequired<TransactionBoundWitness>(boundWitnessJsonSchema.required, StorageMetaJsonSchema.required, 'chain', 'gas', 'nbf', 'exp'),\n type: 'object',\n} as const\n\n/** Pre-built schema payload for TransactionBoundWitness with storage meta validation. */\nconst transactionBoundWitnessWithStorageMetaSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes the storage-meta transaction definition for registry-based validation. */\nexport const TransactionBoundWitnessWithStorageMetaSchemaPayload = transactionBoundWitnessWithStorageMetaSchemaBuilder\n .fields({ definition: TransactionBoundWitnessWithStorageMetaJsonSchema }).build()\n", "import type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n PayloadBuilder, payloadJsonSchema, SchemaSchema, XyoAddressRegEx,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { ChainStakeIntent } from '#protocol-lib'\nimport { ChainStakeIntentSchema } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\n\n/** JSON schema for validating ChainStakeIntent payloads. */\nexport const ChainStakeIntentPayloadJsonSchema: JSONSchemaType<ChainStakeIntent> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/chain-stake-intent',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n from: { type: 'string', pattern: XyoAddressRegEx.source },\n intent: { type: 'string', enum: ['producer'] },\n schema: { type: 'string', pattern: ChainStakeIntentSchema },\n },\n\n required: mergeJsonSchemaRequired<ChainStakeIntent>(payloadJsonSchema.required, 'intent'),\n type: 'object',\n}\n\n/** Pre-built schema payload for ChainStakeIntent validation. */\nconst chainStakeIntentPayloadJsonSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes {@link ChainStakeIntentPayloadJsonSchema} for registry-based validation. */\nexport const ChainStakeIntentPayloadJsonSchemaPayload = chainStakeIntentPayloadJsonSchemaBuilder\n .fields({ definition: ChainStakeIntentPayloadJsonSchema }).build()\n", "import { HashRegEx } from '@ariestools/sdk'\nimport type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n PayloadBuilder, payloadJsonSchema, SchemaSchema,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { HashPayload } from '#protocol-lib'\nimport { HashSchema } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\n\n/** JSON schema for validating Hash payloads. */\nexport const HashPayloadJsonSchema: JSONSchemaType<HashPayload> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/hash',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n hash: { type: 'string', pattern: HashRegEx.source },\n schema: { type: 'string', pattern: HashSchema },\n },\n\n required: mergeJsonSchemaRequired<HashPayload>(payloadJsonSchema.required, 'hash'),\n type: 'object',\n}\n\n/** Pre-built schema payload for Hash validation. */\nconst hashPayloadJsonSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes {@link HashPayloadJsonSchema} for registry-based validation. */\nexport const HashPayloadJsonSchemaPayload = hashPayloadJsonSchemaBuilder\n .fields({ definition: HashPayloadJsonSchema }).build()\n", "import type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n PayloadBuilder, payloadJsonSchema, SchemaSchema,\n Uint256RegEx, XyoAddressRegEx,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { Transfer } from '#protocol-lib'\nimport { TransferSchema } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\n\n/** JSON schema for validating Transfer payloads. */\nexport const TransferPayloadJsonSchema: JSONSchemaType<Transfer> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/transfer',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n from: { type: 'string', pattern: XyoAddressRegEx.source },\n epoch: { type: 'number' },\n transfers: {\n type: 'object',\n propertyNames: { pattern: XyoAddressRegEx.source },\n patternProperties: { [XyoAddressRegEx.source]: { type: 'string', pattern: Uint256RegEx.source } },\n },\n schema: { type: 'string', pattern: TransferSchema },\n },\n\n required: mergeJsonSchemaRequired<Transfer>(payloadJsonSchema.required, 'transfers', 'epoch'),\n type: 'object',\n}\n\n/** Pre-built schema payload for Transfer validation. */\nconst transferPayloadJsonSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes {@link TransferPayloadJsonSchema} for registry-based validation. */\nexport const TransferPayloadJsonSchemaPayload = transferPayloadJsonSchemaBuilder\n .fields({ definition: TransferPayloadJsonSchema }).build()\n"],
|
|
5
|
-
"mappings": ";AAAA,SAAS,cAAc,iBAAiB;AAExC;AAAA,EACE;AAAA,EAAwB;AAAA,EAAwB;AAAA,EAChD;AAAA,EAAgB;AAAA,OACX;;;ACGA,IAAM,oBAAoB,CAAC,aAAyC;AACzE,MAAI,OAAO,aAAa,SAAU,QAAO,CAAC,QAAQ;AAClD,MAAI,CAAC,MAAM,QAAQ,QAAQ,EAAG,QAAO,CAAC;AACtC,SAAO,SAAS,OAAO,CAAC,SAAyB,OAAO,SAAS,QAAQ;AAC3E;AAGO,IAAM,0BAA0B,IAClC,WAEH,CAAC,GAAG,IAAI,IAAI,OAAO,QAAQ,iBAAiB,CAAC,CAAC;;;ADLzC,IAAM,8BAAiE;AAAA,EAC5E,GAAG;AAAA,EACH,KAAK;AAAA,EACL,YAAY;AAAA,IACV,GAAG;AAAA,IACH,OAAO,EAAE,MAAM,UAAU;AAAA,IACzB,OAAO,EAAE,MAAM,UAAU,SAAS,aAAa,OAAO;AAAA,IACtD,UAAU;AAA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H,KAAK;AAAA,EACL,sBAAsB;AAAA,EACtB,YAAY;AAAA,IACV,GAAGA,mBAAkB;AAAA,IACrB,MAAM,EAAE,MAAM,UAAU,SAASC,iBAAgB,OAAO;AAAA,IACxD,OAAO,EAAE,MAAM,SAAS;AAAA,IACxB,WAAW;AAAA,MACT,MAAM;AAAA,MACN,eAAe,EAAE,SAASA,iBAAgB,OAAO;AAAA,MACjD,mBAAmB,EAAE,CAACA,iBAAgB,MAAM,GAAG,EAAE,MAAM,UAAU,SAASC,cAAa,OAAO,EAAE;AAAA,IAClG;AAAA,IACA,QAAQ,EAAE,MAAM,UAAU,SAAS,eAAe;AAAA,EACpD;AAAA,EAEA,UAAU,wBAAkCF,mBAAkB,UAAU,aAAa,OAAO;AAAA,EAC5F,MAAM;AACR;AAGA,IAAM,mCAAmC,IAAIG,gBAA8B,EAAE,QAAQC,cAAa,CAAC;AAE5F,IAAM,mCAAmC,iCAC7C,OAAO,EAAE,YAAY,0BAA0B,CAAC,EAAE,MAAM;",
|
|
6
|
-
"names": ["boundWitnessJsonSchema", "boundWitnessProperties", "BoundWitnessSchema", "PayloadBuilder", "SchemaSchema", "HashRegEx", "boundWitnessProperties", "BoundWitnessSchema", "boundWitnessJsonSchema", "PayloadBuilder", "SchemaSchema", "AddressRegEx", "boundWitnessJsonSchema", "BoundWitnessSchema", "PayloadBuilder", "SchemaSchema", "boundWitnessJsonSchema", "AddressRegEx", "BoundWitnessSchema", "PayloadBuilder", "SchemaSchema", "AddressRegEx", "boundWitnessJsonSchema", "BoundWitnessSchema", "PayloadBuilder", "SchemaSchema", "Uint256RegEx", "boundWitnessJsonSchema", "AddressRegEx", "Uint256RegEx", "BoundWitnessSchema", "PayloadBuilder", "SchemaSchema", "PayloadBuilder", "SchemaSchema", "XyoAddressRegEx", "XyoAddressRegEx", "PayloadBuilder", "SchemaSchema", "HashRegEx", "PayloadBuilder", "payloadJsonSchema", "SchemaSchema", "payloadJsonSchema", "HashRegEx", "PayloadBuilder", "SchemaSchema", "PayloadBuilder", "payloadJsonSchema", "SchemaSchema", "Uint256RegEx", "XyoAddressRegEx", "payloadJsonSchema", "XyoAddressRegEx", "Uint256RegEx", "PayloadBuilder", "SchemaSchema"]
|
|
3
|
+
"sources": ["../../src/modules/schema/boundwitness/BlockBoundWitness.ts", "../../src/modules/schema/mergeJsonSchemaRequired.ts", "../../src/modules/schema/boundwitness/BlockBoundWitnessWithStorageMeta.ts", "../../src/modules/schema/StorageMeta.ts", "../../src/modules/schema/boundwitness/TransactionBoundWitness.ts", "../../src/modules/schema/Executable.ts", "../../src/modules/schema/boundwitness/TransactionBoundWitnessWithStorageMeta.ts", "../../src/modules/schema/payload/ChainStakeIntent.ts", "../../src/modules/schema/payload/ClaimPayload.ts", "../../src/modules/schema/payload/HashPayload.ts", "../../src/modules/schema/payload/TransferPayload.ts"],
|
|
4
|
+
"sourcesContent": ["import { AddressRegEx, HashRegEx } from '@ariestools/sdk'\nimport type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n boundWitnessJsonSchema, boundWitnessProperties, BoundWitnessSchema,\n PayloadBuilder, SchemaSchema,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { BlockBoundWitness } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\n\n/** JSON schema for validating BlockBoundWitness payloads. */\nexport const BlockBoundWitnessJsonSchema: JSONSchemaType<BlockBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/block',\n properties: {\n ...boundWitnessProperties,\n block: { type: 'integer' },\n chain: { type: 'string', pattern: AddressRegEx.source },\n previous: {\n type: 'string', pattern: HashRegEx.source, nullable: true,\n },\n step_hashes: {\n items: { type: 'string', pattern: HashRegEx.source },\n type: 'array',\n },\n $epoch: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n\n required: mergeJsonSchemaRequired<BlockBoundWitness>(boundWitnessJsonSchema.required, 'block', 'chain', 'step_hashes', 'previous', '$epoch'),\n type: 'object',\n} as const\n\n/** Pre-built schema payload for BlockBoundWitness validation. */\nconst blockBoundWitnessSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes {@link BlockBoundWitnessJsonSchema} for registry-based validation. */\nexport const BlockBoundWitnessSchemaPayload = blockBoundWitnessSchemaBuilder\n .fields({ definition: BlockBoundWitnessJsonSchema }).build()\n", "import type { JSONSchemaType } from 'ajv'\n\n/**\n * Normalizes an AJV `required` value to a readonly string array.\n *\n * @param required Candidate value from a JSON-schema definition.\n * @returns The string itself as one item, its string array items, or an empty array.\n */\nexport const asRequiredStrings = (required: unknown): readonly string[] => {\n if (typeof required === 'string') return [required]\n if (!Array.isArray(required)) return []\n return required.filter((item): item is string => typeof item === 'string')\n}\n\n/** Merge JSON schema `required` arrays without spreading untyped sdk-js values. */\nexport const mergeJsonSchemaRequired = <T>(\n ...groups: readonly unknown[]\n): JSONSchemaType<T> extends { required: infer R } ? R : never => (\n [...new Set(groups.flatMap(asRequiredStrings))] as JSONSchemaType<T> extends { required: infer R } ? R : never\n)\n", "import type { SchemaPayload, WithStorageMeta } from '@xyo-network/sdk'\nimport {\n boundWitnessJsonSchema, boundWitnessProperties, BoundWitnessSchema,\n PayloadBuilder, SchemaSchema,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { BlockBoundWitness } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\nimport { StorageMetaJsonSchema } from '../StorageMeta.ts'\nimport { BlockBoundWitnessJsonSchema } from './BlockBoundWitness.ts'\n\n/** JSON schema for validating BlockBoundWitness payloads including storage metadata. */\nexport const BlockBoundWitnessWithStorageMetaJsonSchema: JSONSchemaType<WithStorageMeta<BlockBoundWitness>> = {\n $id: 'https://schemas.xyo.network/2.0/block-with-storage-meta',\n properties: {\n ...boundWitnessProperties,\n ...BlockBoundWitnessJsonSchema.properties,\n ...StorageMetaJsonSchema.properties,\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n\n required: mergeJsonSchemaRequired<WithStorageMeta<BlockBoundWitness>>(\n boundWitnessJsonSchema.required,\n BlockBoundWitnessJsonSchema.required,\n StorageMetaJsonSchema.required,\n ),\n type: 'object',\n} as const\n\n/** Pre-built schema payload for BlockBoundWitness with storage meta validation. */\nconst blockBoundWitnessWithStorageMetaSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes the storage-meta block definition for registry-based validation. */\nexport const BlockBoundWitnessWithStorageMetaSchemaPayload = blockBoundWitnessWithStorageMetaSchemaBuilder\n .fields({ definition: BlockBoundWitnessWithStorageMetaJsonSchema }).build()\n", "import { HashRegEx, HexRegEx } from '@ariestools/sdk'\nimport type { StorageMeta } from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\n/** JSON schema for validating storage metadata fields (_sequence, _hash, _dataHash). */\nexport const StorageMetaJsonSchema: JSONSchemaType<StorageMeta> = {\n $id: 'https://schemas.xyo.network/2.0/storage-meta',\n properties: {\n _sequence: { type: 'string', pattern: HexRegEx.source },\n _hash: { type: 'string', pattern: HashRegEx.source },\n _dataHash: { type: 'string', pattern: HashRegEx.source },\n },\n required: ['_sequence', '_hash', '_dataHash'],\n type: 'object',\n} as const\n", "import { AddressRegEx } from '@ariestools/sdk'\nimport type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n boundWitnessJsonSchema, BoundWitnessSchema,\n PayloadBuilder, SchemaSchema,\n Uint256RegEx, XyoAddressRegEx,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { TransactionBoundWitness } from '#protocol-lib'\n\nimport { ExecutableJsonSchema } from '../Executable.ts'\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\n\n/** JSON schema for validating TransactionBoundWitness payloads. */\nexport const TransactionBoundWitnessJsonSchema: JSONSchemaType<TransactionBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/transaction',\n additionalProperties: false,\n properties: {\n ...boundWitnessJsonSchema.properties,\n ...ExecutableJsonSchema.properties,\n chain: { type: 'string', pattern: AddressRegEx.source },\n fees: {\n type: 'object',\n properties: {\n base: { type: 'string', pattern: Uint256RegEx.source },\n gasLimit: { type: 'string', pattern: Uint256RegEx.source },\n gasPrice: { type: 'string', pattern: Uint256RegEx.source },\n priority: { type: 'string', pattern: Uint256RegEx.source },\n },\n required: ['base'],\n additionalProperties: false,\n },\n from: { type: 'string', pattern: XyoAddressRegEx.source },\n nbf: { type: 'integer' },\n exp: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n\n required: mergeJsonSchemaRequired<TransactionBoundWitness>(boundWitnessJsonSchema.required, 'chain', 'fees', 'nbf', 'exp'),\n type: 'object',\n} as const\n\n/** Pre-built schema payload for TransactionBoundWitness validation. */\nconst transactionBoundWitnessSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes {@link TransactionBoundWitnessJsonSchema} for registry-based validation. */\nexport const TransactionBoundWitnessSchemaPayload = transactionBoundWitnessSchemaBuilder\n .fields({ definition: TransactionBoundWitnessJsonSchema }).build()\n", "import type { JSONSchemaType } from 'ajv'\n\nimport type { Executable } from '#protocol-lib'\n\n/** JSON schema for validating Executable payloads containing elevation scripts. */\nexport const ExecutableJsonSchema: JSONSchemaType<Executable> = {\n $id: 'https://schemas.xyo.network/2.0/executable',\n additionalProperties: true,\n properties: { script: { items: { type: 'string', pattern: String.raw`^elevate\\|` }, type: 'array' } },\n required: ['script'],\n type: 'object',\n} as const\n", "import { AddressRegEx } from '@ariestools/sdk'\nimport type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n boundWitnessJsonSchema, BoundWitnessSchema,\n PayloadBuilder, SchemaSchema,\n Uint256RegEx,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { TransactionBoundWitness } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\nimport { StorageMetaJsonSchema } from '../StorageMeta.ts'\n\n/** JSON schema for validating TransactionBoundWitness payloads including storage metadata. */\nexport const TransactionBoundWitnessWithStorageMetaJsonSchema: JSONSchemaType<TransactionBoundWitness> = {\n ...boundWitnessJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/transaction-with-storage-meta',\n additionalProperties: false,\n properties: {\n ...boundWitnessJsonSchema.properties,\n ...StorageMetaJsonSchema.properties,\n chain: { type: 'string', pattern: AddressRegEx.source },\n gas: { type: 'string', pattern: Uint256RegEx.source },\n nbf: { type: 'integer' },\n exp: { type: 'integer' },\n schema: { type: 'string', pattern: BoundWitnessSchema },\n },\n\n required: mergeJsonSchemaRequired<TransactionBoundWitness>(boundWitnessJsonSchema.required, StorageMetaJsonSchema.required, 'chain', 'gas', 'nbf', 'exp'),\n type: 'object',\n} as const\n\n/** Pre-built schema payload for TransactionBoundWitness with storage meta validation. */\nconst transactionBoundWitnessWithStorageMetaSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes the storage-meta transaction definition for registry-based validation. */\nexport const TransactionBoundWitnessWithStorageMetaSchemaPayload = transactionBoundWitnessWithStorageMetaSchemaBuilder\n .fields({ definition: TransactionBoundWitnessWithStorageMetaJsonSchema }).build()\n", "import type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n PayloadBuilder, payloadJsonSchema, SchemaSchema, XyoAddressRegEx,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { ChainStakeIntent } from '#protocol-lib'\nimport { ChainStakeIntentSchema } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\n\n/** JSON schema for validating ChainStakeIntent payloads. */\nexport const ChainStakeIntentPayloadJsonSchema: JSONSchemaType<ChainStakeIntent> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/chain-stake-intent',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n from: { type: 'string', pattern: XyoAddressRegEx.source },\n intent: { type: 'string', enum: ['producer'] },\n schema: { type: 'string', pattern: ChainStakeIntentSchema },\n },\n\n required: mergeJsonSchemaRequired<ChainStakeIntent>(payloadJsonSchema.required, 'intent'),\n type: 'object',\n}\n\n/** Pre-built schema payload for ChainStakeIntent validation. */\nconst chainStakeIntentPayloadJsonSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes {@link ChainStakeIntentPayloadJsonSchema} for registry-based validation. */\nexport const ChainStakeIntentPayloadJsonSchemaPayload = chainStakeIntentPayloadJsonSchemaBuilder\n .fields({ definition: ChainStakeIntentPayloadJsonSchema }).build()\n", "import { HashRegEx } from '@ariestools/sdk'\nimport type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n PayloadBuilder, payloadJsonSchema, SchemaSchema,\n XyoAddressRegEx,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { Claim } from '#protocol-lib'\nimport { ClaimSchema, MAX_CLAIM_HASHES } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\n\n/** JSON schema for validating Claim payloads. */\nexport const ClaimPayloadJsonSchema: JSONSchemaType<Claim> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/statement-claim',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n hashes: {\n type: 'array',\n items: { type: 'string', pattern: HashRegEx.source },\n maxItems: MAX_CLAIM_HASHES,\n minItems: 1,\n uniqueItems: true,\n },\n schema: { type: 'string', pattern: ClaimSchema },\n source: { type: 'string', pattern: XyoAddressRegEx.source },\n },\n required: mergeJsonSchemaRequired<Claim>(payloadJsonSchema.required, 'source', 'hashes'),\n type: 'object',\n}\n\n/** Pre-built schema payload for Claim validation. */\nconst claimPayloadJsonSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes {@link ClaimPayloadJsonSchema} for registry-based validation. */\nexport const ClaimPayloadJsonSchemaPayload = claimPayloadJsonSchemaBuilder\n .fields({ definition: ClaimPayloadJsonSchema }).build()\n", "import { HashRegEx } from '@ariestools/sdk'\nimport type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n PayloadBuilder, payloadJsonSchema, SchemaSchema,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { HashPayload } from '#protocol-lib'\nimport { HashSchema } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\n\n/** JSON schema for validating Hash payloads. */\nexport const HashPayloadJsonSchema: JSONSchemaType<HashPayload> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/hash',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n hash: { type: 'string', pattern: HashRegEx.source },\n schema: { type: 'string', pattern: HashSchema },\n },\n\n required: mergeJsonSchemaRequired<HashPayload>(payloadJsonSchema.required, 'hash'),\n type: 'object',\n}\n\n/** Pre-built schema payload for Hash validation. */\nconst hashPayloadJsonSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes {@link HashPayloadJsonSchema} for registry-based validation. */\nexport const HashPayloadJsonSchemaPayload = hashPayloadJsonSchemaBuilder\n .fields({ definition: HashPayloadJsonSchema }).build()\n", "import type { SchemaPayload } from '@xyo-network/sdk'\nimport {\n PayloadBuilder, payloadJsonSchema, SchemaSchema,\n Uint256RegEx, XyoAddressRegEx,\n} from '@xyo-network/sdk'\nimport type { JSONSchemaType } from 'ajv'\n\nimport type { Transfer } from '#protocol-lib'\nimport { TransferSchema } from '#protocol-lib'\n\nimport { mergeJsonSchemaRequired } from '../mergeJsonSchemaRequired.ts'\n\n/** JSON schema for validating Transfer payloads. */\nexport const TransferPayloadJsonSchema: JSONSchemaType<Transfer> = {\n ...payloadJsonSchema,\n $id: 'https://schemas.xyo.network/2.0/payload/transfer',\n additionalProperties: false,\n properties: {\n ...payloadJsonSchema.properties,\n from: { type: 'string', pattern: XyoAddressRegEx.source },\n epoch: { type: 'number' },\n transfers: {\n type: 'object',\n propertyNames: { pattern: XyoAddressRegEx.source },\n patternProperties: { [XyoAddressRegEx.source]: { type: 'string', pattern: Uint256RegEx.source } },\n },\n schema: { type: 'string', pattern: TransferSchema },\n },\n\n required: mergeJsonSchemaRequired<Transfer>(payloadJsonSchema.required, 'transfers', 'epoch'),\n type: 'object',\n}\n\n/** Pre-built schema payload for Transfer validation. */\nconst transferPayloadJsonSchemaBuilder = new PayloadBuilder<SchemaPayload>({ schema: SchemaSchema })\n/** Schema payload that publishes {@link TransferPayloadJsonSchema} for registry-based validation. */\nexport const TransferPayloadJsonSchemaPayload = transferPayloadJsonSchemaBuilder\n .fields({ definition: TransferPayloadJsonSchema }).build()\n"],
|
|
5
|
+
"mappings": ";AAAA,SAAS,cAAc,iBAAiB;AAExC;AAAA,EACE;AAAA,EAAwB;AAAA,EAAwB;AAAA,EAChD;AAAA,EAAgB;AAAA,OACX;;;ACGA,IAAM,oBAAoB,CAAC,aAAyC;AACzE,MAAI,OAAO,aAAa,SAAU,QAAO,CAAC,QAAQ;AAClD,MAAI,CAAC,MAAM,QAAQ,QAAQ,EAAG,QAAO,CAAC;AACtC,SAAO,SAAS,OAAO,CAAC,SAAyB,OAAO,SAAS,QAAQ;AAC3E;AAGO,IAAM,0BAA0B,IAClC,WAEH,CAAC,GAAG,IAAI,IAAI,OAAO,QAAQ,iBAAiB,CAAC,CAAC;;;ADLzC,IAAM,8BAAiE;AAAA,EAC5E,GAAG;AAAA,EACH,KAAK;AAAA,EACL,YAAY;AAAA,IACV,GAAG;AAAA,IACH,OAAO,EAAE,MAAM,UAAU;AAAA,IACzB,OAAO,EAAE,MAAM,UAAU,SAAS,aAAa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F,mBAAkB,UAAU,aAAa,OAAO;AAAA,EAC5F,MAAM;AACR;AAGA,IAAM,mCAAmC,IAAIG,gBAA8B,EAAE,QAAQC,cAAa,CAAC;AAE5F,IAAM,mCAAmC,iCAC7C,OAAO,EAAE,YAAY,0BAA0B,CAAC,EAAE,MAAM;",
|
|
6
|
+
"names": ["boundWitnessJsonSchema", "boundWitnessProperties", "BoundWitnessSchema", "PayloadBuilder", "SchemaSchema", "HashRegEx", "boundWitnessProperties", "BoundWitnessSchema", "boundWitnessJsonSchema", "PayloadBuilder", "SchemaSchema", "AddressRegEx", "boundWitnessJsonSchema", "BoundWitnessSchema", "PayloadBuilder", "SchemaSchema", "boundWitnessJsonSchema", "AddressRegEx", "BoundWitnessSchema", "PayloadBuilder", "SchemaSchema", "AddressRegEx", "boundWitnessJsonSchema", "BoundWitnessSchema", "PayloadBuilder", "SchemaSchema", "Uint256RegEx", "boundWitnessJsonSchema", "AddressRegEx", "Uint256RegEx", "BoundWitnessSchema", "PayloadBuilder", "SchemaSchema", "PayloadBuilder", "SchemaSchema", "XyoAddressRegEx", "XyoAddressRegEx", "PayloadBuilder", "SchemaSchema", "HashRegEx", "PayloadBuilder", "payloadJsonSchema", "SchemaSchema", "XyoAddressRegEx", "payloadJsonSchema", "HashRegEx", "XyoAddressRegEx", "PayloadBuilder", "SchemaSchema", "HashRegEx", "PayloadBuilder", "payloadJsonSchema", "SchemaSchema", "payloadJsonSchema", "HashRegEx", "PayloadBuilder", "SchemaSchema", "PayloadBuilder", "payloadJsonSchema", "SchemaSchema", "Uint256RegEx", "XyoAddressRegEx", "payloadJsonSchema", "XyoAddressRegEx", "Uint256RegEx", "PayloadBuilder", "SchemaSchema"]
|
|
7
7
|
}
|