@xyo-network/payment-payload-plugins 2.91.10 → 2.91.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.
Files changed (187) hide show
  1. package/dist/browser/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.cts +3 -3
  2. package/dist/browser/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.cts.map +1 -1
  3. package/dist/browser/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.mts +3 -3
  4. package/dist/browser/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.mts.map +1 -1
  5. package/dist/browser/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts +3 -3
  6. package/dist/browser/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts.map +1 -1
  7. package/dist/browser/Escrow/validators/escrow/agent.d.cts +3 -2
  8. package/dist/browser/Escrow/validators/escrow/agent.d.cts.map +1 -1
  9. package/dist/browser/Escrow/validators/escrow/agent.d.mts +3 -2
  10. package/dist/browser/Escrow/validators/escrow/agent.d.mts.map +1 -1
  11. package/dist/browser/Escrow/validators/escrow/agent.d.ts +3 -2
  12. package/dist/browser/Escrow/validators/escrow/agent.d.ts.map +1 -1
  13. package/dist/browser/Escrow/validators/escrow/appraisal.d.cts +6 -6
  14. package/dist/browser/Escrow/validators/escrow/appraisal.d.cts.map +1 -1
  15. package/dist/browser/Escrow/validators/escrow/appraisal.d.mts +6 -6
  16. package/dist/browser/Escrow/validators/escrow/appraisal.d.mts.map +1 -1
  17. package/dist/browser/Escrow/validators/escrow/appraisal.d.ts +6 -6
  18. package/dist/browser/Escrow/validators/escrow/appraisal.d.ts.map +1 -1
  19. package/dist/browser/Escrow/validators/escrow/appraisalAuthorities.d.cts +4 -3
  20. package/dist/browser/Escrow/validators/escrow/appraisalAuthorities.d.cts.map +1 -1
  21. package/dist/browser/Escrow/validators/escrow/appraisalAuthorities.d.mts +4 -3
  22. package/dist/browser/Escrow/validators/escrow/appraisalAuthorities.d.mts.map +1 -1
  23. package/dist/browser/Escrow/validators/escrow/appraisalAuthorities.d.ts +4 -3
  24. package/dist/browser/Escrow/validators/escrow/appraisalAuthorities.d.ts.map +1 -1
  25. package/dist/browser/Escrow/validators/escrow/assets.d.cts +3 -2
  26. package/dist/browser/Escrow/validators/escrow/assets.d.cts.map +1 -1
  27. package/dist/browser/Escrow/validators/escrow/assets.d.mts +3 -2
  28. package/dist/browser/Escrow/validators/escrow/assets.d.mts.map +1 -1
  29. package/dist/browser/Escrow/validators/escrow/assets.d.ts +3 -2
  30. package/dist/browser/Escrow/validators/escrow/assets.d.ts.map +1 -1
  31. package/dist/browser/Escrow/validators/escrow/buyer.d.cts +3 -2
  32. package/dist/browser/Escrow/validators/escrow/buyer.d.cts.map +1 -1
  33. package/dist/browser/Escrow/validators/escrow/buyer.d.mts +3 -2
  34. package/dist/browser/Escrow/validators/escrow/buyer.d.mts.map +1 -1
  35. package/dist/browser/Escrow/validators/escrow/buyer.d.ts +3 -2
  36. package/dist/browser/Escrow/validators/escrow/buyer.d.ts.map +1 -1
  37. package/dist/browser/Escrow/validators/escrow/buyerSecret.d.cts +5 -5
  38. package/dist/browser/Escrow/validators/escrow/buyerSecret.d.cts.map +1 -1
  39. package/dist/browser/Escrow/validators/escrow/buyerSecret.d.mts +5 -5
  40. package/dist/browser/Escrow/validators/escrow/buyerSecret.d.mts.map +1 -1
  41. package/dist/browser/Escrow/validators/escrow/buyerSecret.d.ts +5 -5
  42. package/dist/browser/Escrow/validators/escrow/buyerSecret.d.ts.map +1 -1
  43. package/dist/browser/Escrow/validators/escrow/nbfExp.d.cts +3 -2
  44. package/dist/browser/Escrow/validators/escrow/nbfExp.d.cts.map +1 -1
  45. package/dist/browser/Escrow/validators/escrow/nbfExp.d.mts +3 -2
  46. package/dist/browser/Escrow/validators/escrow/nbfExp.d.mts.map +1 -1
  47. package/dist/browser/Escrow/validators/escrow/nbfExp.d.ts +3 -2
  48. package/dist/browser/Escrow/validators/escrow/nbfExp.d.ts.map +1 -1
  49. package/dist/browser/Escrow/validators/escrow/paymentAuthorities.d.cts +3 -2
  50. package/dist/browser/Escrow/validators/escrow/paymentAuthorities.d.cts.map +1 -1
  51. package/dist/browser/Escrow/validators/escrow/paymentAuthorities.d.mts +3 -2
  52. package/dist/browser/Escrow/validators/escrow/paymentAuthorities.d.mts.map +1 -1
  53. package/dist/browser/Escrow/validators/escrow/paymentAuthorities.d.ts +3 -2
  54. package/dist/browser/Escrow/validators/escrow/paymentAuthorities.d.ts.map +1 -1
  55. package/dist/browser/Escrow/validators/escrow/seller.d.cts +3 -2
  56. package/dist/browser/Escrow/validators/escrow/seller.d.cts.map +1 -1
  57. package/dist/browser/Escrow/validators/escrow/seller.d.mts +3 -2
  58. package/dist/browser/Escrow/validators/escrow/seller.d.mts.map +1 -1
  59. package/dist/browser/Escrow/validators/escrow/seller.d.ts +3 -2
  60. package/dist/browser/Escrow/validators/escrow/seller.d.ts.map +1 -1
  61. package/dist/browser/Escrow/validators/escrow/sellerSecret.d.cts +5 -5
  62. package/dist/browser/Escrow/validators/escrow/sellerSecret.d.cts.map +1 -1
  63. package/dist/browser/Escrow/validators/escrow/sellerSecret.d.mts +5 -5
  64. package/dist/browser/Escrow/validators/escrow/sellerSecret.d.mts.map +1 -1
  65. package/dist/browser/Escrow/validators/escrow/sellerSecret.d.ts +5 -5
  66. package/dist/browser/Escrow/validators/escrow/sellerSecret.d.ts.map +1 -1
  67. package/dist/browser/Escrow/validators/index.d.cts +0 -1
  68. package/dist/browser/Escrow/validators/index.d.cts.map +1 -1
  69. package/dist/browser/Escrow/validators/index.d.mts +0 -1
  70. package/dist/browser/Escrow/validators/index.d.mts.map +1 -1
  71. package/dist/browser/Escrow/validators/index.d.ts +0 -1
  72. package/dist/browser/Escrow/validators/index.d.ts.map +1 -1
  73. package/dist/browser/index.cjs.map +1 -1
  74. package/dist/browser/index.js.map +1 -1
  75. package/dist/node/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.cts +3 -3
  76. package/dist/node/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.cts.map +1 -1
  77. package/dist/node/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.mts +3 -3
  78. package/dist/node/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.mts.map +1 -1
  79. package/dist/node/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts +3 -3
  80. package/dist/node/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts.map +1 -1
  81. package/dist/node/Escrow/validators/escrow/agent.d.cts +3 -2
  82. package/dist/node/Escrow/validators/escrow/agent.d.cts.map +1 -1
  83. package/dist/node/Escrow/validators/escrow/agent.d.mts +3 -2
  84. package/dist/node/Escrow/validators/escrow/agent.d.mts.map +1 -1
  85. package/dist/node/Escrow/validators/escrow/agent.d.ts +3 -2
  86. package/dist/node/Escrow/validators/escrow/agent.d.ts.map +1 -1
  87. package/dist/node/Escrow/validators/escrow/appraisal.d.cts +6 -6
  88. package/dist/node/Escrow/validators/escrow/appraisal.d.cts.map +1 -1
  89. package/dist/node/Escrow/validators/escrow/appraisal.d.mts +6 -6
  90. package/dist/node/Escrow/validators/escrow/appraisal.d.mts.map +1 -1
  91. package/dist/node/Escrow/validators/escrow/appraisal.d.ts +6 -6
  92. package/dist/node/Escrow/validators/escrow/appraisal.d.ts.map +1 -1
  93. package/dist/node/Escrow/validators/escrow/appraisalAuthorities.d.cts +4 -3
  94. package/dist/node/Escrow/validators/escrow/appraisalAuthorities.d.cts.map +1 -1
  95. package/dist/node/Escrow/validators/escrow/appraisalAuthorities.d.mts +4 -3
  96. package/dist/node/Escrow/validators/escrow/appraisalAuthorities.d.mts.map +1 -1
  97. package/dist/node/Escrow/validators/escrow/appraisalAuthorities.d.ts +4 -3
  98. package/dist/node/Escrow/validators/escrow/appraisalAuthorities.d.ts.map +1 -1
  99. package/dist/node/Escrow/validators/escrow/assets.d.cts +3 -2
  100. package/dist/node/Escrow/validators/escrow/assets.d.cts.map +1 -1
  101. package/dist/node/Escrow/validators/escrow/assets.d.mts +3 -2
  102. package/dist/node/Escrow/validators/escrow/assets.d.mts.map +1 -1
  103. package/dist/node/Escrow/validators/escrow/assets.d.ts +3 -2
  104. package/dist/node/Escrow/validators/escrow/assets.d.ts.map +1 -1
  105. package/dist/node/Escrow/validators/escrow/buyer.d.cts +3 -2
  106. package/dist/node/Escrow/validators/escrow/buyer.d.cts.map +1 -1
  107. package/dist/node/Escrow/validators/escrow/buyer.d.mts +3 -2
  108. package/dist/node/Escrow/validators/escrow/buyer.d.mts.map +1 -1
  109. package/dist/node/Escrow/validators/escrow/buyer.d.ts +3 -2
  110. package/dist/node/Escrow/validators/escrow/buyer.d.ts.map +1 -1
  111. package/dist/node/Escrow/validators/escrow/buyerSecret.d.cts +5 -5
  112. package/dist/node/Escrow/validators/escrow/buyerSecret.d.cts.map +1 -1
  113. package/dist/node/Escrow/validators/escrow/buyerSecret.d.mts +5 -5
  114. package/dist/node/Escrow/validators/escrow/buyerSecret.d.mts.map +1 -1
  115. package/dist/node/Escrow/validators/escrow/buyerSecret.d.ts +5 -5
  116. package/dist/node/Escrow/validators/escrow/buyerSecret.d.ts.map +1 -1
  117. package/dist/node/Escrow/validators/escrow/nbfExp.d.cts +3 -2
  118. package/dist/node/Escrow/validators/escrow/nbfExp.d.cts.map +1 -1
  119. package/dist/node/Escrow/validators/escrow/nbfExp.d.mts +3 -2
  120. package/dist/node/Escrow/validators/escrow/nbfExp.d.mts.map +1 -1
  121. package/dist/node/Escrow/validators/escrow/nbfExp.d.ts +3 -2
  122. package/dist/node/Escrow/validators/escrow/nbfExp.d.ts.map +1 -1
  123. package/dist/node/Escrow/validators/escrow/paymentAuthorities.d.cts +3 -2
  124. package/dist/node/Escrow/validators/escrow/paymentAuthorities.d.cts.map +1 -1
  125. package/dist/node/Escrow/validators/escrow/paymentAuthorities.d.mts +3 -2
  126. package/dist/node/Escrow/validators/escrow/paymentAuthorities.d.mts.map +1 -1
  127. package/dist/node/Escrow/validators/escrow/paymentAuthorities.d.ts +3 -2
  128. package/dist/node/Escrow/validators/escrow/paymentAuthorities.d.ts.map +1 -1
  129. package/dist/node/Escrow/validators/escrow/seller.d.cts +3 -2
  130. package/dist/node/Escrow/validators/escrow/seller.d.cts.map +1 -1
  131. package/dist/node/Escrow/validators/escrow/seller.d.mts +3 -2
  132. package/dist/node/Escrow/validators/escrow/seller.d.mts.map +1 -1
  133. package/dist/node/Escrow/validators/escrow/seller.d.ts +3 -2
  134. package/dist/node/Escrow/validators/escrow/seller.d.ts.map +1 -1
  135. package/dist/node/Escrow/validators/escrow/sellerSecret.d.cts +5 -5
  136. package/dist/node/Escrow/validators/escrow/sellerSecret.d.cts.map +1 -1
  137. package/dist/node/Escrow/validators/escrow/sellerSecret.d.mts +5 -5
  138. package/dist/node/Escrow/validators/escrow/sellerSecret.d.mts.map +1 -1
  139. package/dist/node/Escrow/validators/escrow/sellerSecret.d.ts +5 -5
  140. package/dist/node/Escrow/validators/escrow/sellerSecret.d.ts.map +1 -1
  141. package/dist/node/Escrow/validators/index.d.cts +0 -1
  142. package/dist/node/Escrow/validators/index.d.cts.map +1 -1
  143. package/dist/node/Escrow/validators/index.d.mts +0 -1
  144. package/dist/node/Escrow/validators/index.d.mts.map +1 -1
  145. package/dist/node/Escrow/validators/index.d.ts +0 -1
  146. package/dist/node/Escrow/validators/index.d.ts.map +1 -1
  147. package/dist/node/index.cjs.map +1 -1
  148. package/dist/node/index.js.map +1 -1
  149. package/package.json +10 -10
  150. package/src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts +3 -3
  151. package/src/Escrow/validators/escrow/agent.ts +2 -2
  152. package/src/Escrow/validators/escrow/appraisal.ts +8 -6
  153. package/src/Escrow/validators/escrow/appraisalAuthorities.ts +3 -3
  154. package/src/Escrow/validators/escrow/assets.ts +3 -2
  155. package/src/Escrow/validators/escrow/buyer.ts +2 -2
  156. package/src/Escrow/validators/escrow/buyerSecret.ts +4 -5
  157. package/src/Escrow/validators/escrow/nbfExp.ts +3 -2
  158. package/src/Escrow/validators/escrow/paymentAuthorities.ts +2 -2
  159. package/src/Escrow/validators/escrow/seller.ts +2 -2
  160. package/src/Escrow/validators/escrow/sellerSecret.ts +4 -5
  161. package/src/Escrow/validators/index.ts +0 -1
  162. package/dist/browser/Escrow/validators/types/escrowValidation.d.cts +0 -26
  163. package/dist/browser/Escrow/validators/types/escrowValidation.d.cts.map +0 -1
  164. package/dist/browser/Escrow/validators/types/escrowValidation.d.mts +0 -26
  165. package/dist/browser/Escrow/validators/types/escrowValidation.d.mts.map +0 -1
  166. package/dist/browser/Escrow/validators/types/escrowValidation.d.ts +0 -26
  167. package/dist/browser/Escrow/validators/types/escrowValidation.d.ts.map +0 -1
  168. package/dist/browser/Escrow/validators/types/index.d.cts +0 -2
  169. package/dist/browser/Escrow/validators/types/index.d.cts.map +0 -1
  170. package/dist/browser/Escrow/validators/types/index.d.mts +0 -2
  171. package/dist/browser/Escrow/validators/types/index.d.mts.map +0 -1
  172. package/dist/browser/Escrow/validators/types/index.d.ts +0 -2
  173. package/dist/browser/Escrow/validators/types/index.d.ts.map +0 -1
  174. package/dist/node/Escrow/validators/types/escrowValidation.d.cts +0 -26
  175. package/dist/node/Escrow/validators/types/escrowValidation.d.cts.map +0 -1
  176. package/dist/node/Escrow/validators/types/escrowValidation.d.mts +0 -26
  177. package/dist/node/Escrow/validators/types/escrowValidation.d.mts.map +0 -1
  178. package/dist/node/Escrow/validators/types/escrowValidation.d.ts +0 -26
  179. package/dist/node/Escrow/validators/types/escrowValidation.d.ts.map +0 -1
  180. package/dist/node/Escrow/validators/types/index.d.cts +0 -2
  181. package/dist/node/Escrow/validators/types/index.d.cts.map +0 -1
  182. package/dist/node/Escrow/validators/types/index.d.mts +0 -2
  183. package/dist/node/Escrow/validators/types/index.d.mts.map +0 -1
  184. package/dist/node/Escrow/validators/types/index.d.ts +0 -2
  185. package/dist/node/Escrow/validators/types/index.d.ts.map +0 -1
  186. package/src/Escrow/validators/types/escrowValidation.ts +0 -30
  187. package/src/Escrow/validators/types/index.ts +0 -1
@@ -2,10 +2,9 @@ import { assertEx } from '@xylabs/assert'
2
2
  import { Hash } from '@xylabs/hex'
3
3
  import { isBoundWitnessWithMeta } from '@xyo-network/boundwitness-model'
4
4
  import { BoundWitnessValidator } from '@xyo-network/boundwitness-validator'
5
- import { Payload, WithMeta } from '@xyo-network/payload-model'
5
+ import { Payload, PayloadValidationFunction, WithMeta } from '@xyo-network/payload-model'
6
6
 
7
7
  import { EscrowTerms } from '../../Terms'
8
- import { EscrowTermsValidationFunction } from '../types'
9
8
 
10
9
  const name = 'EscrowTerms.buyerSecret'
11
10
 
@@ -13,7 +12,7 @@ const name = 'EscrowTerms.buyerSecret'
13
12
  * Returns a function that validates the escrow terms for buyerSecret
14
13
  * @returns A function that validates the escrow terms for buyerSecret
15
14
  */
16
- export const buyerSecretExistsValidator: EscrowTermsValidationFunction = (terms: EscrowTerms) => {
15
+ export const buyerSecretExistsValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {
17
16
  // Validate we have buyerSecret
18
17
  const buyerSecret = terms.buyerSecret
19
18
  if (!buyerSecret || buyerSecret.length === 0) {
@@ -28,7 +27,7 @@ export const buyerSecretExistsValidator: EscrowTermsValidationFunction = (terms:
28
27
  * @param dictionary Payload dictionary of the escrow terms
29
28
  * @returns A function that validates the escrow terms for the existence of the buyerSecret in the dictionary
30
29
  */
31
- export const getBuyerSecretSuppliedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): EscrowTermsValidationFunction => {
30
+ export const getBuyerSecretSuppliedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {
32
31
  return (terms: EscrowTerms) => {
33
32
  const buyerSecret = assertEx(terms.buyerSecret, () => `${name}: No buyerSecret: ${terms.buyerSecret}`)
34
33
  if (!dictionary[buyerSecret]) {
@@ -44,7 +43,7 @@ export const getBuyerSecretSuppliedValidator = (dictionary: Record<Hash, WithMet
44
43
  * @param dictionary Payload dictionary of the escrow terms
45
44
  * @returns A function that validates the escrow terms for the existence of the buyerSecret signed by the buyer
46
45
  */
47
- export const getBuyerSecretSignedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): EscrowTermsValidationFunction => {
46
+ export const getBuyerSecretSignedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {
48
47
  return async (terms: EscrowTerms) => {
49
48
  const buyer = assertEx(terms.buyer, () => `${name}: No buyer: ${terms.buyer}`)
50
49
  const buyerSecret = assertEx(terms.buyerSecret, () => `${name}: No buyerSecret: ${terms.buyerSecret}`)
@@ -1,7 +1,8 @@
1
+ import { PayloadValidationFunction } from '@xyo-network/payload-model'
2
+
1
3
  import { EscrowTerms } from '../../Terms'
2
- import { EscrowTermsValidationFunction } from '../types'
3
4
 
4
- export const getNbfExpValidator = (now: number, minRequiredDuration: number): EscrowTermsValidationFunction => {
5
+ export const getNbfExpValidator = (now: number, minRequiredDuration: number): PayloadValidationFunction<EscrowTerms> => {
5
6
  const minExp = now + minRequiredDuration
6
7
  return (terms: EscrowTerms) => {
7
8
  const { exp, nbf } = terms
@@ -1,12 +1,12 @@
1
1
  import { ModuleIdentifier } from '@xyo-network/module-model'
2
+ import { PayloadValidationFunction } from '@xyo-network/payload-model'
2
3
 
3
4
  import { EscrowTerms } from '../../Terms'
4
5
  import { moduleIdentifiersContainsAllOf } from '../common'
5
- import { EscrowTermsValidationFunction } from '../types'
6
6
 
7
7
  const name = 'EscrowTerms.paymentAuthorities'
8
8
 
9
- export const getPaymentAuthoritiesAllowedValidator = (allowed: ModuleIdentifier[]): EscrowTermsValidationFunction => {
9
+ export const getPaymentAuthoritiesAllowedValidator = (allowed: ModuleIdentifier[]): PayloadValidationFunction<EscrowTerms> => {
10
10
  return (terms: EscrowTerms) => {
11
11
  const result = moduleIdentifiersContainsAllOf(terms, (t) => t.paymentAuthorities, allowed, true)
12
12
  if (!result) {
@@ -1,7 +1,7 @@
1
1
  import { asAddress } from '@xylabs/hex'
2
+ import { PayloadValidationFunction } from '@xyo-network/payload-model'
2
3
 
3
4
  import { EscrowTerms } from '../../Terms'
4
- import { EscrowTermsValidationFunction } from '../types'
5
5
 
6
6
  const name = 'EscrowTerms.seller'
7
7
 
@@ -9,7 +9,7 @@ const name = 'EscrowTerms.seller'
9
9
  * A function that validates the escrow terms for seller
10
10
  * @returns True if the escrow terms contain seller, false otherwise
11
11
  */
12
- export const sellerExistsValidator: EscrowTermsValidationFunction = (terms: EscrowTerms) => {
12
+ export const sellerExistsValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {
13
13
  // Validate we have seller
14
14
  const seller = terms.seller
15
15
  if (!seller || seller.length === 0) {
@@ -2,10 +2,9 @@ import { assertEx } from '@xylabs/assert'
2
2
  import { Hash } from '@xylabs/hex'
3
3
  import { isBoundWitnessWithMeta } from '@xyo-network/boundwitness-model'
4
4
  import { BoundWitnessValidator } from '@xyo-network/boundwitness-validator'
5
- import { Payload, WithMeta } from '@xyo-network/payload-model'
5
+ import { Payload, PayloadValidationFunction, WithMeta } from '@xyo-network/payload-model'
6
6
 
7
7
  import { EscrowTerms } from '../../Terms'
8
- import { EscrowTermsValidationFunction } from '../types'
9
8
 
10
9
  const name = 'EscrowTerms.sellerSecret'
11
10
 
@@ -13,7 +12,7 @@ const name = 'EscrowTerms.sellerSecret'
13
12
  * Returns a function that validates the escrow terms for sellerSecret
14
13
  * @returns A function that validates the escrow terms for sellerSecret
15
14
  */
16
- export const sellerSecretExistsValidator: EscrowTermsValidationFunction = (terms: EscrowTerms) => {
15
+ export const sellerSecretExistsValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {
17
16
  // Validate we have sellerSecret
18
17
  const sellerSecret = terms.sellerSecret
19
18
  if (!sellerSecret || sellerSecret.length === 0) {
@@ -28,7 +27,7 @@ export const sellerSecretExistsValidator: EscrowTermsValidationFunction = (terms
28
27
  * @param dictionary Payload dictionary of the escrow terms
29
28
  * @returns A function that validates the escrow terms for the existence of the sellerSecret in the dictionary
30
29
  */
31
- export const getSellerSecretSuppliedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): EscrowTermsValidationFunction => {
30
+ export const getSellerSecretSuppliedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {
32
31
  return (terms: EscrowTerms) => {
33
32
  const sellerSecret = assertEx(terms.sellerSecret, () => `${name}: No sellerSecret: ${terms.sellerSecret}`)
34
33
  if (!dictionary[sellerSecret]) {
@@ -44,7 +43,7 @@ export const getSellerSecretSuppliedValidator = (dictionary: Record<Hash, WithMe
44
43
  * @param dictionary Payload dictionary of the escrow terms
45
44
  * @returns A function that validates the escrow terms for the existence of the sellerSecret signed by the seller
46
45
  */
47
- export const getSellerSecretSignedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): EscrowTermsValidationFunction => {
46
+ export const getSellerSecretSignedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {
48
47
  return async (terms: EscrowTerms) => {
49
48
  const seller = assertEx(terms.seller, () => `${name}: No seller: ${terms.seller}`)
50
49
  const sellerSecret = assertEx(terms.sellerSecret, () => `${name}: No sellerSecret: ${terms.sellerSecret}`)
@@ -1,3 +1,2 @@
1
1
  export * from './common'
2
2
  export * from './escrow'
3
- export * from './types'
@@ -1,26 +0,0 @@
1
- import { EscrowTerms } from '../../Terms';
2
- /**
3
- * Type corresponding to the escrow terms properties
4
- */
5
- export type EscrowTermsProperty = keyof EscrowTerms;
6
- /**
7
- * Type corresponding to the escrow terms property value
8
- */
9
- export type EscrowTermsValue<K extends EscrowTermsProperty> = EscrowTerms[K];
10
- /**
11
- * An expressions that selects a property value from the escrow terms
12
- */
13
- export type EscrowTermsValueExpression<
14
- /**
15
- * The property of the escrow terms to select
16
- */
17
- K extends EscrowTermsProperty,
18
- /**
19
- * The type of the selected property's value
20
- */
21
- V = EscrowTermsValue<K>> = (escrowTerms: EscrowTerms) => V;
22
- /**
23
- * A function that validates the supplied escrow terms
24
- */
25
- export type EscrowTermsValidationFunction = (escrowTerms: EscrowTerms) => boolean | Promise<boolean>;
26
- //# sourceMappingURL=escrowValidation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"escrowValidation.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/escrowValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,WAAW,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,mBAAmB,IAAI,WAAW,CAAC,CAAC,CAAC,CAAA;AAE5E;;GAEG;AACH,MAAM,MAAM,0BAA0B;AACpC;;GAEG;AACH,CAAC,SAAS,mBAAmB;AAC7B;;GAEG;AACH,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,IACrB,CAAC,WAAW,EAAE,WAAW,KAAK,CAAC,CAAA;AAEnC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA"}
@@ -1,26 +0,0 @@
1
- import { EscrowTerms } from '../../Terms';
2
- /**
3
- * Type corresponding to the escrow terms properties
4
- */
5
- export type EscrowTermsProperty = keyof EscrowTerms;
6
- /**
7
- * Type corresponding to the escrow terms property value
8
- */
9
- export type EscrowTermsValue<K extends EscrowTermsProperty> = EscrowTerms[K];
10
- /**
11
- * An expressions that selects a property value from the escrow terms
12
- */
13
- export type EscrowTermsValueExpression<
14
- /**
15
- * The property of the escrow terms to select
16
- */
17
- K extends EscrowTermsProperty,
18
- /**
19
- * The type of the selected property's value
20
- */
21
- V = EscrowTermsValue<K>> = (escrowTerms: EscrowTerms) => V;
22
- /**
23
- * A function that validates the supplied escrow terms
24
- */
25
- export type EscrowTermsValidationFunction = (escrowTerms: EscrowTerms) => boolean | Promise<boolean>;
26
- //# sourceMappingURL=escrowValidation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"escrowValidation.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/escrowValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,WAAW,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,mBAAmB,IAAI,WAAW,CAAC,CAAC,CAAC,CAAA;AAE5E;;GAEG;AACH,MAAM,MAAM,0BAA0B;AACpC;;GAEG;AACH,CAAC,SAAS,mBAAmB;AAC7B;;GAEG;AACH,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,IACrB,CAAC,WAAW,EAAE,WAAW,KAAK,CAAC,CAAA;AAEnC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA"}
@@ -1,26 +0,0 @@
1
- import { EscrowTerms } from '../../Terms';
2
- /**
3
- * Type corresponding to the escrow terms properties
4
- */
5
- export type EscrowTermsProperty = keyof EscrowTerms;
6
- /**
7
- * Type corresponding to the escrow terms property value
8
- */
9
- export type EscrowTermsValue<K extends EscrowTermsProperty> = EscrowTerms[K];
10
- /**
11
- * An expressions that selects a property value from the escrow terms
12
- */
13
- export type EscrowTermsValueExpression<
14
- /**
15
- * The property of the escrow terms to select
16
- */
17
- K extends EscrowTermsProperty,
18
- /**
19
- * The type of the selected property's value
20
- */
21
- V = EscrowTermsValue<K>> = (escrowTerms: EscrowTerms) => V;
22
- /**
23
- * A function that validates the supplied escrow terms
24
- */
25
- export type EscrowTermsValidationFunction = (escrowTerms: EscrowTerms) => boolean | Promise<boolean>;
26
- //# sourceMappingURL=escrowValidation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"escrowValidation.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/escrowValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,WAAW,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,mBAAmB,IAAI,WAAW,CAAC,CAAC,CAAC,CAAA;AAE5E;;GAEG;AACH,MAAM,MAAM,0BAA0B;AACpC;;GAEG;AACH,CAAC,SAAS,mBAAmB;AAC7B;;GAEG;AACH,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,IACrB,CAAC,WAAW,EAAE,WAAW,KAAK,CAAC,CAAA;AAEnC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './escrowValidation';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './escrowValidation';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './escrowValidation';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,26 +0,0 @@
1
- import { EscrowTerms } from '../../Terms';
2
- /**
3
- * Type corresponding to the escrow terms properties
4
- */
5
- export type EscrowTermsProperty = keyof EscrowTerms;
6
- /**
7
- * Type corresponding to the escrow terms property value
8
- */
9
- export type EscrowTermsValue<K extends EscrowTermsProperty> = EscrowTerms[K];
10
- /**
11
- * An expressions that selects a property value from the escrow terms
12
- */
13
- export type EscrowTermsValueExpression<
14
- /**
15
- * The property of the escrow terms to select
16
- */
17
- K extends EscrowTermsProperty,
18
- /**
19
- * The type of the selected property's value
20
- */
21
- V = EscrowTermsValue<K>> = (escrowTerms: EscrowTerms) => V;
22
- /**
23
- * A function that validates the supplied escrow terms
24
- */
25
- export type EscrowTermsValidationFunction = (escrowTerms: EscrowTerms) => boolean | Promise<boolean>;
26
- //# sourceMappingURL=escrowValidation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"escrowValidation.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/escrowValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,WAAW,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,mBAAmB,IAAI,WAAW,CAAC,CAAC,CAAC,CAAA;AAE5E;;GAEG;AACH,MAAM,MAAM,0BAA0B;AACpC;;GAEG;AACH,CAAC,SAAS,mBAAmB;AAC7B;;GAEG;AACH,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,IACrB,CAAC,WAAW,EAAE,WAAW,KAAK,CAAC,CAAA;AAEnC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA"}
@@ -1,26 +0,0 @@
1
- import { EscrowTerms } from '../../Terms';
2
- /**
3
- * Type corresponding to the escrow terms properties
4
- */
5
- export type EscrowTermsProperty = keyof EscrowTerms;
6
- /**
7
- * Type corresponding to the escrow terms property value
8
- */
9
- export type EscrowTermsValue<K extends EscrowTermsProperty> = EscrowTerms[K];
10
- /**
11
- * An expressions that selects a property value from the escrow terms
12
- */
13
- export type EscrowTermsValueExpression<
14
- /**
15
- * The property of the escrow terms to select
16
- */
17
- K extends EscrowTermsProperty,
18
- /**
19
- * The type of the selected property's value
20
- */
21
- V = EscrowTermsValue<K>> = (escrowTerms: EscrowTerms) => V;
22
- /**
23
- * A function that validates the supplied escrow terms
24
- */
25
- export type EscrowTermsValidationFunction = (escrowTerms: EscrowTerms) => boolean | Promise<boolean>;
26
- //# sourceMappingURL=escrowValidation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"escrowValidation.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/escrowValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,WAAW,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,mBAAmB,IAAI,WAAW,CAAC,CAAC,CAAC,CAAA;AAE5E;;GAEG;AACH,MAAM,MAAM,0BAA0B;AACpC;;GAEG;AACH,CAAC,SAAS,mBAAmB;AAC7B;;GAEG;AACH,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,IACrB,CAAC,WAAW,EAAE,WAAW,KAAK,CAAC,CAAA;AAEnC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA"}
@@ -1,26 +0,0 @@
1
- import { EscrowTerms } from '../../Terms';
2
- /**
3
- * Type corresponding to the escrow terms properties
4
- */
5
- export type EscrowTermsProperty = keyof EscrowTerms;
6
- /**
7
- * Type corresponding to the escrow terms property value
8
- */
9
- export type EscrowTermsValue<K extends EscrowTermsProperty> = EscrowTerms[K];
10
- /**
11
- * An expressions that selects a property value from the escrow terms
12
- */
13
- export type EscrowTermsValueExpression<
14
- /**
15
- * The property of the escrow terms to select
16
- */
17
- K extends EscrowTermsProperty,
18
- /**
19
- * The type of the selected property's value
20
- */
21
- V = EscrowTermsValue<K>> = (escrowTerms: EscrowTerms) => V;
22
- /**
23
- * A function that validates the supplied escrow terms
24
- */
25
- export type EscrowTermsValidationFunction = (escrowTerms: EscrowTerms) => boolean | Promise<boolean>;
26
- //# sourceMappingURL=escrowValidation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"escrowValidation.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/escrowValidation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,MAAM,aAAa,CAAA;AAEzC;;GAEG;AACH,MAAM,MAAM,mBAAmB,GAAG,MAAM,WAAW,CAAA;AAEnD;;GAEG;AACH,MAAM,MAAM,gBAAgB,CAAC,CAAC,SAAS,mBAAmB,IAAI,WAAW,CAAC,CAAC,CAAC,CAAA;AAE5E;;GAEG;AACH,MAAM,MAAM,0BAA0B;AACpC;;GAEG;AACH,CAAC,SAAS,mBAAmB;AAC7B;;GAEG;AACH,CAAC,GAAG,gBAAgB,CAAC,CAAC,CAAC,IACrB,CAAC,WAAW,EAAE,WAAW,KAAK,CAAC,CAAA;AAEnC;;GAEG;AACH,MAAM,MAAM,6BAA6B,GAAG,CAAC,WAAW,EAAE,WAAW,KAAK,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './escrowValidation';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './escrowValidation';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,2 +0,0 @@
1
- export * from './escrowValidation';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/Escrow/validators/types/index.ts"],"names":[],"mappings":"AAAA,cAAc,oBAAoB,CAAA"}
@@ -1,30 +0,0 @@
1
- import { EscrowTerms } from '../../Terms'
2
-
3
- /**
4
- * Type corresponding to the escrow terms properties
5
- */
6
- export type EscrowTermsProperty = keyof EscrowTerms
7
-
8
- /**
9
- * Type corresponding to the escrow terms property value
10
- */
11
- export type EscrowTermsValue<K extends EscrowTermsProperty> = EscrowTerms[K]
12
-
13
- /**
14
- * An expressions that selects a property value from the escrow terms
15
- */
16
- export type EscrowTermsValueExpression<
17
- /**
18
- * The property of the escrow terms to select
19
- */
20
- K extends EscrowTermsProperty,
21
- /**
22
- * The type of the selected property's value
23
- */
24
- V = EscrowTermsValue<K>,
25
- > = (escrowTerms: EscrowTerms) => V
26
-
27
- /**
28
- * A function that validates the supplied escrow terms
29
- */
30
- export type EscrowTermsValidationFunction = (escrowTerms: EscrowTerms) => boolean | Promise<boolean>
@@ -1 +0,0 @@
1
- export * from './escrowValidation'