@superfluid-finance/sdk-core 0.5.4 → 0.5.6-dev.32db5c3.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 (129) hide show
  1. package/CHANGELOG.md +15 -1
  2. package/dist/index.umd.js +794 -2727
  3. package/dist/main/BatchCall.d.ts.map +1 -1
  4. package/dist/main/BatchCall.js +8 -26
  5. package/dist/main/BatchCall.js.map +1 -1
  6. package/dist/main/ConstantFlowAgreementV1.d.ts +1 -1
  7. package/dist/main/ConstantFlowAgreementV1.js +1 -1
  8. package/dist/main/Governance.js +2 -2
  9. package/dist/main/InstantDistributionAgreementV1.d.ts +3 -3
  10. package/dist/main/InstantDistributionAgreementV1.js +3 -3
  11. package/dist/main/Operation.d.ts +3 -3
  12. package/dist/main/Operation.d.ts.map +1 -1
  13. package/dist/main/Operation.js +10 -39
  14. package/dist/main/Operation.js.map +1 -1
  15. package/dist/main/SFError.d.ts +1 -1
  16. package/dist/main/SFError.d.ts.map +1 -1
  17. package/dist/main/SFError.js +12 -18
  18. package/dist/main/SFError.js.map +1 -1
  19. package/dist/main/abi/Superfluid.json +13 -18
  20. package/dist/main/abi/SuperfluidGovernanceII.json +135 -17
  21. package/dist/main/constants.d.ts +0 -30
  22. package/dist/main/constants.d.ts.map +1 -1
  23. package/dist/main/constants.js +21 -191
  24. package/dist/main/constants.js.map +1 -1
  25. package/dist/main/defaultSubgraphReleaseTag.json +1 -1
  26. package/dist/main/interfaces.d.ts +1 -0
  27. package/dist/main/interfaces.d.ts.map +1 -1
  28. package/dist/main/miniSerializeError.d.ts +14 -0
  29. package/dist/main/miniSerializeError.d.ts.map +1 -0
  30. package/dist/main/miniSerializeError.js +29 -0
  31. package/dist/main/miniSerializeError.js.map +1 -0
  32. package/dist/main/subgraph/entities/token/tokens.generated.d.ts +1 -0
  33. package/dist/main/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
  34. package/dist/main/subgraph/entities/token/tokens.generated.js +1 -1
  35. package/dist/main/subgraph/entities/token/tokens.generated.js.map +1 -1
  36. package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.d.ts +1 -0
  37. package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.d.ts.map +1 -1
  38. package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.js +1 -1
  39. package/dist/main/subgraph/queries/getAccountTokenSnapshots.generated.js.map +1 -1
  40. package/dist/main/subgraph/queries/getIndexSubscriptions.generated.d.ts +1 -0
  41. package/dist/main/subgraph/queries/getIndexSubscriptions.generated.d.ts.map +1 -1
  42. package/dist/main/subgraph/queries/getIndexSubscriptions.generated.js +1 -1
  43. package/dist/main/subgraph/queries/getIndexSubscriptions.generated.js.map +1 -1
  44. package/dist/main/subgraph/queries/getIndexes.generated.d.ts +1 -0
  45. package/dist/main/subgraph/queries/getIndexes.generated.d.ts.map +1 -1
  46. package/dist/main/subgraph/queries/getIndexes.generated.js +1 -1
  47. package/dist/main/subgraph/queries/getIndexes.generated.js.map +1 -1
  48. package/dist/main/subgraph/queries/getStreams.generated.d.ts +1 -0
  49. package/dist/main/subgraph/queries/getStreams.generated.d.ts.map +1 -1
  50. package/dist/main/subgraph/queries/getStreams.generated.js +1 -1
  51. package/dist/main/subgraph/queries/getStreams.generated.js.map +1 -1
  52. package/dist/main/subgraph/queries/getTokens.generated.d.ts +1 -0
  53. package/dist/main/subgraph/queries/getTokens.generated.d.ts.map +1 -1
  54. package/dist/main/subgraph/queries/getTokens.generated.js +1 -1
  55. package/dist/main/subgraph/queries/getTokens.generated.js.map +1 -1
  56. package/dist/main/typechain/Superfluid.d.ts +45 -49
  57. package/dist/main/typechain/Superfluid.d.ts.map +1 -1
  58. package/dist/main/typechain/SuperfluidGovernanceII.d.ts +104 -21
  59. package/dist/main/typechain/SuperfluidGovernanceII.d.ts.map +1 -1
  60. package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.d.ts.map +1 -1
  61. package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.js +135 -17
  62. package/dist/main/typechain/factories/SuperfluidGovernanceII__factory.js.map +1 -1
  63. package/dist/main/typechain/factories/Superfluid__factory.d.ts.map +1 -1
  64. package/dist/main/typechain/factories/Superfluid__factory.js +13 -18
  65. package/dist/main/typechain/factories/Superfluid__factory.js.map +1 -1
  66. package/dist/module/BatchCall.d.ts.map +1 -1
  67. package/dist/module/BatchCall.js +8 -26
  68. package/dist/module/BatchCall.js.map +1 -1
  69. package/dist/module/ConstantFlowAgreementV1.d.ts +1 -1
  70. package/dist/module/ConstantFlowAgreementV1.js +1 -1
  71. package/dist/module/Governance.js +2 -2
  72. package/dist/module/InstantDistributionAgreementV1.d.ts +3 -3
  73. package/dist/module/InstantDistributionAgreementV1.js +3 -3
  74. package/dist/module/Operation.d.ts +3 -3
  75. package/dist/module/Operation.d.ts.map +1 -1
  76. package/dist/module/Operation.js +10 -39
  77. package/dist/module/Operation.js.map +1 -1
  78. package/dist/module/SFError.d.ts +1 -1
  79. package/dist/module/SFError.d.ts.map +1 -1
  80. package/dist/module/SFError.js +12 -18
  81. package/dist/module/SFError.js.map +1 -1
  82. package/dist/module/abi/Superfluid.json +13 -18
  83. package/dist/module/abi/SuperfluidGovernanceII.json +135 -17
  84. package/dist/module/constants.d.ts +0 -30
  85. package/dist/module/constants.d.ts.map +1 -1
  86. package/dist/module/constants.js +20 -190
  87. package/dist/module/constants.js.map +1 -1
  88. package/dist/module/defaultSubgraphReleaseTag.json +1 -1
  89. package/dist/module/interfaces.d.ts +1 -0
  90. package/dist/module/interfaces.d.ts.map +1 -1
  91. package/dist/module/miniSerializeError.d.ts +14 -0
  92. package/dist/module/miniSerializeError.d.ts.map +1 -0
  93. package/dist/module/miniSerializeError.js +25 -0
  94. package/dist/module/miniSerializeError.js.map +1 -0
  95. package/dist/module/subgraph/entities/token/tokens.generated.d.ts +1 -0
  96. package/dist/module/subgraph/entities/token/tokens.generated.d.ts.map +1 -1
  97. package/dist/module/subgraph/entities/token/tokens.generated.js +1 -1
  98. package/dist/module/subgraph/entities/token/tokens.generated.js.map +1 -1
  99. package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.d.ts +1 -0
  100. package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.d.ts.map +1 -1
  101. package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.js +1 -1
  102. package/dist/module/subgraph/queries/getAccountTokenSnapshots.generated.js.map +1 -1
  103. package/dist/module/subgraph/queries/getIndexSubscriptions.generated.d.ts +1 -0
  104. package/dist/module/subgraph/queries/getIndexSubscriptions.generated.d.ts.map +1 -1
  105. package/dist/module/subgraph/queries/getIndexSubscriptions.generated.js +1 -1
  106. package/dist/module/subgraph/queries/getIndexSubscriptions.generated.js.map +1 -1
  107. package/dist/module/subgraph/queries/getIndexes.generated.d.ts +1 -0
  108. package/dist/module/subgraph/queries/getIndexes.generated.d.ts.map +1 -1
  109. package/dist/module/subgraph/queries/getIndexes.generated.js +1 -1
  110. package/dist/module/subgraph/queries/getIndexes.generated.js.map +1 -1
  111. package/dist/module/subgraph/queries/getStreams.generated.d.ts +1 -0
  112. package/dist/module/subgraph/queries/getStreams.generated.d.ts.map +1 -1
  113. package/dist/module/subgraph/queries/getStreams.generated.js +1 -1
  114. package/dist/module/subgraph/queries/getStreams.generated.js.map +1 -1
  115. package/dist/module/subgraph/queries/getTokens.generated.d.ts +1 -0
  116. package/dist/module/subgraph/queries/getTokens.generated.d.ts.map +1 -1
  117. package/dist/module/subgraph/queries/getTokens.generated.js +1 -1
  118. package/dist/module/subgraph/queries/getTokens.generated.js.map +1 -1
  119. package/dist/module/typechain/Superfluid.d.ts +45 -49
  120. package/dist/module/typechain/Superfluid.d.ts.map +1 -1
  121. package/dist/module/typechain/SuperfluidGovernanceII.d.ts +104 -21
  122. package/dist/module/typechain/SuperfluidGovernanceII.d.ts.map +1 -1
  123. package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.d.ts.map +1 -1
  124. package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.js +135 -17
  125. package/dist/module/typechain/factories/SuperfluidGovernanceII__factory.js.map +1 -1
  126. package/dist/module/typechain/factories/Superfluid__factory.d.ts.map +1 -1
  127. package/dist/module/typechain/factories/Superfluid__factory.js +13 -18
  128. package/dist/module/typechain/factories/Superfluid__factory.js.map +1 -1
  129. package/package.json +3 -3
@@ -168,7 +168,7 @@ export default class InstantDistributionAgreementV1 {
168
168
  return this.host.callAgreement(this.options.config.idaV1Address, callData, params.userData, params.overrides);
169
169
  };
170
170
  /**
171
- * Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher distributres.
171
+ * Revokes a Subscription, so the Subscriber will need to claim tokens when the Publisher distributes.
172
172
  * @param indexId The id of the index.
173
173
  * @param superToken The superToken of the index.
174
174
  * @param subscriber The subscriber address whose subscription you want to revoke.
@@ -192,7 +192,7 @@ export default class InstantDistributionAgreementV1 {
192
192
  * @param indexId The id of the index.
193
193
  * @param superToken The superToken of the index.
194
194
  * @param subscriber The subscriber address whose subscription you want to delete.
195
- * @param publisher The publisher address of the index you are targetting.
195
+ * @param publisher The publisher address of the index you are targeting.
196
196
  * @param userData Extra user data provided.
197
197
  * @param overrides ethers overrides object for more control over the transaction sent.
198
198
  * @returns {Operation} An instance of Operation which can be executed or batched.
@@ -215,7 +215,7 @@ export default class InstantDistributionAgreementV1 {
215
215
  * @param indexId The id of the index.
216
216
  * @param superToken The superToken of the index.
217
217
  * @param subscriber The subscriber address whose subscription you want to delete.
218
- * @param publisher The publisher address of the index you are targetting.
218
+ * @param publisher The publisher address of the index you are targeting.
219
219
  * @param userData Extra user data provided.
220
220
  * @param overrides ethers overrides object for more control over the transaction sent.
221
221
  * @returns {Operation} An instance of Operation which can be executed or batched.
@@ -12,7 +12,7 @@ export default class Operation {
12
12
  /**
13
13
  * Executes the operation via the provided signer.
14
14
  * @description Populates all fields of the transaction, signs it and sends it to the network.
15
- * @param signer The signer of the transacation
15
+ * @param signer The signer of the transaction
16
16
  * @returns {ethers.providers.TransactionResponse} A TransactionResponse object which can be awaited
17
17
  */
18
18
  exec: (signer: ethers.Signer) => Promise<ethers.providers.TransactionResponse>;
@@ -24,14 +24,14 @@ export default class Operation {
24
24
  getPopulatedTransactionRequest: (signer: ethers.Signer) => Promise<TransactionRequest>;
25
25
  /**
26
26
  * Signs the populated transaction via the provided signer (what you intend on sending to the network).
27
- * @param signer The signer of the transacation
27
+ * @param signer The signer of the transaction
28
28
  * @returns {Promise<string>} Fully serialized, signed transaction
29
29
  */
30
30
  getSignedTransaction: (signer: ethers.Signer) => Promise<string>;
31
31
  /**
32
32
  * Gets the transaction hash of the transaction.
33
33
  * @description Calculates this by getting the keccak256 hash of the signedTxn.
34
- * @param signer The signer of the transacation
34
+ * @param signer The signer of the transaction
35
35
  * @returns {Promise<string>} The transaction hash of the transaction
36
36
  */
37
37
  getTransactionHash: (signer: ethers.Signer) => Promise<string>;
@@ -1 +1 @@
1
- {"version":3,"file":"Operation.d.ts","sourceRoot":"","sources":["../../src/Operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAIhC,oBAAY,aAAa,GACnB,aAAa,GACb,eAAe,GACf,qBAAqB,GACrB,oBAAoB,GACpB,sBAAsB,GACtB,2BAA2B,GAC3B,iBAAiB,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAC1E,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;gBAGzB,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC,EACzC,IAAI,EAAE,aAAa;IAMvB;;;;;OAKG;IACH,IAAI,WACQ,OAAO,MAAM,KACtB,QAAQ,OAAO,SAAS,CAAC,mBAAmB,CAAC,CAY9C;IAEF;;;;OAIG;IACH,8BAA8B,WAClB,OAAO,MAAM,KACtB,QAAQ,kBAAkB,CAAC,CAY5B;IACF;;;;OAIG;IACH,oBAAoB,WAAkB,OAAO,MAAM,KAAG,QAAQ,MAAM,CAAC,CAenE;IAEF;;;;;OAKG;IACH,kBAAkB,WAAkB,OAAO,MAAM,KAAG,QAAQ,MAAM,CAAC,CAGjE;CACL"}
1
+ {"version":3,"file":"Operation.d.ts","sourceRoot":"","sources":["../../src/Operation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,kCAAkC,CAAC;AACtE,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,oBAAY,aAAa,GACnB,aAAa,GACb,eAAe,GACf,qBAAqB,GACrB,oBAAoB,GACpB,sBAAsB,GACtB,2BAA2B,GAC3B,iBAAiB,CAAC;AAExB;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IAC1B,QAAQ,CAAC,0BAA0B,EAAE,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;IAC1E,QAAQ,CAAC,IAAI,EAAE,aAAa,CAAC;gBAGzB,GAAG,EAAE,OAAO,CAAC,MAAM,CAAC,oBAAoB,CAAC,EACzC,IAAI,EAAE,aAAa;IAMvB;;;;;OAKG;IACH,IAAI,WACQ,OAAO,MAAM,KACtB,QAAQ,OAAO,SAAS,CAAC,mBAAmB,CAAC,CAK9C;IAEF;;;;OAIG;IACH,8BAA8B,WAClB,OAAO,MAAM,KACtB,QAAQ,kBAAkB,CAAC,CAG5B;IACF;;;;OAIG;IACH,oBAAoB,WAAkB,OAAO,MAAM,KAAG,QAAQ,MAAM,CAAC,CAMnE;IAEF;;;;;OAKG;IACH,kBAAkB,WAAkB,OAAO,MAAM,KAAG,QAAQ,MAAM,CAAC,CAGjE;CACL"}
@@ -1,5 +1,4 @@
1
1
  import { ethers } from "ethers";
2
- import { SFError } from "./SFError";
3
2
  /**
4
3
  * Operation Helper Class
5
4
  * @description A helper class to create `Operation` objects which can be executed or batched.
@@ -9,21 +8,12 @@ export default class Operation {
9
8
  /**
10
9
  * Executes the operation via the provided signer.
11
10
  * @description Populates all fields of the transaction, signs it and sends it to the network.
12
- * @param signer The signer of the transacation
11
+ * @param signer The signer of the transaction
13
12
  * @returns {ethers.providers.TransactionResponse} A TransactionResponse object which can be awaited
14
13
  */
15
14
  this.exec = async (signer) => {
16
- try {
17
- const populatedTransaction = await this.getPopulatedTransactionRequest(signer);
18
- return await signer.sendTransaction(populatedTransaction);
19
- }
20
- catch (err) {
21
- throw new SFError({
22
- type: "EXECUTE_TRANSACTION",
23
- message: "There was an error executing the transaction",
24
- cause: err,
25
- });
26
- }
15
+ const populatedTransaction = await this.getPopulatedTransactionRequest(signer);
16
+ return await signer.sendTransaction(populatedTransaction);
27
17
  };
28
18
  /**
29
19
  * Get the populated transaction by awaiting `populateTransactionPromise`.
@@ -31,42 +21,23 @@ export default class Operation {
31
21
  * @returns {Promise<TransactionRequest>}
32
22
  */
33
23
  this.getPopulatedTransactionRequest = async (signer) => {
34
- try {
35
- const prePopulated = await this.populateTransactionPromise;
36
- return await signer.populateTransaction(prePopulated);
37
- }
38
- catch (err) {
39
- /* istanbul ignore next */
40
- throw new SFError({
41
- type: "POPULATE_TRANSACTION",
42
- message: "There was an error populating the transaction",
43
- cause: err,
44
- });
45
- }
24
+ const prePopulated = await this.populateTransactionPromise;
25
+ return await signer.populateTransaction(prePopulated);
46
26
  };
47
27
  /**
48
28
  * Signs the populated transaction via the provided signer (what you intend on sending to the network).
49
- * @param signer The signer of the transacation
29
+ * @param signer The signer of the transaction
50
30
  * @returns {Promise<string>} Fully serialized, signed transaction
51
31
  */
52
32
  this.getSignedTransaction = async (signer) => {
53
- try {
54
- const populatedTransaction = await this.getPopulatedTransactionRequest(signer);
55
- const signedTxn = await signer.signTransaction(populatedTransaction);
56
- return signedTxn;
57
- }
58
- catch (err) {
59
- throw new SFError({
60
- type: "SIGN_TRANSACTION",
61
- message: "There was an error signing the transaction",
62
- cause: err,
63
- });
64
- }
33
+ const populatedTransaction = await this.getPopulatedTransactionRequest(signer);
34
+ const signedTxn = await signer.signTransaction(populatedTransaction);
35
+ return signedTxn;
65
36
  };
66
37
  /**
67
38
  * Gets the transaction hash of the transaction.
68
39
  * @description Calculates this by getting the keccak256 hash of the signedTxn.
69
- * @param signer The signer of the transacation
40
+ * @param signer The signer of the transaction
70
41
  * @returns {Promise<string>} The transaction hash of the transaction
71
42
  */
72
43
  this.getTransactionHash = async (signer) => {
@@ -1 +1 @@
1
- {"version":3,"file":"Operation.js","sourceRoot":"","sources":["../../src/Operation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAWpC;;;GAGG;AACH,MAAM,CAAC,OAAO,OAAO,SAAS;IAI1B,YACI,GAAyC,EACzC,IAAmB;QAMvB;;;;;WAKG;QACH,SAAI,GAAG,KAAK,EACR,MAAqB,EACwB,EAAE;YAC/C,IAAI;gBACA,MAAM,oBAAoB,GACtB,MAAM,IAAI,CAAC,8BAA8B,CAAC,MAAM,CAAC,CAAC;gBACtD,OAAO,MAAM,MAAM,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC;aAC7D;YAAC,OAAO,GAAG,EAAE;gBACV,MAAM,IAAI,OAAO,CAAC;oBACd,IAAI,EAAE,qBAAqB;oBAC3B,OAAO,EAAE,8CAA8C;oBACvD,KAAK,EAAE,GAAG;iBACb,CAAC,CAAC;aACN;QACL,CAAC,CAAC;QAEF;;;;WAIG;QACH,mCAA8B,GAAG,KAAK,EAClC,MAAqB,EACM,EAAE;YAC7B,IAAI;gBACA,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC;gBAC3D,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;aACzD;YAAC,OAAO,GAAG,EAAE;gBACV,0BAA0B;gBAC1B,MAAM,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CAClE,MAAM,CACT,CAAC;YACF,OAAO,MAAM,MAAM,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC;QAC9D,CAAC,CAAC;QAEF;;;;WAIG;QACH,mCAA8B,GAAG,KAAK,EAClC,MAAqB,EACM,EAAE;YAC7B,MAAM,YAAY,GAAG,MAAM,IAAI,CAAC,0BAA0B,CAAC;YAC3D,OAAO,MAAM,MAAM,CAAC,mBAAmB,CAAC,YAAY,CAAC,CAAC;QAC1D,CAAC,CAAC;QACF;;;;WAIG;QACH,yBAAoB,GAAG,KAAK,EAAE,MAAqB,EAAmB,EAAE;YACpE,MAAM,oBAAoB,GAAG,MAAM,IAAI,CAAC,8BAA8B,CAClE,MAAM,CACT,CAAC;YACF,MAAM,SAAS,GAAG,MAAM,MAAM,CAAC,eAAe,CAAC,oBAAoB,CAAC,CAAC;YACrE,OAAO,SAAS,CAAC;QACrB,CAAC,CAAC;QAEF;;;;;WAKG;QACH,uBAAkB,GAAG,KAAK,EAAE,MAAqB,EAAmB,EAAE;YAClE,MAAM,SAAS,GAAG,MAAM,IAAI,CAAC,oBAAoB,CAAC,MAAM,CAAC,CAAC;YAC1D,OAAO,MAAM,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAC7C,CAAC,CAAC;QApDE,IAAI,CAAC,0BAA0B,GAAG,GAAG,CAAC;QACtC,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;IACrB,CAAC;CAmDJ"}
@@ -1,4 +1,4 @@
1
- export declare type ErrorType = "FRAMEWORK_INITIALIZATION" | "SUPERTOKEN_INITIALIZATION" | "CREATE_SIGNER" | "SUPERTOKEN_READ" | "SUBGRAPH_ERROR" | "CFAV1_READ" | "IDAV1_READ" | "INVALID_ADDRESS" | "INVALID_OBJECT" | "UNCLEAN_PERMISSIONS" | "NEGATIVE_FLOW_ALLOWANCE" | "EXECUTE_TRANSACTION" | "POPULATE_TRANSACTION" | "SIGN_TRANSACTION" | "UNSUPPORTED_OPERATION" | "MISSING_TRANSACTION_PROPERTIES" | "BATCH_CALL_ERROR" | "NETWORK_MISMATCH";
1
+ export declare type ErrorType = "FRAMEWORK_INITIALIZATION" | "SUPERTOKEN_INITIALIZATION" | "CREATE_SIGNER" | "SUPERTOKEN_READ" | "SUBGRAPH_ERROR" | "CFAV1_READ" | "IDAV1_READ" | "INVALID_ADDRESS" | "INVALID_OBJECT" | "UNCLEAN_PERMISSIONS" | "NEGATIVE_FLOW_ALLOWANCE" | "UNSUPPORTED_OPERATION" | "MISSING_TRANSACTION_PROPERTIES" | "BATCH_CALL_ERROR" | "NETWORK_MISMATCH";
2
2
  interface ErrorProps {
3
3
  type: ErrorType;
4
4
  message: string;
@@ -1 +1 @@
1
- {"version":3,"file":"SFError.d.ts","sourceRoot":"","sources":["../../src/SFError.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS,GACf,0BAA0B,GAC1B,2BAA2B,GAC3B,eAAe,GACf,iBAAiB,GACjB,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,iBAAiB,GACjB,gBAAgB,GAChB,qBAAqB,GACrB,yBAAyB,GACzB,qBAAqB,GACrB,sBAAsB,GACtB,kBAAkB,GAClB,uBAAuB,GACvB,gCAAgC,GAChC,kBAAkB,GAClB,kBAAkB,CAAC;AAuBzB,UAAU,UAAU;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CAC3B;AAiBD,qBAAa,OAAQ,SAAQ,KAAK;IAC9B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,SAAkB,KAAK,CAAC,EAAE,KAAK,CAAC;gBAEpB,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,UAAU;CAwBnD"}
1
+ {"version":3,"file":"SFError.d.ts","sourceRoot":"","sources":["../../src/SFError.ts"],"names":[],"mappings":"AAEA,oBAAY,SAAS,GACf,0BAA0B,GAC1B,2BAA2B,GAC3B,eAAe,GACf,iBAAiB,GACjB,gBAAgB,GAChB,YAAY,GACZ,YAAY,GACZ,iBAAiB,GACjB,gBAAgB,GAChB,qBAAqB,GACrB,yBAAyB,GACzB,uBAAuB,GACvB,gCAAgC,GAChC,kBAAkB,GAClB,kBAAkB,CAAC;AAoBzB,UAAU,UAAU;IAChB,IAAI,EAAE,SAAS,CAAC;IAChB,OAAO,EAAE,MAAM,CAAC;IAChB,KAAK,CAAC,EAAE,KAAK,GAAG,OAAO,CAAC;CAC3B;AAcD,qBAAa,OAAQ,SAAQ,KAAK;IAC9B,QAAQ,CAAC,IAAI,EAAE,SAAS,CAAC;IACzB,SAAkB,KAAK,CAAC,EAAE,KAAK,CAAC;gBAEpB,EAAE,IAAI,EAAE,OAAO,EAAE,KAAK,EAAE,EAAE,UAAU;CAyBnD"}
@@ -1,4 +1,4 @@
1
- import { serializeError } from "serialize-error";
1
+ import { miniSerializeError } from "./miniSerializeError";
2
2
  const errorTypeToTitleMap = new Map([
3
3
  ["FRAMEWORK_INITIALIZATION", "Framework Initialization"],
4
4
  ["SUPERTOKEN_INITIALIZATION", "SuperToken Initialization"],
@@ -9,9 +9,6 @@ const errorTypeToTitleMap = new Map([
9
9
  ["IDAV1_READ", "InstantDistributionAgreementV1 Read"],
10
10
  ["INVALID_ADDRESS", "Invalid Address"],
11
11
  ["INVALID_OBJECT", "Invalid Object"],
12
- ["POPULATE_TRANSACTION", "Populate Transaction"],
13
- ["EXECUTE_TRANSACTION", "Execute Transaction"],
14
- ["SIGN_TRANSACTION", "Sign Transaction"],
15
12
  ["UNSUPPORTED_OPERATION", "Unsupported Batch Call Operation"],
16
13
  ["MISSING_TRANSACTION_PROPERTIES", "Missing Transaction Properties"],
17
14
  ["BATCH_CALL_ERROR", "Batch Call"],
@@ -19,31 +16,27 @@ const errorTypeToTitleMap = new Map([
19
16
  ["UNCLEAN_PERMISSIONS", "Unclean Permissions"],
20
17
  ["NEGATIVE_FLOW_ALLOWANCE", "Negative Flow Rate Allowance"],
21
18
  ]);
22
- // NOTE: this is a temporary solution to fix serializeError
23
- // which throws a weird JSON error
24
- const stringifyCause = (cause) => {
19
+ const miniStringifyCause = (cause) => {
25
20
  try {
26
- return JSON.stringify(serializeError(cause), null, 2);
21
+ const serializedError = miniSerializeError(cause);
22
+ const stringifiedError = JSON.stringify(serializedError, null, 2);
23
+ return stringifiedError.replace(/\\"/g, '"'); // Get rid of escaping of quotes.
27
24
  }
28
- catch (err) {
29
- try {
30
- return JSON.stringify(cause, null, 2);
31
- }
32
- catch {
33
- console.error("Caused by: ", cause);
34
- return "[Couldn't serialize error. Error logged to console.]";
35
- }
25
+ catch {
26
+ // `miniSerializeError` is safe enough that this should never occur.
27
+ console.error("SFError caused by: ", cause);
28
+ return "[Couldn't serialize internal error. Error logged to console instead.]";
36
29
  }
37
30
  };
38
31
  export class SFError extends Error {
39
32
  constructor({ type, message, cause }) {
40
33
  const fullMessage = `${errorTypeToTitleMap.get(type)} Error: ${message}${cause
41
34
  ? `
42
- Caused by: ${stringifyCause(cause)}`
35
+ Caused by: ${miniStringifyCause(cause)}`
43
36
  : ""}`;
44
37
  super(fullMessage, cause
45
38
  ? {
46
- cause: cause, // Currently "unknown" is not compatible with "cause" (because it expectes "Error" and that's why we cast) but this was recently changed and merged to also allow "unknown": https://github.com/microsoft/TypeScript/pull/49639
39
+ cause: cause, // Currently "unknown" is not compatible with "cause" (because it expects "Error" and that's why we cast) but this was recently changed and merged to also allow "unknown": https://github.com/microsoft/TypeScript/pull/49639
47
40
  }
48
41
  : {});
49
42
  // Fallback back environments where `Error.cause` is now yet natively supported
@@ -51,6 +44,7 @@ Caused by: ${stringifyCause(cause)}`
51
44
  this.cause = cause;
52
45
  }
53
46
  this.type = type;
47
+ this.name = "SFError";
54
48
  Object.setPrototypeOf(this, new.target.prototype); // restore prototype chain: https://www.typescriptlang.org/docs/handbook/release-notes/typescript-2-2.html#support-for-newtarget
55
49
  }
56
50
  }
@@ -1 +1 @@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AAK,IAAI,CAAC,IAAI,CAAC,KAAK,EAAE;YACtB,IAAI,CAAC,KAAK,GAAG,KAAc,CAAC;SAC/B;QACD,IAAI,CAAC,IAAI,GAAG,IAAI,CAAC;QACjB,IAAI,CAAC,IAAI,GAAG,SAAS,CAAC;QACtB,MAAM,CAAC,cAAc,CAAC,IAAI,EAAE,GAAG,CAAC,MAAM,CAAC,SAAS,CAAC,CAAC,CAAC,gIAAgI;IACvL,CAAC;CACJ"}
@@ -196,7 +196,7 @@
196
196
  },
197
197
  {
198
198
  "inputs": [],
199
- "name": "MAX_APP_LEVEL",
199
+ "name": "MAX_APP_CALLBACK_LEVEL",
200
200
  "outputs": [
201
201
  {
202
202
  "internalType": "uint256",
@@ -596,7 +596,7 @@
596
596
  "type": "address"
597
597
  }
598
598
  ],
599
- "name": "getAppLevel",
599
+ "name": "getAppCallbackLevel",
600
600
  "outputs": [
601
601
  {
602
602
  "internalType": "uint8",
@@ -774,17 +774,17 @@
774
774
  },
775
775
  {
776
776
  "internalType": "uint256",
777
- "name": "appAllowanceGranted",
777
+ "name": "appCreditGranted",
778
778
  "type": "uint256"
779
779
  },
780
780
  {
781
781
  "internalType": "int256",
782
- "name": "appAllowanceUsed",
782
+ "name": "appCreditUsed",
783
783
  "type": "int256"
784
784
  },
785
785
  {
786
786
  "internalType": "contract ISuperfluidToken",
787
- "name": "appAllowanceToken",
787
+ "name": "appCreditToken",
788
788
  "type": "address"
789
789
  }
790
790
  ],
@@ -808,7 +808,7 @@
808
808
  },
809
809
  {
810
810
  "internalType": "int256",
811
- "name": "appAllowanceUsedDelta",
811
+ "name": "appCreditUsedDelta",
812
812
  "type": "int256"
813
813
  }
814
814
  ],
@@ -830,18 +830,13 @@
830
830
  "name": "ctx",
831
831
  "type": "bytes"
832
832
  },
833
- {
834
- "internalType": "uint256",
835
- "name": "appAllowanceWantedMore",
836
- "type": "uint256"
837
- },
838
833
  {
839
834
  "internalType": "int256",
840
- "name": "appAllowanceUsedDelta",
835
+ "name": "appCreditUsedMore",
841
836
  "type": "int256"
842
837
  }
843
838
  ],
844
- "name": "ctxUseAllowance",
839
+ "name": "ctxUseCredit",
845
840
  "outputs": [
846
841
  {
847
842
  "internalType": "bytes",
@@ -1016,7 +1011,7 @@
1016
1011
  "components": [
1017
1012
  {
1018
1013
  "internalType": "uint8",
1019
- "name": "appLevel",
1014
+ "name": "appCallbackLevel",
1020
1015
  "type": "uint8"
1021
1016
  },
1022
1017
  {
@@ -1046,17 +1041,17 @@
1046
1041
  },
1047
1042
  {
1048
1043
  "internalType": "uint256",
1049
- "name": "appAllowanceGranted",
1044
+ "name": "appCreditGranted",
1050
1045
  "type": "uint256"
1051
1046
  },
1052
1047
  {
1053
1048
  "internalType": "uint256",
1054
- "name": "appAllowanceWanted",
1049
+ "name": "appCreditWantedDeprecated",
1055
1050
  "type": "uint256"
1056
1051
  },
1057
1052
  {
1058
1053
  "internalType": "int256",
1059
- "name": "appAllowanceUsed",
1054
+ "name": "appCreditUsed",
1060
1055
  "type": "int256"
1061
1056
  },
1062
1057
  {
@@ -1066,7 +1061,7 @@
1066
1061
  },
1067
1062
  {
1068
1063
  "internalType": "contract ISuperfluidToken",
1069
- "name": "appAllowanceToken",
1064
+ "name": "appCreditToken",
1070
1065
  "type": "address"
1071
1066
  }
1072
1067
  ],
@@ -1,4 +1,60 @@
1
1
  { "abi": [
2
+ {
3
+ "anonymous": false,
4
+ "inputs": [
5
+ {
6
+ "indexed": true,
7
+ "internalType": "contract ISuperfluid",
8
+ "name": "host",
9
+ "type": "address"
10
+ },
11
+ {
12
+ "indexed": true,
13
+ "internalType": "address",
14
+ "name": "factory",
15
+ "type": "address"
16
+ },
17
+ {
18
+ "indexed": false,
19
+ "internalType": "bool",
20
+ "name": "authorized",
21
+ "type": "bool"
22
+ }
23
+ ],
24
+ "name": "AppFactoryAuthorizationChanged",
25
+ "type": "event"
26
+ },
27
+ {
28
+ "anonymous": false,
29
+ "inputs": [
30
+ {
31
+ "indexed": true,
32
+ "internalType": "contract ISuperfluid",
33
+ "name": "host",
34
+ "type": "address"
35
+ },
36
+ {
37
+ "indexed": true,
38
+ "internalType": "address",
39
+ "name": "deployer",
40
+ "type": "address"
41
+ },
42
+ {
43
+ "indexed": false,
44
+ "internalType": "string",
45
+ "name": "appRegistrationKey",
46
+ "type": "string"
47
+ },
48
+ {
49
+ "indexed": false,
50
+ "internalType": "uint256",
51
+ "name": "expirationTs",
52
+ "type": "uint256"
53
+ }
54
+ ],
55
+ "name": "AppRegistrationKeyChanged",
56
+ "type": "event"
57
+ },
2
58
  {
3
59
  "anonymous": false,
4
60
  "inputs": [
@@ -328,17 +384,17 @@
328
384
  "type": "address"
329
385
  },
330
386
  {
331
- "internalType": "contract ISuperfluidToken",
332
- "name": "superToken",
387
+ "internalType": "address",
388
+ "name": "deployer",
333
389
  "type": "address"
334
390
  },
335
391
  {
336
- "internalType": "bytes32",
337
- "name": "key",
338
- "type": "bytes32"
392
+ "internalType": "string",
393
+ "name": "registrationKey",
394
+ "type": "string"
339
395
  }
340
396
  ],
341
- "name": "clearConfig",
397
+ "name": "clearAppRegistrationKey",
342
398
  "outputs": [],
343
399
  "stateMutability": "nonpayable",
344
400
  "type": "function"
@@ -354,9 +410,14 @@
354
410
  "internalType": "contract ISuperfluidToken",
355
411
  "name": "superToken",
356
412
  "type": "address"
413
+ },
414
+ {
415
+ "internalType": "bytes32",
416
+ "name": "key",
417
+ "type": "bytes32"
357
418
  }
358
419
  ],
359
- "name": "clearPPPConfig",
420
+ "name": "clearConfig",
360
421
  "outputs": [],
361
422
  "stateMutability": "nonpayable",
362
423
  "type": "function"
@@ -374,7 +435,7 @@
374
435
  "type": "address"
375
436
  }
376
437
  ],
377
- "name": "clearRewardAddress",
438
+ "name": "clearPPPConfig",
378
439
  "outputs": [],
379
440
  "stateMutability": "nonpayable",
380
441
  "type": "function"
@@ -387,12 +448,12 @@
387
448
  "type": "address"
388
449
  },
389
450
  {
390
- "internalType": "contract ISuperToken",
451
+ "internalType": "contract ISuperfluidToken",
391
452
  "name": "superToken",
392
453
  "type": "address"
393
454
  }
394
455
  ],
395
- "name": "clearSuperTokenMinimumDeposit",
456
+ "name": "clearRewardAddress",
396
457
  "outputs": [],
397
458
  "stateMutability": "nonpayable",
398
459
  "type": "function"
@@ -405,17 +466,12 @@
405
466
  "type": "address"
406
467
  },
407
468
  {
408
- "internalType": "contract ISuperfluidToken",
469
+ "internalType": "contract ISuperToken",
409
470
  "name": "superToken",
410
471
  "type": "address"
411
- },
412
- {
413
- "internalType": "address",
414
- "name": "forwarder",
415
- "type": "address"
416
472
  }
417
473
  ],
418
- "name": "clearTrustedForwarder",
474
+ "name": "clearSuperTokenMinimumDeposit",
419
475
  "outputs": [],
420
476
  "stateMutability": "nonpayable",
421
477
  "type": "function"
@@ -723,6 +779,34 @@
723
779
  "stateMutability": "nonpayable",
724
780
  "type": "function"
725
781
  },
782
+ {
783
+ "inputs": [
784
+ {
785
+ "internalType": "contract ISuperfluid",
786
+ "name": "host",
787
+ "type": "address"
788
+ },
789
+ {
790
+ "internalType": "address",
791
+ "name": "deployer",
792
+ "type": "address"
793
+ },
794
+ {
795
+ "internalType": "string",
796
+ "name": "registrationKey",
797
+ "type": "string"
798
+ },
799
+ {
800
+ "internalType": "uint256",
801
+ "name": "expirationTs",
802
+ "type": "uint256"
803
+ }
804
+ ],
805
+ "name": "setAppRegistrationKey",
806
+ "outputs": [],
807
+ "stateMutability": "nonpayable",
808
+ "type": "function"
809
+ },
726
810
  {
727
811
  "inputs": [
728
812
  {
@@ -912,6 +996,40 @@
912
996
  "stateMutability": "nonpayable",
913
997
  "type": "function"
914
998
  },
999
+ {
1000
+ "inputs": [
1001
+ {
1002
+ "internalType": "contract ISuperfluid",
1003
+ "name": "host",
1004
+ "type": "address"
1005
+ },
1006
+ {
1007
+ "internalType": "address",
1008
+ "name": "deployer",
1009
+ "type": "address"
1010
+ },
1011
+ {
1012
+ "internalType": "string",
1013
+ "name": "registrationKey",
1014
+ "type": "string"
1015
+ }
1016
+ ],
1017
+ "name": "verifyAppRegistrationKey",
1018
+ "outputs": [
1019
+ {
1020
+ "internalType": "bool",
1021
+ "name": "validNow",
1022
+ "type": "bool"
1023
+ },
1024
+ {
1025
+ "internalType": "uint256",
1026
+ "name": "expirationTs",
1027
+ "type": "uint256"
1028
+ }
1029
+ ],
1030
+ "stateMutability": "view",
1031
+ "type": "function"
1032
+ },
915
1033
  {
916
1034
  "inputs": [],
917
1035
  "name": "proxiableUUID",
@@ -12,36 +12,6 @@ export declare const WEEK_IN_SECONDS: number;
12
12
  export declare const MONTH_IN_SECONDS: number;
13
13
  export declare const YEAR_IN_SECONDS: number;
14
14
  export declare const BASE_18 = 1000000000000000000;
15
- /******* NETWORK NAMES *******/
16
- export declare const ETH_ROPSTEN = "eth-ropsten";
17
- export declare const ETH_RINKEBY = "eth-rinkeby";
18
- export declare const ETH_GOERLI = "eth-goerli";
19
- export declare const ETH_KOVAN = "eth-kovan";
20
- export declare const POLYGON_MAINNET = "polygon-mainnet";
21
- export declare const POLYGON_MUMBAI = "polygon-mumbai";
22
- export declare const XDAI_MAINNET = "xdai-mainnet";
23
- export declare const OPTIMISM_MAINNET = "optimism-mainnet";
24
- export declare const OPTIMISM_KOVAN = "optimism-kovan";
25
- export declare const ARBITRUM_ONE = "arbitrum-one";
26
- export declare const ARBITRUM_RINKEBY = "arbitrum-rinkeby";
27
- export declare const AVALANCHE_C = "avalanche-c";
28
- export declare const AVALANCHE_FUJI = "avalanche-fuji";
29
- export declare const BSC_MAINNET = "bsc-mainnet";
30
- /******* CHAIN IDS *******/
31
- export declare const ETH_ROPSTEN_CHAIN_ID = 3;
32
- export declare const ETH_RINKEBY_CHAIN_ID = 4;
33
- export declare const ETH_GOERLI_CHAIN_ID = 5;
34
- export declare const ETH_KOVAN_CHAIN_ID = 42;
35
- export declare const GNOSIS_CHAIN_ID = 100;
36
- export declare const MATIC_CHAIN_ID = 137;
37
- export declare const MUMBAI_CHAIN_ID = 80001;
38
- export declare const OPTIMISM_MAINNET_CHAIN_ID = 10;
39
- export declare const OPTIMISM_KOVAN_CHAIN_ID = 69;
40
- export declare const ARBITRUM_ONE_CHAIN_ID = 42161;
41
- export declare const ARBITRUM_RINKEBY_CHAIN_ID = 421611;
42
- export declare const AVALANCHE_FUJI_CHAIN_ID = 43113;
43
- export declare const AVALANCHE_C_CHAIN_ID = 43114;
44
- export declare const BSC_MAINNET_CHAIN_ID = 56;
45
15
  export declare const chainIds: number[];
46
16
  /******* ACL AUTHORIZATION BIT OPERATIONS *******/
47
17
  export declare const AUTHORIZE_FLOW_OPERATOR_CREATE: number;
@@ -1 +1 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAE7C,gCAAgC;AAChC,eAAO,MAAM,eAAe,KAAK,CAAC;AAClC,eAAO,MAAM,cAAc,KAAK,CAAC;AACjC,eAAO,MAAM,aAAa,IAAI,CAAC;AAC/B,eAAO,MAAM,aAAa,KAAK,CAAC;AAChC,eAAO,MAAM,gBAAgB,KAAK,CAAC;AACnC,eAAO,MAAM,iBAAiB,KAAK,CAAC;AACpC,eAAO,MAAM,eAAe,QAAuC,CAAC;AACpE,eAAO,MAAM,cAAc,QAAkC,CAAC;AAC9D,eAAO,MAAM,eAAe,QAAiC,CAAC;AAC9D,eAAO,MAAM,gBAAgB,QAAkC,CAAC;AAChE,eAAO,MAAM,eAAe,QAAqC,CAAC;AAClE,eAAO,MAAM,OAAO,sBAAO,CAAC;AAE5B,+BAA+B;AAC/B,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,WAAW,gBAAgB,CAAC;AACzC,eAAO,MAAM,UAAU,eAAe,CAAC;AACvC,eAAO,MAAM,SAAS,cAAc,CAAC;AAErC,eAAO,MAAM,eAAe,oBAAoB,CAAC;AACjD,eAAO,MAAM,cAAc,mBAAmB,CAAC;AAE/C,eAAO,MAAM,Y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