@xyo-network/xl1-protocol 1.14.9 → 1.14.11
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/index.mjs +133 -187
- package/dist/neutral/index.mjs.map +1 -1
- package/dist/neutral/zod/BlockBoundWitness.d.ts +36 -36
- package/dist/neutral/zod/BlockBoundWitness.d.ts.map +1 -1
- package/dist/neutral/zod/HydratedBlock.d.ts +19 -19
- package/dist/neutral/zod/HydratedTransaction.d.ts +792 -926
- package/dist/neutral/zod/HydratedTransaction.d.ts.map +1 -1
- package/dist/neutral/zod/TransactionBoundWitness.d.ts +36 -36
- package/dist/neutral/zod/TransactionBoundWitness.d.ts.map +1 -1
- package/dist/neutral/zod/index.d.ts +0 -1
- package/dist/neutral/zod/index.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/zod/BlockBoundWitness.ts +3 -5
- package/src/zod/HydratedTransaction.ts +5 -20
- package/src/zod/TransactionBoundWitness.ts +3 -3
- package/src/zod/index.ts +0 -1
- package/dist/neutral/zod/BoundWitness.d.ts +0 -111
- package/dist/neutral/zod/BoundWitness.d.ts.map +0 -1
- package/src/zod/BoundWitness.ts +0 -58
package/src/zod/BoundWitness.ts
DELETED
|
@@ -1,58 +0,0 @@
|
|
|
1
|
-
import {
|
|
2
|
-
AddressZod, HashZod, HexZod,
|
|
3
|
-
} from '@xylabs/sdk-js'
|
|
4
|
-
import { BoundWitnessSchema } from '@xyo-network/boundwitness-model'
|
|
5
|
-
import {
|
|
6
|
-
PayloadZod, SchemaZod, StorageMetaZod,
|
|
7
|
-
} from '@xyo-network/payload-model'
|
|
8
|
-
import * as z from 'zod'
|
|
9
|
-
|
|
10
|
-
const BoundWitnessRequiredFieldsZod = z.object({
|
|
11
|
-
addresses: z.array(AddressZod),
|
|
12
|
-
payload_hashes: z.array(HashZod),
|
|
13
|
-
payload_schemas: z.array(SchemaZod),
|
|
14
|
-
previous_hashes: z.array(HashZod.nullable()),
|
|
15
|
-
})
|
|
16
|
-
|
|
17
|
-
const BoundWitnessMetaZod = z.object({
|
|
18
|
-
$destination: AddressZod.optional(),
|
|
19
|
-
$sourceQuery: HashZod.optional(),
|
|
20
|
-
$signatures: z.array(z.union([HexZod, z.null()])),
|
|
21
|
-
})
|
|
22
|
-
|
|
23
|
-
export const BoundWitnessZod = PayloadZod
|
|
24
|
-
.safeExtend({ schema: z.literal(BoundWitnessSchema) })
|
|
25
|
-
.safeExtend(BoundWitnessRequiredFieldsZod.shape)
|
|
26
|
-
.safeExtend(BoundWitnessMetaZod.shape)
|
|
27
|
-
|
|
28
|
-
export type BoundWitness = z.infer<typeof BoundWitnessZod>
|
|
29
|
-
|
|
30
|
-
export const AnyBoundWitnessZod = BoundWitnessZod
|
|
31
|
-
.catchall(z.any())
|
|
32
|
-
|
|
33
|
-
export type AnyBoundWitness = z.infer<typeof AnyBoundWitnessZod>
|
|
34
|
-
|
|
35
|
-
export const UnsignedBoundWitnessZod = BoundWitnessZod.refine(data => data.$signatures.includes(null), { message: 'all $signatures must be null' })
|
|
36
|
-
|
|
37
|
-
export type UnsignedBoundWitness = z.infer<typeof UnsignedBoundWitnessZod>
|
|
38
|
-
|
|
39
|
-
export const AnyUnsignedBoundWitnessZod = UnsignedBoundWitnessZod
|
|
40
|
-
.catchall(z.any())
|
|
41
|
-
|
|
42
|
-
export type AnyUnsignedBoundWitness = z.infer<typeof AnyUnsignedBoundWitnessZod>
|
|
43
|
-
|
|
44
|
-
export const UnsignedBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessZod
|
|
45
|
-
.safeExtend(BoundWitnessRequiredFieldsZod.shape)
|
|
46
|
-
.safeExtend(BoundWitnessMetaZod.shape)
|
|
47
|
-
.safeExtend(StorageMetaZod.shape)
|
|
48
|
-
|
|
49
|
-
export const SignedZod = z.object({ $signatures: z.array(HexZod) })
|
|
50
|
-
export const UnsignedZod = z.object({ $signatures: z.array(z.null()) })
|
|
51
|
-
|
|
52
|
-
export const SignedBoundWitnessZod = BoundWitnessZod.refine(data => !data.$signatures.includes(null), { message: 'all $signatures must not be null' })
|
|
53
|
-
|
|
54
|
-
export const SignedBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessWithStorageMetaZod
|
|
55
|
-
|
|
56
|
-
export const AnySignedBoundWitnessZod = UnsignedBoundWitnessZod.catchall(z.any())
|
|
57
|
-
|
|
58
|
-
export const AnySignedBoundWitnessWithStorageMetaZod = UnsignedBoundWitnessWithStorageMetaZod.catchall(z.any())
|