@superfluid-finance/sdk-core 0.3.3-dev.c77270b.0 → 0.3.3-dev.c9bc19b.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 (382) hide show
  1. package/CHANGELOG.md +25 -1
  2. package/README.md +2 -0
  3. package/dist/index.umd.js +5988 -2000
  4. package/dist/main/BatchCall.d.ts +6 -6
  5. package/dist/main/BatchCall.js +8 -8
  6. package/dist/main/BatchCall.js.map +1 -1
  7. package/dist/main/ConstantFlowAgreementV1.d.ts +106 -17
  8. package/dist/main/ConstantFlowAgreementV1.d.ts.map +1 -1
  9. package/dist/main/ConstantFlowAgreementV1.js +238 -50
  10. package/dist/main/ConstantFlowAgreementV1.js.map +1 -1
  11. package/dist/main/{Token.d.ts → ERC20Token.d.ts} +17 -14
  12. package/dist/main/ERC20Token.d.ts.map +1 -0
  13. package/dist/main/{Token.js → ERC20Token.js} +29 -33
  14. package/dist/main/ERC20Token.js.map +1 -0
  15. package/dist/main/Framework.d.ts +16 -7
  16. package/dist/main/Framework.d.ts.map +1 -1
  17. package/dist/main/Framework.js +36 -15
  18. package/dist/main/Framework.js.map +1 -1
  19. package/dist/main/Governance.d.ts +40 -0
  20. package/dist/main/Governance.d.ts.map +1 -0
  21. package/dist/main/Governance.js +82 -0
  22. package/dist/main/Governance.js.map +1 -0
  23. package/dist/main/Host.d.ts +3 -3
  24. package/dist/main/Host.d.ts.map +1 -1
  25. package/dist/main/Host.js +4 -4
  26. package/dist/main/Host.js.map +1 -1
  27. package/dist/main/InstantDistributionAgreementV1.d.ts +25 -22
  28. package/dist/main/InstantDistributionAgreementV1.d.ts.map +1 -1
  29. package/dist/main/InstantDistributionAgreementV1.js +69 -71
  30. package/dist/main/InstantDistributionAgreementV1.js.map +1 -1
  31. package/dist/main/Operation.d.ts +5 -5
  32. package/dist/main/Operation.js +5 -5
  33. package/dist/main/Query.d.ts +6 -6
  34. package/dist/main/Query.d.ts.map +1 -1
  35. package/dist/main/Query.js +18 -16
  36. package/dist/main/Query.js.map +1 -1
  37. package/dist/main/SFError.d.ts +1 -1
  38. package/dist/main/SFError.d.ts.map +1 -1
  39. package/dist/main/SFError.js +2 -0
  40. package/dist/main/SFError.js.map +1 -1
  41. package/dist/main/SuperToken.d.ts +229 -68
  42. package/dist/main/SuperToken.d.ts.map +1 -1
  43. package/dist/main/SuperToken.js +318 -132
  44. package/dist/main/SuperToken.js.map +1 -1
  45. package/dist/main/abi/IConstantFlowAgreementV1.json +335 -2
  46. package/dist/main/abi/ISETH.json +1604 -0
  47. package/dist/main/abi/SuperfluidGovernanceII.json +939 -0
  48. package/dist/main/constants.d.ts +4 -0
  49. package/dist/main/constants.d.ts.map +1 -1
  50. package/dist/main/constants.js +36 -13
  51. package/dist/main/constants.js.map +1 -1
  52. package/dist/main/defaultSubgraphReleaseTag.json +3 -0
  53. package/dist/main/events.d.ts +14 -2
  54. package/dist/main/events.d.ts.map +1 -1
  55. package/dist/main/frameworkHelpers.d.ts +2 -2
  56. package/dist/main/frameworkHelpers.js +2 -2
  57. package/dist/main/index.d.ts +16 -5
  58. package/dist/main/index.d.ts.map +1 -1
  59. package/dist/main/index.js +12 -1
  60. package/dist/main/index.js.map +1 -1
  61. package/dist/main/interfaces.d.ts +81 -8
  62. package/dist/main/interfaces.d.ts.map +1 -1
  63. package/dist/main/mapGetAllEventsQueryEvents.d.ts.map +1 -1
  64. package/dist/main/mapGetAllEventsQueryEvents.js +22 -1
  65. package/dist/main/mapGetAllEventsQueryEvents.js.map +1 -1
  66. package/dist/main/pagination.d.ts +42 -4
  67. package/dist/main/pagination.d.ts.map +1 -1
  68. package/dist/main/pagination.js +36 -5
  69. package/dist/main/pagination.js.map +1 -1
  70. package/dist/main/subgraph/SubgraphClient.d.ts +2 -2
  71. package/dist/main/subgraph/SubgraphClient.d.ts.map +1 -1
  72. package/dist/main/subgraph/SubgraphClient.js +0 -12
  73. package/dist/main/subgraph/SubgraphClient.js.map +1 -1
  74. package/dist/main/subgraph/entities/account/account.d.ts +1 -0
  75. package/dist/main/subgraph/entities/account/account.d.ts.map +1 -1
  76. package/dist/main/subgraph/entities/account/accounts.generated.d.ts +2 -0
  77. package/dist/main/subgraph/entities/account/accounts.generated.d.ts.map +1 -1
  78. package/dist/main/subgraph/entities/account/accounts.generated.js +1 -1
  79. package/dist/main/subgraph/entities/account/accounts.generated.js.map +1 -1
  80. package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts +2 -0
  81. package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts.map +1 -1
  82. package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js +1 -0
  83. package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js.map +1 -1
  84. package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts +3 -0
  85. package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts.map +1 -1
  86. package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js +1 -1
  87. package/dist/main/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js.map +1 -1
  88. package/dist/main/subgraph/entities/index/index.d.ts +2 -0
  89. package/dist/main/subgraph/entities/index/index.d.ts.map +1 -1
  90. package/dist/main/subgraph/entities/index/index.js +1 -0
  91. package/dist/main/subgraph/entities/index/index.js.map +1 -1
  92. package/dist/main/subgraph/entities/index/indexes.generated.d.ts +3 -0
  93. package/dist/main/subgraph/entities/index/indexes.generated.d.ts.map +1 -1
  94. package/dist/main/subgraph/entities/index/indexes.generated.js +1 -1
  95. package/dist/main/subgraph/entities/index/indexes.generated.js.map +1 -1
  96. package/dist/main/subgraph/entities/indexSubscription/indexSubscription.d.ts +2 -0
  97. package/dist/main/subgraph/entities/indexSubscription/indexSubscription.d.ts.map +1 -1
  98. package/dist/main/subgraph/entities/indexSubscription/indexSubscription.js +1 -0
  99. package/dist/main/subgraph/entities/indexSubscription/indexSubscription.js.map +1 -1
  100. package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts +3 -0
  101. package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts.map +1 -1
  102. package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.js +1 -1
  103. package/dist/main/subgraph/entities/indexSubscription/indexSubscriptions.generated.js.map +1 -1
  104. package/dist/main/subgraph/entities/stream/stream.d.ts +2 -0
  105. package/dist/main/subgraph/entities/stream/stream.d.ts.map +1 -1
  106. package/dist/main/subgraph/entities/stream/stream.js +1 -0
  107. package/dist/main/subgraph/entities/stream/stream.js.map +1 -1
  108. package/dist/main/subgraph/entities/stream/streams.generated.d.ts +3 -0
  109. package/dist/main/subgraph/entities/stream/streams.generated.d.ts.map +1 -1
  110. package/dist/main/subgraph/entities/stream/streams.generated.js +1 -1
  111. package/dist/main/subgraph/entities/stream/streams.generated.js.map +1 -1
  112. package/dist/main/subgraph/entities/streamPeriod/streamPeriod.d.ts +2 -0
  113. package/dist/main/subgraph/entities/streamPeriod/streamPeriod.d.ts.map +1 -1
  114. package/dist/main/subgraph/entities/streamPeriod/streamPeriod.js +1 -0
  115. package/dist/main/subgraph/entities/streamPeriod/streamPeriod.js.map +1 -1
  116. package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts +3 -0
  117. package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts.map +1 -1
  118. package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.js +1 -1
  119. package/dist/main/subgraph/entities/streamPeriod/streamPeriods.generated.js.map +1 -1
  120. package/dist/main/subgraph/entities/token/token.d.ts +1 -0
  121. package/dist/main/subgraph/entities/token/token.d.ts.map +1 -1
  122. package/dist/main/subgraph/entities/token/tokens.generated.d.ts +2 -0
  123. package/dist/main/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
  124. package/dist/main/subgraph/entities/token/tokens.generated.js +1 -1
  125. package/dist/main/subgraph/entities/token/tokens.generated.js.map +1 -1
  126. package/dist/main/subgraph/entities/tokenStatistic/tokenStatistic.d.ts +1 -0
  127. package/dist/main/subgraph/entities/tokenStatistic/tokenStatistic.d.ts.map +1 -1
  128. package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts +2 -0
  129. package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts.map +1 -1
  130. package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.js +1 -1
  131. package/dist/main/subgraph/entities/tokenStatistic/tokenStatistics.generated.js.map +1 -1
  132. package/dist/main/subgraph/events/events.d.ts +1 -0
  133. package/dist/main/subgraph/events/events.d.ts.map +1 -1
  134. package/dist/main/subgraph/events/events.generated.d.ts +118 -3
  135. package/dist/main/subgraph/events/events.generated.d.ts.map +1 -1
  136. package/dist/main/subgraph/events/events.generated.js +38 -37
  137. package/dist/main/subgraph/events/events.generated.js.map +1 -1
  138. package/dist/main/subgraph/events/flowUpdatedEvent.d.ts +1 -0
  139. package/dist/main/subgraph/events/flowUpdatedEvent.d.ts.map +1 -1
  140. package/dist/main/subgraph/events/indexUpdatedEvent.d.ts +1 -0
  141. package/dist/main/subgraph/events/indexUpdatedEvent.d.ts.map +1 -1
  142. package/dist/main/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts +1 -0
  143. package/dist/main/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts.map +1 -1
  144. package/dist/main/subgraph/meta/meta.d.ts +15 -0
  145. package/dist/main/subgraph/meta/meta.d.ts.map +1 -0
  146. package/dist/main/subgraph/meta/meta.generated.d.ts +19 -0
  147. package/dist/main/subgraph/meta/meta.generated.d.ts.map +1 -0
  148. package/dist/main/subgraph/meta/meta.generated.js +5 -0
  149. package/dist/main/subgraph/meta/meta.generated.js.map +1 -0
  150. package/dist/main/subgraph/meta/meta.js +20 -0
  151. package/dist/main/subgraph/meta/meta.js.map +1 -0
  152. package/dist/main/subgraph/queries/getAllEvents.generated.d.ts +12 -0
  153. package/dist/main/subgraph/queries/getAllEvents.generated.d.ts.map +1 -1
  154. package/dist/main/subgraph/queries/getAllEvents.generated.js +1 -1
  155. package/dist/main/subgraph/queries/getAllEvents.generated.js.map +1 -1
  156. package/dist/main/subgraph/schema.generated.d.ts +817 -5
  157. package/dist/main/subgraph/schema.generated.d.ts.map +1 -1
  158. package/dist/main/subgraph/subgraphQueryHandler.d.ts +6 -3
  159. package/dist/main/subgraph/subgraphQueryHandler.d.ts.map +1 -1
  160. package/dist/main/subgraph/subgraphQueryHandler.js +30 -16
  161. package/dist/main/subgraph/subgraphQueryHandler.js.map +1 -1
  162. package/dist/main/typechain/IConstantFlowAgreementV1.d.ts +187 -5
  163. package/dist/main/typechain/IConstantFlowAgreementV1.d.ts.map +1 -1
  164. package/dist/main/typechain/ISETH.d.ts +1068 -0
  165. package/dist/main/typechain/ISETH.d.ts.map +1 -0
  166. package/dist/main/typechain/ISETH.js +3 -0
  167. package/dist/main/typechain/ISETH.js.map +1 -0
  168. package/dist/main/typechain/SuperfluidGovernanceII.d.ts +633 -0
  169. package/dist/main/typechain/SuperfluidGovernanceII.d.ts.map +1 -0
  170. package/dist/main/typechain/SuperfluidGovernanceII.js +3 -0
  171. package/dist/main/typechain/SuperfluidGovernanceII.js.map +1 -0
  172. package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.d.ts.map +1 -1
  173. package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.js +335 -2
  174. package/dist/main/typechain/factories/IConstantFlowAgreementV1__factory.js.map +1 -1
  175. package/dist/main/typechain/factories/ISETH__factory.d.ts +36 -0
  176. package/dist/main/typechain/factories/ISETH__factory.d.ts.map +1 -0
  177. package/dist/main/typechain/factories/ISETH__factory.js +1622 -0
  178. package/dist/main/typechain/factories/ISETH__factory.js.map +1 -0
  179. package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.d.ts +36 -0
  180. package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.d.ts.map +1 -0
  181. package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.js +957 -0
  182. package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.js.map +1 -0
  183. package/dist/main/typechain/index.d.ts +4 -0
  184. package/dist/main/typechain/index.d.ts.map +1 -1
  185. package/dist/main/typechain/index.js +5 -1
  186. package/dist/main/typechain/index.js.map +1 -1
  187. package/dist/main/utils.d.ts +15 -13
  188. package/dist/main/utils.d.ts.map +1 -1
  189. package/dist/main/utils.js +29 -15
  190. package/dist/main/utils.js.map +1 -1
  191. package/dist/module/BatchCall.d.ts +6 -6
  192. package/dist/module/BatchCall.js +8 -8
  193. package/dist/module/BatchCall.js.map +1 -1
  194. package/dist/module/ConstantFlowAgreementV1.d.ts +106 -17
  195. package/dist/module/ConstantFlowAgreementV1.d.ts.map +1 -1
  196. package/dist/module/ConstantFlowAgreementV1.js +239 -51
  197. package/dist/module/ConstantFlowAgreementV1.js.map +1 -1
  198. package/dist/module/{Token.d.ts → ERC20Token.d.ts} +17 -14
  199. package/dist/module/ERC20Token.d.ts.map +1 -0
  200. package/dist/module/{Token.js → ERC20Token.js} +28 -32
  201. package/dist/module/ERC20Token.js.map +1 -0
  202. package/dist/module/Framework.d.ts +16 -7
  203. package/dist/module/Framework.d.ts.map +1 -1
  204. package/dist/module/Framework.js +36 -15
  205. package/dist/module/Framework.js.map +1 -1
  206. package/dist/module/Governance.d.ts +40 -0
  207. package/dist/module/Governance.d.ts.map +1 -0
  208. package/dist/module/Governance.js +76 -0
  209. package/dist/module/Governance.js.map +1 -0
  210. package/dist/module/Host.d.ts +3 -3
  211. package/dist/module/Host.d.ts.map +1 -1
  212. package/dist/module/Host.js +4 -4
  213. package/dist/module/Host.js.map +1 -1
  214. package/dist/module/InstantDistributionAgreementV1.d.ts +25 -22
  215. package/dist/module/InstantDistributionAgreementV1.d.ts.map +1 -1
  216. package/dist/module/InstantDistributionAgreementV1.js +69 -71
  217. package/dist/module/InstantDistributionAgreementV1.js.map +1 -1
  218. package/dist/module/Operation.d.ts +5 -5
  219. package/dist/module/Operation.js +5 -5
  220. package/dist/module/Query.d.ts +6 -6
  221. package/dist/module/Query.d.ts.map +1 -1
  222. package/dist/module/Query.js +16 -16
  223. package/dist/module/Query.js.map +1 -1
  224. package/dist/module/SFError.d.ts +1 -1
  225. package/dist/module/SFError.d.ts.map +1 -1
  226. package/dist/module/SFError.js +2 -0
  227. package/dist/module/SFError.js.map +1 -1
  228. package/dist/module/SuperToken.d.ts +229 -68
  229. package/dist/module/SuperToken.d.ts.map +1 -1
  230. package/dist/module/SuperToken.js +315 -133
  231. package/dist/module/SuperToken.js.map +1 -1
  232. package/dist/module/abi/IConstantFlowAgreementV1.json +335 -2
  233. package/dist/module/abi/ISETH.json +1604 -0
  234. package/dist/module/abi/SuperfluidGovernanceII.json +939 -0
  235. package/dist/module/constants.d.ts +4 -0
  236. package/dist/module/constants.d.ts.map +1 -1
  237. package/dist/module/constants.js +32 -12
  238. package/dist/module/constants.js.map +1 -1
  239. package/dist/module/defaultSubgraphReleaseTag.json +3 -0
  240. package/dist/module/events.d.ts +14 -2
  241. package/dist/module/events.d.ts.map +1 -1
  242. package/dist/module/frameworkHelpers.d.ts +2 -2
  243. package/dist/module/frameworkHelpers.js +2 -2
  244. package/dist/module/index.d.ts +16 -5
  245. package/dist/module/index.d.ts.map +1 -1
  246. package/dist/module/index.js +16 -5
  247. package/dist/module/index.js.map +1 -1
  248. package/dist/module/interfaces.d.ts +81 -8
  249. package/dist/module/interfaces.d.ts.map +1 -1
  250. package/dist/module/mapGetAllEventsQueryEvents.d.ts.map +1 -1
  251. package/dist/module/mapGetAllEventsQueryEvents.js +22 -1
  252. package/dist/module/mapGetAllEventsQueryEvents.js.map +1 -1
  253. package/dist/module/pagination.d.ts +42 -4
  254. package/dist/module/pagination.d.ts.map +1 -1
  255. package/dist/module/pagination.js +30 -5
  256. package/dist/module/pagination.js.map +1 -1
  257. package/dist/module/subgraph/SubgraphClient.d.ts +2 -2
  258. package/dist/module/subgraph/SubgraphClient.d.ts.map +1 -1
  259. package/dist/module/subgraph/SubgraphClient.js +1 -13
  260. package/dist/module/subgraph/SubgraphClient.js.map +1 -1
  261. package/dist/module/subgraph/entities/account/account.d.ts +1 -0
  262. package/dist/module/subgraph/entities/account/account.d.ts.map +1 -1
  263. package/dist/module/subgraph/entities/account/accounts.generated.d.ts +2 -0
  264. package/dist/module/subgraph/entities/account/accounts.generated.d.ts.map +1 -1
  265. package/dist/module/subgraph/entities/account/accounts.generated.js +1 -1
  266. package/dist/module/subgraph/entities/account/accounts.generated.js.map +1 -1
  267. package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts +2 -0
  268. package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.d.ts.map +1 -1
  269. package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js +1 -0
  270. package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshot.js.map +1 -1
  271. package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts +3 -0
  272. package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.d.ts.map +1 -1
  273. package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js +1 -1
  274. package/dist/module/subgraph/entities/accountTokenSnapshot/accountTokenSnapshots.generated.js.map +1 -1
  275. package/dist/module/subgraph/entities/index/index.d.ts +2 -0
  276. package/dist/module/subgraph/entities/index/index.d.ts.map +1 -1
  277. package/dist/module/subgraph/entities/index/index.js +1 -0
  278. package/dist/module/subgraph/entities/index/index.js.map +1 -1
  279. package/dist/module/subgraph/entities/index/indexes.generated.d.ts +3 -0
  280. package/dist/module/subgraph/entities/index/indexes.generated.d.ts.map +1 -1
  281. package/dist/module/subgraph/entities/index/indexes.generated.js +1 -1
  282. package/dist/module/subgraph/entities/index/indexes.generated.js.map +1 -1
  283. package/dist/module/subgraph/entities/indexSubscription/indexSubscription.d.ts +2 -0
  284. package/dist/module/subgraph/entities/indexSubscription/indexSubscription.d.ts.map +1 -1
  285. package/dist/module/subgraph/entities/indexSubscription/indexSubscription.js +1 -0
  286. package/dist/module/subgraph/entities/indexSubscription/indexSubscription.js.map +1 -1
  287. package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts +3 -0
  288. package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.d.ts.map +1 -1
  289. package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.js +1 -1
  290. package/dist/module/subgraph/entities/indexSubscription/indexSubscriptions.generated.js.map +1 -1
  291. package/dist/module/subgraph/entities/stream/stream.d.ts +2 -0
  292. package/dist/module/subgraph/entities/stream/stream.d.ts.map +1 -1
  293. package/dist/module/subgraph/entities/stream/stream.js +1 -0
  294. package/dist/module/subgraph/entities/stream/stream.js.map +1 -1
  295. package/dist/module/subgraph/entities/stream/streams.generated.d.ts +3 -0
  296. package/dist/module/subgraph/entities/stream/streams.generated.d.ts.map +1 -1
  297. package/dist/module/subgraph/entities/stream/streams.generated.js +1 -1
  298. package/dist/module/subgraph/entities/stream/streams.generated.js.map +1 -1
  299. package/dist/module/subgraph/entities/streamPeriod/streamPeriod.d.ts +2 -0
  300. package/dist/module/subgraph/entities/streamPeriod/streamPeriod.d.ts.map +1 -1
  301. package/dist/module/subgraph/entities/streamPeriod/streamPeriod.js +1 -0
  302. package/dist/module/subgraph/entities/streamPeriod/streamPeriod.js.map +1 -1
  303. package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts +3 -0
  304. package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.d.ts.map +1 -1
  305. package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.js +1 -1
  306. package/dist/module/subgraph/entities/streamPeriod/streamPeriods.generated.js.map +1 -1
  307. package/dist/module/subgraph/entities/token/token.d.ts +1 -0
  308. package/dist/module/subgraph/entities/token/token.d.ts.map +1 -1
  309. package/dist/module/subgraph/entities/token/tokens.generated.d.ts +2 -0
  310. package/dist/module/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
  311. package/dist/module/subgraph/entities/token/tokens.generated.js +1 -1
  312. package/dist/module/subgraph/entities/token/tokens.generated.js.map +1 -1
  313. package/dist/module/subgraph/entities/tokenStatistic/tokenStatistic.d.ts +1 -0
  314. package/dist/module/subgraph/entities/tokenStatistic/tokenStatistic.d.ts.map +1 -1
  315. package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts +2 -0
  316. package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.d.ts.map +1 -1
  317. package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.js +1 -1
  318. package/dist/module/subgraph/entities/tokenStatistic/tokenStatistics.generated.js.map +1 -1
  319. package/dist/module/subgraph/events/events.d.ts +1 -0
  320. package/dist/module/subgraph/events/events.d.ts.map +1 -1
  321. package/dist/module/subgraph/events/events.generated.d.ts +118 -3
  322. package/dist/module/subgraph/events/events.generated.d.ts.map +1 -1
  323. package/dist/module/subgraph/events/events.generated.js +37 -36
  324. package/dist/module/subgraph/events/events.generated.js.map +1 -1
  325. package/dist/module/subgraph/events/flowUpdatedEvent.d.ts +1 -0
  326. package/dist/module/subgraph/events/flowUpdatedEvent.d.ts.map +1 -1
  327. package/dist/module/subgraph/events/indexUpdatedEvent.d.ts +1 -0
  328. package/dist/module/subgraph/events/indexUpdatedEvent.d.ts.map +1 -1
  329. package/dist/module/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts +1 -0
  330. package/dist/module/subgraph/events/subscriptionUnitsUpdatedEvents.d.ts.map +1 -1
  331. package/dist/module/subgraph/meta/meta.d.ts +15 -0
  332. package/dist/module/subgraph/meta/meta.d.ts.map +1 -0
  333. package/dist/module/subgraph/meta/meta.generated.d.ts +19 -0
  334. package/dist/module/subgraph/meta/meta.generated.d.ts.map +1 -0
  335. package/dist/module/subgraph/meta/meta.generated.js +2 -0
  336. package/dist/module/subgraph/meta/meta.generated.js.map +1 -0
  337. package/dist/module/subgraph/meta/meta.js +16 -0
  338. package/dist/module/subgraph/meta/meta.js.map +1 -0
  339. package/dist/module/subgraph/queries/getAllEvents.generated.d.ts +12 -0
  340. package/dist/module/subgraph/queries/getAllEvents.generated.d.ts.map +1 -1
  341. package/dist/module/subgraph/queries/getAllEvents.generated.js +1 -1
  342. package/dist/module/subgraph/queries/getAllEvents.generated.js.map +1 -1
  343. package/dist/module/subgraph/schema.generated.d.ts +817 -5
  344. package/dist/module/subgraph/schema.generated.d.ts.map +1 -1
  345. package/dist/module/subgraph/subgraphQueryHandler.d.ts +6 -3
  346. package/dist/module/subgraph/subgraphQueryHandler.d.ts.map +1 -1
  347. package/dist/module/subgraph/subgraphQueryHandler.js +31 -17
  348. package/dist/module/subgraph/subgraphQueryHandler.js.map +1 -1
  349. package/dist/module/typechain/IConstantFlowAgreementV1.d.ts +187 -5
  350. package/dist/module/typechain/IConstantFlowAgreementV1.d.ts.map +1 -1
  351. package/dist/module/typechain/ISETH.d.ts +1068 -0
  352. package/dist/module/typechain/ISETH.d.ts.map +1 -0
  353. package/dist/module/typechain/ISETH.js +2 -0
  354. package/dist/module/typechain/ISETH.js.map +1 -0
  355. package/dist/module/typechain/SuperfluidGovernanceII.d.ts +633 -0
  356. package/dist/module/typechain/SuperfluidGovernanceII.d.ts.map +1 -0
  357. package/dist/module/typechain/SuperfluidGovernanceII.js +2 -0
  358. package/dist/module/typechain/SuperfluidGovernanceII.js.map +1 -0
  359. package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.d.ts.map +1 -1
  360. package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.js +335 -2
  361. package/dist/module/typechain/factories/IConstantFlowAgreementV1__factory.js.map +1 -1
  362. package/dist/module/typechain/factories/ISETH__factory.d.ts +36 -0
  363. package/dist/module/typechain/factories/ISETH__factory.d.ts.map +1 -0
  364. package/dist/module/typechain/factories/ISETH__factory.js +1618 -0
  365. package/dist/module/typechain/factories/ISETH__factory.js.map +1 -0
  366. package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.d.ts +36 -0
  367. package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.d.ts.map +1 -0
  368. package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.js +953 -0
  369. package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.js.map +1 -0
  370. package/dist/module/typechain/index.d.ts +4 -0
  371. package/dist/module/typechain/index.d.ts.map +1 -1
  372. package/dist/module/typechain/index.js +2 -0
  373. package/dist/module/typechain/index.js.map +1 -1
  374. package/dist/module/utils.d.ts +15 -13
  375. package/dist/module/utils.d.ts.map +1 -1
  376. package/dist/module/utils.js +27 -15
  377. package/dist/module/utils.js.map +1 -1
  378. package/package.json +11 -41
  379. package/dist/main/Token.d.ts.map +0 -1
  380. package/dist/main/Token.js.map +0 -1
  381. package/dist/module/Token.d.ts.map +0 -1
  382. package/dist/module/Token.js.map +0 -1
@@ -1,42 +1,72 @@
1
1
  import Host from "./Host";
2
2
  import Operation from "./Operation";
3
- import { IAgreementV1Options, ICreateFlowParams, IDeleteFlowParams, IGetAccountFlowInfoParams, IGetFlowParams, IUpdateFlowParams, IWeb3FlowInfo, IWeb3FlowInfoParams } from "./interfaces";
3
+ import { IAgreementV1Options, ICreateFlowParams, IDeleteFlowParams, IFullControlParams, IGetAccountFlowInfoParams, IGetFlowOperatorDataByIDParams, IGetFlowOperatorDataParams, IGetFlowParams, IUpdateFlowByOperatorParams, IUpdateFlowOperatorPermissionsParams, IUpdateFlowParams, IWeb3FlowInfo, IWeb3FlowInfoParams, IWeb3FlowOperatorData, IWeb3FlowOperatorDataParams } from "./interfaces";
4
+ import { IConstantFlowAgreementV1 } from "./typechain";
4
5
  /**
5
- * @dev Constant Flow Agreement V1 Helper Class
6
+ * Constant Flow Agreement V1 Helper Class
6
7
  * @description A helper class to interact with the CFAV1 contract.
7
8
  */
8
9
  export default class ConstantFlowAgreementV1 {
9
10
  readonly options: IAgreementV1Options;
10
11
  readonly host: Host;
12
+ readonly contract: IConstantFlowAgreementV1;
11
13
  constructor(options: IAgreementV1Options);
12
- private get cfaContract();
14
+ /** ### CFA Read Functions ### */
13
15
  /**
14
- * @dev Get the details of a flow.
16
+ * Get the details of a flow.
15
17
  * @param superToken the superToken of the agreement
16
18
  * @param sender the sender of the flow
17
19
  * @param receiver the receiver of the flow
18
20
  * @param providerOrSigner a provider or signer object
19
21
  * @returns {Promise<IWeb3FlowInfo>} Web3 Flow info object
20
22
  */
21
- getFlow: ({ superToken, sender, receiver, providerOrSigner, }: IGetFlowParams) => Promise<IWeb3FlowInfo>;
23
+ getFlow: (params: IGetFlowParams) => Promise<IWeb3FlowInfo>;
22
24
  /**
23
- * @dev Get the flow info of an account (net flow).
25
+ * Get the flow info of an account (net flow).
24
26
  * @param superToken the superToken of the agreement
25
27
  * @param account the account we're querying
26
28
  * @param providerOrSigner a provider or signer object
27
29
  * @returns {Promise<IWeb3FlowInfo>} Web3 Flow info object
28
30
  */
29
- getAccountFlowInfo: ({ superToken, account, providerOrSigner, }: IGetAccountFlowInfoParams) => Promise<IWeb3FlowInfo>;
31
+ getAccountFlowInfo: (params: IGetAccountFlowInfoParams) => Promise<IWeb3FlowInfo>;
30
32
  /**
31
- * @dev Get the net flow of an account.
33
+ * Get the net flow of an account.
32
34
  * @param superToken the superToken of the agreement
33
35
  * @param account the account we're querying
34
36
  * @param providerOrSigner a provider or signer object
35
37
  * @returns {Promise<string>} Web3 Flow info object
36
38
  */
37
- getNetFlow: ({ superToken, account, providerOrSigner, }: IGetAccountFlowInfoParams) => Promise<string>;
39
+ getNetFlow: (params: IGetAccountFlowInfoParams) => Promise<string>;
38
40
  /**
39
- * @dev Create a flow.
41
+ * Get flow operator data.
42
+ * @param superToken the superToken of the agreement
43
+ * @param sender the sender
44
+ * @param flowOperator the flowOperator
45
+ * @param providerOrSigner a provider or signer object
46
+ * @returns {Promise<IWeb3FlowOperatorData>} Web3 Flow info object
47
+ */
48
+ getFlowOperatorData: (params: IGetFlowOperatorDataParams) => Promise<IWeb3FlowOperatorData>;
49
+ /**
50
+ * Get flow operator data using the flowOperatorId.
51
+ * @param superToken the superToken of the agreement
52
+ * @param flowOperatorId The keccak256 hash of encoded string "flowOperator", sender and flowOperator
53
+ * @param providerOrSigner a provider or signer object
54
+ * @returns {Promise<IWeb3FlowOperatorData>} Web3 Flow info object
55
+ */
56
+ getFlowOperatorDataByID: (params: IGetFlowOperatorDataByIDParams) => Promise<IWeb3FlowOperatorData>;
57
+ /** ### CFA Write Functions ### */
58
+ /**
59
+ * Create a flow.
60
+ * @param flowRate The specified flow rate.
61
+ * @param receiver The receiver of the flow.
62
+ * @param superToken The token to be flowed.
63
+ * @param userData Extra user data provided.
64
+ * @param overrides ethers overrides object for more control over the transaction sent.
65
+ * @returns {Operation} An instance of Operation which can be executed or batched.
66
+ */
67
+ createFlow: (params: ICreateFlowParams) => Operation;
68
+ /**
69
+ * Update a flow.
40
70
  * @param flowRate The specified flow rate.
41
71
  * @param receiver The receiver of the flow.
42
72
  * @param superToken The token to be flowed.
@@ -44,35 +74,94 @@ export default class ConstantFlowAgreementV1 {
44
74
  * @param overrides ethers overrides object for more control over the transaction sent.
45
75
  * @returns {Operation} An instance of Operation which can be executed or batched.
46
76
  */
47
- createFlow: ({ flowRate, receiver, superToken, userData, overrides, }: ICreateFlowParams) => Operation;
77
+ updateFlow: (params: IUpdateFlowParams) => Operation;
78
+ /**
79
+ * Delete a flow.
80
+ * @param superToken The token to be flowed.
81
+ * @param sender The sender of the flow.
82
+ * @param receiver The receiver of the flow.
83
+ * @param userData Extra user data provided.
84
+ * @param overrides ethers overrides object for more control over the transaction sent.
85
+ * @returns {Operation} An instance of Operation which can be executed or batched.
86
+ */
87
+ deleteFlow: (params: IDeleteFlowParams) => Operation;
88
+ /** ### CFA ACL Write Functions (byOperator) ### */
89
+ /**
90
+ * Update permissions for a flow operator as a sender.
91
+ * @param superToken The token to be flowed.
92
+ * @param flowOperator The permission grantee address
93
+ * @param permission The permissions to set.
94
+ * @param flowRateAllowance The flowRateAllowance granted to the flow operator.
95
+ * @param userData Extra user data provided.
96
+ * @param overrides ethers overrides object for more control over the transaction sent.
97
+ * @returns {Operation} An instance of Operation which can be executed or batched.
98
+ */
99
+ updateFlowOperatorPermissions(params: IUpdateFlowOperatorPermissionsParams): Operation;
100
+ /**
101
+ * Give flow operator full control - max flow rate and create/update/delete permissions.
102
+ * @param superToken The token to be flowed.
103
+ * @param flowOperator The permission grantee address
104
+ * @param userData Extra user data provided.
105
+ * @param overrides ethers overrides object for more control over the transaction sent.
106
+ */
107
+ authorizeFlowOperatorWithFullControl(params: IFullControlParams): Operation;
108
+ /**
109
+ * Revoke flow operator control - set flow rate to 0 with no permissions.
110
+ * @param superToken The token to be flowed.
111
+ * @param flowOperator The permission grantee address
112
+ * @param userData Extra user data provided.
113
+ * @param overrides ethers overrides object for more control over the transaction sent.
114
+ */
115
+ revokeFlowOperatorWithFullControl(params: IFullControlParams): Operation;
48
116
  /**
49
- * @dev Update a flow.
117
+ * Create a flow as an operator
50
118
  * @param flowRate The specified flow rate.
119
+ * @param sender The sender of the flow.
51
120
  * @param receiver The receiver of the flow.
52
121
  * @param superToken The token to be flowed.
53
122
  * @param userData Extra user data provided.
54
123
  * @param overrides ethers overrides object for more control over the transaction sent.
55
124
  * @returns {Operation} An instance of Operation which can be executed or batched.
56
125
  */
57
- updateFlow: ({ flowRate, receiver, superToken, userData, overrides, }: IUpdateFlowParams) => Operation;
126
+ createFlowByOperator: (params: ICreateFlowParams) => Operation;
58
127
  /**
59
- * @dev Delete a flow.
128
+ * Update a flow as an operator.
129
+ * @param flowRate The specified flow rate.
130
+ * @param sender The sender of the flow.
131
+ * @param receiver The receiver of the flow.
60
132
  * @param superToken The token to be flowed.
133
+ * @param userData Extra user data provided.
134
+ * @param overrides ethers overrides object for more control over the transaction sent.
135
+ * @returns {Operation} An instance of Operation which can be executed or batched.
136
+ */
137
+ updateFlowByOperator: (params: IUpdateFlowByOperatorParams) => Operation;
138
+ /**
139
+ * Delete a flow as an operator.
61
140
  * @param sender The sender of the flow.
62
141
  * @param receiver The receiver of the flow.
142
+ * @param superToken The token to be flowed.
63
143
  * @param userData Extra user data provided.
64
144
  * @param overrides ethers overrides object for more control over the transaction sent.
65
145
  * @returns {Operation} An instance of Operation which can be executed or batched.
66
146
  */
67
- deleteFlow: ({ superToken, sender, receiver, userData, overrides, }: IDeleteFlowParams) => Operation;
147
+ deleteFlowByOperator: (params: IDeleteFlowParams) => Operation;
148
+ /** ### Private Functions ### */
68
149
  /**
69
- * @dev Sanitizes flow info, converting BigNumber to string.
150
+ * Sanitizes flow info, converting BigNumber to string.
70
151
  * @param timestamp last updated timestamp of flow
71
152
  * @param flowRate the current flow rate
72
153
  * @param deposit the deposit amount
73
154
  * @param owedDeposit any owed depsit
74
155
  * @returns {IWeb3FlowInfo} sanitized web3 flow info
75
156
  */
76
- _sanitizeflowInfo: ({ timestamp, flowRate, deposit, owedDeposit, }: IWeb3FlowInfoParams) => IWeb3FlowInfo;
157
+ _sanitizeFlowInfo: (params: IWeb3FlowInfoParams) => IWeb3FlowInfo;
158
+ /**
159
+ * Sanitizes flow operator data, converting BigNumber to string.
160
+ * @param flowOperatorId The keccak256 hash of encoded string "flowOperator", sender and flowOperator
161
+ * @param permissions the permissions
162
+ * @param flowRateAllowance the flow rate allowance granted to the flow operator
163
+ * @returns {IWeb3FlowOperatorData} sanitized web3 flow info
164
+ */
165
+ _sanitizeFlowOperatorData: (params: IWeb3FlowOperatorDataParams) => IWeb3FlowOperatorData;
77
166
  }
78
167
  //# sourceMappingURL=ConstantFlowAgreementV1.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConstantFlowAgreementV1.d.ts","sourceRoot":"","sources":["../../src/ConstantFlowAgreementV1.ts"],"names":[],"mappings":"AAEA,OAAO,IAAI,MAAM,QAAQ,CAAC;AAC1B,OAAO,SAAS,MAAM,aAAa,CAAC;AAGpC,OAAO,EACH,mBAAmB,EACnB,iBAAiB,EACjB,iBAAiB,EAC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B,KAAG,SAAS,CAsBrE;IAEF;;;;;;;;OAQG;IACH,oBAAoB,WAAY,iBAAiB,KAAG,SAAS,CAgB3D;IAEF,gCAAgC;IAEhC;;;;;;;OAOG;IACH,iBAAiB,WAAY,mBAAmB,KAAG,aAAa,CAO9D;IAEF;;;;;;OAMG;IACH,yBAAyB,WACb,2BAA2B,KACpC,qBAAqB,CAMtB;CACL"}
@@ -2,32 +2,32 @@ import { ethers } from "ethers";
2
2
  import Host from "./Host";
3
3
  import { SFError } from "./SFError";
4
4
  import IConstantFlowAgreementV1ABI from "./abi/IConstantFlowAgreementV1.json";
5
- import { getSanitizedTimestamp, normalizeAddress } from "./utils";
5
+ import { getSanitizedTimestamp, isPermissionsClean, normalizeAddress, } from "./utils";
6
6
  const cfaInterface = new ethers.utils.Interface(IConstantFlowAgreementV1ABI.abi);
7
7
  /**
8
- * @dev Constant Flow Agreement V1 Helper Class
8
+ * Constant Flow Agreement V1 Helper Class
9
9
  * @description A helper class to interact with the CFAV1 contract.
10
10
  */
11
11
  export default class ConstantFlowAgreementV1 {
12
12
  constructor(options) {
13
- // CFA Read Functions
13
+ /** ### CFA Read Functions ### */
14
14
  /**
15
- * @dev Get the details of a flow.
15
+ * Get the details of a flow.
16
16
  * @param superToken the superToken of the agreement
17
17
  * @param sender the sender of the flow
18
18
  * @param receiver the receiver of the flow
19
19
  * @param providerOrSigner a provider or signer object
20
20
  * @returns {Promise<IWeb3FlowInfo>} Web3 Flow info object
21
21
  */
22
- this.getFlow = async ({ superToken, sender, receiver, providerOrSigner, }) => {
23
- const normalizedToken = normalizeAddress(superToken);
24
- const normalizedSender = normalizeAddress(sender);
25
- const normalizedReceiver = normalizeAddress(receiver);
22
+ this.getFlow = async (params) => {
23
+ const normalizedToken = normalizeAddress(params.superToken);
24
+ const normalizedSender = normalizeAddress(params.sender);
25
+ const normalizedReceiver = normalizeAddress(params.receiver);
26
26
  try {
27
- const flowData = await this.cfaContract
28
- .connect(providerOrSigner)
27
+ const flowData = await this.contract
28
+ .connect(params.providerOrSigner)
29
29
  .getFlow(normalizedToken, normalizedSender, normalizedReceiver);
30
- return this._sanitizeflowInfo(flowData);
30
+ return this._sanitizeFlowInfo(flowData);
31
31
  }
32
32
  catch (err) {
33
33
  throw new SFError({
@@ -38,20 +38,20 @@ export default class ConstantFlowAgreementV1 {
38
38
  }
39
39
  };
40
40
  /**
41
- * @dev Get the flow info of an account (net flow).
41
+ * Get the flow info of an account (net flow).
42
42
  * @param superToken the superToken of the agreement
43
43
  * @param account the account we're querying
44
44
  * @param providerOrSigner a provider or signer object
45
45
  * @returns {Promise<IWeb3FlowInfo>} Web3 Flow info object
46
46
  */
47
- this.getAccountFlowInfo = async ({ superToken, account, providerOrSigner, }) => {
48
- const normalizedToken = normalizeAddress(superToken);
49
- const normalizedAccount = normalizeAddress(account);
47
+ this.getAccountFlowInfo = async (params) => {
48
+ const normalizedToken = normalizeAddress(params.superToken);
49
+ const normalizedAccount = normalizeAddress(params.account);
50
50
  try {
51
- const flowData = await this.cfaContract
52
- .connect(providerOrSigner)
51
+ const flowData = await this.contract
52
+ .connect(params.providerOrSigner)
53
53
  .getAccountFlowInfo(normalizedToken, normalizedAccount);
54
- return this._sanitizeflowInfo(flowData);
54
+ return this._sanitizeFlowInfo(flowData);
55
55
  }
56
56
  catch (err) {
57
57
  throw new SFError({
@@ -62,18 +62,18 @@ export default class ConstantFlowAgreementV1 {
62
62
  }
63
63
  };
64
64
  /**
65
- * @dev Get the net flow of an account.
65
+ * Get the net flow of an account.
66
66
  * @param superToken the superToken of the agreement
67
67
  * @param account the account we're querying
68
68
  * @param providerOrSigner a provider or signer object
69
69
  * @returns {Promise<string>} Web3 Flow info object
70
70
  */
71
- this.getNetFlow = async ({ superToken, account, providerOrSigner, }) => {
72
- const normalizedToken = normalizeAddress(superToken);
73
- const normalizedAccount = normalizeAddress(account);
71
+ this.getNetFlow = async (params) => {
72
+ const normalizedToken = normalizeAddress(params.superToken);
73
+ const normalizedAccount = normalizeAddress(params.account);
74
74
  try {
75
- return (await this.cfaContract
76
- .connect(providerOrSigner)
75
+ return (await this.contract
76
+ .connect(params.providerOrSigner)
77
77
  .getNetFlow(normalizedToken, normalizedAccount)).toString();
78
78
  }
79
79
  catch (err) {
@@ -84,9 +84,61 @@ export default class ConstantFlowAgreementV1 {
84
84
  });
85
85
  }
86
86
  };
87
- // CFA Write Functions
88
87
  /**
89
- * @dev Create a flow.
88
+ * Get flow operator data.
89
+ * @param superToken the superToken of the agreement
90
+ * @param sender the sender
91
+ * @param flowOperator the flowOperator
92
+ * @param providerOrSigner a provider or signer object
93
+ * @returns {Promise<IWeb3FlowOperatorData>} Web3 Flow info object
94
+ */
95
+ this.getFlowOperatorData = async (params) => {
96
+ const normalizedToken = normalizeAddress(params.superToken);
97
+ const normalizedSender = normalizeAddress(params.sender);
98
+ const normalizedFlowOperator = normalizeAddress(params.flowOperator);
99
+ try {
100
+ const flowOperatorData = await this.contract
101
+ .connect(params.providerOrSigner)
102
+ .getFlowOperatorData(normalizedToken, normalizedSender, normalizedFlowOperator);
103
+ return this._sanitizeFlowOperatorData(flowOperatorData);
104
+ }
105
+ catch (err) {
106
+ throw new SFError({
107
+ type: "CFAV1_READ",
108
+ customMessage: "There was an error getting flow operator data",
109
+ errorObject: err,
110
+ });
111
+ }
112
+ };
113
+ /**
114
+ * Get flow operator data using the flowOperatorId.
115
+ * @param superToken the superToken of the agreement
116
+ * @param flowOperatorId The keccak256 hash of encoded string "flowOperator", sender and flowOperator
117
+ * @param providerOrSigner a provider or signer object
118
+ * @returns {Promise<IWeb3FlowOperatorData>} Web3 Flow info object
119
+ */
120
+ this.getFlowOperatorDataByID = async (params) => {
121
+ const normalizedToken = normalizeAddress(params.superToken);
122
+ try {
123
+ const flowOperatorData = await this.contract
124
+ .connect(params.providerOrSigner)
125
+ .getFlowOperatorDataByID(normalizedToken, params.flowOperatorId);
126
+ return this._sanitizeFlowOperatorData({
127
+ ...flowOperatorData,
128
+ flowOperatorId: params.flowOperatorId,
129
+ });
130
+ }
131
+ catch (err) {
132
+ throw new SFError({
133
+ type: "CFAV1_READ",
134
+ customMessage: "There was an error getting flow operator data",
135
+ errorObject: err,
136
+ });
137
+ }
138
+ };
139
+ /** ### CFA Write Functions ### */
140
+ /**
141
+ * Create a flow.
90
142
  * @param flowRate The specified flow rate.
91
143
  * @param receiver The receiver of the flow.
92
144
  * @param superToken The token to be flowed.
@@ -94,19 +146,19 @@ export default class ConstantFlowAgreementV1 {
94
146
  * @param overrides ethers overrides object for more control over the transaction sent.
95
147
  * @returns {Operation} An instance of Operation which can be executed or batched.
96
148
  */
97
- this.createFlow = ({ flowRate, receiver, superToken, userData, overrides, }) => {
98
- const normalizedToken = normalizeAddress(superToken);
99
- const normalizedReceiver = normalizeAddress(receiver);
149
+ this.createFlow = (params) => {
150
+ const normalizedToken = normalizeAddress(params.superToken);
151
+ const normalizedReceiver = normalizeAddress(params.receiver);
100
152
  const callData = cfaInterface.encodeFunctionData("createFlow", [
101
153
  normalizedToken,
102
154
  normalizedReceiver,
103
- flowRate,
155
+ params.flowRate,
104
156
  "0x",
105
157
  ]);
106
- return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, userData, overrides);
158
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
107
159
  };
108
160
  /**
109
- * @dev Update a flow.
161
+ * Update a flow.
110
162
  * @param flowRate The specified flow rate.
111
163
  * @param receiver The receiver of the flow.
112
164
  * @param superToken The token to be flowed.
@@ -114,19 +166,19 @@ export default class ConstantFlowAgreementV1 {
114
166
  * @param overrides ethers overrides object for more control over the transaction sent.
115
167
  * @returns {Operation} An instance of Operation which can be executed or batched.
116
168
  */
117
- this.updateFlow = ({ flowRate, receiver, superToken, userData, overrides, }) => {
118
- const normalizedToken = normalizeAddress(superToken);
119
- const normalizedReceiver = normalizeAddress(receiver);
169
+ this.updateFlow = (params) => {
170
+ const normalizedToken = normalizeAddress(params.superToken);
171
+ const normalizedReceiver = normalizeAddress(params.receiver);
120
172
  const callData = cfaInterface.encodeFunctionData("updateFlow", [
121
173
  normalizedToken,
122
174
  normalizedReceiver,
123
- flowRate,
175
+ params.flowRate,
124
176
  "0x",
125
177
  ]);
126
- return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, userData, overrides);
178
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
127
179
  };
128
180
  /**
129
- * @dev Delete a flow.
181
+ * Delete a flow.
130
182
  * @param superToken The token to be flowed.
131
183
  * @param sender The sender of the flow.
132
184
  * @param receiver The receiver of the flow.
@@ -134,39 +186,175 @@ export default class ConstantFlowAgreementV1 {
134
186
  * @param overrides ethers overrides object for more control over the transaction sent.
135
187
  * @returns {Operation} An instance of Operation which can be executed or batched.
136
188
  */
137
- this.deleteFlow = ({ superToken, sender, receiver, userData, overrides, }) => {
138
- const normalizedToken = normalizeAddress(superToken);
139
- const normalizedSender = normalizeAddress(sender);
140
- const normalizedReceiver = normalizeAddress(receiver);
189
+ this.deleteFlow = (params) => {
190
+ const normalizedToken = normalizeAddress(params.superToken);
191
+ const normalizedSender = normalizeAddress(params.sender);
192
+ const normalizedReceiver = normalizeAddress(params.receiver);
141
193
  const callData = cfaInterface.encodeFunctionData("deleteFlow", [
142
194
  normalizedToken,
143
195
  normalizedSender,
144
196
  normalizedReceiver,
145
197
  "0x",
146
198
  ]);
147
- return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, userData, overrides);
199
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
148
200
  };
149
201
  /**
150
- * @dev Sanitizes flow info, converting BigNumber to string.
202
+ * Create a flow as an operator
203
+ * @param flowRate The specified flow rate.
204
+ * @param sender The sender of the flow.
205
+ * @param receiver The receiver of the flow.
206
+ * @param superToken The token to be flowed.
207
+ * @param userData Extra user data provided.
208
+ * @param overrides ethers overrides object for more control over the transaction sent.
209
+ * @returns {Operation} An instance of Operation which can be executed or batched.
210
+ */
211
+ this.createFlowByOperator = (params) => {
212
+ const normalizedToken = normalizeAddress(params.superToken);
213
+ const normalizedReceiver = normalizeAddress(params.receiver);
214
+ const normalizedSender = normalizeAddress(params.sender);
215
+ const callData = cfaInterface.encodeFunctionData("createFlowByOperator", [
216
+ normalizedToken,
217
+ normalizedSender,
218
+ normalizedReceiver,
219
+ params.flowRate,
220
+ "0x",
221
+ ]);
222
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
223
+ };
224
+ /**
225
+ * Update a flow as an operator.
226
+ * @param flowRate The specified flow rate.
227
+ * @param sender The sender of the flow.
228
+ * @param receiver The receiver of the flow.
229
+ * @param superToken The token to be flowed.
230
+ * @param userData Extra user data provided.
231
+ * @param overrides ethers overrides object for more control over the transaction sent.
232
+ * @returns {Operation} An instance of Operation which can be executed or batched.
233
+ */
234
+ this.updateFlowByOperator = (params) => {
235
+ const normalizedToken = normalizeAddress(params.superToken);
236
+ const normalizedSender = normalizeAddress(params.sender);
237
+ const normalizedReceiver = normalizeAddress(params.receiver);
238
+ const callData = cfaInterface.encodeFunctionData("updateFlowByOperator", [
239
+ normalizedToken,
240
+ normalizedSender,
241
+ normalizedReceiver,
242
+ params.flowRate,
243
+ "0x",
244
+ ]);
245
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
246
+ };
247
+ /**
248
+ * Delete a flow as an operator.
249
+ * @param sender The sender of the flow.
250
+ * @param receiver The receiver of the flow.
251
+ * @param superToken The token to be flowed.
252
+ * @param userData Extra user data provided.
253
+ * @param overrides ethers overrides object for more control over the transaction sent.
254
+ * @returns {Operation} An instance of Operation which can be executed or batched.
255
+ */
256
+ this.deleteFlowByOperator = (params) => {
257
+ const normalizedToken = normalizeAddress(params.superToken);
258
+ const normalizedSender = normalizeAddress(params.sender);
259
+ const normalizedReceiver = normalizeAddress(params.receiver);
260
+ const callData = cfaInterface.encodeFunctionData("deleteFlowByOperator", [normalizedToken, normalizedSender, normalizedReceiver, "0x"]);
261
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
262
+ };
263
+ /** ### Private Functions ### */
264
+ /**
265
+ * Sanitizes flow info, converting BigNumber to string.
151
266
  * @param timestamp last updated timestamp of flow
152
267
  * @param flowRate the current flow rate
153
268
  * @param deposit the deposit amount
154
269
  * @param owedDeposit any owed depsit
155
270
  * @returns {IWeb3FlowInfo} sanitized web3 flow info
156
271
  */
157
- this._sanitizeflowInfo = ({ timestamp, flowRate, deposit, owedDeposit, }) => {
272
+ this._sanitizeFlowInfo = (params) => {
158
273
  return {
159
- timestamp: getSanitizedTimestamp(timestamp),
160
- flowRate: flowRate.toString(),
161
- deposit: deposit.toString(),
162
- owedDeposit: owedDeposit.toString(),
274
+ timestamp: getSanitizedTimestamp(params.timestamp),
275
+ flowRate: params.flowRate.toString(),
276
+ deposit: params.deposit.toString(),
277
+ owedDeposit: params.owedDeposit.toString(),
278
+ };
279
+ };
280
+ /**
281
+ * Sanitizes flow operator data, converting BigNumber to string.
282
+ * @param flowOperatorId The keccak256 hash of encoded string "flowOperator", sender and flowOperator
283
+ * @param permissions the permissions
284
+ * @param flowRateAllowance the flow rate allowance granted to the flow operator
285
+ * @returns {IWeb3FlowOperatorData} sanitized web3 flow info
286
+ */
287
+ this._sanitizeFlowOperatorData = (params) => {
288
+ return {
289
+ flowOperatorId: params.flowOperatorId,
290
+ permissions: params.permissions.toString(),
291
+ flowRateAllowance: params.flowRateAllowance.toString(),
163
292
  };
164
293
  };
165
294
  this.options = options;
166
295
  this.host = new Host(options.config.hostAddress);
296
+ this.contract = new ethers.Contract(this.options.config.cfaV1Address, IConstantFlowAgreementV1ABI.abi);
297
+ }
298
+ /** ### CFA ACL Write Functions (byOperator) ### */
299
+ /**
300
+ * Update permissions for a flow operator as a sender.
301
+ * @param superToken The token to be flowed.
302
+ * @param flowOperator The permission grantee address
303
+ * @param permission The permissions to set.
304
+ * @param flowRateAllowance The flowRateAllowance granted to the flow operator.
305
+ * @param userData Extra user data provided.
306
+ * @param overrides ethers overrides object for more control over the transaction sent.
307
+ * @returns {Operation} An instance of Operation which can be executed or batched.
308
+ */
309
+ updateFlowOperatorPermissions(params) {
310
+ const normalizedToken = normalizeAddress(params.superToken);
311
+ const normalizedFlowOperator = normalizeAddress(params.flowOperator);
312
+ if (!isPermissionsClean(params.permissions)) {
313
+ throw new SFError({
314
+ type: "UNCLEAN_PERMISSIONS",
315
+ customMessage: "The desired permissions are unclean",
316
+ });
317
+ }
318
+ if (Number(params.flowRateAllowance) < 0) {
319
+ throw new SFError({
320
+ type: "NEGATIVE_FLOW_ALLOWANCE",
321
+ customMessage: "No negative flow allowance allowed",
322
+ });
323
+ }
324
+ const callData = cfaInterface.encodeFunctionData("updateFlowOperatorPermissions", [
325
+ normalizedToken,
326
+ normalizedFlowOperator,
327
+ params.permissions,
328
+ params.flowRateAllowance,
329
+ "0x",
330
+ ]);
331
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
332
+ }
333
+ /**
334
+ * Give flow operator full control - max flow rate and create/update/delete permissions.
335
+ * @param superToken The token to be flowed.
336
+ * @param flowOperator The permission grantee address
337
+ * @param userData Extra user data provided.
338
+ * @param overrides ethers overrides object for more control over the transaction sent.
339
+ */
340
+ authorizeFlowOperatorWithFullControl(params) {
341
+ const normalizedToken = normalizeAddress(params.superToken);
342
+ const normalizedFlowOperator = normalizeAddress(params.flowOperator);
343
+ const callData = cfaInterface.encodeFunctionData("authorizeFlowOperatorWithFullControl", [normalizedToken, normalizedFlowOperator, "0x"]);
344
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
167
345
  }
168
- get cfaContract() {
169
- return new ethers.Contract(this.options.config.cfaV1Address, IConstantFlowAgreementV1ABI.abi);
346
+ /**
347
+ * Revoke flow operator control - set flow rate to 0 with no permissions.
348
+ * @param superToken The token to be flowed.
349
+ * @param flowOperator The permission grantee address
350
+ * @param userData Extra user data provided.
351
+ * @param overrides ethers overrides object for more control over the transaction sent.
352
+ */
353
+ revokeFlowOperatorWithFullControl(params) {
354
+ const normalizedToken = normalizeAddress(params.superToken);
355
+ const normalizedFlowOperator = normalizeAddress(params.flowOperator);
356
+ const callData = cfaInterface.encodeFunctionData("revokeFlowOperatorWithFullControl", [normalizedToken, normalizedFlowOperator, "0x"]);
357
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
170
358
  }
171
359
  }
172
360
  //# sourceMappingURL=ConstantFlowAgreementV1.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ConstantFlowAgreementV1.js","sourceRoot":"","sources":["../../src/ConstantFlowAgreementV1.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,IAAI,MAAM,QAAQ,CAAC;AAE1B,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AACpC,OAAO,2BAA2B,MAAM,qCAAqC,CAAC;AAY9E,OAAO,EAAE,qBAAqB,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAElE,MAAM,YAAY,GAAG,IAAI,MAAM,CAAC,KAAK,CAAC,SAAS,CAC3C,2BAA2B,CAAC,GAAG,CAClC,CAAC;AAEF;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,uBAAuB;IAIxC,YAAY,OAA4B;QAYxC,qBAAqB;QAErB;;;;;;;WAOG;QACH,YAAO,GAAG,KAAK,EAAE,EACb,UAAU,EACV,MAAM,EACN,QAAQ,EACR,gBAAgB,GACH,EAA0B,EAAE;YACzC,MAAM,eAAe,GAAG,gBAAgB,CAAC,UAAU,CAAC,CAAC;YACrD,MAAM,gBAAgB,GAAG,gBAAgB,CA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