@xyo-network/payment-payload-plugins 2.94.2 → 2.94.4

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 (360) hide show
  1. package/dist/browser/Billing/Address/Address.d.cts +1 -1
  2. package/dist/browser/Billing/Address/Address.d.cts.map +1 -1
  3. package/dist/browser/Billing/Address/Address.d.mts +1 -1
  4. package/dist/browser/Billing/Address/Address.d.mts.map +1 -1
  5. package/dist/browser/Billing/Address/Address.d.ts +1 -1
  6. package/dist/browser/Billing/Address/Address.d.ts.map +1 -1
  7. package/dist/browser/Payment/Status/Payload.d.cts +25 -0
  8. package/dist/browser/Payment/Status/Payload.d.cts.map +1 -0
  9. package/dist/browser/Payment/Status/Payload.d.mts +25 -0
  10. package/dist/browser/Payment/Status/Payload.d.mts.map +1 -0
  11. package/dist/browser/Payment/Status/Payload.d.ts +25 -0
  12. package/dist/browser/Payment/Status/Payload.d.ts.map +1 -0
  13. package/dist/browser/Payment/Status/Schema.d.cts +3 -0
  14. package/dist/browser/Payment/Status/Schema.d.cts.map +1 -0
  15. package/dist/browser/Payment/Status/Schema.d.mts +3 -0
  16. package/dist/browser/Payment/Status/Schema.d.mts.map +1 -0
  17. package/dist/browser/Payment/Status/Schema.d.ts +3 -0
  18. package/dist/browser/Payment/Status/Schema.d.ts.map +1 -0
  19. package/dist/browser/Payment/Status/index.d.cts +3 -0
  20. package/dist/browser/Payment/Status/index.d.cts.map +1 -0
  21. package/dist/browser/Payment/Status/index.d.mts +3 -0
  22. package/dist/browser/Payment/Status/index.d.mts.map +1 -0
  23. package/dist/browser/Payment/Status/index.d.ts +3 -0
  24. package/dist/browser/Payment/Status/index.d.ts.map +1 -0
  25. package/dist/browser/Payment/index.d.cts +1 -0
  26. package/dist/browser/Payment/index.d.cts.map +1 -1
  27. package/dist/browser/Payment/index.d.mts +1 -0
  28. package/dist/browser/Payment/index.d.mts.map +1 -1
  29. package/dist/browser/Payment/index.d.ts +1 -0
  30. package/dist/browser/Payment/index.d.ts.map +1 -1
  31. package/dist/browser/index.cjs +23 -8
  32. package/dist/browser/index.cjs.map +1 -1
  33. package/dist/browser/index.js +29 -10
  34. package/dist/browser/index.js.map +1 -1
  35. package/dist/neutral/Billing/Address/Address.d.cts +48 -0
  36. package/dist/neutral/Billing/Address/Address.d.cts.map +1 -0
  37. package/dist/neutral/Billing/Address/Address.d.mts +48 -0
  38. package/dist/neutral/Billing/Address/Address.d.mts.map +1 -0
  39. package/dist/neutral/Billing/Address/Address.d.ts +48 -0
  40. package/dist/neutral/Billing/Address/Address.d.ts.map +1 -0
  41. package/dist/neutral/Billing/Address/Schema.d.cts +3 -0
  42. package/dist/neutral/Billing/Address/Schema.d.cts.map +1 -0
  43. package/dist/neutral/Billing/Address/Schema.d.mts +3 -0
  44. package/dist/neutral/Billing/Address/Schema.d.mts.map +1 -0
  45. package/dist/neutral/Billing/Address/Schema.d.ts +3 -0
  46. package/dist/neutral/Billing/Address/Schema.d.ts.map +1 -0
  47. package/dist/neutral/Billing/Address/index.d.cts +3 -0
  48. package/dist/neutral/Billing/Address/index.d.cts.map +1 -0
  49. package/dist/neutral/Billing/Address/index.d.mts +3 -0
  50. package/dist/neutral/Billing/Address/index.d.mts.map +1 -0
  51. package/dist/neutral/Billing/Address/index.d.ts +3 -0
  52. package/dist/neutral/Billing/Address/index.d.ts.map +1 -0
  53. package/dist/neutral/Billing/Schema.d.cts +3 -0
  54. package/dist/neutral/Billing/Schema.d.cts.map +1 -0
  55. package/dist/neutral/Billing/Schema.d.mts +3 -0
  56. package/dist/neutral/Billing/Schema.d.mts.map +1 -0
  57. package/dist/neutral/Billing/Schema.d.ts +3 -0
  58. package/dist/neutral/Billing/Schema.d.ts.map +1 -0
  59. package/dist/neutral/Billing/index.d.cts +3 -0
  60. package/dist/neutral/Billing/index.d.cts.map +1 -0
  61. package/dist/neutral/Billing/index.d.mts +3 -0
  62. package/dist/neutral/Billing/index.d.mts.map +1 -0
  63. package/dist/neutral/Billing/index.d.ts +3 -0
  64. package/dist/neutral/Billing/index.d.ts.map +1 -0
  65. package/dist/neutral/Currency.d.cts +2 -0
  66. package/dist/neutral/Currency.d.cts.map +1 -0
  67. package/dist/neutral/Currency.d.mts +2 -0
  68. package/dist/neutral/Currency.d.mts.map +1 -0
  69. package/dist/neutral/Currency.d.ts +2 -0
  70. package/dist/neutral/Currency.d.ts.map +1 -0
  71. package/dist/neutral/Escrow/Schema.d.cts +3 -0
  72. package/dist/neutral/Escrow/Schema.d.cts.map +1 -0
  73. package/dist/neutral/Escrow/Schema.d.mts +3 -0
  74. package/dist/neutral/Escrow/Schema.d.mts.map +1 -0
  75. package/dist/neutral/Escrow/Schema.d.ts +3 -0
  76. package/dist/neutral/Escrow/Schema.d.ts.map +1 -0
  77. package/dist/neutral/Escrow/Terms.d.cts +73 -0
  78. package/dist/neutral/Escrow/Terms.d.cts.map +1 -0
  79. package/dist/neutral/Escrow/Terms.d.mts +73 -0
  80. package/dist/neutral/Escrow/Terms.d.mts.map +1 -0
  81. package/dist/neutral/Escrow/Terms.d.ts +73 -0
  82. package/dist/neutral/Escrow/Terms.d.ts.map +1 -0
  83. package/dist/neutral/Escrow/createEscrowIntent.d.cts +40 -0
  84. package/dist/neutral/Escrow/createEscrowIntent.d.cts.map +1 -0
  85. package/dist/neutral/Escrow/createEscrowIntent.d.mts +40 -0
  86. package/dist/neutral/Escrow/createEscrowIntent.d.mts.map +1 -0
  87. package/dist/neutral/Escrow/createEscrowIntent.d.ts +40 -0
  88. package/dist/neutral/Escrow/createEscrowIntent.d.ts.map +1 -0
  89. package/dist/neutral/Escrow/getEscrowSecret.d.cts +7 -0
  90. package/dist/neutral/Escrow/getEscrowSecret.d.cts.map +1 -0
  91. package/dist/neutral/Escrow/getEscrowSecret.d.mts +7 -0
  92. package/dist/neutral/Escrow/getEscrowSecret.d.mts.map +1 -0
  93. package/dist/neutral/Escrow/getEscrowSecret.d.ts +7 -0
  94. package/dist/neutral/Escrow/getEscrowSecret.d.ts.map +1 -0
  95. package/dist/neutral/Escrow/index.d.cts +6 -0
  96. package/dist/neutral/Escrow/index.d.cts.map +1 -0
  97. package/dist/neutral/Escrow/index.d.mts +6 -0
  98. package/dist/neutral/Escrow/index.d.mts.map +1 -0
  99. package/dist/neutral/Escrow/index.d.ts +6 -0
  100. package/dist/neutral/Escrow/index.d.ts.map +1 -0
  101. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.cts +2 -0
  102. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.cts.map +1 -0
  103. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.mts +2 -0
  104. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.mts.map +1 -0
  105. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.ts +2 -0
  106. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/index.d.ts.map +1 -0
  107. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.cts +22 -0
  108. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.cts.map +1 -0
  109. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.mts +22 -0
  110. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.mts.map +1 -0
  111. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts +22 -0
  112. package/dist/neutral/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.d.ts.map +1 -0
  113. package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.cts +2 -0
  114. package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.cts.map +1 -0
  115. package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.mts +2 -0
  116. package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.mts.map +1 -0
  117. package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.ts +2 -0
  118. package/dist/neutral/Escrow/validators/common/TemporalValidators/index.d.ts.map +1 -0
  119. package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.cts +6 -0
  120. package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.cts.map +1 -0
  121. package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.mts +6 -0
  122. package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.mts.map +1 -0
  123. package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.ts +6 -0
  124. package/dist/neutral/Escrow/validators/common/TemporalValidators/validateWithinWindow.d.ts.map +1 -0
  125. package/dist/neutral/Escrow/validators/common/index.d.cts +3 -0
  126. package/dist/neutral/Escrow/validators/common/index.d.cts.map +1 -0
  127. package/dist/neutral/Escrow/validators/common/index.d.mts +3 -0
  128. package/dist/neutral/Escrow/validators/common/index.d.mts.map +1 -0
  129. package/dist/neutral/Escrow/validators/common/index.d.ts +3 -0
  130. package/dist/neutral/Escrow/validators/common/index.d.ts.map +1 -0
  131. package/dist/neutral/Escrow/validators/escrow/agent.d.cts +5 -0
  132. package/dist/neutral/Escrow/validators/escrow/agent.d.cts.map +1 -0
  133. package/dist/neutral/Escrow/validators/escrow/agent.d.mts +5 -0
  134. package/dist/neutral/Escrow/validators/escrow/agent.d.mts.map +1 -0
  135. package/dist/neutral/Escrow/validators/escrow/agent.d.ts +5 -0
  136. package/dist/neutral/Escrow/validators/escrow/agent.d.ts.map +1 -0
  137. package/dist/neutral/Escrow/validators/escrow/appraisal.d.cts +29 -0
  138. package/dist/neutral/Escrow/validators/escrow/appraisal.d.cts.map +1 -0
  139. package/dist/neutral/Escrow/validators/escrow/appraisal.d.mts +29 -0
  140. package/dist/neutral/Escrow/validators/escrow/appraisal.d.mts.map +1 -0
  141. package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts +29 -0
  142. package/dist/neutral/Escrow/validators/escrow/appraisal.d.ts.map +1 -0
  143. package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.cts +10 -0
  144. package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.cts.map +1 -0
  145. package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.mts +10 -0
  146. package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.mts.map +1 -0
  147. package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.ts +10 -0
  148. package/dist/neutral/Escrow/validators/escrow/appraisalAuthorities.d.ts.map +1 -0
  149. package/dist/neutral/Escrow/validators/escrow/assets.d.cts +8 -0
  150. package/dist/neutral/Escrow/validators/escrow/assets.d.cts.map +1 -0
  151. package/dist/neutral/Escrow/validators/escrow/assets.d.mts +8 -0
  152. package/dist/neutral/Escrow/validators/escrow/assets.d.mts.map +1 -0
  153. package/dist/neutral/Escrow/validators/escrow/assets.d.ts +8 -0
  154. package/dist/neutral/Escrow/validators/escrow/assets.d.ts.map +1 -0
  155. package/dist/neutral/Escrow/validators/escrow/buyer.d.cts +8 -0
  156. package/dist/neutral/Escrow/validators/escrow/buyer.d.cts.map +1 -0
  157. package/dist/neutral/Escrow/validators/escrow/buyer.d.mts +8 -0
  158. package/dist/neutral/Escrow/validators/escrow/buyer.d.mts.map +1 -0
  159. package/dist/neutral/Escrow/validators/escrow/buyer.d.ts +8 -0
  160. package/dist/neutral/Escrow/validators/escrow/buyer.d.ts.map +1 -0
  161. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.cts +21 -0
  162. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.cts.map +1 -0
  163. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.mts +21 -0
  164. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.mts.map +1 -0
  165. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts +21 -0
  166. package/dist/neutral/Escrow/validators/escrow/buyerSecret.d.ts.map +1 -0
  167. package/dist/neutral/Escrow/validators/escrow/index.d.cts +11 -0
  168. package/dist/neutral/Escrow/validators/escrow/index.d.cts.map +1 -0
  169. package/dist/neutral/Escrow/validators/escrow/index.d.mts +11 -0
  170. package/dist/neutral/Escrow/validators/escrow/index.d.mts.map +1 -0
  171. package/dist/neutral/Escrow/validators/escrow/index.d.ts +11 -0
  172. package/dist/neutral/Escrow/validators/escrow/index.d.ts.map +1 -0
  173. package/dist/neutral/Escrow/validators/escrow/nbfExp.d.cts +4 -0
  174. package/dist/neutral/Escrow/validators/escrow/nbfExp.d.cts.map +1 -0
  175. package/dist/neutral/Escrow/validators/escrow/nbfExp.d.mts +4 -0
  176. package/dist/neutral/Escrow/validators/escrow/nbfExp.d.mts.map +1 -0
  177. package/dist/neutral/Escrow/validators/escrow/nbfExp.d.ts +4 -0
  178. package/dist/neutral/Escrow/validators/escrow/nbfExp.d.ts.map +1 -0
  179. package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.cts +5 -0
  180. package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.cts.map +1 -0
  181. package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.mts +5 -0
  182. package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.mts.map +1 -0
  183. package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.ts +5 -0
  184. package/dist/neutral/Escrow/validators/escrow/paymentAuthorities.d.ts.map +1 -0
  185. package/dist/neutral/Escrow/validators/escrow/seller.d.cts +8 -0
  186. package/dist/neutral/Escrow/validators/escrow/seller.d.cts.map +1 -0
  187. package/dist/neutral/Escrow/validators/escrow/seller.d.mts +8 -0
  188. package/dist/neutral/Escrow/validators/escrow/seller.d.mts.map +1 -0
  189. package/dist/neutral/Escrow/validators/escrow/seller.d.ts +8 -0
  190. package/dist/neutral/Escrow/validators/escrow/seller.d.ts.map +1 -0
  191. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.cts +21 -0
  192. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.cts.map +1 -0
  193. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.mts +21 -0
  194. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.mts.map +1 -0
  195. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts +21 -0
  196. package/dist/neutral/Escrow/validators/escrow/sellerSecret.d.ts.map +1 -0
  197. package/dist/neutral/Escrow/validators/index.d.cts +3 -0
  198. package/dist/neutral/Escrow/validators/index.d.cts.map +1 -0
  199. package/dist/neutral/Escrow/validators/index.d.mts +3 -0
  200. package/dist/neutral/Escrow/validators/index.d.mts.map +1 -0
  201. package/dist/neutral/Escrow/validators/index.d.ts +3 -0
  202. package/dist/neutral/Escrow/validators/index.d.ts.map +1 -0
  203. package/dist/neutral/Payment/Instrument/Card/Payload.d.cts +50 -0
  204. package/dist/neutral/Payment/Instrument/Card/Payload.d.cts.map +1 -0
  205. package/dist/neutral/Payment/Instrument/Card/Payload.d.mts +50 -0
  206. package/dist/neutral/Payment/Instrument/Card/Payload.d.mts.map +1 -0
  207. package/dist/neutral/Payment/Instrument/Card/Payload.d.ts +50 -0
  208. package/dist/neutral/Payment/Instrument/Card/Payload.d.ts.map +1 -0
  209. package/dist/neutral/Payment/Instrument/Card/Schema.d.cts +3 -0
  210. package/dist/neutral/Payment/Instrument/Card/Schema.d.cts.map +1 -0
  211. package/dist/neutral/Payment/Instrument/Card/Schema.d.mts +3 -0
  212. package/dist/neutral/Payment/Instrument/Card/Schema.d.mts.map +1 -0
  213. package/dist/neutral/Payment/Instrument/Card/Schema.d.ts +3 -0
  214. package/dist/neutral/Payment/Instrument/Card/Schema.d.ts.map +1 -0
  215. package/dist/neutral/Payment/Instrument/Card/index.d.cts +3 -0
  216. package/dist/neutral/Payment/Instrument/Card/index.d.cts.map +1 -0
  217. package/dist/neutral/Payment/Instrument/Card/index.d.mts +3 -0
  218. package/dist/neutral/Payment/Instrument/Card/index.d.mts.map +1 -0
  219. package/dist/neutral/Payment/Instrument/Card/index.d.ts +3 -0
  220. package/dist/neutral/Payment/Instrument/Card/index.d.ts.map +1 -0
  221. package/dist/neutral/Payment/Instrument/Schema.d.cts +3 -0
  222. package/dist/neutral/Payment/Instrument/Schema.d.cts.map +1 -0
  223. package/dist/neutral/Payment/Instrument/Schema.d.mts +3 -0
  224. package/dist/neutral/Payment/Instrument/Schema.d.mts.map +1 -0
  225. package/dist/neutral/Payment/Instrument/Schema.d.ts +3 -0
  226. package/dist/neutral/Payment/Instrument/Schema.d.ts.map +1 -0
  227. package/dist/neutral/Payment/Instrument/index.d.cts +3 -0
  228. package/dist/neutral/Payment/Instrument/index.d.cts.map +1 -0
  229. package/dist/neutral/Payment/Instrument/index.d.mts +3 -0
  230. package/dist/neutral/Payment/Instrument/index.d.mts.map +1 -0
  231. package/dist/neutral/Payment/Instrument/index.d.ts +3 -0
  232. package/dist/neutral/Payment/Instrument/index.d.ts.map +1 -0
  233. package/dist/neutral/Payment/Payload.d.cts +30 -0
  234. package/dist/neutral/Payment/Payload.d.cts.map +1 -0
  235. package/dist/neutral/Payment/Payload.d.mts +30 -0
  236. package/dist/neutral/Payment/Payload.d.mts.map +1 -0
  237. package/dist/neutral/Payment/Payload.d.ts +30 -0
  238. package/dist/neutral/Payment/Payload.d.ts.map +1 -0
  239. package/dist/neutral/Payment/Schema.d.cts +3 -0
  240. package/dist/neutral/Payment/Schema.d.cts.map +1 -0
  241. package/dist/neutral/Payment/Schema.d.mts +3 -0
  242. package/dist/neutral/Payment/Schema.d.mts.map +1 -0
  243. package/dist/neutral/Payment/Schema.d.ts +3 -0
  244. package/dist/neutral/Payment/Schema.d.ts.map +1 -0
  245. package/dist/neutral/Payment/Status/Payload.d.cts +25 -0
  246. package/dist/neutral/Payment/Status/Payload.d.cts.map +1 -0
  247. package/dist/neutral/Payment/Status/Payload.d.mts +25 -0
  248. package/dist/neutral/Payment/Status/Payload.d.mts.map +1 -0
  249. package/dist/neutral/Payment/Status/Payload.d.ts +25 -0
  250. package/dist/neutral/Payment/Status/Payload.d.ts.map +1 -0
  251. package/dist/neutral/Payment/Status/Schema.d.cts +3 -0
  252. package/dist/neutral/Payment/Status/Schema.d.cts.map +1 -0
  253. package/dist/neutral/Payment/Status/Schema.d.mts +3 -0
  254. package/dist/neutral/Payment/Status/Schema.d.mts.map +1 -0
  255. package/dist/neutral/Payment/Status/Schema.d.ts +3 -0
  256. package/dist/neutral/Payment/Status/Schema.d.ts.map +1 -0
  257. package/dist/neutral/Payment/Status/index.d.cts +3 -0
  258. package/dist/neutral/Payment/Status/index.d.cts.map +1 -0
  259. package/dist/neutral/Payment/Status/index.d.mts +3 -0
  260. package/dist/neutral/Payment/Status/index.d.mts.map +1 -0
  261. package/dist/neutral/Payment/Status/index.d.ts +3 -0
  262. package/dist/neutral/Payment/Status/index.d.ts.map +1 -0
  263. package/dist/neutral/Payment/index.d.cts +5 -0
  264. package/dist/neutral/Payment/index.d.cts.map +1 -0
  265. package/dist/neutral/Payment/index.d.mts +5 -0
  266. package/dist/neutral/Payment/index.d.mts.map +1 -0
  267. package/dist/neutral/Payment/index.d.ts +5 -0
  268. package/dist/neutral/Payment/index.d.ts.map +1 -0
  269. package/dist/neutral/Purchase/Payload.d.cts +31 -0
  270. package/dist/neutral/Purchase/Payload.d.cts.map +1 -0
  271. package/dist/neutral/Purchase/Payload.d.mts +31 -0
  272. package/dist/neutral/Purchase/Payload.d.mts.map +1 -0
  273. package/dist/neutral/Purchase/Payload.d.ts +31 -0
  274. package/dist/neutral/Purchase/Payload.d.ts.map +1 -0
  275. package/dist/neutral/Purchase/Schema.d.cts +3 -0
  276. package/dist/neutral/Purchase/Schema.d.cts.map +1 -0
  277. package/dist/neutral/Purchase/Schema.d.mts +3 -0
  278. package/dist/neutral/Purchase/Schema.d.mts.map +1 -0
  279. package/dist/neutral/Purchase/Schema.d.ts +3 -0
  280. package/dist/neutral/Purchase/Schema.d.ts.map +1 -0
  281. package/dist/neutral/Purchase/index.d.cts +3 -0
  282. package/dist/neutral/Purchase/index.d.cts.map +1 -0
  283. package/dist/neutral/Purchase/index.d.mts +3 -0
  284. package/dist/neutral/Purchase/index.d.mts.map +1 -0
  285. package/dist/neutral/Purchase/index.d.ts +3 -0
  286. package/dist/neutral/Purchase/index.d.ts.map +1 -0
  287. package/dist/neutral/Receipt/Payload.d.cts +30 -0
  288. package/dist/neutral/Receipt/Payload.d.cts.map +1 -0
  289. package/dist/neutral/Receipt/Payload.d.mts +30 -0
  290. package/dist/neutral/Receipt/Payload.d.mts.map +1 -0
  291. package/dist/neutral/Receipt/Payload.d.ts +30 -0
  292. package/dist/neutral/Receipt/Payload.d.ts.map +1 -0
  293. package/dist/neutral/Receipt/Schema.d.cts +3 -0
  294. package/dist/neutral/Receipt/Schema.d.cts.map +1 -0
  295. package/dist/neutral/Receipt/Schema.d.mts +3 -0
  296. package/dist/neutral/Receipt/Schema.d.mts.map +1 -0
  297. package/dist/neutral/Receipt/Schema.d.ts +3 -0
  298. package/dist/neutral/Receipt/Schema.d.ts.map +1 -0
  299. package/dist/neutral/Receipt/index.d.cts +3 -0
  300. package/dist/neutral/Receipt/index.d.cts.map +1 -0
  301. package/dist/neutral/Receipt/index.d.mts +3 -0
  302. package/dist/neutral/Receipt/index.d.mts.map +1 -0
  303. package/dist/neutral/Receipt/index.d.ts +3 -0
  304. package/dist/neutral/Receipt/index.d.ts.map +1 -0
  305. package/dist/neutral/Schema.d.cts +3 -0
  306. package/dist/neutral/Schema.d.cts.map +1 -0
  307. package/dist/neutral/Schema.d.mts +3 -0
  308. package/dist/neutral/Schema.d.mts.map +1 -0
  309. package/dist/neutral/Schema.d.ts +3 -0
  310. package/dist/neutral/Schema.d.ts.map +1 -0
  311. package/dist/neutral/index.cjs +494 -0
  312. package/dist/neutral/index.cjs.map +1 -0
  313. package/dist/neutral/index.d.cts +7 -0
  314. package/dist/neutral/index.d.cts.map +1 -0
  315. package/dist/neutral/index.d.mts +7 -0
  316. package/dist/neutral/index.d.mts.map +1 -0
  317. package/dist/neutral/index.d.ts +7 -0
  318. package/dist/neutral/index.d.ts.map +1 -0
  319. package/dist/neutral/index.js +487 -0
  320. package/dist/neutral/index.js.map +1 -0
  321. package/dist/node/Billing/Address/Address.d.cts +1 -1
  322. package/dist/node/Billing/Address/Address.d.cts.map +1 -1
  323. package/dist/node/Billing/Address/Address.d.mts +1 -1
  324. package/dist/node/Billing/Address/Address.d.mts.map +1 -1
  325. package/dist/node/Billing/Address/Address.d.ts +1 -1
  326. package/dist/node/Billing/Address/Address.d.ts.map +1 -1
  327. package/dist/node/Payment/Status/Payload.d.cts +25 -0
  328. package/dist/node/Payment/Status/Payload.d.cts.map +1 -0
  329. package/dist/node/Payment/Status/Payload.d.mts +25 -0
  330. package/dist/node/Payment/Status/Payload.d.mts.map +1 -0
  331. package/dist/node/Payment/Status/Payload.d.ts +25 -0
  332. package/dist/node/Payment/Status/Payload.d.ts.map +1 -0
  333. package/dist/node/Payment/Status/Schema.d.cts +3 -0
  334. package/dist/node/Payment/Status/Schema.d.cts.map +1 -0
  335. package/dist/node/Payment/Status/Schema.d.mts +3 -0
  336. package/dist/node/Payment/Status/Schema.d.mts.map +1 -0
  337. package/dist/node/Payment/Status/Schema.d.ts +3 -0
  338. package/dist/node/Payment/Status/Schema.d.ts.map +1 -0
  339. package/dist/node/Payment/Status/index.d.cts +3 -0
  340. package/dist/node/Payment/Status/index.d.cts.map +1 -0
  341. package/dist/node/Payment/Status/index.d.mts +3 -0
  342. package/dist/node/Payment/Status/index.d.mts.map +1 -0
  343. package/dist/node/Payment/Status/index.d.ts +3 -0
  344. package/dist/node/Payment/Status/index.d.ts.map +1 -0
  345. package/dist/node/Payment/index.d.cts +1 -0
  346. package/dist/node/Payment/index.d.cts.map +1 -1
  347. package/dist/node/Payment/index.d.mts +1 -0
  348. package/dist/node/Payment/index.d.mts.map +1 -1
  349. package/dist/node/Payment/index.d.ts +1 -0
  350. package/dist/node/Payment/index.d.ts.map +1 -1
  351. package/dist/node/index.cjs +27 -8
  352. package/dist/node/index.cjs.map +1 -1
  353. package/dist/node/index.js +29 -10
  354. package/dist/node/index.js.map +1 -1
  355. package/package.json +14 -14
  356. package/src/Billing/Address/Address.ts +1 -1
  357. package/src/Payment/Status/Payload.ts +35 -0
  358. package/src/Payment/Status/Schema.ts +4 -0
  359. package/src/Payment/Status/index.ts +2 -0
  360. package/src/Payment/index.ts +1 -0
@@ -5,7 +5,7 @@ import { BillingAddressSchema } from './Schema';
5
5
  */
6
6
  export interface BillingAddressFields {
7
7
  /** Street address line 1. */
8
- address: string;
8
+ address?: string;
9
9
  /** Street address line 2. */
10
10
  address2?: string | null;
11
11
  /** City of the billing address. */
@@ -1 +1 @@
1
- {"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../../src/Billing/Address/Address.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAA;AAEhF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;CAA8D,CAAA;AAE3F;;GAEG;AACH,eAAO,MAAM,2BAA2B;;EAAyE,CAAA;AAEjH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;EAAsE,CAAA"}
1
+ {"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../../src/Billing/Address/Address.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAA;AAEhF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;CAA8D,CAAA;AAE3F;;GAEG;AACH,eAAO,MAAM,2BAA2B;;EAAyE,CAAA;AAEjH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;EAAsE,CAAA"}
@@ -5,7 +5,7 @@ import { BillingAddressSchema } from './Schema';
5
5
  */
6
6
  export interface BillingAddressFields {
7
7
  /** Street address line 1. */
8
- address: string;
8
+ address?: string;
9
9
  /** Street address line 2. */
10
10
  address2?: string | null;
11
11
  /** City of the billing address. */
@@ -1 +1 @@
1
- {"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../../src/Billing/Address/Address.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAA;AAEhF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;CAA8D,CAAA;AAE3F;;GAEG;AACH,eAAO,MAAM,2BAA2B;;EAAyE,CAAA;AAEjH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;EAAsE,CAAA"}
1
+ {"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../../src/Billing/Address/Address.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,OAAO,CAAC,EAAE,MAAM,CAAA;IAChB,iBAAiB;IACjB,SAAS,EAAE,MAAM,CAAA;IACjB,gBAAgB;IAChB,QAAQ,EAAE,MAAM,CAAA;IAChB,wEAAwE;IACxE,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC5B,iDAAiD;IACjD,UAAU,CAAC,EAAE,MAAM,CAAA;IACnB,8CAA8C;IAC9C,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAA;AAEhF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;CAA8D,CAAA;AAE3F;;GAEG;AACH,eAAO,MAAM,2BAA2B;;EAAyE,CAAA;AAEjH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;EAAsE,CAAA"}
@@ -5,7 +5,7 @@ import { BillingAddressSchema } from './Schema';
5
5
  */
6
6
  export interface BillingAddressFields {
7
7
  /** Street address line 1. */
8
- address: string;
8
+ address?: string;
9
9
  /** Street address line 2. */
10
10
  address2?: string | null;
11
11
  /** City of the billing address. */
@@ -1 +1 @@
1
- {"version":3,"file":"Address.d.ts","sourceRoot":"","sources":["../../../../src/Billing/Address/Address.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0F,OAAO,EAAE,MAAM,4BAA4B,CAAA;AAE5I,OAAO,EAAE,oBAAoB,EAAE,MAAM,UAAU,CAAA;AAE/C;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC,6BAA6B;IAC7B,OAAO,EAAE,MAAM,CAAA;IACf,6BAA6B;IAC7B,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IACxB,mCAAmC;IACnC,IAAI,CAAC,EAAE,MAAM,CAAA;IACb,oEAAoE;IACpE,OAAO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AA;CAChB;AAED;;GAEG;AACH,MAAM,MAAM,cAAc,GAAG,OAAO,CAAC,oBAAoB,EAAE,oBAAoB,CAAC,CAAA;AAEhF;;GAEG;AACH,eAAO,MAAM,gBAAgB;;CAA8D,CAAA;AAE3F;;GAEG;AACH,eAAO,MAAM,2BAA2B;;EAAyE,CAAA;AAEjH;;GAEG;AACH,eAAO,MAAM,wBAAwB;;EAAsE,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { PayloadWithSources } from '@xyo-network/payload-model';
2
+ import { PaymentStatusSchema } from './Schema';
3
+ export interface PaymentStatusFields {
4
+ /**
5
+ * The status of the payment (i.e. declined)
6
+ */
7
+ status: string;
8
+ }
9
+ /**
10
+ * A payment status is the outcome of a payment attempt
11
+ */
12
+ export type PaymentStatus = PayloadWithSources<PaymentStatusFields, PaymentStatusSchema>;
13
+ /**
14
+ * Identity function for determine if an object is a PaymentStatus
15
+ */
16
+ export declare const isPaymentStatus: (x?: unknown) => x is PaymentStatus;
17
+ /**
18
+ * Identity function for determine if an object is a PaymentStatus with sources
19
+ */
20
+ export declare const isPaymentStatusWithSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<PaymentStatus>;
21
+ /**
22
+ * Identity function for determine if an object is a PaymentStatus with meta
23
+ */
24
+ export declare const isPaymentStatusWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<PaymentStatus>;
25
+ //# sourceMappingURL=Payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../src/Payment/Status/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,kBAAkB,EACnB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,eAAe,qCAA4D,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,0BAA0B,uFAAuE,CAAA;AAE9G;;GAEG;AACH,eAAO,MAAM,uBAAuB,oFAAoE,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { PayloadWithSources } from '@xyo-network/payload-model';
2
+ import { PaymentStatusSchema } from './Schema';
3
+ export interface PaymentStatusFields {
4
+ /**
5
+ * The status of the payment (i.e. declined)
6
+ */
7
+ status: string;
8
+ }
9
+ /**
10
+ * A payment status is the outcome of a payment attempt
11
+ */
12
+ export type PaymentStatus = PayloadWithSources<PaymentStatusFields, PaymentStatusSchema>;
13
+ /**
14
+ * Identity function for determine if an object is a PaymentStatus
15
+ */
16
+ export declare const isPaymentStatus: (x?: unknown) => x is PaymentStatus;
17
+ /**
18
+ * Identity function for determine if an object is a PaymentStatus with sources
19
+ */
20
+ export declare const isPaymentStatusWithSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<PaymentStatus>;
21
+ /**
22
+ * Identity function for determine if an object is a PaymentStatus with meta
23
+ */
24
+ export declare const isPaymentStatusWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<PaymentStatus>;
25
+ //# sourceMappingURL=Payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../src/Payment/Status/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,kBAAkB,EACnB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,eAAe,qCAA4D,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,0BAA0B,uFAAuE,CAAA;AAE9G;;GAEG;AACH,eAAO,MAAM,uBAAuB,oFAAoE,CAAA"}
@@ -0,0 +1,25 @@
1
+ import { PayloadWithSources } from '@xyo-network/payload-model';
2
+ import { PaymentStatusSchema } from './Schema';
3
+ export interface PaymentStatusFields {
4
+ /**
5
+ * The status of the payment (i.e. declined)
6
+ */
7
+ status: string;
8
+ }
9
+ /**
10
+ * A payment status is the outcome of a payment attempt
11
+ */
12
+ export type PaymentStatus = PayloadWithSources<PaymentStatusFields, PaymentStatusSchema>;
13
+ /**
14
+ * Identity function for determine if an object is a PaymentStatus
15
+ */
16
+ export declare const isPaymentStatus: (x?: unknown) => x is PaymentStatus;
17
+ /**
18
+ * Identity function for determine if an object is a PaymentStatus with sources
19
+ */
20
+ export declare const isPaymentStatusWithSources: (x?: unknown) => x is import("@xyo-network/payload-model").WithSources<PaymentStatus>;
21
+ /**
22
+ * Identity function for determine if an object is a PaymentStatus with meta
23
+ */
24
+ export declare const isPaymentStatusWithMeta: (x?: unknown) => x is import("@xyo-network/payload-model").WithMeta<PaymentStatus>;
25
+ //# sourceMappingURL=Payload.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Payload.d.ts","sourceRoot":"","sources":["../../../../src/Payment/Status/Payload.ts"],"names":[],"mappings":"AAAA,OAAO,EAIL,kBAAkB,EACnB,MAAM,4BAA4B,CAAA;AAEnC,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAA;AAE9C,MAAM,WAAW,mBAAmB;IAClC;;OAEG;IACH,MAAM,EAAE,MAAM,CAAA;CACf;AAED;;GAEG;AACH,MAAM,MAAM,aAAa,GAAG,kBAAkB,CAAC,mBAAmB,EAAE,mBAAmB,CAAC,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,eAAe,qCAA4D,CAAA;AAExF;;GAEG;AACH,eAAO,MAAM,0BAA0B,uFAAuE,CAAA;AAE9G;;GAEG;AACH,eAAO,MAAM,uBAAuB,oFAAoE,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const PaymentStatusSchema = "network.xyo.payments.payment.status";
2
+ export type PaymentStatusSchema = typeof PaymentStatusSchema;
3
+ //# sourceMappingURL=Schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../../src/Payment/Status/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,wCAA4B,CAAA;AAC5D,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const PaymentStatusSchema = "network.xyo.payments.payment.status";
2
+ export type PaymentStatusSchema = typeof PaymentStatusSchema;
3
+ //# sourceMappingURL=Schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../../src/Payment/Status/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,wCAA4B,CAAA;AAC5D,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export declare const PaymentStatusSchema = "network.xyo.payments.payment.status";
2
+ export type PaymentStatusSchema = typeof PaymentStatusSchema;
3
+ //# sourceMappingURL=Schema.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"Schema.d.ts","sourceRoot":"","sources":["../../../../src/Payment/Status/Schema.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,mBAAmB,wCAA4B,CAAA;AAC5D,MAAM,MAAM,mBAAmB,GAAG,OAAO,mBAAmB,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './Payload';
2
+ export * from './Schema';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Payment/Status/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './Payload';
2
+ export * from './Schema';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Payment/Status/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
@@ -0,0 +1,3 @@
1
+ export * from './Payload';
2
+ export * from './Schema';
3
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/Payment/Status/index.ts"],"names":[],"mappings":"AAAA,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export * from './Instrument';
2
2
  export * from './Payload';
3
3
  export * from './Schema';
4
+ export * from './Status';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Payment/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Payment/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export * from './Instrument';
2
2
  export * from './Payload';
3
3
  export * from './Schema';
4
+ export * from './Status';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Payment/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Payment/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA"}
@@ -1,4 +1,5 @@
1
1
  export * from './Instrument';
2
2
  export * from './Payload';
3
3
  export * from './Schema';
4
+ export * from './Status';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Payment/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/Payment/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,WAAW,CAAA;AACzB,cAAc,UAAU,CAAA;AACxB,cAAc,UAAU,CAAA"}
@@ -27,6 +27,7 @@ __export(src_exports, {
27
27
  PaymentCardSchema: () => PaymentCardSchema,
28
28
  PaymentInstrumentSchema: () => PaymentInstrumentSchema,
29
29
  PaymentSchema: () => PaymentSchema,
30
+ PaymentStatusSchema: () => PaymentStatusSchema,
30
31
  PurchaseSchema: () => PurchaseSchema,
31
32
  ReceiptSchema: () => ReceiptSchema,
32
33
  appraisalAuthoritiesExistValidator: () => appraisalAuthoritiesExistValidator,
@@ -58,6 +59,9 @@ __export(src_exports, {
58
59
  isPaymentCard: () => isPaymentCard,
59
60
  isPaymentCardWithMeta: () => isPaymentCardWithMeta,
60
61
  isPaymentCardWithSources: () => isPaymentCardWithSources,
62
+ isPaymentStatus: () => isPaymentStatus,
63
+ isPaymentStatusWithMeta: () => isPaymentStatusWithMeta,
64
+ isPaymentStatusWithSources: () => isPaymentStatusWithSources,
61
65
  isPaymentWithMeta: () => isPaymentWithMeta,
62
66
  isPaymentWithSources: () => isPaymentWithSources,
63
67
  isPurchase: () => isPurchase,
@@ -455,25 +459,36 @@ var isPayment = (0, import_payload_model4.isPayloadOfSchemaType)(PaymentSchema);
455
459
  var isPaymentWithSources = (0, import_payload_model4.isPayloadOfSchemaTypeWithSources)(PaymentSchema);
456
460
  var isPaymentWithMeta = (0, import_payload_model4.isPayloadOfSchemaTypeWithMeta)(PaymentSchema);
457
461
 
458
- // src/Purchase/Payload.ts
462
+ // src/Payment/Status/Payload.ts
459
463
  var import_payload_model5 = require("@xyo-network/payload-model");
460
464
 
465
+ // src/Payment/Status/Schema.ts
466
+ var PaymentStatusSchema = `${PaymentSchema}.status`;
467
+
468
+ // src/Payment/Status/Payload.ts
469
+ var isPaymentStatus = (0, import_payload_model5.isPayloadOfSchemaType)(PaymentStatusSchema);
470
+ var isPaymentStatusWithSources = (0, import_payload_model5.isPayloadOfSchemaTypeWithSources)(PaymentStatusSchema);
471
+ var isPaymentStatusWithMeta = (0, import_payload_model5.isPayloadOfSchemaTypeWithMeta)(PaymentStatusSchema);
472
+
473
+ // src/Purchase/Payload.ts
474
+ var import_payload_model6 = require("@xyo-network/payload-model");
475
+
461
476
  // src/Purchase/Schema.ts
462
477
  var PurchaseSchema = `${PaymentsSchema}.purchase`;
463
478
 
464
479
  // src/Purchase/Payload.ts
465
- var isPurchase = (0, import_payload_model5.isPayloadOfSchemaType)(PurchaseSchema);
466
- var isPurchaseWithSources = (0, import_payload_model5.isPayloadOfSchemaTypeWithSources)(PurchaseSchema);
467
- var isPurchaseWithMeta = (0, import_payload_model5.isPayloadOfSchemaTypeWithMeta)(PurchaseSchema);
480
+ var isPurchase = (0, import_payload_model6.isPayloadOfSchemaType)(PurchaseSchema);
481
+ var isPurchaseWithSources = (0, import_payload_model6.isPayloadOfSchemaTypeWithSources)(PurchaseSchema);
482
+ var isPurchaseWithMeta = (0, import_payload_model6.isPayloadOfSchemaTypeWithMeta)(PurchaseSchema);
468
483
 
469
484
  // src/Receipt/Payload.ts
470
- var import_payload_model6 = require("@xyo-network/payload-model");
485
+ var import_payload_model7 = require("@xyo-network/payload-model");
471
486
 
472
487
  // src/Receipt/Schema.ts
473
488
  var ReceiptSchema = `${PaymentsSchema}.receipt`;
474
489
 
475
490
  // src/Receipt/Payload.ts
476
- var isReceipt = (0, import_payload_model6.isPayloadOfSchemaType)(ReceiptSchema);
477
- var isReceiptWithSources = (0, import_payload_model6.isPayloadOfSchemaTypeWithSources)(ReceiptSchema);
478
- var isReceiptWithMeta = (0, import_payload_model6.isPayloadOfSchemaTypeWithMeta)(ReceiptSchema);
491
+ var isReceipt = (0, import_payload_model7.isPayloadOfSchemaType)(ReceiptSchema);
492
+ var isReceiptWithSources = (0, import_payload_model7.isPayloadOfSchemaTypeWithSources)(ReceiptSchema);
493
+ var isReceiptWithMeta = (0, import_payload_model7.isPayloadOfSchemaTypeWithMeta)(ReceiptSchema);
479
494
  //# sourceMappingURL=index.cjs.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/index.ts","../../src/Billing/Address/Address.ts","../../src/Schema.ts","../../src/Billing/Schema.ts","../../src/Billing/Address/Schema.ts","../../src/Escrow/createEscrowIntent.ts","../../src/Escrow/getEscrowSecret.ts","../../src/Escrow/Schema.ts","../../src/Escrow/Terms.ts","../../src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts","../../src/Escrow/validators/common/TemporalValidators/validateWithinWindow.ts","../../src/Escrow/validators/escrow/agent.ts","../../src/Escrow/validators/escrow/appraisal.ts","../../src/Escrow/validators/escrow/appraisalAuthorities.ts","../../src/Escrow/validators/escrow/assets.ts","../../src/Escrow/validators/escrow/buyer.ts","../../src/Escrow/validators/escrow/buyerSecret.ts","../../src/Escrow/validators/escrow/nbfExp.ts","../../src/Escrow/validators/escrow/paymentAuthorities.ts","../../src/Escrow/validators/escrow/seller.ts","../../src/Escrow/validators/escrow/sellerSecret.ts","../../src/Payment/Instrument/Card/Payload.ts","../../src/Payment/Schema.ts","../../src/Payment/Instrument/Schema.ts","../../src/Payment/Instrument/Card/Schema.ts","../../src/Payment/Payload.ts","../../src/Purchase/Payload.ts","../../src/Purchase/Schema.ts","../../src/Receipt/Payload.ts","../../src/Receipt/Schema.ts"],"sourcesContent":["export * from './Billing'\nexport * from './Currency'\nexport * from './Escrow'\nexport * from './Payment'\nexport * from './Purchase'\nexport * from './Receipt'\n","import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { BillingAddressSchema } from './Schema'\n\n/**\n * The fields describing a billing address.\n */\nexport interface BillingAddressFields {\n /** Street address line 1. */\n address: string\n /** Street address line 2. */\n address2?: string | null\n /** City of the billing address. */\n city?: string\n /** Country code of the billing address, ISO 3166-1 alpha-2 code. */\n country?: string\n /** First name */\n firstName: string\n /** Last name */\n lastName: string\n /** Organization or company name associated with the billing address. */\n organization?: string | null\n /** Postal or ZIP code of the billing address. */\n postalCode?: string\n /** State or region of the billing address. */\n region?: string\n}\n\n/**\n * A BillingAddress Payload\n */\nexport type BillingAddress = Payload<BillingAddressFields, BillingAddressSchema>\n\n/**\n * Identity function for determine if an object is a BillingAddress\n */\nexport const isBillingAddress = isPayloadOfSchemaType<BillingAddress>(BillingAddressSchema)\n\n/**\n * Identity function for determine if an object is a BillingAddress with sources\n */\nexport const isBillingAddressWithSources = isPayloadOfSchemaTypeWithSources<BillingAddress>(BillingAddressSchema)\n\n/**\n * Identity function for determine if an object is a BillingAddress with meta\n */\nexport const isBillingAddressWithMeta = isPayloadOfSchemaTypeWithMeta<BillingAddress>(BillingAddressSchema)\n","export const PaymentsSchema = 'network.xyo.payments'\nexport type PaymentsSchema = typeof PaymentsSchema\n","import { PaymentsSchema } from '../Schema'\n\nexport const BillingSchema = `${PaymentsSchema}.billing`\nexport type BillingSchema = typeof BillingSchema\n","import { BillingSchema } from '../Schema'\n\nexport const BillingAddressSchema = `${BillingSchema}.address`\nexport type BillingAddressSchema = typeof BillingAddressSchema\n","import { AccountInstance } from '@xyo-network/account-model'\nimport { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'\nimport { IdPayload } from '@xyo-network/id-payload-plugin'\n\nimport { EscrowTerms } from './Terms'\n\n/**\n * Creates an escrow intent\n * @deprecated Use createEscrowIntentWithSecret instead\n * @param terms The payloads describing the terms for the escrow\n * @param account The account to create the escrow intent with\n * @returns The escrow intent\n */\nexport const createEscrowIntent = async (terms: EscrowTerms[], account: AccountInstance) => {\n const result = await new BoundWitnessBuilder({ accounts: [account] }).payloads([...terms]).build()\n return result\n}\n\n/**\n * Creates an escrow intent (for a buyer or seller) using the supplied secret\n * @param terms The payload describing the terms for the escrow\n * @param secret The secret for the escrow principal party to use for the escrow\n * @param account The account to create the escrow intent with\n * @returns The escrow intent\n */\nexport const createEscrowIntentWithSecret = async (terms: EscrowTerms, secret: IdPayload, account: AccountInstance) => {\n const result = await new BoundWitnessBuilder({ accounts: [account] }).payloads([terms, secret]).build()\n return result\n}\n","import { Crypto } from '@xylabs/crypto'\nimport { IdPayload, IdSchema } from '@xyo-network/id-payload-plugin'\n\n/**\n * Returns a cryptographically random secret to use for escrow\n * @returns The escrow secret\n */\nexport const getEscrowSecret = (): IdPayload => {\n return { salt: Crypto.randomUUID(), schema: IdSchema }\n}\n","export const EscrowSchema = 'network.xyo.escrow'\nexport type EscrowSchema = typeof EscrowSchema\n","import { Address, Hash } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { EscrowSchema } from './Schema'\n\nexport const EscrowTermsSchema = `${EscrowSchema}.terms` as const\nexport type EscrowTermsSchema = typeof EscrowTermsSchema\n\n// TODO: Include escrow agent in escrow terms\nexport interface EscrowTermsFields {\n /**\n * The trusted estimators for the worth of the things being sold\n */\n appraisalAuthorities: Address[]\n /**\n * The estimated worths of the things being sold\n */\n appraisals: Hash[]\n /**\n * The things being sold\n */\n assets: Hash[]\n /**\n * The buyer\n */\n buyer: Address[]\n /**\n * The buyer\n */\n buyerSecret: Hash\n /**\n * The escrow agent responsible for the escrow\n */\n escrowAgent: Address\n /**\n * The time the escrow expires\n */\n exp: number\n /**\n * The time the escrow starts\n */\n nbf: number\n /**\n * The trusted payment authorities\n */\n paymentAuthorities: Address[]\n /**\n * The seller\n */\n seller: Address[]\n /**\n * The seller\n */\n sellerSecret: Hash\n}\n\n/**\n * The terms of an escrow\n */\nexport type EscrowTerms = Payload<Partial<EscrowTermsFields>, EscrowTermsSchema>\n\n/**\n * Identity function for determining if an object is an EscrowTerms\n */\nexport const isEscrowTerms = isPayloadOfSchemaType<EscrowTerms>(EscrowTermsSchema)\n\n/**\n * Identity function for determining if an object is an EscrowTerms with sources\n */\nexport const isEscrowTermsWithSources = isPayloadOfSchemaTypeWithSources<EscrowTerms>(EscrowTermsSchema)\n\n/**\n * Identity function for determining if an object is an EscrowTerms with meta\n */\nexport const isEscrowTermsWithMeta = isPayloadOfSchemaTypeWithMeta<EscrowTerms>(EscrowTermsSchema)\n","import { ModuleIdentifier } from '@xyo-network/module-model'\nimport { PayloadValueExpression } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../../Terms'\n\n/**\n * Checks if property value of the escrow terms contains one of the valid moduleIdentifiers\n * @param escrowTerms The escrow terms to validate\n * @param propertyExpression The selector to get the property containing the moduleIdentifier(s) from the escrow terms\n * @param moduleIdentifiers The list of allowed moduleIdentifiers\n * @param required Is the property required to be present\n * @returns True if the property value contains one of the valid moduleIdentifiers\n */\nexport const moduleIdentifiersContainsOneOf = (\n escrowTerms: EscrowTerms,\n propertyExpression: PayloadValueExpression<EscrowTerms, 'appraisalAuthorities' | 'buyer' | 'escrowAgent' | 'paymentAuthorities' | 'seller'>,\n moduleIdentifiers: ModuleIdentifier[],\n required: boolean = true,\n) => {\n const termsValue: string | string[] | undefined = propertyExpression(escrowTerms)\n if (termsValue === undefined) {\n return required ? false : true\n } else {\n return Array.isArray(termsValue) ? termsValue.some((address) => moduleIdentifiers.includes(address)) : moduleIdentifiers.includes(termsValue)\n }\n}\n\n/**\n * Checks if property value of the escrow terms contains all of the valid moduleIdentifiers\n * @param escrowTerms The escrow terms to validate\n * @param selector The selector to get the property containing the moduleIdentifier(s) from the escrow terms\n * @param moduleIdentifiers The list of allowed moduleIdentifiers\n * @param required Is the property required to be present\n * @returns True if the property value contains all of the valid moduleIdentifiers\n */\nexport const moduleIdentifiersContainsAllOf = (\n escrowTerms: EscrowTerms,\n selector: PayloadValueExpression<EscrowTerms, 'appraisalAuthorities' | 'buyer' | 'escrowAgent' | 'paymentAuthorities' | 'seller'>,\n moduleIdentifiers: ModuleIdentifier[],\n required: boolean = true,\n) => {\n const termsValue: string | string[] | undefined = selector(escrowTerms)\n if (termsValue === undefined) {\n return required ? false : true\n } else {\n return Array.isArray(termsValue) ? termsValue.every((address) => moduleIdentifiers.includes(address)) : moduleIdentifiers.includes(termsValue)\n }\n}\n","export type Windowed = { exp?: number; nbf?: number }\n\nexport const validateWithinWindow = (value: Windowed, exp: number, nbf: number = Date.now()): boolean => {\n if (value.nbf === undefined || value.nbf > nbf) return false\n if (value.exp === undefined || value.exp < exp) return false\n return true\n}\n","import { ModuleIdentifier } from '@xyo-network/module-model'\nimport { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\nimport { moduleIdentifiersContainsOneOf } from '../common'\n\nconst name = 'EscrowTerms.escrowAgent'\n\nexport const getEscrowAgentAllowedValidator = (allowedEscrowAgent: ModuleIdentifier): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const result = moduleIdentifiersContainsOneOf(terms, (t) => t.escrowAgent, [allowedEscrowAgent], true)\n if (!result) {\n console.log(`${name}: Escrow agent not allowed: ${terms.escrowAgent}`)\n }\n return result\n }\n}\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { BoundWitness, isBoundWitnessWithMeta } from '@xyo-network/boundwitness-model'\nimport { HashLeaseEstimate, isHashLeaseEstimateWithSources } from '@xyo-network/diviner-hash-lease'\nimport { Payload, PayloadValidationFunction, WithMeta, WithSources } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\nimport { validateWithinWindow } from '../common'\n\nconst name = 'EscrowTerms.appraisal'\n\n/**\n * A function that validates the escrow terms for tbe existence of appraisals\n * @returns True if the escrow terms contain appraisals, false otherwise\n */\nexport const appraisalsExistValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have appraisals\n const appraisals = terms.appraisals\n if (!appraisals || appraisals.length === 0) {\n console.log(`${name}: No appraisals: ${terms.appraisals}`)\n return false\n }\n return true\n}\n\n/**\n * Returns a function that validates the escrow terms for appraisals which are from valid authorities\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for appraisals which are from valid authorities\n */\nexport const getAppraisalsFromValidAuthoritiesValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const appraisals = assertEx(terms.appraisals, () => `${name}: No appraisals: ${terms.appraisals}`)\n const appraisalAuthorities = assertEx(terms.appraisalAuthorities, () => `${name}: No appraisalAuthorities: ${terms.appraisalAuthorities}`)\n\n // Validate the appraisals are signed by valid appraisal authorities. Validation criteria:\n // - We have a bw for each of the appraisal\n // - The bw is signed by an approved appraisal authority\n const appraisalBWsValid: Record<Hash, WithMeta<BoundWitness>[]> = Object.fromEntries(\n appraisals.map<[Hash, WithMeta<BoundWitness>[]]>((hash) => [hash, []]),\n )\n for (const bw of Object.values(dictionary).filter(isBoundWitnessWithMeta)) {\n for (const appraisal of appraisals) {\n if (bw.payload_hashes.includes(appraisal) && bw.addresses.some((address) => appraisalAuthorities.includes(address))) {\n appraisalBWsValid[appraisal].push(bw)\n }\n }\n }\n for (const [appraisal, bws] of Object.entries(appraisalBWsValid)) {\n if (bws.length === 0) {\n console.log(`${name}: No valid appraisals for ${appraisal}`)\n return false\n }\n }\n return true\n }\n}\n\n/**\n * Returns a function that validates the escrow terms for appraisals which are valid\n * @param dictionary Payload dictionary of the escrow terms\n * @param minimumExp The minium amount of time an estimate needs to be valid\n * for in the future (so as not to expire before the escrow is complete)\n * @returns A function that validates the escrow terms for appraisals which are valid\n */\nexport const getAppraisalsValidValidator = (\n dictionary: Record<Hash, WithMeta<Payload>>,\n minimumExp: number,\n): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n // Verify we have an estimate for each of the assets\n const estimatesByAsset = getEstimatesByAsset(terms, dictionary)\n // Validate each of the estimates are valid (time, price, etc)\n const now = Date.now()\n const exp = now + minimumExp\n for (const [asset, estimates] of Object.entries(estimatesByAsset)) {\n for (const estimate of estimates) {\n if (!validateEstimate(estimate, exp)) {\n console.log(`${name}: Invalid estimate for asset ${asset}: ${estimate}`)\n return false\n }\n }\n }\n return true\n }\n}\n\n/**\n * Returns a function that validates the escrow terms to ensure that they contain an appraisal for each asset\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for appraisals\n */\nexport const getAppraisalsForAllAssetsValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n // Verify we have an estimate for each of the assets\n const estimatesByAsset = getEstimatesByAsset(terms, dictionary)\n const assets = assertEx(terms.assets, () => `${name}: No assets: ${terms.assets}`)\n if (Object.keys(estimatesByAsset).length !== assets.length) {\n console.log(`${name}: Missing appraisals for all assets: ${assets}`)\n return false\n }\n return true\n }\n}\n\nconst validateEstimate = (estimate: WithSources<HashLeaseEstimate>, exp: number): boolean => {\n if (!validateWithinWindow(estimate, exp)) return false\n if (estimate.currency !== 'USD') return false\n if (estimate.price <= 0) return false\n return true\n}\n\nconst getEstimatesByAsset = (terms: EscrowTerms, dictionary: Record<Hash, WithMeta<Payload>>): Record<Hash, WithSources<HashLeaseEstimate>[]> => {\n const assets = assertEx(terms.assets, () => `${name}: No assets: ${terms.assets}`)\n const estimates = Object.values(dictionary).filter(isHashLeaseEstimateWithSources) as unknown as WithSources<HashLeaseEstimate>[]\n const estimatesByAsset: Record<Hash, WithSources<HashLeaseEstimate>[]> = {}\n for (const estimate of estimates) {\n const { sources } = estimate\n if (sources === undefined || sources.length === 0) {\n console.log(`${name}: No sources: ${estimate}`)\n continue\n }\n for (const asset of assets) {\n if (sources.includes(asset)) {\n if (!estimatesByAsset[asset]) estimatesByAsset[asset] = []\n estimatesByAsset[asset].push(estimate)\n }\n }\n }\n return estimatesByAsset\n}\n","import { asAddress } from '@xylabs/hex'\nimport { ModuleIdentifier } from '@xyo-network/module-model'\nimport { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\nimport { moduleIdentifiersContainsAllOf } from '../common'\n\nconst name = 'EscrowTerms.appraisalAuthorities'\n\n/**\n * A function that validates the escrow terms for appraisalAuthorities\n * @returns True if the escrow terms contain appraisalAuthorities, false otherwise\n */\nexport const appraisalAuthoritiesExistValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have appraisalAuthorities\n const appraisalAuthorities = terms.appraisalAuthorities\n if (!appraisalAuthorities || appraisalAuthorities.length === 0) {\n console.log(`${name}: No appraisalAuthorities: ${terms.appraisalAuthorities}`)\n return false\n }\n // Validate the authorities are addresses\n if (appraisalAuthorities.map((x) => asAddress(x)).length !== appraisalAuthorities.length) {\n console.log(`${name}: Invalid address: ${terms.appraisalAuthorities}`)\n return false\n }\n return true\n}\n\nexport const getAppraisalAuthoritiesAllowedValidator = (allowed: ModuleIdentifier[]): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const result = moduleIdentifiersContainsAllOf(terms, (t) => t.appraisalAuthorities, allowed, true)\n if (!result) {\n console.log(`${name}: Appraisal authority not allowed: ${terms.appraisalAuthorities}`)\n }\n return result\n }\n}\n","import { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nconst name = 'EscrowTerms.assets'\n\n/**\n * Returns a function that validates the escrow terms for assets\n * @returns A function that validates the escrow terms for assets\n */\nexport const assetsExistValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have assets\n const assets = terms.assets\n if (!assets || assets.length === 0) {\n console.log(`${name}: No assets: ${terms.assets}`)\n return false\n }\n return true\n}\n","import { asAddress } from '@xylabs/hex'\nimport { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nconst name = 'EscrowTerms.buyer'\n\n/**\n * A function that validates the escrow terms for buyer\n * @returns True if the escrow terms contain buyer, false otherwise\n */\nexport const buyerExistsValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have buyer\n const buyer = terms.buyer\n if (!buyer || buyer.length === 0) {\n console.log(`${name}: No buyer: ${terms.buyer}`)\n return false\n }\n // Validate the authorities are addresses\n if (buyer.map((x) => asAddress(x)).length !== buyer.length) {\n console.log(`${name}: Invalid address: ${terms.buyer}`)\n return false\n }\n return true\n}\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { isBoundWitnessWithMeta } from '@xyo-network/boundwitness-model'\nimport { BoundWitnessValidator } from '@xyo-network/boundwitness-validator'\nimport { Payload, PayloadValidationFunction, WithMeta } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nconst name = 'EscrowTerms.buyerSecret'\n\n/**\n * Returns a function that validates the escrow terms for buyerSecret\n * @returns A function that validates the escrow terms for buyerSecret\n */\nexport const buyerSecretExistsValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have buyerSecret\n const buyerSecret = terms.buyerSecret\n if (!buyerSecret || buyerSecret.length === 0) {\n console.log(`${name}: No buyerSecret: ${terms.buyerSecret}`)\n return false\n }\n return true\n}\n\n/**\n * Returns a function that validates the escrow terms for the existence of the buyerSecret in the dictionary\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for the existence of the buyerSecret in the dictionary\n */\nexport const getBuyerSecretSuppliedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const buyerSecret = assertEx(terms.buyerSecret, () => `${name}: No buyerSecret: ${terms.buyerSecret}`)\n if (!dictionary[buyerSecret]) {\n console.log(`${name}: Payload not supplied for buyerSecret: ${buyerSecret}`)\n return false\n }\n return true\n }\n}\n\n/**\n * Returns a function that validates the escrow terms for the existence of the buyerSecret signed by the buyer\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for the existence of the buyerSecret signed by the buyer\n */\nexport const getBuyerSecretSignedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return async (terms: EscrowTerms) => {\n const buyer = assertEx(terms.buyer, () => `${name}: No buyer: ${terms.buyer}`)\n const buyerSecret = assertEx(terms.buyerSecret, () => `${name}: No buyerSecret: ${terms.buyerSecret}`)\n // Buyer-signed buyer secrets\n const buyerSecretBWs = Object.values(dictionary)\n // Find all BoundWitnesses\n .filter(isBoundWitnessWithMeta)\n // That contain the buyer secret\n .filter((bw) => bw.payload_hashes.includes(buyerSecret))\n // That are signed by all the buyers\n .filter((bw) => buyer.every((buyerAddress) => bw.addresses.includes(buyerAddress)))\n\n // If there are no buyerSecret BWs, return false\n if (buyerSecretBWs.length === 0) {\n console.log(`${name}: No BoundWitnesses supplied for buyerSecret: ${buyerSecret}`)\n return false\n }\n\n // Ensure each BW supplied for the buyerSecret is valid\n const errors = await Promise.all(buyerSecretBWs.map((bw) => new BoundWitnessValidator(bw).validate()))\n const validBoundWitnesses = errors.every((errors) => errors.length === 0)\n if (!validBoundWitnesses) {\n console.log(`${name}: Invalid BoundWitnesses supplied for buyerSecret: ${buyerSecret}`)\n return false\n }\n return true\n }\n}\n","import { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nexport const getNbfExpValidator = (now: number, minRequiredDuration: number): PayloadValidationFunction<EscrowTerms> => {\n const minExp = now + minRequiredDuration\n return (terms: EscrowTerms) => {\n const { exp, nbf } = terms\n if (nbf === undefined || nbf < now) {\n console.log(`EscrowTerms.nbf: invalid nbf ${terms.nbf}`)\n return false\n }\n if (exp === undefined || exp < minExp || nbf > exp) {\n console.log(`EscrowTerms.exp: invalid exp ${terms.exp}`)\n return false\n }\n return true\n }\n}\n","import { ModuleIdentifier } from '@xyo-network/module-model'\nimport { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\nimport { moduleIdentifiersContainsAllOf } from '../common'\n\nconst name = 'EscrowTerms.paymentAuthorities'\n\nexport const getPaymentAuthoritiesAllowedValidator = (allowed: ModuleIdentifier[]): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const result = moduleIdentifiersContainsAllOf(terms, (t) => t.paymentAuthorities, allowed, true)\n if (!result) {\n console.log(`${name}: Payment authority not allowed: ${terms.paymentAuthorities}`)\n }\n return result\n }\n}\n","import { asAddress } from '@xylabs/hex'\nimport { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nconst name = 'EscrowTerms.seller'\n\n/**\n * A function that validates the escrow terms for seller\n * @returns True if the escrow terms contain seller, false otherwise\n */\nexport const sellerExistsValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have seller\n const seller = terms.seller\n if (!seller || seller.length === 0) {\n console.log(`${name}: No seller: ${terms.seller}`)\n return false\n }\n // Validate the authorities are addresses\n if (seller.map((x) => asAddress(x)).length !== seller.length) {\n console.log(`${name}: Invalid address: ${terms.seller}`)\n return false\n }\n return true\n}\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { isBoundWitnessWithMeta } from '@xyo-network/boundwitness-model'\nimport { BoundWitnessValidator } from '@xyo-network/boundwitness-validator'\nimport { Payload, PayloadValidationFunction, WithMeta } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nconst name = 'EscrowTerms.sellerSecret'\n\n/**\n * Returns a function that validates the escrow terms for sellerSecret\n * @returns A function that validates the escrow terms for sellerSecret\n */\nexport const sellerSecretExistsValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have sellerSecret\n const sellerSecret = terms.sellerSecret\n if (!sellerSecret || sellerSecret.length === 0) {\n console.log(`${name}: No sellerSecret: ${terms.sellerSecret}`)\n return false\n }\n return true\n}\n\n/**\n * Returns a function that validates the escrow terms for the existence of the sellerSecret in the dictionary\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for the existence of the sellerSecret in the dictionary\n */\nexport const getSellerSecretSuppliedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const sellerSecret = assertEx(terms.sellerSecret, () => `${name}: No sellerSecret: ${terms.sellerSecret}`)\n if (!dictionary[sellerSecret]) {\n console.log(`${name}: Payload not supplied for sellerSecret: ${sellerSecret}`)\n return false\n }\n return true\n }\n}\n\n/**\n * Returns a function that validates the escrow terms for the existence of the sellerSecret signed by the seller\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for the existence of the sellerSecret signed by the seller\n */\nexport const getSellerSecretSignedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return async (terms: EscrowTerms) => {\n const seller = assertEx(terms.seller, () => `${name}: No seller: ${terms.seller}`)\n const sellerSecret = assertEx(terms.sellerSecret, () => `${name}: No sellerSecret: ${terms.sellerSecret}`)\n // Seller-signed seller secrets\n const sellerSecretBWs = Object.values(dictionary)\n // Find all BoundWitnesses\n .filter(isBoundWitnessWithMeta)\n // That contain the seller secret\n .filter((bw) => bw.payload_hashes.includes(sellerSecret))\n // That are signed by all the sellers\n .filter((bw) => seller.every((sellerAddress) => bw.addresses.includes(sellerAddress)))\n\n // If there are no sellerSecret BWs, return false\n if (sellerSecretBWs.length === 0) {\n console.log(`${name}: No BoundWitnesses supplied for sellerSecret: ${sellerSecret}`)\n return false\n }\n\n // Ensure each BW supplied for the sellerSecret is valid\n const errors = await Promise.all(sellerSecretBWs.map((bw) => new BoundWitnessValidator(bw).validate()))\n const validBoundWitnesses = errors.every((errors) => errors.length === 0)\n if (!validBoundWitnesses) {\n console.log(`${name}: Invalid BoundWitnesses supplied for sellerSecret: ${sellerSecret}`)\n return false\n }\n return true\n }\n}\n","import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { PaymentCardSchema } from './Schema'\n\n/**\n * The fields describing a payment card.\n */\nexport interface PaymentCardFields {\n /**\n * Card Number (PAN) of the payment card. This value is required to perform a payment.\n */\n cardNumber: string\n /**\n * The name as it appears on the payment card.\n */\n cardholderName?: string\n /**\n * Card Verification Value (CVV/CVC) of the payment card.\n */\n cvv: string\n /**\n * Expiration month of the payment card.\n */\n expMonth: number\n /**\n * Expiration year of the payment card.\n */\n expYear: number\n}\n\n/**\n * A PaymentCard Payload\n */\nexport type PaymentCard = Payload<PaymentCardFields, PaymentCardSchema>\n\n/**\n * Identity function for determine if an object is a PaymentCard\n */\nexport const isPaymentCard = isPayloadOfSchemaType<PaymentCard>(PaymentCardSchema)\n\n/**\n * Identity function for determine if an object is a PaymentCard with sources\n */\nexport const isPaymentCardWithSources = isPayloadOfSchemaTypeWithSources<PaymentCard>(PaymentCardSchema)\n\n/**\n * Identity function for determine if an object is a PaymentCard with meta\n */\nexport const isPaymentCardWithMeta = isPayloadOfSchemaTypeWithMeta<PaymentCard>(PaymentCardSchema)\n","import { PaymentsSchema } from '../Schema'\n\nexport const PaymentSchema = `${PaymentsSchema}.payment`\nexport type PaymentSchema = typeof PaymentSchema\n","import { PaymentSchema } from '../Schema'\n\nexport const PaymentInstrumentSchema = `${PaymentSchema}.instrument`\nexport type PaymentInstrumentSchema = typeof PaymentInstrumentSchema\n","import { PaymentInstrumentSchema } from '../Schema'\n\nexport const PaymentCardSchema = `${PaymentInstrumentSchema}.card`\nexport type PaymentCardSchema = typeof PaymentCardSchema\n","import {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n PayloadWithSources,\n} from '@xyo-network/payload-model'\n\nimport { SupportedCurrency } from '../Currency'\nimport { PaymentSchema } from './Schema'\n\nexport interface PaymentFields {\n /**\n * The amount paid\n */\n amount: number\n /**\n * The currency of the amount paid\n */\n currency: SupportedCurrency\n}\n\n/**\n * A payment is a record of an amount to be paid\n */\nexport type Payment = PayloadWithSources<PaymentFields, PaymentSchema>\n\n/**\n * Identity function for determine if an object is a Payment\n */\nexport const isPayment = isPayloadOfSchemaType<Payment>(PaymentSchema)\n\n/**\n * Identity function for determine if an object is a Payment with sources\n */\nexport const isPaymentWithSources = isPayloadOfSchemaTypeWithSources<Payment>(PaymentSchema)\n\n/**\n * Identity function for determine if an object is a Payment with meta\n */\nexport const isPaymentWithMeta = isPayloadOfSchemaTypeWithMeta<Payment>(PaymentSchema)\n","import { Hash } from '@xylabs/hex'\nimport {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n PayloadWithSources,\n} from '@xyo-network/payload-model'\n\nimport { PurchaseSchema } from './Schema'\n\nexport interface PurchaseFields {\n /**\n * The things that were purchased\n */\n assets: Hash[]\n /**\n * The receipts for payments for this purchase. Array to allow for multiple payments\n * for a single quote.\n */\n receipts: Hash[]\n}\n\n/**\n * A purchase ties a payment made to a quote\n */\nexport type Purchase = PayloadWithSources<PurchaseFields, PurchaseSchema>\n\n/**\n * Identity function for determine if an object is a Purchase\n */\nexport const isPurchase = isPayloadOfSchemaType<Purchase>(PurchaseSchema)\n\n/**\n * Identity function for determine if an object is a Purchase with sources\n */\nexport const isPurchaseWithSources = isPayloadOfSchemaTypeWithSources<Purchase>(PurchaseSchema)\n\n/**\n * Identity function for determine if an object is a Purchase with meta\n */\nexport const isPurchaseWithMeta = isPayloadOfSchemaTypeWithMeta<Purchase>(PurchaseSchema)\n","import { PaymentsSchema } from '../Schema'\n\nexport const PurchaseSchema = `${PaymentsSchema}.purchase`\nexport type PurchaseSchema = typeof PurchaseSchema\n","import {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n PayloadWithSources,\n} from '@xyo-network/payload-model'\n\nimport { SupportedCurrency } from '../Currency'\nimport { ReceiptSchema } from './Schema'\n\nexport interface ReceiptFields {\n /**\n * The amount paid\n */\n amount: number\n /**\n * The currency of the amount paid\n */\n currency: SupportedCurrency\n}\n\n/**\n * A receipt is a record of a payment made\n */\nexport type Receipt = PayloadWithSources<ReceiptFields, ReceiptSchema>\n\n/**\n * Identity function for determine if an object is a Receipt\n */\nexport const isReceipt = isPayloadOfSchemaType<Receipt>(ReceiptSchema)\n\n/**\n * Identity function for determine if an object is a Receipt with sources\n */\nexport const isReceiptWithSources = isPayloadOfSchemaTypeWithSources<Receipt>(ReceiptSchema)\n\n/**\n * Identity function for determine if an object is a Receipt with meta\n */\nexport const isReceiptWithMeta = isPayloadOfSchemaTypeWithMeta<Receipt>(ReceiptSchema)\n","import { PaymentsSchema } from '../Schema'\n\nexport const ReceiptSchema = `${PaymentsSchema}.receipt`\nexport type ReceiptSchema = typeof ReceiptSchema\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA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;AACA,WAAO;AAAA,EACT;AACF;;;ACzEA,IAAAE,wBAAgH;;;ACEzG,IAAM,gBAAgB,GAAG,cAAc;;;ACAvC,IAAM,0BAA0B,GAAG,aAAa;;;ACAhD,IAAM,oBAAoB,GAAG,uBAAuB;;;AHoCpD,IAAM,oBAAgB,6CAAmC,iBAAiB;AAK1E,IAAM,+BAA2B,wDAA8C,iBAAiB;AAKhG,IAAM,4BAAwB,qDAA2C,iBAAiB;;;AIhDjG,IAAAC,wBAKO;AAwBA,IAAM,gBAAY,6CAA+B,aAAa;AAK9D,IAAM,2BAAuB,wDAA0C,aAAa;AAKpF,IAAM,wBAAoB,qDAAuC,aAAa;;;ACtCrF,IAAAC,wBAKO;;;ACJA,IAAM,iBAAiB,GAAG,cAAc;;;AD4BxC,IAAM,iBAAa,6CAAgC,cAAc;AAKjE,IAAM,4BAAwB,wDAA2C,cAAc;AAKvF,IAAM,yBAAqB,qDAAwC,cAAc;;;AExCxF,IAAAC,wBAKO;;;ACHA,IAAM,gBAAgB,GAAG,cAAc;;;AD2BvC,IAAM,gBAAY,6CAA+B,aAAa;AAK9D,IAAM,2BAAuB,wDAA0C,aAAa;AAKpF,IAAM,wBAAoB,qDAAuC,aAAa;","names":["import_payload_model","name","name","name","import_hex","name","import_assert","import_boundwitness_model","name","errors","name","import_hex","name","import_assert","import_boundwitness_model","import_boundwitness_validator","name","errors","import_payload_model","import_payload_model","import_payload_model","import_payload_model"]}
1
+ {"version":3,"sources":["../../src/index.ts","../../src/Billing/Address/Address.ts","../../src/Schema.ts","../../src/Billing/Schema.ts","../../src/Billing/Address/Schema.ts","../../src/Escrow/createEscrowIntent.ts","../../src/Escrow/getEscrowSecret.ts","../../src/Escrow/Schema.ts","../../src/Escrow/Terms.ts","../../src/Escrow/validators/common/ModuleInstanceValidators/moduleInstanceValidators.ts","../../src/Escrow/validators/common/TemporalValidators/validateWithinWindow.ts","../../src/Escrow/validators/escrow/agent.ts","../../src/Escrow/validators/escrow/appraisal.ts","../../src/Escrow/validators/escrow/appraisalAuthorities.ts","../../src/Escrow/validators/escrow/assets.ts","../../src/Escrow/validators/escrow/buyer.ts","../../src/Escrow/validators/escrow/buyerSecret.ts","../../src/Escrow/validators/escrow/nbfExp.ts","../../src/Escrow/validators/escrow/paymentAuthorities.ts","../../src/Escrow/validators/escrow/seller.ts","../../src/Escrow/validators/escrow/sellerSecret.ts","../../src/Payment/Instrument/Card/Payload.ts","../../src/Payment/Schema.ts","../../src/Payment/Instrument/Schema.ts","../../src/Payment/Instrument/Card/Schema.ts","../../src/Payment/Payload.ts","../../src/Payment/Status/Payload.ts","../../src/Payment/Status/Schema.ts","../../src/Purchase/Payload.ts","../../src/Purchase/Schema.ts","../../src/Receipt/Payload.ts","../../src/Receipt/Schema.ts"],"sourcesContent":["export * from './Billing'\nexport * from './Currency'\nexport * from './Escrow'\nexport * from './Payment'\nexport * from './Purchase'\nexport * from './Receipt'\n","import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { BillingAddressSchema } from './Schema'\n\n/**\n * The fields describing a billing address.\n */\nexport interface BillingAddressFields {\n /** Street address line 1. */\n address?: string\n /** Street address line 2. */\n address2?: string | null\n /** City of the billing address. */\n city?: string\n /** Country code of the billing address, ISO 3166-1 alpha-2 code. */\n country?: string\n /** First name */\n firstName: string\n /** Last name */\n lastName: string\n /** Organization or company name associated with the billing address. */\n organization?: string | null\n /** Postal or ZIP code of the billing address. */\n postalCode?: string\n /** State or region of the billing address. */\n region?: string\n}\n\n/**\n * A BillingAddress Payload\n */\nexport type BillingAddress = Payload<BillingAddressFields, BillingAddressSchema>\n\n/**\n * Identity function for determine if an object is a BillingAddress\n */\nexport const isBillingAddress = isPayloadOfSchemaType<BillingAddress>(BillingAddressSchema)\n\n/**\n * Identity function for determine if an object is a BillingAddress with sources\n */\nexport const isBillingAddressWithSources = isPayloadOfSchemaTypeWithSources<BillingAddress>(BillingAddressSchema)\n\n/**\n * Identity function for determine if an object is a BillingAddress with meta\n */\nexport const isBillingAddressWithMeta = isPayloadOfSchemaTypeWithMeta<BillingAddress>(BillingAddressSchema)\n","export const PaymentsSchema = 'network.xyo.payments'\nexport type PaymentsSchema = typeof PaymentsSchema\n","import { PaymentsSchema } from '../Schema'\n\nexport const BillingSchema = `${PaymentsSchema}.billing`\nexport type BillingSchema = typeof BillingSchema\n","import { BillingSchema } from '../Schema'\n\nexport const BillingAddressSchema = `${BillingSchema}.address`\nexport type BillingAddressSchema = typeof BillingAddressSchema\n","import { AccountInstance } from '@xyo-network/account-model'\nimport { BoundWitnessBuilder } from '@xyo-network/boundwitness-builder'\nimport { IdPayload } from '@xyo-network/id-payload-plugin'\n\nimport { EscrowTerms } from './Terms'\n\n/**\n * Creates an escrow intent\n * @deprecated Use createEscrowIntentWithSecret instead\n * @param terms The payloads describing the terms for the escrow\n * @param account The account to create the escrow intent with\n * @returns The escrow intent\n */\nexport const createEscrowIntent = async (terms: EscrowTerms[], account: AccountInstance) => {\n const result = await new BoundWitnessBuilder({ accounts: [account] }).payloads([...terms]).build()\n return result\n}\n\n/**\n * Creates an escrow intent (for a buyer or seller) using the supplied secret\n * @param terms The payload describing the terms for the escrow\n * @param secret The secret for the escrow principal party to use for the escrow\n * @param account The account to create the escrow intent with\n * @returns The escrow intent\n */\nexport const createEscrowIntentWithSecret = async (terms: EscrowTerms, secret: IdPayload, account: AccountInstance) => {\n const result = await new BoundWitnessBuilder({ accounts: [account] }).payloads([terms, secret]).build()\n return result\n}\n","import { Crypto } from '@xylabs/crypto'\nimport { IdPayload, IdSchema } from '@xyo-network/id-payload-plugin'\n\n/**\n * Returns a cryptographically random secret to use for escrow\n * @returns The escrow secret\n */\nexport const getEscrowSecret = (): IdPayload => {\n return { salt: Crypto.randomUUID(), schema: IdSchema }\n}\n","export const EscrowSchema = 'network.xyo.escrow'\nexport type EscrowSchema = typeof EscrowSchema\n","import { Address, Hash } from '@xylabs/hex'\nimport { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { EscrowSchema } from './Schema'\n\nexport const EscrowTermsSchema = `${EscrowSchema}.terms` as const\nexport type EscrowTermsSchema = typeof EscrowTermsSchema\n\n// TODO: Include escrow agent in escrow terms\nexport interface EscrowTermsFields {\n /**\n * The trusted estimators for the worth of the things being sold\n */\n appraisalAuthorities: Address[]\n /**\n * The estimated worths of the things being sold\n */\n appraisals: Hash[]\n /**\n * The things being sold\n */\n assets: Hash[]\n /**\n * The buyer\n */\n buyer: Address[]\n /**\n * The buyer\n */\n buyerSecret: Hash\n /**\n * The escrow agent responsible for the escrow\n */\n escrowAgent: Address\n /**\n * The time the escrow expires\n */\n exp: number\n /**\n * The time the escrow starts\n */\n nbf: number\n /**\n * The trusted payment authorities\n */\n paymentAuthorities: Address[]\n /**\n * The seller\n */\n seller: Address[]\n /**\n * The seller\n */\n sellerSecret: Hash\n}\n\n/**\n * The terms of an escrow\n */\nexport type EscrowTerms = Payload<Partial<EscrowTermsFields>, EscrowTermsSchema>\n\n/**\n * Identity function for determining if an object is an EscrowTerms\n */\nexport const isEscrowTerms = isPayloadOfSchemaType<EscrowTerms>(EscrowTermsSchema)\n\n/**\n * Identity function for determining if an object is an EscrowTerms with sources\n */\nexport const isEscrowTermsWithSources = isPayloadOfSchemaTypeWithSources<EscrowTerms>(EscrowTermsSchema)\n\n/**\n * Identity function for determining if an object is an EscrowTerms with meta\n */\nexport const isEscrowTermsWithMeta = isPayloadOfSchemaTypeWithMeta<EscrowTerms>(EscrowTermsSchema)\n","import { ModuleIdentifier } from '@xyo-network/module-model'\nimport { PayloadValueExpression } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../../Terms'\n\n/**\n * Checks if property value of the escrow terms contains one of the valid moduleIdentifiers\n * @param escrowTerms The escrow terms to validate\n * @param propertyExpression The selector to get the property containing the moduleIdentifier(s) from the escrow terms\n * @param moduleIdentifiers The list of allowed moduleIdentifiers\n * @param required Is the property required to be present\n * @returns True if the property value contains one of the valid moduleIdentifiers\n */\nexport const moduleIdentifiersContainsOneOf = (\n escrowTerms: EscrowTerms,\n propertyExpression: PayloadValueExpression<EscrowTerms, 'appraisalAuthorities' | 'buyer' | 'escrowAgent' | 'paymentAuthorities' | 'seller'>,\n moduleIdentifiers: ModuleIdentifier[],\n required: boolean = true,\n) => {\n const termsValue: string | string[] | undefined = propertyExpression(escrowTerms)\n if (termsValue === undefined) {\n return required ? false : true\n } else {\n return Array.isArray(termsValue) ? termsValue.some((address) => moduleIdentifiers.includes(address)) : moduleIdentifiers.includes(termsValue)\n }\n}\n\n/**\n * Checks if property value of the escrow terms contains all of the valid moduleIdentifiers\n * @param escrowTerms The escrow terms to validate\n * @param selector The selector to get the property containing the moduleIdentifier(s) from the escrow terms\n * @param moduleIdentifiers The list of allowed moduleIdentifiers\n * @param required Is the property required to be present\n * @returns True if the property value contains all of the valid moduleIdentifiers\n */\nexport const moduleIdentifiersContainsAllOf = (\n escrowTerms: EscrowTerms,\n selector: PayloadValueExpression<EscrowTerms, 'appraisalAuthorities' | 'buyer' | 'escrowAgent' | 'paymentAuthorities' | 'seller'>,\n moduleIdentifiers: ModuleIdentifier[],\n required: boolean = true,\n) => {\n const termsValue: string | string[] | undefined = selector(escrowTerms)\n if (termsValue === undefined) {\n return required ? false : true\n } else {\n return Array.isArray(termsValue) ? termsValue.every((address) => moduleIdentifiers.includes(address)) : moduleIdentifiers.includes(termsValue)\n }\n}\n","export type Windowed = { exp?: number; nbf?: number }\n\nexport const validateWithinWindow = (value: Windowed, exp: number, nbf: number = Date.now()): boolean => {\n if (value.nbf === undefined || value.nbf > nbf) return false\n if (value.exp === undefined || value.exp < exp) return false\n return true\n}\n","import { ModuleIdentifier } from '@xyo-network/module-model'\nimport { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\nimport { moduleIdentifiersContainsOneOf } from '../common'\n\nconst name = 'EscrowTerms.escrowAgent'\n\nexport const getEscrowAgentAllowedValidator = (allowedEscrowAgent: ModuleIdentifier): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const result = moduleIdentifiersContainsOneOf(terms, (t) => t.escrowAgent, [allowedEscrowAgent], true)\n if (!result) {\n console.log(`${name}: Escrow agent not allowed: ${terms.escrowAgent}`)\n }\n return result\n }\n}\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { BoundWitness, isBoundWitnessWithMeta } from '@xyo-network/boundwitness-model'\nimport { HashLeaseEstimate, isHashLeaseEstimateWithSources } from '@xyo-network/diviner-hash-lease'\nimport { Payload, PayloadValidationFunction, WithMeta, WithSources } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\nimport { validateWithinWindow } from '../common'\n\nconst name = 'EscrowTerms.appraisal'\n\n/**\n * A function that validates the escrow terms for tbe existence of appraisals\n * @returns True if the escrow terms contain appraisals, false otherwise\n */\nexport const appraisalsExistValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have appraisals\n const appraisals = terms.appraisals\n if (!appraisals || appraisals.length === 0) {\n console.log(`${name}: No appraisals: ${terms.appraisals}`)\n return false\n }\n return true\n}\n\n/**\n * Returns a function that validates the escrow terms for appraisals which are from valid authorities\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for appraisals which are from valid authorities\n */\nexport const getAppraisalsFromValidAuthoritiesValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const appraisals = assertEx(terms.appraisals, () => `${name}: No appraisals: ${terms.appraisals}`)\n const appraisalAuthorities = assertEx(terms.appraisalAuthorities, () => `${name}: No appraisalAuthorities: ${terms.appraisalAuthorities}`)\n\n // Validate the appraisals are signed by valid appraisal authorities. Validation criteria:\n // - We have a bw for each of the appraisal\n // - The bw is signed by an approved appraisal authority\n const appraisalBWsValid: Record<Hash, WithMeta<BoundWitness>[]> = Object.fromEntries(\n appraisals.map<[Hash, WithMeta<BoundWitness>[]]>((hash) => [hash, []]),\n )\n for (const bw of Object.values(dictionary).filter(isBoundWitnessWithMeta)) {\n for (const appraisal of appraisals) {\n if (bw.payload_hashes.includes(appraisal) && bw.addresses.some((address) => appraisalAuthorities.includes(address))) {\n appraisalBWsValid[appraisal].push(bw)\n }\n }\n }\n for (const [appraisal, bws] of Object.entries(appraisalBWsValid)) {\n if (bws.length === 0) {\n console.log(`${name}: No valid appraisals for ${appraisal}`)\n return false\n }\n }\n return true\n }\n}\n\n/**\n * Returns a function that validates the escrow terms for appraisals which are valid\n * @param dictionary Payload dictionary of the escrow terms\n * @param minimumExp The minium amount of time an estimate needs to be valid\n * for in the future (so as not to expire before the escrow is complete)\n * @returns A function that validates the escrow terms for appraisals which are valid\n */\nexport const getAppraisalsValidValidator = (\n dictionary: Record<Hash, WithMeta<Payload>>,\n minimumExp: number,\n): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n // Verify we have an estimate for each of the assets\n const estimatesByAsset = getEstimatesByAsset(terms, dictionary)\n // Validate each of the estimates are valid (time, price, etc)\n const now = Date.now()\n const exp = now + minimumExp\n for (const [asset, estimates] of Object.entries(estimatesByAsset)) {\n for (const estimate of estimates) {\n if (!validateEstimate(estimate, exp)) {\n console.log(`${name}: Invalid estimate for asset ${asset}: ${estimate}`)\n return false\n }\n }\n }\n return true\n }\n}\n\n/**\n * Returns a function that validates the escrow terms to ensure that they contain an appraisal for each asset\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for appraisals\n */\nexport const getAppraisalsForAllAssetsValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n // Verify we have an estimate for each of the assets\n const estimatesByAsset = getEstimatesByAsset(terms, dictionary)\n const assets = assertEx(terms.assets, () => `${name}: No assets: ${terms.assets}`)\n if (Object.keys(estimatesByAsset).length !== assets.length) {\n console.log(`${name}: Missing appraisals for all assets: ${assets}`)\n return false\n }\n return true\n }\n}\n\nconst validateEstimate = (estimate: WithSources<HashLeaseEstimate>, exp: number): boolean => {\n if (!validateWithinWindow(estimate, exp)) return false\n if (estimate.currency !== 'USD') return false\n if (estimate.price <= 0) return false\n return true\n}\n\nconst getEstimatesByAsset = (terms: EscrowTerms, dictionary: Record<Hash, WithMeta<Payload>>): Record<Hash, WithSources<HashLeaseEstimate>[]> => {\n const assets = assertEx(terms.assets, () => `${name}: No assets: ${terms.assets}`)\n const estimates = Object.values(dictionary).filter(isHashLeaseEstimateWithSources) as unknown as WithSources<HashLeaseEstimate>[]\n const estimatesByAsset: Record<Hash, WithSources<HashLeaseEstimate>[]> = {}\n for (const estimate of estimates) {\n const { sources } = estimate\n if (sources === undefined || sources.length === 0) {\n console.log(`${name}: No sources: ${estimate}`)\n continue\n }\n for (const asset of assets) {\n if (sources.includes(asset)) {\n if (!estimatesByAsset[asset]) estimatesByAsset[asset] = []\n estimatesByAsset[asset].push(estimate)\n }\n }\n }\n return estimatesByAsset\n}\n","import { asAddress } from '@xylabs/hex'\nimport { ModuleIdentifier } from '@xyo-network/module-model'\nimport { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\nimport { moduleIdentifiersContainsAllOf } from '../common'\n\nconst name = 'EscrowTerms.appraisalAuthorities'\n\n/**\n * A function that validates the escrow terms for appraisalAuthorities\n * @returns True if the escrow terms contain appraisalAuthorities, false otherwise\n */\nexport const appraisalAuthoritiesExistValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have appraisalAuthorities\n const appraisalAuthorities = terms.appraisalAuthorities\n if (!appraisalAuthorities || appraisalAuthorities.length === 0) {\n console.log(`${name}: No appraisalAuthorities: ${terms.appraisalAuthorities}`)\n return false\n }\n // Validate the authorities are addresses\n if (appraisalAuthorities.map((x) => asAddress(x)).length !== appraisalAuthorities.length) {\n console.log(`${name}: Invalid address: ${terms.appraisalAuthorities}`)\n return false\n }\n return true\n}\n\nexport const getAppraisalAuthoritiesAllowedValidator = (allowed: ModuleIdentifier[]): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const result = moduleIdentifiersContainsAllOf(terms, (t) => t.appraisalAuthorities, allowed, true)\n if (!result) {\n console.log(`${name}: Appraisal authority not allowed: ${terms.appraisalAuthorities}`)\n }\n return result\n }\n}\n","import { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nconst name = 'EscrowTerms.assets'\n\n/**\n * Returns a function that validates the escrow terms for assets\n * @returns A function that validates the escrow terms for assets\n */\nexport const assetsExistValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have assets\n const assets = terms.assets\n if (!assets || assets.length === 0) {\n console.log(`${name}: No assets: ${terms.assets}`)\n return false\n }\n return true\n}\n","import { asAddress } from '@xylabs/hex'\nimport { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nconst name = 'EscrowTerms.buyer'\n\n/**\n * A function that validates the escrow terms for buyer\n * @returns True if the escrow terms contain buyer, false otherwise\n */\nexport const buyerExistsValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have buyer\n const buyer = terms.buyer\n if (!buyer || buyer.length === 0) {\n console.log(`${name}: No buyer: ${terms.buyer}`)\n return false\n }\n // Validate the authorities are addresses\n if (buyer.map((x) => asAddress(x)).length !== buyer.length) {\n console.log(`${name}: Invalid address: ${terms.buyer}`)\n return false\n }\n return true\n}\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { isBoundWitnessWithMeta } from '@xyo-network/boundwitness-model'\nimport { BoundWitnessValidator } from '@xyo-network/boundwitness-validator'\nimport { Payload, PayloadValidationFunction, WithMeta } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nconst name = 'EscrowTerms.buyerSecret'\n\n/**\n * Returns a function that validates the escrow terms for buyerSecret\n * @returns A function that validates the escrow terms for buyerSecret\n */\nexport const buyerSecretExistsValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have buyerSecret\n const buyerSecret = terms.buyerSecret\n if (!buyerSecret || buyerSecret.length === 0) {\n console.log(`${name}: No buyerSecret: ${terms.buyerSecret}`)\n return false\n }\n return true\n}\n\n/**\n * Returns a function that validates the escrow terms for the existence of the buyerSecret in the dictionary\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for the existence of the buyerSecret in the dictionary\n */\nexport const getBuyerSecretSuppliedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const buyerSecret = assertEx(terms.buyerSecret, () => `${name}: No buyerSecret: ${terms.buyerSecret}`)\n if (!dictionary[buyerSecret]) {\n console.log(`${name}: Payload not supplied for buyerSecret: ${buyerSecret}`)\n return false\n }\n return true\n }\n}\n\n/**\n * Returns a function that validates the escrow terms for the existence of the buyerSecret signed by the buyer\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for the existence of the buyerSecret signed by the buyer\n */\nexport const getBuyerSecretSignedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return async (terms: EscrowTerms) => {\n const buyer = assertEx(terms.buyer, () => `${name}: No buyer: ${terms.buyer}`)\n const buyerSecret = assertEx(terms.buyerSecret, () => `${name}: No buyerSecret: ${terms.buyerSecret}`)\n // Buyer-signed buyer secrets\n const buyerSecretBWs = Object.values(dictionary)\n // Find all BoundWitnesses\n .filter(isBoundWitnessWithMeta)\n // That contain the buyer secret\n .filter((bw) => bw.payload_hashes.includes(buyerSecret))\n // That are signed by all the buyers\n .filter((bw) => buyer.every((buyerAddress) => bw.addresses.includes(buyerAddress)))\n\n // If there are no buyerSecret BWs, return false\n if (buyerSecretBWs.length === 0) {\n console.log(`${name}: No BoundWitnesses supplied for buyerSecret: ${buyerSecret}`)\n return false\n }\n\n // Ensure each BW supplied for the buyerSecret is valid\n const errors = await Promise.all(buyerSecretBWs.map((bw) => new BoundWitnessValidator(bw).validate()))\n const validBoundWitnesses = errors.every((errors) => errors.length === 0)\n if (!validBoundWitnesses) {\n console.log(`${name}: Invalid BoundWitnesses supplied for buyerSecret: ${buyerSecret}`)\n return false\n }\n return true\n }\n}\n","import { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nexport const getNbfExpValidator = (now: number, minRequiredDuration: number): PayloadValidationFunction<EscrowTerms> => {\n const minExp = now + minRequiredDuration\n return (terms: EscrowTerms) => {\n const { exp, nbf } = terms\n if (nbf === undefined || nbf < now) {\n console.log(`EscrowTerms.nbf: invalid nbf ${terms.nbf}`)\n return false\n }\n if (exp === undefined || exp < minExp || nbf > exp) {\n console.log(`EscrowTerms.exp: invalid exp ${terms.exp}`)\n return false\n }\n return true\n }\n}\n","import { ModuleIdentifier } from '@xyo-network/module-model'\nimport { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\nimport { moduleIdentifiersContainsAllOf } from '../common'\n\nconst name = 'EscrowTerms.paymentAuthorities'\n\nexport const getPaymentAuthoritiesAllowedValidator = (allowed: ModuleIdentifier[]): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const result = moduleIdentifiersContainsAllOf(terms, (t) => t.paymentAuthorities, allowed, true)\n if (!result) {\n console.log(`${name}: Payment authority not allowed: ${terms.paymentAuthorities}`)\n }\n return result\n }\n}\n","import { asAddress } from '@xylabs/hex'\nimport { PayloadValidationFunction } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nconst name = 'EscrowTerms.seller'\n\n/**\n * A function that validates the escrow terms for seller\n * @returns True if the escrow terms contain seller, false otherwise\n */\nexport const sellerExistsValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have seller\n const seller = terms.seller\n if (!seller || seller.length === 0) {\n console.log(`${name}: No seller: ${terms.seller}`)\n return false\n }\n // Validate the authorities are addresses\n if (seller.map((x) => asAddress(x)).length !== seller.length) {\n console.log(`${name}: Invalid address: ${terms.seller}`)\n return false\n }\n return true\n}\n","import { assertEx } from '@xylabs/assert'\nimport { Hash } from '@xylabs/hex'\nimport { isBoundWitnessWithMeta } from '@xyo-network/boundwitness-model'\nimport { BoundWitnessValidator } from '@xyo-network/boundwitness-validator'\nimport { Payload, PayloadValidationFunction, WithMeta } from '@xyo-network/payload-model'\n\nimport { EscrowTerms } from '../../Terms'\n\nconst name = 'EscrowTerms.sellerSecret'\n\n/**\n * Returns a function that validates the escrow terms for sellerSecret\n * @returns A function that validates the escrow terms for sellerSecret\n */\nexport const sellerSecretExistsValidator: PayloadValidationFunction<EscrowTerms> = (terms: EscrowTerms) => {\n // Validate we have sellerSecret\n const sellerSecret = terms.sellerSecret\n if (!sellerSecret || sellerSecret.length === 0) {\n console.log(`${name}: No sellerSecret: ${terms.sellerSecret}`)\n return false\n }\n return true\n}\n\n/**\n * Returns a function that validates the escrow terms for the existence of the sellerSecret in the dictionary\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for the existence of the sellerSecret in the dictionary\n */\nexport const getSellerSecretSuppliedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return (terms: EscrowTerms) => {\n const sellerSecret = assertEx(terms.sellerSecret, () => `${name}: No sellerSecret: ${terms.sellerSecret}`)\n if (!dictionary[sellerSecret]) {\n console.log(`${name}: Payload not supplied for sellerSecret: ${sellerSecret}`)\n return false\n }\n return true\n }\n}\n\n/**\n * Returns a function that validates the escrow terms for the existence of the sellerSecret signed by the seller\n * @param dictionary Payload dictionary of the escrow terms\n * @returns A function that validates the escrow terms for the existence of the sellerSecret signed by the seller\n */\nexport const getSellerSecretSignedValidator = (dictionary: Record<Hash, WithMeta<Payload>>): PayloadValidationFunction<EscrowTerms> => {\n return async (terms: EscrowTerms) => {\n const seller = assertEx(terms.seller, () => `${name}: No seller: ${terms.seller}`)\n const sellerSecret = assertEx(terms.sellerSecret, () => `${name}: No sellerSecret: ${terms.sellerSecret}`)\n // Seller-signed seller secrets\n const sellerSecretBWs = Object.values(dictionary)\n // Find all BoundWitnesses\n .filter(isBoundWitnessWithMeta)\n // That contain the seller secret\n .filter((bw) => bw.payload_hashes.includes(sellerSecret))\n // That are signed by all the sellers\n .filter((bw) => seller.every((sellerAddress) => bw.addresses.includes(sellerAddress)))\n\n // If there are no sellerSecret BWs, return false\n if (sellerSecretBWs.length === 0) {\n console.log(`${name}: No BoundWitnesses supplied for sellerSecret: ${sellerSecret}`)\n return false\n }\n\n // Ensure each BW supplied for the sellerSecret is valid\n const errors = await Promise.all(sellerSecretBWs.map((bw) => new BoundWitnessValidator(bw).validate()))\n const validBoundWitnesses = errors.every((errors) => errors.length === 0)\n if (!validBoundWitnesses) {\n console.log(`${name}: Invalid BoundWitnesses supplied for sellerSecret: ${sellerSecret}`)\n return false\n }\n return true\n }\n}\n","import { isPayloadOfSchemaType, isPayloadOfSchemaTypeWithMeta, isPayloadOfSchemaTypeWithSources, Payload } from '@xyo-network/payload-model'\n\nimport { PaymentCardSchema } from './Schema'\n\n/**\n * The fields describing a payment card.\n */\nexport interface PaymentCardFields {\n /**\n * Card Number (PAN) of the payment card. This value is required to perform a payment.\n */\n cardNumber: string\n /**\n * The name as it appears on the payment card.\n */\n cardholderName?: string\n /**\n * Card Verification Value (CVV/CVC) of the payment card.\n */\n cvv: string\n /**\n * Expiration month of the payment card.\n */\n expMonth: number\n /**\n * Expiration year of the payment card.\n */\n expYear: number\n}\n\n/**\n * A PaymentCard Payload\n */\nexport type PaymentCard = Payload<PaymentCardFields, PaymentCardSchema>\n\n/**\n * Identity function for determine if an object is a PaymentCard\n */\nexport const isPaymentCard = isPayloadOfSchemaType<PaymentCard>(PaymentCardSchema)\n\n/**\n * Identity function for determine if an object is a PaymentCard with sources\n */\nexport const isPaymentCardWithSources = isPayloadOfSchemaTypeWithSources<PaymentCard>(PaymentCardSchema)\n\n/**\n * Identity function for determine if an object is a PaymentCard with meta\n */\nexport const isPaymentCardWithMeta = isPayloadOfSchemaTypeWithMeta<PaymentCard>(PaymentCardSchema)\n","import { PaymentsSchema } from '../Schema'\n\nexport const PaymentSchema = `${PaymentsSchema}.payment`\nexport type PaymentSchema = typeof PaymentSchema\n","import { PaymentSchema } from '../Schema'\n\nexport const PaymentInstrumentSchema = `${PaymentSchema}.instrument`\nexport type PaymentInstrumentSchema = typeof PaymentInstrumentSchema\n","import { PaymentInstrumentSchema } from '../Schema'\n\nexport const PaymentCardSchema = `${PaymentInstrumentSchema}.card`\nexport type PaymentCardSchema = typeof PaymentCardSchema\n","import {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n PayloadWithSources,\n} from '@xyo-network/payload-model'\n\nimport { SupportedCurrency } from '../Currency'\nimport { PaymentSchema } from './Schema'\n\nexport interface PaymentFields {\n /**\n * The amount paid\n */\n amount: number\n /**\n * The currency of the amount paid\n */\n currency: SupportedCurrency\n}\n\n/**\n * A payment is a record of an amount to be paid\n */\nexport type Payment = PayloadWithSources<PaymentFields, PaymentSchema>\n\n/**\n * Identity function for determine if an object is a Payment\n */\nexport const isPayment = isPayloadOfSchemaType<Payment>(PaymentSchema)\n\n/**\n * Identity function for determine if an object is a Payment with sources\n */\nexport const isPaymentWithSources = isPayloadOfSchemaTypeWithSources<Payment>(PaymentSchema)\n\n/**\n * Identity function for determine if an object is a Payment with meta\n */\nexport const isPaymentWithMeta = isPayloadOfSchemaTypeWithMeta<Payment>(PaymentSchema)\n","import {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n PayloadWithSources,\n} from '@xyo-network/payload-model'\n\nimport { PaymentStatusSchema } from './Schema'\n\nexport interface PaymentStatusFields {\n /**\n * The status of the payment (i.e. declined)\n */\n status: string\n}\n\n/**\n * A payment status is the outcome of a payment attempt\n */\nexport type PaymentStatus = PayloadWithSources<PaymentStatusFields, PaymentStatusSchema>\n\n/**\n * Identity function for determine if an object is a PaymentStatus\n */\nexport const isPaymentStatus = isPayloadOfSchemaType<PaymentStatus>(PaymentStatusSchema)\n\n/**\n * Identity function for determine if an object is a PaymentStatus with sources\n */\nexport const isPaymentStatusWithSources = isPayloadOfSchemaTypeWithSources<PaymentStatus>(PaymentStatusSchema)\n\n/**\n * Identity function for determine if an object is a PaymentStatus with meta\n */\nexport const isPaymentStatusWithMeta = isPayloadOfSchemaTypeWithMeta<PaymentStatus>(PaymentStatusSchema)\n","import { PaymentSchema } from '../Schema'\n\nexport const PaymentStatusSchema = `${PaymentSchema}.status`\nexport type PaymentStatusSchema = typeof PaymentStatusSchema\n","import { Hash } from '@xylabs/hex'\nimport {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n PayloadWithSources,\n} from '@xyo-network/payload-model'\n\nimport { PurchaseSchema } from './Schema'\n\nexport interface PurchaseFields {\n /**\n * The things that were purchased\n */\n assets: Hash[]\n /**\n * The receipts for payments for this purchase. Array to allow for multiple payments\n * for a single quote.\n */\n receipts: Hash[]\n}\n\n/**\n * A purchase ties a payment made to a quote\n */\nexport type Purchase = PayloadWithSources<PurchaseFields, PurchaseSchema>\n\n/**\n * Identity function for determine if an object is a Purchase\n */\nexport const isPurchase = isPayloadOfSchemaType<Purchase>(PurchaseSchema)\n\n/**\n * Identity function for determine if an object is a Purchase with sources\n */\nexport const isPurchaseWithSources = isPayloadOfSchemaTypeWithSources<Purchase>(PurchaseSchema)\n\n/**\n * Identity function for determine if an object is a Purchase with meta\n */\nexport const isPurchaseWithMeta = isPayloadOfSchemaTypeWithMeta<Purchase>(PurchaseSchema)\n","import { PaymentsSchema } from '../Schema'\n\nexport const PurchaseSchema = `${PaymentsSchema}.purchase`\nexport type PurchaseSchema = typeof PurchaseSchema\n","import {\n isPayloadOfSchemaType,\n isPayloadOfSchemaTypeWithMeta,\n isPayloadOfSchemaTypeWithSources,\n PayloadWithSources,\n} from '@xyo-network/payload-model'\n\nimport { SupportedCurrency } from '../Currency'\nimport { ReceiptSchema } from './Schema'\n\nexport interface ReceiptFields {\n /**\n * The amount paid\n */\n amount: number\n /**\n * The currency of the amount paid\n */\n currency: SupportedCurrency\n}\n\n/**\n * A receipt is a record of a payment made\n */\nexport type Receipt = PayloadWithSources<ReceiptFields, ReceiptSchema>\n\n/**\n * Identity function for determine if an object is a Receipt\n */\nexport const isReceipt = isPayloadOfSchemaType<Receipt>(ReceiptSchema)\n\n/**\n * Identity function for determine if an object is a Receipt with sources\n */\nexport const isReceiptWithSources = isPayloadOfSchemaTypeWithSources<Receipt>(ReceiptSchema)\n\n/**\n * Identity function for determine if an object is a Receipt with meta\n */\nexport const isReceiptWithMeta = isPayloadOfSchemaTypeWithMeta<Receipt>(ReceiptSchema)\n","import { PaymentsSchema } from '../Schema'\n\nexport const ReceiptSchema = `${PaymentsSchema}.receipt`\nexport type ReceiptSchema = typeof ReceiptSchema\n"],"mappings":";;;;;;;;;;;;;;;;;;;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;;ACAA,2BAAgH;;;ACAzG,IAAM,iBAAiB;;;ACEvB,I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vC,IAAM,0BAA0B,GAAG,aAAa;;;ACAhD,IAAM,oBAAoB,GAAG,uBAAuB;;;AHoCpD,IAAM,oBAAgB,6CAAmC,iBAAiB;AAK1E,IAAM,+BAA2B,wDAA8C,iBAAiB;AAKhG,IAAM,4BAAwB,qDAA2C,iBAAiB;;;AIhDjG,IAAAC,wBAKO;AAwBA,IAAM,gBAAY,6CAA+B,aAAa;AAK9D,IAAM,2BAAuB,wDAA0C,aAAa;AAKpF,IAAM,wBAAoB,qDAAuC,aAAa;;;ACvCrF,IAAAC,wBAKO;;;ACHA,IAAM,sBAAsB,GAAG,aAAa;;;ADsB5C,IAAM,sBAAkB,6CAAqC,mBAAmB;AAKhF,IAAM,iCAA6B,wDAAgD,mBAAmB;AAKtG,IAAM,8BAA0B,qDAA6C,mBAAmB;;;AEjCvG,IAAAC,wBAKO;;;ACJA,IAAM,iBAAiB,GAAG,cAAc;;;AD4BxC,IAAM,iBAAa,6CAAgC,cAAc;AAKjE,IAAM,4BAAwB,wDAA2C,cAAc;AAKvF,IAAM,yBAAqB,qDAAwC,cAAc;;;AExCxF,IAAAC,wBAKO;;;ACHA,IAAM,gBAAgB,GAAG,cAAc;;;AD2BvC,IAAM,gBAAY,6CAA+B,aAAa;AAK9D,IAAM,2BAAuB,wDAA0C,aAAa;AAKpF,IAAM,wBAAoB,qDAAuC,aAAa;","names":["import_payload_model","name","name","name","import_hex","name","import_assert","import_boundwitness_model","name","errors","name","import_hex","name","import_assert","import_boundwitness_model","import_boundwitness_validator","name","errors","import_payload_model","import_payload_model","import_payload_model","import_payload_model","import_payload_model"]}
@@ -383,35 +383,50 @@ var isPayment = isPayloadOfSchemaType4(PaymentSchema);
383
383
  var isPaymentWithSources = isPayloadOfSchemaTypeWithSources4(PaymentSchema);
384
384
  var isPaymentWithMeta = isPayloadOfSchemaTypeWithMeta4(PaymentSchema);
385
385
 
386
- // src/Purchase/Payload.ts
386
+ // src/Payment/Status/Payload.ts
387
387
  import {
388
388
  isPayloadOfSchemaType as isPayloadOfSchemaType5,
389
389
  isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta5,
390
390
  isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources5
391
391
  } from "@xyo-network/payload-model";
392
392
 
393
+ // src/Payment/Status/Schema.ts
394
+ var PaymentStatusSchema = `${PaymentSchema}.status`;
395
+
396
+ // src/Payment/Status/Payload.ts
397
+ var isPaymentStatus = isPayloadOfSchemaType5(PaymentStatusSchema);
398
+ var isPaymentStatusWithSources = isPayloadOfSchemaTypeWithSources5(PaymentStatusSchema);
399
+ var isPaymentStatusWithMeta = isPayloadOfSchemaTypeWithMeta5(PaymentStatusSchema);
400
+
401
+ // src/Purchase/Payload.ts
402
+ import {
403
+ isPayloadOfSchemaType as isPayloadOfSchemaType6,
404
+ isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta6,
405
+ isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources6
406
+ } from "@xyo-network/payload-model";
407
+
393
408
  // src/Purchase/Schema.ts
394
409
  var PurchaseSchema = `${PaymentsSchema}.purchase`;
395
410
 
396
411
  // src/Purchase/Payload.ts
397
- var isPurchase = isPayloadOfSchemaType5(PurchaseSchema);
398
- var isPurchaseWithSources = isPayloadOfSchemaTypeWithSources5(PurchaseSchema);
399
- var isPurchaseWithMeta = isPayloadOfSchemaTypeWithMeta5(PurchaseSchema);
412
+ var isPurchase = isPayloadOfSchemaType6(PurchaseSchema);
413
+ var isPurchaseWithSources = isPayloadOfSchemaTypeWithSources6(PurchaseSchema);
414
+ var isPurchaseWithMeta = isPayloadOfSchemaTypeWithMeta6(PurchaseSchema);
400
415
 
401
416
  // src/Receipt/Payload.ts
402
417
  import {
403
- isPayloadOfSchemaType as isPayloadOfSchemaType6,
404
- isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta6,
405
- isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources6
418
+ isPayloadOfSchemaType as isPayloadOfSchemaType7,
419
+ isPayloadOfSchemaTypeWithMeta as isPayloadOfSchemaTypeWithMeta7,
420
+ isPayloadOfSchemaTypeWithSources as isPayloadOfSchemaTypeWithSources7
406
421
  } from "@xyo-network/payload-model";
407
422
 
408
423
  // src/Receipt/Schema.ts
409
424
  var ReceiptSchema = `${PaymentsSchema}.receipt`;
410
425
 
411
426
  // src/Receipt/Payload.ts
412
- var isReceipt = isPayloadOfSchemaType6(ReceiptSchema);
413
- var isReceiptWithSources = isPayloadOfSchemaTypeWithSources6(ReceiptSchema);
414
- var isReceiptWithMeta = isPayloadOfSchemaTypeWithMeta6(ReceiptSchema);
427
+ var isReceipt = isPayloadOfSchemaType7(ReceiptSchema);
428
+ var isReceiptWithSources = isPayloadOfSchemaTypeWithSources7(ReceiptSchema);
429
+ var isReceiptWithMeta = isPayloadOfSchemaTypeWithMeta7(ReceiptSchema);
415
430
  export {
416
431
  BillingAddressSchema,
417
432
  BillingSchema,
@@ -420,6 +435,7 @@ export {
420
435
  PaymentCardSchema,
421
436
  PaymentInstrumentSchema,
422
437
  PaymentSchema,
438
+ PaymentStatusSchema,
423
439
  PurchaseSchema,
424
440
  ReceiptSchema,
425
441
  appraisalAuthoritiesExistValidator,
@@ -451,6 +467,9 @@ export {
451
467
  isPaymentCard,
452
468
  isPaymentCardWithMeta,
453
469
  isPaymentCardWithSources,
470
+ isPaymentStatus,
471
+ isPaymentStatusWithMeta,
472
+ isPaymentStatusWithSources,
454
473
  isPaymentWithMeta,
455
474
  isPaymentWithSources,
456
475
  isPurchase,