@bosonprotocol/core-sdk 1.29.0-ludo.1 → 1.29.0

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 (406) hide show
  1. package/LICENSE +202 -0
  2. package/dist/cjs/accounts/handler.d.ts +63 -63
  3. package/dist/cjs/accounts/handler.js +129 -129
  4. package/dist/cjs/accounts/index.d.ts +8 -8
  5. package/dist/cjs/accounts/index.js +37 -37
  6. package/dist/cjs/accounts/interface.d.ts +38 -38
  7. package/dist/cjs/accounts/interface.js +130 -130
  8. package/dist/cjs/accounts/mixin.d.ts +222 -222
  9. package/dist/cjs/accounts/mixin.js +506 -506
  10. package/dist/cjs/accounts/subgraph.d.ts +17 -17
  11. package/dist/cjs/accounts/subgraph.d.ts.map +1 -1
  12. package/dist/cjs/accounts/subgraph.js +107 -107
  13. package/dist/cjs/accounts/types.d.ts +28 -28
  14. package/dist/cjs/accounts/types.d.ts.map +1 -1
  15. package/dist/cjs/accounts/types.js +8 -8
  16. package/dist/cjs/core-sdk.d.ts +55 -55
  17. package/dist/cjs/core-sdk.js +98 -98
  18. package/dist/cjs/disputes/handler.d.ts +71 -71
  19. package/dist/cjs/disputes/handler.js +127 -127
  20. package/dist/cjs/disputes/index.d.ts +3 -3
  21. package/dist/cjs/disputes/index.js +29 -29
  22. package/dist/cjs/disputes/interface.d.ts +28 -28
  23. package/dist/cjs/disputes/interface.js +72 -72
  24. package/dist/cjs/disputes/mixin.d.ts +117 -117
  25. package/dist/cjs/disputes/mixin.js +202 -202
  26. package/dist/cjs/disputes/subgraph.d.ts +5 -5
  27. package/dist/cjs/disputes/subgraph.d.ts.map +1 -1
  28. package/dist/cjs/disputes/subgraph.js +29 -29
  29. package/dist/cjs/erc1155/handler.d.ts +8 -8
  30. package/dist/cjs/erc1155/handler.js +27 -27
  31. package/dist/cjs/erc1155/index.d.ts +2 -2
  32. package/dist/cjs/erc1155/index.js +28 -28
  33. package/dist/cjs/erc1155/interface.d.ts +2 -2
  34. package/dist/cjs/erc1155/interface.js +6 -6
  35. package/dist/cjs/erc1155/mixin.d.ts +5 -5
  36. package/dist/cjs/erc1155/mixin.js +25 -25
  37. package/dist/cjs/erc20/handler.d.ts +38 -38
  38. package/dist/cjs/erc20/handler.js +88 -88
  39. package/dist/cjs/erc20/index.d.ts +3 -3
  40. package/dist/cjs/erc20/index.js +29 -29
  41. package/dist/cjs/erc20/interface.d.ts +2 -2
  42. package/dist/cjs/erc20/interface.js +6 -6
  43. package/dist/cjs/erc20/mixin.d.ts +11 -11
  44. package/dist/cjs/erc20/mixin.js +55 -55
  45. package/dist/cjs/erc20/subgraph.d.ts +4 -4
  46. package/dist/cjs/erc20/subgraph.d.ts.map +1 -1
  47. package/dist/cjs/erc20/subgraph.js +29 -29
  48. package/dist/cjs/erc721/handler.d.ts +18 -18
  49. package/dist/cjs/erc721/handler.js +50 -50
  50. package/dist/cjs/erc721/index.d.ts +2 -2
  51. package/dist/cjs/erc721/index.js +28 -28
  52. package/dist/cjs/erc721/interface.d.ts +2 -2
  53. package/dist/cjs/erc721/interface.js +6 -6
  54. package/dist/cjs/erc721/mixin.d.ts +7 -7
  55. package/dist/cjs/erc721/mixin.js +35 -35
  56. package/dist/cjs/event-logs/index.d.ts +1 -1
  57. package/dist/cjs/event-logs/index.js +27 -27
  58. package/dist/cjs/event-logs/mixin.d.ts +10 -10
  59. package/dist/cjs/event-logs/mixin.js +27 -27
  60. package/dist/cjs/event-logs/subgraph.d.ts +2 -2
  61. package/dist/cjs/event-logs/subgraph.js +21 -21
  62. package/dist/cjs/exchanges/getExchangeState.d.ts +8 -8
  63. package/dist/cjs/exchanges/getExchangeState.d.ts.map +1 -1
  64. package/dist/cjs/exchanges/getExchangeState.js +21 -21
  65. package/dist/cjs/exchanges/getExchangeState.js.map +1 -1
  66. package/dist/cjs/exchanges/handler.d.ts +30 -30
  67. package/dist/cjs/exchanges/handler.d.ts.map +1 -1
  68. package/dist/cjs/exchanges/handler.js +201 -201
  69. package/dist/cjs/exchanges/index.d.ts +4 -4
  70. package/dist/cjs/exchanges/index.js +33 -33
  71. package/dist/cjs/exchanges/interface.d.ts +10 -10
  72. package/dist/cjs/exchanges/interface.js +49 -49
  73. package/dist/cjs/exchanges/mixin.d.ts +76 -76
  74. package/dist/cjs/exchanges/mixin.js +171 -171
  75. package/dist/cjs/exchanges/subgraph.d.ts +5 -5
  76. package/dist/cjs/exchanges/subgraph.d.ts.map +1 -1
  77. package/dist/cjs/exchanges/subgraph.js +29 -29
  78. package/dist/cjs/forwarder/biconomy-interface.d.ts +71 -71
  79. package/dist/cjs/forwarder/biconomy-interface.d.ts.map +1 -1
  80. package/dist/cjs/forwarder/biconomy-interface.js +30 -30
  81. package/dist/cjs/forwarder/handler.d.ts +18 -18
  82. package/dist/cjs/forwarder/handler.js +76 -76
  83. package/dist/cjs/forwarder/index.d.ts +3 -3
  84. package/dist/cjs/forwarder/index.js +29 -29
  85. package/dist/cjs/forwarder/mock-interface.d.ts +40 -40
  86. package/dist/cjs/forwarder/mock-interface.d.ts.map +1 -1
  87. package/dist/cjs/forwarder/mock-interface.js +15 -15
  88. package/dist/cjs/funds/handler.d.ts +22 -22
  89. package/dist/cjs/funds/handler.js +64 -64
  90. package/dist/cjs/funds/index.d.ts +3 -3
  91. package/dist/cjs/funds/index.js +29 -29
  92. package/dist/cjs/funds/interface.d.ts +5 -5
  93. package/dist/cjs/funds/interface.js +22 -22
  94. package/dist/cjs/funds/mixin.d.ts +41 -41
  95. package/dist/cjs/funds/mixin.js +94 -94
  96. package/dist/cjs/funds/subgraph.d.ts +5 -5
  97. package/dist/cjs/funds/subgraph.d.ts.map +1 -1
  98. package/dist/cjs/funds/subgraph.js +29 -29
  99. package/dist/cjs/groups/handler.d.ts +6 -6
  100. package/dist/cjs/groups/handler.js +22 -22
  101. package/dist/cjs/groups/index.d.ts +3 -3
  102. package/dist/cjs/groups/index.js +29 -29
  103. package/dist/cjs/groups/interface.d.ts +5 -5
  104. package/dist/cjs/groups/interface.js +28 -28
  105. package/dist/cjs/groups/mixin.d.ts +13 -13
  106. package/dist/cjs/groups/mixin.js +32 -32
  107. package/dist/cjs/groups/subgraph.d.ts +1 -1
  108. package/dist/cjs/groups/subgraph.js +4 -4
  109. package/dist/cjs/index.d.ts +17 -17
  110. package/dist/cjs/index.js +51 -51
  111. package/dist/cjs/meta-tx/biconomy.d.ts +59 -59
  112. package/dist/cjs/meta-tx/biconomy.d.ts.map +1 -1
  113. package/dist/cjs/meta-tx/biconomy.js +107 -107
  114. package/dist/cjs/meta-tx/handler.d.ts +230 -230
  115. package/dist/cjs/meta-tx/handler.d.ts.map +1 -1
  116. package/dist/cjs/meta-tx/handler.js +665 -665
  117. package/dist/cjs/meta-tx/index.d.ts +2 -2
  118. package/dist/cjs/meta-tx/index.js +28 -28
  119. package/dist/cjs/meta-tx/interface.d.ts +2 -2
  120. package/dist/cjs/meta-tx/interface.js +6 -6
  121. package/dist/cjs/meta-tx/mixin.d.ts +219 -219
  122. package/dist/cjs/meta-tx/mixin.js +474 -474
  123. package/dist/cjs/metadata/index.d.ts +1 -1
  124. package/dist/cjs/metadata/index.js +27 -27
  125. package/dist/cjs/metadata/mixin.d.ts +41 -41
  126. package/dist/cjs/metadata/mixin.js +88 -88
  127. package/dist/cjs/metadata/subgraph.d.ts +20 -20
  128. package/dist/cjs/metadata/subgraph.d.ts.map +1 -1
  129. package/dist/cjs/metadata/subgraph.js +108 -108
  130. package/dist/cjs/mixins/base-core-sdk.d.ts +44 -44
  131. package/dist/cjs/mixins/base-core-sdk.js +52 -52
  132. package/dist/cjs/native-meta-tx/handler.d.ts +42 -42
  133. package/dist/cjs/native-meta-tx/handler.js +135 -135
  134. package/dist/cjs/native-meta-tx/index.d.ts +2 -2
  135. package/dist/cjs/native-meta-tx/index.js +28 -28
  136. package/dist/cjs/native-meta-tx/interface.d.ts +3 -3
  137. package/dist/cjs/native-meta-tx/interface.js +29 -29
  138. package/dist/cjs/native-meta-tx/mixin.d.ts +34 -34
  139. package/dist/cjs/native-meta-tx/mixin.js +67 -67
  140. package/dist/cjs/native-meta-tx/tokenSpecifics.d.ts +6 -6
  141. package/dist/cjs/native-meta-tx/tokenSpecifics.d.ts.map +1 -1
  142. package/dist/cjs/native-meta-tx/tokenSpecifics.js +20 -20
  143. package/dist/cjs/offers/checkExchangePolicy.d.ts +48 -48
  144. package/dist/cjs/offers/checkExchangePolicy.d.ts.map +1 -1
  145. package/dist/cjs/offers/checkExchangePolicy.js +24 -24
  146. package/dist/cjs/offers/getOfferStatus.d.ts +8 -8
  147. package/dist/cjs/offers/getOfferStatus.js +25 -25
  148. package/dist/cjs/offers/getOfferStatus.js.map +1 -1
  149. package/dist/cjs/offers/handler.d.ts +51 -51
  150. package/dist/cjs/offers/handler.js +151 -151
  151. package/dist/cjs/offers/index.d.ts +12 -12
  152. package/dist/cjs/offers/index.js +41 -41
  153. package/dist/cjs/offers/interface.d.ts +18 -18
  154. package/dist/cjs/offers/interface.js +91 -91
  155. package/dist/cjs/offers/mixin.d.ts +170 -170
  156. package/dist/cjs/offers/mixin.js +408 -408
  157. package/dist/cjs/offers/renderContractualAgreement.d.ts +53 -53
  158. package/dist/cjs/offers/renderContractualAgreement.d.ts.map +1 -1
  159. package/dist/cjs/offers/renderContractualAgreement.js +232 -232
  160. package/dist/cjs/offers/storage.d.ts +12 -12
  161. package/dist/cjs/offers/storage.js +29 -29
  162. package/dist/cjs/offers/subgraph.d.ts +5 -5
  163. package/dist/cjs/offers/subgraph.d.ts.map +1 -1
  164. package/dist/cjs/offers/subgraph.js +29 -29
  165. package/dist/cjs/offers/types.d.ts +1 -1
  166. package/dist/cjs/offers/types.js +2 -2
  167. package/dist/cjs/orchestration/handler.d.ts +73 -73
  168. package/dist/cjs/orchestration/handler.js +146 -146
  169. package/dist/cjs/orchestration/index.d.ts +2 -2
  170. package/dist/cjs/orchestration/index.js +28 -28
  171. package/dist/cjs/orchestration/interface.d.ts +14 -14
  172. package/dist/cjs/orchestration/interface.js +114 -114
  173. package/dist/cjs/orchestration/mixin.d.ts +84 -84
  174. package/dist/cjs/orchestration/mixin.js +163 -163
  175. package/dist/cjs/seaport/abi.d.ts +40 -40
  176. package/dist/cjs/seaport/abi.js +152 -152
  177. package/dist/cjs/seaport/handler.d.ts +45 -45
  178. package/dist/cjs/seaport/handler.d.ts.map +1 -1
  179. package/dist/cjs/seaport/handler.js +27 -27
  180. package/dist/cjs/seaport/handler.js.map +1 -1
  181. package/dist/cjs/seaport/index.d.ts +1 -1
  182. package/dist/cjs/seaport/index.js +27 -27
  183. package/dist/cjs/subgraph.d.ts +33033 -33033
  184. package/dist/cjs/subgraph.d.ts.map +1 -1
  185. package/dist/cjs/subgraph.js +854 -854
  186. package/dist/cjs/subgraph.js.map +1 -1
  187. package/dist/cjs/utils/errors.d.ts +4 -4
  188. package/dist/cjs/utils/errors.js +10 -10
  189. package/dist/cjs/utils/graphql.d.ts +315 -315
  190. package/dist/cjs/utils/graphql.js +10 -10
  191. package/dist/cjs/utils/logs.d.ts +20 -20
  192. package/dist/cjs/utils/logs.js +53 -53
  193. package/dist/cjs/utils/signature.d.ts +23 -23
  194. package/dist/cjs/utils/signature.d.ts.map +1 -1
  195. package/dist/cjs/utils/signature.js +64 -64
  196. package/dist/cjs/utils/tokenInfoManager.d.ts +23 -23
  197. package/dist/cjs/utils/tokenInfoManager.js +139 -139
  198. package/dist/cjs/voucher/handler.d.ts +68 -68
  199. package/dist/cjs/voucher/handler.js +134 -134
  200. package/dist/cjs/voucher/index.d.ts +2 -2
  201. package/dist/cjs/voucher/index.js +28 -28
  202. package/dist/cjs/voucher/interface.d.ts +21 -21
  203. package/dist/cjs/voucher/interface.js +140 -140
  204. package/dist/cjs/voucher/mixin.d.ts +67 -67
  205. package/dist/cjs/voucher/mixin.js +166 -166
  206. package/dist/esm/accounts/handler.d.ts +63 -63
  207. package/dist/esm/accounts/handler.js +91 -91
  208. package/dist/esm/accounts/index.d.ts +8 -8
  209. package/dist/esm/accounts/index.js +8 -8
  210. package/dist/esm/accounts/interface.d.ts +38 -38
  211. package/dist/esm/accounts/interface.js +111 -111
  212. package/dist/esm/accounts/mixin.d.ts +222 -222
  213. package/dist/esm/accounts/mixin.js +416 -416
  214. package/dist/esm/accounts/subgraph.d.ts +17 -17
  215. package/dist/esm/accounts/subgraph.d.ts.map +1 -1
  216. package/dist/esm/accounts/subgraph.js +99 -99
  217. package/dist/esm/accounts/types.d.ts +28 -28
  218. package/dist/esm/accounts/types.d.ts.map +1 -1
  219. package/dist/esm/accounts/types.js +1 -1
  220. package/dist/esm/core-sdk.d.ts +55 -55
  221. package/dist/esm/core-sdk.js +97 -97
  222. package/dist/esm/disputes/handler.d.ts +71 -71
  223. package/dist/esm/disputes/handler.js +82 -82
  224. package/dist/esm/disputes/index.d.ts +3 -3
  225. package/dist/esm/disputes/index.js +3 -3
  226. package/dist/esm/disputes/interface.d.ts +28 -28
  227. package/dist/esm/disputes/interface.js +59 -59
  228. package/dist/esm/disputes/mixin.d.ts +117 -117
  229. package/dist/esm/disputes/mixin.js +172 -172
  230. package/dist/esm/disputes/subgraph.d.ts +5 -5
  231. package/dist/esm/disputes/subgraph.d.ts.map +1 -1
  232. package/dist/esm/disputes/subgraph.js +14 -14
  233. package/dist/esm/erc1155/handler.d.ts +8 -8
  234. package/dist/esm/erc1155/handler.js +12 -12
  235. package/dist/esm/erc1155/index.d.ts +2 -2
  236. package/dist/esm/erc1155/index.js +2 -2
  237. package/dist/esm/erc1155/interface.d.ts +2 -2
  238. package/dist/esm/erc1155/interface.js +3 -3
  239. package/dist/esm/erc1155/mixin.d.ts +5 -5
  240. package/dist/esm/erc1155/mixin.js +10 -10
  241. package/dist/esm/erc20/handler.d.ts +38 -38
  242. package/dist/esm/erc20/handler.js +55 -55
  243. package/dist/esm/erc20/index.d.ts +3 -3
  244. package/dist/esm/erc20/index.js +3 -3
  245. package/dist/esm/erc20/interface.d.ts +2 -2
  246. package/dist/esm/erc20/interface.js +3 -3
  247. package/dist/esm/erc20/mixin.d.ts +11 -11
  248. package/dist/esm/erc20/mixin.js +28 -28
  249. package/dist/esm/erc20/subgraph.d.ts +4 -4
  250. package/dist/esm/erc20/subgraph.d.ts.map +1 -1
  251. package/dist/esm/erc20/subgraph.js +14 -14
  252. package/dist/esm/erc721/handler.d.ts +18 -18
  253. package/dist/esm/erc721/handler.js +29 -29
  254. package/dist/esm/erc721/index.d.ts +2 -2
  255. package/dist/esm/erc721/index.js +2 -2
  256. package/dist/esm/erc721/interface.d.ts +2 -2
  257. package/dist/esm/erc721/interface.js +3 -3
  258. package/dist/esm/erc721/mixin.d.ts +7 -7
  259. package/dist/esm/erc721/mixin.js +16 -16
  260. package/dist/esm/event-logs/index.d.ts +1 -1
  261. package/dist/esm/event-logs/index.js +1 -1
  262. package/dist/esm/event-logs/mixin.d.ts +10 -10
  263. package/dist/esm/event-logs/mixin.js +12 -12
  264. package/dist/esm/event-logs/subgraph.d.ts +2 -2
  265. package/dist/esm/event-logs/subgraph.js +6 -6
  266. package/dist/esm/exchanges/getExchangeState.d.ts +8 -8
  267. package/dist/esm/exchanges/getExchangeState.d.ts.map +1 -1
  268. package/dist/esm/exchanges/getExchangeState.js +17 -17
  269. package/dist/esm/exchanges/handler.d.ts +30 -30
  270. package/dist/esm/exchanges/handler.d.ts.map +1 -1
  271. package/dist/esm/exchanges/handler.js +168 -168
  272. package/dist/esm/exchanges/index.d.ts +4 -4
  273. package/dist/esm/exchanges/index.js +4 -4
  274. package/dist/esm/exchanges/interface.d.ts +10 -10
  275. package/dist/esm/exchanges/interface.js +39 -39
  276. package/dist/esm/exchanges/mixin.d.ts +76 -76
  277. package/dist/esm/exchanges/mixin.js +140 -140
  278. package/dist/esm/exchanges/subgraph.d.ts +5 -5
  279. package/dist/esm/exchanges/subgraph.d.ts.map +1 -1
  280. package/dist/esm/exchanges/subgraph.js +14 -14
  281. package/dist/esm/forwarder/biconomy-interface.d.ts +71 -71
  282. package/dist/esm/forwarder/biconomy-interface.d.ts.map +1 -1
  283. package/dist/esm/forwarder/biconomy-interface.js +23 -23
  284. package/dist/esm/forwarder/handler.d.ts +18 -18
  285. package/dist/esm/forwarder/handler.js +35 -35
  286. package/dist/esm/forwarder/index.d.ts +3 -3
  287. package/dist/esm/forwarder/index.js +3 -3
  288. package/dist/esm/forwarder/mock-interface.d.ts +40 -40
  289. package/dist/esm/forwarder/mock-interface.d.ts.map +1 -1
  290. package/dist/esm/forwarder/mock-interface.js +10 -10
  291. package/dist/esm/funds/handler.d.ts +22 -22
  292. package/dist/esm/funds/handler.js +43 -43
  293. package/dist/esm/funds/index.d.ts +3 -3
  294. package/dist/esm/funds/index.js +3 -3
  295. package/dist/esm/funds/interface.d.ts +5 -5
  296. package/dist/esm/funds/interface.js +17 -17
  297. package/dist/esm/funds/mixin.d.ts +41 -41
  298. package/dist/esm/funds/mixin.js +71 -71
  299. package/dist/esm/funds/subgraph.d.ts +5 -5
  300. package/dist/esm/funds/subgraph.d.ts.map +1 -1
  301. package/dist/esm/funds/subgraph.js +14 -14
  302. package/dist/esm/groups/handler.d.ts +6 -6
  303. package/dist/esm/groups/handler.js +7 -7
  304. package/dist/esm/groups/index.d.ts +3 -3
  305. package/dist/esm/groups/index.js +3 -3
  306. package/dist/esm/groups/interface.d.ts +5 -5
  307. package/dist/esm/groups/interface.js +23 -23
  308. package/dist/esm/groups/mixin.d.ts +13 -13
  309. package/dist/esm/groups/mixin.js +17 -17
  310. package/dist/esm/groups/subgraph.d.ts +1 -1
  311. package/dist/esm/groups/subgraph.js +1 -1
  312. package/dist/esm/index.d.ts +17 -17
  313. package/dist/esm/index.js +17 -17
  314. package/dist/esm/meta-tx/biconomy.d.ts +59 -59
  315. package/dist/esm/meta-tx/biconomy.d.ts.map +1 -1
  316. package/dist/esm/meta-tx/biconomy.js +89 -89
  317. package/dist/esm/meta-tx/handler.d.ts +230 -230
  318. package/dist/esm/meta-tx/handler.d.ts.map +1 -1
  319. package/dist/esm/meta-tx/handler.js +733 -733
  320. package/dist/esm/meta-tx/index.d.ts +2 -2
  321. package/dist/esm/meta-tx/index.js +2 -2
  322. package/dist/esm/meta-tx/interface.d.ts +2 -2
  323. package/dist/esm/meta-tx/interface.js +3 -3
  324. package/dist/esm/meta-tx/mixin.d.ts +219 -219
  325. package/dist/esm/meta-tx/mixin.js +568 -568
  326. package/dist/esm/metadata/index.d.ts +1 -1
  327. package/dist/esm/metadata/index.js +1 -1
  328. package/dist/esm/metadata/mixin.d.ts +41 -41
  329. package/dist/esm/metadata/mixin.js +59 -59
  330. package/dist/esm/metadata/subgraph.d.ts +20 -20
  331. package/dist/esm/metadata/subgraph.d.ts.map +1 -1
  332. package/dist/esm/metadata/subgraph.js +86 -86
  333. package/dist/esm/mixins/base-core-sdk.d.ts +44 -44
  334. package/dist/esm/mixins/base-core-sdk.js +57 -57
  335. package/dist/esm/native-meta-tx/handler.d.ts +42 -42
  336. package/dist/esm/native-meta-tx/handler.js +121 -121
  337. package/dist/esm/native-meta-tx/index.d.ts +2 -2
  338. package/dist/esm/native-meta-tx/index.js +2 -2
  339. package/dist/esm/native-meta-tx/interface.d.ts +3 -3
  340. package/dist/esm/native-meta-tx/interface.js +26 -26
  341. package/dist/esm/native-meta-tx/mixin.d.ts +34 -34
  342. package/dist/esm/native-meta-tx/mixin.js +50 -50
  343. package/dist/esm/native-meta-tx/tokenSpecifics.d.ts +6 -6
  344. package/dist/esm/native-meta-tx/tokenSpecifics.d.ts.map +1 -1
  345. package/dist/esm/native-meta-tx/tokenSpecifics.js +15 -15
  346. package/dist/esm/offers/checkExchangePolicy.d.ts +48 -48
  347. package/dist/esm/offers/checkExchangePolicy.d.ts.map +1 -1
  348. package/dist/esm/offers/checkExchangePolicy.js +19 -19
  349. package/dist/esm/offers/getOfferStatus.d.ts +8 -8
  350. package/dist/esm/offers/getOfferStatus.js +21 -21
  351. package/dist/esm/offers/handler.d.ts +51 -51
  352. package/dist/esm/offers/handler.js +118 -118
  353. package/dist/esm/offers/index.d.ts +12 -12
  354. package/dist/esm/offers/index.js +12 -12
  355. package/dist/esm/offers/interface.d.ts +18 -18
  356. package/dist/esm/offers/interface.js +75 -75
  357. package/dist/esm/offers/mixin.d.ts +170 -170
  358. package/dist/esm/offers/mixin.js +338 -338
  359. package/dist/esm/offers/renderContractualAgreement.d.ts +53 -53
  360. package/dist/esm/offers/renderContractualAgreement.d.ts.map +1 -1
  361. package/dist/esm/offers/renderContractualAgreement.js +208 -208
  362. package/dist/esm/offers/storage.d.ts +12 -12
  363. package/dist/esm/offers/storage.js +14 -14
  364. package/dist/esm/offers/subgraph.d.ts +5 -5
  365. package/dist/esm/offers/subgraph.d.ts.map +1 -1
  366. package/dist/esm/offers/subgraph.js +16 -16
  367. package/dist/esm/offers/types.d.ts +1 -1
  368. package/dist/esm/offers/types.js +1 -1
  369. package/dist/esm/orchestration/handler.d.ts +73 -73
  370. package/dist/esm/orchestration/handler.js +110 -110
  371. package/dist/esm/orchestration/index.d.ts +2 -2
  372. package/dist/esm/orchestration/index.js +2 -2
  373. package/dist/esm/orchestration/interface.d.ts +14 -14
  374. package/dist/esm/orchestration/interface.js +103 -103
  375. package/dist/esm/orchestration/mixin.d.ts +84 -84
  376. package/dist/esm/orchestration/mixin.js +136 -136
  377. package/dist/esm/seaport/abi.d.ts +40 -40
  378. package/dist/esm/seaport/abi.js +149 -149
  379. package/dist/esm/seaport/handler.d.ts +45 -45
  380. package/dist/esm/seaport/handler.d.ts.map +1 -1
  381. package/dist/esm/seaport/handler.js +23 -23
  382. package/dist/esm/seaport/index.d.ts +1 -1
  383. package/dist/esm/seaport/index.js +1 -1
  384. package/dist/esm/subgraph.d.ts +33033 -33033
  385. package/dist/esm/subgraph.d.ts.map +1 -1
  386. package/dist/esm/subgraph.js +854 -854
  387. package/dist/esm/utils/errors.d.ts +4 -4
  388. package/dist/esm/utils/errors.js +7 -7
  389. package/dist/esm/utils/graphql.d.ts +315 -315
  390. package/dist/esm/utils/graphql.js +6 -6
  391. package/dist/esm/utils/logs.d.ts +20 -20
  392. package/dist/esm/utils/logs.js +47 -47
  393. package/dist/esm/utils/signature.d.ts +23 -23
  394. package/dist/esm/utils/signature.d.ts.map +1 -1
  395. package/dist/esm/utils/signature.js +57 -57
  396. package/dist/esm/utils/tokenInfoManager.d.ts +23 -23
  397. package/dist/esm/utils/tokenInfoManager.js +125 -125
  398. package/dist/esm/voucher/handler.d.ts +68 -68
  399. package/dist/esm/voucher/handler.js +86 -86
  400. package/dist/esm/voucher/index.d.ts +2 -2
  401. package/dist/esm/voucher/index.js +2 -2
  402. package/dist/esm/voucher/interface.d.ts +21 -21
  403. package/dist/esm/voucher/interface.js +119 -119
  404. package/dist/esm/voucher/mixin.d.ts +67 -67
  405. package/dist/esm/voucher/mixin.js +135 -135
  406. package/package.json +10 -6
@@ -1,16 +1,16 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.decodeGetNonce = exports.encodeGetNonce = exports.abi = void 0;
4
- const common_1 = require("@bosonprotocol/common");
5
- const abi_1 = require("@ethersproject/abi");
6
- exports.abi = common_1.abis.MockForwarderABI;
7
- const forwarderInterface = new abi_1.Interface(exports.abi);
8
- function encodeGetNonce(signerAddress) {
9
- return forwarderInterface.encodeFunctionData("getNonce", [signerAddress]);
10
- }
11
- exports.encodeGetNonce = encodeGetNonce;
12
- function decodeGetNonce(result) {
13
- return forwarderInterface.decodeFunctionResult("getNonce", result);
14
- }
15
- exports.decodeGetNonce = decodeGetNonce;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.decodeGetNonce = exports.encodeGetNonce = exports.abi = void 0;
4
+ const common_1 = require("@bosonprotocol/common");
5
+ const abi_1 = require("@ethersproject/abi");
6
+ exports.abi = common_1.abis.MockForwarderABI;
7
+ const forwarderInterface = new abi_1.Interface(exports.abi);
8
+ function encodeGetNonce(signerAddress) {
9
+ return forwarderInterface.encodeFunctionData("getNonce", [signerAddress]);
10
+ }
11
+ exports.encodeGetNonce = encodeGetNonce;
12
+ function decodeGetNonce(result) {
13
+ return forwarderInterface.decodeFunctionResult("getNonce", result);
14
+ }
15
+ exports.decodeGetNonce = decodeGetNonce;
16
16
  //# sourceMappingURL=mock-interface.js.map
@@ -1,23 +1,23 @@
1
- import { BigNumberish } from "@ethersproject/bignumber";
2
- import { Web3LibAdapter, TransactionResponse } from "@bosonprotocol/common";
3
- export declare function depositFunds(args: {
4
- sellerId: BigNumberish;
5
- fundsTokenAddress?: string;
6
- fundsAmount: BigNumberish;
7
- contractAddress: string;
8
- web3Lib: Web3LibAdapter;
9
- }): Promise<TransactionResponse>;
10
- export declare function withdrawFunds(args: {
11
- sellerId: BigNumberish;
12
- tokensToWithdraw: Array<string>;
13
- amountsToWithdraw: Array<BigNumberish>;
14
- contractAddress: string;
15
- web3Lib: Web3LibAdapter;
16
- }): Promise<TransactionResponse>;
17
- export declare function withdrawAllAvailableFunds(args: {
18
- sellerId: BigNumberish;
19
- subgraphUrl: string;
20
- contractAddress: string;
21
- web3Lib: Web3LibAdapter;
22
- }): Promise<TransactionResponse>;
1
+ import { BigNumberish } from "@ethersproject/bignumber";
2
+ import { Web3LibAdapter, TransactionResponse } from "@bosonprotocol/common";
3
+ export declare function depositFunds(args: {
4
+ sellerId: BigNumberish;
5
+ fundsTokenAddress?: string;
6
+ fundsAmount: BigNumberish;
7
+ contractAddress: string;
8
+ web3Lib: Web3LibAdapter;
9
+ }): Promise<TransactionResponse>;
10
+ export declare function withdrawFunds(args: {
11
+ sellerId: BigNumberish;
12
+ tokensToWithdraw: Array<string>;
13
+ amountsToWithdraw: Array<BigNumberish>;
14
+ contractAddress: string;
15
+ web3Lib: Web3LibAdapter;
16
+ }): Promise<TransactionResponse>;
17
+ export declare function withdrawAllAvailableFunds(args: {
18
+ sellerId: BigNumberish;
19
+ subgraphUrl: string;
20
+ contractAddress: string;
21
+ web3Lib: Web3LibAdapter;
22
+ }): Promise<TransactionResponse>;
23
23
  //# sourceMappingURL=handler.d.ts.map
@@ -1,65 +1,65 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.withdrawAllAvailableFunds = exports.withdrawFunds = exports.depositFunds = void 0;
13
- const address_1 = require("@ethersproject/address");
14
- const constants_1 = require("@ethersproject/constants");
15
- const interface_1 = require("./interface");
16
- const subgraph_1 = require("./subgraph");
17
- function depositFunds(args) {
18
- return __awaiter(this, void 0, void 0, function* () {
19
- const { fundsTokenAddress = constants_1.AddressZero } = args;
20
- if (!(0, address_1.isAddress)(fundsTokenAddress)) {
21
- throw new Error(`Invalid fundsTokenAddress: ${fundsTokenAddress}`);
22
- }
23
- const isNativeCoin = fundsTokenAddress === constants_1.AddressZero;
24
- return args.web3Lib.sendTransaction({
25
- to: args.contractAddress,
26
- data: (0, interface_1.encodeDepositFunds)(args.sellerId, args.fundsTokenAddress, args.fundsAmount),
27
- value: isNativeCoin ? args.fundsAmount : "0"
28
- });
29
- });
30
- }
31
- exports.depositFunds = depositFunds;
32
- function withdrawFunds(args) {
33
- return __awaiter(this, void 0, void 0, function* () {
34
- return args.web3Lib.sendTransaction({
35
- to: args.contractAddress,
36
- data: (0, interface_1.encodeWithdrawFunds)(args.sellerId, args.tokensToWithdraw, args.amountsToWithdraw)
37
- });
38
- });
39
- }
40
- exports.withdrawFunds = withdrawFunds;
41
- function withdrawAllAvailableFunds(args) {
42
- return __awaiter(this, void 0, void 0, function* () {
43
- const funds = yield (0, subgraph_1.getFunds)(args.subgraphUrl, {
44
- fundsFilter: {
45
- accountId: args.sellerId.toString()
46
- }
47
- });
48
- const { tokensToWithdraw, amountsToWithdraw } = funds
49
- .filter((fund) => Number(fund.availableAmount))
50
- .reduce((acc, fund) => {
51
- acc.tokensToWithdraw.push(fund.token.address);
52
- acc.amountsToWithdraw.push(fund.availableAmount);
53
- return acc;
54
- }, {
55
- tokensToWithdraw: [],
56
- amountsToWithdraw: []
57
- });
58
- return args.web3Lib.sendTransaction({
59
- to: args.contractAddress,
60
- data: (0, interface_1.encodeWithdrawFunds)(args.sellerId, tokensToWithdraw, amountsToWithdraw)
61
- });
62
- });
63
- }
64
- exports.withdrawAllAvailableFunds = withdrawAllAvailableFunds;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.withdrawAllAvailableFunds = exports.withdrawFunds = exports.depositFunds = void 0;
13
+ const address_1 = require("@ethersproject/address");
14
+ const constants_1 = require("@ethersproject/constants");
15
+ const interface_1 = require("./interface");
16
+ const subgraph_1 = require("./subgraph");
17
+ function depositFunds(args) {
18
+ return __awaiter(this, void 0, void 0, function* () {
19
+ const { fundsTokenAddress = constants_1.AddressZero } = args;
20
+ if (!(0, address_1.isAddress)(fundsTokenAddress)) {
21
+ throw new Error(`Invalid fundsTokenAddress: ${fundsTokenAddress}`);
22
+ }
23
+ const isNativeCoin = fundsTokenAddress === constants_1.AddressZero;
24
+ return args.web3Lib.sendTransaction({
25
+ to: args.contractAddress,
26
+ data: (0, interface_1.encodeDepositFunds)(args.sellerId, args.fundsTokenAddress, args.fundsAmount),
27
+ value: isNativeCoin ? args.fundsAmount : "0"
28
+ });
29
+ });
30
+ }
31
+ exports.depositFunds = depositFunds;
32
+ function withdrawFunds(args) {
33
+ return __awaiter(this, void 0, void 0, function* () {
34
+ return args.web3Lib.sendTransaction({
35
+ to: args.contractAddress,
36
+ data: (0, interface_1.encodeWithdrawFunds)(args.sellerId, args.tokensToWithdraw, args.amountsToWithdraw)
37
+ });
38
+ });
39
+ }
40
+ exports.withdrawFunds = withdrawFunds;
41
+ function withdrawAllAvailableFunds(args) {
42
+ return __awaiter(this, void 0, void 0, function* () {
43
+ const funds = yield (0, subgraph_1.getFunds)(args.subgraphUrl, {
44
+ fundsFilter: {
45
+ accountId: args.sellerId.toString()
46
+ }
47
+ });
48
+ const { tokensToWithdraw, amountsToWithdraw } = funds
49
+ .filter((fund) => Number(fund.availableAmount))
50
+ .reduce((acc, fund) => {
51
+ acc.tokensToWithdraw.push(fund.token.address);
52
+ acc.amountsToWithdraw.push(fund.availableAmount);
53
+ return acc;
54
+ }, {
55
+ tokensToWithdraw: [],
56
+ amountsToWithdraw: []
57
+ });
58
+ return args.web3Lib.sendTransaction({
59
+ to: args.contractAddress,
60
+ data: (0, interface_1.encodeWithdrawFunds)(args.sellerId, tokensToWithdraw, amountsToWithdraw)
61
+ });
62
+ });
63
+ }
64
+ exports.withdrawAllAvailableFunds = withdrawAllAvailableFunds;
65
65
  //# sourceMappingURL=handler.js.map
@@ -1,4 +1,4 @@
1
- export * as iface from "./interface";
2
- export * as subgraph from "./subgraph";
3
- export * as handler from "./handler";
1
+ export * as iface from "./interface";
2
+ export * as subgraph from "./subgraph";
3
+ export * as handler from "./handler";
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1,30 +1,30 @@
1
- "use strict";
2
- var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
- if (k2 === undefined) k2 = k;
4
- var desc = Object.getOwnPropertyDescriptor(m, k);
5
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
- desc = { enumerable: true, get: function() { return m[k]; } };
7
- }
8
- Object.defineProperty(o, k2, desc);
9
- }) : (function(o, m, k, k2) {
10
- if (k2 === undefined) k2 = k;
11
- o[k2] = m[k];
12
- }));
13
- var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
- Object.defineProperty(o, "default", { enumerable: true, value: v });
15
- }) : function(o, v) {
16
- o["default"] = v;
17
- });
18
- var __importStar = (this && this.__importStar) || function (mod) {
19
- if (mod && mod.__esModule) return mod;
20
- var result = {};
21
- if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
- __setModuleDefault(result, mod);
23
- return result;
24
- };
25
- Object.defineProperty(exports, "__esModule", { value: true });
26
- exports.handler = exports.subgraph = exports.iface = void 0;
27
- exports.iface = __importStar(require("./interface"));
28
- exports.subgraph = __importStar(require("./subgraph"));
29
- exports.handler = __importStar(require("./handler"));
1
+ "use strict";
2
+ var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
3
+ if (k2 === undefined) k2 = k;
4
+ var desc = Object.getOwnPropertyDescriptor(m, k);
5
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
6
+ desc = { enumerable: true, get: function() { return m[k]; } };
7
+ }
8
+ Object.defineProperty(o, k2, desc);
9
+ }) : (function(o, m, k, k2) {
10
+ if (k2 === undefined) k2 = k;
11
+ o[k2] = m[k];
12
+ }));
13
+ var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) {
14
+ Object.defineProperty(o, "default", { enumerable: true, value: v });
15
+ }) : function(o, v) {
16
+ o["default"] = v;
17
+ });
18
+ var __importStar = (this && this.__importStar) || function (mod) {
19
+ if (mod && mod.__esModule) return mod;
20
+ var result = {};
21
+ if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k);
22
+ __setModuleDefault(result, mod);
23
+ return result;
24
+ };
25
+ Object.defineProperty(exports, "__esModule", { value: true });
26
+ exports.handler = exports.subgraph = exports.iface = void 0;
27
+ exports.iface = __importStar(require("./interface"));
28
+ exports.subgraph = __importStar(require("./subgraph"));
29
+ exports.handler = __importStar(require("./handler"));
30
30
  //# sourceMappingURL=index.js.map
@@ -1,6 +1,6 @@
1
- import { Interface } from "@ethersproject/abi";
2
- import { BigNumberish } from "@ethersproject/bignumber";
3
- export declare const bosonFundsHandlerIface: Interface;
4
- export declare function encodeDepositFunds(sellerId: BigNumberish, tokenAddress: string, amount: BigNumberish): string;
5
- export declare function encodeWithdrawFunds(sellerId: BigNumberish, tokensToWithdraw: Array<string>, amountsToWithdraw: Array<BigNumberish>): string;
1
+ import { Interface } from "@ethersproject/abi";
2
+ import { BigNumberish } from "@ethersproject/bignumber";
3
+ export declare const bosonFundsHandlerIface: Interface;
4
+ export declare function encodeDepositFunds(sellerId: BigNumberish, tokenAddress: string, amount: BigNumberish): string;
5
+ export declare function encodeWithdrawFunds(sellerId: BigNumberish, tokensToWithdraw: Array<string>, amountsToWithdraw: Array<BigNumberish>): string;
6
6
  //# sourceMappingURL=interface.d.ts.map
@@ -1,23 +1,23 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.encodeWithdrawFunds = exports.encodeDepositFunds = exports.bosonFundsHandlerIface = void 0;
4
- const common_1 = require("@bosonprotocol/common");
5
- const abi_1 = require("@ethersproject/abi");
6
- exports.bosonFundsHandlerIface = new abi_1.Interface(common_1.abis.IBosonFundsHandlerABI);
7
- function encodeDepositFunds(sellerId, tokenAddress, amount) {
8
- return exports.bosonFundsHandlerIface.encodeFunctionData("depositFunds", [
9
- sellerId,
10
- tokenAddress,
11
- amount
12
- ]);
13
- }
14
- exports.encodeDepositFunds = encodeDepositFunds;
15
- function encodeWithdrawFunds(sellerId, tokensToWithdraw, amountsToWithdraw) {
16
- return exports.bosonFundsHandlerIface.encodeFunctionData("withdrawFunds", [
17
- sellerId,
18
- tokensToWithdraw,
19
- amountsToWithdraw
20
- ]);
21
- }
22
- exports.encodeWithdrawFunds = encodeWithdrawFunds;
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.encodeWithdrawFunds = exports.encodeDepositFunds = exports.bosonFundsHandlerIface = void 0;
4
+ const common_1 = require("@bosonprotocol/common");
5
+ const abi_1 = require("@ethersproject/abi");
6
+ exports.bosonFundsHandlerIface = new abi_1.Interface(common_1.abis.IBosonFundsHandlerABI);
7
+ function encodeDepositFunds(sellerId, tokenAddress, amount) {
8
+ return exports.bosonFundsHandlerIface.encodeFunctionData("depositFunds", [
9
+ sellerId,
10
+ tokenAddress,
11
+ amount
12
+ ]);
13
+ }
14
+ exports.encodeDepositFunds = encodeDepositFunds;
15
+ function encodeWithdrawFunds(sellerId, tokensToWithdraw, amountsToWithdraw) {
16
+ return exports.bosonFundsHandlerIface.encodeFunctionData("withdrawFunds", [
17
+ sellerId,
18
+ tokensToWithdraw,
19
+ amountsToWithdraw
20
+ ]);
21
+ }
22
+ exports.encodeWithdrawFunds = encodeWithdrawFunds;
23
23
  //# sourceMappingURL=interface.js.map
@@ -1,42 +1,42 @@
1
- import { BaseCoreSDK } from "./../mixins/base-core-sdk";
2
- import * as subgraph from "../subgraph";
3
- import { TransactionResponse } from "@bosonprotocol/common";
4
- import { BigNumberish } from "@ethersproject/bignumber";
5
- export declare class FundsMixin extends BaseCoreSDK {
6
- /**
7
- * Deposit funds by calling the `FundsHandlerFacet` contract.
8
- * @param sellerId - ID of seller account to deposit funds for.
9
- * @param fundsAmount - Amount of funds.
10
- * @param fundsTokenAddress - Address of funds token.
11
- * @returns Transaction response.
12
- */
13
- depositFunds(sellerId: BigNumberish, fundsAmount: BigNumberish, fundsTokenAddress?: string): Promise<TransactionResponse>;
14
- /**
15
- * Returns funds entity from subgraph.
16
- * @param fundsId - ID of funds entity.
17
- * @param queryVars - Optional query variables to skip, order or filter.
18
- * @returns Funds entity from subgraph.
19
- */
20
- getFundsById(fundsId: BigNumberish, queryVars?: subgraph.GetFundsByIdQueryVariables): Promise<subgraph.FundsEntityFieldsFragment>;
21
- /**
22
- * Returns funds entities from subgraph.
23
- * @param queryVars - Optional query variables to skip, order or filter.
24
- * @returns Funds entities from subgraph.
25
- */
26
- getFunds(queryVars?: subgraph.GetFundsQueryVariables): Promise<subgraph.FundsEntityFieldsFragment[]>;
27
- /**
28
- * Withdraw selected funds by calling the `FundsHandlerFacet` contract.
29
- * @param sellerId - ID of seller account to withdraw funds for.
30
- * @param tokensToWithdraw - Addresses of funds tokens to withdraw.
31
- * @param amountsToWithdraw - Amounts of funds token to withdraw.
32
- * @returns Transaction response.
33
- */
34
- withdrawFunds(sellerId: BigNumberish, tokensToWithdraw: Array<string>, amountsToWithdraw: Array<BigNumberish>): Promise<TransactionResponse>;
35
- /**
36
- * Withdraw all available funds by calling the `FundsHandlerFacet` contract.
37
- * @param sellerId - ID of seller account to withdraw funds for.
38
- * @returns Transaction response.
39
- */
40
- withdrawAllAvailableFunds(sellerId: BigNumberish): Promise<TransactionResponse>;
41
- }
1
+ import { BaseCoreSDK } from "./../mixins/base-core-sdk";
2
+ import * as subgraph from "../subgraph";
3
+ import { TransactionResponse } from "@bosonprotocol/common";
4
+ import { BigNumberish } from "@ethersproject/bignumber";
5
+ export declare class FundsMixin extends BaseCoreSDK {
6
+ /**
7
+ * Deposit funds by calling the `FundsHandlerFacet` contract.
8
+ * @param sellerId - ID of seller account to deposit funds for.
9
+ * @param fundsAmount - Amount of funds.
10
+ * @param fundsTokenAddress - Address of funds token.
11
+ * @returns Transaction response.
12
+ */
13
+ depositFunds(sellerId: BigNumberish, fundsAmount: BigNumberish, fundsTokenAddress?: string): Promise<TransactionResponse>;
14
+ /**
15
+ * Returns funds entity from subgraph.
16
+ * @param fundsId - ID of funds entity.
17
+ * @param queryVars - Optional query variables to skip, order or filter.
18
+ * @returns Funds entity from subgraph.
19
+ */
20
+ getFundsById(fundsId: BigNumberish, queryVars?: subgraph.GetFundsByIdQueryVariables): Promise<subgraph.FundsEntityFieldsFragment>;
21
+ /**
22
+ * Returns funds entities from subgraph.
23
+ * @param queryVars - Optional query variables to skip, order or filter.
24
+ * @returns Funds entities from subgraph.
25
+ */
26
+ getFunds(queryVars?: subgraph.GetFundsQueryVariables): Promise<subgraph.FundsEntityFieldsFragment[]>;
27
+ /**
28
+ * Withdraw selected funds by calling the `FundsHandlerFacet` contract.
29
+ * @param sellerId - ID of seller account to withdraw funds for.
30
+ * @param tokensToWithdraw - Addresses of funds tokens to withdraw.
31
+ * @param amountsToWithdraw - Amounts of funds token to withdraw.
32
+ * @returns Transaction response.
33
+ */
34
+ withdrawFunds(sellerId: BigNumberish, tokensToWithdraw: Array<string>, amountsToWithdraw: Array<BigNumberish>): Promise<TransactionResponse>;
35
+ /**
36
+ * Withdraw all available funds by calling the `FundsHandlerFacet` contract.
37
+ * @param sellerId - ID of seller account to withdraw funds for.
38
+ * @returns Transaction response.
39
+ */
40
+ withdrawAllAvailableFunds(sellerId: BigNumberish): Promise<TransactionResponse>;
41
+ }
42
42
  //# sourceMappingURL=mixin.d.ts.map
@@ -1,95 +1,95 @@
1
- "use strict";
2
- var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
- function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
- return new (P || (P = Promise))(function (resolve, reject) {
5
- function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
- function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
- function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
- step((generator = generator.apply(thisArg, _arguments || [])).next());
9
- });
10
- };
11
- Object.defineProperty(exports, "__esModule", { value: true });
12
- exports.FundsMixin = void 0;
13
- const base_core_sdk_1 = require("./../mixins/base-core-sdk");
14
- const constants_1 = require("@ethersproject/constants");
15
- const handler_1 = require("./handler");
16
- const subgraph_1 = require("./subgraph");
17
- class FundsMixin extends base_core_sdk_1.BaseCoreSDK {
18
- /* -------------------------------------------------------------------------- */
19
- /* Funds related methods */
20
- /* -------------------------------------------------------------------------- */
21
- /**
22
- * Deposit funds by calling the `FundsHandlerFacet` contract.
23
- * @param sellerId - ID of seller account to deposit funds for.
24
- * @param fundsAmount - Amount of funds.
25
- * @param fundsTokenAddress - Address of funds token.
26
- * @returns Transaction response.
27
- */
28
- depositFunds(sellerId, fundsAmount, fundsTokenAddress = constants_1.AddressZero) {
29
- return __awaiter(this, void 0, void 0, function* () {
30
- return (0, handler_1.depositFunds)({
31
- sellerId,
32
- fundsAmount,
33
- fundsTokenAddress,
34
- contractAddress: this._protocolDiamond,
35
- web3Lib: this._web3Lib
36
- });
37
- });
38
- }
39
- /**
40
- * Returns funds entity from subgraph.
41
- * @param fundsId - ID of funds entity.
42
- * @param queryVars - Optional query variables to skip, order or filter.
43
- * @returns Funds entity from subgraph.
44
- */
45
- getFundsById(fundsId, queryVars) {
46
- return __awaiter(this, void 0, void 0, function* () {
47
- return (0, subgraph_1.getFundsById)(this._subgraphUrl, fundsId, queryVars);
48
- });
49
- }
50
- /**
51
- * Returns funds entities from subgraph.
52
- * @param queryVars - Optional query variables to skip, order or filter.
53
- * @returns Funds entities from subgraph.
54
- */
55
- getFunds(queryVars) {
56
- return __awaiter(this, void 0, void 0, function* () {
57
- return (0, subgraph_1.getFunds)(this._subgraphUrl, queryVars);
58
- });
59
- }
60
- /**
61
- * Withdraw selected funds by calling the `FundsHandlerFacet` contract.
62
- * @param sellerId - ID of seller account to withdraw funds for.
63
- * @param tokensToWithdraw - Addresses of funds tokens to withdraw.
64
- * @param amountsToWithdraw - Amounts of funds token to withdraw.
65
- * @returns Transaction response.
66
- */
67
- withdrawFunds(sellerId, tokensToWithdraw, amountsToWithdraw) {
68
- return __awaiter(this, void 0, void 0, function* () {
69
- return (0, handler_1.withdrawFunds)({
70
- sellerId,
71
- tokensToWithdraw,
72
- amountsToWithdraw,
73
- contractAddress: this._protocolDiamond,
74
- web3Lib: this._web3Lib
75
- });
76
- });
77
- }
78
- /**
79
- * Withdraw all available funds by calling the `FundsHandlerFacet` contract.
80
- * @param sellerId - ID of seller account to withdraw funds for.
81
- * @returns Transaction response.
82
- */
83
- withdrawAllAvailableFunds(sellerId) {
84
- return __awaiter(this, void 0, void 0, function* () {
85
- return (0, handler_1.withdrawAllAvailableFunds)({
86
- sellerId,
87
- subgraphUrl: this._subgraphUrl,
88
- contractAddress: this._protocolDiamond,
89
- web3Lib: this._web3Lib
90
- });
91
- });
92
- }
93
- }
94
- exports.FundsMixin = FundsMixin;
1
+ "use strict";
2
+ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
3
+ function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
4
+ return new (P || (P = Promise))(function (resolve, reject) {
5
+ function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
6
+ function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
7
+ function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
8
+ step((generator = generator.apply(thisArg, _arguments || [])).next());
9
+ });
10
+ };
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.FundsMixin = void 0;
13
+ const base_core_sdk_1 = require("./../mixins/base-core-sdk");
14
+ const constants_1 = require("@ethersproject/constants");
15
+ const handler_1 = require("./handler");
16
+ const subgraph_1 = require("./subgraph");
17
+ class FundsMixin extends base_core_sdk_1.BaseCoreSDK {
18
+ /* -------------------------------------------------------------------------- */
19
+ /* Funds related methods */
20
+ /* -------------------------------------------------------------------------- */
21
+ /**
22
+ * Deposit funds by calling the `FundsHandlerFacet` contract.
23
+ * @param sellerId - ID of seller account to deposit funds for.
24
+ * @param fundsAmount - Amount of funds.
25
+ * @param fundsTokenAddress - Address of funds token.
26
+ * @returns Transaction response.
27
+ */
28
+ depositFunds(sellerId, fundsAmount, fundsTokenAddress = constants_1.AddressZero) {
29
+ return __awaiter(this, void 0, void 0, function* () {
30
+ return (0, handler_1.depositFunds)({
31
+ sellerId,
32
+ fundsAmount,
33
+ fundsTokenAddress,
34
+ contractAddress: this._protocolDiamond,
35
+ web3Lib: this._web3Lib
36
+ });
37
+ });
38
+ }
39
+ /**
40
+ * Returns funds entity from subgraph.
41
+ * @param fundsId - ID of funds entity.
42
+ * @param queryVars - Optional query variables to skip, order or filter.
43
+ * @returns Funds entity from subgraph.
44
+ */
45
+ getFundsById(fundsId, queryVars) {
46
+ return __awaiter(this, void 0, void 0, function* () {
47
+ return (0, subgraph_1.getFundsById)(this._subgraphUrl, fundsId, queryVars);
48
+ });
49
+ }
50
+ /**
51
+ * Returns funds entities from subgraph.
52
+ * @param queryVars - Optional query variables to skip, order or filter.
53
+ * @returns Funds entities from subgraph.
54
+ */
55
+ getFunds(queryVars) {
56
+ return __awaiter(this, void 0, void 0, function* () {
57
+ return (0, subgraph_1.getFunds)(this._subgraphUrl, queryVars);
58
+ });
59
+ }
60
+ /**
61
+ * Withdraw selected funds by calling the `FundsHandlerFacet` contract.
62
+ * @param sellerId - ID of seller account to withdraw funds for.
63
+ * @param tokensToWithdraw - Addresses of funds tokens to withdraw.
64
+ * @param amountsToWithdraw - Amounts of funds token to withdraw.
65
+ * @returns Transaction response.
66
+ */
67
+ withdrawFunds(sellerId, tokensToWithdraw, amountsToWithdraw) {
68
+ return __awaiter(this, void 0, void 0, function* () {
69
+ return (0, handler_1.withdrawFunds)({
70
+ sellerId,
71
+ tokensToWithdraw,
72
+ amountsToWithdraw,
73
+ contractAddress: this._protocolDiamond,
74
+ web3Lib: this._web3Lib
75
+ });
76
+ });
77
+ }
78
+ /**
79
+ * Withdraw all available funds by calling the `FundsHandlerFacet` contract.
80
+ * @param sellerId - ID of seller account to withdraw funds for.
81
+ * @returns Transaction response.
82
+ */
83
+ withdrawAllAvailableFunds(sellerId) {
84
+ return __awaiter(this, void 0, void 0, function* () {
85
+ return (0, handler_1.withdrawAllAvailableFunds)({
86
+ sellerId,
87
+ subgraphUrl: this._subgraphUrl,
88
+ contractAddress: this._protocolDiamond,
89
+ web3Lib: this._web3Lib
90
+ });
91
+ });
92
+ }
93
+ }
94
+ exports.FundsMixin = FundsMixin;
95
95
  //# sourceMappingURL=mixin.js.map
@@ -1,6 +1,6 @@
1
- import { FundsEntityFieldsFragment, GetFundsByIdQueryVariables, GetFundsQueryVariables } from "../subgraph";
2
- import { BigNumberish } from "@ethersproject/bignumber";
3
- export declare type SingleFundsQueryVariables = Omit<GetFundsByIdQueryVariables, "fundsId">;
4
- export declare function getFunds(subgraphUrl: string, queryVars?: GetFundsQueryVariables): Promise<FundsEntityFieldsFragment[]>;
5
- export declare function getFundsById(subgraphUrl: string, fundsId: BigNumberish, queryVars?: SingleFundsQueryVariables): Promise<FundsEntityFieldsFragment>;
1
+ import { FundsEntityFieldsFragment, GetFundsByIdQueryVariables, GetFundsQueryVariables } from "../subgraph";
2
+ import { BigNumberish } from "@ethersproject/bignumber";
3
+ export type SingleFundsQueryVariables = Omit<GetFundsByIdQueryVariables, "fundsId">;
4
+ export declare function getFunds(subgraphUrl: string, queryVars?: GetFundsQueryVariables): Promise<FundsEntityFieldsFragment[]>;
5
+ export declare function getFundsById(subgraphUrl: string, fundsId: BigNumberish, queryVars?: SingleFundsQueryVariables): Promise<FundsEntityFieldsFragment>;
6
6
  //# sourceMappingURL=subgraph.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"subgraph.d.ts","sourceRoot":"","sources":["../../../src/funds/subgraph.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,oBAAY,yBAAyB,GAAG,IAAI,CAC1C,0BAA0B,EAC1B,SAAS,CACV,CAAC;AAEF,wBAAsB,QAAQ,CAC5B,WAAW,EAAE,MAAM,EACnB,SAAS,GAAE,sBAA2B,GACrC,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAItC;AAED,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,YAAY,EACrB,SAAS,GAAE,yBAA8B,GACxC,OAAO,CAAC,yBAAyB,CAAC,CAQpC"}
1
+ {"version":3,"file":"subgraph.d.ts","sourceRoot":"","sources":["../../../src/funds/subgraph.ts"],"names":[],"mappings":"AACA,OAAO,EACL,yBAAyB,EACzB,0BAA0B,EAC1B,sBAAsB,EACvB,MAAM,aAAa,CAAC;AACrB,OAAO,EAAE,YAAY,EAAE,MAAM,0BAA0B,CAAC;AAExD,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAC1C,0BAA0B,EAC1B,SAAS,CACV,CAAC;AAEF,wBAAsB,QAAQ,CAC5B,WAAW,EAAE,MAAM,EACnB,SAAS,GAAE,sBAA2B,GACrC,OAAO,CAAC,yBAAyB,EAAE,CAAC,CAItC;AAED,wBAAsB,YAAY,CAChC,WAAW,EAAE,MAAM,EACnB,OAAO,EAAE,YAAY,EACrB,SAAS,GAAE,yBAA8B,GACxC,OAAO,CAAC,yBAAyB,CAAC,CAQpC"}