project-cpu-mcp 0.12.0 → 0.12.2

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 (418) hide show
  1. package/dist/api/client.d.ts.map +1 -1
  2. package/dist/api/client.js +7 -3
  3. package/dist/api/client.js.map +1 -1
  4. package/dist/api/types.d.ts +12 -1
  5. package/dist/api/types.d.ts.map +1 -1
  6. package/dist/api/types.js +2 -0
  7. package/dist/api/types.js.map +1 -1
  8. package/dist/contracts/approval.constants.d.ts +4 -0
  9. package/dist/contracts/approval.constants.d.ts.map +1 -0
  10. package/dist/contracts/approval.constants.js +4 -0
  11. package/dist/contracts/approval.constants.js.map +1 -0
  12. package/dist/contracts/approval.types.d.ts +9 -0
  13. package/dist/contracts/approval.types.d.ts.map +1 -0
  14. package/dist/contracts/approval.types.js +2 -0
  15. package/dist/contracts/approval.types.js.map +1 -0
  16. package/dist/contracts/approval.utils.d.ts +4 -0
  17. package/dist/contracts/approval.utils.d.ts.map +1 -0
  18. package/dist/contracts/approval.utils.js +41 -0
  19. package/dist/contracts/approval.utils.js.map +1 -0
  20. package/dist/contracts/erc721.abi.d.ts +27 -0
  21. package/dist/contracts/erc721.abi.d.ts.map +1 -0
  22. package/dist/contracts/erc721.abi.js +6 -0
  23. package/dist/contracts/erc721.abi.js.map +1 -0
  24. package/dist/contracts/seaport-events.abi.d.ts +95 -0
  25. package/dist/contracts/seaport-events.abi.d.ts.map +1 -0
  26. package/dist/contracts/seaport-events.abi.js +52 -0
  27. package/dist/contracts/seaport-events.abi.js.map +1 -0
  28. package/dist/contracts/seaport-spender.reader.d.ts +9 -0
  29. package/dist/contracts/seaport-spender.reader.d.ts.map +1 -0
  30. package/dist/contracts/seaport-spender.reader.js +101 -0
  31. package/dist/contracts/seaport-spender.reader.js.map +1 -0
  32. package/dist/contracts/seaport.constants.d.ts +136 -0
  33. package/dist/contracts/seaport.constants.d.ts.map +1 -0
  34. package/dist/contracts/seaport.constants.js +57 -0
  35. package/dist/contracts/seaport.constants.js.map +1 -0
  36. package/dist/contracts/seaport.types.d.ts +34 -0
  37. package/dist/contracts/seaport.types.d.ts.map +1 -0
  38. package/dist/contracts/seaport.types.js +24 -0
  39. package/dist/contracts/seaport.types.js.map +1 -0
  40. package/dist/index.js +11 -1
  41. package/dist/index.js.map +1 -1
  42. package/dist/logger/constants.d.ts.map +1 -1
  43. package/dist/logger/constants.js +2 -0
  44. package/dist/logger/constants.js.map +1 -1
  45. package/dist/paybox/auth/types.d.ts +2 -2
  46. package/dist/paybox/auth/types.d.ts.map +1 -1
  47. package/dist/paybox/sdk/adapter.d.ts +2 -1
  48. package/dist/paybox/sdk/adapter.d.ts.map +1 -1
  49. package/dist/paybox/sdk/adapter.js +24 -0
  50. package/dist/paybox/sdk/adapter.js.map +1 -1
  51. package/dist/paybox/types.d.ts +20 -16
  52. package/dist/paybox/types.d.ts.map +1 -1
  53. package/dist/paybox/types.js +1 -0
  54. package/dist/paybox/types.js.map +1 -1
  55. package/dist/paybox/wallet/manager.d.ts +3 -1
  56. package/dist/paybox/wallet/manager.d.ts.map +1 -1
  57. package/dist/paybox/wallet/manager.js +16 -5
  58. package/dist/paybox/wallet/manager.js.map +1 -1
  59. package/dist/paybox/wallet/rpc.client.d.ts +1 -0
  60. package/dist/paybox/wallet/rpc.client.d.ts.map +1 -1
  61. package/dist/paybox/wallet/rpc.client.js +4 -0
  62. package/dist/paybox/wallet/rpc.client.js.map +1 -1
  63. package/dist/paybox/wallet/utils.d.ts +0 -2
  64. package/dist/paybox/wallet/utils.d.ts.map +1 -1
  65. package/dist/paybox/wallet/utils.js +2 -65
  66. package/dist/paybox/wallet/utils.js.map +1 -1
  67. package/dist/server.constants.d.ts.map +1 -1
  68. package/dist/server.constants.js +13 -19
  69. package/dist/server.constants.js.map +1 -1
  70. package/dist/server.d.ts.map +1 -1
  71. package/dist/server.js +11 -5
  72. package/dist/server.js.map +1 -1
  73. package/dist/services/app-config.utils.d.ts.map +1 -1
  74. package/dist/services/app-config.utils.js +1 -0
  75. package/dist/services/app-config.utils.js.map +1 -1
  76. package/dist/services/auth.service.d.ts.map +1 -1
  77. package/dist/services/auth.service.js +16 -4
  78. package/dist/services/auth.service.js.map +1 -1
  79. package/dist/services/market/acceptance.constants.d.ts +5 -0
  80. package/dist/services/market/acceptance.constants.d.ts.map +1 -0
  81. package/dist/services/market/acceptance.constants.js +6 -0
  82. package/dist/services/market/acceptance.constants.js.map +1 -0
  83. package/dist/services/market/acceptance.service.d.ts +51 -0
  84. package/dist/services/market/acceptance.service.d.ts.map +1 -0
  85. package/dist/services/market/acceptance.service.js +595 -0
  86. package/dist/services/market/acceptance.service.js.map +1 -0
  87. package/dist/services/market/acceptance.types.d.ts +214 -0
  88. package/dist/services/market/acceptance.types.d.ts.map +1 -0
  89. package/dist/services/market/acceptance.types.js +13 -0
  90. package/dist/services/market/acceptance.types.js.map +1 -0
  91. package/dist/services/market/acceptance.utils.d.ts +7 -0
  92. package/dist/services/market/acceptance.utils.d.ts.map +1 -0
  93. package/dist/services/market/acceptance.utils.js +15 -0
  94. package/dist/services/market/acceptance.utils.js.map +1 -0
  95. package/dist/services/market/action.types.d.ts +29 -0
  96. package/dist/services/market/action.types.d.ts.map +1 -0
  97. package/dist/services/market/action.types.js +9 -0
  98. package/dist/services/market/action.types.js.map +1 -0
  99. package/dist/services/market/budget.d.ts +17 -0
  100. package/dist/services/market/budget.d.ts.map +1 -0
  101. package/dist/services/market/budget.js +52 -0
  102. package/dist/services/market/budget.js.map +1 -0
  103. package/dist/services/market/budget.scope.d.ts +4 -0
  104. package/dist/services/market/budget.scope.d.ts.map +1 -0
  105. package/dist/services/market/budget.scope.js +10 -0
  106. package/dist/services/market/budget.scope.js.map +1 -0
  107. package/dist/services/market/budget.utils.d.ts +4 -0
  108. package/dist/services/market/budget.utils.d.ts.map +1 -0
  109. package/dist/services/market/budget.utils.js +29 -0
  110. package/dist/services/market/budget.utils.js.map +1 -0
  111. package/dist/services/market/cancel.abi.d.ts +108 -0
  112. package/dist/services/market/cancel.abi.d.ts.map +1 -0
  113. package/dist/services/market/cancel.abi.js +50 -0
  114. package/dist/services/market/cancel.abi.js.map +1 -0
  115. package/dist/services/market/cancel.constants.d.ts +4 -0
  116. package/dist/services/market/cancel.constants.d.ts.map +1 -0
  117. package/dist/services/market/cancel.constants.js +5 -0
  118. package/dist/services/market/cancel.constants.js.map +1 -0
  119. package/dist/services/market/cancel.service.d.ts +34 -0
  120. package/dist/services/market/cancel.service.d.ts.map +1 -0
  121. package/dist/services/market/cancel.service.js +342 -0
  122. package/dist/services/market/cancel.service.js.map +1 -0
  123. package/dist/services/market/cancel.types.d.ts +87 -0
  124. package/dist/services/market/cancel.types.d.ts.map +1 -0
  125. package/dist/services/market/cancel.types.js +8 -0
  126. package/dist/services/market/cancel.types.js.map +1 -0
  127. package/dist/services/market/cancel.utils.d.ts +7 -0
  128. package/dist/services/market/cancel.utils.d.ts.map +1 -0
  129. package/dist/services/market/cancel.utils.js +71 -0
  130. package/dist/services/market/cancel.utils.js.map +1 -0
  131. package/dist/services/market/client.d.ts +19 -0
  132. package/dist/services/market/client.d.ts.map +1 -0
  133. package/dist/services/market/client.js +198 -0
  134. package/dist/services/market/client.js.map +1 -0
  135. package/dist/services/market/client.types.d.ts +6 -0
  136. package/dist/services/market/client.types.d.ts.map +1 -0
  137. package/dist/services/market/client.types.js +2 -0
  138. package/dist/services/market/client.types.js.map +1 -0
  139. package/dist/services/market/constants.d.ts +21 -0
  140. package/dist/services/market/constants.d.ts.map +1 -0
  141. package/dist/services/market/constants.js +36 -0
  142. package/dist/services/market/constants.js.map +1 -0
  143. package/dist/services/market/error.d.ts +10 -0
  144. package/dist/services/market/error.d.ts.map +1 -0
  145. package/dist/services/market/error.js +18 -0
  146. package/dist/services/market/error.js.map +1 -0
  147. package/dist/services/market/error.utils.d.ts +10 -0
  148. package/dist/services/market/error.utils.d.ts.map +1 -0
  149. package/dist/services/market/error.utils.js +56 -0
  150. package/dist/services/market/error.utils.js.map +1 -0
  151. package/dist/services/market/factory.d.ts +4 -0
  152. package/dist/services/market/factory.d.ts.map +1 -0
  153. package/dist/services/market/factory.js +86 -0
  154. package/dist/services/market/factory.js.map +1 -0
  155. package/dist/services/market/factory.types.d.ts +34 -0
  156. package/dist/services/market/factory.types.d.ts.map +1 -0
  157. package/dist/services/market/factory.types.js +2 -0
  158. package/dist/services/market/factory.types.js.map +1 -0
  159. package/dist/services/market/fulfilment-proof.d.ts +13 -0
  160. package/dist/services/market/fulfilment-proof.d.ts.map +1 -0
  161. package/dist/services/market/fulfilment-proof.js +116 -0
  162. package/dist/services/market/fulfilment-proof.js.map +1 -0
  163. package/dist/services/market/fulfilment-proof.reader.d.ts +8 -0
  164. package/dist/services/market/fulfilment-proof.reader.d.ts.map +1 -0
  165. package/dist/services/market/fulfilment-proof.reader.js +22 -0
  166. package/dist/services/market/fulfilment-proof.reader.js.map +1 -0
  167. package/dist/services/market/fulfilment-proof.types.d.ts +46 -0
  168. package/dist/services/market/fulfilment-proof.types.d.ts.map +1 -0
  169. package/dist/services/market/fulfilment-proof.types.js +6 -0
  170. package/dist/services/market/fulfilment-proof.types.js.map +1 -0
  171. package/dist/services/market/fulfilment-proof.utils.d.ts +19 -0
  172. package/dist/services/market/fulfilment-proof.utils.d.ts.map +1 -0
  173. package/dist/services/market/fulfilment-proof.utils.js +69 -0
  174. package/dist/services/market/fulfilment-proof.utils.js.map +1 -0
  175. package/dist/services/market/idempotency.utils.d.ts +4 -0
  176. package/dist/services/market/idempotency.utils.d.ts.map +1 -0
  177. package/dist/services/market/idempotency.utils.js +15 -0
  178. package/dist/services/market/idempotency.utils.js.map +1 -0
  179. package/dist/services/market/listing.constants.d.ts +7 -0
  180. package/dist/services/market/listing.constants.d.ts.map +1 -0
  181. package/dist/services/market/listing.constants.js +8 -0
  182. package/dist/services/market/listing.constants.js.map +1 -0
  183. package/dist/services/market/listing.service.d.ts +53 -0
  184. package/dist/services/market/listing.service.d.ts.map +1 -0
  185. package/dist/services/market/listing.service.js +671 -0
  186. package/dist/services/market/listing.service.js.map +1 -0
  187. package/dist/services/market/listing.types.d.ts +718 -0
  188. package/dist/services/market/listing.types.d.ts.map +1 -0
  189. package/dist/services/market/listing.types.js +84 -0
  190. package/dist/services/market/listing.types.js.map +1 -0
  191. package/dist/services/market/listing.utils.d.ts +12 -0
  192. package/dist/services/market/listing.utils.d.ts.map +1 -0
  193. package/dist/services/market/listing.utils.js +51 -0
  194. package/dist/services/market/listing.utils.js.map +1 -0
  195. package/dist/services/market/offer.constants.d.ts +8 -0
  196. package/dist/services/market/offer.constants.d.ts.map +1 -0
  197. package/dist/services/market/offer.constants.js +9 -0
  198. package/dist/services/market/offer.constants.js.map +1 -0
  199. package/dist/services/market/offer.service.d.ts +54 -0
  200. package/dist/services/market/offer.service.d.ts.map +1 -0
  201. package/dist/services/market/offer.service.js +757 -0
  202. package/dist/services/market/offer.service.js.map +1 -0
  203. package/dist/services/market/offer.types.d.ts +554 -0
  204. package/dist/services/market/offer.types.d.ts.map +1 -0
  205. package/dist/services/market/offer.types.js +73 -0
  206. package/dist/services/market/offer.types.js.map +1 -0
  207. package/dist/services/market/offer.utils.d.ts +7 -0
  208. package/dist/services/market/offer.utils.d.ts.map +1 -0
  209. package/dist/services/market/offer.utils.js +25 -0
  210. package/dist/services/market/offer.utils.js.map +1 -0
  211. package/dist/services/market/profile.client.d.ts +14 -0
  212. package/dist/services/market/profile.client.d.ts.map +1 -0
  213. package/dist/services/market/profile.client.js +65 -0
  214. package/dist/services/market/profile.client.js.map +1 -0
  215. package/dist/services/market/profile.schemas.d.ts +630 -0
  216. package/dist/services/market/profile.schemas.d.ts.map +1 -0
  217. package/dist/services/market/profile.schemas.js +84 -0
  218. package/dist/services/market/profile.schemas.js.map +1 -0
  219. package/dist/services/market/profile.utils.d.ts +2 -0
  220. package/dist/services/market/profile.utils.d.ts.map +1 -0
  221. package/dist/services/market/profile.utils.js +8 -0
  222. package/dist/services/market/profile.utils.js.map +1 -0
  223. package/dist/services/market/purchase.constants.d.ts +5 -0
  224. package/dist/services/market/purchase.constants.d.ts.map +1 -0
  225. package/dist/services/market/purchase.constants.js +6 -0
  226. package/dist/services/market/purchase.constants.js.map +1 -0
  227. package/dist/services/market/purchase.service.d.ts +48 -0
  228. package/dist/services/market/purchase.service.d.ts.map +1 -0
  229. package/dist/services/market/purchase.service.js +564 -0
  230. package/dist/services/market/purchase.service.js.map +1 -0
  231. package/dist/services/market/purchase.types.d.ts +207 -0
  232. package/dist/services/market/purchase.types.d.ts.map +1 -0
  233. package/dist/services/market/purchase.types.js +13 -0
  234. package/dist/services/market/purchase.types.js.map +1 -0
  235. package/dist/services/market/purchase.utils.d.ts +11 -0
  236. package/dist/services/market/purchase.utils.d.ts.map +1 -0
  237. package/dist/services/market/purchase.utils.js +29 -0
  238. package/dist/services/market/purchase.utils.js.map +1 -0
  239. package/dist/services/market/recovery.constants.d.ts +6 -0
  240. package/dist/services/market/recovery.constants.d.ts.map +1 -0
  241. package/dist/services/market/recovery.constants.js +6 -0
  242. package/dist/services/market/recovery.constants.js.map +1 -0
  243. package/dist/services/market/recovery.store.d.ts +10 -0
  244. package/dist/services/market/recovery.store.d.ts.map +1 -0
  245. package/dist/services/market/recovery.store.js +44 -0
  246. package/dist/services/market/recovery.store.js.map +1 -0
  247. package/dist/services/market/service.d.ts +11 -0
  248. package/dist/services/market/service.d.ts.map +1 -0
  249. package/dist/services/market/service.js +71 -0
  250. package/dist/services/market/service.js.map +1 -0
  251. package/dist/services/market/single-flight.d.ts +6 -0
  252. package/dist/services/market/single-flight.d.ts.map +1 -0
  253. package/dist/services/market/single-flight.js +19 -0
  254. package/dist/services/market/single-flight.js.map +1 -0
  255. package/dist/services/market/snapshot.schemas.d.ts +385 -0
  256. package/dist/services/market/snapshot.schemas.d.ts.map +1 -0
  257. package/dist/services/market/snapshot.schemas.js +67 -0
  258. package/dist/services/market/snapshot.schemas.js.map +1 -0
  259. package/dist/services/market/types.d.ts +787 -0
  260. package/dist/services/market/types.d.ts.map +1 -0
  261. package/dist/services/market/types.js +216 -0
  262. package/dist/services/market/types.js.map +1 -0
  263. package/dist/services/types.d.ts +2 -0
  264. package/dist/services/types.d.ts.map +1 -1
  265. package/dist/services/types.js.map +1 -1
  266. package/dist/session/jwt.utils.d.ts +1 -0
  267. package/dist/session/jwt.utils.d.ts.map +1 -1
  268. package/dist/session/jwt.utils.js +4 -0
  269. package/dist/session/jwt.utils.js.map +1 -1
  270. package/dist/session/manager.d.ts +1 -1
  271. package/dist/session/manager.d.ts.map +1 -1
  272. package/dist/session/manager.js.map +1 -1
  273. package/dist/tools/authenticate.d.ts +1 -1
  274. package/dist/tools/authenticate.d.ts.map +1 -1
  275. package/dist/tools/authenticate.js.map +1 -1
  276. package/dist/tools/config/get-game-config/get-game-config.utils.js +1 -1
  277. package/dist/tools/config/get-game-config/get-game-config.utils.js.map +1 -1
  278. package/dist/tools/market/accept-offer/accept-offer.d.ts +4 -0
  279. package/dist/tools/market/accept-offer/accept-offer.d.ts.map +1 -0
  280. package/dist/tools/market/accept-offer/accept-offer.js +29 -0
  281. package/dist/tools/market/accept-offer/accept-offer.js.map +1 -0
  282. package/dist/tools/market/accept-offer/constants.d.ts +2 -0
  283. package/dist/tools/market/accept-offer/constants.d.ts.map +1 -0
  284. package/dist/tools/market/accept-offer/constants.js +27 -0
  285. package/dist/tools/market/accept-offer/constants.js.map +1 -0
  286. package/dist/tools/market/accept-offer/format.utils.d.ts +3 -0
  287. package/dist/tools/market/accept-offer/format.utils.d.ts.map +1 -0
  288. package/dist/tools/market/accept-offer/format.utils.js +22 -0
  289. package/dist/tools/market/accept-offer/format.utils.js.map +1 -0
  290. package/dist/tools/market/accept-offer/types.d.ts +9 -0
  291. package/dist/tools/market/accept-offer/types.d.ts.map +1 -0
  292. package/dist/tools/market/accept-offer/types.js +14 -0
  293. package/dist/tools/market/accept-offer/types.js.map +1 -0
  294. package/dist/tools/market/buy-cell/buy-cell.d.ts +4 -0
  295. package/dist/tools/market/buy-cell/buy-cell.d.ts.map +1 -0
  296. package/dist/tools/market/buy-cell/buy-cell.js +30 -0
  297. package/dist/tools/market/buy-cell/buy-cell.js.map +1 -0
  298. package/dist/tools/market/buy-cell/constants.d.ts +2 -0
  299. package/dist/tools/market/buy-cell/constants.d.ts.map +1 -0
  300. package/dist/tools/market/buy-cell/constants.js +23 -0
  301. package/dist/tools/market/buy-cell/constants.js.map +1 -0
  302. package/dist/tools/market/buy-cell/format.utils.d.ts +3 -0
  303. package/dist/tools/market/buy-cell/format.utils.d.ts.map +1 -0
  304. package/dist/tools/market/buy-cell/format.utils.js +17 -0
  305. package/dist/tools/market/buy-cell/format.utils.js.map +1 -0
  306. package/dist/tools/market/buy-cell/types.d.ts +6 -0
  307. package/dist/tools/market/buy-cell/types.d.ts.map +1 -0
  308. package/dist/tools/market/buy-cell/types.js +10 -0
  309. package/dist/tools/market/buy-cell/types.js.map +1 -0
  310. package/dist/tools/market/cancel-order/cancel-order.d.ts +4 -0
  311. package/dist/tools/market/cancel-order/cancel-order.d.ts.map +1 -0
  312. package/dist/tools/market/cancel-order/cancel-order.js +29 -0
  313. package/dist/tools/market/cancel-order/cancel-order.js.map +1 -0
  314. package/dist/tools/market/cancel-order/constants.d.ts +2 -0
  315. package/dist/tools/market/cancel-order/constants.d.ts.map +1 -0
  316. package/dist/tools/market/cancel-order/constants.js +22 -0
  317. package/dist/tools/market/cancel-order/constants.js.map +1 -0
  318. package/dist/tools/market/cancel-order/format.utils.d.ts +3 -0
  319. package/dist/tools/market/cancel-order/format.utils.d.ts.map +1 -0
  320. package/dist/tools/market/cancel-order/format.utils.js +13 -0
  321. package/dist/tools/market/cancel-order/format.utils.js.map +1 -0
  322. package/dist/tools/market/cancel-order/types.d.ts +8 -0
  323. package/dist/tools/market/cancel-order/types.d.ts.map +1 -0
  324. package/dist/tools/market/cancel-order/types.js +7 -0
  325. package/dist/tools/market/cancel-order/types.js.map +1 -0
  326. package/dist/tools/market/cell-market/cell-market.d.ts +4 -0
  327. package/dist/tools/market/cell-market/cell-market.d.ts.map +1 -0
  328. package/dist/tools/market/cell-market/cell-market.js +24 -0
  329. package/dist/tools/market/cell-market/cell-market.js.map +1 -0
  330. package/dist/tools/market/cell-market/constants.d.ts +2 -0
  331. package/dist/tools/market/cell-market/constants.d.ts.map +1 -0
  332. package/dist/tools/market/cell-market/constants.js +16 -0
  333. package/dist/tools/market/cell-market/constants.js.map +1 -0
  334. package/dist/tools/market/format.utils.d.ts +8 -0
  335. package/dist/tools/market/format.utils.d.ts.map +1 -0
  336. package/dist/tools/market/format.utils.js +75 -0
  337. package/dist/tools/market/format.utils.js.map +1 -0
  338. package/dist/tools/market/list-cell/constants.d.ts +2 -0
  339. package/dist/tools/market/list-cell/constants.d.ts.map +1 -0
  340. package/dist/tools/market/list-cell/constants.js +23 -0
  341. package/dist/tools/market/list-cell/constants.js.map +1 -0
  342. package/dist/tools/market/list-cell/list-cell.d.ts +4 -0
  343. package/dist/tools/market/list-cell/list-cell.d.ts.map +1 -0
  344. package/dist/tools/market/list-cell/list-cell.js +31 -0
  345. package/dist/tools/market/list-cell/list-cell.js.map +1 -0
  346. package/dist/tools/market/list-cell/types.d.ts +7 -0
  347. package/dist/tools/market/list-cell/types.d.ts.map +1 -0
  348. package/dist/tools/market/list-cell/types.js +15 -0
  349. package/dist/tools/market/list-cell/types.js.map +1 -0
  350. package/dist/tools/market/make-offer/constants.d.ts +2 -0
  351. package/dist/tools/market/make-offer/constants.d.ts.map +1 -0
  352. package/dist/tools/market/make-offer/constants.js +22 -0
  353. package/dist/tools/market/make-offer/constants.js.map +1 -0
  354. package/dist/tools/market/make-offer/format.utils.d.ts +3 -0
  355. package/dist/tools/market/make-offer/format.utils.d.ts.map +1 -0
  356. package/dist/tools/market/make-offer/format.utils.js +16 -0
  357. package/dist/tools/market/make-offer/format.utils.js.map +1 -0
  358. package/dist/tools/market/make-offer/make-offer.d.ts +4 -0
  359. package/dist/tools/market/make-offer/make-offer.d.ts.map +1 -0
  360. package/dist/tools/market/make-offer/make-offer.js +30 -0
  361. package/dist/tools/market/make-offer/make-offer.js.map +1 -0
  362. package/dist/tools/market/make-offer/types.d.ts +10 -0
  363. package/dist/tools/market/make-offer/types.d.ts.map +1 -0
  364. package/dist/tools/market/make-offer/types.js +10 -0
  365. package/dist/tools/market/make-offer/types.js.map +1 -0
  366. package/dist/tools/market/my-listings/constants.d.ts +2 -0
  367. package/dist/tools/market/my-listings/constants.d.ts.map +1 -0
  368. package/dist/tools/market/my-listings/constants.js +14 -0
  369. package/dist/tools/market/my-listings/constants.js.map +1 -0
  370. package/dist/tools/market/my-listings/my-listings.d.ts +4 -0
  371. package/dist/tools/market/my-listings/my-listings.d.ts.map +1 -0
  372. package/dist/tools/market/my-listings/my-listings.js +24 -0
  373. package/dist/tools/market/my-listings/my-listings.js.map +1 -0
  374. package/dist/tools/market/my-offers/constants.d.ts +2 -0
  375. package/dist/tools/market/my-offers/constants.d.ts.map +1 -0
  376. package/dist/tools/market/my-offers/constants.js +15 -0
  377. package/dist/tools/market/my-offers/constants.js.map +1 -0
  378. package/dist/tools/market/my-offers/my-offers.d.ts +4 -0
  379. package/dist/tools/market/my-offers/my-offers.d.ts.map +1 -0
  380. package/dist/tools/market/my-offers/my-offers.js +24 -0
  381. package/dist/tools/market/my-offers/my-offers.js.map +1 -0
  382. package/dist/tools/market/my-offers-received/constants.d.ts +2 -0
  383. package/dist/tools/market/my-offers-received/constants.d.ts.map +1 -0
  384. package/dist/tools/market/my-offers-received/constants.js +16 -0
  385. package/dist/tools/market/my-offers-received/constants.js.map +1 -0
  386. package/dist/tools/market/my-offers-received/my-offers-received.d.ts +4 -0
  387. package/dist/tools/market/my-offers-received/my-offers-received.d.ts.map +1 -0
  388. package/dist/tools/market/my-offers-received/my-offers-received.js +24 -0
  389. package/dist/tools/market/my-offers-received/my-offers-received.js.map +1 -0
  390. package/dist/tools/market/output.types.d.ts +822 -0
  391. package/dist/tools/market/output.types.d.ts.map +1 -0
  392. package/dist/tools/market/output.types.js +75 -0
  393. package/dist/tools/market/output.types.js.map +1 -0
  394. package/dist/tools/market/register.d.ts +12 -0
  395. package/dist/tools/market/register.d.ts.map +1 -0
  396. package/dist/tools/market/register.js +50 -0
  397. package/dist/tools/market/register.js.map +1 -0
  398. package/dist/tools/market/types.d.ts +16 -0
  399. package/dist/tools/market/types.d.ts.map +1 -0
  400. package/dist/tools/market/types.js +14 -0
  401. package/dist/tools/market/types.js.map +1 -0
  402. package/dist/tools/types.d.ts +6 -1
  403. package/dist/tools/types.d.ts.map +1 -1
  404. package/dist/tools/types.js +5 -0
  405. package/dist/tools/types.js.map +1 -1
  406. package/dist/types.d.ts +14 -0
  407. package/dist/types.d.ts.map +1 -1
  408. package/dist/types.js.map +1 -1
  409. package/dist/wallet/evm.manager.d.ts +3 -1
  410. package/dist/wallet/evm.manager.d.ts.map +1 -1
  411. package/dist/wallet/evm.manager.js +12 -0
  412. package/dist/wallet/evm.manager.js.map +1 -1
  413. package/dist/wallet/evm.provider.d.ts.map +1 -1
  414. package/dist/wallet/evm.provider.js +0 -3
  415. package/dist/wallet/evm.provider.js.map +1 -1
  416. package/dist/wallet/types.d.ts +19 -0
  417. package/dist/wallet/types.d.ts.map +1 -1
  418. package/package.json +1 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.schemas.js","sourceRoot":"","sources":["../../../src/services/market/profile.schemas.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAExB,OAAO,EACH,qBAAqB,EACrB,uBAAuB,EACvB,mBAAmB,EACnB,qBAAqB,GACxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACH,oBAAoB,EACpB,iBAAiB,EACjB,aAAa,EACb,YAAY,EACZ,eAAe,EACf,eAAe,EACf,gBAAgB,EAChB,eAAe,GAClB,MAAM,YAAY,CAAC;AAIpB,MAAM,4BAA4B,GAAG,CAAC,CAAC,MAAM,CAAC;IAC1C,MAAM,EAAE,CAAC,C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I,IAAI,OAAO,CAAC,OAAO,KAAK,IAAI,EAAE,CAAC;QACpG,OAAO,EAAE,SAAS,EAAE,OAAO,CAAC,SAAS,EAAE,KAAK,EAAE,mBAAmB,CAAC,OAAO,CAAC,KAAK,EAAE,OAAO,CAAC,EAAE,CAAC;IAChG,CAAC;IACD,OAAO,CAAC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,OAAO,EAAE,qDAAqD,EAAE,CAAC,CAAC;IACrG,OAAO,CAAC,CAAC,KAAK,CAAC;AACnB,CAAC,CAAC,CAAC"}
@@ -0,0 +1,2 @@
1
+ export declare function pagePath(basePath: string, cursor: string | null): string;
2
+ //# sourceMappingURL=profile.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.utils.d.ts","sourceRoot":"","sources":["../../../src/services/market/profile.utils.ts"],"names":[],"mappings":"AAEA,wBAAgB,QAAQ,CAAC,QAAQ,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,MAAM,CAMxE"}
@@ -0,0 +1,8 @@
1
+ import { MARKET_CURSOR_PARAM } from './constants.js';
2
+ export function pagePath(basePath, cursor) {
3
+ if (cursor === null) {
4
+ return basePath;
5
+ }
6
+ return `${basePath}?${new URLSearchParams({ [MARKET_CURSOR_PARAM]: cursor }).toString()}`;
7
+ }
8
+ //# sourceMappingURL=profile.utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"profile.utils.js","sourceRoot":"","sources":["../../../src/services/market/profile.utils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,UAAU,QAAQ,CAAC,QAAgB,EAAE,MAAqB;IAC5D,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;QAClB,OAAO,QAAQ,CAAC;IACpB,CAAC;IAED,OAAO,GAAG,QAAQ,IAAI,IAAI,eAAe,CAAC,EAAE,CAAC,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC;AAC9F,CAAC"}
@@ -0,0 +1,5 @@
1
+ export declare const MARKET_PURCHASE_PREPARE_PATH = "/api/v1/market/purchases/prepare";
2
+ export declare const PURCHASE_START_TIME_SKEW_SECONDS = 300;
3
+ export declare const PURCHASE_EMPTY_CALLDATA = "0x";
4
+ export declare const PURCHASE_NO_VALUE = "0";
5
+ //# sourceMappingURL=purchase.constants.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"purchase.constants.d.ts","sourceRoot":"","sources":["../../../src/services/market/purchase.constants.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,4BAA4B,qCAA0C,CAAC;AAEpF,eAAO,MAAM,gCAAgC,MAAM,CAAC;AAEpD,eAAO,MAAM,uBAAuB,OAAO,CAAC;AAE5C,eAAO,MAAM,iBAAiB,MAAM,CAAC"}
@@ -0,0 +1,6 @@
1
+ import { MARKET_BASE_PATH } from './constants.js';
2
+ export const MARKET_PURCHASE_PREPARE_PATH = `${MARKET_BASE_PATH}/purchases/prepare`;
3
+ export const PURCHASE_START_TIME_SKEW_SECONDS = 300;
4
+ export const PURCHASE_EMPTY_CALLDATA = '0x';
5
+ export const PURCHASE_NO_VALUE = '0';
6
+ //# sourceMappingURL=purchase.constants.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"purchase.constants.js","sourceRoot":"","sources":["../../../src/services/market/purchase.constants.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAElD,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAG,gBAAgB,oBAAoB,CAAC;AAEpF,MAAM,CAAC,MAAM,gCAAgC,GAAG,GAAG,CAAC;AAEpD,MAAM,CAAC,MAAM,uBAAuB,GAAG,IAAI,CAAC;AAE5C,MAAM,CAAC,MAAM,iBAAiB,GAAG,GAAG,CAAC"}
@@ -0,0 +1,48 @@
1
+ import { type BuyCellRequest, type BuyCellResult, type IMarketPurchaseService, type MarketPurchaseServiceOptions } from './purchase.types.js';
2
+ export declare class MarketPurchaseService implements IMarketPurchaseService {
3
+ private readonly client;
4
+ private readonly proof;
5
+ private readonly appConfig;
6
+ private readonly wallet;
7
+ private readonly network;
8
+ private readonly singleFlight;
9
+ private readonly recovery;
10
+ private readonly logger;
11
+ private readonly spenders;
12
+ constructor(options: MarketPurchaseServiceOptions);
13
+ buyCell(request: BuyCellRequest): Promise<BuyCellResult>;
14
+ private purchase;
15
+ private fulfil;
16
+ private settleKnownFulfilment;
17
+ private settle;
18
+ private forgetIfSettled;
19
+ private confirm;
20
+ private requireOwnedCell;
21
+ private prepare;
22
+ private requireTrustworthyPreparation;
23
+ private requirePinnedOrder;
24
+ private requireAffordableOrder;
25
+ private requireFulfilmentShape;
26
+ private requireCurrencyTransactions;
27
+ private requireExactApprovalAmount;
28
+ private requireRegisteredSpender;
29
+ private broadcastApproval;
30
+ private send;
31
+ private requireCellCollection;
32
+ private requireFulfilmentTransaction;
33
+ private requireWithinDeadline;
34
+ private requirePrepared;
35
+ private requireFulfilmentHash;
36
+ private requireUsableRequest;
37
+ private reserve;
38
+ private emptyPayload;
39
+ private result;
40
+ private lostBroadcast;
41
+ private knownHashes;
42
+ private unavailable;
43
+ private untrustworthy;
44
+ private rejectedInput;
45
+ private walletAddress;
46
+ private nowSeconds;
47
+ }
48
+ //# sourceMappingURL=purchase.service.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"purchase.service.d.ts","sourceRoot":"","sources":["../../../src/services/market/purchase.service.ts"],"names":[],"mappings":"AAqBA,OAAO,EAEH,KAAK,cAAc,EACnB,KAAK,aAAa,EAClB,KAAK,sBAAsB,EAC3B,KAAK,4BAA4B,EAGpC,MAAM,qBAAqB,CAAC;AAiC7B,qBAAa,qBAAsB,YAAW,sBAAsB;IAChE,OAAO,CAAC,QAAQ,CAAC,MAAM,CAA0B;IACjD,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAyB;IAC/C,OA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constants.js';
4
+ import { MarketError } from './error.js';
5
+ import { marketActionKey } from './idempotency.utils.js';
6
+ import { sameAddress } from './listing.utils.js';
7
+ import { MARKET_PURCHASE_PREPARE_PATH, PURCHASE_EMPTY_CALLDATA, PURCHASE_NO_VALUE, PURCHASE_START_TIME_SKEW_SECONDS, } from './purchase.constants.js';
8
+ import { preparePurchaseResponseSchema, } from './purchase.types.js';
9
+ import { effectivePurchaseDeadline, exceedsCeiling, isNativeCurrency, preparedNativeTotal, purchaseActionInputs, purchaseApprovals, purchaseFulfilment, sameOrderHash, } from './purchase.utils.js';
10
+ import { cellTokenIdSchema, evmAddressSchema, MarketActionStage, MarketActionStatus, MarketErrorCode, MarketTransactionKind, orderHashSchema, positiveBaseUnitAmountSchema, } from './types.js';
11
+ import { currencyApprovalCall } from '../../contracts/approval.utils.js';
12
+ import { ERC721_OWNERSHIP_ABI } from '../../contracts/erc721.abi.js';
13
+ import { SeaportSpenderReader } from '../../contracts/seaport-spender.reader.js';
14
+ import { SEAPORT_ADDRESS } from '../../contracts/seaport.constants.js';
15
+ import { SeaportSpenderOutcome } from '../../contracts/seaport.types.js';
16
+ import { errorMessage } from '../../utils/error.utils.js';
17
+ import { TxStatus } from '../../wallet/types.js';
18
+ export class MarketPurchaseService {
19
+ client;
20
+ proof;
21
+ appConfig;
22
+ wallet;
23
+ network;
24
+ singleFlight;
25
+ recovery;
26
+ logger;
27
+ spenders;
28
+ constructor(options) {
29
+ this.spenders = new SeaportSpenderReader({ wallet: options.wallet });
30
+ this.client = options.client;
31
+ this.proof = options.proof;
32
+ this.appConfig = options.appConfig;
33
+ this.wallet = options.wallet;
34
+ this.network = options.network;
35
+ this.singleFlight = options.singleFlight;
36
+ this.recovery = options.recovery;
37
+ this.logger = options.logger;
38
+ }
39
+ async buyCell(request) {
40
+ const validated = this.requireUsableRequest(request);
41
+ const key = marketActionKey({
42
+ wallet: this.walletAddress(),
43
+ network: this.network,
44
+ tool: MarketActionTool.BuyCell,
45
+ inputs: purchaseActionInputs(validated),
46
+ });
47
+ return this.singleFlight.run(key, async () => this.purchase(key, validated));
48
+ }
49
+ async purchase(key, request) {
50
+ const unresolved = this.recovery.read(key);
51
+ if (unresolved !== null && unresolved.payload.fulfilmentTxHash !== null) {
52
+ return this.settleKnownFulfilment(key, request, unresolved);
53
+ }
54
+ this.reserve(key, MarketActionStage.Prepare, this.emptyPayload());
55
+ let prepared;
56
+ try {
57
+ prepared = await this.prepare(request);
58
+ }
59
+ catch (error) {
60
+ this.recovery.forget(key);
61
+ throw error;
62
+ }
63
+ let payload = { prepared, approvalTxHashes: [], fulfilmentTxHash: null };
64
+ this.reserve(key, MarketActionStage.Prepare, payload);
65
+ for (const approval of purchaseApprovals(prepared)) {
66
+ let hash;
67
+ try {
68
+ hash = await this.broadcastApproval(approval, request);
69
+ }
70
+ catch (error) {
71
+ this.recovery.forget(key);
72
+ throw error;
73
+ }
74
+ payload = { ...payload, approvalTxHashes: [...payload.approvalTxHashes, hash] };
75
+ this.reserve(key, MarketActionStage.Approve, payload);
76
+ }
77
+ return this.fulfil(key, request, payload);
78
+ }
79
+ async fulfil(key, request, payload) {
80
+ let transaction;
81
+ try {
82
+ const prepared = this.requirePrepared(payload);
83
+ this.requireWithinDeadline(prepared, MarketActionStage.Fulfil);
84
+ transaction = this.requireFulfilmentTransaction(prepared, request);
85
+ }
86
+ catch (error) {
87
+ this.recovery.forget(key);
88
+ throw error;
89
+ }
90
+ let hash;
91
+ try {
92
+ hash = await this.send(transaction);
93
+ }
94
+ catch (error) {
95
+ this.reserve(key, MarketActionStage.Fulfil, payload);
96
+ throw this.lostBroadcast(request, payload, errorMessage(error));
97
+ }
98
+ const sent = { ...payload, fulfilmentTxHash: hash };
99
+ this.reserve(key, MarketActionStage.Fulfil, sent);
100
+ return this.settle(key, request, sent, MarketActionStatus.Completed);
101
+ }
102
+ async settleKnownFulfilment(key, request, record) {
103
+ this.logger.info('a purchase of this exact order is already on-chain — proving it instead of sending again', {
104
+ tokenId: request.tokenId,
105
+ orderHash: request.expectedOrderHash,
106
+ txHash: record.payload.fulfilmentTxHash,
107
+ });
108
+ return this.settle(key, request, record.payload, MarketActionStatus.AlreadyCompleted);
109
+ }
110
+ async settle(key, request, payload, status) {
111
+ const hash = this.requireFulfilmentHash(payload);
112
+ const receipt = await this.confirm(key, request, payload, hash);
113
+ try {
114
+ const collection = await this.requireCellCollection(MarketActionStage.Verify);
115
+ await this.proof.requireFulfilment({
116
+ receipt,
117
+ orderHash: request.expectedOrderHash,
118
+ wallet: this.walletAddress(),
119
+ stage: MarketActionStage.Verify,
120
+ boundCell: { collection, tokenId: request.tokenId },
121
+ });
122
+ await this.requireOwnedCell(request, hash);
123
+ }
124
+ catch (error) {
125
+ this.forgetIfSettled(key, error);
126
+ throw error;
127
+ }
128
+ this.recovery.forget(key);
129
+ return this.result(status, request, payload, hash);
130
+ }
131
+ // A terminal proof failure is the end of this intent: the transaction is mined and will never
132
+ // prove anything else, so holding its record would strand one of the bounded slots for the life
133
+ // of the process. A retryable one keeps its record, because repeating re-checks that same
134
+ // transaction instead of sending another.
135
+ forgetIfSettled(key, error) {
136
+ if (error instanceof MarketError && !error.retryable) {
137
+ this.recovery.forget(key);
138
+ }
139
+ }
140
+ async confirm(key, request, payload, hash) {
141
+ let receipt;
142
+ try {
143
+ receipt = await this.wallet.get().waitForReceipt(hash);
144
+ }
145
+ catch (error) {
146
+ throw new MarketError({
147
+ code: MarketErrorCode.OutcomeUnknown,
148
+ message: `The fulfilment of order ${request.expectedOrderHash} was broadcast as ${hash}, but its receipt ` +
149
+ `could not be read: ${errorMessage(error)}. The transaction is kept, so repeating this call ` +
150
+ 're-checks that exact transaction instead of buying anything else.',
151
+ retryable: true,
152
+ retryAfterSeconds: null,
153
+ stage: MarketActionStage.Fulfil,
154
+ txHash: hash,
155
+ });
156
+ }
157
+ if (receipt.status === TxStatus.Success) {
158
+ return receipt;
159
+ }
160
+ this.recovery.forget(key);
161
+ throw new MarketError({
162
+ code: MarketErrorCode.TransactionReverted,
163
+ message: `The fulfilment of order ${request.expectedOrderHash} reverted on-chain, so Cell ${request.tokenId} ` +
164
+ `was not bought and nothing was paid beyond gas. ${this.knownHashes(payload, hash)} The order may ` +
165
+ 'have been filled or cancelled meanwhile; read the market again and pick an exact order.',
166
+ retryable: false,
167
+ retryAfterSeconds: null,
168
+ stage: MarketActionStage.Fulfil,
169
+ txHash: hash,
170
+ });
171
+ }
172
+ async requireOwnedCell(request, hash) {
173
+ const collection = await this.requireCellCollection(MarketActionStage.Verify);
174
+ let owner;
175
+ try {
176
+ owner = (await this.wallet.get().readContract({
177
+ address: collection,
178
+ abi: ERC721_OWNERSHIP_ABI,
179
+ functionName: 'ownerOf',
180
+ args: [BigInt(request.tokenId)],
181
+ }));
182
+ }
183
+ catch (error) {
184
+ throw new MarketError({
185
+ code: MarketErrorCode.OutcomeUnknown,
186
+ message: `Order ${request.expectedOrderHash} was fulfilled by transaction ${hash}, but who owns Cell ` +
187
+ `${request.tokenId} now could not be read: ${errorMessage(error)}. The transaction is kept, so ` +
188
+ 'repeating this call re-checks it instead of buying anything else.',
189
+ retryable: true,
190
+ retryAfterSeconds: null,
191
+ stage: MarketActionStage.Verify,
192
+ txHash: hash,
193
+ });
194
+ }
195
+ if (sameAddress(owner, this.walletAddress())) {
196
+ return;
197
+ }
198
+ throw new MarketError({
199
+ code: MarketErrorCode.WrongOwner,
200
+ message: `Order ${request.expectedOrderHash} was fulfilled by transaction ${hash}, but Cell ` +
201
+ `${request.tokenId} is owned by ${owner} rather than this wallet ${this.walletAddress()}. ` +
202
+ 'The purchase is not reported as yours on that evidence.',
203
+ retryable: false,
204
+ retryAfterSeconds: null,
205
+ stage: MarketActionStage.Verify,
206
+ txHash: hash,
207
+ });
208
+ }
209
+ async prepare(request) {
210
+ const prepared = await this.client.sendOnce({
211
+ path: MARKET_PURCHASE_PREPARE_PATH,
212
+ method: 'POST',
213
+ body: {
214
+ tokenId: request.tokenId,
215
+ expectedOrderHash: request.expectedOrderHash,
216
+ maxAmount: request.maxAmount,
217
+ },
218
+ schema: preparePurchaseResponseSchema(this.wallet.get().getChainId()),
219
+ stage: MarketActionStage.Prepare,
220
+ label: `Preparing the purchase of order ${request.expectedOrderHash}`,
221
+ });
222
+ await this.requireTrustworthyPreparation(request, prepared);
223
+ return prepared;
224
+ }
225
+ async requireTrustworthyPreparation(request, prepared) {
226
+ const wallet = this.walletAddress();
227
+ const chainId = this.wallet.get().getChainId();
228
+ if (prepared.listing.chainId !== chainId) {
229
+ throw this.untrustworthy(MarketErrorCode.ChainMismatch, `it targets chain ${prepared.listing.chainId} while this wallet buys on chain ${chainId}`, request);
230
+ }
231
+ if (!sameAddress(prepared.listing.protocolAddress, SEAPORT_ADDRESS)) {
232
+ throw this.untrustworthy(MarketErrorCode.ProtocolAddressMismatch, `it names protocol contract ${prepared.listing.protocolAddress} instead of the pinned ${SEAPORT_ADDRESS}`, request);
233
+ }
234
+ this.requirePinnedOrder(request, prepared);
235
+ this.requireAffordableOrder(request, prepared);
236
+ if (sameAddress(prepared.listing.maker, wallet)) {
237
+ throw this.untrustworthy(MarketErrorCode.WrongOwner, `it is your own listing — this wallet ${wallet} is both the seller and the buyer`, request);
238
+ }
239
+ await this.requireFulfilmentShape(request, prepared);
240
+ }
241
+ requirePinnedOrder(request, prepared) {
242
+ const listing = prepared.listing;
243
+ if (!sameOrderHash(listing.orderHash, request.expectedOrderHash)) {
244
+ throw this.unavailable(request, `the marketplace answered with order ${listing.orderHash} instead of the order you pinned`);
245
+ }
246
+ if (listing.tokenId !== request.tokenId) {
247
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `order ${listing.orderHash} sells Cell ${listing.tokenId} rather than the Cell ${request.tokenId} ` +
248
+ 'you named', request);
249
+ }
250
+ const now = this.nowSeconds();
251
+ if (listing.expirationTime <= now) {
252
+ throw this.unavailable(request, `it expired at ${listing.expirationTime} and is no longer fillable`);
253
+ }
254
+ if (listing.startTime > now + PURCHASE_START_TIME_SKEW_SECONDS) {
255
+ throw this.unavailable(request, `it does not become fillable until ${listing.startTime}`);
256
+ }
257
+ }
258
+ requireAffordableOrder(request, prepared) {
259
+ const listing = prepared.listing;
260
+ if (exceedsCeiling(listing.price, request.maxAmount)) {
261
+ throw this.unavailable(request, `it now costs ${listing.price} ${listing.currency.symbol} base units, above the maxAmount ` +
262
+ `${request.maxAmount} you set — nothing was sent`);
263
+ }
264
+ const native = preparedNativeTotal(prepared);
265
+ if (exceedsCeiling(native, request.maxAmount)) {
266
+ throw this.unavailable(request, `its transactions would send ${native} native base units, above the maxAmount ` +
267
+ `${request.maxAmount} you set — nothing was sent`);
268
+ }
269
+ }
270
+ async requireFulfilmentShape(request, prepared) {
271
+ const chainId = this.wallet.get().getChainId();
272
+ const transactions = prepared.transactions;
273
+ const last = transactions.at(-1) ?? null;
274
+ if (last === null || last.kind !== MarketTransactionKind.Fulfillment) {
275
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'it does not end with the one fulfilment transaction that buys the Cell', request);
276
+ }
277
+ if (purchaseFulfilment(prepared) === null) {
278
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'it asks to send more than one fulfilment transaction for a single order', request);
279
+ }
280
+ if (last.data === PURCHASE_EMPTY_CALLDATA) {
281
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'its fulfilment transaction carries no calldata, so it would buy nothing', request);
282
+ }
283
+ if (!sameAddress(last.to, SEAPORT_ADDRESS)) {
284
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `its fulfilment transaction would send the wallet's money to ${last.to} rather than to the pinned ` +
285
+ `protocol contract ${SEAPORT_ADDRESS}`, request);
286
+ }
287
+ const foreignChain = transactions.find((transaction) => transaction.chainId !== chainId);
288
+ if (foreignChain !== undefined) {
289
+ throw this.untrustworthy(MarketErrorCode.ChainMismatch, `it asks to send a "${foreignChain.kind}" transaction on chain ${foreignChain.chainId} while this ` +
290
+ `wallet buys on chain ${chainId}`, request);
291
+ }
292
+ const foreignKind = transactions
293
+ .slice(0, -1)
294
+ .find((transaction) => transaction.kind !== MarketTransactionKind.CurrencyApproval);
295
+ if (foreignKind !== undefined) {
296
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `buying a listing may only need currency approvals before the fulfilment, but it asks to send a ` +
297
+ `"${foreignKind.kind}" transaction first`, request);
298
+ }
299
+ await this.requireCurrencyTransactions(request, prepared);
300
+ }
301
+ async requireCurrencyTransactions(request, prepared) {
302
+ const currency = prepared.listing.currency.address;
303
+ const approvals = purchaseApprovals(prepared);
304
+ if (isNativeCurrency(currency)) {
305
+ if (approvals.length > 0) {
306
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'it asks to approve a currency for an order that is paid in the chain native coin', request);
307
+ }
308
+ return;
309
+ }
310
+ const foreignApproval = approvals.find((approval) => !sameAddress(approval.to, currency));
311
+ if (foreignApproval !== undefined) {
312
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `it asks to approve contract ${foreignApproval.to} instead of the listing currency ${currency}`, request);
313
+ }
314
+ const valued = prepared.transactions.find((transaction) => transaction.value !== PURCHASE_NO_VALUE);
315
+ if (valued !== undefined) {
316
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `it asks to send ${valued.value} native base units for an order priced in ` +
317
+ `${prepared.listing.currency.symbol}`, request);
318
+ }
319
+ const calls = approvals.map((approval) => this.requireExactApprovalAmount(request, approval, prepared));
320
+ await this.requireRegisteredSpender(request, calls);
321
+ }
322
+ requireExactApprovalAmount(request, transaction, prepared) {
323
+ const approval = currencyApprovalCall(transaction.data);
324
+ const price = prepared.listing.price;
325
+ if (approval === null) {
326
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'it asks to send calldata the listing currency would not read as an approval of a single exact ' +
327
+ 'amount', request);
328
+ }
329
+ if (approval.amount !== BigInt(price)) {
330
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `it asks to approve ${approval.amount.toString()} of ${prepared.listing.currency.symbol} rather ` +
331
+ `than exactly the ${price} this listing costs`, request);
332
+ }
333
+ return approval;
334
+ }
335
+ async requireRegisteredSpender(request, approvals) {
336
+ for (const approval of approvals) {
337
+ const answer = await this.spenders.registeredSpender(approval.spender);
338
+ const detail = answer.detail ?? `${approval.spender} cannot be traced to the protocol`;
339
+ if (answer.outcome === SeaportSpenderOutcome.Unreachable) {
340
+ throw new MarketError({
341
+ code: MarketErrorCode.NetworkFailure,
342
+ message: `Order ${request.expectedOrderHash} was not fulfilled because ${detail}. Nothing was ` +
343
+ 'approved and nothing was paid.',
344
+ retryable: true,
345
+ retryAfterSeconds: null,
346
+ stage: MarketActionStage.Prepare,
347
+ txHash: null,
348
+ });
349
+ }
350
+ if (answer.outcome !== SeaportSpenderOutcome.Resolved) {
351
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, `it asks the wallet to let ${approval.spender} spend the listing currency, and ${detail}`, request);
352
+ }
353
+ }
354
+ }
355
+ async broadcastApproval(transaction, request) {
356
+ const hash = await this.send(transaction);
357
+ const receipt = await this.wallet.get().waitForReceipt(hash);
358
+ if (receipt.status !== TxStatus.Success) {
359
+ throw new MarketError({
360
+ code: MarketErrorCode.TransactionReverted,
361
+ message: `The currency approval this purchase needs reverted on-chain, so order ` +
362
+ `${request.expectedOrderHash} was never fulfilled and nothing was paid beyond gas.`,
363
+ retryable: false,
364
+ retryAfterSeconds: null,
365
+ stage: MarketActionStage.Approve,
366
+ txHash: hash,
367
+ });
368
+ }
369
+ return hash;
370
+ }
371
+ async send(transaction) {
372
+ return this.wallet.get().sendTransaction({
373
+ to: transaction.to,
374
+ data: transaction.data,
375
+ value: BigInt(transaction.value),
376
+ gas: null,
377
+ });
378
+ }
379
+ async requireCellCollection(stage) {
380
+ const config = await this.appConfig.load();
381
+ const collection = config.contracts.land;
382
+ if (!evmAddressSchema.safeParse(collection).success) {
383
+ throw new MarketError({
384
+ code: MarketErrorCode.InvalidMarketResponse,
385
+ message: 'The Cell collection contract is not configured for this network, so who owns the Cell after a ' +
386
+ 'purchase cannot be checked.',
387
+ retryable: false,
388
+ retryAfterSeconds: null,
389
+ stage,
390
+ txHash: null,
391
+ });
392
+ }
393
+ return collection;
394
+ }
395
+ requireFulfilmentTransaction(prepared, request) {
396
+ const fulfilment = purchaseFulfilment(prepared);
397
+ if (fulfilment !== null) {
398
+ return fulfilment;
399
+ }
400
+ throw this.untrustworthy(MarketErrorCode.InvalidMarketResponse, 'it carries no single fulfilment transaction to send', request);
401
+ }
402
+ requireWithinDeadline(prepared, stage) {
403
+ const deadline = effectivePurchaseDeadline(prepared);
404
+ narrowInvocationDeadline(deadline);
405
+ if (this.nowSeconds() < deadline) {
406
+ return;
407
+ }
408
+ throw new MarketError({
409
+ code: MarketErrorCode.PreparedIntentExpired,
410
+ message: 'This prepared purchase is past the earlier of its own deadline and the order expiry, so it can no ' +
411
+ 'longer be sent. Nothing was bought. Call the tool again for the same exact order.',
412
+ retryable: false,
413
+ retryAfterSeconds: null,
414
+ stage,
415
+ txHash: null,
416
+ });
417
+ }
418
+ requirePrepared(payload) {
419
+ if (payload.prepared === null) {
420
+ throw new MarketError({
421
+ code: MarketErrorCode.InvalidMarketResponse,
422
+ message: 'The purchase has no prepared order to fulfil.',
423
+ retryable: false,
424
+ retryAfterSeconds: null,
425
+ stage: MarketActionStage.Fulfil,
426
+ txHash: null,
427
+ });
428
+ }
429
+ return payload.prepared;
430
+ }
431
+ requireFulfilmentHash(payload) {
432
+ if (payload.fulfilmentTxHash === null) {
433
+ throw new MarketError({
434
+ code: MarketErrorCode.InvalidMarketResponse,
435
+ message: 'The purchase has no broadcast fulfilment transaction to verify.',
436
+ retryable: false,
437
+ retryAfterSeconds: null,
438
+ stage: MarketActionStage.Verify,
439
+ txHash: null,
440
+ });
441
+ }
442
+ return payload.fulfilmentTxHash;
443
+ }
444
+ requireUsableRequest(request) {
445
+ const tokenId = cellTokenIdSchema.safeParse(request.tokenId);
446
+ if (!tokenId.success) {
447
+ throw this.rejectedInput(`"${request.tokenId}" is not a canonical Cell token id. Pass a decimal integer with no leading ` +
448
+ 'zeroes so that one Cell keeps one identity.');
449
+ }
450
+ const expectedOrderHash = orderHashSchema.safeParse(request.expectedOrderHash);
451
+ if (!expectedOrderHash.success) {
452
+ throw this.rejectedInput(`"${request.expectedOrderHash}" is not a Market order hash. Pass the exact 32-byte 0x-prefixed ` +
453
+ '`orderHash` of the listing you decided to buy — this tool never picks a listing for you.');
454
+ }
455
+ const maxAmount = positiveBaseUnitAmountSchema.safeParse(request.maxAmount);
456
+ if (!maxAmount.success) {
457
+ throw this.rejectedInput(`"${request.maxAmount}" is not a spending ceiling. Pass the most you are willing to pay as a ` +
458
+ 'positive decimal integer of the currency base units, never a decimal fraction.');
459
+ }
460
+ return { tokenId: tokenId.data, expectedOrderHash: expectedOrderHash.data, maxAmount: maxAmount.data };
461
+ }
462
+ reserve(key, stage, payload) {
463
+ this.recovery.write(key, { tool: MarketActionTool.BuyCell, stage, payload });
464
+ }
465
+ emptyPayload() {
466
+ return { prepared: null, approvalTxHashes: [], fulfilmentTxHash: null };
467
+ }
468
+ result(status, request, payload, hash) {
469
+ const prepared = this.requirePrepared(payload);
470
+ this.logger.info('the Cell purchase is confirmed', {
471
+ tokenId: request.tokenId,
472
+ status,
473
+ orderHash: request.expectedOrderHash,
474
+ txHash: hash,
475
+ });
476
+ return {
477
+ status,
478
+ stage: MarketActionStage.Verify,
479
+ wallet: this.walletAddress(),
480
+ tokenId: request.tokenId,
481
+ orderHash: request.expectedOrderHash,
482
+ seller: prepared.listing.maker,
483
+ price: prepared.listing.price,
484
+ currency: prepared.listing.currency,
485
+ maxAmount: request.maxAmount,
486
+ approvalTxHashes: [...payload.approvalTxHashes],
487
+ fulfilmentTxHash: hash,
488
+ txHashes: [...payload.approvalTxHashes, hash],
489
+ };
490
+ }
491
+ lostBroadcast(request, payload, reason) {
492
+ this.logger.error('the fulfilment broadcast left an uncertain outcome', {
493
+ tokenId: request.tokenId,
494
+ orderHash: request.expectedOrderHash,
495
+ reason,
496
+ });
497
+ return new MarketError({
498
+ code: MarketErrorCode.NetworkFailure,
499
+ message: `The fulfilment of order ${request.expectedOrderHash} could not be confirmed as broadcast: ` +
500
+ `${reason}. No second fulfilment was sent in this call. ${this.knownHashes(payload, null)} ` +
501
+ 'Repeating this call targets that same exact order and can never buy another listing; at worst it ' +
502
+ 'spends gas on a transaction the protocol rejects.',
503
+ retryable: true,
504
+ retryAfterSeconds: null,
505
+ stage: MarketActionStage.Fulfil,
506
+ txHash: null,
507
+ });
508
+ }
509
+ knownHashes(payload, hash) {
510
+ const hashes = [...payload.approvalTxHashes, ...(hash === null ? [] : [hash])];
511
+ return hashes.length === 0
512
+ ? 'No transaction was broadcast.'
513
+ : `Transactions broadcast in order: ${hashes.join(', ')}.`;
514
+ }
515
+ unavailable(request, detail) {
516
+ this.logger.error('the pinned Market order cannot be bought', {
517
+ tokenId: request.tokenId,
518
+ orderHash: request.expectedOrderHash,
519
+ detail,
520
+ });
521
+ return new MarketError({
522
+ code: MarketErrorCode.OrderUnavailable,
523
+ message: `Order ${request.expectedOrderHash} cannot be bought: ${detail}. No replacement listing was ` +
524
+ 'selected and nothing was bought. Read the market again and pass another exact `expectedOrderHash` ' +
525
+ 'if you still want that Cell.',
526
+ retryable: false,
527
+ retryAfterSeconds: null,
528
+ stage: MarketActionStage.Prepare,
529
+ txHash: null,
530
+ });
531
+ }
532
+ untrustworthy(code, detail, request) {
533
+ this.logger.error('the prepared purchase does not match the request', {
534
+ tokenId: request.tokenId,
535
+ orderHash: request.expectedOrderHash,
536
+ detail,
537
+ });
538
+ return new MarketError({
539
+ code,
540
+ message: `The prepared purchase of order ${request.expectedOrderHash} cannot be sent: ${detail}.`,
541
+ retryable: false,
542
+ retryAfterSeconds: null,
543
+ stage: MarketActionStage.Prepare,
544
+ txHash: null,
545
+ });
546
+ }
547
+ rejectedInput(message) {
548
+ return new MarketError({
549
+ code: MarketErrorCode.InvalidInput,
550
+ message,
551
+ retryable: false,
552
+ retryAfterSeconds: null,
553
+ stage: MarketActionStage.Prepare,
554
+ txHash: null,
555
+ });
556
+ }
557
+ walletAddress() {
558
+ return this.wallet.get().getAddress();
559
+ }
560
+ nowSeconds() {
561
+ return Math.floor(Date.now() / MS_PER_SECOND);
562
+ }
563
+ }
564
+ //# sourceMappingURL=purchase.service.js.map