@xyo-network/xns-record-payload-plugins 4.2.0 → 5.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (44) hide show
  1. package/dist/browser/DNS/Witness/Payload/Request.d.ts +2 -2
  2. package/dist/browser/DNS/Witness/Payload/Request.d.ts.map +1 -1
  3. package/dist/browser/DNS/Witness/Payload/Response.d.ts +2 -2
  4. package/dist/browser/DNS/Witness/Payload/Response.d.ts.map +1 -1
  5. package/dist/browser/Domain/Domain.d.ts +2 -2
  6. package/dist/browser/Domain/Domain.d.ts.map +1 -1
  7. package/dist/browser/Domain/DomainLease.d.ts +2 -2
  8. package/dist/browser/Domain/DomainLease.d.ts.map +1 -1
  9. package/dist/browser/DomainRegistration/DomainRegistration.d.ts +2 -2
  10. package/dist/browser/DomainRegistration/DomainRegistration.d.ts.map +1 -1
  11. package/dist/browser/DomainRegistration/DomainRegistrationLease.d.ts +2 -2
  12. package/dist/browser/DomainRegistration/DomainRegistrationLease.d.ts.map +1 -1
  13. package/dist/neutral/DNS/Witness/Payload/Request.d.ts +2 -2
  14. package/dist/neutral/DNS/Witness/Payload/Request.d.ts.map +1 -1
  15. package/dist/neutral/DNS/Witness/Payload/Response.d.ts +2 -2
  16. package/dist/neutral/DNS/Witness/Payload/Response.d.ts.map +1 -1
  17. package/dist/neutral/Domain/Domain.d.ts +2 -2
  18. package/dist/neutral/Domain/Domain.d.ts.map +1 -1
  19. package/dist/neutral/Domain/DomainLease.d.ts +2 -2
  20. package/dist/neutral/Domain/DomainLease.d.ts.map +1 -1
  21. package/dist/neutral/DomainRegistration/DomainRegistration.d.ts +2 -2
  22. package/dist/neutral/DomainRegistration/DomainRegistration.d.ts.map +1 -1
  23. package/dist/neutral/DomainRegistration/DomainRegistrationLease.d.ts +2 -2
  24. package/dist/neutral/DomainRegistration/DomainRegistrationLease.d.ts.map +1 -1
  25. package/dist/node/DNS/Witness/Payload/Request.d.ts +2 -2
  26. package/dist/node/DNS/Witness/Payload/Request.d.ts.map +1 -1
  27. package/dist/node/DNS/Witness/Payload/Response.d.ts +2 -2
  28. package/dist/node/DNS/Witness/Payload/Response.d.ts.map +1 -1
  29. package/dist/node/Domain/Domain.d.ts +2 -2
  30. package/dist/node/Domain/Domain.d.ts.map +1 -1
  31. package/dist/node/Domain/DomainLease.d.ts +2 -2
  32. package/dist/node/Domain/DomainLease.d.ts.map +1 -1
  33. package/dist/node/DomainRegistration/DomainRegistration.d.ts +2 -2
  34. package/dist/node/DomainRegistration/DomainRegistration.d.ts.map +1 -1
  35. package/dist/node/DomainRegistration/DomainRegistrationLease.d.ts +2 -2
  36. package/dist/node/DomainRegistration/DomainRegistrationLease.d.ts.map +1 -1
  37. package/package.json +25 -21
  38. package/src/Duration/validation/spec/validateBoundWitness.spec.ts +46 -0
  39. package/src/Duration/validation/spec/validateBoundWitnessWithRecord.spec.ts +49 -0
  40. package/src/Duration/validation/spec/validateNameserverRecord.spec.ts +61 -0
  41. package/src/Duration/validation/spec/validateRecord.spec.ts +37 -0
  42. package/src/diviner/lib/spec/__snapshots__/parseEstimatesFromArray.spec.ts.snap +481 -0
  43. package/src/diviner/lib/spec/parseEstimatesFromArray.spec.ts +116 -0
  44. package/typedoc.json +0 -5
@@ -0,0 +1,49 @@
1
+ import '@xylabs/vitest-extended'
2
+
3
+ import type { Hash } from '@xylabs/hex'
4
+ import { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
5
+ import type { BoundWitness } from '@xyo-network/boundwitness-model'
6
+ import type { Payload } from '@xyo-network/payload-model'
7
+ import { HDWallet } from '@xyo-network/wallet'
8
+ import type { WalletInstance } from '@xyo-network/wallet-model'
9
+ import {
10
+ beforeAll, describe, expect, it,
11
+ } from 'vitest'
12
+
13
+ import type { DurationFields } from '../../Duration.ts'
14
+ import { validateBoundWitnessAndDuration } from '../validateBoundWitnessAndDuration.ts'
15
+
16
+ describe('validateBoundWitnessAndDuration', () => {
17
+ let nameServer: WalletInstance
18
+ let domainOwner: WalletInstance
19
+ let recordBw: BoundWitness
20
+ let recordPayload: Payload<DurationFields>
21
+ const schema = 'network.xyo.test'
22
+ beforeAll(async () => {
23
+ nameServer = await HDWallet.fromPhrase('camp notable brick vast absent express leader safe obey crater yard gun multiply crouch devote')
24
+ domainOwner = await HDWallet.fromPhrase('carbon donate rib engage earth vibrant cover fruit way hair poverty grunt fish husband initial')
25
+ const delegation = {
26
+ domain: 'foo.xyo',
27
+ exp: Date.now() + 1_000_000,
28
+ nameServer: nameServer.address,
29
+ nbf: Date.now(),
30
+ schema,
31
+ }
32
+ const [bw] = await new BoundWitnessBuilder().payload(delegation).signer(domainOwner).build()
33
+ recordBw = bw
34
+ recordPayload = delegation
35
+ })
36
+ describe('returns true', () => {
37
+ it('with valid boundwitness', async () => {
38
+ expect(await validateBoundWitnessAndDuration(recordBw, recordPayload)).toBeTrue()
39
+ })
40
+ })
41
+ describe('returns false', () => {
42
+ it('with invalid boundwitness', async () => {
43
+ const invalidHash = '0440a9ee15736ba6e6618083da25a57f5e9d8a516e61b9b2ae330f050f88f2de' as Hash
44
+ const payload_hashes = [invalidHash]
45
+ const invalid = { ...recordBw, payload_hashes }
46
+ expect(await validateBoundWitnessAndDuration(invalid, recordPayload)).toBeFalse()
47
+ })
48
+ })
49
+ })
@@ -0,0 +1,61 @@
1
+ import '@xylabs/vitest-extended'
2
+
3
+ import type { Hash } from '@xylabs/hex'
4
+ import { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'
5
+ import type { BoundWitness } from '@xyo-network/boundwitness-model'
6
+ import type { Payload } from '@xyo-network/payload-model'
7
+ import { HDWallet } from '@xyo-network/wallet'
8
+ import type { WalletInstance } from '@xyo-network/wallet-model'
9
+ import {
10
+ beforeAll,
11
+ describe, expect, it,
12
+ } from 'vitest'
13
+
14
+ import type { DurationFields } from '../../Duration.ts'
15
+ import { validateBoundWitnessWithDuration } from '../validateBoundWitnessWithDuration.ts'
16
+
17
+ describe('validateBoundWitnessWithDuration', () => {
18
+ let nameserver: WalletInstance
19
+ let domainOwner: WalletInstance
20
+ let recordBw: BoundWitness
21
+ let recordPayload: Payload<DurationFields>
22
+ const schema = 'network.xyo.test'
23
+ beforeAll(async () => {
24
+ nameserver = await HDWallet.fromPhrase('camp notable brick vast absent express leader safe obey crater yard gun multiply crouch devote')
25
+ domainOwner = await HDWallet.fromPhrase('carbon donate rib engage earth vibrant cover fruit way hair poverty grunt fish husband initial')
26
+ const delegation = {
27
+ domain: 'foo.xyo',
28
+ exp: Date.now() + 1_000_000,
29
+ nameserver: nameserver.address,
30
+ nbf: Date.now(),
31
+ schema,
32
+ }
33
+ const [bw] = await new BoundWitnessBuilder().payload(delegation).signer(domainOwner).build()
34
+ recordBw = bw
35
+ recordPayload = delegation
36
+ })
37
+ describe('returns true', () => {
38
+ it('with valid boundwitness', async () => {
39
+ expect(await validateBoundWitnessWithDuration(recordBw, recordPayload)).toBeTrue()
40
+ })
41
+ })
42
+ describe('returns false', () => {
43
+ it('with invalid boundwitness', async () => {
44
+ const invalidHash = '0440a9ee15736ba6e6618083da25a57f5e9d8a516e61b9b2ae330f050f88f2de' as Hash
45
+ const payload_hashes = [invalidHash]
46
+ const invalid = { ...recordBw, payload_hashes }
47
+ expect(await validateBoundWitnessWithDuration(invalid, recordPayload)).toBeFalse()
48
+ })
49
+ it('with invalid payload', async () => {
50
+ const invalidPayload = {
51
+ domain: 'foo.xyo',
52
+ exp: Date.now() - 10_000,
53
+ nameserver: 'not_a_valid_address',
54
+ nbf: Date.now() + 10_000,
55
+ schema,
56
+ } as Payload<DurationFields>
57
+ const [bw] = await new BoundWitnessBuilder().payload(invalidPayload).signer(domainOwner).build()
58
+ expect(await validateBoundWitnessWithDuration(bw, invalidPayload)).toBeFalse()
59
+ })
60
+ })
61
+ })
@@ -0,0 +1,37 @@
1
+ import '@xylabs/vitest-extended'
2
+
3
+ import type { Payload } from '@xyo-network/payload-model'
4
+ import {
5
+ describe, expect, it,
6
+ } from 'vitest'
7
+
8
+ import type { DurationFields } from '../../Duration.ts'
9
+ import { validateDuration } from '../validateDuration.ts'
10
+
11
+ describe('validateRecord', () => {
12
+ const schema = 'network.xyo.test'
13
+ const recordPayload = {
14
+ domain: 'foo.xyo',
15
+ exp: Date.now() + 1_000_000,
16
+ nameserver: ['e007fb034344d8e559b224156fe08627e5c8ea1c'],
17
+ nbf: Date.now(),
18
+ schema,
19
+ }
20
+ describe('returns true', () => {
21
+ it('with valid record', () => {
22
+ expect(validateDuration(recordPayload)).toBeTrue()
23
+ })
24
+ })
25
+ describe('returns false', () => {
26
+ describe('with invalid time range', () => {
27
+ it('when current time is before nbf', () => {
28
+ const payload: Payload<DurationFields> = { ...recordPayload, nbf: Date.now() + 10_000 }
29
+ expect(validateDuration(payload)).toBeFalse()
30
+ })
31
+ it('when current time is after exp', () => {
32
+ const payload: Payload<DurationFields> = { ...recordPayload, exp: Date.now() - 1 }
33
+ expect(validateDuration(payload)).toBeFalse()
34
+ })
35
+ })
36
+ })
37
+ })
@@ -0,0 +1,481 @@
1
+ // Vitest Snapshot v1, https://vitest.dev/guide/snapshot.html
2
+
3
+ exports[`parseEstimatesFromArray > with valid jagged data > parses estimates from array 1`] = `[]`;
4
+
5
+ exports[`parseEstimatesFromArray > with valid jagged data > parses estimates from array 2`] = `[]`;
6
+
7
+ exports[`parseEstimatesFromArray > with valid jagged data > parses estimates from array 3`] = `
8
+ [
9
+ [
10
+ {
11
+ "$signatures": [
12
+ "91519424f721376751b19865433ff80e3d47b2a59be6f7478e7e003e0366ccc730c1dd7eeaa642ced9e78a40c5a5a3ab33044a6d620f5a4467dfbd0e2d9dc4d8",
13
+ ],
14
+ "addresses": [
15
+ "9146761e29463d783e28161848feeeb43196227b",
16
+ ],
17
+ "payload_hashes": [
18
+ "abb7ecb2cfc51e1a95f85477b3a4210a72886d5b22fcf32043736c48e2873f2c",
19
+ "3ed825d48507b899395ca943e1dd6ec9a7c948e1cd1573a6cfda66de83af4b11",
20
+ ],
21
+ "payload_schemas": [
22
+ "network.xyo.hash.lease.estimate",
23
+ "network.xyo.ns.domain.registration.lease",
24
+ ],
25
+ "previous_hashes": [
26
+ null,
27
+ ],
28
+ "schema": "network.xyo.boundwitness",
29
+ },
30
+ {
31
+ "$sources": [
32
+ "90259bc9ecde9d4c0061bc92dbfcf32e0f7b2603e49443d9f3c67a6d7e82c7d5",
33
+ ],
34
+ "currency": "USD",
35
+ "exp": 1725225514773,
36
+ "nbf": 1724966314773,
37
+ "price": 16,
38
+ "schema": "network.xyo.hash.lease.estimate",
39
+ },
40
+ {
41
+ "$sources": [
42
+ "407ed63c0c36fadae7ae8d16a42b678551e0ea6aa5357b76f0ffc1bce3ba2f22",
43
+ "ced04c0a3f65bbefde58ba0d15767fcee20b6e25d3820f90c55f44f18effa70f",
44
+ ],
45
+ "domain": "testb88a0ee2-9665-48b3-b9c6-047eadc475ee",
46
+ "exp": 1756502314773,
47
+ "nbf": 1724966314773,
48
+ "registrant": [
49
+ "1b2c45910fb0d32cb1d1cd010cbc594bf05969b5",
50
+ ],
51
+ "registrar": [
52
+ "846c35ce6ec62e4608a1215e14b5b16471904153",
53
+ ],
54
+ "schema": "network.xyo.ns.domain.registration.lease",
55
+ "tld": "xyo",
56
+ },
57
+ ],
58
+ ]
59
+ `;
60
+
61
+ exports[`parseEstimatesFromArray > with valid jagged data > parses estimates from array 4`] = `
62
+ [
63
+ [
64
+ {
65
+ "$signatures": [
66
+ "2a59fea264bf71603f9908ac557cf5816ddd1898ce26a2cbb8081195cf5a19381bf42cc2e583a9a2a768dc324c6ac1344eb4ec06f41b19b06970734b30340226",
67
+ ],
68
+ "addresses": [
69
+ "ce5ba87678f8b5e2d0dbccf2fabff65f79191f73",
70
+ ],
71
+ "payload_hashes": [
72
+ "49699c9d1cfb1a8643037c9557123a9e643a3dd938f619af39b94966ecfdd6ff",
73
+ "af31f9d6afd8f7cbbe5c3310f2a2da9e1af31d1b7cf8dae7d9786848de1e5bd7",
74
+ ],
75
+ "payload_schemas": [
76
+ "network.xyo.hash.lease.estimate",
77
+ "network.xyo.ns.domain.registration.lease",
78
+ ],
79
+ "previous_hashes": [
80
+ null,
81
+ ],
82
+ "schema": "network.xyo.boundwitness",
83
+ },
84
+ {
85
+ "$sources": [
86
+ "dcc7ab18c86d90311bb1b59361f6698e2714294a91aa3126c554aa8483a7ae37",
87
+ ],
88
+ "currency": "USD",
89
+ "exp": 1725225427392,
90
+ "nbf": 1724966227392,
91
+ "price": 16,
92
+ "schema": "network.xyo.hash.lease.estimate",
93
+ },
94
+ {
95
+ "$sources": [
96
+ "fccd06633e70c2168c8eb0eb5e25b22e34c1c417a46d5073034ec977dfc1995d",
97
+ "d7f40698fb0b0261834ef694ed275b4e6547e329cedc1c56708f098a5608b93a",
98
+ ],
99
+ "domain": "test8446e171-46ca-47d5-a3b7-1a658cb7f451",
100
+ "exp": 1756502227392,
101
+ "nbf": 1724966227392,
102
+ "registrant": [
103
+ "1b2c45910fb0d32cb1d1cd010cbc594bf05969b5",
104
+ ],
105
+ "registrar": [
106
+ "846c35ce6ec62e4608a1215e14b5b16471904153",
107
+ ],
108
+ "schema": "network.xyo.ns.domain.registration.lease",
109
+ "tld": "xyo",
110
+ },
111
+ ],
112
+ ]
113
+ `;
114
+
115
+ exports[`parseEstimatesFromArray > with valid jagged data > parses estimates from array 5`] = `
116
+ [
117
+ [
118
+ {
119
+ "$signatures": [
120
+ "91519424f721376751b19865433ff80e3d47b2a59be6f7478e7e003e0366ccc730c1dd7eeaa642ced9e78a40c5a5a3ab33044a6d620f5a4467dfbd0e2d9dc4d8",
121
+ ],
122
+ "addresses": [
123
+ "9146761e29463d783e28161848feeeb43196227b",
124
+ ],
125
+ "payload_hashes": [
126
+ "abb7ecb2cfc51e1a95f85477b3a4210a72886d5b22fcf32043736c48e2873f2c",
127
+ "3ed825d48507b899395ca943e1dd6ec9a7c948e1cd1573a6cfda66de83af4b11",
128
+ ],
129
+ "payload_schemas": [
130
+ "network.xyo.hash.lease.estimate",
131
+ "network.xyo.ns.domain.registration.lease",
132
+ ],
133
+ "previous_hashes": [
134
+ null,
135
+ ],
136
+ "schema": "network.xyo.boundwitness",
137
+ },
138
+ {
139
+ "$sources": [
140
+ "90259bc9ecde9d4c0061bc92dbfcf32e0f7b2603e49443d9f3c67a6d7e82c7d5",
141
+ ],
142
+ "currency": "USD",
143
+ "exp": 1725225514773,
144
+ "nbf": 1724966314773,
145
+ "price": 16,
146
+ "schema": "network.xyo.hash.lease.estimate",
147
+ },
148
+ {
149
+ "$sources": [
150
+ "407ed63c0c36fadae7ae8d16a42b678551e0ea6aa5357b76f0ffc1bce3ba2f22",
151
+ "ced04c0a3f65bbefde58ba0d15767fcee20b6e25d3820f90c55f44f18effa70f",
152
+ ],
153
+ "domain": "testb88a0ee2-9665-48b3-b9c6-047eadc475ee",
154
+ "exp": 1756502314773,
155
+ "nbf": 1724966314773,
156
+ "registrant": [
157
+ "1b2c45910fb0d32cb1d1cd010cbc594bf05969b5",
158
+ ],
159
+ "registrar": [
160
+ "846c35ce6ec62e4608a1215e14b5b16471904153",
161
+ ],
162
+ "schema": "network.xyo.ns.domain.registration.lease",
163
+ "tld": "xyo",
164
+ },
165
+ ],
166
+ ]
167
+ `;
168
+
169
+ exports[`parseEstimatesFromArray > with valid symmetric data > parses estimates from array 1`] = `
170
+ [
171
+ [
172
+ {
173
+ "$signatures": [
174
+ "2a59fea264bf71603f9908ac557cf5816ddd1898ce26a2cbb8081195cf5a19381bf42cc2e583a9a2a768dc324c6ac1344eb4ec06f41b19b06970734b30340226",
175
+ ],
176
+ "addresses": [
177
+ "ce5ba87678f8b5e2d0dbccf2fabff65f79191f73",
178
+ ],
179
+ "payload_hashes": [
180
+ "49699c9d1cfb1a8643037c9557123a9e643a3dd938f619af39b94966ecfdd6ff",
181
+ "af31f9d6afd8f7cbbe5c3310f2a2da9e1af31d1b7cf8dae7d9786848de1e5bd7",
182
+ ],
183
+ "payload_schemas": [
184
+ "network.xyo.hash.lease.estimate",
185
+ "network.xyo.ns.domain.registration.lease",
186
+ ],
187
+ "previous_hashes": [
188
+ null,
189
+ ],
190
+ "schema": "network.xyo.boundwitness",
191
+ },
192
+ {
193
+ "$sources": [
194
+ "dcc7ab18c86d90311bb1b59361f6698e2714294a91aa3126c554aa8483a7ae37",
195
+ ],
196
+ "currency": "USD",
197
+ "exp": 1725225427392,
198
+ "nbf": 1724966227392,
199
+ "price": 16,
200
+ "schema": "network.xyo.hash.lease.estimate",
201
+ },
202
+ {
203
+ "$sources": [
204
+ "fccd06633e70c2168c8eb0eb5e25b22e34c1c417a46d5073034ec977dfc1995d",
205
+ "d7f40698fb0b0261834ef694ed275b4e6547e329cedc1c56708f098a5608b93a",
206
+ ],
207
+ "domain": "test8446e171-46ca-47d5-a3b7-1a658cb7f451",
208
+ "exp": 1756502227392,
209
+ "nbf": 1724966227392,
210
+ "registrant": [
211
+ "1b2c45910fb0d32cb1d1cd010cbc594bf05969b5",
212
+ ],
213
+ "registrar": [
214
+ "846c35ce6ec62e4608a1215e14b5b16471904153",
215
+ ],
216
+ "schema": "network.xyo.ns.domain.registration.lease",
217
+ "tld": "xyo",
218
+ },
219
+ ],
220
+ ]
221
+ `;
222
+
223
+ exports[`parseEstimatesFromArray > with valid symmetric data > parses estimates from array 2`] = `
224
+ [
225
+ [
226
+ {
227
+ "$signatures": [
228
+ "91519424f721376751b19865433ff80e3d47b2a59be6f7478e7e003e0366ccc730c1dd7eeaa642ced9e78a40c5a5a3ab33044a6d620f5a4467dfbd0e2d9dc4d8",
229
+ ],
230
+ "addresses": [
231
+ "9146761e29463d783e28161848feeeb43196227b",
232
+ ],
233
+ "payload_hashes": [
234
+ "abb7ecb2cfc51e1a95f85477b3a4210a72886d5b22fcf32043736c48e2873f2c",
235
+ "3ed825d48507b899395ca943e1dd6ec9a7c948e1cd1573a6cfda66de83af4b11",
236
+ ],
237
+ "payload_schemas": [
238
+ "network.xyo.hash.lease.estimate",
239
+ "network.xyo.ns.domain.registration.lease",
240
+ ],
241
+ "previous_hashes": [
242
+ null,
243
+ ],
244
+ "schema": "network.xyo.boundwitness",
245
+ },
246
+ {
247
+ "$sources": [
248
+ "90259bc9ecde9d4c0061bc92dbfcf32e0f7b2603e49443d9f3c67a6d7e82c7d5",
249
+ ],
250
+ "currency": "USD",
251
+ "exp": 1725225514773,
252
+ "nbf": 1724966314773,
253
+ "price": 16,
254
+ "schema": "network.xyo.hash.lease.estimate",
255
+ },
256
+ {
257
+ "$sources": [
258
+ "407ed63c0c36fadae7ae8d16a42b678551e0ea6aa5357b76f0ffc1bce3ba2f22",
259
+ "ced04c0a3f65bbefde58ba0d15767fcee20b6e25d3820f90c55f44f18effa70f",
260
+ ],
261
+ "domain": "testb88a0ee2-9665-48b3-b9c6-047eadc475ee",
262
+ "exp": 1756502314773,
263
+ "nbf": 1724966314773,
264
+ "registrant": [
265
+ "1b2c45910fb0d32cb1d1cd010cbc594bf05969b5",
266
+ ],
267
+ "registrar": [
268
+ "846c35ce6ec62e4608a1215e14b5b16471904153",
269
+ ],
270
+ "schema": "network.xyo.ns.domain.registration.lease",
271
+ "tld": "xyo",
272
+ },
273
+ ],
274
+ ]
275
+ `;
276
+
277
+ exports[`parseEstimatesFromArray > with valid symmetric data > parses estimates from array 3`] = `
278
+ [
279
+ [
280
+ {
281
+ "$signatures": [
282
+ "2a59fea264bf71603f9908ac557cf5816ddd1898ce26a2cbb8081195cf5a19381bf42cc2e583a9a2a768dc324c6ac1344eb4ec06f41b19b06970734b30340226",
283
+ ],
284
+ "addresses": [
285
+ "ce5ba87678f8b5e2d0dbccf2fabff65f79191f73",
286
+ ],
287
+ "payload_hashes": [
288
+ "49699c9d1cfb1a8643037c9557123a9e643a3dd938f619af39b94966ecfdd6ff",
289
+ "af31f9d6afd8f7cbbe5c3310f2a2da9e1af31d1b7cf8dae7d9786848de1e5bd7",
290
+ ],
291
+ "payload_schemas": [
292
+ "network.xyo.hash.lease.estimate",
293
+ "network.xyo.ns.domain.registration.lease",
294
+ ],
295
+ "previous_hashes": [
296
+ null,
297
+ ],
298
+ "schema": "network.xyo.boundwitness",
299
+ },
300
+ {
301
+ "$sources": [
302
+ "dcc7ab18c86d90311bb1b59361f6698e2714294a91aa3126c554aa8483a7ae37",
303
+ ],
304
+ "currency": "USD",
305
+ "exp": 1725225427392,
306
+ "nbf": 1724966227392,
307
+ "price": 16,
308
+ "schema": "network.xyo.hash.lease.estimate",
309
+ },
310
+ {
311
+ "$sources": [
312
+ "fccd06633e70c2168c8eb0eb5e25b22e34c1c417a46d5073034ec977dfc1995d",
313
+ "d7f40698fb0b0261834ef694ed275b4e6547e329cedc1c56708f098a5608b93a",
314
+ ],
315
+ "domain": "test8446e171-46ca-47d5-a3b7-1a658cb7f451",
316
+ "exp": 1756502227392,
317
+ "nbf": 1724966227392,
318
+ "registrant": [
319
+ "1b2c45910fb0d32cb1d1cd010cbc594bf05969b5",
320
+ ],
321
+ "registrar": [
322
+ "846c35ce6ec62e4608a1215e14b5b16471904153",
323
+ ],
324
+ "schema": "network.xyo.ns.domain.registration.lease",
325
+ "tld": "xyo",
326
+ },
327
+ ],
328
+ [
329
+ {
330
+ "$signatures": [
331
+ "91519424f721376751b19865433ff80e3d47b2a59be6f7478e7e003e0366ccc730c1dd7eeaa642ced9e78a40c5a5a3ab33044a6d620f5a4467dfbd0e2d9dc4d8",
332
+ ],
333
+ "addresses": [
334
+ "9146761e29463d783e28161848feeeb43196227b",
335
+ ],
336
+ "payload_hashes": [
337
+ "abb7ecb2cfc51e1a95f85477b3a4210a72886d5b22fcf32043736c48e2873f2c",
338
+ "3ed825d48507b899395ca943e1dd6ec9a7c948e1cd1573a6cfda66de83af4b11",
339
+ ],
340
+ "payload_schemas": [
341
+ "network.xyo.hash.lease.estimate",
342
+ "network.xyo.ns.domain.registration.lease",
343
+ ],
344
+ "previous_hashes": [
345
+ null,
346
+ ],
347
+ "schema": "network.xyo.boundwitness",
348
+ },
349
+ {
350
+ "$sources": [
351
+ "90259bc9ecde9d4c0061bc92dbfcf32e0f7b2603e49443d9f3c67a6d7e82c7d5",
352
+ ],
353
+ "currency": "USD",
354
+ "exp": 1725225514773,
355
+ "nbf": 1724966314773,
356
+ "price": 16,
357
+ "schema": "network.xyo.hash.lease.estimate",
358
+ },
359
+ {
360
+ "$sources": [
361
+ "407ed63c0c36fadae7ae8d16a42b678551e0ea6aa5357b76f0ffc1bce3ba2f22",
362
+ "ced04c0a3f65bbefde58ba0d15767fcee20b6e25d3820f90c55f44f18effa70f",
363
+ ],
364
+ "domain": "testb88a0ee2-9665-48b3-b9c6-047eadc475ee",
365
+ "exp": 1756502314773,
366
+ "nbf": 1724966314773,
367
+ "registrant": [
368
+ "1b2c45910fb0d32cb1d1cd010cbc594bf05969b5",
369
+ ],
370
+ "registrar": [
371
+ "846c35ce6ec62e4608a1215e14b5b16471904153",
372
+ ],
373
+ "schema": "network.xyo.ns.domain.registration.lease",
374
+ "tld": "xyo",
375
+ },
376
+ ],
377
+ ]
378
+ `;
379
+
380
+ exports[`parseEstimatesFromArray > with valid symmetric data > parses estimates from array 4`] = `
381
+ [
382
+ [
383
+ {
384
+ "$signatures": [
385
+ "91519424f721376751b19865433ff80e3d47b2a59be6f7478e7e003e0366ccc730c1dd7eeaa642ced9e78a40c5a5a3ab33044a6d620f5a4467dfbd0e2d9dc4d8",
386
+ ],
387
+ "addresses": [
388
+ "9146761e29463d783e28161848feeeb43196227b",
389
+ ],
390
+ "payload_hashes": [
391
+ "abb7ecb2cfc51e1a95f85477b3a4210a72886d5b22fcf32043736c48e2873f2c",
392
+ "3ed825d48507b899395ca943e1dd6ec9a7c948e1cd1573a6cfda66de83af4b11",
393
+ ],
394
+ "payload_schemas": [
395
+ "network.xyo.hash.lease.estimate",
396
+ "network.xyo.ns.domain.registration.lease",
397
+ ],
398
+ "previous_hashes": [
399
+ null,
400
+ ],
401
+ "schema": "network.xyo.boundwitness",
402
+ },
403
+ {
404
+ "$sources": [
405
+ "90259bc9ecde9d4c0061bc92dbfcf32e0f7b2603e49443d9f3c67a6d7e82c7d5",
406
+ ],
407
+ "currency": "USD",
408
+ "exp": 1725225514773,
409
+ "nbf": 1724966314773,
410
+ "price": 16,
411
+ "schema": "network.xyo.hash.lease.estimate",
412
+ },
413
+ {
414
+ "$sources": [
415
+ "407ed63c0c36fadae7ae8d16a42b678551e0ea6aa5357b76f0ffc1bce3ba2f22",
416
+ "ced04c0a3f65bbefde58ba0d15767fcee20b6e25d3820f90c55f44f18effa70f",
417
+ ],
418
+ "domain": "testb88a0ee2-9665-48b3-b9c6-047eadc475ee",
419
+ "exp": 1756502314773,
420
+ "nbf": 1724966314773,
421
+ "registrant": [
422
+ "1b2c45910fb0d32cb1d1cd010cbc594bf05969b5",
423
+ ],
424
+ "registrar": [
425
+ "846c35ce6ec62e4608a1215e14b5b16471904153",
426
+ ],
427
+ "schema": "network.xyo.ns.domain.registration.lease",
428
+ "tld": "xyo",
429
+ },
430
+ ],
431
+ [
432
+ {
433
+ "$signatures": [
434
+ "2a59fea264bf71603f9908ac557cf5816ddd1898ce26a2cbb8081195cf5a19381bf42cc2e583a9a2a768dc324c6ac1344eb4ec06f41b19b06970734b30340226",
435
+ ],
436
+ "addresses": [
437
+ "ce5ba87678f8b5e2d0dbccf2fabff65f79191f73",
438
+ ],
439
+ "payload_hashes": [
440
+ "49699c9d1cfb1a8643037c9557123a9e643a3dd938f619af39b94966ecfdd6ff",
441
+ "af31f9d6afd8f7cbbe5c3310f2a2da9e1af31d1b7cf8dae7d9786848de1e5bd7",
442
+ ],
443
+ "payload_schemas": [
444
+ "network.xyo.hash.lease.estimate",
445
+ "network.xyo.ns.domain.registration.lease",
446
+ ],
447
+ "previous_hashes": [
448
+ null,
449
+ ],
450
+ "schema": "network.xyo.boundwitness",
451
+ },
452
+ {
453
+ "$sources": [
454
+ "dcc7ab18c86d90311bb1b59361f6698e2714294a91aa3126c554aa8483a7ae37",
455
+ ],
456
+ "currency": "USD",
457
+ "exp": 1725225427392,
458
+ "nbf": 1724966227392,
459
+ "price": 16,
460
+ "schema": "network.xyo.hash.lease.estimate",
461
+ },
462
+ {
463
+ "$sources": [
464
+ "fccd06633e70c2168c8eb0eb5e25b22e34c1c417a46d5073034ec977dfc1995d",
465
+ "d7f40698fb0b0261834ef694ed275b4e6547e329cedc1c56708f098a5608b93a",
466
+ ],
467
+ "domain": "test8446e171-46ca-47d5-a3b7-1a658cb7f451",
468
+ "exp": 1756502227392,
469
+ "nbf": 1724966227392,
470
+ "registrant": [
471
+ "1b2c45910fb0d32cb1d1cd010cbc594bf05969b5",
472
+ ],
473
+ "registrar": [
474
+ "846c35ce6ec62e4608a1215e14b5b16471904153",
475
+ ],
476
+ "schema": "network.xyo.ns.domain.registration.lease",
477
+ "tld": "xyo",
478
+ },
479
+ ],
480
+ ]
481
+ `;