@superfluid-finance/sdk-core 0.3.3-dev.a92870f.0 → 0.3.3-dev.bd59c6c.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 +6034 -2012
  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 +34 -7
  16. package/dist/main/Framework.d.ts.map +1 -1
  17. package/dist/main/Framework.js +88 -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 +226 -67
  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 +921 -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 +617 -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 +939 -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 +34 -7
  203. package/dist/module/Framework.d.ts.map +1 -1
  204. package/dist/module/Framework.js +88 -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 +226 -67
  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 +921 -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 +617 -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 +935 -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
@@ -10,29 +10,29 @@ const IConstantFlowAgreementV1_json_1 = __importDefault(require("./abi/IConstant
10
10
  const utils_1 = require("./utils");
11
11
  const cfaInterface = new ethers_1.ethers.utils.Interface(IConstantFlowAgreementV1_json_1.default.abi);
12
12
  /**
13
- * @dev Constant Flow Agreement V1 Helper Class
13
+ * Constant Flow Agreement V1 Helper Class
14
14
  * @description A helper class to interact with the CFAV1 contract.
15
15
  */
16
16
  class ConstantFlowAgreementV1 {
17
17
  constructor(options) {
18
- // CFA Read Functions
18
+ /** ### CFA Read Functions ### */
19
19
  /**
20
- * @dev Get the details of a flow.
20
+ * Get the details of a flow.
21
21
  * @param superToken the superToken of the agreement
22
22
  * @param sender the sender of the flow
23
23
  * @param receiver the receiver of the flow
24
24
  * @param providerOrSigner a provider or signer object
25
25
  * @returns {Promise<IWeb3FlowInfo>} Web3 Flow info object
26
26
  */
27
- this.getFlow = async ({ superToken, sender, receiver, providerOrSigner, }) => {
28
- const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
29
- const normalizedSender = (0, utils_1.normalizeAddress)(sender);
30
- const normalizedReceiver = (0, utils_1.normalizeAddress)(receiver);
27
+ this.getFlow = async (params) => {
28
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
29
+ const normalizedSender = (0, utils_1.normalizeAddress)(params.sender);
30
+ const normalizedReceiver = (0, utils_1.normalizeAddress)(params.receiver);
31
31
  try {
32
- const flowData = await this.cfaContract
33
- .connect(providerOrSigner)
32
+ const flowData = await this.contract
33
+ .connect(params.providerOrSigner)
34
34
  .getFlow(normalizedToken, normalizedSender, normalizedReceiver);
35
- return this._sanitizeflowInfo(flowData);
35
+ return this._sanitizeFlowInfo(flowData);
36
36
  }
37
37
  catch (err) {
38
38
  throw new SFError_1.SFError({
@@ -43,20 +43,20 @@ class ConstantFlowAgreementV1 {
43
43
  }
44
44
  };
45
45
  /**
46
- * @dev Get the flow info of an account (net flow).
46
+ * Get the flow info of an account (net flow).
47
47
  * @param superToken the superToken of the agreement
48
48
  * @param account the account we're querying
49
49
  * @param providerOrSigner a provider or signer object
50
50
  * @returns {Promise<IWeb3FlowInfo>} Web3 Flow info object
51
51
  */
52
- this.getAccountFlowInfo = async ({ superToken, account, providerOrSigner, }) => {
53
- const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
54
- const normalizedAccount = (0, utils_1.normalizeAddress)(account);
52
+ this.getAccountFlowInfo = async (params) => {
53
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
54
+ const normalizedAccount = (0, utils_1.normalizeAddress)(params.account);
55
55
  try {
56
- const flowData = await this.cfaContract
57
- .connect(providerOrSigner)
56
+ const flowData = await this.contract
57
+ .connect(params.providerOrSigner)
58
58
  .getAccountFlowInfo(normalizedToken, normalizedAccount);
59
- return this._sanitizeflowInfo(flowData);
59
+ return this._sanitizeFlowInfo(flowData);
60
60
  }
61
61
  catch (err) {
62
62
  throw new SFError_1.SFError({
@@ -67,18 +67,18 @@ class ConstantFlowAgreementV1 {
67
67
  }
68
68
  };
69
69
  /**
70
- * @dev Get the net flow of an account.
70
+ * Get the net flow of an account.
71
71
  * @param superToken the superToken of the agreement
72
72
  * @param account the account we're querying
73
73
  * @param providerOrSigner a provider or signer object
74
74
  * @returns {Promise<string>} Web3 Flow info object
75
75
  */
76
- this.getNetFlow = async ({ superToken, account, providerOrSigner, }) => {
77
- const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
78
- const normalizedAccount = (0, utils_1.normalizeAddress)(account);
76
+ this.getNetFlow = async (params) => {
77
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
78
+ const normalizedAccount = (0, utils_1.normalizeAddress)(params.account);
79
79
  try {
80
- return (await this.cfaContract
81
- .connect(providerOrSigner)
80
+ return (await this.contract
81
+ .connect(params.providerOrSigner)
82
82
  .getNetFlow(normalizedToken, normalizedAccount)).toString();
83
83
  }
84
84
  catch (err) {
@@ -89,9 +89,61 @@ class ConstantFlowAgreementV1 {
89
89
  });
90
90
  }
91
91
  };
92
- // CFA Write Functions
93
92
  /**
94
- * @dev Create a flow.
93
+ * Get flow operator data.
94
+ * @param superToken the superToken of the agreement
95
+ * @param sender the sender
96
+ * @param flowOperator the flowOperator
97
+ * @param providerOrSigner a provider or signer object
98
+ * @returns {Promise<IWeb3FlowOperatorData>} Web3 Flow info object
99
+ */
100
+ this.getFlowOperatorData = async (params) => {
101
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
102
+ const normalizedSender = (0, utils_1.normalizeAddress)(params.sender);
103
+ const normalizedFlowOperator = (0, utils_1.normalizeAddress)(params.flowOperator);
104
+ try {
105
+ const flowOperatorData = await this.contract
106
+ .connect(params.providerOrSigner)
107
+ .getFlowOperatorData(normalizedToken, normalizedSender, normalizedFlowOperator);
108
+ return this._sanitizeFlowOperatorData(flowOperatorData);
109
+ }
110
+ catch (err) {
111
+ throw new SFError_1.SFError({
112
+ type: "CFAV1_READ",
113
+ customMessage: "There was an error getting flow operator data",
114
+ errorObject: err,
115
+ });
116
+ }
117
+ };
118
+ /**
119
+ * Get flow operator data using the flowOperatorId.
120
+ * @param superToken the superToken of the agreement
121
+ * @param flowOperatorId The keccak256 hash of encoded string "flowOperator", sender and flowOperator
122
+ * @param providerOrSigner a provider or signer object
123
+ * @returns {Promise<IWeb3FlowOperatorData>} Web3 Flow info object
124
+ */
125
+ this.getFlowOperatorDataByID = async (params) => {
126
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
127
+ try {
128
+ const flowOperatorData = await this.contract
129
+ .connect(params.providerOrSigner)
130
+ .getFlowOperatorDataByID(normalizedToken, params.flowOperatorId);
131
+ return this._sanitizeFlowOperatorData({
132
+ ...flowOperatorData,
133
+ flowOperatorId: params.flowOperatorId,
134
+ });
135
+ }
136
+ catch (err) {
137
+ throw new SFError_1.SFError({
138
+ type: "CFAV1_READ",
139
+ customMessage: "There was an error getting flow operator data",
140
+ errorObject: err,
141
+ });
142
+ }
143
+ };
144
+ /** ### CFA Write Functions ### */
145
+ /**
146
+ * Create a flow.
95
147
  * @param flowRate The specified flow rate.
96
148
  * @param receiver The receiver of the flow.
97
149
  * @param superToken The token to be flowed.
@@ -99,19 +151,19 @@ class ConstantFlowAgreementV1 {
99
151
  * @param overrides ethers overrides object for more control over the transaction sent.
100
152
  * @returns {Operation} An instance of Operation which can be executed or batched.
101
153
  */
102
- this.createFlow = ({ flowRate, receiver, superToken, userData, overrides, }) => {
103
- const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
104
- const normalizedReceiver = (0, utils_1.normalizeAddress)(receiver);
154
+ this.createFlow = (params) => {
155
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
156
+ const normalizedReceiver = (0, utils_1.normalizeAddress)(params.receiver);
105
157
  const callData = cfaInterface.encodeFunctionData("createFlow", [
106
158
  normalizedToken,
107
159
  normalizedReceiver,
108
- flowRate,
160
+ params.flowRate,
109
161
  "0x",
110
162
  ]);
111
- return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, userData, overrides);
163
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
112
164
  };
113
165
  /**
114
- * @dev Update a flow.
166
+ * Update a flow.
115
167
  * @param flowRate The specified flow rate.
116
168
  * @param receiver The receiver of the flow.
117
169
  * @param superToken The token to be flowed.
@@ -119,19 +171,19 @@ class ConstantFlowAgreementV1 {
119
171
  * @param overrides ethers overrides object for more control over the transaction sent.
120
172
  * @returns {Operation} An instance of Operation which can be executed or batched.
121
173
  */
122
- this.updateFlow = ({ flowRate, receiver, superToken, userData, overrides, }) => {
123
- const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
124
- const normalizedReceiver = (0, utils_1.normalizeAddress)(receiver);
174
+ this.updateFlow = (params) => {
175
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
176
+ const normalizedReceiver = (0, utils_1.normalizeAddress)(params.receiver);
125
177
  const callData = cfaInterface.encodeFunctionData("updateFlow", [
126
178
  normalizedToken,
127
179
  normalizedReceiver,
128
- flowRate,
180
+ params.flowRate,
129
181
  "0x",
130
182
  ]);
131
- return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, userData, overrides);
183
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
132
184
  };
133
185
  /**
134
- * @dev Delete a flow.
186
+ * Delete a flow.
135
187
  * @param superToken The token to be flowed.
136
188
  * @param sender The sender of the flow.
137
189
  * @param receiver The receiver of the flow.
@@ -139,39 +191,175 @@ class ConstantFlowAgreementV1 {
139
191
  * @param overrides ethers overrides object for more control over the transaction sent.
140
192
  * @returns {Operation} An instance of Operation which can be executed or batched.
141
193
  */
142
- this.deleteFlow = ({ superToken, sender, receiver, userData, overrides, }) => {
143
- const normalizedToken = (0, utils_1.normalizeAddress)(superToken);
144
- const normalizedSender = (0, utils_1.normalizeAddress)(sender);
145
- const normalizedReceiver = (0, utils_1.normalizeAddress)(receiver);
194
+ this.deleteFlow = (params) => {
195
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
196
+ const normalizedSender = (0, utils_1.normalizeAddress)(params.sender);
197
+ const normalizedReceiver = (0, utils_1.normalizeAddress)(params.receiver);
146
198
  const callData = cfaInterface.encodeFunctionData("deleteFlow", [
147
199
  normalizedToken,
148
200
  normalizedSender,
149
201
  normalizedReceiver,
150
202
  "0x",
151
203
  ]);
152
- return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, userData, overrides);
204
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
153
205
  };
154
206
  /**
155
- * @dev Sanitizes flow info, converting BigNumber to string.
207
+ * Create a flow as an operator
208
+ * @param flowRate The specified flow rate.
209
+ * @param sender The sender of the flow.
210
+ * @param receiver The receiver of the flow.
211
+ * @param superToken The token to be flowed.
212
+ * @param userData Extra user data provided.
213
+ * @param overrides ethers overrides object for more control over the transaction sent.
214
+ * @returns {Operation} An instance of Operation which can be executed or batched.
215
+ */
216
+ this.createFlowByOperator = (params) => {
217
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
218
+ const normalizedReceiver = (0, utils_1.normalizeAddress)(params.receiver);
219
+ const normalizedSender = (0, utils_1.normalizeAddress)(params.sender);
220
+ const callData = cfaInterface.encodeFunctionData("createFlowByOperator", [
221
+ normalizedToken,
222
+ normalizedSender,
223
+ normalizedReceiver,
224
+ params.flowRate,
225
+ "0x",
226
+ ]);
227
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
228
+ };
229
+ /**
230
+ * Update a flow as an operator.
231
+ * @param flowRate The specified flow rate.
232
+ * @param sender The sender of the flow.
233
+ * @param receiver The receiver of the flow.
234
+ * @param superToken The token to be flowed.
235
+ * @param userData Extra user data provided.
236
+ * @param overrides ethers overrides object for more control over the transaction sent.
237
+ * @returns {Operation} An instance of Operation which can be executed or batched.
238
+ */
239
+ this.updateFlowByOperator = (params) => {
240
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
241
+ const normalizedSender = (0, utils_1.normalizeAddress)(params.sender);
242
+ const normalizedReceiver = (0, utils_1.normalizeAddress)(params.receiver);
243
+ const callData = cfaInterface.encodeFunctionData("updateFlowByOperator", [
244
+ normalizedToken,
245
+ normalizedSender,
246
+ normalizedReceiver,
247
+ params.flowRate,
248
+ "0x",
249
+ ]);
250
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
251
+ };
252
+ /**
253
+ * Delete a flow as an operator.
254
+ * @param sender The sender of the flow.
255
+ * @param receiver The receiver of the flow.
256
+ * @param superToken The token to be flowed.
257
+ * @param userData Extra user data provided.
258
+ * @param overrides ethers overrides object for more control over the transaction sent.
259
+ * @returns {Operation} An instance of Operation which can be executed or batched.
260
+ */
261
+ this.deleteFlowByOperator = (params) => {
262
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
263
+ const normalizedSender = (0, utils_1.normalizeAddress)(params.sender);
264
+ const normalizedReceiver = (0, utils_1.normalizeAddress)(params.receiver);
265
+ const callData = cfaInterface.encodeFunctionData("deleteFlowByOperator", [normalizedToken, normalizedSender, normalizedReceiver, "0x"]);
266
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
267
+ };
268
+ /** ### Private Functions ### */
269
+ /**
270
+ * Sanitizes flow info, converting BigNumber to string.
156
271
  * @param timestamp last updated timestamp of flow
157
272
  * @param flowRate the current flow rate
158
273
  * @param deposit the deposit amount
159
274
  * @param owedDeposit any owed depsit
160
275
  * @returns {IWeb3FlowInfo} sanitized web3 flow info
161
276
  */
162
- this._sanitizeflowInfo = ({ timestamp, flowRate, deposit, owedDeposit, }) => {
277
+ this._sanitizeFlowInfo = (params) => {
163
278
  return {
164
- timestamp: (0, utils_1.getSanitizedTimestamp)(timestamp),
165
- flowRate: flowRate.toString(),
166
- deposit: deposit.toString(),
167
- owedDeposit: owedDeposit.toString(),
279
+ timestamp: (0, utils_1.getSanitizedTimestamp)(params.timestamp),
280
+ flowRate: params.flowRate.toString(),
281
+ deposit: params.deposit.toString(),
282
+ owedDeposit: params.owedDeposit.toString(),
283
+ };
284
+ };
285
+ /**
286
+ * Sanitizes flow operator data, converting BigNumber to string.
287
+ * @param flowOperatorId The keccak256 hash of encoded string "flowOperator", sender and flowOperator
288
+ * @param permissions the permissions
289
+ * @param flowRateAllowance the flow rate allowance granted to the flow operator
290
+ * @returns {IWeb3FlowOperatorData} sanitized web3 flow info
291
+ */
292
+ this._sanitizeFlowOperatorData = (params) => {
293
+ return {
294
+ flowOperatorId: params.flowOperatorId,
295
+ permissions: params.permissions.toString(),
296
+ flowRateAllowance: params.flowRateAllowance.toString(),
168
297
  };
169
298
  };
170
299
  this.options = options;
171
300
  this.host = new Host_1.default(options.config.hostAddress);
301
+ this.contract = new ethers_1.ethers.Contract(this.options.config.cfaV1Address, IConstantFlowAgreementV1_json_1.default.abi);
302
+ }
303
+ /** ### CFA ACL Write Functions (byOperator) ### */
304
+ /**
305
+ * Update permissions for a flow operator as a sender.
306
+ * @param superToken The token to be flowed.
307
+ * @param flowOperator The permission grantee address
308
+ * @param permission The permissions to set.
309
+ * @param flowRateAllowance The flowRateAllowance granted to the flow operator.
310
+ * @param userData Extra user data provided.
311
+ * @param overrides ethers overrides object for more control over the transaction sent.
312
+ * @returns {Operation} An instance of Operation which can be executed or batched.
313
+ */
314
+ updateFlowOperatorPermissions(params) {
315
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
316
+ const normalizedFlowOperator = (0, utils_1.normalizeAddress)(params.flowOperator);
317
+ if (!(0, utils_1.isPermissionsClean)(params.permissions)) {
318
+ throw new SFError_1.SFError({
319
+ type: "UNCLEAN_PERMISSIONS",
320
+ customMessage: "The desired permissions are unclean",
321
+ });
322
+ }
323
+ if (Number(params.flowRateAllowance) < 0) {
324
+ throw new SFError_1.SFError({
325
+ type: "NEGATIVE_FLOW_ALLOWANCE",
326
+ customMessage: "No negative flow allowance allowed",
327
+ });
328
+ }
329
+ const callData = cfaInterface.encodeFunctionData("updateFlowOperatorPermissions", [
330
+ normalizedToken,
331
+ normalizedFlowOperator,
332
+ params.permissions,
333
+ params.flowRateAllowance,
334
+ "0x",
335
+ ]);
336
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
337
+ }
338
+ /**
339
+ * Give flow operator full control - max flow rate and create/update/delete permissions.
340
+ * @param superToken The token to be flowed.
341
+ * @param flowOperator The permission grantee address
342
+ * @param userData Extra user data provided.
343
+ * @param overrides ethers overrides object for more control over the transaction sent.
344
+ */
345
+ authorizeFlowOperatorWithFullControl(params) {
346
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
347
+ const normalizedFlowOperator = (0, utils_1.normalizeAddress)(params.flowOperator);
348
+ const callData = cfaInterface.encodeFunctionData("authorizeFlowOperatorWithFullControl", [normalizedToken, normalizedFlowOperator, "0x"]);
349
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
172
350
  }
173
- get cfaContract() {
174
- return new ethers_1.ethers.Contract(this.options.config.cfaV1Address, IConstantFlowAgreementV1_json_1.default.abi);
351
+ /**
352
+ * Revoke flow operator control - set flow rate to 0 with no permissions.
353
+ * @param superToken The token to be flowed.
354
+ * @param flowOperator The permission grantee address
355
+ * @param userData Extra user data provided.
356
+ * @param overrides ethers overrides object for more control over the transaction sent.
357
+ */
358
+ revokeFlowOperatorWithFullControl(params) {
359
+ const normalizedToken = (0, utils_1.normalizeAddress)(params.superToken);
360
+ const normalizedFlowOperator = (0, utils_1.normalizeAddress)(params.flowOperator);
361
+ const callData = cfaInterface.encodeFunctionData("revokeFlowOperatorWithFullControl", [normalizedToken, normalizedFlowOperator, "0x"]);
362
+ return this.host.populateCallAgreementTxnAndReturnOperation(this.options.config.cfaV1Address, callData, params.userData, params.overrides);
175
363
  }
176
364
  }
177
365
  exports.default = ConstantFlowAgreementV1;
@@ -1 +1 @@
1
- {"version":3,"file":"ConstantFlowAgreementV1.js","sourceRoot":"","sources":["../../src/ConstantFlowAgreementV1.ts"],"names":[],"mappings":";;;;;AAAA,mCAAgC;AAEhC,kDAA0B;AAE1B,uCAAoC;AACpC,wGAA8E;AAY9E,mCAAkE;AAElE,MAAM,YAAY,GAAG,IAAI,eAAM,CAAC,KAAK,CAAC,SAAS,CAC3C,uCAA2B,CAAC,GAAG,CAClC,CAAC;AAEF;;;GAGG;AACH,MAAqB,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,IAAA,wBAAgB,EAAC,UAAU,CAAC,CAAC;YACrD,MAAM,gBAAgB,GAAG,IAAA,wBAAgB,EAAC,MAAM,CAAC,CAAC;YAClD,MAAM,kBAAkB,GAAG,IAAA,wBAAgB,EAAC,QAAQ,CAAC,CAAC;YACtD,IAAI;gBACA,MAAM,QAAQ,GAAG,MAAM,IAAI,CAAC,WAAW;qBAClC,OAAO,CAAC,gBAAgB,CAAC;qBACzB,OAAO,CAAC,eAAe,EAAE,gBAAgB,EAAE,kBAAkB,CAAC,CAAC;gBACpE,OAAO,IAAI,CAAC,iBAAiB,CAAC,QAAQ,CAAC,CAAC;aAC3C;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,iBAAO,CAAC;oBACd,IAAI,EAAE,YAAY;oBAClB,aAAa,EAAE,qCAAqC;oBACpD,WAAW,EAAE,GAAG;iBACnB,CAAC,CAAC;aACN;QACL,CAAC,CAAC;QAEF;;;;;;WAMG;QACH,uBAAkB,GAAG,KAAK,EAAE,EACxB,UAAU,EACV,OAAO,EACP,gBAAgB,GACQ,EAA0B,EAAE;YACpD,MAAM,eAAe,GAAG,IAAA,w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ation from "./Operation";
3
3
  import { IBaseSuperTokenParams, ITransferFromParams } from "./interfaces";
4
- export default class Token {
4
+ import { ERC20WithTokenInfo } from "./typechain/ERC20WithTokenInfo";
5
+ export default class ERC20Token {
5
6
  readonly address: string;
7
+ readonly contract: ERC20WithTokenInfo;
6
8
  constructor(address: string);
7
- private get tokenContract();
9
+ /** ### ERC20 Token Contract Read Functions ### */
8
10
  /**
9
- * @dev Returns the allowance the `owner` has granted the `spender`.
11
+ * Returns the allowance the `owner` has granted the `spender`.
10
12
  * @param owner the owner who has allotted the allowance
11
13
  * @param spender the spender who has received the allowance
12
14
  * @param providerOrSigner a provider or signer for executing a web3 call
@@ -18,7 +20,7 @@ export default class Token {
18
20
  providerOrSigner: ethers.providers.Provider | ethers.Signer;
19
21
  }) => Promise<string>;
20
22
  /**
21
- * @dev Returns the ERC20 balanceOf the `account`, this can't be negative and will just display 0.
23
+ * Returns the ERC20 balanceOf the `account`, this can't be negative and will just display 0.
22
24
  * @param account the account you would like to query
23
25
  * @param providerOrSigner a provider or signer for executing a web3 call
24
26
  * @returns {Promise<string>} the token balance of `account`
@@ -28,7 +30,7 @@ export default class Token {
28
30
  providerOrSigner: ethers.providers.Provider | ethers.Signer;
29
31
  }) => Promise<string>;
30
32
  /**
31
- * @dev Returns the token name
33
+ * Returns the token name
32
34
  * @param providerOrSigner a provider or signer for executing a web3 call
33
35
  * @returns {string} the token name
34
36
  */
@@ -36,7 +38,7 @@ export default class Token {
36
38
  providerOrSigner: ethers.providers.Provider | ethers.Signer;
37
39
  }) => Promise<string>;
38
40
  /**
39
- * @dev Returns the token symbol
41
+ * Returns the token symbol
40
42
  * @param providerOrSigner a provider or signer for executing a web3 call
41
43
  * @returns {string} the token symbol
42
44
  */
@@ -44,37 +46,38 @@ export default class Token {
44
46
  providerOrSigner: ethers.providers.Provider | ethers.Signer;
45
47
  }) => Promise<string>;
46
48
  /**
47
- * @dev Returns the total supply of the token.
49
+ * Returns the total supply of the token.
48
50
  * @param providerOrSigner a provider or signer for executing a web3 call
49
51
  * @returns {Promise<string>} the total supply of the token
50
52
  */
51
53
  totalSupply: ({ providerOrSigner, }: {
52
54
  providerOrSigner: ethers.providers.Provider | ethers.Signer;
53
55
  }) => Promise<string>;
56
+ /** ### ERC20 Token Contract Write Functions ### */
54
57
  /**
55
- * @dev Approve `receiver` to spend `amount` tokens.
58
+ * Approve `receiver` to spend `amount` tokens.
56
59
  * @param receiver The receiver approved.
57
60
  * @param amount The amount approved.
58
61
  * @param overrides ethers overrides object for more control over the transaction sent.
59
62
  * @returns {Operation} An instance of Operation which can be executed or batched.
60
63
  */
61
- approve: ({ receiver, amount, overrides, }: IBaseSuperTokenParams) => Operation;
64
+ approve: (params: IBaseSuperTokenParams) => Operation;
62
65
  /**
63
- * @dev Transfer `receiver` `amount` tokens.
66
+ * Transfer `receiver` `amount` tokens.
64
67
  * @param receiver The receiver of the transfer.
65
68
  * @param amount The amount to be transferred.
66
69
  * @param overrides ethers overrides object for more control over the transaction sent.
67
70
  * @returns {Operation} An instance of Operation which can be executed or batched.
68
71
  */
69
- transfer: ({ receiver, amount, overrides, }: IBaseSuperTokenParams) => Operation;
72
+ transfer: (params: IBaseSuperTokenParams) => Operation;
70
73
  /**
71
- * @dev Transfer from `sender` to `receiver` `amount` tokens.
74
+ * Transfer from `sender` to `receiver` `amount` tokens.
72
75
  * @param sender The sender of the transfer.
73
76
  * @param receiver The receiver of the transfer.
74
77
  * @param amount The amount to be transferred.
75
78
  * @param overrides ethers overrides object for more control over the transaction sent.
76
79
  * @returns {Operation} An instance of Operation which can be executed or batched.
77
80
  */
78
- transferFrom: ({ sender, receiver, amount, overrides, }: ITransferFromParams) => Operation;
81
+ transferFrom: (params: ITransferFromParams) => Operation;
79
82
  }
80
- //# sourceMappingURL=Token.d.ts.map
83
+ //# sourceMappingURL=ERC20Token.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ERC20Token.d.ts","sourceRoot":"","sources":["../../src/ERC20Token.ts"],"names":[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